Compile the android-4.3.1_r source code and brush it to your Galaxy Nexus I9250 real machineAuthor: rainwater Date:
The purpose of compiling the source code is to modify the source code and run it on the corresponding mobile phone. Only in this way makes sense. I have a Samsung Galaxy Nexus I9250 code named maguro. However, google does not currently provide hardware drivers for android4.4.2. The latest version is only available for Android4.3. For details, refer to https://developers.google.com/android/nexus/drivershere. I have seen on the Internet that the 4.4 source code + 4.3 driver has been compiled successfully and can run, but I have tried it and many errors have not been solved so far, therefore, we first tried the 4.3 Source code + 4.3 driver. The process is as follows:
Note: For details about compiling environment settings, refer to my previous article. <基于ubuntu 14.04 lts编译android4.4.2源代码> . Step 1: Get the android-4.3.1_r1 source code
$mkdir android-4.3.1_r1$cd android-4.3.1_r1$repo init -u https://android.googlesource.com/platform/manifest -b android-4.3.1_r1$repo sync
Step 2: Compile the source code of the android-4.3.1_r1
dennis@dubuntu1404:~/devenv/android-4.3.1_r1$ . build/envsetup.shincluding device/asus/deb/vendorsetup.shincluding device/asus/flo/vendorsetup.shincluding device/asus/tilapia/vendorsetup.shincluding device/generic/armv7-a-neon/vendorsetup.shincluding device/generic/mips/vendorsetup.shincluding device/generic/x86/vendorsetup.shincluding device/lge/mako/vendorsetup.shincluding device/samsung/maguro/vendorsetup.shincluding device/samsung/manta/vendorsetup.shincluding device/samsung_slsi/arndale/vendorsetup.shincluding device/samsung/toroplus/vendorsetup.shincluding device/samsung/toro/vendorsetup.shincluding device/ti/panda/vendorsetup.shincluding sdk/bash_completion/adb.bashdennis@dubuntu1404:~/devenv/android-4.3.1_r1$ lunchYou're building on LinuxLunch menu... pick a combo: 1. aosp_arm-eng 2. aosp_x86-eng 3. aosp_mips-eng 4. vbox_x86-eng 5. aosp_deb-userdebug 6. aosp_flo-userdebug 7. full_tilapia-userdebug 8. mini_armv7a_neon-userdebug 9. mini_mips-userdebug 10. mini_x86-userdebug 11. full_mako-userdebug 12. full_maguro-userdebug 13. full_manta-userdebug 14. full_arndale-userdebug 15. full_toroplus-userdebug 16. full_toro-userdebug 17. full_panda-userdebugWhich would you like? [aosp_arm-eng] 12============================================PLATFORM_VERSION_CODENAME=RELPLATFORM_VERSION=4.3.1TARGET_PRODUCT=full_maguroTARGET_BUILD_VARIANT=userdebugTARGET_BUILD_TYPE=releaseTARGET_BUILD_APPS=TARGET_ARCH=armTARGET_ARCH_VARIANT=armv7-a-neonTARGET_CPU_VARIANT=cortex-a9HOST_ARCH=x86HOST_OS=linuxHOST_OS_EXTRA=Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trustyHOST_BUILD_TYPE=releaseBUILD_ID=JLS36IOUT_DIR=out============================================dennis@dubuntu1404:~/devenv/android-4.3.1_r1$ make -j4
Note: If the flash. The reason is that because the driver is not added, you must complete the third step before starting to flash the machine.
Step 3: Download The i9250 (maguro) official driver and recompile it.(1) download the driver: Go to the drivers page. Put these files in the source code root directory. (2) execute. sh file extraction DRIVER: Run "chmod + x *. sh "adds executable permissions for them, and then executes these six sh files in sequence. Each file will allow you to input" I ACCEPT "to ACCEPT the protocol. After receiving the command, the extracted driver is placed in the directory named vendor. At this point, the vendor directory should be located under the root directory of the source code, that is, under the android-4.3.1_r1. Then execute the following commands in sequence to re-compile. The compilation time will be compared.
$. build/envsetup.sh$lunch 12$make -j4
Step 4: refresh the compiled img to the i9250 mobile phone(1) Modify ~ /. The environment variable ANDROID_PRODUCT_OUT in bashrc is:
export ANDROID_PRODUCT_OUT=/home/dennis/devenv/android-4.3.1_r1/out/target/product/maguro
(2) re-enter the command line and start to flash the machine.
$ adb reboot bootloader$ fastboot flashall -w
After you click it, the system will automatically restart. If there are no other problems, you can see the results of your work!
Author: Rain reproduced please indicate the source: http://blog.csdn.net/gobitan/article/details/24792589
References:1. http://blog.csdn.net/gobitan/article/details/24367439 Based on Ubuntu 14.04 LTS compiling Android4.4.2 source code 2. http://blog.csdn.net/zjmdp/article/details/7737802 Android 4.1 (Jelly Bean) source code compilation process summary