哪里Android模拟器店SQLite数据库? [英] Where does Android emulator store SQLite database?

查看:130
本文介绍了哪里Android模拟器店SQLite数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个Android应用程序,将数据存储在SQLite数据库。我的问题是,这是否数据库文件得到,当你使用仿真存储在文件系统?

I'm working on an Android application that stores data in a SQLite database. My question is, where does this database file get stored on the filesystem when you're using an emulator?

我已经看到,它存储在

/数据/数据​​/程序包/数据库

但我需要知道我的本地机器的硬盘驱动器,实际上映射到。该数据库仍然存在,在模拟器中,多次运行甚至已经关停后的机器,因此它不能只是驻留在内存...

but I need to know where on my local machine's hard drive that actually maps to. The database persists on multiple runs of the emulator, even after having shut down the machine, so it can't just reside in RAM...

推荐答案

模拟器的文件系统,不映射到您的硬盘驱动器的目录。仿真器的磁盘图像保存为图像文件,您可以通过任意的Eclipse(查找工具栏上的G1-看图标)来管理,或者通过模拟器二进制文件本身(对选项的说明运行仿真器 - 帮助)

The filesystem of the emulator doesn't map to a directory on your hard drive. The emulator's disk image is stored as an image file, which you can manage through either Eclipse (look for the G1-looking icon in the toolbar), or through the emulator binary itself (run "emulator -help" for a description of options).

你最好使用亚行通过命令行来插孔插入正在运行的模拟器。如果你能得到具体的目录和文件名,你可以做一个亚行拉来获取数据库文件关闭模拟器,并到您的普通硬盘。

You're best off using adb from the command line to jack into a running emulator. If you can get the specific directory and filename, you can do an "adb pull" to get the database file off of the emulator and onto your regular hard drive.

修改:删除了建议,这适用于无根的设备太 - 它仅适用于仿真器,以及你在哪里工作,亚行作为root设备

Edit: Removed suggestion that this works for unrooted devices too - it only works for emulators, and devices where you are operating adb as root.

这篇关于哪里Android模拟器店SQLite数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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