東川印記

一本東川,笑看爭龍斗虎;寰茫兦者,度橫佰昧人生。

android源码编译09之nexus7到手01烧录源码

2015年4月29日星期三



08是wine那个,一堆的源码查看工具

正面

背面

华硕品质

桌面

关于

然后就可以烧了。。。。

从上面这个图可以得知,现在系统里基带是DEB,内核是3.4.0,当前刷的4.4.2,代号KOT。

我折腾了这么久的是4.4.2_r2,代号KAT。。。。

先编译,再刷机,这次编译不用老是lunch 1了,要lunch 这个



1,准备工作
源码:源码还是用以前的,虽然已经改的乱七八糟,能跑就好。
    /home/senrsl/android/source/WORKING_DIRECTORY
驱动:在驱动页下载驱动。


2,编译
①解压驱动
驱动解压,放到根目录,分别是
  1. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$ ls | grep extract
  2. extract-asus-deb.sh
  3. extract-broadcom-deb.sh
  4. extract-qcom-deb.sh
然后执行这三个脚本
一定要小心这句
  1. Type "I ACCEPT" if you agree to the terms of the license:
  2. You didn't accept the license. Extraction aborted.
前面点半天Enter,一到这里就点过。。。。。
  1. 声音,传感器
  2. Type "I ACCEPT" if you agree to the terms of the license: I ACCEPT
  3. vendor/
  4. vendor/asus/
  5. vendor/asus/deb/
  6. vendor/asus/deb/BoardConfigVendor.mk
  7. vendor/asus/deb/device-partial.mk
  8. vendor/asus/deb/proprietary/
  9. vendor/asus/deb/proprietary/libacdbdata.so
  10. vendor/asus/deb/proprietary/apns-conf.xml
  11. vendor/asus/deb/proprietary/libAKM.so
  12. vendor/asus/deb/BoardConfigPartial.mk
  13. vendor/asus/deb/device-vendor.mk
  14. Files extracted successfully.

  15. NFC
  16. Type "I ACCEPT" if you agree to the terms of the license: I ACCEPT
  17. vendor/
  18. vendor/asus/
  19. vendor/asus/deb/
  20. vendor/asus/deb/BoardConfigVendor.mk
  21. vendor/asus/deb/device-vendor.mk
  22. vendor/broadcom/
  23. vendor/broadcom/deb/
  24. vendor/broadcom/deb/device-partial.mk
  25. vendor/broadcom/deb/proprietary/
  26. vendor/broadcom/deb/proprietary/bcm2079x-b5_pre_firmware.ncd
  27. vendor/broadcom/deb/proprietary/bcm2079x-b5_firmware.ncd
  28. vendor/broadcom/deb/BoardConfigPartial.mk
  29. Files extracted successfully.

  30. 第三个那一堆,摄像头GPS WIFI蓝牙什么的
  31. Type "I ACCEPT" if you agree to the terms of the license: I ACCEPT
  32. vendor/
  33. vendor/qcom/
  34. vendor/qcom/deb/
  35. vendor/qcom/deb/device-partial.mk
  36. vendor/qcom/deb/proprietary/
  37. vendor/qcom/deb/proprietary/bridgemgrd
  38. vendor/qcom/deb/proprietary/diag_mdlog
  39. vendor/qcom/deb/proprietary/dxhdcp2.b01
  40. vendor/qcom/deb/proprietary/libmmcamera_faceproc.so
  41. vendor/qcom/deb/proprietary/libqmi.so
  42. vendor/qcom/deb/proprietary/ds_fmc_appd
  43. vendor/qcom/deb/proprietary/usbhub
  44. vendor/qcom/deb/proprietary/gss.b03
  45. vendor/qcom/deb/proprietary/dsps.b05
  46. vendor/qcom/deb/proprietary/dxhdcp2.b03
  47. vendor/qcom/deb/proprietary/gss.b09
  48. vendor/qcom/deb/proprietary/libmmqjpeg_codec.so
  49. vendor/qcom/deb/proprietary/libllvm-a3xx.so
  50. vendor/qcom/deb/proprietary/flp.msm8960.so
  51. vendor/qcom/deb/proprietary/gps.conf
  52. vendor/qcom/deb/proprietary/libidl.so
  53. vendor/qcom/deb/proprietary/libdrmdecrypt.so
  54. vendor/qcom/deb/proprietary/libsensor_user_cal.so
  55. vendor/qcom/deb/proprietary/libmmstillomx.so
  56. vendor/qcom/deb/proprietary/thermald
  57. vendor/qcom/deb/proprietary/tzapps.b03
  58. vendor/qcom/deb/proprietary/libril-qc-qmi-1.so
  59. vendor/qcom/deb/proprietary/gss.b02
  60. vendor/qcom/deb/proprietary/gss.b11
  61. vendor/qcom/deb/proprietary/vidc.b00
  62. vendor/qcom/deb/proprietary/keymaster.b02
  63. vendor/qcom/deb/proprietary/libRSDriver_adreno.so
  64. vendor/qcom/deb/proprietary/vidc.b01
  65. vendor/qcom/deb/proprietary/libmmcamera2_vpe_module.so
  66. vendor/qcom/deb/proprietary/libsensor_reg.so
  67. vendor/qcom/deb/proprietary/libloc_core.so
  68. vendor/qcom/deb/proprietary/keymaster.b00
  69. vendor/qcom/deb/proprietary/libdsutils.so
  70. vendor/qcom/deb/proprietary/libqmi_csvt_srvc.so
  71. vendor/qcom/deb/proprietary/ATFWD-daemon
  72. vendor/qcom/deb/proprietary/dxhdcp2.b00
  73. vendor/qcom/deb/proprietary/tzapps.mdt
  74. vendor/qcom/deb/proprietary/libI420colorconvert.so
  75. vendor/qcom/deb/proprietary/gss.b08
  76. vendor/qcom/deb/proprietary/dsps.b03
  77. vendor/qcom/deb/proprietary/gss.mdt
  78. vendor/qcom/deb/proprietary/a300_pm4.fw
  79. vendor/qcom/deb/proprietary/dsps.b01
  80. vendor/qcom/deb/proprietary/mm-qcamera-daemon
  81. vendor/qcom/deb/proprietary/eglsubAndroid.so
  82. vendor/qcom/deb/proprietary/dxhdcp2.b02
  83. vendor/qcom/deb/proprietary/libmm-color-convertor.so
  84. vendor/qcom/deb/proprietary/libGLESv2_adreno.so
  85. vendor/qcom/deb/proprietary/libmmcamera2_wnr_module.so
  86. vendor/qcom/deb/proprietary/wcnss.b04
  87. vendor/qcom/deb/proprietary/efsks
  88. vendor/qcom/deb/proprietary/libplayback_adreno.so
  89. vendor/qcom/deb/proprietary/libsc-a3xx.so
  90. vendor/qcom/deb/proprietary/btnvtool
  91. vendor/qcom/deb/proprietary/libmmcamera_image_stab.so
  92. vendor/qcom/deb/proprietary/libacdbloader.so
  93. vendor/qcom/deb/proprietary/sensors.qcom
  94. vendor/qcom/deb/proprietary/rmt_storage
  95. vendor/qcom/deb/proprietary/q6.mdt
  96. vendor/qcom/deb/proprietary/q6.b00
  97. vendor/qcom/deb/proprietary/dsps.mdt
  98. vendor/qcom/deb/proprietary/usbhub_init
  99. vendor/qcom/deb/proprietary/wcnss.mdt
  100. vendor/qcom/deb/proprietary/libmmcamera2_isp_modules.so
  101. vendor/qcom/deb/proprietary/libEGL_adreno.so
  102. vendor/qcom/deb/proprietary/libimage-jpeg-enc-omx-comp.so
  103. vendor/qcom/deb/proprietary/libDxHdcp.so
  104. vendor/qcom/deb/proprietary/wcnss.b05
  105. vendor/qcom/deb/proprietary/libc2d30.so
  106. vendor/qcom/deb/proprietary/qmuxd
  107. vendor/qcom/deb/proprietary/gss.b07
  108. vendor/qcom/deb/proprietary/q6.b03
  109. vendor/qcom/deb/proprietary/gss.b06
  110. vendor/qcom/deb/proprietary/q6.b04
  111. vendor/qcom/deb/proprietary/libqdi.so
  112. vendor/qcom/deb/proprietary/q6.b01
  113. vendor/qcom/deb/proprietary/libqomx_jpegenc.so
  114. vendor/qcom/deb/proprietary/libmmcamera2_iface_modules.so
  115. vendor/qcom/deb/proprietary/libimage-omx-common.so
  116. vendor/qcom/deb/proprietary/libmm-abl.so
  117. vendor/qcom/deb/proprietary/libmmcamera2_imglib_modules.so
  118. vendor/qcom/deb/proprietary/libmmcamera2_pproc_modules.so
  119. vendor/qcom/deb/proprietary/nl_listener
  120. vendor/qcom/deb/proprietary/libC2D2.so
  121. vendor/qcom/deb/proprietary/libril-qcril-hook-oem.so
  122. vendor/qcom/deb/proprietary/radish
  123. vendor/qcom/deb/proprietary/dxhdcp2.mdt
  124. vendor/qcom/deb/proprietary/libcsd-client.so
  125. vendor/qcom/deb/proprietary/port-bridge
  126. vendor/qcom/deb/proprietary/dsps.b02
  127. vendor/qcom/deb/proprietary/vidc.b03
  128. vendor/qcom/deb/proprietary/libqmi_cci.so
  129. vendor/qcom/deb/proprietary/libchromatix_ov5693_default_video.so
  130. vendor/qcom/deb/proprietary/libgps.utils.so
  131. vendor/qcom/deb/proprietary/q6.b06
  132. vendor/qcom/deb/proprietary/ks
  133. vendor/qcom/deb/proprietary/libqmiservices.so
  134. vendor/qcom/deb/proprietary/libloc_eng.so
  135. vendor/qcom/deb/proprietary/libaudcal.so
  136. vendor/qcom/deb/proprietary/libCommandSvc.so
  137. vendor/qcom/deb/proprietary/sensors.msm8960.so
  138. vendor/qcom/deb/proprietary/libqdp.so
  139. vendor/qcom/deb/proprietary/libqmi_encdec.so
  140. vendor/qcom/deb/proprietary/libloc_ds_api.so
  141. vendor/qcom/deb/proprietary/libchromatix_ov5693_preview.so
  142. vendor/qcom/deb/proprietary/libdiag.so
  143. vendor/qcom/deb/proprietary/libmmcamera2_cpp_module.so
  144. vendor/qcom/deb/proprietary/libmmcamera_imglib.so
  145. vendor/qcom/deb/proprietary/vidc.b02
  146. vendor/qcom/deb/proprietary/liboemcrypto.so
  147. vendor/qcom/deb/proprietary/mm-qomx-ienc-test
  148. vendor/qcom/deb/proprietary/dsps.b04
  149. vendor/qcom/deb/proprietary/libsensor1.so
  150. vendor/qcom/deb/proprietary/libconfigdb.so
  151. vendor/qcom/deb/proprietary/gss.b00
  152. vendor/qcom/deb/proprietary/libmmcamera_mi1040.so
  153. vendor/qcom/deb/proprietary/libizat_core.so
  154. vendor/qcom/deb/proprietary/libmmcamera2_sensor_modules.so
  155. vendor/qcom/deb/proprietary/hci_qcomm_init
  156. vendor/qcom/deb/proprietary/libdrmdiag.so
  157. vendor/qcom/deb/proprietary/tzapps.b00
  158. vendor/qcom/deb/proprietary/gps.msm8960.so
  159. vendor/qcom/deb/proprietary/netmgrd
  160. vendor/qcom/deb/proprietary/libmmjpeg.so
  161. vendor/qcom/deb/proprietary/libCB.so
  162. vendor/qcom/deb/proprietary/wcnss.b01
  163. vendor/qcom/deb/proprietary/qseecomd
  164. vendor/qcom/deb/proprietary/diag_klog
  165. vendor/qcom/deb/proprietary/vidc.mdt
  166. vendor/qcom/deb/proprietary/libmmcamera2_stats_modules.so
  167. vendor/qcom/deb/proprietary/gss.b01
  168. vendor/qcom/deb/proprietary/libmmipl.so
  169. vendor/qcom/deb/proprietary/libc2d30-a3xx.so
  170. vendor/qcom/deb/proprietary/libGLESv1_CM_adreno.so
  171. vendor/qcom/deb/proprietary/mm-qjpeg-enc-test
  172. vendor/qcom/deb/proprietary/libstagefright_hdcp.so
  173. vendor/qcom/deb/proprietary/libadreno_utils.so
  174. vendor/qcom/deb/proprietary/irsc_util
  175. vendor/qcom/deb/proprietary/gss.b05
  176. vendor/qcom/deb/proprietary/libdsprofile.so
  177. vendor/qcom/deb/proprietary/libmmcamera_ov5693.so
  178. vendor/qcom/deb/proprietary/wcnss.b02
  179. vendor/qcom/deb/proprietary/Android.mk
  180. vendor/qcom/deb/proprietary/libdrmfs.so
  181. vendor/qcom/deb/proprietary/liboemcamera.so
  182. vendor/qcom/deb/proprietary/gss.b10
  183. vendor/qcom/deb/proprietary/libaudioalsa.so
  184. vendor/qcom/deb/proprietary/libqcci_legacy.so
  185. vendor/qcom/deb/proprietary/libqmi_client_qmux.so
  186. vendor/qcom/deb/proprietary/keymaster.b01
  187. vendor/qcom/deb/proprietary/libmmcamera2_c2d_module.so
  188. vendor/qcom/deb/proprietary/q6.b05
  189. vendor/qcom/deb/proprietary/libdss.so
  190. vendor/qcom/deb/proprietary/librs_adreno.so
  191. vendor/qcom/deb/proprietary/tzapps.b02
  192. vendor/qcom/deb/proprietary/a300_pfp.fw
  193. vendor/qcom/deb/proprietary/tzapps.b01
  194. vendor/qcom/deb/proprietary/libQSEEComAPI.so
  195. vendor/qcom/deb/proprietary/libdsucsd.so
  196. vendor/qcom/deb/proprietary/wcnss.b00
  197. vendor/qcom/deb/proprietary/keymaster.b03
  198. vendor/qcom/deb/proprietary/libgsl.so
  199. vendor/qcom/deb/proprietary/keymaster.mdt
  200. vendor/qcom/deb/proprietary/qcks
  201. vendor/qcom/deb/proprietary/librs_adreno_sha1.so
  202. vendor/qcom/deb/proprietary/libxml.so
  203. vendor/qcom/deb/proprietary/vidc_1080p.fw
  204. vendor/qcom/deb/proprietary/dsps.b00
  205. vendor/qcom/deb/proprietary/libqmi_common_so.so
  206. vendor/qcom/deb/proprietary/libdrmtime.so
  207. vendor/qcom/deb/proprietary/mm-qcamera-app
  208. vendor/qcom/deb/proprietary/libnetmgr.so
  209. vendor/qcom/deb/proprietary/libq3dtools_adreno.so
  210. vendor/qcom/deb/proprietary/libloc_api_v02.so
  211. vendor/qcom/deb/proprietary/libdsi_netctrl.so
  212. vendor/qcom/deb/proprietary/gss.b04
  213. vendor/qcom/deb/proprietary/libgeofence.so
  214. vendor/qcom/deb/proprietary/libmmcamera2_stats_algorithm.so
  215. vendor/qcom/deb/proprietary/vidcfw.elf
  216. vendor/qcom/deb/proprietary/mpdecision
  217. vendor/qcom/deb/proprietary/libchromatix_ov5693_common.so
  218. vendor/qcom/deb/proprietary/libgemini.so
  219. vendor/qcom/deb/proprietary/libqmi_csi.so
  220. vendor/qcom/deb/BoardConfigPartial.mk
  221. vendor/asus/
  222. vendor/asus/deb/
  223. vendor/asus/deb/BoardConfigVendor.mk
  224. vendor/asus/deb/device-vendor.mk
  225. Files extracted successfully.
  226. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$
这样驱动就准备好了。

②编译源码
编译源码流程跟之前一样,只是选项不一样
  1. senrsl@senrsl-ubuntu:~$ cd android/source/WORKING_DIRECTORY/
  2. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$ source ./build/envsetup.sh
  3. including device/samsung/manta/vendorsetup.sh
  4. including device/generic/armv7-a-neon/vendorsetup.sh
  5. including device/generic/mips/vendorsetup.sh
  6. including device/generic/x86/vendorsetup.sh
  7. including device/asus/tilapia/vendorsetup.sh
  8. including device/asus/grouper/vendorsetup.sh
  9. including device/asus/flo/vendorsetup.sh
  10. including device/asus/deb/vendorsetup.sh
  11. including device/lge/hammerhead/vendorsetup.sh
  12. including device/lge/mako/vendorsetup.sh
  13. including sdk/bash_completion/adb.bash
  14. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$ lunch
  15. You're building on Linux
  16. Lunch menu... pick a combo:
  17.      1. aosp_arm-eng
  18.      2. aosp_x86-eng
  19.      3. aosp_mips-eng
  20.      4. vbox_x86-eng
  21.      5. aosp_manta-userdebug
  22.      6. mini_armv7a_neon-userdebug
  23.      7. mini_mips-userdebug
  24.      8. mini_x86-userdebug
  25.      9. aosp_tilapia-userdebug
  26.      10. aosp_grouper-userdebug
  27.      11. aosp_flo-userdebug
  28.      12. aosp_deb-userdebug
  29.      13. aosp_hammerhead-userdebug
  30.      14. aosp_mako-userdebug
  31. Which would you like? [aosp_arm-eng] 12
  32. ============================================
  33. PLATFORM_VERSION_CODENAME=REL
  34. PLATFORM_VERSION=4.4.2
  35. TARGET_PRODUCT=aosp_deb
  36. TARGET_BUILD_VARIANT=userdebug
  37. TARGET_BUILD_TYPE=release
  38. TARGET_BUILD_APPS=
  39. TARGET_ARCH=arm
  40. TARGET_ARCH_VARIANT=armv7-a-neon
  41. TARGET_CPU_VARIANT=krait
  42. HOST_ARCH=x86
  43. HOST_OS=linux
  44. HOST_OS_EXTRA=Linux-3.13.0-37-generic-x86_64-with-Ubuntu-14.04-trusty
  45. HOST_BUILD_TYPE=release
  46. BUILD_ID=KVT49L
  47. OUT_DIR=out
  48. ============================================
  49. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$ make -j16
  50. 等好久,顺便处理几个错误
  51. out/target/product/deb/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/deb/system
  52. + make_ext4fs -s -S out/target/product/deb/root/file_contexts -l 880803840 -a system out/target/product/deb/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/deb/system
  53. Creating filesystem with parameters:
  54.     Size: 880803840
  55.     Block size: 4096
  56.     Blocks per group: 32768
  57.     Inodes per group: 7680
  58.     Inode size: 256
  59.     Journal blocks: 3360
  60.     Label:
  61.     Blocks: 215040
  62.     Block groups: 7
  63.     Reserved block group size: 55
  64. Created filesystem with 1401/53760 inodes and 77285/215040 blocks
  65. + '[' 0 -ne 0 ']'
  66. Install system fs image: out/target/product/deb/system.img
  67. out/target/product/deb/system.img+out/target/product/deb/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=899137536 blocksize=135168 total=304510462 reserve=9191424
  68. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$
