Sunday, September 29, 2024

Remove Android Apps with ADB

Many pre-installed Android apps can not be easily removed within the phone app store. With a PC you can remove unwanted apps.

On phone, enable developer mode. Open the Settings app on phone and scroll down to About Phone, Software Info. Tap on the Build Number seven times to enable Developer Options.
On phone in Settings app, enable USB Debugging.


 

 

 

 

 

 

 

 

 

 

 

Plug the phone into PC with USB cable.

On MS Windows, download Google's adb tools from https://dl.google.com/android/repository/platform-tools-latest-windows.zip

Unzip the file.

Open MS Windows PowerShell.

In the PowerShell window, cd into the downloaded directories. 

In the PowerShell window, run: ./adb devices

The phone device is listed with status "unauthorized". Phone can not yet be accessed from PC.



 

 

 

 

 

 

 

On the phone there should be a prompt to allow connection to PC. Press Allow.


 



 

 

 

 

 

 

 

 

In the PowerShell window, again run: ./adb devices




 



After running the next command to enter the shell, the remainder of commands in this example will be run within the shell. In the PowerShell window, run: ./adb shell

    pm list packages


 




 

 

 

 

You may want to copy the list of packages to a text editor for review. 

Let's remove the weather apps.
    pm list packages | grep weather
acexlm:/ $ pm list packages | grep weather
package:com.lge.sizechangable.weather.platform
package:com.lge.sizechangable.weather.theme.optimus
package:com.lge.sizechangable.weather


 



 

 
Uninstall each entry:
    pm uninstall -k --user 0 com.lge.sizechangable.weather.platform
    pm uninstall -k --user 0 com.lge.sizechangable.weather.theme.optimus
    pm uninstall -k --user 0 com.lge.sizechangable.weather


 

 



 

On the phone please refresh the list of apps. Notice the weather apps are listed as "Not installed".


 

Remove a few other apps. Notice the shell command "pm list packages" is used with flag "-f" instead of a pipe to "grep".


The older Google Duo app is "tachyon":
acexlm:/ $ pm list packages -f tachyon
package:/product/app/Duo/Duo.apk=com.google.android.apps.tachyon
acexlm:/ $ pm uninstall -k --user 0 com.google.android.apps.tachyon
Success


 


 

 


Remove Google Pay:
acexlm:/ $ pm list packages -f wallet
package:/system/app/GooglePay/GooglePay.apk=com.google.android.apps.walletnfcrel
acexlm:/ $ pm uninstall -k --user 0 com.google.android.apps.walletnfcrel
Success


 


 

 

 

Restart the phone and check for functionality.