adbloat
adbloat copied to clipboard
Android debloating via debugging
adbloat
Pre-Requisites for Using ADB
Setup all of the following to use ADB
Setup Computer with ADB Platform Tools
Windows Install with Chocolatey choco install adb -y
Linux Install with Terminal sudo apt install -f --assume-yes android-tools-adb android-tools-fastboot
- Open Settings, and select “About”.
- Tap on “Build number” seven times.
- Go back, and select “Developer options”.
- Scroll down, and check the “Android debugging” or “USB debugging” entry under “Debugging”.
- Plug your device into your computer.
- On the computer, open up a terminal/command prompt and type adb devices.
- A dialog should show on your device, asking you to allow usb debugging. Check “always allow”, and choose “OK”.
- Note: If you don't see this prompt on you device change the usb connection to MTP or File Transfer on the device
ADB Commands - These commands work when device is bridged into pc
adb shell - launches a shell on the device
adb shell pm list packages- list all installed packages on the deviceadb shell pm list packages -3"|cut -f 2 -d ":- lists all user installed packagesadb push <local> <remote>- pushes the file local to remoteadb pull <remote> [<local>]- pulls the file remote to local. If local isn’t specified, it will pull to the current folder.adb logcat- allows you to view the device log in real-time. You can use adb logcat -b radio to view radio logs, and adb logcat -C to view logs in colouradb install <file>- installs the given .apk file to your deviceadb uninstall com.packagename- uninstalls package from shell pm list packages- Note: if you encounter "[DELETE_FAILED_INTERNAL_ERROR]" type this to bypass:
adb shell pm uninstall --user 0 <appname>
- Note: if you encounter "[DELETE_FAILED_INTERNAL_ERROR]" type this to bypass:
adb reboot- reboots systemadb reboot bootloader- reboots to bootloaderadb reboot recovery- reboots into recovery modeadb reboot fastboot- reboots into fastboot mode
Fastboot Commands - These commands work when device is in Bootloader and Fastboot Mode
fastboot devices- shows all connected devicesfastboot reboot- reboots device - can add bootloader, recovery, and fastbootfastboot oem device-info- shows oem bootloader status (unlocked or locked)fastboot oem unlock- unlocks oem phones - note: aosp and unlocked phones don't need thisfastboot flashing unlock- unlocks system for custom rom in pixel and other phonesfastboot flashing unlock_critical- unlocks bootloader and system partitions - note: this isn't generally neededfastboot format:ext4 userdata- format userdata on device - note: this will erase your entire devicefastboot boot recovery.img- test recovery image without flashingfastboot flash recovery recovery.img- flash recovery image then runfastboot reboot recoveryto boot into it.fastboot flash boot boot.img- flash boot image - this is the kernelfastboot -w- wipes devicefastboot update </path/to/your/Rom.zip>- flashes zip to the device
Note Important
Comment packages you mightn't want them to be uninstalled...