How to read database of another application

前端 未结 3 1925
太阳男子
太阳男子 2020-12-29 16:55

I am working on a rooted device. I have connected with the adb shell from my pc and I can verify that the other database exists and I can query its tables.

However i

3条回答
  •  别那么骄傲
    2020-12-29 17:41

    Android OS by default does not allow applications to access each others private folders. To be able to read files that are in another applications folder either:

    1) you need to have both applications installed using same user id. Add this to both manifests:

    android:sharedUserId="com.xx.xx"
    

    2) If other app is a 3rd party app then your only choice is to install your app as system application. To do that you need a rooted phone and you need to mount the system folder. And then you need to put your application into /system/app/ folder and reboot the phone. It should be installed automatically during the boot.

提交回复
热议问题