Skip to content

Instantly share code, notes, and snippets.

@ph00lt0
Created March 22, 2022 14:10
Show Gist options
  • Save ph00lt0/cfa7b5def7111137ebc195807a6eb50e to your computer and use it in GitHub Desktop.
Save ph00lt0/cfa7b5def7111137ebc195807a6eb50e to your computer and use it in GitHub Desktop.
Debloat or uninstall Android system apps

Debloat or uninstall Android system apps

1. Enable android USB debugging

  • Enable developer settings
  • Enable USB DEBUGGING
  • Install ADB options on your computer

2. Connect device

  • Connect the device to computer
  • Open the terminal
  • Test connection with adb devices
  • Allow access on phone's screen

3. Search for the app

adb shell pm list packages | grep 'app-name'

Can't find the app name?

  • search for the app at apkmirror.com
  • use app list name to see the apk name

4. Uninstall the app

  • adb shell pm uninstall com.company.app_name
  • adb shell pm uninstall -k com.company.app_name
  • adb shell com.company.app_name Uninstall apps for every user by chaging user variable to 0, 10, 12, 999

To see all users:

  • adb shell pm list users

5. Remove soter (Chinese GMS)

adb shell pm uninstall -k --user 0 com.tencent.soter.soterserver
adb shell pm uninstall -k --user 10 com.tencent.soter.soterserver
adb shell pm uninstall -k --user 12 com.tencent.soter.soterserver
adb shell pm uninstall -k --user 999 com.tencent.soter.soterserver

6. Remove ANT HAL service

adb shell pm uninstall -k --user 0 com.dsi.ant.server
adb shell pm uninstall -k --user 10 com.dsi.ant.server
adb shell pm uninstall -k --user 12 com.dsi.ant.server
adb shell pm uninstall -k --user 999 com.dsi.ant.server

7. Reinstall removed apps

adb shell cmd package install-existing com.company.app_name

8. Disable GMS

adb shell pm disable-user --user 0 com.google.android.gms
adb shell pm disable-user --user 10 com.google.android.gms
adb shell pm disable-user --user 12 com.google.android.gms
adb shell pm disable-user --user 999 com.google.android.gms

9.1 Disable OnePlus Analytics

adb shell pm disable-user --user 0 net.oneplus.odm
adb shell pm disable-user --user 10 net.oneplus.odm
adb shell pm disable-user --user 12 net.oneplus.odm
adb shell pm disable-user --user 999 net.oneplus.odm

adb shell pm disable-user --user 0 com.oem.oemlogkit
adb shell pm disable-user --user 10 com.oem.oemlogkit
adb shell pm disable-user --user 12 com.oem.oemlogkit
adb shell pm disable-user --user 999 com.oem.oemlogkit

adb shell pm disable-user --user 0 com.oem.logkitsdservice
adb shell pm disable-user --user 10 com.oem.logkitsdservice
adb shell pm disable-user --user 12 com.oem.logkitsdservice
adb shell pm disable-user --user 999 com.oem.logkitsdservice

adb shell pm disable-user --user 0 com.oneplus.factorymod
adb shell pm disable-user --user 10 com.oneplus.factorymod
adb shell pm disable-user --user 12 com.oneplus.factorymod
adb shell pm disable-user --user 999 com.oneplus.factorymod

9.2 Remove OnePlus Analytics

adb shell pm uninstall -k --user 0 net.oneplus.odm
adb shell pm uninstall -k --user 10 net.oneplus.odm
adb shell pm uninstall -k --user 12 net.oneplus.odm
adb shell pm uninstall -k --user 999 net.oneplus.odm

adb shell pm uninstall -k --user 0 com.oem.oemlogkit
adb shell pm uninstall -k --user 10 com.oem.oemlogkit
adb shell pm uninstall -k --user 12 com.oem.oemlogkit
adb shell pm uninstall -k --user 999 com.oem.oemlogkit

adb shell pm uninstall -k --user 0 com.oem.logkitsdservice
adb shell pm uninstall -k --user 10 com.oem.logkitsdservice
adb shell pm uninstall -k --user 12 com.oem.logkitsdservice
adb shell pm uninstall -k --user 999 com.oem.logkitsdservice

adb shell pm uninstall -k --user 0 com.oneplus.factorymod
adb shell pm uninstall -k --user 10 com.oneplus.factorymod
adb shell pm uninstall -k --user 12 com.oneplus.factorymod
adb shell pm uninstall -k --user 999 com.oneplus.factorymod

10. Disable OnePlus test apps

