/********************************************************************************************
* author:conowen@ Big Clock
* E-mail:[email protected]
*site:http://www.idealpwr.com /
* Shenzhen Power Thinking Technology Development Co., Ltd. &N Bsp , &NB Sp
* http://blog.csdn.net/ conowen and nbsp , &NB Sp
* Note: This article is original, only as a learning exchange use, reprint please indicate the author and source.
********************************************************************************************/
1. Add APK to System.img
1.1. Add a third-party APK package to System.img
First of all, the whole apk source package copy to \packages\apps, note that the code in the Layout folder XML can not have Chinese words, otherwise it will prompt the encoding errors, compilation can not be passed, the way to solve with @string, which is the code specification.
Then, edit the following document.
\build\target\product\generic_no_telephony.mk
Or
\BUILD\TARGET\PRODUCT\GENERIC.MK file
Depending on the situation
[Java] view plaincopy
Product_packages: = \
Accountandsyncsettings \
Deskclock \
Alarmprovider \
Bluetooth \
Calculator \
Calendar \
Camera \
Certinstaller \
Drmprovider \
Email \
Gallery3d \
Latinime \
Launcher2 \
MMS \
Music \
Provision \
Protips \
Quicksearchbox \
Settings \
Sync \
Systemui \
Updater \
Calendarprovider \
Syncprovider
1.2. Add a third party apk to System.img
is actually a copy operation, the APK from a certain path (such as: packages/apk/ideal_apk path) Copy to the path of/system/app or Data/app. The system is then compiled to the last, then packaged into system.img.
Modification Method:
to the corresponding machine in the devices directory to find a product_copy_files word of the Mk file, add their own apk path to go in.
such as the TCC892X SDK is the following file
\device\telechips\tcc892x-common\device_tcc892x-common.mk
[Java] view plaincopy
Product_copy_files + = \
PACKAGES/APK/IDEAL_APK/TV2.APK:SYSTEM/APP/TV2.APK \
PACKAGES/APK/IDEAL_APK/VIEWLOG.APK:SYSTEM/APP/VIEWLOG.APK \
Packages/apk/ideal_apk/weatherpro_2. 2. 1_liqucn.com.apk:system/app/weatherpro_2. 2. 1_liqucn.com.apk \
PACKAGES/APK/IDEAL_APK/WOL_MAGIC.APK:SYSTEM/APP/WOL_MAGIC.APK \
packages/apk/ideal_apk/rockplayer-universal-1.7. 6. apk:system/app/rockplayer-universal-1.7. 6. apk \
packages/apk/ideal_apk/vplayer.apk:system/app/vplayer.apk
Or a full-A13 scheme as follows
\android4.0\device\softwinner\nuclear-dds-t729\dds_t729.mk
[CPP] view plaincopy
# pre-installed APKs
Product_copy_files + = \
$ (call find-copy-subdir-files,*.apk,$ (Local_path)/apk,system/preinstall)
This will be able to copy the APK directory under the System/preinstall directory, the system will be installed on the first boot of the APK into the UserData partition.
2. Change the Android system default language
In the \build\target\product directory, locate the FULL_BASE.MK or full.mk file,
Add the following statement
Chinese:
[CPP] view plaincopy
Product_locales: = ZH_CN
English:
[CPP] view plaincopy
Product_locales: = en_US
Such as:
[CPP] view plaincopy
# Overrides
Product_Name: = Full
Product_brand: = generic
Product_device: = generic
Product_model: = Full Android
Product_locales: = ZH_CN
When compiling Android, add or remove the third-party apk from System.img, change the Android system default language