编译成功,查看编译结果
  1. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$ cd out/target/product/
  2. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY/out/target/product$ ll
  3. 总用量 16
  4. drwxrwxr-x  4 senrsl senrsl 4096  4月 29 13:27 ./
  5. drwxrwxr-x  4 senrsl senrsl 4096  3月 20 13:53 ../
  6. drwxrwxr-x 10 senrsl senrsl 4096  4月 29 15:48 deb/       --这个是这次编译的
  7. drwxrwxr-x 10 senrsl senrsl 4096  4月 28 20:57 generic/  --这个是之前编译的跑虚拟机的
  8. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY/out/target/product$ cd deb
  9. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY/out/target/product/deb$ ll
  10. 总用量 461344
  11. drwxrwxr-x 10 senrsl senrsl      4096  4月 29 15:48 ./
  12. drwxrwxr-x  4 senrsl senrsl      4096  4月 29 13:27 ../
  13. -rw-rw-r--  1 senrsl senrsl        26  4月 29 13:28 android-info.txt
  14. -rw-r--r--  1 senrsl senrsl   7190528  4月 29 14:06 boot.img
  15. drwxrwxr-x  2 senrsl senrsl      4096  4月 29 13:53 cache/
  16. -rw-r--r--  1 senrsl senrsl   4776084  4月 29 13:53 cache.img
  17. -rw-rw-r--  1 senrsl senrsl     42008  4月 29 15:40 clean_steps.mk
  18. drwxrwxr-x  2 senrsl senrsl      4096  4月 29 13:53 data/
  19. drwxrwxr-x  2 senrsl senrsl      4096  4月 29 15:48 fake_packages/
  20. -rw-rw-r--  1 senrsl senrsl     64997  4月 29 15:48 installed-files.txt
  21. -rw-rw-r--  1 senrsl senrsl   6689936  4月 29 13:34 kernel
  22. drwxrwxr-x 14 senrsl senrsl      4096  4月 29 15:48 obj/
  23. -rw-rw-r--  1 senrsl senrsl       725  4月 29 15:40 previous_build_config.mk
  24. -rw-rw-r--  1 senrsl senrsl    496371  4月 29 14:05 ramdisk.img
  25. -rw-rw-r--  1 senrsl senrsl   1056400  4月 29 14:06 ramdisk-recovery.img
  26. drwxrwxr-x  3 senrsl senrsl      4096  4月 29 14:06 recovery/
  27. -rw-r--r--  1 senrsl senrsl   7749632  4月 29 14:06 recovery.img
  28. drwxrwxr-x  9 senrsl senrsl      4096  4月 29 14:04 root/
  29. drwxrwxr-x  4 senrsl senrsl      4096  4月 29 13:55 symbols/
  30. drwxrwxr-x 14 senrsl senrsl      4096  4月 29 14:06 system/
  31. -rw-r--r--  1 senrsl senrsl 304103148  4月 29 15:48 system.img
  32. -rw-r--r--  1 senrsl senrsl 140175980  4月 29 13:53 userdata.img
  33. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY/out/target/product/deb$
