How can one pull the (private) data of one's own Android app?

前端 未结 14 1800
长发绾君心
长发绾君心 2020-11-30 16:44

Attempting to pull a single file using

adb pull /data/data/com.corp.appName/files/myFile.txt myFile.txt

fails with

failed          


        
14条回答
  •  醉酒成梦
    2020-11-30 17:09

    I had the same problem but solved it running following:

    $ adb shell
    $ run-as {app-package-name}
    $ cd /data/data/{app-package-name}
    $ chmod 777 {file}
    $ cp {file} /mnt/sdcard/
    

    After this you can run

    $ adb pull /mnt/sdcard/{file}
    

提交回复
热议问题