Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 558
dell116 Avatar asked Feb 01 '11 20:02

dell116


People also ask

How do I access app data on android?

GUI — In Android Studio, launch Android Device Monitor from the menu: Tools/Android/Android Device Monitor. Navigate to the File Explorer tab, then data/data/<your app package name>/. Find the file you are looking for, and you can push and pull a file from there.

How do I view all data on Android?

Accessing all of the files on your Android device is really simple: Open your devices' App drawer – Depending on the version of Android software you're running you can click on the home screen icon that has several dots or you can swipe up on the screen. Use the search bar to quickly locate the 'File Manager' app.


2 Answers

On rooted device you can do this:

  1. Open cmd
  2. Type adb shell
  3. su
  4. Press 'Allow' on device
  5. chmod 777 /data /data/data /data/data/com.application.package/data/data/com.application.package/*
  6. Go to the DDMS view in Eclipse

After this you should be able to browse the files on the device.

To get the databases:

  1. 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

like image 96
peceps Avatar answered Sep 17 '22 11:09

peceps


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.

like image 27
Vince Avatar answered Sep 17 '22 11:09

Vince