How to change permission of internal folder/file in android?

Patriotic picture Patriotic · Jun 26, 2018 · Viewed 17.3k times · Source

I wanted to get database file from the emulator. So, I tried to change the permission of package folder using adb shell. When I use the below command:

adb shell su -c chmod 777 /data/data/com.mypackage.test

It always returns:

Chmod: need 2 arguments

I have changed permission some days ago using above command. But recently I'm always getting the above warning. I have searched a lot and found large information regarding using above command but no one mentioned about this warning issue.

Answer

Patriotic picture Patriotic · Jun 27, 2018

I have overcome this issue instead of running adb shell su -c "chmod 777 /data", I run the adb shell first and then the following command : su -c "chmod 777 /data".

enter image description here