When compiling Android, add or remove the third-party apk from System.img, change the Android system default language

Source: Internet
Author: User

/********************************************************************************************
* 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

  1. Product_packages: = \

  2. Accountandsyncsettings \

  3. Deskclock \

  4. Alarmprovider \

  5. Bluetooth \

  6. Calculator \

  7. Calendar \

  8. Camera \

  9. Certinstaller \

  10. Drmprovider \

  11. Email \

  12. Gallery3d \

  13. Latinime \

  14. Launcher2 \

  15. MMS \

  16. Music \

  17. Provision \

  18. Protips \

  19. Quicksearchbox \

  20. Settings \

  21. Sync \

  22. Systemui \

  23. Updater \

  24. Calendarprovider \

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

    1. Product_copy_files + = \

    2. PACKAGES/APK/IDEAL_APK/TV2.APK:SYSTEM/APP/TV2.APK \

    3. PACKAGES/APK/IDEAL_APK/VIEWLOG.APK:SYSTEM/APP/VIEWLOG.APK \

    4. Packages/apk/ideal_apk/weatherpro_2. 2. 1_liqucn.com.apk:system/app/weatherpro_2. 2. 1_liqucn.com.apk \

    5. PACKAGES/APK/IDEAL_APK/WOL_MAGIC.APK:SYSTEM/APP/WOL_MAGIC.APK \

    6. packages/apk/ideal_apk/rockplayer-universal-1.7. 6. apk:system/app/rockplayer-universal-1.7. 6. apk \

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

    1. # pre-installed APKs

    2. Product_copy_files + = \

    3. $ (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

    1. Product_locales: = ZH_CN

English:

[CPP] view plaincopy

    1. Product_locales: = en_US



Such as:

[CPP] view plaincopy

    1. # Overrides

    2. Product_Name: = Full

    3. Product_brand: = generic

    4. Product_device: = generic

    5. Product_model: = Full Android

    6. Product_locales: = ZH_CN


When compiling Android, add or remove the third-party apk from System.img, change the Android system default language

Related Article

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.