Monday, September 24, 2012

Mount System folder of an Android device to force push APK or force remove APK

There is a way to install an apk by doing adb install <the name of your apk>. The problem is sometimes when you do this, you get permission denied or failed to install and there can be various reasons for that. If you want to manipulate the System folder yourself, we need to have root access on your Android device and then we need to mount /System.

  1. Set your phone to USB debugging and then plug USB
  2. Bring up command line in Windows
  3. Go to directory of android sdk -> platform tools (if you set your environmental variables then skip this, if you type 'adb devices' and you get an error, then you haven't)
  4. type adb shell
  5. You should see a prompt change to $
  6. Type su and hit enter. You should now see a prompt #
  7. Type mount. You should see a list of items you can mount. On that list look for and item that says '/dev/block/<something> /system ......     <something> can be anything, just find one which resembles this.
  8. Once you found it, type mount -o remount,rw /dev/block/<something> /system

Now the folder should be mounted. We can now navigate to the device to system/app. type cd system/app and now we can remove any apks and push anything we want.