Last active
December 29, 2016 01:48
-
-
Save shakalaca/bde818d1fbc4b1343d1d44d954c9ddd5 to your computer and use it in GitHub Desktop.
System app installation under systemless root
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/system/bin/sh | |
is_mounted() { | |
if [ ! -z "$2" ]; then | |
cat /proc/mounts | grep $1 | grep $2, >/dev/null | |
else | |
cat /proc/mounts | grep $1 >/dev/null | |
fi | |
return $? | |
} | |
if [ -d /system/vendor/app ]; then | |
mount -o bind /su/app /system/vendor/app | |
else | |
if ( ! is_mounted /oem ); then | |
mount -o rw,remount / | |
fi | |
if [ ! -d /oem ]; then | |
mkdir /oem | |
chmod 755 /oem | |
fi | |
if [ ! -d /oem/app ]; then | |
mkdir /oem/app | |
fi | |
chmod 755 /oem/app | |
chcon u:object_r:system_file:s0 /oem/app | |
mount -o bind /su/app /oem/app | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Put 01mount_vendor_app under /su/su.d/ | |
* chmod 755 /su/su.d/01mount_vendor_app | |
* mkdir /su/app; chmod 755 /su/app | |
* Put your apk to /su/app/<name>/<name.apk> | |
* find /su/app/<name> -type d -exec chmod 755 {} \; | |
* find /su/app/<name> -type f -exec chmod 644 {} \; | |
* Reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment