update mount-code for Uninstaller, too

merge-requests/23/head
Christopher Roy Bratusek 6 years ago
parent 3653128f1f
commit ede2a6eb30

@ -17,7 +17,7 @@
* more information below
* by default install Déjà Vu and Mozilla nlp Backends
* improve GApps uninstallation routine
* CommonInstaller, CommonPatcher
* CommonInstaller, CommonPatcher, Uninstaller
* improved A/B device support code taken from Magisk 16.6
### Updates

@ -30,26 +30,7 @@ DejaVuNlpBackend
IchnaeaNlpBackend
MozillaNlpBackend
NominatimGeocoderBackend
NominatimNlpBackend
com.mgoogle.android.gms
com.google.android.gms
com.google.android.feedback
com.google.android.gsf.login
com.google.android.gsf
com.android.vending
org.microg.gms.droidguard
org.schabi.newpipe
com.google.android.youtube
com.qualcomm.location
com.amap.android.location
com.baidu.location
com.google.android.location
org.microg.nlp
org.microg.unifiednlp
com.google.android.maps
org.fitchfamily.android.dejavu
org.microg.nlp.backend.ichnaea
org.microg.nlp.backend.nominatim"
NominatimNlpBackend"
ui_print() {
echo -n -e "ui_print $1\n" >> /proc/self/fd/$OUTFD
@ -130,11 +111,17 @@ mount_image() {
fi
}
grep_cmdline() {
local REGEX="s/^${1}=//p"
sed -E 's/ +/\n/g' /proc/cmdline | \
sed -n "${REGEX}" 2>/dev/null
}
# taken from Magisk, with minor modifications for NanoDroid
mount_partitions () {
SLOT=$(getprop ro.boot.slot_suffix)
SLOT=$(grep_cmdline androidboot.slot_suffix)
if [ -z ${SLOT} ]; then
SLOT=$(getprop ro.boot.slot)
SLOT=$(grep_cmdline androidboot.slot)
[ "${SLOT}" = "_" ] && SLOT=
fi
@ -142,20 +129,20 @@ mount_partitions () {
${BOOTMODE} || mount -o bind /dev/urandom /dev/random
[ ! -f /system/build.prop ] && mount -o ro /system 2>/dev/null
[ ! -f /system/build.prop ] && mount -o rw /system 2>/dev/null
if [ ! -f /system/build.prop ]; then
SYSTEMBLOCK=$(find /dev/block -iname system${SLOT} | head -n 1)
mount -t ext4 -o ro $SYSTEMBLOCK /system
mount -t ext4 -o rw $SYSTEMBLOCK /system
fi
if [ -f /system/init.rc ]; then
[ ! -f /system/build.prop ] && error "failed to mount /system (unsupported A/B device?)"
if [ -f /system/init ]; then
mkdir /system_root 2>/dev/null
mount --move /system /system_root
mount -o bind /system_root/system /system
fi
[ ! -f /system/build.prop ] && error "failed to mount /system"
}
# check for configuration files

Loading…
Cancel
Save