title: How can one pull the (private) data of one's own Android app?
body: <p>Attempting to pull a single file using </p>
  
  <pre><code>adb pull /data/data/com.corp.appName/files/myFile.txt myFile.txt
  </code></pre>
  
  <p>fails with</p>
  
  <pre><code>failed to copy '/data/data/com.corp.appName/files/myFile.txt myFile.txt' to 'myFile.txt': Permission denied
  </code></pre>
  
  <p>despite that USB debugging is enabled on the device.</p>
  
  <p>We can go around the problem through the archaic route </p>
  
  <pre><code>adb shell
  run-as com.corp.appName
  cat files/myFile.txt &gt; myFile.txt
  </code></pre>
  
  <p>but this is unwieldy for more than one file.</p>
  
  <p>How can I pull the directory /data/data/com.corp.appName/files to my MacBook?</p>
  
  <p>Doing this either directly or through a transit in `/storage/sdcard0/myDir (from where I can continue with Android File Transfer) is fine.</p>
  
  <p><strong>Additional Comment</strong></p>
  
  <p>It may be that just running</p>
  
  <pre><code>adb backup  -f myFiles com.corp.appName
  </code></pre>
  
  <p>will generate the files I am looking for. In that case I am looking for a way to untar/unzip the resulting backup!</p>