android 移除设备管理员,android – 从shell禁用DeviceAdmin?

通常,通过“设备管理员”屏幕撤消管理访问权限,然后卸载应用程序.在随后的示例中,我将假设airdroid(com.sand.airdroid)已配置为设备管理员,并将被卸载.因此,要定制此示例,请使用您自己的应用程序名称替换com.sand.airdroid的实例.

干净的方法

要访问设备管理员,请导航:设置→安全性→设备管理员.然后,取消选中要取消设置管理访问权限的应用程序.

也可以使用shell打开这个活动:

adb shell am start -S “com.android.settings/.Settings$DeviceAdminSettingsActivity”

完成此操作后,可以正常卸载活动:

adb uninstall com.sand.airdroid

蛮力方法(需要root)

确实存在蛮力方法.它涉及搜索/ system和/ data文件系统中的所有文件,并删除每个找到的项目.免责声明:谨慎使用(首先在模拟器上测试).

adb shell

# Switch to root

su –

# Search for all installed files using the fully-qualified app name

find /system /data -name *com.sand.airdroid*

…出现一个文件列表(包括目录) – 对于每个文件,通过在其前面添加一个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清理其文件,请重新启动设备.

adb reboot

设备重新启动后,可以使用uninstall命令卸载应用程序以完成清理.

adb uninstall com.sand.airdroid

相关资源:MinionProfitsTracker:随着市场价格波动,轻松识别最赚钱的奴才[在…

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2021年4月20日
下一篇 2021年4月20日

相关推荐