Skip to content

Commit

Permalink
add commands to disable or enable apps
Browse files Browse the repository at this point in the history
ref #114
  • Loading branch information
mzlogin committed Apr 7, 2024
1 parent 81cceb1 commit 736b081
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
39 changes: 39 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ Other languages: [:cn: Chinese](./README.md)
* [Application package name contains a string](#application-package-name-contains-a-string)
* [Install APK](#install-apk)
* [Uninstalling](#uninstalling)
* [Disable or enable apps](#disable-or-enable-apps)
* [Disable apps](#disable-apps)
* [Enable apps](#enable-apps)
* [Clear app cache data](#clear-app-cache-data)
* [View Reception Activity](#view-reception-activity)
* [View Running Services](#view-running-services)
Expand Down Expand Up @@ -657,6 +660,42 @@ adb uninstall com.qihoo360.mobilesafe
Uninstall represents 360 mobile guards.
### Disable or enable apps
List all apps enabled:
```sh
adb shell pm list packages -e
```
#### Disable apps
command:
```sh
adb shell pm disable-user <packagename>
```
Command Example:
```sh
adb shell pm disable-user com.qihoo360.mobilesafe
```
#### Enable apps
command:
```sh
adb shell pm enable <packagename>
```
Command Example:
```sh
adb shell pm enable com.qihoo360.mobilesafe
```
### Clear app cache data
command:
Expand Down
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ Other languages: [:gb: English](./README.en.md)
* [包名包含某字符串的应用](#包名包含某字符串的应用)
* [安装 APK](#安装-apk)
* [卸载应用](#卸载应用)
* [停用/启用应用](#停用启用应用)
* [停用应用](#停用应用)
* [启用应用](#启用应用)
* [清除应用数据与缓存](#清除应用数据与缓存)
* [查看前台 Activity](#查看前台-activity)
* [查看正在运行的 Services](#查看正在运行的-services)
Expand Down Expand Up @@ -684,6 +687,42 @@ adb uninstall com.qihoo360.mobilesafe

表示卸载 360 手机卫士。

### 停用/启用应用

查看启用的应用列表:

```sh
adb shell pm list packages -e
```

#### 停用应用

命令:

```sh
adb shell pm disable-user <packagename>
```

命令示例:

```sh
adb shell pm disable-user com.qihoo360.mobilesafe
```

#### 启用应用

命令:

```sh
adb shell pm enable <packagename>
```

命令示例:

```sh
adb shell pm enable com.qihoo360.mobilesafe
```

### 清除应用数据与缓存

命令:
Expand Down

0 comments on commit 736b081

Please sign in to comment.