将数据库复制到 Android 设备中的 /data
好吧,我尝试了很多方法让我的应用程序可以在手机上使用 SQLite 访问数据库。我创建了一个 LBS 应用程序,并将所有位置保存在 dbtaxi 中。我从 Android 模拟器中提取 dbtaxi,并想使用 adb 将其复制到手机上的 /data。正如我所料,我需要成为根。
有什么方法可以在不先成为根的情况下放置它吗?或任何其他方式来确保我的应用程序可以在我的手机上访问它。
请帮助我。
Okay, I tried many thing to make my apps can access database using SQLite on my phone. I create an LBS apps, and all Location saved in dbtaxi. I pull dbtaxi from my android emulator and I want to copy it to /data on my phone using adb. as I expected, I need to be a root.
Is there any way to put it without become a root first ? Or any other way to make sure, my apps can access it on my phone.
Help me please.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不。
您的应用程序应该创建并填充自己的数据库。毕竟,假设您家里有多个用户,您将无法手动将数据库复制到所有用户的手机上。
您可以尝试 https://github.com/jgilfelt/android-sqlite-asset-helper< /a> 作为将数据库打包到应用程序中以部署到设备的一种方式。
No.
Your app should be creating and populating its own database. After all, assuming there are more than a couple of users in your home, you will not be able to manually copy a database to all your users' phones.
You might try https://github.com/jgilfelt/android-sqlite-asset-helper as a way to package your database inside your app to deploy to devices.