如何在Android手机上进行开发时访问数据库? [英] How to access the database when developing on Android phone?

查看:142
本文介绍了如何在Android手机上进行开发时访问数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在访问数据库,而我开发手机上的麻烦。每当我执行

I am having trouble accessing the database while I am developing on the phone. Whenever I execute

CD /data/data/com.mycompck/databases

然后运行 LS 我得到:执行opendir失败,权限被拒绝

或者当我键入 sqlite3的我得到:sqlite3的:权限被拒绝

Or whenever I type in sqlite3 I get: "sqlite3: permission denied"

我是什么做错了吗?

是否有一些应用程序,可以帮助我获得的内容解析器值和/或SQLite数据库一个​​人的看法?

Are there some applications that can help me getting a human view of content resolvers values and/or SQLite databases?

推荐答案

要回答你的问题的第一部分,看看<一href="http://stackoverflow.com/questions/1043322/why-do-i-get-access-denied-to-data-folder-when-using-adb/1043722#1043722">this回答。基本上,你的手机需要有root访问权限,而你需要(使用亚行根)运行ADB根模式。

To answer the first part of your question, check out this answer. Basically, your phone needs to have root access, and you need to run adb in root mode (using "adb root").

至于第二部分,我使用 SQLite数据库的浏览器查看我的SQLite DBS(尽管这只有当该数据库是我的电脑上,不知道任何设备上的浏览器)。我不知道有什么办法让内容解析器的人来看。

As for the second part, I use SQLite Database Browser to view my SQLite dbs (though that's only when the db is on my computer; don't know of any on-device browsers). I don't know of any way to get a human view of content resolvers.

这篇关于如何在Android手机上进行开发时访问数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