Skip to content

Commit

Permalink
upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
ozingi committed Aug 22, 2021
1 parent 9540615 commit b8df1c8
Show file tree
Hide file tree
Showing 10 changed files with 249 additions and 141 deletions.
10 changes: 10 additions & 0 deletions Modify_the_Zram.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{05C278
common\service.sh = common\service.sh
common\system.prop = common\system.prop
common\unity_install.sh = common\unity_install.sh
common\unity_install.sh.bak = common\unity_install.sh.bak
common\unity_uninstall.sh = common\unity_uninstall.sh
common\unity_upgrade.sh = common\unity_upgrade.sh
EndProjectSection
Expand Down Expand Up @@ -60,6 +61,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "android", "android", "{3727
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "system", "system", "{DC64D1B3-6C84-4714-8EBE-B85118A3C94E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "vendor", "vendor", "{5C910E23-6225-48F1-93C3-6EFDDE9F117E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "bin", "bin", "{DE9E9C03-6144-4EDB-87F2-9FC4E51D621E}"
ProjectSection(SolutionItems) = preProject
system\vendor\bin\init.qcom.post_boot.sh = system\vendor\bin\init.qcom.post_boot.sh
EndProjectSection
EndProject
Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -78,6 +86,8 @@ Global
{56E984B0-500E-454D-B610-32D39DF45A22} = {51D5AD27-765A-4A21-9CBD-7AD2A325FEDA}
{372761AC-3ECE-4A90-9847-1BF1B2ED91D8} = {56E984B0-500E-454D-B610-32D39DF45A22}
{DC64D1B3-6C84-4714-8EBE-B85118A3C94E} = {4BA71F79-35C1-4DB9-93C6-A21C9CD0429B}
{5C910E23-6225-48F1-93C3-6EFDDE9F117E} = {DC64D1B3-6C84-4714-8EBE-B85118A3C94E}
{DE9E9C03-6144-4EDB-87F2-9FC4E51D621E} = {5C910E23-6225-48F1-93C3-6EFDDE9F117E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9A682400-E9CD-4D0B-A6C8-FE883CD2409B}
Expand Down
Binary file added Modify_the_Zram_v.1.1.07.zip
Binary file not shown.
Binary file added Modify_the_Zram_v1.1.06.zip
Binary file not shown.
39 changes: 0 additions & 39 deletions README.md

This file was deleted.

155 changes: 67 additions & 88 deletions common/unity_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,130 +14,109 @@ IFS=$OIFS

if
[ -z $microG ] || [ -z $clearG1 ] || [ -z $clearG2 ] || [ -z $clearG3 ]; then
echo " _ ______";
echo " ____ ___ (_) _____ _____ ____ / ____/";
echo " / __ \`__ \ / / / ___/ / ___/ / __ \ / / __ ";
echo " / / / / / / / / / /__ / / / /_/ // /_/ / ";
echo "/_/ /_/ /_/ /_/ \___/ /_/ \____/ \____/ ";
echo " ";
ui_print "- 是否需要安装 microG ?"
ui_print " Do you want to install microG ?"
echo " _________ ________ ______ _________ ________ ______ ";
echo "/________/\ /_______/\ /_____/\ /________/\ /_______/\ /_____/\ ";
echo "\__.::.__\/ \::: _ \ \ \:::_ \ \ \__.::.__\/ \::: _ \ \ \:::_ \ \ ";
echo " \::\ \ \::(_) \ \ \:\ \ \ \ \::\ \ \::(_) \ \ \:\ \ \ \ ";
echo " \::\ \ \:: __ \ \ \:\ \ \ \ \::\ \ \:: __ \ \ \:\ \ \ \ ";
echo " \::\ \ \:.\ \ \ \ \:\_\ \ \ \::\ \ \:.\ \ \ \ \:\_\ \ \ ";
echo " \__\/ \__\/\__\/ \_____\/ \__\/ \__\/\__\/ \_____\/ ";
echo " ";
ui_print "- 准备好配置zram选项了吗 ?"
ui_print " Ready to configure your zram options?"
ui_print "- 按下音量加=是,按下音量减=否,和退出"
ui_print " Press Vol+ = Yes , Press Vol- = No, and exit "
if $VKSEL; then
ui_print " "
ui_print " "
ui_print " "
ui_print "- 是否需要执行干净安装microG"
ui_print "- 是否需要开启2G大小的zram"
# ui_print " Pick among 1, 2 or 3"
ui_print " Whether to clear the microG before installing it?"
ui_print " Do I need to turn on a 2GB zram?"
ui_print " "
# ui_print " Vol+ = Icon Pack-1, Vol- = Show next"
ui_print "- 按下音量加=是,按下音量减="
ui_print " Vol+ = Yes, Vol- = NO"
ui_print "- 按下音量加=是,按下音量减=显示下一个选项"
ui_print " Vol+ = Yes, Vol- = Show the next option"
microG=true
if $VKSEL; then
clearG1=true
clearG2=false
clearG3=false
else
# ui_print " "
# ui_print " "
# ui_print " Select Icon Pack 2 or 3 "
# ui_print " "
# ui_print " Vol+ = Icon Pack-2, Vol- = Icon Pack-3"
# if $VKSEL; then
# clearG1=false
# clearG2=true
# clearG3=false
# else
# clearG1=false
# clearG2=false
# clearG3=true
clearG1=false
clearG2=true
clearG3=false
ui_print "- 你选择了直接安装microG,正在安装中..."
ui_print " You chose to install microG directly, it is being installed..."
# fi
ui_print " "
ui_print " "
ui_print "- 选择开启4G大小的zram或者直接关闭zram"
ui_print " Choose to turn on the 4G zRAM or turn it off"
ui_print " Vol+ = Yes, custom, Vol- = Close the zram"
if $VKSEL; then
clearG1=false
clearG2=true
clearG3=false
else
clearG1=false
clearG2=false
clearG3=true
fi
fi
else
microG=false
ui_print "- 安装被取消,microG未生效"
ui_print " The installation was cancelled and microG did not take effect"
ui_print "- 安装被取消,模块已卸载"
ui_print " Installation cancelled, module uninstalled"
exit 1
fi
else
ui_print "- microG已安装成功"
ui_print "- 模块出错,意外退出"
ui_print " The microG has been installed successfully"
fi


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

mkdir -p $TMPDIR/system
mkdir -p $TMPDIR/system/vendor/bin

if $microG; then
ui_print ">"
if $clearG1; then
ui_print "- 挂载根目录..."
mount -o rw,remount / || echo "error code:85"
ui_print "- Uninstall the gsf..."
# cp -f $TMPDIR/apk/B1.apk $TMPDIR/system/product/overlay
# cp -f $TMPDIR/apk/IP1.apk $TMPDIR/system/product/overlay
# 卸载gsf
pm uninstall -k --user 0 com.google.android.gsf
rm -rf /system/priv-app/GoogleServicesFramework || echo "error code:91"
rm -rf /system/app/GoogleServicesFramework
rm -rf /system/product/priv-app/GoogleServicesFramework
rm -rf /system/product/app/GoogleServicesFramework
rm -rf /system/system_ext/priv-app/GoogleServicesFramework || echo "error code:95"
rm -rf /system/system_ext/app/GoogleServicesFramework
ui_print "- Uninstall the gms..."
pm uninstall -k --user 0 com.google.android.gms
rm -rf /system/priv-app/PrebuiltGmsCore
rm -rf /system/app/PrebuiltGmsCore
rm -rf /system/product/priv-app/PrebuiltGmsCore
rm -rf /system/product/app/PrebuiltGmsCore
rm -rf /system/system_ext/priv-app/PrebuiltGmsCore
rm -rf /system/system_ext/app/PrebuiltGmsCore
ui_print "- Uninstall the playStore..."
pm uninstall -k --user 0 com.google.android.vending
rm -rf /system/priv-app/Phonesky
rm -rf /system/app/Phonesky
rm -rf /system/product/priv-app/Phonesky
rm -rf /system/product/app/Phonesky
rm -rf /system/system_ext/priv-app/Phonesky
rm -rf /system/system_ext/app/Phonesky
ui_print "- Uninstall the googleContactsSync..."
pm uninstall -k --user 0 com.google.android.syncadapters.contacts
rm -rf /system/priv-app/GoogleContactsSyncAdapter
rm -rf /system/app/GoogleContactsSyncAdapter
rm -rf /system/product/priv-app/GoogleContactsSyncAdapter
rm -rf /system/product/app/GoogleContactsSyncAdapter
rm -rf /system/system_ext/priv-app/GoogleContactsSyncAdapter
rm -rf /system/system_ext/app/GoogleContactsSyncAdapter
ui_print "- Uninstall the droidguard..."
pm uninstall -k --user 0 org.microg.gms.droidguard
rm -rf /system/priv-app/DroidGuard
rm -rf /system/app/DroidGuard
rm -rf /system/product/priv-app/DroidGuard
rm -rf /system/product/app/DroidGuard
rm -rf /system/system_ext/priv-app/DroidGuard
rm -rf /system/system_ext/app/DroidGuard
ls /data/user/0/com.google.android.vending >/dev/null || echo "- 卸载残留已清理"&&echo " Uninstallation residue has been cleared"
mount -o rw,remount / || echo "error code:80 lines"
ui_print "- Copy the file to be operated..."
cp -f /system/vendor/bin/init.qcom.post_boot.sh $TMPDIR/system/vendor/bin || echo "error code:84 lines"
vim -e $TMPDIR/system/vendor/bin/init.qcom.post_boot.sh<<-!
:1,%s/echo\(.*\)\/sys\/block\/zram0\/disksize/echo 2147483648 \> \/sys\/block\/zram0\/disksize/g
:wq
!
ui_print "- 恢复根目录只读..."
mount -o ro,remount /
# 卸载gsf
elif $clearG2; then
# ui_print "- Icon Pack 2 selected -"
ui_print "- 安装完毕 -"
# cp -f $TMPDIR/apk/B2.apk $TMPDIR/system/product/overlay
# cp -f $TMPDIR/apk/IP2.apk $TMPDIR/system/product/overlay
# elif $clearG3; then
# ui_print "- Icon Pack 3 selected -"
# cp -f $TMPDIR/apk/B3.apk $TMPDIR/system/product/overlay
# cp -f $TMPDIR/apk/IP3.apk $TMPDIR/system/product/overlay
ui_print "- 挂载根目录..."
mount -o rw,remount / || echo "error code:80 lines"
ui_print "- Copy the file to be operated..."
cp -f /system/vendor/bin/init.qcom.post_boot.sh $TMPDIR/system/vendor/bin || echo "error code:84 lines"
vim -e $TMPDIR/system/vendor/bin/init.qcom.post_boot.sh<<-!
:1,%s/echo\(.*\)\/sys\/block\/zram0\/disksize/echo 4294967296 \> \/sys\/block\/zram0\/disksize/g
:wq
!
ui_print "- 恢复根目录只读..."
mount -o ro,remount /
elif $clearG3; then
ui_print "- 挂载根目录..."
mount -o rw,remount / || echo "error code:80 lines"
ui_print "- Copy the file to be operated..."
cp -f /system/vendor/bin/init.qcom.post_boot.sh $TMPDIR/system/vendor/bin || echo "error code:84 lines"
vim -e $TMPDIR/system/vendor/bin/init.qcom.post_boot.sh<<-!
:1,%s/echo\(.*\)\/sys\/block\/zram0\/disksize/echo 0 \> \/sys\/block\/zram0\/disksize/g
:wq
!
ui_print "- 恢复根目录只读..."
ui_print "- Zram已关闭,如果你后续需要开启请重新运行此安装程序"
ui_print " Zram has been turned off, please re-run this setup if you need to turn it on later"
ui_print "- 或者你也可以在/data/adb/modules/Zram_tao/system/vendor/bin下修改sh"
ui_print " Alternatively, you can modify sh under /data/adb/modules/Zram_tao/system/vendor/bin"
ui_print "- 找到”echo 0 > /sys/block/zram0/disksize“修改0的值大小,比如4294967296是4G,保存后重启生效"
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"
mount -o ro,remount /
fi
fi

Expand Down
Loading

0 comments on commit b8df1c8

Please sign in to comment.