adb shell pm disable-user --user 0 com.oneplus.bttestmode
adb shell pm disable-user --user 0 com.oneplus.factorymode.specialtest
adb shell pm disable-user --user 0 com.oneplus.opbugreportlite
adb shell pm disable-user --user 0 com.oneplus.ses
adb shell pm disable-user --user 0 com.fingerprints.fingerprintsensortest 
adb shell pm disable-user --user 0 com.example.wifirftest

adb shell pm disable-user --user 999 com.oneplus.bttestmode
adb shell pm disable-user --user 999 com.oneplus.factorymode.specialtest
adb shell pm disable-user --user 999 com.oneplus.opbugreportlite
adb shell pm disable-user --user 999 com.oneplus.ses
adb shell pm disable-user --user 999 com.fingerprints.fingerprintsensortest 
adb shell pm disable-user --user 999 com.example.wifirftest

adb shell pm disable-user --user 10 com.oneplus.bttestmode
adb shell pm disable-user --user 10 com.oneplus.factorymode.specialtest
adb shell pm disable-user --user 10 com.oneplus.opbugreportlite
adb shell pm disable-user --user 10 com.oneplus.ses
adb shell pm disable-user --user 10 com.fingerprints.fingerprintsensortest 
adb shell pm disable-user --user 10 com.example.wifirftest

adb shell pm disable-user --user 12 com.oneplus.bttestmode
adb shell pm disable-user --user 12 com.oneplus.factorymode.specialtest
adb shell pm disable-user --user 12 com.oneplus.opbugreportlite
adb shell pm disable-user --user 12 com.oneplus.ses
adb shell pm disable-user --user 12 com.fingerprints.fingerprintsensortest 
adb shell pm disable-user --user 12 com.example.wifirftest

11. Disable soter (Chinese GMS)

adb shell pm disable-user --user 0 com.tencent.soter.soterserver
adb shell pm disable-user --user 10 com.tencent.soter.soterserver
adb shell pm disable-user --user 12 com.tencent.soter.soterserver
adb shell pm disable-user --user 999 com.tencent.soter.soterserver

12. Disable OnePlus apps

adb shell pm disable-user --user 0 cn.oneplus.photos
adb shell pm disable-user --user 10 cn.oneplus.photos
adb shell pm disable-user --user 12 cn.oneplus.photos
adb shell pm disable-user --user 999 cn.oneplus.photos

adb shell pm disable-user --user 0 com.oneplus.account
adb shell pm disable-user --user 10 com.oneplus.account
adb shell pm disable-user --user 12 com.oneplus.account
adb shell pm disable-user --user 999 com.oneplus.account

adb shell pm disable-user --user 0 com.oneplus.twspods
adb shell pm disable-user --user 10 com.oneplus.twspods
adb shell pm disable-user --user 12 com.oneplus.twspods
adb shell pm disable-user --user 999 com.oneplus.twspods

adb shell pm disable-user --user 0 cn.oneplus.oem_tcma
adb shell pm disable-user --user 10 cn.oneplus.oem_tcma
adb shell pm disable-user --user 12 cn.oneplus.oem_tcma
adb shell pm disable-user --user 999 cn.oneplus.oem_tcma

adb shell pm disable-user --user 0 com.oneplus.diagnoseManager
adb shell pm disable-user --user 10 com.oneplus.diagnoseManager
adb shell pm disable-user --user 12 com.oneplus.diagnoseManager
adb shell pm disable-user --user 999 com.oneplus.diagnoseManager

13.1 Remove Qualcomm apps

adb shell pm uninstall -k --user 0 com.qualcomm.qti.remoteSimlockAuth
adb shell pm uninstall -k --user 10 com.qualcomm.qti.remoteSimlockAuth
adb shell pm uninstall -k --user 12 com.qualcomm.qti.remoteSimlockAuth
adb shell pm uninstall -k --user 999 com.qualcomm.qti.remoteSimlockAuth

adb shell pm uninstall -k --user 0 com.qualcomm.qti.seccamservice
adb shell pm uninstall -k --user 10 com.qualcomm.qti.seccamservice
adb shell pm uninstall -k --user 12 com.qualcomm.qti.seccamservice
adb shell pm uninstall -k --user 999 com.qualcomm.qti.seccamservice

adb shell pm uninstall -k --user 0 com.qti.confuridialer
adb shell pm uninstall -k --user 10 com.qti.confuridialer
adb shell pm uninstall -k --user 12 com.qti.confuridialer
adb shell pm uninstall -k --user 999 com.qti.confuridialer

