Android eclipse DDMS - Can't access data/data/ on phone to pull files
While testing my apps, I use emulators and my own phone to see if everything is working ok. My apps are also writing data to shared preferences and a text file.
I can pull the data from my emulators through the DDMS
in eclipse so I can read the data files on my computer, but when I try to open those folders through the DDMS
on my phone, nothing happens. I click the data folder and nothing happens.
My phone is rooted. Is there any way I could pull the files from my phone? I know that Android keeps these folders private, but there must be a way. The emulator is just way too slow.
Solution 1:
On rooted device you can do this:
- Open cmd
- Type
adb shell
su
- Press 'Allow' on device
chmod 777 /data /data/data /data/data/com.application.package/data/data/com.application.package/*
- Go to the DDMS view in Eclipse
After this you should be able to browse the files on the device.
To get the databases:
chmod 777 /data/data/com.application.package/databases /data/data/com.application.package/databases/*
If it returns permission denied
on su
Go to Settings
> Developer Options
> Root access
> Apps and ADB
Solution 2:
No one seems to understand that a retail Nexus One even after being rooted still will not let you browse the file system using DDMS File Explorer. We are talking about real phones here and not the emulator. If you happen to have a Nexus One Developer Phone you can browse the file system using DDMS Filer Explorer, but a retail Nexus One that has been rooted you can't. Got it?
So I hope that answers the question of not being able to use the DDMS File Explorer to browse the file system of a rooted retail Nexus One. After rooting a retail Nexus One there is still something that remains to be done to use DDMS to use the File Explorer to browse the phones File System. I don't know what it is. Maybe someone else knowns.
Solution 3:
If gives "permission denied" on adb shell -> su...
Some ROMs are running adbd daemon in secure mode (adbd has no root access and su command does not even show permission ask dialog on the device). In this case you will get "permission denied" when you try cmd -> adb shell -> su. The solution I've found is one app from the famous modder Chainfire called Adbd Insecure.