从shell关闭DeviceAdmin? [英] Disable DeviceAdmin from shell?

查看:312
本文介绍了从shell关闭DeviceAdmin?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图卸载从外壳的应用程序,但是这个应用程序运行作为设备管理员,从而​​壳GT;亚行卸载com.example.test 没有工作。

I'm trying to uninstall an application from shell, however this application is running as a device administrator and thus shell> adb uninstall com.example.test did not work.

如何禁用设备管理员的壳呢?

How can I disable a device admin from shell?

推荐答案

通常情况下,管理访问权限被撤销通过设备管理员屏幕,然后应用程序被卸载。在随后的例子中,我假设airdroid( com.sand.airdroid ),已经被配置为设备管理员,并进行卸载。因此,要调整这个例子中,用自己的应用程序名称替换 com.sand.airdroid 实例。

Typically, administrative access is revoked via the Device Administrators screen, then the app is uninstalled. In the subsequent examples, I'll assume airdroid (com.sand.airdroid), has been configured as a device administrator, and is to be uninstalled. So to tailor this example, replace instances of com.sand.airdroid with your own app name.

要访问的设备管理员的,导航:设置安全设备管理员。然后,取消申请为联合国设定的管理权限。

To access Device Administrators, navigate: SettingsSecurityDevice Administrators. Then, uncheck the application to un-set administrative access for.

也有可能使用shell开拓这项活动:

It's also possible to open up this activity using the shell:

adb shell am start -S "com.android.settings/.Settings\$DeviceAdminSettingsActivity"

在这样做时,该活动可以正常卸载:

Once this is done, the activity can be uninstalled normally:

adb uninstall com.sand.airdroid

的强制方法(需要root)

一个穷举法确实存在。它涉及到搜索中的/系统中的所有文件和/数据文件系统,并删除每发现一项。 免责声明:请小心使用(测试模拟器上先)

adb shell

# Switch to root
su -

# Search for all installed files using the fully-qualified app name
find /system /data -name \*com.sand.airdroid\* 

...文件(包括目录)的列表出现 - 为每个文件,因为它是由$ P $与pfixing它删除了 RM -f

rm -r /data/media/0/Android/data/com.sand.airdroid
rm -r /data/data/com.sand.airdroid
rm -r /data/app-lib/com.sand.airdroid-1
rm -r /data/app/com.sand.airdroid-1.apk
rm -r /data/dalvik-cache/data@app@com.sand.airdroid-1.apk@classes.dex

# Run the find command again to ensure nothing was missed
find /system /data -name \*com.sand.airdroid\* 

# exit root
exit
# exit Android shell
exit

要允许Android的清理其文件,重启设备。

To allow Android to clean up its files, reboot the device.

adb reboot

一旦设备重新启动,应用程序可以被卸载与卸载命令来完成清理工作。

Once the device has restarted, the application can be uninstalled with the uninstall command to finalize clean-up.

adb uninstall com.sand.airdroid

这篇关于从shell关闭DeviceAdmin?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