adb shell pm uninstall -k --user 0 com.qualcomm.qti.optinoverlay
adb shell pm uninstall -k --user 10 com.qualcomm.qti.optinoverlay
adb shell pm uninstall -k --user 12 com.qualcomm.qti.optinoverlay
adb shell pm uninstall -k --user 999 com.qualcomm.qti.optinoverlay

adb shell pm uninstall -k --user 0 com.qualcomm.qti.dynamicddsservice
adb shell pm uninstall -k --user 10 com.qualcomm.qti.dynamicddsservice
adb shell pm uninstall -k --user 12 com.qualcomm.qti.dynamicddsservice
adb shell pm uninstall -k --user 999 com.qualcomm.qti.dynamicddsservice

adb shell pm uninstall -k --user 0 com.qualcomm.qti.uimGbaApp
adb shell pm uninstall -k --user 10 com.qualcomm.qti.uimGbaApp
adb shell pm uninstall -k --user 12 com.qualcomm.qti.uimGbaApp
adb shell pm uninstall -k --user 999 com.qualcomm.qti.uimGbaApp

adb shell pm uninstall -k --user 0 com.qti.diagservices
adb shell pm uninstall -k --user 10 com.qti.diagservices
adb shell pm uninstall -k --user 12 com.qti.diagservices
adb shell pm uninstall -k --user 999 com.qti.diagservices

adb shell pm uninstall -k --user 0 com.qti.qualcomm.datastatusnotification
adb shell pm uninstall -k --user 10 com.qti.qualcomm.datastatusnotification
adb shell pm uninstall -k --user 12 com.qti.qualcomm.datastatusnotification
adb shell pm uninstall -k --user 999 com.qti.qualcomm.datastatusnotification

adb shell pm uninstall -k --user 0 com.qualcomm.wfd.service
adb shell pm uninstall -k --user 10 com.qualcomm.wfd.service
adb shell pm uninstall -k --user 12 com.qualcomm.wfd.service
adb shell pm uninstall -k --user 999 com.qualcomm.wfd.service

adb shell pm uninstall -k --user 0 com.qualcomm.uimremoteclient
adb shell pm uninstall -k --user 10 com.qualcomm.uimremoteclient
adb shell pm uninstall -k --user 12 com.qualcomm.uimremoteclient
adb shell pm uninstall -k --user 999 com.qualcomm.uimremoteclient

adb shell pm uninstall -k --user 0 com.qualcomm.uimremoteserver
adb shell pm uninstall -k --user 10 com.qualcomm.uimremoteserver
adb shell pm uninstall -k --user 12 com.qualcomm.uimremoteserver
adb shell pm uninstall -k --user 999 com.qualcomm.uimremoteserver

adb shell pm uninstall -k --user 0 com.qualcomm.atfwd
adb shell pm uninstall -k --user 10 com.qualcomm.atfwd
adb shell pm uninstall -k --user 12 com.qualcomm.atfwd
adb shell pm uninstall -k --user 999 com.qualcomm.atfwd

13. Re-enable app

adb shell pm enable COM.PACKAGE.NAME

14. Remove work account options (might now be your choice)

adb shell pm disable-user --user 0 com.android.managedprovisioning

15. Disable Capative Portal

adb shell settings put global captive_portal_detection_enabled 0
adb shell settings put global captive_portal_mode 0

You may change the capative server instead:

adb shell settings put global captive_portal_http_url  http://captiveportal.kuketz.de
adb shell settings put global captive_portal_https_url  https://captiveportal.kuketz.de
adb shell settings put global captive_portal_fallback_url http://captiveportal.kuketz.de
adb shell settings put global captive_portal_other_fallback_urls http://captiveportal.kuketz.de

Other options are: http://204.ecloud.global and http://elementary.io/generate_204

16. Remove backup service

adb shell pm uninstall -k --user 0 com.android.sharedstoragebackup
adb shell pm uninstall -k --user 10 com.android.sharedstoragebackup
adb shell pm uninstall -k --user 12 com.android.sharedstoragebackup
adb shell pm uninstall -k --user 999 com.android.sharedstoragebackup

17. Remove other oneplus apps

adb shell pm uninstall -k --user 0 com.oneplus.sdcardservice       
adb shell pm uninstall -k --user 10 com.oneplus.sdcardservice      
adb shell pm uninstall -k --user 12 com.oneplus.sdcardservice       
adb shell pm uninstall -k --user 999 com.oneplus.sdcardservice

https://github.com/ripdajacker/android-debloatjs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment