解決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文件夾設為了環(huán)境變量,因為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 權限 文件夾:為文件夾設置權限。
可以參考下面這篇博客:http://www.dbjr.com.cn/article/183998.htm
如果顯示沒有su: not found回到文章可以開頭解決
總結
到此這篇關于解決android studio中使用monitor工具無法打開data文件夾問題的文章就介紹到這了,更多相關android studio使用monitor工具無法打開data文件夾內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
android studio實現(xiàn)簡單的計算器功能
這篇文章主要為大家詳細介紹了android studio實現(xiàn)簡單的計算器功能,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下2020-05-05sqlite查詢結果在listview中展示的實現(xiàn)
下面小編就為大家?guī)硪黄猻qlite查詢結果在listview中展示的實現(xiàn)。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-04-04Android中Activity和Fragment傳遞數(shù)據(jù)的兩種方式
本篇文章主要介紹了Android中Activity和Fragment傳遞數(shù)據(jù)的兩種方式,非常具有實用價值,需要的朋友可以參考下2017-09-09