使用monitor工具无法打开data文件夹问题

关于/system/bin/sh: su: not found的解决办法

D:Sdkplatform-tools>adb shell
generic_x86:/ $ su
/system/bin/sh: su: not found

原因是

Android Studio带(Google Play)的模拟器无法获得root权限安装
该换成为带(Google APIs)的模拟器即可,如下:

无法打开data文件夹的原因是权限不够,需要设置权限
可以直接root,也可以一层一层的给权限

C:Users123>adb root
restarting adbd as root

这里我们把sdk文件夹中的platform-tools文件夹设为了环境变量,因为adb.exe文件就在这个文件夹中。
一层一层设置权限如下:

C:Users123>adb shell
generic_x86_64:/ $ su
generic_x86_64:/ # chmod 777 /data
generic_x86_64:/ #
generic_x86_64:/ # exit
generic_x86_64:/ $ su
generic_x86_64:/ # chmod 777 /data/data
generic_x86_64:/ # exit
generic_x86_64:/ $ exit

命令解析

adb shell :打开 adb shell 程序。
su :获取 root 权限。
chmod 权限 文件夹:为文件夹设置权限。
可以参考下面这篇博客:https://www.uoften.com/article/183998.htm
如果显示没有su: not found回到文章可以开头解决

总结

到此这篇关于解决android studio中使用monitor工具无法打开data文件夹问题的文章就介绍到这了,更多相关android studio使用monitor工具无法打开data文件夹内容请搜索悠悠之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持悠悠之家!

点赞(57)

评论列表共有 0 条评论

立即
投稿
返回
顶部