Sunday, September 1, 2019

adb push ... Permission denied


I am trying to push a file to a directory on a physical android device, but I am running into the following error.


>adb push data.db /data/data/com.me.app/databases
failed to copy 'data.db' to '/data/data/com.me.app/databases/data.db': Permission denied

I believe adb has sufficient privileges.


>adb root
adbd is already running as root

Here are the permission details for the path: /data/data/com.me.app/databases



drwxrwxrwx system   system            2014-01-14 10:31 data
drwxrwxrwx system system 2015-05-23 16:06 data
drwxrwxrwx u0_a224 u0_a224 2015-05-23 15:26 com.me.app
drwxrwxrwx u0_a224 u0_a224 2015-05-23 15:30 databases

I am not sure what to do here. Perhaps I am going about this the wrong way, but I just want to push the data.db file into the /data/data/com.me.app/databases directory on the device.


Does anyone know what I am doing wrong or what I should consider? Thanks.



Answer



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


-rw-------


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


>adb shell
# su
# chmod 777 /data/data/com.me.app/databases/data.db

No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...