[memo] 針對realme裝置透過ADB停用不需要的系統應用程式

擷取、參考:

https://forum.xda-developers.com/t/2021-10-01-remove-system-apps-on-realme-ui-2-0-using-adb.4115531/

https://gi`thub.com/termux/termux-app/issues/2015

透過ADB停用不需要的系統應用程式

內容擷取自此XDA文章,作者: prathameshsd

使用 ADB 在 Realme UI 2.0 上刪除系統應用程式
上傳於 : [2021/10/01]​
Notes:

  • 此方法不應刪除您的手機資料,但始終對手機進行完整備份以確保安全。
  • 此方法解除安裝/停用使用者 0 的應用程式。它不會從系統分割區中物理刪除應用程式。

要求:

解除安裝系統應用程式
Code:

adb shell pm uninstall -k --user 0 <package.name.of.the.app>

列出您已解除安裝的所有系統應用程式
Code:

adb shell "(pm list packages -u && pm list packages) | sort | uniq -u | cut -c 9-"

重新安裝系統應用程式
Code:

adb shell cmd package install-existing <package.name.of.the.app>

在 Linux 系統一次重新安裝所有解除安裝的系統應用程序
Code:

for i in $(adb shell "(pm list packages -u && pm list packages) | sort | uniq -u | cut -c 9-") ; do adb shell cmd package install-existing "$i" ; done

停用一個系統應用程式
Code:

adb shell pm disable-user --user 0 <package.name.of.the.app>

列出您已停用的所有系統應用程式
Code:

adb shell "pm list packages -d | cut -c 9-"

重新啟用一個系統應用程式
Code:

adb shell pm enable --user 0 <package.name.of.the.app>

在 Linux 系統重新啟用所有停用的系統應用程式
Code:

for i in $(adb shell "(pm list packages -d | sort | cut -c 9-)") ; do adb shell pm enable --user 0 "$i" ; done

Code:

# AOSP & Google Apps
adb shell pm uninstall -k --user 0 com.android.chrome
adb shell pm uninstall -k --user 0 com.android.hotwordenrollment.okgoogle
adb shell pm uninstall -k --user 0 com.android.stk
adb shell pm uninstall -k --user 0 com.google.android.apps.nbu.paisa.user
adb shell pm uninstall -k --user 0 com.google.android.feedback
adb shell pm uninstall -k --user 0 com.google.android.googlequicksearchbox
adb shell pm uninstall -k --user 0 com.google.android.youtube

# ColorOS & Oppo Apps
adb shell pm uninstall -k --user 0 com.coloros.assistantscreen
adb shell pm uninstall -k --user 0 com.coloros.backuprestore
adb shell pm uninstall -k --user 0 com.coloros.childrenspace
adb shell pm uninstall -k --user 0 com.coloros.compass2
adb shell pm uninstall -k --user 0 com.coloros.healthcheck
adb shell pm uninstall -k --user 0 com.coloros.healthservice
adb shell pm uninstall -k --user 0 com.coloros.personalassistant.overlay.common
adb shell pm uninstall -k --user 0 com.coloros.phonemanager
adb shell pm uninstall -k --user 0 com.coloros.securepay
adb shell pm uninstall -k --user 0 com.coloros.securitykeyboard
adb shell pm uninstall -k --user 0 com.coloros.video
adb shell pm uninstall -k --user 0 com.coloros.weather.service
adb shell pm uninstall -k --user 0 com.oppo.quicksearchbox
adb shell pm uninstall -k --user 0 com.oppo.music

# Facebook Apps
adb shell pm uninstall -k --user 0 com.facebook.appmanager
adb shell pm uninstall -k --user 0 com.facebook.services
adb shell pm uninstall -k --user 0 com.facebook.system

# Heytap Apps
# You can remove all if you dont use Realme/Heytap online account
adb shell pm disable-user --user 0 com.heytap.market
adb shell pm disable-user --user 0 com.heytap.themestore
adb shell pm uninstall -k --user 0 com.heytap.browser
adb shell pm uninstall -k --user 0 com.heytap.cloud
adb shell pm uninstall -k --user 0 com.heytap.habit.analysis
adb shell pm uninstall -k --user 0 com.heytap.mcs
adb shell pm uninstall -k --user 0 com.heytap.openid
adb shell pm uninstall -k --user 0 com.heytap.pictorial
adb shell pm uninstall -k --user 0 com.heytap.usercenter

