I need to read a db file from a different application. The db file is created by the specific provider app & my application has to read this db file and take a back up. Not able to access the file : Permission Deni开发者_如何学运维ed.
Is it possible to read the file created by a different app? I think it may not be possible as per the android design, but just wanted to confirm whether it is possible by setting any permission.
Thanks, Grace.
No its not possible to read a db file from a different app in Android unless both apps are from the same publisher. It is part of the android security model that the application DB files are set as readable only by the application publisher in question.
This is done by each publisher being given their own user id on the device.
The only work rounds are
- Root you android device ( If you break it you get to keep both pieces ) and run your app with elevated privs.
- Look to see if the app in question has some kind of published API for querying their data.
Hope this helps
Peter
精彩评论