I recently created an Emulator device with Android Studio,but only to find that I can't open the /data/data folder to get the sqlite db file.The folder just can't open,I have tried to use shell scirpt to chmod the /data directory,but it says the su command not found.
Is there anyone has the same problem? Or I have to root the Emulator? But it's an Emulator! I just think it's kind of inconvenient to root a Emulator!
Update
Can't remember whether it's from Android Studio 3.0 or later but if you have downloaded AS 3.3+, you'll find the tab on bottom right corner called Device File Explorer
, which lets you to see and easily get the data of your app without rooting.
Opening as Administrator didn't help but rooting the phone did worked, and no I'm not lowering my SDK version.
Open cmd and go to C:\Users\{User}\AppData\Local\Android\Sdk\platform-tools or to the folder location and type cmd
at the address bar.
Whether you're super user or not can be determined by $
:
C:\{User}\...\platform-tools>adb shell
generic_x86:/ $ exit
To have su/root privileges type adb root
and exit:
C:\{User}\...\platform-tools>adb root
generic_x86:/ # exit
Next run the Android Device Monitor to extract the data.
To turn off root type adb unroot
.