2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-10-31 09:20:23 +00:00

CommonInstaller: fix System Mode installation in several cases, caused by linking issues

This commit is contained in:
Christopher Roy Bratusek 2018-08-18 21:12:46 +02:00
parent 3c3cdbe95b
commit d4f74bd9db
2 changed files with 25 additions and 0 deletions

View File

@ -2,6 +2,11 @@
## 17.9 in-dev
### Bug Fixes
* CommonInstaller
* fix System Mode installation in several cases, caused by linking issues
### General Changes
* CommonInstaller

View File

@ -261,6 +261,8 @@ detect_mode () {
else
NANODROID_UPGRADE=0
fi
recovery_actions
fi
[ "${MODE}" = "MAGISK" ] && magisk_install_setup
@ -315,6 +317,7 @@ nanodroid_finalize () {
magisk_install_finish
else
install_addond
recovery_cleanup
sort /data/adb/.nanodroid-list | uniq > /tmp/nanodroid-list
mv /tmp/nanodroid-list /data/adb/.nanodroid-list
@ -402,6 +405,23 @@ detect_arch () {
[ ! -d /data/adb ] && mkdir /data/adb
}
# Taken from Magisk, used for System Mode installation
recovery_actions () {
mv /sbin /sbin_tmp
OLD_LD_LIB=$LD_LIBRARY_PATH
OLD_LD_PRE=$LD_PRELOAD
unset LD_LIBRARY_PATH
unset LD_PRELOAD
}
# Taken from Magisk, used for System Mode installation
recovery_cleanup () {
mv /sbin_tmp /sbin 2>/dev/null
[ -z $OLD_PATH ] || export PATH=$OLD_PATH
[ -z $OLD_LD_LIB ] || export LD_LIBRARY_PATH=$OLD_LD_LIB
[ -z $OLD_LD_PRE ] || export LD_PRELOAD=$OLD_LD_PRE
}
##########################################################################################
# Magisk Mode Installation
##########################################################################################