Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is library file present in .apk file?

Tags:

android

apk

Actually I want to know that if in my application's libs folder, any library file(e.g .jar file) is present, then after installing(running) that application, will library file present in .apk file? According to my understanding, library FILE should present in generated .apk file. If I am wrong then please correct me.

If my question is below standard, then extremely sorry for that. Any help will be well appreciated

like image 215
abhishek kumar gupta Avatar asked Feb 13 '13 11:02

abhishek kumar gupta


People also ask

What types of files are likely found in an APK file?

It's the Android operating system's version of a . zip file. It contains all the resources an app needs to run, including its Java code, native libraries, assets, manifest file, resource files, etc. The APK file format was created, so developers could deliver software to devices in a single compressed file.

Where are APK files stored?

If you want to locate the APK files in your Android phones, you can find the APK for user-installed apps under /data/app/directory while the preinstalled ones are located in /system/app folder and you can access them by using ES File Explorer.

What is the difference between APK and ZIP file?

Any APK file is a valid ZIP file. There's more to it than that - files that must be present, the fact that zipalign is normally used to align data structures within the file - but it's all valid ZIP. Save this answer.

How do I view the contents of an APK file?

Actually the apk file is just a zip archive, so you can try to rename the file to theappname. apk. zip and extract it with any zip utility (e.g. 7zip). The dalvik file can be converted to jar using dex2jar utility and then can be opened by any java decompiler tool.


1 Answers

With recent versions of the Android tools, .jar files in the libs folder are automatically included in the build. (See Dealing with dependencies in Android projects.) So, yes, the library is included in the compiled bytecode (not as a separate file).

If you use ProGuard in a release build, then it will attempt to strip out any code which is not actually used. So, it may be that some parts of the library are included in the final .apk, and some parts are removed.

like image 93
Graham Borland Avatar answered Oct 30 '22 08:10

Graham Borland