user1 user1 - 11 days ago 4
Android Question

Why am I getting Permission Denied when trying to push a Sqlite file to my rooted Android device?

So I have a local

Sqlite
file I am trying to push to my Rooted Android (Nexus 7 2013) device. Which I have confirmed is Rooted by tying
adb shell
,
su
and seeing the # displayed instead of $

I am trying to run the following command:

adb push D:\tfs\MyApp\MyDatabase.db3 /data/data/MyApp/files/MyDatabase.db3


But I keep getting


Failed to copy ...MyApp.. to ...MyApp...: Permission denied


I have searched the internet and found answers here and here and have come up with the following:

adb shell su -c "mount -o rw,remount /data"
adb shell su -c "chmod 777 /data"


But even after running these two above commands and running my
Push
Command I am still getting Permission Denied.

What am I doing wrong?

Answer

Ok so heres my solution.

My phone was already Rooted but for some reason this isnt enough to do anything you want.

I had to go and download the apk onto my device named adbd insecure mentioned here which you can download on that thread or from the google play store. I then had to open the App on my device and click "Enable Insecure adbd" and I also clicked "Enable at boot"

After this running my normal command:

adb push D:\tfs\MyApp\MyDatabase.db3 /data/data/MyApp/files/MyDatabase.db3

worked

Comments