请参见通过Android的Studio数据库文件(内容) [英] See database file(content) via Android Studio
问题描述
我使用 Android的工作室,以发展我的应用程序,因为它被释放。
I use Android Studio to develop my app since it's was released.
一切工作很好,直到最近,我有调试
一起检查数据库文件
。
Everything works nice until recently, I have to debug
together with checking the database file
.
由于我不知道怎么看的数据库
直接,当我调试
来的生成,在数据库文件
,我必须导出
的数据库文件
从我的手机到PC。
Since I don't know how to see the database
directly, When i debugged
to generat the database file
, i have to export
the database file
from my phone to the PC.
为了做到这一点,我不得不打开 DDMS-> FileExplor
,有一次我打开 DDM的
,我必须重新连接 USB
,这将失去我的调试线程
。
In order to do this, i have to open DDMS->FileExplor
, Once i open DDMs
, i have to reconnect the USB
, which will lose my debug thread
.
检查数据库文件
之后,我不得不关闭 DDMS
并重新连接 USB
再次返回到调试模式
。
After checking the database file
, i have to close the DDMS
and reconnect the USB
again to get back to the debug mode
.
这太复杂!任何人都可以找到一个更好的方式来做到这一点?我在 Android的工作室的意思。 我知道Eclipse一样,在这方面具有优势。
It's just too complicated !!! Anyone can find a better way to do this? I mean under Android Studio. I know Eclipse does better in this aspect.
推荐答案
最后,我发现这并不需要打开DDMS一个简单的解决方案。
Finally, i found a simplest solution which do not need to open the DDMS.
实际上,该溶液是基于什么@Distwo提到,但不必是复杂。
Actually, the solution is based on what @Distwo mentioned, but it don't have to be that complicated.
第一,记得你的数据库文件中的设备的路径,它应该跳投相同。
例如我的是: /data/data/com.XXX.module/databases/com.XXX.module.database
First, remember the path of your database file in the device, it should aways the same.
For example mine is:/data/data/com.XXX.module/databases/com.XXX.module.database
二,执行这个命令,它拉你的数据库文件到您的PC
Second, execute this command which pulls your database file onto you PC
adb pull /data/data/com.XXX.module/databases/com.XXX.module.database /Users/somePathOnYourPC/
您需要做的仅仅是复制并存储该命令,然后就可以反复使用它。
What you need to do is just copy and store this command, then you can use it again and again.
第三,如果你得到许可被拒绝或类似的东西,只需要运行亚行根
前的previous命令。
Third, if you got Permission Denied or something like that, just run adb root
before the previous command.
这篇关于请参见通过Android的Studio数据库文件(内容)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!