简体   繁体   中英

Copy Database to /data in Android Device

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.

Is there any way to put it without become a root first ?

No.

Or any other way to make sure, my apps can access it on my phone.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM