(OK) 编译 cm-13-kiwi for (华为 荣耀 5X) - 成功

来源:互联网 发布:返利网淘宝购物返多少 编辑:程序博客网 时间:2024/04/28 07:18
编译 cm-13-kiwi for 荣耀畅玩5X
=============================================================================
Build CyanogenMod and CyanogenMod Recovery

https://wiki.cyanogenmod.org/w/Build_for_kiwi
----------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
download and compile cm-13-kiwi (begin)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

--------------------------------------------------------------

[root@localhost ~]# mkdir /opt/android-x86/cm-13-kiwi-4-honor5x/
[root@localhost ~]# cd /opt/android-x86/cm-13-kiwi-4-honor5x/

[root@localhost cm-13-kiwi-4-honor5x]# dnf install maven
[root@localhost cm-13-kiwi-4-honor5x]# ln -s /usr/lib/jvm/java-1.8.0-openjdk /usr/lib/jvm/java-8-openjdk-amd64

[root@localhost cm-13-kiwi-4-honor5x]#

curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/bin/repo
chmod a+x /usr/bin/repo

## Initialize the CyanogenMod source repository
repo init -u https://github.com/CyanogenMod/android.git -b cm-13.0

## Download the source code
repo sync

[root@localhost cm-13-kiwi-4-honor5x]# du -hs .
26G    .
[root@localhost cm-13-kiwi-4-honor5x]#
--------------------------------------------------------------

========================================= 从这里开始

这次编译android系统,没有直接下载源代码,而是 使用 以前 下载的 整套代码 (下载后 没有任何修改)

####################################
##
## 使用 以前 下载的 整套代码 (下载后 没有任何修改)
##
####################################

cp -r /mnt/backup/cm-13-kiwi/ cm-13-kiwi-4-honor5x

=========================================


####################################
## Prepare the device-specific code
####################################

## https://wiki.cyanogenmod.org/w/Build_for_kiwi

[root@localhost cm-13-kiwi-4-honor5x]# source build/envsetup.sh

            // This will download the device specific configuration and kernel source for your device.
[root@localhost cm-13-kiwi-4-honor5x]# breakfast kiwi

// 编译错误
make: *** No rule to make target '/opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/obj_arm/lib/libtfa9895.so', needed by '/opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/obj_arm/SHARED_LIBRARIES/audio_amplifier.msm8916_intermediates/LINKED/audio_amplifier.msm8916.so'。 停止。
make: *** 正在等待未完成的任务....

// 解决方法如下 ( 编译 真正手机的 android 系统前,一定要先 Extract proprietary blobs )


####################################
## Extract proprietary blobs
####################################

## https://wiki.cyanogenmod.org/w/Build_for_kiwi

[root@localhost cm-13-kiwi-4-honor5x]# cd device/huawei/kiwi/

[root@localhost kiwi]# ./extract-files.sh


[root@localhost kiwi]# cd -
/opt/android-x86/cm-13-kiwi-4-honor5x

[root@localhost cm-13-kiwi-4-honor5x]# ls vendor/
cm  cmsdk  huawei  qcom

[root@localhost cm-13-kiwi-4-honor5x]# brunch kiwi

========================================================== 至此,编译成功,输出结果如下:


Install: /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/system/app/messaging/messaging.apk
build/tools/generate-notice-files.py  /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/obj/NOTICE.txt  /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/obj/NOTICE.html "Notices for files contained in the filesystem images in this directory:" /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/obj/NOTICE_FILES/src
Combining NOTICE files into HTML
Combining NOTICE files into text
Installing recovery patch to system partition
Warning: could not find SYSTEM/build.prop in <built-in function zip>
using prebuilt recovery.img from BOOTABLE_IMAGES...
using prebuilt boot.img from BOOTABLE_IMAGES...
putting script in bin/install-recovery.sh
Installed file list: /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/installed-files.txt
Target system fs image: /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/obj/PACKAGING/systemimage_intermediates/system.img
Running: mkuserimg.sh -s /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/system /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 2684354560 -D /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/system -L system /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/root/file_contexts
make_ext4fs -s -T -1 -S /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/root/file_contexts -L system -l 2684354560 -a system /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/obj/PACKAGING/systemimage_intermediates/system.img /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/system /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/system
Creating filesystem with parameters:
    Size: 2684354560
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8192
    Inode size: 256
    Journal blocks: 10240
    Label: system
    Blocks: 655360
    Block groups: 20
    Reserved block group size: 159
Created filesystem with 3791/163840 inodes and 247047/655360 blocks
Install system fs image: /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/system.img
/opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/system.img+/opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=2740531200 blocksize=135168 total=970952729 reserve=27709440
Package target files: /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/obj/PACKAGING/target_files_intermediates/cm_kiwi-target_files-e5e094019b.zip
using prebuilt recovery.img from BOOTABLE_IMAGES...
using prebuilt boot.img from BOOTABLE_IMAGES...
putting script in bin/install-recovery.sh

++++ boot ++++

using prebuilt boot.img from BOOTABLE_IMAGES...

++++ recovery ++++

using prebuilt recovery.img from BOOTABLE_IMAGES...

++++ system ++++

creating system.img...
Running: mkuserimg.sh -s /tmp/targetfiles-sZJ08h/system /tmp/system-OgixTz.img ext4 system 2684354560 -T 1230739200 -C /tmp/targetfiles-sZJ08h/META/filesystem_config.txt -B /tmp/system-blocklist-wsXgnz.map -L system /tmp/targetfiles-sZJ08h/BOOT/RAMDISK/file_contexts
make_ext4fs -s -T 1230739200 -S /tmp/targetfiles-sZJ08h/BOOT/RAMDISK/file_contexts -C /tmp/targetfiles-sZJ08h/META/filesystem_config.txt -B /tmp/system-blocklist-wsXgnz.map -L system -l 2684354560 -a system /tmp/system-OgixTz.img /tmp/targetfiles-sZJ08h/system
loaded 3781 fs_config entries
Creating filesystem with parameters:
    Size: 2684354560
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8192
    Inode size: 256
    Journal blocks: 10240
    Label: system
    Blocks: 655360
    Block groups: 20
    Reserved block group size: 159
Created filesystem with 3791/163840 inodes and 247047/655360 blocks

++++ userdata ++++

creating userdata.img...
Running: mkuserimg.sh -s /tmp/tmpD2YSvI/data /tmp/tmpcIrT2H ext4 data 11618204672 -T 1230739200 -L data /tmp/targetfiles-sZJ08h/BOOT/RAMDISK/file_contexts
make_ext4fs -s -T 1230739200 -S /tmp/targetfiles-sZJ08h/BOOT/RAMDISK/file_contexts -L data -l 11618204672 -a data /tmp/tmpcIrT2H /tmp/tmpD2YSvI/data
Creating filesystem with parameters:
    Size: 11618201600
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8160
    Inode size: 256
    Journal blocks: 32768
    Label: data
    Blocks: 2836475
    Block groups: 87
    Reserved block group size: 695
Created filesystem with 11/709920 inodes and 84285/2836475 blocks

++++ extrauserdata ++++

++++ cache ++++

creating cache.img...
Running: mkuserimg.sh -s /tmp/tmpt_6_Ro/cache /tmp/tmpFgR8Gw ext4 cache 268435456 -T 1230739200 -L cache /tmp/targetfiles-sZJ08h/BOOT/RAMDISK/file_contexts
make_ext4fs -s -T 1230739200 -S /tmp/targetfiles-sZJ08h/BOOT/RAMDISK/file_contexts -L cache -l 268435456 -a cache /tmp/tmpFgR8Gw /tmp/tmpt_6_Ro/cache
Creating filesystem with parameters:
    Size: 268435456
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8192
    Inode size: 256
    Journal blocks: 1024
    Label: cache
    Blocks: 65536
    Block groups: 2
    Reserved block group size: 15
Created filesystem with 11/16384 inodes and 2089/65536 blocks
done.
Package OTA: /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/cm_kiwi-ota-e5e094019b.zip
unzipping target target-files...
  running:  unzip -o -q /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/obj/PACKAGING/target_files_intermediates/cm_kiwi-target_files-e5e094019b.zip -d /tmp/targetfiles-969gwc
--- target info ---
blockimgdiff_versions     = (str) 1,2,3
blocksize                 = (int) 131072
boot_size                 = (int) 67108864
build.prop                = (dict) {'dalvik.vm.heapminfree': '4m', 'persist.audio.fluence.speaker': 'true', 'ro.config.hw_camera_zsl': 'true', 'ro.setupwizard.enterprise_mode': '1', 'dalvik.vm.isa.arm.variant': 'cortex-a53', 'ro.product.cpu.abilist': 'arm64-v8a,armeabi-v7a,armeabi', 'ro.config.hw_camera_refocus': 'true', 'debug.enable.sglscale': '1', 'ro.url.legal.android_privacy': 'http://www.google.com/intl/%s/mobile/android/basic/privacy.html', 'ro.build.id': 'M4B30X', 'ro.hwpp.cust_ons_bin': 'true', 'ro.com.android.dateformat': 'MM-dd-yyyy', 'ro.product.cpu.abilist32': 'armeabi-v7a,armeabi', 'ro.cdma.home.operator.numeric': '46003', 'ro.qc.sdk.audio.fluencetype': 'fluence', 'tunnel.audio.encode': 'false', 'ro.hwpp_ds_fail': '111,-3', 'ro.qualcomm.cabl': '0', 'persist.timed.enable': 'true', 'af.fast_track_multiplier': '1', 'ro.config.hw_camera_smartae': 'false', 'dalvik.vm.lockprof.threshold': '500', 'dalvik.vm.heaptargetutilization': '0.75', 'ro.config.hw_camera_bestShot': 'true', 'media.stagefright.enable-http': 'true', 'ro.product.manufacturer': 'HUAWEI', 'sys.usb.rps_mask': '10', 'ro.config.hw_dsda': 'false', 'persist.radio.no_wait_for_card': '1', 'ro.config.hw_camera_mfd': 'true', 'dalvik.vm.isa.arm64.features': 'default', 'ro.url.legal': 'http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html', 'persist.data.netmgrd.qos.enable': 'true', 'ro.config.hw_video_beauty': 'true', 'ro.telephony.ril_class': 'KiwiRIL', 'dalvik.vm.heapstartsize': '12m', 'voice.record.conc.disabled': 'false', 'persist.loc.nlp_name': 'com.qualcomm.location', 'ro.product.brand': 'HONOR', 'wifi.interface': 'wlan0', 'ro.config.hw_camera_docbeauty': 'true', 'ro.config.launcher_matchcard': '1', 'ro.cm.build.version.plat.sdk': '6', 'ro.qcom.ad.sensortype': '2', 'ro.config.hw_camera_nicefood': 'true', 'ro.pip.gated': '0', 'ro.config.eons_always_ap': 'false', 'ro.cmlegal.url': 'https://cyngn.com/legal/privacy-policy', 'dalvik.vm.heapsize': '256m', 'persist.audio.fluence.voicecall': 'true', 'persist.cne.feature': '0', 'audio.offload.pcm.enable': 'true', 'ro.config.hw_camera_hdr': 'true', 'persist.camera.promode': 'true', 'ro.hwui.gradient_cache_size': '1', 'persist.demo.hdmirotationlock': 'false', 'ro.build.host': 'localhost.localdomain', 'ro.com.android.dataroaming': 'false', 'ro.build.version.security_patch': '2016-10-05', 'ro.qcom.ad.calib.data': '/system/etc/calib_kiw.cfg', 'ro.hwui.drop_shadow_cache_size': '6', 'media.sf.extractor-plugin': 'libffmpeg_extractor.so', 'ro.product.locale': 'en-US', 'audio.offload.min.duration.secs': '30', 'persist.audio.fluence.voicerec': 'false', 'media.stagefright.enable-scan': 'true', 'ro.hwpp.disable_IA': 'true', 'dalvik.vm.isa.arm64.variant': 'generic', 'ro.config.nostore_nw_sel_mode': 'false', 'mmp.enable.3g2': 'true', 'ro.ril.hsxpa': '1', 'persist.sys.dalvik.vm.lib.2': 'libart.so', 'persist.hw_camera.video_sta': 'true', 'ro.board.platform': 'msm8916', 'voice.playback.conc.disabled': 'false', 'ro.telephony.call_ring.multiple': 'false', 'ro.config.hw_camera_davinci': 'true', 'ro.product.cpu.abilist64': 'arm64-v8a', 'ro.expect.recovery_id': '0x7e55fcca63e6cbc38c41cd95e6679345d4b13c66000000000000000000000000', 'persist.radio.msgtunnel.start': 'false', 'ro.config.force_reject_cause': 'true', 'rild.libpath': '/vendor/lib64/libril-qc-qmi-1.so', 'ro.build.flavor': 'cm_kiwi-userdebug', 'dalvik.vm.isa.arm.features': 'default', 'rild.libargs': '-d /dev/smd0', 'ro.gps.agps_provider': '1', 'ro.build.version.release': '6.0.1', 'ro.build.version.codename': 'REL', 'DEVICE_PROVISIONED': '1', 'audio.offload.disable': 'false', 'net.bt.name': 'Android', 'audio.offload.gapless.enabled': 'true', 'ro.hwui.text_large_cache_width': '2048', 'ro.config.alarm_alert': 'Helium.ogg', 'ro.hwpp_dorecoverylevel': '1', 'ro.opengles.version': '196608', 'ro.config.dsds_mode': 'umts_gsm', 'media.stagefright.enable-fma2dp': 'true', 'use.voice.path.for.pcm.voip': 'true', 'ro.config.hw_fdtimer_screenOn': '-1', 'ro.build.display.id': 'cm_kiwi-userdebug 6.0.1 M4B30X e5b079591f test-keys', 'ro.rommanager.developerid': 'cyanogenmod', 'ro.config.hwft_simrefresh': 'true', 'ro.config.ringtone': 'Orion.ogg', 'persist.gps.qc_nlp_in_use': '1', 'ro.config.hw_USB_on_enable_FD': 'true', 'debug.egl.hw': '0', 'ro.config.hw_burst_snapshot': 'true', 'media.stagefright.enable-qcp': 'true', 'persist.radio.add_power_save': '1', 'ro.qcom.ad': '1', 'ro.carrier': 'unknown', 'dalvik.vm.stack-trace-file': '/data/anr/traces.txt', 'ro.config.hw_camera_omron': 'true', 'ro.product.board': 'MSM8916', 'ro.build.version.preview_sdk': '0', 'persist.data.ds_fmc_app.mode': '0', 'ro.com.google.clientidbase': 'android-huawei', 'ro.cm.build.version.plat.rev': '0', 'ro.build.date': '2016\xe5\xb9\xb4 12\xe6\x9c\x88 17\xe6\x97\xa5 \xe6\x98\x9f\xe6\x9c\x9f\xe5\x85\xad 22:10:05 CST', 'debug.mdpcomp.idletime': '600', 'persist.radio.sib16_support': '1', 'ro.config.hw_always_allow_mms': 'true', 'ro.use_data_netmgrd': 'true', 'ro.build.date.utc': '1481983805', 'audio.offload.buffer.size.kb': '64', 'ro.config.hw_roaming_optimize': 'true', 'av.offload.enable': 'true', 'ro.config.optimize_signal': 'true', 'ro.qc.sdk.audio.ssr': 'false', 'ro.cm.display.version': '13.0-20161217-UNOFFICIAL-kiwi', 'ro.build.version.all_codenames': 'REL', 'mm.enable.smoothstreaming': 'true', 'media.stagefright.enable-aac': 'true', 'keyguard.no_require_sim': 'true', 'telephony.lteOnCdmaDevice': '1', 'ro.build.selinux': '1', 'dev.pm.dyn_samplingrate': '1', 'persist.sys.root_access': '0', 'ro.hwui.text_small_cache_width': '1024', 'ro.product.cpu.abi': 'arm64-v8a', 'ro.cm.version': '13.0-20161217-UNOFFICIAL-kiwi', 'ro.hwpp_sig_stability_switch': 'true', 'ro.product.name': 'cm_kiwi', 'ro.config.hw_fast_dormancy': 'true', 'ro.build.version.base_os': '', 'persist.data.qmi.adb_logmask': '0', 'voice.voip.conc.disabled': 'true', 'ro.vendor.extension_library': 'libqti-perfd-client.so', 'media.sf.omx-plugin': 'libffmpeg_omx.so', 'ro.ril.gprsclass': '10', 'ro.wifi.channels': '', 'ro.hwui.r_buffer_cache_size': '8', 'ro.modversion': '13.0-20161217-UNOFFICIAL-kiwi', 'ro.build.characteristics': 'default', 'debug.mdpcomp.logs': '0', 'persist.camera.hal.debug': '0', 'ro.build.type': 'userdebug', 'qemu.hw.mainkeys': '0', 'ro.config.hw_fdtimer_screenOff': '3000', 'dalvik.vm.heapgrowthlimit': '128m', 'ro.build.version.incremental': 'e5b079591f', 'ro.config.AC_optimize_plmn_srch': 'true', 'ro.hwui.text_large_cache_height': '1024', 'dalvik.vm.zygotemaxfailedboots': '5', 'ro.build.tags': 'test-keys', 'ro.sf.lcd_density': '480', 'ro.build.version.sdk': '23', 'persist.radio.use_nv_force': 'false', 'persist.radio.force_nw_search': '1', 'ro.cm.releasetype': 'UNOFFICIAL', 'media.stagefright.enable-player': 'true', 'ril.subscription.types': 'NV,RUIM', 'ro.config.hw_camera_blureffect': 'false', 'ro.build.user': 'root', 'ro.hwui.path_cache_size': '32', 'ro.hwui.text_small_cache_height': '1024', 'ro.build.expect.trustzone': 'TZ.BF.3.0.C3-00025', 'debug.sf.hw': '0', 'ro.config.NW_rescan_after_rej': 'true', 'persist.radio.rat_on': 'combine', 'ro.hwui.texture_cache_flushrate': '0.4', 'ro.hwui.texture_cache_size': '72', 'ro.cm.device': 'kiwi', 'ro.multi.rild': 'true', 'audio_hal.period_size': '192', 'ro.com.android.wifi-watchlist': 'GoogleGuest', 'persist.radio.apm_sim_not_pwdn': '1', 'ro.hwui.layer_cache_size': '48', 'persist.hwc.mdpcomp.enable': 'true', 'persist.sys.dun.override': '0', 'ro.config.notification_sound': 'Argon.ogg', 'persist.radio.modem.cap': '7E442', 'persist.omh.enabled': '0', 'media.aac_51_output_enabled': 'true'}
cache_fs_type             = (str) ext4
cache_size                = (int) 268435456
default_system_dev_certificate = (str) build/target/product/security/testkey
device_type               = (str) MMC
extfs_sparse_flag         = (str) -s
extra_recovery_keys       = (str)  build/target/product/security/cm build/target/product/security/cm-devkey
fs_type                   = (str) ext4
fstab                     = (dict) {'/log': <common.Partition object at 0x7f7d067f43d0>, '/recovery': <common.Partition object at 0x7f7d067f4710>, '/cache': <common.Partition object at 0x7f7d067f4510>, '/data': <common.Partition object at 0x7f7d067f4450>, '/system': <common.Partition object at 0x7f7d067f4410>, '/frp': <common.Partition object at 0x7f7d067f4550>, '/persist': <common.Partition object at 0x7f7d067f44d0>, '/persistent': <common.Partition object at 0x7f7d067f4590>, '/cust': <common.Partition object at 0x7f7d067f4490>, '/boot': <common.Partition object at 0x7f7d067f46d0>}
fstab_version             = (int) 2
mkbootimg_args            = (str)
multistage_support        = (str) 1
recovery_api_version      = (int) 3
recovery_mount_options    = (str) ext4=max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc
recovery_size             = (int) 67108864
selinux_fc                = (str) /tmp/targetfiles-969gwc/BOOT/RAMDISK/file_contexts
system_size               = (int) 2684354560
tool_extensions           = (str) device/huawei/kiwi/releasetools
update_rename_support     = (str) 1
use_set_metadata          = (str) 1
userdata_size             = (int) 11618204672
(using device-specific extensions from target_files)
loaded device-specific extensions from /tmp/targetfiles-969gwc/META/releasetools.py
using prebuilt recovery.img from BOOTABLE_IMAGES...
using system.img from target-files
Total of 655360 4096-byte output blocks in 3591 input chunks.
Generating digraph...
Finding vertex sequence...
Reversing backward edges...
  0/0 dependencies (0.00%) were violated; 0 source blocks stashed.
Improving vertex order...
Revising stash size...
  Total 0 blocks are packed as new blocks due to insufficient cache size.
Reticulating splines...
max stashed blocks: 0  (0 bytes), limit: 214748364 bytes (0.00%)

using prebuilt boot.img from BOOTABLE_IMAGES...
   boot size (43157504) is 64.31% of limit (67108864)
  running:  openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
  running:  java -Xmx2048m -jar /opt/android-x86/cm-13-kiwi-4-honor5x/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmprLNhXa /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/cm_kiwi-ota-e5e094019b.zip
done.
Package Complete: /opt/android-x86/cm-13-kiwi-4-honor5x/out/target/product/kiwi/cm-13.0-20161217-UNOFFICIAL-kiwi.zip
make: Leaving directory '/opt/android-x86/cm-13-kiwi-4-honor5x'

#### make completed successfully (01:44:48 (hh:mm:ss)) ####

[root@localhost cm-13-kiwi-4-honor5x]#


0 0
原创粉丝点击