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

前端 未结 14 1729
长发绾君心
长发绾君心 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条回答
  •  -上瘾入骨i
    2020-11-30 17:28

    Newer versions of Android Studio include the Device File Explorer which I've found to be a handy GUI method of downloading files from my development Nexus 7.

    You Must make sure you have enabled USB Debugging on the device

    1. Click View > Tool Windows > Device File Explorer or click the Device File Explorer button in the tool window bar to open the Device File Explorer.
    2. Select a device from the drop down list.
    3. Interact with the device content in the file explorer window. Right-click on a file or directory to create a new file or directory, save the selected file or directory to your machine, upload, delete, or synchronize. Double-click a file to open it in Android Studio.

      Android Studio saves files you open this way in a temporary directory outside of your project. If you make modifications to a file you opened using the Device File Explorer, and would like to save your changes back to the device, you must manually upload the modified version of the file to the device.

    Full Documentation

提交回复
热议问题