Compile the APK file to the 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. Execute make and 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, the out/target/product/generic/system/APP does not have the APK to be added, at this time, make it again, and the speed is fast ).

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.