美文网首页
Android Studio中使用adb shell查看Shar

Android Studio中使用adb shell查看Shar

作者: 农田蚂蚁 | 来源:发表于2019-07-10 17:12 被阅读0次
1、在 Android Studio 最下面的 Terminal 中,输入:
adb shell
run-as com.example.android //com.example.android:对应项目包名   
2、可以使用ls命令查看当前目录下的所有文件,然后找到 shared_prefs,cd进入该目录:
cd shared_prefs
3、再ls查看 shared_prefs 目录中所有的文件,并用cat查看具体的 SharedPreferences 文件内容
cat 包名__preferences.xml  //默认的文件名为这个
1.png
2.png

相关文章

网友评论

      本文标题:Android Studio中使用adb shell查看Shar

      本文链接:https://www.haomeiwen.com/subject/raahkctx.html