Skip to content

Commit f27d702

Browse files
Add files via upload
0 parents  commit f27d702

File tree

5 files changed

+70
-0
lines changed

5 files changed

+70
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Small Battery
2+
3+
## Description
4+
This module makes the system think that it has a smaller battery than normal, which will apply more precise adjustments to save battery.
5+
6+
## Details:
7+
This will probably disable advanced features (such as the ro.config.low_ram property) that consume more battery.
8+
9+
## Installation
10+
1. Install the module in Magisk (reboot)
11+
12+
## Support
13+
- [GitHub](https://github.com/LeanxModulostk/wifi-bonding-nolog)
14+
- [Telegram Channel](https://t.me/modulostk)
15+
16+
## Special Thanks
17+
18+
[Google 💩](https://android.googlesource.com/platform/frameworks/base.git/+/master/core/java/com/android/internal/os/RoSystemProperties.java)
19+
20+
[Zackptg5 for the MMT-Ex template](https://github.com/Zackptg5)
21+
22+
[Topjohnwu for making Magisk](https://github.com/topjohnwu)

customize.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
SKIPMOUNT=false
2+
PROPFILE=true
3+
POSTFSDATA=false
4+
LATESTARTSERVICE=true
5+
6+
print_modname() {
7+
ui_print "*******************************"
8+
ui_print " @modulostk en Telegram "
9+
ui_print "*******************************"
10+
}
11+
12+
on_install() {
13+
unzip -o "$ZIPFILE" 'system/*' -d "$MODPATH" >&2
14+
}
15+
16+
set_permissions() {
17+
set_perm_recursive "$MODPATH" 0 0 0755 0644
18+
}

module.prop

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
id=smallbattery
2+
name=Small Battery
3+
version=v1
4+
versionCode=1
5+
author=@LeanHijosdesusMadres [telegram]
6+
description=This module makes the system think that it has a smaller battery than normal, which will apply more precise adjustments to save battery. @modulostk

post-fs-data.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/system/bin/sh
2+
MODDIR ${0%/*}
3+
4+
# @modulostk [telegram]
5+
#####################################
6+
#Small battery
7+
resetprop -n ro.config.small_battery true

uninstall.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Don't modify anything after this
2+
[[ -f "$INFO" ]] && {
3+
while read LINE; do
4+
if [[ "$(echo -n "$LINE" | tail -c 1)" == "~" ]]; then
5+
continue
6+
elif [[ -f "$LINE~" ]]; then
7+
mv -f "$LINE~" "$LINE"
8+
else
9+
rm -f "$LINE"
10+
while true; do
11+
LINE=$(dirname $LINE)
12+
[[ "$(ls -A $LINE 2>/dev/null)" ]] && break 1 || rm -rf "$LINE"
13+
done
14+
fi
15+
done < $INFO
16+
rm -f "$INFO"
17+
}

0 commit comments

Comments
 (0)