Disable unwanted apps on your Android phone in 30 secs using
.batfile executing ADB commands.
-
Enable USB debugging in phone settings:
- Launch the Settings application on your phone.
- Tap the About Phone option generally near the bottom of the list (this is hidden behind the “System” option in Google’s latest Android Oreo version).
- Then tap the Build Number option 7 times to enable Developer Mode. You will see a toast message when it is done.
- Now go back to the main Settings screen and you should see a new Developer Options menu you can access.
- Go in there and enable the USB Debugging mode option.
-
Download ADB for Windows.
-
Download your phone drivers if not automatically installed.
-
Connect phone to computer via USB.
-
Grant access on your phone when prompted.
- Go to ADB location from
cmd:cd C:\[path]\ADB Tools - Run:
adb shell pm list packages > dump-packages_all.txt - In search.py change what are you looking for, eg Bixby or Samsung, so it looks like this:
reg = re.compile(r'bixby') - Run the script.
- Copy over the packages' names from search-output.txt to disable.bat replacing
package:in every line withadb shell pm disable-userso the file looks like this:cd C:\...\ADB Tools adb shell pm disable-user com.samsung.android.bixby.es.globalaction adb shell pm disable-user ... ... pause - Profit. Packages disabled!
Actual adb commands so you can check installed apps and disable them (including those "unremovable" built-in ones):
- To show all packages:
adb shell pm list packages - To show all disabled packages:
adb shell pm list packages -d - To show all enabled packages:
adb shell pm list packages -e - To disable a package:
adb shell pm disable-user <PACKAGE_NAME> - To enable disabled package:
adb shell pm enable <PACKAGE_NAME> - To dump all packages' names to a file:
adb shell pm list packages > "c:\users\USER\dump-packages_all.txt"
App showing installed packages' names might be useful, eg Package List.
Using SemVer.
MIT License, see LICENSE.md.