Android - adb push ... Permission denied

Edit: I found a work-around: AirDroid allows me to upload the file, but the permissions on the file are set to this:


Performing the following commands solves this problem (from Windows 7 command prompt).

>adb shell
# su
# chmod 777 /data/data/

The usual approach, which doesn't require any additional apps:

  1. Push to /data/tmp/;

  2. Copy on the device using adb shell, using cp if it's available on your device or cat if it isn't.

     > adb push data.db /data/tmp/data.db
     > adb shell
     # su # or run-as
     # cp /data/tmp/data.db /data/data/

Remembering to change to the correct package name for your app.