这篇文章主要介绍了解决android studio中使用monitor工具无法打开data文件夹问题,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下
使用monitor工具无法打开data文件夹问题
关于/system/bin/sh: su: not found的解决办法
D:\Sdk\platform-tools>adb shell
generic_x86:/ $ su
/system/bin/sh: su: not found
原因是
Android Studio带(Google Play)的模拟器无法获得root权限安装
该换成为带(Google APIs)的模拟器即可,如下:

无法打开data文件夹的原因是权限不够,需要设置权限
可以直接root,也可以一层一层的给权限
C:\Users\123>adb root
restarting adbd as root
这里我们把sdk文件夹中的platform-tools文件夹设为了环境变量,因为adb.exe文件就在这个文件夹中。
一层一层设置权限如下:
C:\Users\123>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 权限 文件夹:为文件夹设置权限。
可以参考下面这篇博客:
如果显示没有su: not found回到文章可以开头解决
总结
到此这篇关于解决android studio中使用monitor工具无法打开data文件夹问题的文章就介绍到这了,更多相关android studio使用monitor工具无法打开data文件夹内容请搜索编程学习网以前的文章希望大家以后多多支持编程学习网!
本文标题为:解决android studio中使用monitor工具无法打开data文件夹问题
基础教程推荐
- android: targetSdkVersion升级中Only fullscreen activities can request orientation问题的解决方法 2022-11-05
- 详解ios11中estimatedRowHeight属性 2023-04-24
- 如何在iOS中高效的加载图片详解 2023-07-02
- Android自定义View实现地铁显示牌效果 2023-01-01
- iOS如何去掉导航栏(UINavigationBar)下方的横线 2023-03-07
- Android自定义View验证码输入框 2023-02-04
- iOS输入框的字数统计/最大长度限制详解 2023-06-03
- Android socket如何实现文件列表动态访问 2023-04-05
- Android Kotlin使用SQLite案例详解 2023-04-16
- Android Studio实现下拉列表效果 2023-05-23
