[Excerpt] how to compile an APK file into a system file

Source: Internet
Author: User
To compile a third-party or self-developed APK file into a system file (system. IMG:
1 (1) After the source code is compiled, copy the APK to out \ target \ product \ Generic \ System \ app.
(2) run the make Snod command to compile the added SPK into system. IMG.
Disadvantage: After you execute make clean, you need to re-execute the above operations after making again.
2. Improvement of "method 1.
(1) create a folder directory to store APK files.
Mkdir packages/apps/prebuilt_apps
CD Packages/apps/prebuilt_apps
Create a make file in prebuilt_apps
VI Android. mk
And write
Local_path: = $ (call my-DIR)
Include $ (clear_vars)
Local_post_process_command: = $ (shell CP-r $ (local_path)/*. APK $ (target_out)/APP /)
Save and exit.
(2) copy the APK to be compiled to the prebuilt_apps directory and execute make. The APK in prebuilt_apps will be tested in out \ target \ product \ Generic \ System \ app.
(3) execute make Snod. Complete.
After you execute make clean in this method, make again. You only need to make Snod (sometimes, after make, out \ target \ product \ Generic \ System \ app has no APK to be added, at this time, make it again, and the speed is fast ).
-----------------------
Thanks for the solution provided on the 11th floor regarding the compilation success but the problem cannot be run.
Decompress the APK file, such as the Lib (. So) file, copy the. So file to System \ Lib, and then compile the file.
This person directly added angrybird.apk (Angry Birds) to the simulator for compilation, which cannot be run after compilation. Copy libangrybirds. So to System \ Lib, and then compile and run it.
The acceptor Input Method APK can also be compiled and run successfully.
--------------------
Use the mkyaffs2image tool to make the above operations easier!
Copy the APK and Related Files (such as. So) to the corresponding path of system and run mkyaffs2image-F direction/system. IMG to generate system. IMG.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.