Copy app binary file using adb shell

Here is a method I recently used to copy binary file out of Android in one line shell command.

This method requires app to be compiled in debug mode. You will also need to enable debug access for your mobile device.

It is very handy if you need to copy for example application database.

adb -d shell 'run-as com.appname od -An -vtx1 /data/user/0/com.appname/files/file.bin' | xxd -r -p > file.bin

About the author

Yuli Stremovsky
Yuli StremovskyKesem.IO CTO
Yuli is experienced software security architect, is a co-founder of Kesem.IO, working as a company CTO.
KESEM.IO is creating a trusted, fast, secure and easy to use solution to guarantee mobile payments on blockchain enabled digital assets.
Before Kesem.IO, Yuli was a founder of a database security company GreenSQL/Hexatier which was acquired by Huawei.

Some my code is available at:

Leave a Reply

Your email address will not be published. Required fields are marked *