Just started to learn Android, a lot of things do not understand, so the following is the first thing I do, record, that is, APK integration:
Our integrated APK is a third-party apk that has already been signed and needs to be integrated into the System/priv-app directory with the following process:
First copy the APK to vendor/project name/target ..., the specific directory forget, is to enter their own project files, or the upper directory, add a folder, common, inside create an app folder, the following create an APK name folder, Copy the apk you want to integrate, and then create the Android.mk file with the following content: Assuming the apk name is called facelock.apk, the folder name is Facelock
Local_path:= $ (call My-dir)
Include $ (clear_vars)
Local_module: = Facelock
Local_src_files: =./facelock.apk
Local_module_tags: = Optional
Local_module_class: = APPS
local_certificate:= presigned//indicates that the APK has been signed and, if modified to platform, uses the system signature
Local_module_path: = $ (product_out)/system/priv-app/
Include $ (build_prebuilt)
This compiles the APK the Mk file is finished, so that although the use of MM local compilation can be successful, but using MAKE-JN for full compilation will not execute the module, so you need to add the following content in the Android.mk file in the upper layer:
Product_packages + = Facelock
Or in the existing add as follows:
Product_packages + = \
XXXXX \
XXXXX \
Facelock
Where facelock needs to be consistent with the local_module behind the Mk file.
Android APK Integration