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 ).