Skip to content

Commit b8df1c8

Browse files
committed
upgrade
1 parent 9540615 commit b8df1c8

10 files changed

+249
-141
lines changed

Modify_the_Zram.sln

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{05C278
1919
common\service.sh = common\service.sh
2020
common\system.prop = common\system.prop
2121
common\unity_install.sh = common\unity_install.sh
22+
common\unity_install.sh.bak = common\unity_install.sh.bak
2223
common\unity_uninstall.sh = common\unity_uninstall.sh
2324
common\unity_upgrade.sh = common\unity_upgrade.sh
2425
EndProjectSection
@@ -60,6 +61,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "android", "android", "{3727
6061
EndProject
6162
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "system", "system", "{DC64D1B3-6C84-4714-8EBE-B85118A3C94E}"
6263
EndProject
64+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "vendor", "vendor", "{5C910E23-6225-48F1-93C3-6EFDDE9F117E}"
65+
EndProject
66+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "bin", "bin", "{DE9E9C03-6144-4EDB-87F2-9FC4E51D621E}"
67+
ProjectSection(SolutionItems) = preProject
68+
system\vendor\bin\init.qcom.post_boot.sh = system\vendor\bin\init.qcom.post_boot.sh
69+
EndProjectSection
70+
EndProject
6371
Global
6472
GlobalSection(SolutionProperties) = preSolution
6573
HideSolutionNode = FALSE
@@ -78,6 +86,8 @@ Global
7886
{56E984B0-500E-454D-B610-32D39DF45A22} = {51D5AD27-765A-4A21-9CBD-7AD2A325FEDA}
7987
{372761AC-3ECE-4A90-9847-1BF1B2ED91D8} = {56E984B0-500E-454D-B610-32D39DF45A22}
8088
{DC64D1B3-6C84-4714-8EBE-B85118A3C94E} = {4BA71F79-35C1-4DB9-93C6-A21C9CD0429B}
89+
{5C910E23-6225-48F1-93C3-6EFDDE9F117E} = {DC64D1B3-6C84-4714-8EBE-B85118A3C94E}
90+
{DE9E9C03-6144-4EDB-87F2-9FC4E51D621E} = {5C910E23-6225-48F1-93C3-6EFDDE9F117E}
8191
EndGlobalSection
8292
GlobalSection(ExtensibilityGlobals) = postSolution
8393
SolutionGuid = {9A682400-E9CD-4D0B-A6C8-FE883CD2409B}

Modify_the_Zram_v.1.1.07.zip

1.9 MB
Binary file not shown.

Modify_the_Zram_v1.1.06.zip

1.9 MB
Binary file not shown.

README.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

common/unity_install.sh

Lines changed: 67 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -14,130 +14,109 @@ IFS=$OIFS
1414

1515
if
1616
[ -z $microG ] || [ -z $clearG1 ] || [ -z $clearG2 ] || [ -z $clearG3 ]; then
17-
echo " _ ______";
18-
echo " ____ ___ (_) _____ _____ ____ / ____/";
19-
echo " / __ \`__ \ / / / ___/ / ___/ / __ \ / / __ ";
20-
echo " / / / / / / / / / /__ / / / /_/ // /_/ / ";
21-
echo "/_/ /_/ /_/ /_/ \___/ /_/ \____/ \____/ ";
22-
echo " ";
23-
ui_print "- 是否需要安装 microG ?"
24-
ui_print " Do you want to install microG ?"
17+
echo " _________ ________ ______ _________ ________ ______ ";
18+
echo "/________/\ /_______/\ /_____/\ /________/\ /_______/\ /_____/\ ";
19+
echo "\__.::.__\/ \::: _ \ \ \:::_ \ \ \__.::.__\/ \::: _ \ \ \:::_ \ \ ";
20+
echo " \::\ \ \::(_) \ \ \:\ \ \ \ \::\ \ \::(_) \ \ \:\ \ \ \ ";
21+
echo " \::\ \ \:: __ \ \ \:\ \ \ \ \::\ \ \:: __ \ \ \:\ \ \ \ ";
22+
echo " \::\ \ \:.\ \ \ \ \:\_\ \ \ \::\ \ \:.\ \ \ \ \:\_\ \ \ ";
23+
echo " \__\/ \__\/\__\/ \_____\/ \__\/ \__\/\__\/ \_____\/ ";
24+
echo " ";
25+
ui_print "- 准备好配置zram选项了吗 ?"
26+
ui_print " Ready to configure your zram options?"
2527
ui_print "- 按下音量加=是,按下音量减=否,和退出"
2628
ui_print " Press Vol+ = Yes , Press Vol- = No, and exit "
2729
if $VKSEL; then
2830
ui_print " "
2931
ui_print " "
3032
ui_print " "
31-
ui_print "- 是否需要执行干净安装microG"
33+
ui_print "- 是否需要开启2G大小的zram"
3234
# ui_print " Pick among 1, 2 or 3"
33-
ui_print " Whether to clear the microG before installing it?"
35+
ui_print " Do I need to turn on a 2GB zram?"
3436
ui_print " "
3537
# ui_print " Vol+ = Icon Pack-1, Vol- = Show next"
36-
ui_print "- 按下音量加=是,按下音量减="
37-
ui_print " Vol+ = Yes, Vol- = NO"
38+
ui_print "- 按下音量加=是,按下音量减=显示下一个选项"
39+
ui_print " Vol+ = Yes, Vol- = Show the next option"
3840
microG=true
3941
if $VKSEL; then
4042
clearG1=true
4143
clearG2=false
4244
clearG3=false
4345
else
44-
# ui_print " "
45-
# ui_print " "
46-
# ui_print " Select Icon Pack 2 or 3 "
47-
# ui_print " "
48-
# ui_print " Vol+ = Icon Pack-2, Vol- = Icon Pack-3"
49-
# if $VKSEL; then
50-
# clearG1=false
51-
# clearG2=true
52-
# clearG3=false
53-
# else
54-
# clearG1=false
55-
# clearG2=false
56-
# clearG3=true
57-
clearG1=false
58-
clearG2=true
59-
clearG3=false
60-
ui_print "- 你选择了直接安装microG,正在安装中..."
61-
ui_print " You chose to install microG directly, it is being installed..."
62-
# fi
46+
ui_print " "
47+
ui_print " "
48+
ui_print "- 选择开启4G大小的zram或者直接关闭zram"
49+
ui_print " Choose to turn on the 4G zRAM or turn it off"
50+
ui_print " Vol+ = Yes, custom, Vol- = Close the zram"
51+
if $VKSEL; then
52+
clearG1=false
53+
clearG2=true
54+
clearG3=false
55+
else
56+
clearG1=false
57+
clearG2=false
58+
clearG3=true
59+
fi
6360
fi
6461
else
6562
microG=false
66-
ui_print "- 安装被取消,microG未生效"
67-
ui_print " The installation was cancelled and microG did not take effect"
63+
ui_print "- 安装被取消,模块已卸载"
64+
ui_print " Installation cancelled, module uninstalled"
6865
exit 1
6966
fi
7067
else
71-
ui_print "- microG已安装成功"
68+
ui_print "- 模块出错,意外退出"
7269
ui_print " The microG has been installed successfully"
7370
fi
7471

7572

7673
#ui_print "- Follow github:taoaoooo/qq群:273145623"
7774
#ui_print " Follow Github: taoaoooo/QQ group: 273145623"
7875

79-
mkdir -p $TMPDIR/system
76+
mkdir -p $TMPDIR/system/vendor/bin
8077

8178
if $microG; then
8279
ui_print ">"
8380
if $clearG1; then
8481
ui_print "- 挂载根目录..."
85-
mount -o rw,remount / || echo "error code:85"
86-
ui_print "- Uninstall the gsf..."
87-
# cp -f $TMPDIR/apk/B1.apk $TMPDIR/system/product/overlay
88-
# cp -f $TMPDIR/apk/IP1.apk $TMPDIR/system/product/overlay
89-
# 卸载gsf
90-
pm uninstall -k --user 0 com.google.android.gsf
91-
rm -rf /system/priv-app/GoogleServicesFramework || echo "error code:91"
92-
rm -rf /system/app/GoogleServicesFramework
93-
rm -rf /system/product/priv-app/GoogleServicesFramework
94-
rm -rf /system/product/app/GoogleServicesFramework
95-
rm -rf /system/system_ext/priv-app/GoogleServicesFramework || echo "error code:95"
96-
rm -rf /system/system_ext/app/GoogleServicesFramework
97-
ui_print "- Uninstall the gms..."
98-
pm uninstall -k --user 0 com.google.android.gms
99-
rm -rf /system/priv-app/PrebuiltGmsCore
100-
rm -rf /system/app/PrebuiltGmsCore
101-
rm -rf /system/product/priv-app/PrebuiltGmsCore
102-
rm -rf /system/product/app/PrebuiltGmsCore
103-
rm -rf /system/system_ext/priv-app/PrebuiltGmsCore
104-
rm -rf /system/system_ext/app/PrebuiltGmsCore
105-
ui_print "- Uninstall the playStore..."
106-
pm uninstall -k --user 0 com.google.android.vending
107-
rm -rf /system/priv-app/Phonesky
108-
rm -rf /system/app/Phonesky
109-
rm -rf /system/product/priv-app/Phonesky
110-
rm -rf /system/product/app/Phonesky
111-
rm -rf /system/system_ext/priv-app/Phonesky
112-
rm -rf /system/system_ext/app/Phonesky
113-
ui_print "- Uninstall the googleContactsSync..."
114-
pm uninstall -k --user 0 com.google.android.syncadapters.contacts
115-
rm -rf /system/priv-app/GoogleContactsSyncAdapter
116-
rm -rf /system/app/GoogleContactsSyncAdapter
117-
rm -rf /system/product/priv-app/GoogleContactsSyncAdapter
118-
rm -rf /system/product/app/GoogleContactsSyncAdapter
119-
rm -rf /system/system_ext/priv-app/GoogleContactsSyncAdapter
120-
rm -rf /system/system_ext/app/GoogleContactsSyncAdapter
121-
ui_print "- Uninstall the droidguard..."
122-
pm uninstall -k --user 0 org.microg.gms.droidguard
123-
rm -rf /system/priv-app/DroidGuard
124-
rm -rf /system/app/DroidGuard
125-
rm -rf /system/product/priv-app/DroidGuard
126-
rm -rf /system/product/app/DroidGuard
127-
rm -rf /system/system_ext/priv-app/DroidGuard
128-
rm -rf /system/system_ext/app/DroidGuard
129-
ls /data/user/0/com.google.android.vending >/dev/null || echo "- 卸载残留已清理"&&echo " Uninstallation residue has been cleared"
82+
mount -o rw,remount / || echo "error code:80 lines"
83+
ui_print "- Copy the file to be operated..."
84+
cp -f /system/vendor/bin/init.qcom.post_boot.sh $TMPDIR/system/vendor/bin || echo "error code:84 lines"
85+
vim -e $TMPDIR/system/vendor/bin/init.qcom.post_boot.sh<<-!
86+
:1,%s/echo\(.*\)\/sys\/block\/zram0\/disksize/echo 2147483648 \> \/sys\/block\/zram0\/disksize/g
87+
:wq
88+
!
13089
ui_print "- 恢复根目录只读..."
13190
mount -o ro,remount /
91+
# 卸载gsf
13292
elif $clearG2; then
133-
# ui_print "- Icon Pack 2 selected -"
134-
ui_print "- 安装完毕 -"
135-
# cp -f $TMPDIR/apk/B2.apk $TMPDIR/system/product/overlay
136-
# cp -f $TMPDIR/apk/IP2.apk $TMPDIR/system/product/overlay
137-
# elif $clearG3; then
138-
# ui_print "- Icon Pack 3 selected -"
139-
# cp -f $TMPDIR/apk/B3.apk $TMPDIR/system/product/overlay
140-
# cp -f $TMPDIR/apk/IP3.apk $TMPDIR/system/product/overlay
93+
ui_print "- 挂载根目录..."
94+
mount -o rw,remount / || echo "error code:80 lines"
95+
ui_print "- Copy the file to be operated..."
96+
cp -f /system/vendor/bin/init.qcom.post_boot.sh $TMPDIR/system/vendor/bin || echo "error code:84 lines"
97+
vim -e $TMPDIR/system/vendor/bin/init.qcom.post_boot.sh<<-!
98+
:1,%s/echo\(.*\)\/sys\/block\/zram0\/disksize/echo 4294967296 \> \/sys\/block\/zram0\/disksize/g
99+
:wq
100+
!
101+
ui_print "- 恢复根目录只读..."
102+
mount -o ro,remount /
103+
elif $clearG3; then
104+
ui_print "- 挂载根目录..."
105+
mount -o rw,remount / || echo "error code:80 lines"
106+
ui_print "- Copy the file to be operated..."
107+
cp -f /system/vendor/bin/init.qcom.post_boot.sh $TMPDIR/system/vendor/bin || echo "error code:84 lines"
108+
vim -e $TMPDIR/system/vendor/bin/init.qcom.post_boot.sh<<-!
109+
:1,%s/echo\(.*\)\/sys\/block\/zram0\/disksize/echo 0 \> \/sys\/block\/zram0\/disksize/g
110+
:wq
111+
!
112+
ui_print "- 恢复根目录只读..."
113+
ui_print "- Zram已关闭,如果你后续需要开启请重新运行此安装程序"
114+
ui_print " Zram has been turned off, please re-run this setup if you need to turn it on later"
115+
ui_print "- 或者你也可以在/data/adb/modules/Zram_tao/system/vendor/bin下修改sh"
116+
ui_print " Alternatively, you can modify sh under /data/adb/modules/Zram_tao/system/vendor/bin"
117+
ui_print "- 找到”echo 0 > /sys/block/zram0/disksize“修改0的值大小,比如4294967296是4G,保存后重启生效"
118+
ui_print " Find ”echo 0 > /sys/block/zram0/disksize“ modify zero value size, such as 4294967296 is 4 g, save after restart to take effect"
119+
mount -o ro,remount /
141120
fi
142121
fi
143122

0 commit comments

Comments
 (0)