# Nearme & Realme Apps
# Secure Payment Protection Feature
adb shell pm uninstall -k --user 0 com.nearme.atlas
adb shell pm uninstall -k --user 0 com.realme.securitycheck

# Red Tea Mobile Apps
# Get new SIM, recharge data plans when abroad.
adb shell pm uninstall -k --user 0 com.redteamobile.roaming
adb shell pm uninstall -k --user 0 com.redteamobile.roaming.deamon

# Tencent Apps
adb shell pm uninstall -k --user 0 com.tencent.soter.soterserver

Credits:
Doug Lynch of XDA Portal : https://www.xda-developers.com/author/doug-lynch/
Original Article : https://www.xda-developers.com/uninstall-carrier-oem-bloatware-without-root-access

實作

實作於 Realme X50 PRO (Android 11, Realme UI 2.0)

自訂的停用腳本:

實測若停用 com.coloros.weather.service 會導致系統 UI 崩潰,在此註解掉

athena 會 kill 掉 Termux 的 Process,且無 GUI 可以停用,參考 Termux 的 issues 直接 ADB 幹掉:

adb shell pm uninstall -k –user 0 com.coloros.athena

# AOSP & Google Apps
# adb shell pm uninstall -k --user 0 com.android.chrome
# adb shell pm uninstall -k --user 0 com.android.hotwordenrollment.okgoogle
# adb shell pm uninstall -k --user 0 com.android.stk
# adb shell pm uninstall -k --user 0 com.google.android.apps.nbu.paisa.user
# adb shell pm uninstall -k --user 0 com.google.android.feedback
# adb shell pm uninstall -k --user 0 com.google.android.googlequicksearchbox
adb shell pm disable-user --user 0 com.google.android.youtube

# ColorOS & Oppo Apps
adb shell pm uninstall -k --user 0 com.coloros.assistantscreen
adb shell pm uninstall -k --user 0 com.coloros.backuprestore
adb shell pm uninstall -k --user 0 com.coloros.childrenspace
adb shell pm uninstall -k --user 0 com.coloros.compass2
adb shell pm uninstall -k --user 0 com.coloros.healthcheck
adb shell pm uninstall -k --user 0 com.coloros.healthservice
adb shell pm uninstall -k --user 0 com.coloros.personalassistant.overlay.common
adb shell pm uninstall -k --user 0 com.coloros.phonemanager
adb shell pm uninstall -k --user 0 com.coloros.securepay
adb shell pm uninstall -k --user 0 com.coloros.securitykeyboard
adb shell pm uninstall -k --user 0 com.coloros.video
# adb shell pm uninstall -k --user 0 com.coloros.weather.service
adb shell pm uninstall -k --user 0 com.oppo.quicksearchbox
adb shell pm uninstall -k --user 0 com.oppo.music

# Facebook Apps
adb shell pm uninstall -k --user 0 com.facebook.appmanager
adb shell pm uninstall -k --user 0 com.facebook.services
adb shell pm uninstall -k --user 0 com.facebook.system

# Heytap Apps
# You can remove all if you dont use Realme/Heytap online account
adb shell pm disable-user --user 0 com.heytap.market
adb shell pm disable-user --user 0 com.heytap.themestore
adb shell pm uninstall -k --user 0 com.heytap.browser
adb shell pm uninstall -k --user 0 com.heytap.cloud
adb shell pm uninstall -k --user 0 com.heytap.habit.analysis
adb shell pm uninstall -k --user 0 com.heytap.mcs
adb shell pm uninstall -k --user 0 com.heytap.openid
adb shell pm uninstall -k --user 0 com.heytap.pictorial
adb shell pm uninstall -k --user 0 com.heytap.usercenter

# Nearme & Realme Apps
# Secure Payment Protection Feature
adb shell pm uninstall -k --user 0 com.nearme.atlas
adb shell pm uninstall -k --user 0 com.realme.securitycheck

# Red Tea Mobile Apps
# Get new SIM, recharge data plans when abroad.
adb shell pm uninstall -k --user 0 com.redteamobile.roaming
adb shell pm uninstall -k --user 0 com.redteamobile.roaming.deamon

# Tencent Apps
adb shell pm uninstall -k --user 0 com.tencent.soter.soterserver

# I had the same issue regarding Athena service killing some background processes. apparently it can be disabled using adb:
adb shell pm uninstall -k --user 0 com.coloros.athena
預設圖片
Huán-Hsüān Lín (WordPressLocal)
文章: 19