It seems like I have the same problem not so long ago.
You can check something first. When you connect to the device using adb shell , try ls data/data/<application_namespace_id>/databases/ . If it returns opendir failed, Permission denied , it should be the same problem as mine: problems with ADB permissions. And here is what solved my problem:
- Go to the "Developer Settings" section on your device (if you don’t see it, go to "Settings"> "About Phone" on your phone and click "Build Number" several times until "Developer Settings" is turned on)
- Then make sure "Developer Options" is indeed enabled.
- On the Developer Options screen, turn on Android Debugging to enable Android debugging
- On the same screen, make sure that ADB has permissions in 'Root access'
Now try your commands again. But after entering adb shell also type su to enable superuser mode. You should see a # confirming your shell in superuser mode.
If only one device is connected, it should work. Otherwise, you must also confirm that you are connected to the correct device by specifying your devices that adb devices first start and connect to the right button adb -d <device_reference_here> shell .
You may also need your phone to make one of these.
Hope this helps. Hooray!
source share