确认镜像文件OK。

3,烧写
①进刷机模式
  1. senrsl@senrsl-ubuntu:~$ adb devices
  2. List of devices attached
  3. 09e16671    device
  4. senrsl@senrsl-ubuntu:~$ adb reboot bootloader
  5. senrsl@senrsl-ubuntu:~$
设备就进入了fastboot页面
进入fastboot模式的话关机时候按电源和音量下也行。
这里是fastboot mode:


②设备解锁
fastboot mode底部显示LOCK STATE - locked,说明bootloader已经被锁定,输入命令
  1. senrsl@senrsl-ubuntu:~$ fastboot oem unlock
  2. ...
  3. (bootloader) Unlocking bootloader...
  4. (bootloader) erasing userdata...
  5. (bootloader) erasing userdata done
  6. (bootloader) erasing cache...
  7. (bootloader) erasing cache done
  8. (bootloader) Unlocking bootloader done!
  9. OKAY [ 53.912s]
  10. finished. total time: 53.932s
输入命令后界面会弹出选择框

解锁成功后,最下面变成LOCK STATE -unlocked,表示解锁成功。

③执行刷机
  1. senrsl@senrsl-ubuntu:~$ export ANDROID_PRODUCT_OUT=/home/senrsl/android/source/WORKING_DIRECTORY/out/target/product/deb
  2. senrsl@senrsl-ubuntu:~$ fastboot -w flashall
  3. Creating filesystem with parameters:
  4.     Size: 28856791040
  5.     Block size: 4096
  6.     Blocks per group: 32768
  7.     Inodes per group: 8192
  8.     Inode size: 256
  9.     Journal blocks: 32768
  10.     Label:
  11.     Blocks: 7045115
  12.     Block groups: 215
  13.     Reserved block group size: 1024
  14. Created filesystem with 11/1761280 inodes and 154578/7045115 blocks
  15. Creating filesystem with parameters:
  16.     Size: 587202560
  17.     Block size: 4096
  18.     Blocks per group: 32768
  19.     Inodes per group: 7168
  20.     Inode size: 256
  21.     Journal blocks: 2240
  22.     Label:
  23.     Blocks: 143360
  24.     Block groups: 5
  25.     Reserved block group size: 39
  26. Created filesystem with 11/35840 inodes and 4616/143360 blocks
  27. --------------------------------------------
  28. Bootloader Version...: FLO-04.02
  29. Baseband Version.....: DEB-G00_2.37.0_1024
  30. Serial Number........: 09e16671
  31. --------------------------------------------
  32. checking product...
  33. OKAY [  0.003s]
  34. sending 'boot' (7022 KB)...
  35. OKAY [  0.227s]
  36. writing 'boot'...
  37. OKAY [  0.270s]
  38. sending 'recovery' (7568 KB)...
  39. OKAY [  0.244s]
  40. writing 'recovery'...
  41. OKAY [  0.291s]
  42. erasing 'system'...
  43. OKAY [  1.296s]
  44. sending 'system' (296975 KB)...
  45. OKAY [  9.306s]
  46. writing 'system'...
  47. OKAY [ 13.760s]
  48. erasing 'userdata'...
  49. OKAY [ 22.974s]
  50. sending 'userdata' (139085 KB)...
  51. OKAY [  4.362s]
  52. writing 'userdata'...
  53. OKAY [  6.871s]
  54. erasing 'cache'...
  55. OKAY [  0.347s]
  56. sending 'cache' (10984 KB)...
  57. OKAY [  0.351s]
  58. writing 'cache'...
  59. OKAY [  0.504s]
  60. rebooting...
  61. finished. total time: 61.026s
  62. senrsl@senrsl-ubuntu:~$
