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 backup
didn't work for me, so here's what I did (Xiaomi Redmi Note 4X, Android 6.0):1. Go to Settings > Additional Settings > Backup & reset > Local backups.
2. Tap 'Back up' on the bottom of the screen.
3. Uncheck 'System' and 'Apps' checkmarks.
4. Tap detail disclosure button on the right of the 'Apps' cell to navigate to app selection screen.
5. Select the desired app and tap OK.
6. After the backup was completed, the actual file need to be located somehow. Mine could be found at /MIUI/backup/AllBackup/_FOLDER_NAMED_AFTER_BACKUP_CREATION_DATE_.
7. Then I followed the steps from this answer by RonTLV to actually convert the backup file (.bak in my case) to tar (duplicating from the original answer):
"
a) Go here and download: https://sourceforge.net/projects/adbextractor/
b) Extract the downloaded file and navigate to folder where you extracted.
c) run this with your own file names: java -jar abe.jar unpack c:\Intel\xxx.ab c:\Intel\xxx.tar
"
The question is: how-to-access-data-data-folder-in-android-device?
If android-device is Bluestacks * Root Browser APK shows data/data/..
Try to download Root Browser from https://apkpure.com/root-browser/com.jrummy.root.browserfree
If the file is a text file you need to click on "Open as", "Text file", "Open as", "RB Text Editor"
To do any of the above (i.e. access protected folders from within your phone itself), you still need root. (That includes changing mount-permissions on the /data folder and accessing it)
Without root, accessing the
/data
directly to read except from within your application via code isn't possible. So you could try copying that file to sdcard or somewhere accessible, and then, you should be able to access it normally.Rooting won't void your warranty if you have a developer device. I'm sorry, there isn't any other way AFAIK.
I had also the same problem once. There is no way to access directly the file within android devices except adb shell or rooting device.
Beside here are 02 alternatives:
1)
2) Try this: https://github.com/sanathp/DatabaseManager_For_Android
Accessing the files directly on your phone is difficult, but you may be able to copy them to your computer where you can do anything you want with it. Without rooting you have 2 options:
If the application is debuggable you can use the
run-as
command in adb shellAlternatively you can use Android's backup function.
You will now be prompted to 'unlock your device and confirm the backup operation'. It's best NOT to provide a password, otherwise it becomes more difficult to read the data. Just click on 'backup my data'. The resulting 'backup.ab' file on your computer contains all application data in android backup format. Basically it's a compressed tar file. This page explains how you can use OpenSSL's zlib command to uncompress it. You can use the
adb restore backup.db
command to restore the backup.If you are using Android Studio 3.0 or later version then follow these steps.
You can only expand packages which runs in debug mode on non-rooted device.