I am developing an app and I know my database *.db
will appear in data/data/com.****.***
I can access this file from AVD in Eclipse with help of sqlite manager
But I can't access this file in my Android phone.
I google it and it says I need to root my phone to do it, but I don't want to do it. (New phone, warranty issues, and security issues)
So here is my question: How can I access my data/data/.....
directory in my Android phone "without rooting it"?
Can I change user permissions for the directory data/data.....
without rooting it?
adb -d shell
run-as com.your.packagename cat databases/database.db > /sdcard/database.db
cd /sdcard
to make suredatabase.db
is there.adb pull /sdcard/database.db
or simply you can copy database.db from device .You could also try fetching the db using root explorer app. And if that does not work then you can try this:
adb shell
'su
chmod 777 /data /data/data /data/data/com.application.package /data/data/com.application.package/*
After this you should be able to browse the files on the rooted device.
You can also try copying the file to the SD Card folder, which is a public folder, then you can copy the file to your PC where you can use sqlite to access it.
Here is some code you can use to copy the file from data/data to a public storage folder:
Manifest:
Use File Explorer in eclipse. Select Windows => Show View => Other ... => File Explorer.
An another way is pull the file via adb:
you can copy this db file to somewhere in eclipse explorer (eg:sdcard or PC),and you can use sqlite to access and update this db file .