Tag Archives: ADB

Android Protip: Copy a SQLite database

Disclaimer: NO Root access required

Sometimes you need to export your app’s SQLite database to your computer for further analysis. Seeing that there isn’t a ‘cp’ command, this is how you’d go about doing it:

adb shell ‘run-as cat /data/data/ > /sdcard/mydb.sql’

Leave a comment

Posted by on August 14, 2013 in Android


Tags: , ,

Pro-Tip : ADB via Wifi

I recently worked on an Android app that used the device’s only USB I/O port to control another piece of hardware.  This requirement eliminated my ability to use LogCat or debug the application…until I discovered that you can use ADB over wifi.

This takes just a few steps:

1. Ensure that your Android device is online and connected to the ADB servier ($ adb devices)

2. Switch to TCP/IP port '$ adb tcpip 5555'

3. Ensure that your device is connected to the same network as your dev machine i.e you can ping it.

4. Connect to your Android device over the network ($ adb connect <Device IP address> ) eg: '$ adb connect'

5. Unplug your Android device from the USB

To reset your ADB server to USB, you can:

1. kill/start your ADB server, or

2. use '$ adb usb'.
Leave a comment

Posted by on May 27, 2013 in Android


Tags: ,