刷机完成,自动重启,搞定!


4,报错
一,make -j16报错

①Copy xml: out/target/product/deb/system/etc/mixer_paths.xml /bin/bash: xmllint: 未找到命令
解决:安上sudo apt-get install libxml2-utils

②external/chromium_org/content/common/android/hash_set.cc:30:1: error: expected '}' at end of input
错误代码
  1. out/target/product/deb/obj/GYP/shared_intermediates/content/jni/HashSet_jni.h:29:22: error: expected unqualified-id before '<' token
  2. external/chromium_org/content/common/android/hash_set.cc:30:1: error: expected '}' at end of input
  3. cc1plus: all warnings being treated as errors
  4. make: *** [out/target/product/deb/obj/STATIC_LIBRARIES/content_content_common_gyp_intermediates/content/common/android/hash_set.o] 错误 1
  5. make: *** 正在等待未完成的任务....
  6. make: *** wait: 没有子进程。 停止。

解决:修改文件
  1. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$ gedit external/chromium_org/base/android/jni_generator/jni_generator.py
第504行,之前是这样
  1.  p = subprocess.Popen(args=['javap', class_name],
修改成这样
  1. p = subprocess.Popen(args=['~/java/jdk1.6.0_45/bin/javap', class_name],
事实证明javap的路径不能那么写,写成上面那样会报这个错误
  1. OSError  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
  2. : [Errno 2] No such file or directory
  3.     errread, errwrite)
  4.   File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
  5.     raise child_exception
  6. OSError: [Errno 2] No such file or directory
  7. make: *** [out/target/product/deb/obj/GYP/shared_intermediates/android_webview/jni/CancellationSignal_jni.h] 错误 1
  8. make: *** 正在等待未完成的任务....
  9. make: *** [out/target/product/deb/obj/GYP/shared_intermediates/ui/gl/jni/Surface_jni.h] 错误 1
  10. make: *** [out/target/product/deb/obj/GYP/shared_intermediates/android_webview/jni/InputStream_jni.h] 错误 1
写成这样就好了
  1. p = subprocess.Popen(args=['/home/senrsl/java/jdk1.6.0_45/bin/javap', class_name],
二,烧写报错
①设备找不到
进了fastboot之后,就找不到设备了,提示没权限,这个问题跟手机adb devices是一样的。
  1. senrsl@senrsl-ubuntu:~$ fastboot devices
  2. no permissions    fastboot
  3. senrsl@senrsl-ubuntu:~$ sudo fastboot devices
  4. [sudo] password for senrsl:
  5. sudo:fastboot: command not found
  6. senrsl@senrsl-ubuntu:~$ lsusb
  7. Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
  8. Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  9. Bus 001 Device 004: ID 1e4e:0110 Cubeternet
  10. Bus 001 Device 013: ID 18d1:4ee0 Google Inc.
  11. Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
  12. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  13. Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
  14. Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  15. senrsl@senrsl-ubuntu:~$ sudo gedit /etc/udev/rules.d/senrslMobile.rules
  16. senrsl@senrsl-ubuntu:~$ sudo chmod a+rx /etc/udev/rules.d/senrslMobile.rules
  17. senrsl@senrsl-ubuntu:~$ sudo service udev restart
  18. udev stop/waiting
  19. udev start/running, process 6939
  20. 把USB拔下来,再插上
  21. senrsl@senrsl-ubuntu:~$ fastboot devices
  22. 09e16671    fastboot
  23. senrsl@senrsl-ubuntu:~$
senrslMobile.rules内容
  1. #XiaoMi 1S
  2. SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="9025",MODE="0666"
  3. #Taidian P75HD
  4. SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="0002",MODE="0666"
  5. #Nexus7
  6. SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee0",MODE="0666"
②找不到要烧写的路径
错误:
  1. senrsl@senrsl-ubuntu:~$ fastboot flashall -w
  2. error: neither -p product specified nor ANDROID_PRODUCT_OUT set
解决
  1. senrsl@senrsl-ubuntu:~$ fastboot flashall -w -p /home/senrsl/android/source/WORKING_DIRECTORY/out/target/product/deb
或者
  1. senrsl@senrsl-ubuntu:~$ export ANDROID_PRODUCT_OUT=/home/senrsl/android/source/WORKING_DIRECTORY/out/target/product/deb
③找不到android-info.txt
错误
senrsl@senrsl-ubuntu:~$ fastboot flashall -w -p /home/senrsl/android/source/WORKING_DIRECTORY/out/target/product/deb
error: could not load android-info.txt: No such file or directory
解决
用 上面第二个export 环境变量的方法就好了。

5,后续
启动后连接不上设备了,报问号没权限
  1. senrsl@senrsl-ubuntu:~$ adb devices
  2. List of devices attached
  3. ????????????    no permissions
无聊的问题,跟上面一样的步骤,更改配置文件
senrslMobile.rules
#XiaoMi 1S
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="9025",MODE="0666"
#Taidian P75HD
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="0002",MODE="0666"
#Nexus7 fastboot
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee0",MODE="0666"
#Nexus7 adb
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="d002",MODE="0666"
就好了。。。。

源码编译出来的真干净。。。。。

然后


搞定!
2015年04月29日16:50:55
--
senRsl
2015年04月29日16:36:27

没有评论 :

发表评论