1. Added adb path to ~/.bash_profile
export PATH="/Users/myname/Library/Android/sdk/platform-tools:$PATH"
2. Logged in to emulator
adb -s emulator-5554 shell
3. changed permission of the app folder and parent folder
chmod 777 /data/data/com.me.myproject chmod 777 /data/data
4. Still can not get stuff from outside. Why?
adb -s emulator-5554 pull /data/data/com.me.myproject
I had the same problem and I did this:
- adb shell
- run-as package (not rooted device)
- cp 'database/xx.db /sdcard/xx.db'
- adb pull /sdcard/xx.db
That's because your debugging Android device is not rooted. If you have a physical rooted device or have an emulated device, try executing this before to restart ADB in root mode, then any command should work:
adb root