adb查看数据库
来源:互联网 发布:cntv中国网络电视 编辑:程序博客网 时间:2024/05/27 06:54
原文
before we start, do you have a rooted phone? if not, I strongly suggest that it’s time you make the jump. 99% of the tutorials that help you to do this require that you have a rooted phone (I know b/c I spent about an hour searching for a way to do it without having a rooted phone.. couldn’t find any..) also if you think about it, your iPhone also has to be rooted to do this same task. So it’s totally reasonable. More about rooting at end of answer.
from your command line type:
adb shell
this takes you to your android shell comand line (you should see something like this: shell@android:/ $ now type:
shell@android:/ $
run-as com.domain.yourapp
this should take you directly to the data directory of com.domain.yourapp:
shell@android:/data/data/com.domain.yourapp $
if it doesn’t (ie if you get an error) then you probably don’t have a rooted phone, or you haven’t used your root user privileges. To use your root user privileges, type su on the adb command line and see what happens, if you get an error, then you’re phone is not rooted. If it’s not, root it first then continue these instructions.
from there you can type ls and you’ll see all the directories including the dbs:
shell@android:/data/data/com.domain.yourapp $ ls
cache
databases
lib
shared_prefs
after that you can use sqlite3 to browse the dbase.. if you don’t have it installed (you can find it out by typing sqlite3, if you get command not found then you’ll have to install it. To install sqlite, follow instructions here.
about rooting: if you’ve never rooted your phone before, and you’re worried about it screwing your phone, I can tell you with full confidence that there is nothing to worry about. there are tonnes of quick and easy phone rooting tutorials for pretty much all the new and old models out there, and you can root your phone even if you have a mac (I rooted my s3 with my mac).
另一篇不错的文章
在不root手机的情况下读取Data目录下的文件
使用adb命令时的错误
如果直接使用adb命令会产生以下错误:
shell@android:/ $ cd /data cd /data shell@android:/data $ ls ls opendir failed, Permission denied
你是没有权限的。
正确使用adb读取data目录下的文件方式
shell@android:/data $ run-as com.your.package run-as com.your.package shell@android:/data/data/com.your.package $ cd /data/data/com.your.package cd /data/data/com.your.package shell@android:/data/data/com.your.package $ ls ls cache databases lib shared_prefs shell@android:/data/data/com.your.package $ cd databases cd databases shell@android:/data/data/com.your.package/databases $ ls yourpackagename.db $ cat preferences.db > /mnt/sdcard/yourpackagename.db
- android adb 查看数据库
- adb 查看数据库
- adb 查看数据库
- adb shell 查看数据库
- adb 查看数据库
- adb查看数据库
- 用adb查看sqlite数据库
- adb shell查看sqlite数据库
- android创建数据库及adb查看数据库
- adb shell 查看你的数据库情况
- android中使用adb查看sqlite数据库
- 利用adb查看模拟器中的数据库
- adb shell 命令查看数据库中的表
- adb shell下查看sqlite数据库
- adb shell下查看sqlite数据库
- Android 通过adb工具查看sqlite3数据库
- adb shell 查看你的数据库情况
- adb shell下查看sqlite数据库
- OsWorkFlow工作流简介
- 1045. Favorite Color Stripe (30)
- 一个程序员的时间管理
- 用@property声明的成员属性_xx在重写了get方法以后,再重写set方法,get会报错,提示_xx不存在。困扰已久,望解答
- iPhone 6和iPhone 6 plus的AV Foundation框架特性
- adb查看数据库
- easyui datagrid添加行时让高度自适应
- hdu2859 矩阵dp
- Dreamweaver 高亮显示 ftl
- 機器學習基石(Machine Learning Foundations) 机器学习基石 作业三 Q18-20 C++实现
- Too many alarms (500) registered
- Avoiding races with Unix signals and select()
- 6.2 相关数据结构及其创建
- 会话的概念 cookie