I am analyzing an APK, and see a set of .txt resources in the /res/raw/ directory of the application. After installing the application on an emulator, I would expect to see those same files in the /data/data/[app]/files directory, but they do not seem to exist. Where are the raw resources stored? 开发者_如何学运维Are raw resources generated at application runtime somewhere else on the filesystem? Or when they are accessed, is it dynamically from the local .apk file? Thanks.
Raw resources (and really, all resources) are bundled in the APK file (this includes files placed in assets/
), which is why you cannot get to the using File
handles. The APK files themselves usually live in the system/app
directory of the device.
The internal storage location you mentioned (/data/data/[app]/files
) is where files created with Context.openFileInput()
, Context.openFileOutput()
, or Context.getFilesDir()
are placed.
HTH
精彩评论