Android compiles the source code in Linux [Android Evolution]

Source: Internet
Author: User

 

How to compile the source code in linux is described below:

1. The procedure is as follows: www.2cto.com

$ Cd aw813/AP // enter the directory to be compiled first

$. Build/envsetup. sh // there is a space between it and build.

$ Choosecombo // then select the corresponding compiling environment. Generally, select the default value. Note that you must select user to compile the user version.

$ Make // compile the entire source code. $ make-j4 opens four threads to make, which is faster. Make-j8.

Note: To compile the source code of a single project, you must first compile the source code of the entire project, and then compile a single source code.

2. Find the path of the apk corresponding to the source code after compilation:

/Home/wangxianming/aw813/AP/out/target/product/aw813/system/app/Mms.apk // find the apk corresponding to the SMS

3. How to Use the compiled adb in the mobile phone to burn the compiled adb to the mobile phone:

$ Cd/aw813/AP/out/host/linux-x86/bin

$./Adb kill-server // kill the adb in the mobile phone

(2) $./adb devices // identify the compiled adb

(3) If the permission is insufficient, use the root permission instead of No Permissions:

$ Su password:

Note: The database must be consistent! Otherwise, an error is reported for the burned version!

4. Install APK

$ Adb install xxx.apk // directly install APK. After the phone restarts, the apk disappears.

$ Adb install-r xxx.apk // install and overwrite the existing APK. After the phone restarts, the apk disappears.

$ Adb push ../xxx.apk system/app // push method is installed on the mobile phone. After the mobile phone is restarted, the apk still exists.

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.