Last Updated on Dec 26, 2022
Useful Shell Commands
Disclaimer: I am not responsible for you doing things wrong and breaking your phone or losing your data.
- Get Your MSL: (if this doesn’t work, you may need a different toolbox binary)
getprop ril.MSL
- Execute a command or file as root even if you’re not using the root shell: (handy over ADB with a secure kernel)
su -c COMMAND|FILENAME
- Reliable screenshot: (even works on 4.2.2; however, if you’re saving the screenshot to the internal SD card with emulated storage, you must use its real path which is “/data/media/0” – works best with ADB, Tasker, or something automated so you don’t just screenshot the shell emulator)
screencap FILENAME adb shell su -c screencap /data/media/0/test.png adb shell su -c screencap /storage/extSdCard/test.png
- Clear cache:
rm /data/dalvik-cache/* rm -r /cache/*
- Delete all app data:
rm -r /data/data/*