Skip to content

Instantly share code, notes, and snippets.

@Miouyouyou
Created September 20, 2017 08:33
Show Gist options
  • Save Miouyouyou/1466117e4a17aeb52359c0963b8fadf9 to your computer and use it in GitHub Desktop.
Save Miouyouyou/1466117e4a17aeb52359c0963b8fadf9 to your computer and use it in GitHub Desktop.
Install As System for Android ... Not tested since a while
APP=("$1")
adb shell su -c cp /data/app/"$APP-?.apk" /sdcard
adb shell su -c pm uninstall "$APP"
adb shell su -c mount -o remount /system
adb shell su -c cp /sdcard/$APP-?.apk /system/app
adb shell su -c cp /sdcard/$APP-?.apk /system/priv-app
adb shell su -c chown root:root /system/app/$APP-?.apk
adb shell su -c chown root:root /system/priv-app/$APP-?.apk
adb shell su -c chmod 0644 /system/app/$APP-?.apk
adb shell su -c chmod 0644 /system/priv-app/$APP-?.apk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment