Host  Linux/64bit x86-64  Ubutu or RHEL7.x 


1. set git proxy 

lake@localhost:~/Google/android-8.1.0_r1_OPM1.171019.011$ git config  --global  -l 
user.email=lake.hu@outlook.com
user.name=Lake
core.editor=vim
color.ui=auto
alias.logall=log --graph  --pretty=oneline  --all    --abbrev-commit    --decorate
alias.lg=log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
push.default=matching
https.proxy=10.24.1.1:8080

http.proxy=10.24.1.1:8080

or

try Mirror from https://aosp.tuna.tsinghua.edu.cn/


2. repo sync


curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
  chmod a+x ~/bin/repo
  repo init -u https://android.googlesource.com/platform/manifest -b  android-8.1.0_r1
  repo  sync  -j32 
 

3. JDK8

Make sure your java/javac is new version 1.8

lake@localhost:~/Google/android-8.1.0_r1_OPM1.171019.011$ java -version 
openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)
lake@localhost:~/Google/android-8.1.0_r1_OPM1.171019.011$ javac -version 
javac 1.8.0_65
lake@localhost:~/Google/android-8.1.0_r1_OPM1.171019.011$ 


4.  Build 


lake@localhost:~/Google/android-8.1.0_r1_OPM1.171019.011$  source  build/envsetup.sh 
lake@localhost:~/Google/android-8.1.0_r1_OPM1.171019.011$   lunch   

Lunch menu... pick a combo:
     1. aosp_arm-eng   <<<<<<<< ARM 32 bit 

     2. aosp_arm64-eng  <<<<<<<< ARM 64 bit 


  make  -j32



5. Try emulator  

lake@localhost:~/Google/android-8.1.0_r1_OPM1.171019.011$  which emulator 
/home/lake/Google/android-8.1.0_r1_OPM1.171019.011/prebuilts/android-emulator/linux-x86_64/emulator
lake@localhost:~/Google/android-8.1.0_r1_OPM1.171019.011$ which adb 
/home/lake/Google/android-8.1.0_r1_OPM1.171019.011/out/host/linux-x86/bin/adb

lake@localhost:~/Google/android-8.1.0_r1_OPM1.171019.011$ 

6. lake@localhost:~/Google/android-8.1.0_r1_OPM1.171019.011$ emulator

Wait for Android GUI  .........  > 10 minutes 


7. Check through adb 

lake@localhost:~/Google/android-8.1.0_r1_OPM1.171019.011$ adb  shell
generic:/ # cat  /proc/version 
cLinux version 3.18.74+ (android-build@wpiv11.hot.corp.google.com) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Thu Oct 12 17:14:21 UTC 2017
generic:/ # cat /proc/cmdline 
qemu=1 androidboot.hardware=ranchu keep_bootcon earlyprintk=ttyAMA0 android.qemud=1 console=0 android.checkjni=1 qemu.gles=1 qemu.opengles.version=196608 cma=262M ndns=2 ramoops.mem_address=0xff018000 ramoops.mem_size=0x10000 memmap=0x10000$0xff018000 ndns=2
generic:/ # 
generic:/ # 
generic:/ # getprop  |grep vers
[gsm.version.ril-impl]: [android reference-ril 1.0]
[ro.build.version.all_codenames]: [REL]
[ro.build.version.base_os]: []
[ro.build.version.codename]: [REL]
[ro.build.version.incremental]: [eng.lake.20180620.003212]
[ro.build.version.preview_sdk]: [0]
[ro.build.version.release]: [8.1.0]
[ro.build.version.sdk]: [27]
[ro.build.version.security_patch]: [2017-12-05]
[ro.kernel.qemu.opengles.version]: [196608]
[ro.property_service.version]: [2]
generic:/ # 
generic:/ # 
generic:/ # getprop  |grep build                                                                                                     
[ro.bootimage.build.date]: [Wed Jun 20 00:32:12 EDT 2018]
[ro.bootimage.build.date.utc]: [1529469132]
[ro.bootimage.build.fingerprint]: [Android/aosp_arm/generic:8.1.0/OPM1.171019.011/lake06200032:eng/test-keys]
[ro.build.characteristics]: [emulator]
[ro.build.date]: [Wed Jun 20 00:32:12 EDT 2018]
[ro.build.date.utc]: [1529469132]
[ro.build.description]: [aosp_arm-eng 8.1.0 OPM1.171019.011 eng.lake.20180620.003212 test-keys]
[ro.build.display.id]: [aosp_arm-eng 8.1.0 OPM1.171019.011 eng.lake.20180620.003212 test-keys]
[ro.build.fingerprint]: [Android/aosp_arm/generic:8.1.0/OPM1.171019.011/lake06200032:eng/test-keys]
[ro.build.flavor]: [aosp_arm-eng]
[ro.build.host]: [localhost.localdomain]
[ro.build.id]: [OPM1.171019.011]
[ro.build.product]: [generic]
[ro.build.tags]: [test-keys]
[ro.build.type]: [eng]
[ro.build.user]: [lake]
[ro.build.version.all_codenames]: [REL]
[ro.build.version.base_os]: []
[ro.build.version.codename]: [REL]
[ro.build.version.incremental]: [eng.lake.20180620.003212]
[ro.build.version.preview_sdk]: [0]
[ro.build.version.release]: [8.1.0]
[ro.build.version.sdk]: [27]
[ro.build.version.security_patch]: [2017-12-05]
[ro.vendor.build.date]: [Wed Jun 20 00:32:12 EDT 2018]
[ro.vendor.build.date.utc]: [1529469132]
[ro.vendor.build.fingerprint]: [Android/aosp_arm/generic:8.1.0/OPM1.171019.011/lake06200032:eng/test-keys]
generic:/ # 



更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. 【代码】Android: 怎样设置app不被系统k
  2. android drawable 属性描述
  3. 最新版本(OpenSSL1.0.1e)libssl.so, libc
  4. Android中显示Dialog的方法
  5. 关于Android 打开新的Activity 虚拟键盘
  6. android studio异常关机后出现的问题
  7. AppBarLayout 介绍和简单使用
  8. Android 系统字体
  9. Android studio在Android 6.0下继续使用A
  10. TextView 中文文档