Uninstalling pre-installed apps

(safest method)

Now that we have temporary root tools we can uninstall pre-installed apps without loosing OTA-updates.

All the apps are installed on the /data partition, even the pre-installed (the app-copies on /system are only the "installation-media").

So the simpliest way to get rid of unwanted apps is:

1. Get a temporary root access. Remember, the following commands are written if you use Telnetd app (like in the previous video), but you can get root in a easier way using Wallace and ADBRoot. Using them you don't need to write "busybox" or "busybox telnet localhost" and just write "exit" one time:

2. Get the webapps.json file from the /data partition:

adb shell
busybox telnet localhost
cp /data/local/webapps/webapps.json /sdcard/
exit
exit
adb pull /sdcard/webapps.json

3. Open webapps.json with a text-editor

which preserve the line-endings (on Windows you can use Notepad++).

For every app you might want to uninstall, change the field/line "removable": false, to "removable": true,

4. Push the webapps.json on "/data/local/tmp"

  • To have a modded copy of webapps.json on device's temp-folder.

adb push webapps.json /data/local/tmp

  • To replace the 'real' file webapps.json:
adb shell
busybox telnet localhost
cd /data/local/webapps
cp webapps.json webapps.json_bak
rm webapps.json && cp /data/local/tmp/webapps.json . && chmod 600 webapps.json && chown root:root webapps.json

5. Now check permissions

ls -la webapps.json

should respond with something like this

-rw------- root     root        57563 2019-03-23 15:58 webapps.json

Date and time may differ, but the "-rw------- root root" part needs to be exact!

6. If all is correct and without errors:

adb reboot

After the reboot the apps are still there, but the "options" menu of the app-drawer now allows you to uninstall them in a clean way like any other app!

Because we didn't modified the system-partion:

  • ota-updates are not prevented;
  • pre-installed apps will re-install on factory-reset.

But until factory-reset the apps are gone and the space on /data is freed.


(source by Speeduploop)