Preface
During this period of time, the skin swap function has encountered many problems and there are new problems after the solution. Here we will share with you that you want to achieve multi-APK Resource Sharing without using your userid, we recommend that you use your userid with caution.
StatementWelcome to repost, but please keep the original source of the article :) blog Park: http://www.cnblogs.com farmer UNCLE: http://over140.cnblogs.com
Body
1. Key Steps
Mainly run-as command: over @ over-ThinkPad-R52 :~ $ Adb shell
$ Run-as com. package
$ Cd/data/com. package
$ Ls
Databases
Lib
$ Cd databases
$ Ls
Preferences. db
$ Cat preferences. db>/mnt/sdcard/preferences1.db
Code Description:
Note that to replace com. package with your complete package name, the key is the run-as command. Finally, use the cat command to copy the database to the SD card.
Ii. Supplement
The/data/package/lib directory shared by colleagues can be accessed directly. That is to say, although the/data directory cannot be read after the adb shell, the files under this directory can be accessed directly, the preceding run-as command shows that its permissions are different from those of other directories and are system permissions. This facilitates sharing so for multiple apk files, this is also the method used by Vitamio.
2012-6-14
If the android: debuggable = "false" is set with the signature specified, this command cannot be used.
2012-7-13
Thanks for sharing this article (see the comments). Do not run the adb shell and run-as command together, for example, adb shell run-as com. pack.
Iii. References
Use the mobile machine to run adb to access data resources on android [blogspot]
Why do I get access denied to data folder when using adb?
End
For more information about shared data, see/data/package/files. Use the second parameter of openFileOutput to specify the access permission. There is always one-sidedness in things. This article encourages you to peat apk and share the methods with you. It is also a kind of hacker spirit that I can't manage as to what you use to do, remind everyone not to store important data in plain text when developing applications.