Android ADB Android Debug Bridge edit

View and pull cache files of an app

You may use this command for listing the files for your own debuggable apk:

adb shell run-as <sample.package.id> ls /data/data/sample.package.id/cache

And this script for pulling from cache, this copy the content to sdcard first, pull and then remove it at the end:

#!/bin/sh
adb shell "run-as <sample.package.id> cat '/data/data/<sample.package.id>/$1' > '/sdcard/$1'"
adb pull "/sdcard/$1"
adb shell "rm '/sdcard/$1'"

Then you can pull a file from cache like this:

./pull.sh cache/someCachedData.txt

Get Database file via ADB

sudo adb -d shell "run-as com.example.name cat /data/da/com.example.name /databases/STUDENT_DATABASE  > /sdcard/file

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Table Of Contents
33 ADB Android Debug Bridge
39 ACRA
64 Menu
112 Loader
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
156 Vk SDK
170 XMPP
176 OpenCV
200 FileIO
203 Moshi
217 Paint
231 AIDL
241 JCodec
243 Okio
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close