15

Are there any way to access the files in /data/data and copy them into memory card? I do not have root access.

25

Without root access you have 2 options. Both options (may) allow you to access the files for a particular app, e.g. the folder /data/data/com.app.packagename.

  1. If the application is debuggable you can use the run-as command in adb shell (more info about what adb is and how to install it can be found here)

    adb shell
    run-as com.your.packagename` 
    cp /data/data/com.app.packagename/
    
  2. If the application is not debuggable, you can use Android's backup function.

    adb backup -noapk com.app.packagename
    

    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 the app's 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.

  • 2
    Does this also apply to applications with android:allowbackup="false"? – Key-Six Jan 9 '15 at 9:40
  • 1
    @Drejon No, I don't think it will work in that case (but I haven't tested it, so I am not 100% sure). – THelper Jan 9 '15 at 10:54
  • 1
    I am sure there are some cases of application that don't allow backup. When creating backup of all apps, they simply backup nothing. AFAIK, some app might provide a restricted subset of files or maybe even something custom, so don't consider it as always 1:1 of the directory in /data/data. BTW, BlackBerry forces me to use some password, but it is possible to decrypt it (if you have the password). I think I have used sourceforge.net/projects/adbextractor for that. – v6ak Mar 13 '18 at 20:56
  • 2
    I managed to get it with adb backup -noapk com.app.packagename You will get backup.ab then you will need to convert to tar (to open it with 7zip) You can convert it with sourceforge.net/projects/adbextractor - there is jar inside thi called abe.jar. Then You can run command java -jar abe.jar unpack backup.ab backup.tar – Igor Vuković Jun 10 at 8:01
0

Something a Lightweight Tools to Backup an Android App's Data (.db File) or a Direct Access via USB Debug even there is some phone are not UMS Enabled

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.