Android在手机上浏览SQLite数据库
如何浏览在 Android myTouch 手机上的应用程序中创建的 SQLite 数据库?
当我通过 adb shell 登录时,sqlite3 给我拒绝权限。是否有另一种方法可以检查我的数据库和表是否确实正在创建,以及是否正在插入行?
我无法使用模拟器,因为它不能很好地播放视频等,这是我的应用程序的主要功能,所以我只能在手机上进行测试。
How can I browse the SQLite database that I am creating in my app on my Android myTouch phone?
When I log in through adb shell, sqlite3 gives me a permission denied. Is there another way to check if my database and tables are actually being created, and if rows are being inserted?
I am not able to use the emulator, since it doesn't play videos etc. very well that is the main feature of my app, so I can only test on phone.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
整个数据库是一个文件,因此通过 Eclipse 中的 DDMS 视图或通过命令行,您可以从手机中提取该文件。例如,您可以使用 SQLite 数据库浏览器 查看内容。
The entire database is a single file, so via the DDMS view in Eclipse or via the command line you can pull that file from the phone. You can then use SQLite DataBase Browser to view the contents, for example.
使用此库,您可以直接从应用程序浏览 SQLite 数据库
https://github.com/sanathp/DatabaseManager_For_Android
它是一个单一的java活动文件,只需添加java文件在您的源文件夹中,您可以查看应用程序数据库中的表,更新、删除、向表中插入行。应用程序中的所有内容。
开发完成后,从 src 文件夹中删除 java 文件即可。
它对我帮助很大。希望它也对你有帮助。
您可以在此处观看 1 分钟演示:http://youtu.be/P5vpaGoBlBY
Using this library you can browse your SQLite database directly from your application
https://github.com/sanathp/DatabaseManager_For_Android
Its a single java activity file ,just add the java file to your source folder you can view the tables in your app database , update ,delete, insert rows to you table .Everything from your app.
When the development is done remove the java file from your src folder thats it .
It helped me a lot .Hope it helps you too .
You can view the 1 minute demo here : http://youtu.be/P5vpaGoBlBY