Preparation
- Turn on USB debugging
Go to "Settings->About Phone" and click on the version number continuously until there is a prompt to enable "Developer Options"
Go to "Settings->System and Update->Developer Options", turn on USB debugging, and you can turn off "Automatic System Update" by the way
- Download the adb tool
Official address: https://developer.android.google.cn/studio/releases/platform-tools
Download the corresponding adb (android debug bridge) tool according to the PC platform
$ unzip platform-tools_r33.0.3-linux.zip
Archive: platform-tools_r33.0.3-linux.zip
inflating: platform-tools/NOTICE.txt
inflating: platform-tools/adb
inflating: platform-tools/dmtracedump
inflating: platform-tools/e2fsdroid
inflating: platform-tools/etc1tool
inflating: platform-tools/fastboot
inflating: platform-tools/hprof-conv
inflating: platform-tools/make_f2fs
inflating: platform-tools/make_f2fs_casefold
inflating: platform-tools/mke2fs
inflating: platform-tools/mke2fs.conf
inflating: platform-tools/sload_f2fs
extracting: platform-tools/source.properties
inflating: platform-tools/sqlite3
inflating: platform-tools/lib64/libc++.so
$ ls
platform-tools platform-tools_r33.0.3-linux.zip
$ cd platform-tools/
jianghuixin@Vostro-3670:~/Downloads/Tmp/platform-tools 10:11:04
$ ./adb --help
- Connect PC and mobile phone
Select the connection option for "Transfer files"
Uninstall pre-installed software
- view device
adb devices
The command is used to view the devices connected to the PC
$ ./adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
H5XVB20605005176 unauthorized
The phone will pop up "Whether to allow USB debugging", select Always allow debugging and confirm, check the device again
$ ./adb devices
List of devices attached
H5XVB20605005176 device
- View software list
adb shell pm list package -s
Get installed applications, output too much and only show partial results
$ ./adb shell pm list package -s
package:com.android.cts.priv.ctsshim
package:com.huawei.camera
package:com.huawei.camerakit.impl
package:com.huawei.synergy
package:com.huawei.android.launcher
package:com.huawei.hms.dupdateengine
package:com.android.providers.telephony
package:com.huawei.harmonyos.foundation
package:com.huawei.androidx
...
- uninstall app
adb shell pm uninstall --user 0 <应用包名称>
Uninstall the specified application
If the entered application name is wrong, it will prompt "Failure [not installed for 0]"
Uninstall Baidu input method, first go to "Settings->System and Update->Language and input method", turn off safe input
./adb shell pm uninstall --user 0 com.baidu.input_huawei
Uninstall Huawei browser, the package name is "com.huawei.browser" or "com.android.browser"
./adb shell pm uninstall --user 0 com.huawei.browser
Uninstall Huawei Music, the package name is "com.huawei.music" or "package:com.android.mediacenter"
./adb shell pm uninstall --user 0 com.huawei.music
Uninstall Huawei Video
./adb shell pm uninstall --user 0 com.huawei.himovie
uninstall other software
-
com.huawei.phoneservice: service
-
com.huawei.ohos.famanager: Service Center
-
com.huawei.bd: User Experience Program
-
com.huawei.hifolder: recommended products
-
com.huawei.skytone: Skytone
-
com.huawei.hicar: HiCar
-
com.huawei.gameassistant: game space
-
com.huawei.hwdetectrepair: smart detection
-
com.huawei.videoeditor: petal clip