東川印記

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

ubuntu14.04x64在thinkpad-T540p

2015年11月24日星期二



1,vpn之增加L2TP方式
ubuntu自带pptp,然后给他安个支持l2tp
  1. ①添加软件源
  2. senrsl@senrsl-T540p:~$ sudo apt-add-repository ppa:seriy-pr/network-manager-l2tp
  3. [sudo] password for senrsl:
  4.  Packages for https://github.com/seriyps/NetworkManager-l2tp
  5. Screenshot: http://dl.seriyps.ru/img/network-manager-l2tp.png
  6. Full description (in russian) http://seriyps.ru/blog/2012/01/31/plagin-l2tp-dlya-networkmanager/
  7. Installation:
  8. sudo apt-add-repository ppa:seriy-pr/network-manager-l2tp
  9. sudo apt-get update
  10. sudo apt-get install network-manager-l2tp-gnome
  11. !!!!!!!!!!!!!!!!!!
  12. sudo service xl2tpd stop
  13. sudo update-rc.d xl2tpd disable
  14. !!!!!!!!!!!!!!!!!!
  15.  更多信息: https://launchpad.net/~seriy-pr/+archive/ubuntu/network-manager-l2tp
  16. 按回车继续或者 Ctrl+c 取消添加
  17. gpg: 钥匙环'/tmp/tmpzpodxcos/secring.gpg'已建立
  18. gpg: 钥匙环'/tmp/tmpzpodxcos/pubring.gpg'已建立
  19. gpg: 下载密钥'B11E44D2',从 hkp 服务器 keyserver.ubuntu.com
  20. gpg: /tmp/tmpzpodxcos/trustdb.gpg:建立了信任度数据库
  21. gpg: 密钥 B11E44D2:公钥"Launchpad PPA for Sergey Prochorov"已导入
  22. gpg: 合计被处理的数量:1
  23. gpg:               已导入:1  (RSA: 1)
  24. OK
  25. ②更新缓存
  26. senrsl@senrsl-T540p:~$ sudo apt-get update
  27. 忽略 http://archive.ubuntu.com trusty InRelease                               
  28. 忽略 http://ppa.launchpad.net trusty InRelease
  29. 命中 http://archive.ubuntu.com trusty Release.gpg
  30. 获取:1 http://ppa.launchpad.net trusty Release.gpg [316 B]
  31. 命中 http://archive.ubuntu.com trusty Release           
  32. 获取:2 http://ppa.launchpad.net trusty Release [14.0 kB]
  33. 命中 http://archive.ubuntu.com trusty/universe Sources   
  34. 获取:3 http://ppa.launchpad.net trusty/main amd64 Packages [1,097 B]
  35. 命中 http://archive.ubuntu.com trusty/main Sources                            
  36. 获取:4 http://ppa.launchpad.net trusty/main i386 Packages [1,093 B]
  37. 命中 http://archive.ubuntu.com trusty/multiverse Sources            
  38. 命中 http://archive.ubuntu.com trusty/restricted Sources      
  39. 命中 http://archive.ubuntu.com trusty/main amd64 Packages      
  40. 命中 http://archive.ubuntu.com trusty/universe amd64 Packages    
  41. 命中 http://archive.ubuntu.com trusty/restricted amd64 Packages 
  42. 命中 http://archive.ubuntu.com trusty/multiverse amd64 Packages 
  43. 命中 http://archive.ubuntu.com trusty/main i386 Packages       
  44. 命中 http://archive.ubuntu.com trusty/universe i386 Packages     
  45. 命中 http://archive.ubuntu.com trusty/restricted i386 Packages  
  46. 命中 http://archive.ubuntu.com trusty/multiverse i386 Packages                
  47. 命中 http://archive.ubuntu.com trusty/main Translation-zh_CN                  
  48. 命中 http://archive.ubuntu.com trusty/main Translation-en                     
  49. 命中 http://archive.ubuntu.com trusty/multiverse Translation-zh_CN            
  50. 忽略 http://ppa.launchpad.net trusty/main Translation-zh_CN                   
  51. 忽略 http://ppa.launchpad.net trusty/main Translation-zh                      
  52. 忽略 http://ppa.launchpad.net trusty/main Translation-en                      
  53. 命中 http://archive.ubuntu.com trusty/multiverse Translation-en               
  54. 命中 http://archive.ubuntu.com trusty/restricted Translation-zh_CN            
  55. 命中 http://archive.ubuntu.com trusty/restricted Translation-en               
  56. 命中 http://archive.ubuntu.com trusty/universe Translation-zh_CN              
  57. 命中 http://archive.ubuntu.com trusty/universe Translation-en                 
  58. 忽略 http://archive.ubuntu.com trusty/main Translation-zh                     
  59. 忽略 http://archive.ubuntu.com trusty/multiverse Translation-zh               
  60. 忽略 http://archive.ubuntu.com trusty/restricted Translation-zh               
  61. 忽略 http://archive.ubuntu.com trusty/universe Translation-zh                 
  62. 下载 16.6 kB,耗时 18秒 (895 B/s)                                             
  63. 正在读取软件包列表... 完成
  64. ③安装
  65. senrsl@senrsl-T540p:~$ sudo apt-get install network-manager-l2tp  
  66. 正在读取软件包列表... 完成
  67. 正在分析软件包的依赖关系树      
  68. 正在读取状态信息... 完成      
  69. 将会安装下列额外的软件包:
  70.   network-manager-l2tp-gnome openswan xl2tpd
  71. 建议安装的软件包:
  72.   openswan-modules-source openswan-modules-dkms openswan-doc
  73. 下列【新】软件包将被安装:
  74.   network-manager-l2tp network-manager-l2tp-gnome openswan xl2tpd
  75. 升级了 0 个软件包,新安装了 4 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
  76. 需要下载 76.9 kB/1,353 kB 的软件包。
  77. 解压缩后会消耗掉 4,141 kB 的额外空间。
  78. 您希望继续执行吗? [Y/n] Y
  79. 获取:1 http://ppa.launchpad.net/seriy-pr/network-manager-l2tp/ubuntu/ trusty/main network-manager-l2tp amd64 0.9.8.5-0trusty1 [20.1 kB]
  80. 获取:2 http://ppa.launchpad.net/seriy-pr/network-manager-l2tp/ubuntu/ trusty/main network-manager-l2tp-gnome amd64 0.9.8.5-0trusty1 [56.8 kB]
  81. 下载 76.9 kB,耗时 2秒 (33.6 kB/s)                   
  82. 正在预设定软件包 ...
  83. 正在选中未选择的软件包 openswan。
  84. (正在读取数据库 ... 系统当前共安装有 202845 个文件和目录。)
  85. 正准备解包 .../openswan_1%3a2.6.38-1_amd64.deb  ...
  86. 正在解包 openswan (1:2.6.38-1) ...
  87. 正在选中未选择的软件包 xl2tpd。
  88. 正准备解包 .../xl2tpd_1.3.6+dfsg-1_amd64.deb  ...
  89. 正在解包 xl2tpd (1.3.6+dfsg-1) ...
  90. 正在选中未选择的软件包 network-manager-l2tp。
  91. 正准备解包 .../network-manager-l2tp_0.9.8.5-0trusty1_amd64.deb  ...
  92. 正在解包 network-manager-l2tp (0.9.8.5-0trusty1) ...
  93. 正在选中未选择的软件包 network-manager-l2tp-gnome。
  94. 正准备解包 .../network-manager-l2tp-gnome_0.9.8.5-0trusty1_amd64.deb  ...
  95. 正在解包 network-manager-l2tp-gnome (0.9.8.5-0trusty1) ...
  96. 正在处理用于 man-db (2.6.7.1-1ubuntu1) 的触发器 ...
  97. 正在处理用于 ureadahead (0.100.0-16) 的触发器 ...
  98. 正在设置 openswan (1:2.6.38-1) ...
  99. ipsec_setup: Stopping Openswan IPsec...
  100. ipsec_setup: stop ordered, but IPsec appears to be already stopped!
  101. ipsec_setup: doing cleanup anyway...
  102. ipsec_setup: Starting Openswan IPsec U2.6.38/K3.19.0-28-generic...
  103. 正在设置 xl2tpd (1.3.6+dfsg-1) ...
  104. Starting xl2tpd: xl2tpd.
  105. 正在设置 network-manager-l2tp (0.9.8.5-0trusty1) ...
  106. 正在设置 network-manager-l2tp-gnome (0.9.8.5-0trusty1) ...
  107. ④停止并禁用xl2tpd
  108. senrsl@senrsl-T540p:~$ sudo service xl2tpd stop sudo update-rc.d xl2tpd disable
  109. Stopping xl2tpd: xl2tpd.
  110. senrsl@senrsl-T540p:~$
然后这时候配置VPN的时候就有L2TP选项了



2,编译安装ubuntu14.04x64版SoftEtherVPN试试

①fork下载https://github.com/senRsl/SoftEtherVPN

②流程
  1. $ cd SoftEtherVPN
  2. $ ./configure
  3. $ make
  4. $ make install

③make的时候会报错,各种找不到
说明依赖环境没配好
需要的依赖
  1. You need to install the following software to build SoftEther VPN for UNIX.
  2.  
  3. - Linux, FreeBSD, Solaris or Mac OS X.
  4. - GNU Compiler Collectipon (gcc) and binary utilities.
  5. - GNU Make (gmake).
  6. - GNU C Library (glibc).
  7. - POSIX Threads (pthread).
  8. - OpenSSL (crypto, ssl).
  9. - libiconv.
  10. - readline.
  11. - ncurses.
安装依赖
  1. sudo apt-get install libreadline-dev
  2. sudo aptitude  install libssl-dev
  3. sudo apt-get install libiconv-hook-dev
  4. sudo apt-get install libncurses5-dev
大概就是这样子,然后安装运行

④运行
安装完后,找了一遭,在这
  1. senrsl@senrsl-T540p:~/tools/SoftEtherVPN$ ll /usr/bin/vpn*
  2. -rwxr-xr-x 1 root root 48 10月 19 19:13 /usr/bin/vpnbridge*
  3. -rwxr-xr-x 1 root root 48 10月 19 19:13 /usr/bin/vpnclient*
  4. -rwxr-xr-x 1 root root 42 10月 19 19:13 /usr/bin/vpncmd*
  5. -rwxr-xr-x 1 root root 48 10月 19 19:13 /usr/bin/vpnserver*
第一次可以启动,但是后面再启动报错
  1. senrsl@senrsl-T540p:~$ vpnclient start
  2. -- Alert: SoftEther VPN Kernel --
  3. Fatal Error: The file "hamcore.se2" is missing or broken.
  4. Please check hamcore.se2.
  5. (First, reboot the computer. If this problem occurs again, please reinstall VPN software files.)
然后。。。。我屮,原来是要加权限
  1. senrsl@senrsl-T540p:~$ sudo vpnclient start
  2. [sudo] password for senrsl:
  3. The SoftEther VPN Client service has been started.
  4. senrsl@senrsl-T540p:~$
⑤番外
都启动起来
  1. senrsl@senrsl-T540p:~$ sudo vpnbridge start
  2. The SoftEther VPN Bridge service has been started.
  3. senrsl@senrsl-T540p:~$ sudo vpnserver start
  4. The SoftEther VPN Server service has been started.
  5. senrsl@senrsl-T540p:~$ sudo vpnclient start
  6. The SoftEther VPN Client service has been started
但是有毛用。。。。

不知道怎么用。。。。



3,github clone报 Permission denied (publickey).
查了好多解决方案,然后通过在github后台加publickey解决

查看本地ssl配置没有问题
  1. senrsl@senrsl-T540p:~/tools$ ssh-add -l
  2. 2048 df:a4:b8:7f:26:f3:5e:23:f2:81:75:**:cc:**:**:** senrsl@senrsl-T540p (RSA)
但是报这个
  1. senrsl@senrsl-T540p:~/tools$ git clone git@github.com:senRsl/SoftEtherVPN.git
  2. 正克隆到 'SoftEtherVPN'...
  3. Permission denied (publickey).
  4. fatal: Could not read from remote repository.
  5. Please make sure you have the correct access rights
  6. and the repository exists.

然后把public key加到后台去
  1. https://github.com/settings/ssh
就能下了
  1. senrsl@senrsl-T540p:~/tools$ git clone git@github.com:senRsl/SoftEtherVPN.git
  2. 正克隆到 'SoftEtherVPN'...
  3. remote: Counting objects: 13454, done.
  4. ....
用了这么多年github,这问题真是新鲜(好像一直用的https之前。。。。)。。。。

4,git clone代码莫名其妙消失

上面那个问题之前用https也可以,但是代码会莫名其妙消失,希望ssh方式不要消失。。。。

5,ubuntu14.04x64配置openvpn

安装openvpn
sudo apt-get -y install network-manager-openvpn
sudo NetworkManager restart

然后增加vpn的界面下面会有openvpn选项




使用easy rsa生成证书
  1. root@senrsl-T540p:/usr/share/easy-rsa# history
  2.     1  ./build-ca
  3.     2  ll
  4.     3  rm vars~
  5.     4  ll
  6.     5  source ./vars
  7.     6  ./clean-all
  8.     7  ./build-ca
  9.     8  ll keys/
  10.     9  cp keys/ca.crt ~senrsl/test/openvpn/
  11.    10  ./build-key-server SENRSL
  12.    11  ll keys/
  13.    12  ./build-dh
  14.    13  ll keys
  15.    14  cp keys/SENRSL.crt keys/SENRSL.key keys/dh2048.pem ~senrsl/test/openvpn/crt/Server/
  16.    15  ./build-key SENRSL
  17.    16  ./build-key senRsl_client
  18.    17  ll keys/
  19.    18  cp keys/senRsl_client.* ~senrsl/test/openvpn/crt/Client/
  20.    19  hisotry
  21.    20  history
  22. root@senrsl-T540p:/usr/share/easy-rsa#

然并卵


6,win Server2003搭建VPN Server

找到一个HK的服务器,再上面搭个VPN来下载。

恩,搭建直接用Server自带的管理工具里的路由什么的就OK,然后记得勾上PPTP什么的,ubuntu就能连接了。


7,ubuntu14.04x64VPN断线重连脚本
最终还是买了个VPN,240大洋。。。。

VPN会掉线,来个自动重连脚本
  1. senrsl@senrsl-T540p:~/test/vpn$ cat reconnect.sh
  2. #!/bin/bash
  3. user=senrsl #替换用户名
  4. vpnuuid=08ee8704-f0c2-49a2-aa80-7cf8be4b0f63 #替换UUID
  5. while true
  6. do
  7.     if  [[ "$(nmcli con status|grep $vpnuuid)" == "" ]]; then
  8.         echo "Disconnected, trying to reconnect..."
  9.         sleep 1s
  10.         su $user -c "nmcli con up uuid $vpnuuid"
  11.     else
  12.         echo "Already connected !"
  13.     fi
  14.     sleep 10
  15. done
  16. #查看UUID
  17. #senrsl@senrsl-T540p:~$ nmcli con list
  18. #名称                      UUID                                   类型              真实时间戳                       
  19. #云梯港1                   08ee8704-f0c2-49a2-aa80-7cf8be4b0f63   vpn               2015年10月21日 星期三 17时28分50秒
  20. #启动脚本
  21. #senrsl@senrsl-T540p:~/test/vpn$ sudo su
  22. #[sudo] password for senrsl:
  23. #root@senrsl-T540p:/home/senrsl/test/vpn# ./reconnect.sh
  24. #Disconnected, trying to reconnect...
  25. #Already connected !
  26. senrsl@senrsl-T540p:~/test/vpn$
10秒循环监听。。。。

2015年10月23日16:04:45改以下
  1. #!/bin/bash
  2. user=senrsl #替换用户名
  3. vpnuuid=935ff099-c8a4-4909-a29e-88f5bb282e22 #替换UUID
  4. while true
  5. do
  6.     if  [[ "$(nmcli con status|grep $vpnuuid)" == "" ]]; then
  7.         echo "Disconnected, trying to reconnect..."
  8.         sleep 1s
  9.         su $user -c "nmcli con up uuid $vpnuuid"
  10.     else
  11.         echo "already connected" `date`
  12.     fi
  13.     sleep 10
  14. done
  15. #查看UUID
  16. #senrsl@senrsl-T540p:~$ nmcli con list
  17. #名称                      UUID                                   类型              真实时间戳                       
  18. #云梯港1                   08ee8704-f0c2-49a2-aa80-7cf8be4b0f63   vpn               2015年10月21日 星期三 17时28分50秒
  19. #启动脚本
  20. #senrsl@senrsl-T540p:~/test/vpn$ sudo su
  21. #[sudo] password for senrsl:
  22. #root@senrsl-T540p:/home/senrsl/test/vpn# ./reconnect.sh
  23. #Disconnected, trying to reconnect...
  24. #Already connected !


8,使用iftop实时监测网络流量

linux下监测网络流量的工具有很多
选用iftop
  1. senrsl@senrsl-T540p:~$ sudo apt-get install iftop
  2. senrsl@senrsl-T540p:~$ sudo iftop -n
  3. interface: eth0
  4. IP address is: 192.168.21.2
  5. MAC address is: 54:ee:75:58:4b:05
然后就进入iftop的页面


虽然看不懂,但是感觉很厉害的样子。。。。

测试起来还是任务管理器里的比较准

另外可以使用mtr命令来看丢包

9,Failed to connect to android.googlesource.com port 443: Network is unreachable

下载android源码,下到100.1G的时候一直网络不可达。。。。


百思不得其解,明明挂VPN了好伐。。。。。
为什么挂了VPN还网络不可达。。。。

挂了一天看一个没多下,一直是91715.。。。。

然后晚上2015年11月02日20:53:42,翻了翻以前的记录。。。。

加上了
  1. # download android source
  2. 74.125.71.82 www.googlesource.com
  3. 74.125.71.82 android.googlesource.com
  4. 203.208.46.172 cache.pack.google.com
  5. 59.24.3.173 cache.pack.google.com
这么四句。。。。。突然就有速度了。。。。

然后立马变成91718了。。。。
然后ping一下地址
  1. senrsl@senrsl-T540p:~$ ping 74.125.71.82
  2. PING 74.125.71.82 (74.125.71.82) 56(84) bytes of data.
  3. 64 bytes from 74.125.71.82: icmp_seq=1 ttl=40 time=388 ms
  4. 64 bytes from 74.125.71.82: icmp_seq=2 ttl=40 time=402 ms
  5. ^Z
  6. [1]+  已停止               ping 74.125.71.82
  7. senrsl@senrsl-T540p:~$ ping 203.208.46.172
  8. PING 203.208.46.172 (203.208.46.172) 56(84) bytes of data.
  9. ^Z
  10. [2]+  已停止               ping 203.208.46.172
  11. senrsl@senrsl-T540p:~$ ping 59.24.3.173
  12. PING 59.24.3.173 (59.24.3.173) 56(84) bytes of data.
  13. ^Z
  14. [3]+  已停止               ping 59.24.3.173
  15. senrsl@senrsl-T540p:~$
后面那俩压根ping不通的。。。。。

这也行。。。。。

10,源码体积已达125G
2015年11月04日10:43:38终于下完了


体积也一年大过一年
  1. senrsl@senrsl-T540p:~/android/source$ du -h --max-depth=1
  2. 122G    ./WORKING_DIRECTORY
  3. 4.0K    ./BW
  4. 3.1G    ./kernel
  5. 170M    ./test
  6. 32K    ./bin
  7. 125G    .
  8. senrsl@senrsl-T540p:~/android/source$
repo 120G.....
  1. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ du -h --max-depth=1
  2. 46M    ./libcore
  3. 224M    ./cts
  4. 1.2G    ./frameworks
  5. 9.1M    ./docs
  6. 113G    ./.repo
  7. 52M    ./hardware
  8. 124M    ./device
  9. 896K    ./pdk
  10. 359M    ./packages
  11. 11M    ./build
  12. 128K    ./abi
  13. 40M    ./dalvik
  14. 118M    ./development
  15. 4.2G    ./prebuilts
  16. 2.7G    ./external
  17. 18M    ./bionic
  18. 13M    ./art
  19. 12M    ./system
  20. 18M    ./developers
  21. 33M    ./sdk
  22. 220K    ./libnativehelper
  23. 77M    ./ndk
  24. 230M    ./tools
  25. 4.4M    ./bootable
  26. 122G    .
  27. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$
还真是越变越大哈。。。。



11,使用ubuntu14.04.3x64编译android4.4.2源码
每次编译都有各种问题
配置缓存
  1. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ export USE_CCACHE=1
  2. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ mkdir ../.ccache
  3. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ export CCACHE_DIR=~/android/source/.ccache
  4. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ prebuilts/misc/linux-x86/ccache/ccache -M 50G
  5. Set cache size limit to 52428800k
  6. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$  watch -n1 -d prebuilts/misc/linux-x86/ccache/ccache -s
安装依赖
  1.  1233  sudo apt-get install bison
  2.  1235  sudo apt-get install g++-multilib
  3.  1236  sudo apt-get install git
  4.  1237  sudo apt-get install gperf
  5.  1238  sudo apt-get install libxml2-utils
  6.  1239  sudo apt-get install make
  7.  1240  sudo apt-get install python-networkx
  8.  1241  sudo apt-get install zlib1g-dev:i386
  9.  1242  sudo apt-get install zip
  10.  1243  sudo apt-get autoremove
  11.  1244  sudo apt-get install zip
  12.  1245  sudo apt-get install zlib1g-dev:i386
  13.  1246  sudo apt-get install python-networkx
  14.  1247  sudo apt-get install make
  15.  1248  sudo apt-get install libxml2-utils
  16.  1249  sudo apt-get install gperf
  17.  1250  sudo apt-get install git
  18.  1251  sudo apt-get install g++-multilib
  19.  1252  sudo apt-get install bison
那个i386跟g++冲突,正着安一遍,反着验证一遍

继续安依赖
senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ sudo apt-get install flex

编译通过,而且就吃顿饭的功夫。。。。。好快



12,刷入nexus7

刷完开不了机,这才想起来时没加驱动。。。。
翻翻以前的文章
烧源码http://senrsl.blogspot.jp/2015/04/android09nexus701.html
烧内核http://senrsl.blogspot.jp/2015/05/android09nexus702.html
goto 14

13,同步所有代码
想要make sdk
还是找以前的帖子http://senrsl.blogspot.jp/2015/08/android10.html
down完上面那个make sdk会报tools/base找不到,是因为默认代码不全。

使用
  1. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ repo init -g all
  2. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ repo sync
然后同步完成


这时查看大小
  1. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ du -h --max-depth=1
  2. 23G    ./out
  3. 46M    ./libcore
  4. 224M    ./cts
  5. 1.2G    ./frameworks
  6. 9.1M    ./docs
  7. 116G    ./.repo
  8. 52M    ./hardware
  9. 124M    ./device
  10. 896K    ./pdk
  11. 359M    ./packages
  12. 11M    ./build
  13. 128K    ./abi
  14. 40M    ./dalvik
  15. 118M    ./development
  16. 4.9G    ./prebuilts
  17. 2.7G    ./external
  18. 18M    ./bionic
  19. 13M    ./art
  20. 12M    ./system
  21. 18M    ./developers
  22. 33M    ./sdk
  23. 220K    ./libnativehelper
  24. 77M    ./ndk
  25. 1001M    ./tools
  26. 4.4M    ./bootable
  27. 150G    .
  28. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$
又大了不少

注:
  1. senrsl@senrsl-T540p:~$ repo help init
  2. Usage: repo init -u url [options]
  3. Options:
  4.   -h, --help            show this help message and exit
  5.   Logging options:
  6.     -q, --quiet         be quiet
  7.   Manifest options:
  8.     -u URL, --manifest-url=URL
  9.                         manifest repository location
  10.     -b REVISION, --manifest-branch=REVISION
  11.                         manifest branch or revision
  12.     -m NAME.xml, --manifest-name=NAME.xml
  13.                         initial manifest file
  14.     --mirror            create a replica of the remote repositories rather
  15.                         than a client working directory
  16.     --reference=DIR     location of mirror directory
  17.     --depth=DEPTH       create a shallow clone with given depth; see git clone
  18.     --archive           checkout an archive instead of a git repository for
  19.                         each project. See git archive.
  20.     -g GROUP, --groups=GROUP
  21.                         restrict manifest projects to ones with specified
  22.                         group(s) [default|all|G1,G2,G3|G4,-G5,-G6]
  23.     -p PLATFORM, --platform=PLATFORM
  24.                         restrict manifest projects to ones with a specified
  25.                         platform group [auto|all|none|linux|darwin|...]
  26.   repo Version options:
  27.     --repo-url=URL      repo repository location
  28.     --repo-branch=REVISION
  29.                         repo branch or revision
  30.     --no-repo-verify    do not verify repo source code
  31.   Other options:
  32.     --config-name       Always prompt for name/e-mail
  33. senrsl@senrsl-T540p:~$




14,增加nexus7的驱动编译烧写
nexus7驱动下载KVT49L版
https://developers.google.com/android/nexus/drivers#debkvt49l




15,make sdk
同步完所有代码后,便可make sdk.
  1. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ lunch sdk-eng
  2. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ make update-api
  3. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ make sdk
  4. ......
  5. Install: out/host/linux-x86/bin/line_endings
  6. Package SDK: out/host/linux-x86/sdk/android-sdk_eng.senrsl_linux-x86.zip
  7. SDK: warning: including GNU target out/target/product/generic/system/lib/libgccdemangle.so
  8. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ ls out/host/linux-x86/sdk/
  9. android-sdk_eng.senrsl_linux-x86      sdk_deps.mk
  10. android-sdk_eng.senrsl_linux-x86.zip
  11. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$

16,repo start
看了半天没搞明白为什么要repo start,明明repo sync 默认的就可以用啊,默认的能用为什么还要repo start.....

然后找到了这张图


repo sync 之后紧跟 repo start....

据说是为各版本库创建分支,然后在该分支下工作。。。。

不明觉厉。。。。

尝试一下,倒是这个变了
  1. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ repo branches
  2.    (no branches)
  3. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ repo start . --all
  4. error: '.' is not a valid name
  5. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ repo start  android-4.4.2_r2 --all
  6. Starting android-4.4.2_r2: 100% (418/418), done. 
  7. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ repo branches
  8. *  android-4.4.2_r2          | in all projects
  9. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ repo branch
  10. *  android-4.4.2_r2          | in all projects
  11. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$

17,部署

昨天下雨感冒发烧床上躺一天,今日下雪大蒜鸡蛋面下午喷嚏不断又不断。

能活到七老八十岁实在是太不容易了。。。。。。

也就是说代码分配应该是这样的:

.repo是总的项目库,需要哪个版本可以从里面检出来,然后切换分支对外发布。。。。

把上面442的目录都拷到另一个文件夹s442r2下,各种make验证。

  1. senrsl@senrsl-T540p:~/android/source/s442r2$ ll
  2. 总用量 112
  3. drwxrwxr-x  26 senrsl senrsl 4096 11月  6 14:53 ./
  4. drwxrwxr-x   9 senrsl senrsl 4096 11月  6 14:49 ../
  5. drwxrwxr-x   3 senrsl senrsl 4096 11月  4 05:53 abi/
  6. drwxrwxr-x  12 senrsl senrsl 4096 11月  4 05:53 art/
  7. drwxrwxr-x  10 senrsl senrsl 4096 11月  4 05:53 bionic/
  8. drwxrwxr-x   5 senrsl senrsl 4096 11月  4 05:53 bootable/
  9. drwxrwxr-x   7 senrsl senrsl 4096 11月  4 05:53 build/
  10. -rw-rw-r--   1 senrsl senrsl   88 11月  4 14:10 BW
  11. drwxrwxr-x  11 senrsl senrsl 4096 11月  4 05:53 cts/
  12. drwxrwxr-x  16 senrsl senrsl 4096 11月  4 05:53 dalvik/
  13. drwxrwxr-x   6 senrsl senrsl 4096 11月  4 05:53 developers/
  14. drwxrwxr-x  18 senrsl senrsl 4096 11月  4 05:53 development/
  15. drwxrwxr-x   9 senrsl senrsl 4096 11月  4 05:53 device/
  16. drwxrwxr-x   3 senrsl senrsl 4096 11月  4 05:53 docs/
  17. drwxrwxr-x 171 senrsl senrsl 4096 11月  4 05:55 external/
  18. drwxrwxr-x  17 senrsl senrsl 4096 11月  4 05:56 frameworks/
  19. drwxrwxr-x  11 senrsl senrsl 4096 11月  4 05:56 hardware/
  20. drwxrwxr-x  17 senrsl senrsl 4096 11月  4 05:56 libcore/
  21. drwxrwxr-x   4 senrsl senrsl 4096 11月  4 05:56 libnativehelper/
  22. -r--r--r--   1 senrsl senrsl   87 11月  4 05:53 Makefile
  23. drwxrwxr-x   8 senrsl senrsl 4096 11月  4 05:56 ndk/
  24. drwxrwxr-x   4 senrsl senrsl 4096 11月  6 14:54 out/ #后生
  25. drwxrwxr-x   9 senrsl senrsl 4096 11月  4 05:57 packages/
  26. drwxrwxr-x   6 senrsl senrsl 4096 11月  4 05:57 pdk/
  27. drwxrwxr-x  15 senrsl senrsl 4096 11月  5 00:41 prebuilts/
  28. drwxrwxr-x  26 senrsl senrsl 4096 11月  4 05:59 sdk/
  29. drwxrwxr-x   8 senrsl senrsl 4096 11月  4 05:59 system/
  30. drwxrwxr-x  11 senrsl senrsl 4096 11月  5 00:43 tools/
  31. senrsl@senrsl-T540p:~/android/source/s442r2$
然后编译源码跟sdk

此模式可压缩以进行单版本的分发!



然后再repo目录再检一份出来
  1. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ ll
  2. 总用量 16
  3. drwxrwxr-x 3 senrsl senrsl 4096 11月  6 16:10 ./
  4. drwxrwxr-x 9 senrsl senrsl 4096 11月  6 14:49 ../
  5. drwxrwxr-x 7 senrsl senrsl 4096 11月  6 14:56 .repo/
  6. -rwxrwxr-x 1 senrsl senrsl  162 11月  2 20:47 sync.sh*
  7. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ repo init -b android-4.4.2_r2 -g all
  8. Your identity is: senRsl <senRsl@163.com>
  9. If you want to change this, please re-run 'repo init' with --config-name
  10. repo has been initialized in /home/senrsl/android/source/WORKING_DIRECTORY
  11. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ repo sync -j16
  12. ....
  13. Checking out files: 100% (182/182), done.ng out files:   1% (2/182)  
  14. Checking out files: 100% (1256/1256), done.
  15. Checking out files: 100% (2951/2951), done.
  16. Checking out files: 100% (3416/3416), done. out files:  23% (801/3416)  
  17. Checking out files: 100% (53361/53361), done.ut files:   1% (690/53361)  
  18. Syncing work tree: 100% (418/418), done. 
  19. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$
恩,跟上面那个一模一样。。。。


又考虑一下,没必要单独把代码在本地搞得到处都是,可以按版本备份云盘外发,本地一份就够了,毕竟有repo做管理。


18,压缩备份版本前要make clean

之前
  1. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$  du -h --max-depth=1
  2. 44G    ./out
  3. 46M    ./libcore
  4. 224M    ./cts
  5. 1.2G    ./frameworks
  6. 9.1M    ./docs
  7. 116G    ./.repo
  8. 52M    ./hardware
  9. 124M    ./device
  10. 896K    ./pdk
  11. 359M    ./packages
  12. 11M    ./build
  13. 128K    ./abi
  14. 40M    ./dalvik
  15. 118M    ./development
  16. 4.9G    ./prebuilts
  17. 2.7G    ./external
  18. 18M    ./bionic
  19. 13M    ./art
  20. 12M    ./system
  21. 18M    ./developers
  22. 33M    ./sdk
  23. 220K    ./libnativehelper
  24. 77M    ./ndk
  25. 1001M    ./tools
  26. 4.4M    ./bootable
  27. 291G    .

之后
  1. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ du -h --max-depth=1
  2. 46M    ./libcore
  3. 224M    ./cts
  4. 1.2G    ./frameworks
  5. 9.1M    ./docs
  6. 116G    ./.repo
  7. 52M    ./hardware
  8. 124M    ./device
  9. 896K    ./pdk
  10. 359M    ./packages
  11. 11M    ./build
  12. 128K    ./abi
  13. 40M    ./dalvik
  14. 118M    ./development
  15. 4.9G    ./prebuilts
  16. 2.7G    ./external
  17. 18M    ./bionic
  18. 13M    ./art
  19. 12M    ./system
  20. 18M    ./developers
  21. 33M    ./sdk
  22. 220K    ./libnativehelper
  23. 77M    ./ndk
  24. 1001M    ./tools
  25. 4.4M    ./bootable
  26. 127G    .
之前只比之后多了一个44G的out,但总体积291-127-44=120;这120隐藏在源码的各个角落,

之前压缩tar.gz 128G+....
之后压缩tar.gz ...

看来还要把源码换个位置再压缩,他们顺着引用找过去了


那么多文件拷的太慢了,还是把.repo改个名字好了,这样引用一样找不到。。。。


19,android 模拟手势

模拟事件全部是通过input命令来实现的,首先看一下input命令的使用:
 
  1. usage: input ...
  2.        input text <string>
  3.        input keyevent <key code number or name>
  4.        input [touchscreen|touchpad] tap <x> <y>
  5.        input [touchscreen|touchpad] swipe <x1> <y1> <x2> <y2>
  6.        input trackball press
  7.        input trackball roll <dx> <dy>

1. keyevent指的是android对应的keycode,比如home键的keycode=3,back键的keycode=4.
 
具体请查阅 <android keycode详解>
  1. KEYCODE_UNKNOWN=0;
  2. KEYCODE_SOFT_LEFT=1;
  3. KEYCODE_SOFT_RIGHT=2;
  4. KEYCODE_HOME=3;
  5. KEYCODE_BACK=4;
  6. KEYCODE_CALL=5;
  7. KEYCODE_ENDCALL=6;
  8. KEYCODE_0=7;
  9. KEYCODE_1=8;
  10. KEYCODE_2=9;
  11. KEYCODE_3=10;
  12. KEYCODE_4=11;
  13. KEYCODE_5=12;
  14. KEYCODE_6=13;
  15. KEYCODE_7=14;
  16. KEYCODE_8=15;
  17. KEYCODE_9=16;
  18. KEYCODE_STAR=17;
  19. KEYCODE_POUND=18;
  20. KEYCODE_DPAD_UP=19;
  21. KEYCODE_DPAD_DOWN=20;
  22. KEYCODE_DPAD_LEFT=21;
  23. KEYCODE_DPAD_RIGHT=22;
  24. KEYCODE_DPAD_CENTER=23;
  25. KEYCODE_VOLUME_UP=24;
  26. KEYCODE_VOLUME_DOWN=25;
  27. KEYCODE_POWER=26;
  28. KEYCODE_CAMERA=27;
  29. KEYCODE_CLEAR=28;
  30. KEYCODE_A=29;
  31. KEYCODE_B=30;
  32. KEYCODE_C=31;
  33. KEYCODE_D=32;
  34. KEYCODE_E=33;
  35. KEYCODE_F=34;
  36. KEYCODE_G=35;
  37. KEYCODE_H=36;
  38. KEYCODE_I=37;
  39. KEYCODE_J=38;
  40. KEYCODE_K=39;
  41. KEYCODE_L=40;
  42. KEYCODE_M=41;
  43. KEYCODE_N=42;
  44. KEYCODE_O=43;
  45. KEYCODE_P=44;
  46. KEYCODE_Q=45;
  47. KEYCODE_R=46;
  48. KEYCODE_S=47;
  49. KEYCODE_T=48;
  50. KEYCODE_U=49;
  51. KEYCODE_V=50;
  52. KEYCODE_W=51;
  53. KEYCODE_X=52;
  54. KEYCODE_Y=53;
  55. KEYCODE_Z=54;
  56. KEYCODE_COMMA=55;
  57. KEYCODE_PERIOD=56;
  58. KEYCODE_ALT_LEFT=57;
  59. KEYCODE_ALT_RIGHT=58;
  60. KEYCODE_SHIFT_LEFT=59;
  61. KEYCODE_SHIFT_RIGHT=60;
  62. KEYCODE_TAB=61;
  63. KEYCODE_SPACE=62;
  64. KEYCODE_SYM=63;
  65. KEYCODE_EXPLORER=64;
  66. KEYCODE_ENVELOPE=65;
  67. KEYCODE_ENTER=66;
  68. KEYCODE_DEL=67;
  69. KEYCODE_GRAVE=68;
  70. KEYCODE_MINUS=69;
  71. KEYCODE_EQUALS=70;
  72. KEYCODE_LEFT_BRACKET=71;
  73. KEYCODE_RIGHT_BRACKET=72;
  74. KEYCODE_BACKSLASH=73;
  75. KEYCODE_SEMICOLON=74;
  76. KEYCODE_APOSTROPHE=75;
  77. KEYCODE_SLASH=76;
  78. KEYCODE_AT=77;
  79. KEYCODE_NUM=78;
  80. KEYCODE_HEADSETHOOK=79;
  81. KEYCODE_FOCUS=80;//*Camera*focus
  82. KEYCODE_PLUS=81;
  83. KEYCODE_MENU=82;
  84. KEYCODE_NOTIFICATION=83;
  85. KEYCODE_SEARCH=84;
  86. KEYCODE_MEDIA_PLAY_PAUSE=85;
  87. KEYCODE_MEDIA_STOP=86;
  88. KEYCODE_MEDIA_NEXT=87;
  89. KEYCODE_MEDIA_PREVIOUS=88;
  90. KEYCODE_MEDIA_REWIND=89;
  91. KEYCODE_MEDIA_FAST_FORWARD=90;
  92. KEYCODE_MUTE=91;

然后使用的话比较简单,比如想模拟home按键:
 
adb shell input keyevent 3
 
根据具体keycode编辑即可。
 
 
2. 关于tap的话,他模拟的是touch屏幕的事件,只需给出x、y坐标即可。
 
此x、y坐标对应的是真实的屏幕分辨率,所以要根据具体手机具体看,比如你想点击屏幕(x, y) = (250, 250)位置:
 
adb shell input tap 250 250
 
 
3. 关于swipe同tap是一样的,只是他是模拟滑动的事件,给出起点和终点的坐标即可。例如从屏幕(250, 250), 到屏幕(300, 300)即
 
adb shell input swipe 250 250 300 300
input touchscreen swipe 700 200 100 200

相关源码定义在/home/senrsl/android/source/WORKING_DIRECTORY/frameworks/base /cmds/input/src/com/android/commands/input/Input.java文件

写个脚本,加后台运行即可
  1. senrsl@senrsl-T540p:~$ adb shell
  2. root@android:/ # sh /usr1/test.sh &  
  3. root@android:/ # cat /usr1/test.sh                                            
  4. while true
  5. do
  6.     input keyevent BACK
  7.     sleep 1
  8.     input keyevent HOME
  9.     sleep 0.2
  10.     am start -n com.dc.customtailorcar.media/com.dc.customtailorcar.media.MediaActivity
  11.     sleep 10
  12.     input tap 200 400
  13.     sleep 2
  14.     input keyevent BACK   
  15.     sleep 10
  16.     input tap 750 450
  17.     sleep 2
  18.     input  swipe 50 230 800 220
  19.     sleep 0.2
  20.     input  swipe 700 230 100 220
  21.     sleep 0.2
  22.     input keyevent BACK
  23.     sleep 10
  24.     echo  _____
  25. done
  26. root@android:/ #
后台脚本运行测试


20,android api level 对照SDK版本

  1. API等级1:  Android 1.0
  2. API等级2:  Android 1.1 Petit Four  花式小蛋糕
  3. API等级3:  Android 1.5 Cupcake  纸杯蛋糕
  4. API等级4:  Android 1.6 Donut  甜甜圈
  5. API等级5:  Android 2.0 Éclair   松饼
  6. API等级6:  Android 2.0.1 Éclair  松饼
  7. API等级7:  Android 2.1 Éclair   松饼
  8. API等级8:  Android 2.2 - 2.2.3 Froyo  冻酸奶
  9. API等级9:  Android 2.3 - 2.3.2 Gingerbread  姜饼
  10. API等级10:Android 2.3.3-2.3.7 Gingerbread   姜饼
  11. API等级11:Android 3.0 Honeycomb 蜂巢
  12. API等级12:Android 3.1 Honeycomb 蜂巢
  13. API等级13:Android 3.2 Honeycomb 蜂巢
  14. API等级14:Android 4.0 - 4.0.2 Ice Cream Sandwich  冰激凌三明治
  15. API等级15:Android 4.0.3 - 4.0.4 Ice Cream Sandwich  冰激凌三明治
  16. API等级16:Android 4.1 Jelly Bean  糖豆
  17. API等级17:Android 4.2 Jelly Bean  糖豆
  18. API等级18:Android 4.3 Jelly Bean  糖豆
  19. API等级19:Android 4.4 KitKat 奇巧巧克力棒
  20. API等级20 : Android 4.4W KitKat with wearable extensions 奇巧巧克力棒
  21. API等级21:Android 5.0-5.0.2 Lollipop  棒棒糖


21,android auto

搭建一套android auto环境
PC上搭车机端虚拟机,手机上装客户端。
万事俱备,没支持google play的5.0+手机。。。。

编源码,刷6.0N7.

1)切换分支到6.0
2)装驱动
3)编译
4)烧录


  1. senrsl@senrsl-T540p:~$ cd android/source/WORKING_DIRECTORY/
  2. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ ll
  3. 总用量 20172
  4. drwxrwxr-x  28 senrsl senrsl     4096 11月 12 15:27 ./
  5. drwxrwxr-x   9 senrsl senrsl     4096 11月 12 16:36 ../
  6. drwxrwxr-x   3 senrsl senrsl     4096 11月  6 16:26 abi/
  7. drwxrwxr-x  12 senrsl senrsl     4096 11月  6 16:26 art/
  8. drwxrwxr-x  10 senrsl senrsl     4096 11月  6 16:26 bionic/
  9. drwxrwxr-x   5 senrsl senrsl     4096 11月  6 16:26 bootable/
  10. drwxrwxr-x   7 senrsl senrsl     4096 11月  6 16:26 build/
  11. -rw-rw-r--   1 senrsl senrsl     5923 11月  9 14:32 BW
  12. drwxrwxr-x  11 senrsl senrsl     4096 11月  6 16:27 cts/
  13. drwxrwxr-x  16 senrsl senrsl     4096 11月  6 16:27 dalvik/
  14. drwxrwxr-x   6 senrsl senrsl     4096 11月  6 16:27 developers/
  15. drwxrwxr-x  18 senrsl senrsl     4096 11月  6 16:27 development/
  16. drwxrwxr-x   9 senrsl senrsl     4096 11月  6 16:27 device/
  17. drwxrwxr-x   3 senrsl senrsl     4096 11月  6 16:27 docs/
  18. drwxrwxr-x 171 senrsl senrsl     4096 11月  6 16:31 external/
  19. -rwxr-x--x   1 senrsl senrsl   149120  2月  7  2014 extract-asus-deb.sh*
  20. -rwxr-x--x   1 senrsl senrsl    23590  2月  7  2014 extract-broadcom-deb.sh*
  21. -rwxr-x--x   1 senrsl senrsl 20347858  2月  7  2014 extract-qcom-deb.sh*
  22. drwxrwxr-x  17 senrsl senrsl     4096 11月  6 16:32 frameworks/
  23. drwxrwxr-x  11 senrsl senrsl     4096 11月  6 16:32 hardware/
  24. drwxrwxr-x  17 senrsl senrsl     4096 11月  6 16:32 libcore/
  25. drwxrwxr-x   4 senrsl senrsl     4096 11月  6 16:32 libnativehelper/
  26. -r--r--r--   1 senrsl senrsl       87 11月  6 16:26 Makefile
  27. drwxrwxr-x   8 senrsl senrsl     4096 11月  6 16:32 ndk/
  28. drwxrwxr-x   4 senrsl senrsl     4096 11月 12 15:28 out/
  29. drwxrwxr-x   9 senrsl senrsl     4096 11月  6 16:32 packages/
  30. drwxrwxr-x   6 senrsl senrsl     4096 11月  6 16:33 pdk/
  31. drwxrwxr-x  15 senrsl senrsl     4096 11月  6 16:35 prebuilts/
  32. drwxrwxr-x   7 senrsl senrsl     4096 11月  6 16:21 .repo/
  33. drwxrwxr-x  26 senrsl senrsl     4096 11月  6 16:35 sdk/
  34. -rwxrwxr-x   1 senrsl senrsl      162 11月  2 20:47 sync.sh*
  35. drwxrwxr-x   8 senrsl senrsl     4096 11月  6 16:35 system/
  36. drwxrwxr-x  11 senrsl senrsl     4096 11月  6 16:36 tools/
  37. drwxr-x---   5 senrsl senrsl     4096  2月  7  2014 vendor/
  38. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ repo branches
  39.    android-4.4.2_r2          | in all projects
  40. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ cd .repo/manifests
  41. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY/.repo/manifests$ git branch -a | cut -d / -f 3
  42. * default
  43. android-4.4.2_r2 -> origin
  44. adt_23.0.3
  45. android-1.6_r1
  46. android-1.6_r1.1
  47. android-1.6_r1.2
  48. android-1.6_r1.3
  49. android-1.6_r1.4
  50. android-1.6_r1.5
  51. android-1.6_r2
  52. android-2.0.1_r1
  53. android-2.0_r1
  54. android-2.1_r1
  55. android-2.1_r2
  56. android-2.1_r2.1p
  57. android-2.1_r2.1p2
  58. android-2.1_r2.1s
  59. android-2.2.1_r1
  60. android-2.2.1_r2
  61. android-2.2.2_r1
  62. android-2.2.3_r1
  63. android-2.2.3_r2
  64. android-2.2.3_r2.1
  65. android-2.2_r1
  66. android-2.2_r1.1
  67. android-2.2_r1.2
  68. android-2.2_r1.3
  69. android-2.3.1_r1
  70. android-2.3.2_r1
  71. android-2.3.3_r1
  72. android-2.3.3_r1.1
  73. android-2.3.4_r0.9
  74. android-2.3.4_r1
  75. android-2.3.5_r1
  76. android-2.3.6_r0.9
  77. android-2.3.6_r1
  78. android-2.3.7_r1
  79. android-2.3_r1
  80. android-4.0.1_r1
  81. android-4.0.1_r1.1
  82. android-4.0.1_r1.2
  83. android-4.0.2_r1
  84. android-4.0.3_r1
  85. android-4.0.3_r1.1
  86. android-4.0.4_r1
  87. android-4.0.4_r1.1
  88. android-4.0.4_r1.2
  89. android-4.0.4_r2
  90. android-4.0.4_r2.1
  91. android-4.1.1_r1
  92. android-4.1.1_r1.1
  93. android-4.1.1_r2
  94. android-4.1.1_r3
  95. android-4.1.1_r4
  96. android-4.1.1_r5
  97. android-4.1.1_r6
  98. android-4.1.1_r6.1
  99. android-4.1.2_r1
  100. android-4.1.2_r2
  101. android-4.1.2_r2.1
  102. android-4.2.1_r1
  103. android-4.2.1_r1.1
  104. android-4.2.1_r1.2
  105. android-4.2.2_r1
  106. android-4.2.2_r1.1
  107. android-4.2.2_r1.2
  108. android-4.2.2_r1.2b
  109. android-4.2_r1
  110. android-4.3.1_r1
  111. android-4.3_r0.9
  112. android-4.3_r0.9.1
  113. android-4.3_r1
  114. android-4.3_r1.1
  115. android-4.3_r2
  116. android-4.3_r2.1
  117. android-4.3_r2.2
  118. android-4.3_r2.2-cts
  119. android-4.3_r2.3
  120. android-4.3_r3
  121. android-4.3_r3.1
  122. android-4.4.1_r1
  123. android-4.4.1_r1.0.1
  124. android-4.4.2_r1
  125. android-4.4.2_r1.0.1
  126. android-4.4.2_r2
  127. android-4.4.2_r2.0.1
  128. android-4.4.3_r1
  129. android-4.4.3_r1.0.1
  130. android-4.4.3_r1.1
  131. android-4.4.3_r1.1.0.1
  132. android-4.4.4_r1
  133. android-4.4.4_r1.0.1
  134. android-4.4.4_r2
  135. android-4.4.4_r2.0.1
  136. android-4.4_r1
  137. android-4.4_r1.0.1
  138. android-4.4_r1.1
  139. android-4.4_r1.1.0.1
  140. android-4.4_r1.2
  141. android-4.4_r1.2.0.1
  142. android-4.4w_r1
  143. android-5.0.0_r1
  144. android-5.0.0_r1.0.1
  145. android-5.0.0_r2
  146. android-5.0.0_r2.0.1
  147. android-5.0.0_r3
  148. android-5.0.0_r3.0.1
  149. android-5.0.0_r4
  150. android-5.0.0_r4.0.1
  151. android-5.0.0_r5
  152. android-5.0.0_r5.0.1
  153. android-5.0.0_r5.1
  154. android-5.0.0_r5.1.0.1
  155. android-5.0.0_r6
  156. android-5.0.0_r6.0.1
  157. android-5.0.0_r7
  158. android-5.0.0_r7.0.1
  159. android-5.0.1_r1
  160. android-5.0.2_r1
  161. android-5.0.2_r3
  162. android-5.1.0_r1
  163. android-5.1.0_r3
  164. android-5.1.0_r4
  165. android-5.1.0_r5
  166. android-5.1.1_r1
  167. android-5.1.1_r10
  168. android-5.1.1_r12
  169. android-5.1.1_r13
  170. android-5.1.1_r14
  171. android-5.1.1_r15
  172. android-5.1.1_r16
  173. android-5.1.1_r17
  174. android-5.1.1_r18
  175. android-5.1.1_r19
  176. android-5.1.1_r2
  177. android-5.1.1_r20
  178. android-5.1.1_r22
  179. android-5.1.1_r23
  180. android-5.1.1_r24
  181. android-5.1.1_r25
  182. android-5.1.1_r26
  183. android-5.1.1_r28
  184. android-5.1.1_r3
  185. android-5.1.1_r4
  186. android-5.1.1_r5
  187. android-5.1.1_r6
  188. android-5.1.1_r7
  189. android-5.1.1_r8
  190. android-5.1.1_r9
  191. android-6.0.0_r1
  192. android-6.0.0_r11
  193. android-6.0.0_r12
  194. android-6.0.0_r13
  195. android-6.0.0_r2
  196. android-6.0.0_r23
  197. android-6.0.0_r24
  198. android-6.0.0_r25
  199. android-6.0.0_r26
  200. android-6.0.0_r4
  201. android-6.0.0_r5
  202. android-cts-2.2_r8
  203. android-cts-2.3_r10
  204. android-cts-2.3_r11
  205. android-cts-2.3_r12
  206. android-cts-4.0.3_r1
  207. android-cts-4.0.3_r2
  208. android-cts-4.0_r1
  209. android-cts-4.1_r1
  210. android-cts-4.1_r2
  211. android-cts-4.1_r4
  212. android-cts-4.2_r2
  213. android-cts-4.4_r4
  214. android-cts-5.0_r2
  215. android-cts-5.0_r3
  216. android-cts-5.1_r1
  217. android-cts-5.1_r2
  218. android-cts-5.1_r3
  219. android-cts-6.0_r1
  220. android-cts-verifier-4.0.3_r1
  221. android-cts-verifier-4.0_r1
  222. android-l-preview_r2
  223. android-live-tv
  224. android-live-tv-l-mr1
  225. android-m-preview
  226. android-m-preview-1
  227. android-m-preview-2
  228. android-sdk-4.0.3-tools_r1
  229. android-sdk-4.0.3_r1
  230. android-sdk-4.4.2_r1
  231. android-sdk-4.4.2_r1.0.1
  232. android-sdk-adt_r16.0.1
  233. android-sdk-adt_r20
  234. android-sdk-support_r11
  235. android-support-test
  236. android-tsl-2.0
  237. android-tsl-3.0
  238. android-tsl-4.0
  239. android-wear-5.0.0_r1
  240. android-wear-5.1.0_r1
  241. android-wear-5.1.1_r1
  242. chromium-dev
  243. droiddriver-dev
  244. emu-1.4-release
  245. emu-master-dev
  246. froyo
  247. gcc
  248. gingerbread
  249. gingerbread-release
  250. gradle-dev
  251. gradle_0.12.2
  252. gradle_0.13.0
  253. gradle_0.13.1
  254. gradle_0.13.2
  255. gradle_0.13.3
  256. gradle_0.14.0
  257. gradle_0.14.1
  258. gradle_0.14.2
  259. gradle_0.14.3
  260. gradle_0.14.4
  261. gradle_1.0.0
  262. gradle_1.0.0-rc1
  263. gradle_1.0.0-rc2
  264. gradle_1.0.0-rc3
  265. gradle_1.0.0-rc4
  266. gradle_1.0.1
  267. gradle_1.1.0
  268. gradle_1.1.0-rc1
  269. gradle_1.1.0-rc2
  270. gradle_1.1.0-rc3
  271. gradle_1.1.1
  272. gradle_1.1.2
  273. gradle_1.1.3
  274. gradle_1.2.0
  275. gradle_1.2.0-beta1
  276. gradle_1.2.0-rc1
  277. gradle_1.2.1
  278. gradle_1.2.2
  279. gradle_1.2.3
  280. gradle_1.3.0-beta1
  281. gradle_1.3.0-beta2
  282. gradle_1.3.0-beta3
  283. gradle_1.3.0-beta4
  284. gradle_1.3.1
  285. ics-mr0
  286. ics-mr1
  287. ics-plus-aosp
  288. idea133
  289. idea133-weekly-release
  290. jb-dev
  291. jb-mr1-dev
  292. jb-mr1-dev-plus-aosp
  293. jb-mr1.1-cts-dev
  294. jb-mr1.1-dev
  295. jb-mr1.1-dev-plus-aosp
  296. jb-mr2-cts-dev
  297. jb-mr2-dev
  298. jumper-stable
  299. kitkat-cts-dev
  300. kitkat-dev
  301. l-preview
  302. lldb-master-dev
  303. llvm
  304. lollipop-cts-dev
  305. lollipop-dev
  306. lollipop-mr1-cts-dev
  307. lollipop-mr1-dev
  308. marshmallow-cts-dev
  309. marshmallow-cts-release
  310. marshmallow-dev
  311. marshmallow-dr-dev
  312. master
  313. master-art
  314. master-art-host
  315. master-dalvik
  316. master-dalvik-host
  317. master-ndk
  318. master-soong
  319. studio-1.0-dev
  320. studio-1.0-release
  321. studio-1.1-dev
  322. studio-1.1-release
  323. studio-1.2-dev
  324. studio-1.2-release
  325. studio-1.3-dev
  326. studio-1.3-release
  327. studio-1.4
  328. studio-1.4-dev
  329. studio-1.4-lldb-dev
  330. studio-1.4-release
  331. studio-master-dev
  332. studio-master-release
  333. studio_0.8.6
  334. studio_1.0.0
  335. studio_1.0.1
  336. tools-canary-release
  337. tools_ndk_r9d
  338. tools_r20
  339. tools_r21
  340. tools_r21.1
  341. tools_r22
  342. tools_r22.2
  343. tools_r22.6
  344. tradefed
  345. ub-emulator-master
  346. ub-jack
  347. ub-jack-arzon
  348. ub-jack-arzon-mr2
  349. ub-jack-brest
  350. ub-jack-lang-dev
  351. ub-tools-idea133
  352. ub-tools-idea133-milestone
  353. ub-tools-idea133-release
  354. ub-tools-master
  355. ub-webview-m40-release
  356. upstream-mirror-lldb
  357. webview-m40_r1
  358. webview-m40_r2
  359. webview-m40_r3
  360. webview-m40_r4
  361. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY/.repo/manifests$ cd ..
  362. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY/.repo$ cd ..
  363. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ repo init -b android-6.0.0_r26 -g all
  364. remote: Counting objects: 2, done
  365. remote: Finding sources: 100% (29/29)
  366. remote: Total 29 (delta 6), reused 29 (delta 6)
  367. 来自 https://android.googlesource.com/platform/manifest
  368.  * [新分支]          android-5.1.1_r29 -> origin/android-5.1.1_r29
  369.  * [新分支]          android-6.0.0_r3 -> origin/android-6.0.0_r3
  370.  * [新分支]          android-cts-5.1_r4 -> origin/android-cts-5.1_r4
  371.    90c4670..73789ba  llvm       -> origin/llvm
  372.    9cf96e9..55eadd0  marshmallow-cts-dev -> origin/marshmallow-cts-dev
  373.    9cf96e9..24fda7a  marshmallow-cts-release -> origin/marshmallow-cts-release
  374.    1d80758..7d3ba4e  master     -> origin/master
  375.    4488a1e..40e1061  master-art -> origin/master-art
  376.  * [新tag]           android-5.1.1_r29 -> android-5.1.1_r29
  377.  * [新tag]           android-6.0.0_r3 -> android-6.0.0_r3

  378. Your identity is: senRsl <senRsl@163.com>
  379. If you want to change this, please re-run 'repo init' with --config-name

  380. repo has been initialized in /home/senrsl/android/source/WORKING_DIRECTORY
  381. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$
  382. repo sync好久 终于看到这句
  383. Fetching project platform/developers/build
  384. Fetching project platform/hardware/ti/omap4-aah
  385. Fetching project device/generic/arm64
  386. Fetching projects:  96% (437/455)  Fetching project platform/external/fio
  387. Fetching project platform/external/jack
  388. Fetching project platform/external/marisa-trie
  389. Fetching projects:  99% (451/455)  remote: Total 14 (delta 4), reused 14 (delta 4)
  390. 来自 https://android.googlesource.com/platform/tools/external/gradle
  391.    f2fb952..6b5dbec  studio-master-dev -> aosp/studio-master-dev
  392.  * [新tag]           studio-1.5 -> studio-1.5
  393. Fetching projects: 100% (455/455), done. 
  394. Syncing work tree: 100% (455/455), done.
  395. 然后start
  396. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ repo start android-6.0.0_r26 --all
  397. Starting android-6.0.0_r26: 100% (455/455), done. 
  398. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ repo branches
  399.    android-4.4.2_r2          | not in:
  400.                                    device/asus/fugu
  401.                                    device/asus/fugu-kernel
  402.                                    device/generic/arm64
  403.                                    device/generic/mini-emulator-arm64
  404.                                    device/generic/mini-emulator-x86_64
  405.                                    device/generic/qemu
  406.                                    device/generic/x86_64
  407.                                    device/google/atv
  408.                                    device/htc/flounder
  409.                                    device/htc/flounder-kernel
  410.                                    device/huawei/angler
  411.                                    device/huawei/angler-kernel
  412.                                    device/lge/bullhead
  413.                                    device/lge/bullhead-kernel
  414.                                    device/moto/shamu
  415.                                    device/moto/shamu-kernel
  416.                                    external/androidplot
  417.                                    external/apache-commons-math
  418.                                    external/boringssl
  419.                                    external/cblas
  420.                                    external/chromium-webview
  421.                                    external/cmockery
  422.                                    external/conscrypt
  423.                                    external/crcalc
  424.                                    external/deqp
  425.                                    external/donuts
  426.                                    external/drm_gralloc
  427.                                    external/drm_hwcomposer
  428.                                    external/f2fs-tools
  429.                                    external/fio
  430.                                    external/fonttools
  431.                                    external/glide
  432.                                    external/google-breakpad
  433.                                    external/google-fonts/carrois-gothic-sc
  434.                                    external/google-fonts/coming-soon
  435.                                    external/google-fonts/cutive-mono
  436.                                    external/google-fonts/dancing-script
  437.                                    external/google-tv-pairing-protocol
  438.                                    external/gptfdisk
  439.                                    external/hyphenation-patterns
  440.                                    external/icu
  441.                                    external/jarjar
  442.                                    external/jemalloc
  443.                                    external/jetty
  444.                                    external/jsmn
  445.                                    external/jsoncpp
  446.                                    external/ksoap2
  447.                                    external/libavc
  448.                                    external/libcxx
  449.                                    external/libcxxabi
  450.                                    external/libdrm
  451.                                    external/libedit
  452.                                    external/libexif
  453.                                    external/libhevc
  454.                                    external/libmpeg2
  455.                                    external/libnl
  456.                                    external/libopus
  457.                                    external/libseccomp-helper
  458.                                    external/libssh2
  459.                                    external/libunwind
  460.                                    external/libutf
  461.                                    external/libvncserver
  462.                                    external/libvterm
  463.                                    external/lld
  464.                                    external/lldb
  465.                                    external/ltrace
  466.                                    external/lz4
  467.                                    external/messageformat
  468.                                    external/mockftpserver
  469.                                    external/nanohttpd
  470.                                    external/nanopb-c
  471.                                    external/nfacct
  472.                                    external/owasp/sanitizer
  473.                                    external/parameter-framework
  474.                                    external/pcre
  475.                                    external/pdfium
  476.                                    external/roboto-fonts
  477.                                    external/selinux
  478.                                    external/slf4j
  479.                                    external/sonic
  480.                                    external/squashfs-tools
  481.                                    external/toybox
  482.                                    external/vboot_reference
  483.                                    external/vixl
  484.                                    external/vogar
  485.                                    external/zopfli
  486.                                    frameworks/data-binding
  487.                                    frameworks/minikin
  488.                                    frameworks/multidex
  489.                                    frameworks/opt/bitmap
  490.                                    frameworks/opt/bluetooth
  491.                                    frameworks/opt/chips
  492.                                    frameworks/opt/inputconnectioncommon
  493.                                    frameworks/opt/net/ethernet
  494.                                    frameworks/opt/net/ims
  495.                                    frameworks/opt/net/wifi
  496.                                    frameworks/opt/setupwizard
  497.                                    frameworks/opt/widget
  498.                                    hardware/intel/audio_media
  499.                                    hardware/intel/bootstub
  500.                                    hardware/intel/common/bd_prov
  501.                                    hardware/intel/common/libmix
  502.                                    hardware/intel/common/libstagefrighthw
  503.                                    hardware/intel/common/libva
  504.                                    hardware/intel/common/libwsbm
  505.                                    hardware/intel/common/omx-components
  506.                                    hardware/intel/common/utils
  507.                                    hardware/intel/common/wrs_omxil_core
  508.                                    hardware/intel/img/hwcomposer
  509.                                    hardware/intel/img/psb_headers
  510.                                    hardware/intel/img/psb_video
  511.                                    hardware/intel/sensors
  512.                                    hardware/marvell/bt
  513.                                    hardware/mediatek
  514.                                    hardware/nvidia/audio
  515.                                    hardware/qcom/gps
  516.                                    hardware/qcom/msm8994
  517.                                    hardware/qcom/msm8x26
  518.                                    hardware/qcom/msm8x27
  519.                                    hardware/qcom/msm8x84
  520.                                    hardware/ti/omap4-aah
  521.                                    packages/apps/CarrierConfig
  522.                                    packages/apps/ExactCalculator
  523.                                    packages/apps/FMRadio
  524.                                    packages/apps/ManagedProvisioning
  525.                                    packages/apps/Messaging
  526.                                    packages/apps/Terminal
  527.                                    packages/apps/TvSettings
  528.                                    packages/providers/BookmarkProvider
  529.                                    packages/providers/CallLogProvider
  530.                                    packages/providers/TvProvider
  531.                                    packages/services/Mms
  532.                                    packages/services/Telecomm
  533.                                    platform_testing
  534.                                    prebuilts/android-emulator
  535.                                    prebuilts/clang/darwin-x86/host/3.6
  536.                                    prebuilts/clang/linux-x86/host/3.6
  537.                                    prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.9
  538.                                    prebuilts/gcc/darwin-x86/arm/arm-eabi-4.8
  539.                                    prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.9
  540.                                    prebuilts/gcc/darwin-x86/mips/mips64el-linux-android-4.9
  541.                                    prebuilts/gcc/darwin-x86/x86/x86_64-linux-android-4.9
  542.                                    prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9
  543.                                    prebuilts/gcc/linux-x86/arm/arm-eabi-4.8
  544.                                    prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9
  545.                                    prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8
  546.                                    prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8
  547.                                    prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8
  548.                                    prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9
  549.                                    prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9
  550.                                    prebuilts/gradle-plugin
  551.                                    prebuilts/libs/libedit
  552.                                    prebuilts/maven_repo/android
  553.                                    system/bt
  554.                                    system/gatekeeper
  555.                                    system/keymaster
  556. *  android-6.0.0_r26         | in all projects
  557. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$
  558. 然后安上三个驱动,编译
  559. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ source ./build/envsetup.sh
  560. including device/asus/deb/vendorsetup.sh
  561. including device/asus/flo/vendorsetup.sh
  562. including device/asus/fugu/vendorsetup.sh
  563. including device/generic/mini-emulator-arm64/vendorsetup.sh
  564. including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
  565. including device/generic/mini-emulator-mips/vendorsetup.sh
  566. including device/generic/mini-emulator-x86_64/vendorsetup.sh
  567. including device/generic/mini-emulator-x86/vendorsetup.sh
  568. including device/htc/flounder/vendorsetup.sh
  569. including device/huawei/angler/vendorsetup.sh
  570. including device/lge/bullhead/vendorsetup.sh
  571. including device/lge/hammerhead/vendorsetup.sh
  572. including device/moto/shamu/vendorsetup.sh
  573. including sdk/bash_completion/adb.bash
  574. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ lunch

  575. You're building on Linux

  576. Lunch menu... pick a combo:
  577.      1. aosp_arm-eng
  578.      2. aosp_arm64-eng
  579.      3. aosp_mips-eng
  580.      4. aosp_mips64-eng
  581.      5. aosp_x86-eng
  582.      6. aosp_x86_64-eng
  583.      7. aosp_deb-userdebug
  584.      8. aosp_flo-userdebug
  585.      9. full_fugu-userdebug
  586.      10. aosp_fugu-userdebug
  587.      11. mini_emulator_arm64-userdebug
  588.      12. m_e_arm-userdebug
  589.      13. mini_emulator_mips-userdebug
  590.      14. mini_emulator_x86_64-userdebug
  591.      15. mini_emulator_x86-userdebug
  592.      16. aosp_flounder-userdebug
  593.      17. aosp_angler-userdebug
  594.      18. aosp_bullhead-userdebug
  595.      19. aosp_hammerhead-userdebug
  596.      20. aosp_hammerhead_fp-userdebug
  597.      21. aosp_shamu-userdebug

  598. Which would you like? [aosp_arm-eng] 7

  599. ============================================
  600. PLATFORM_VERSION_CODENAME=REL
  601. PLATFORM_VERSION=6.0
  602. TARGET_PRODUCT=aosp_deb
  603. TARGET_BUILD_VARIANT=userdebug
  604. TARGET_BUILD_TYPE=release
  605. TARGET_BUILD_APPS=
  606. TARGET_ARCH=arm
  607. TARGET_ARCH_VARIANT=armv7-a-neon
  608. TARGET_CPU_VARIANT=krait
  609. TARGET_2ND_ARCH=
  610. TARGET_2ND_ARCH_VARIANT=
  611. TARGET_2ND_CPU_VARIANT=
  612. HOST_ARCH=x86_64
  613. HOST_OS=linux
  614. HOST_OS_EXTRA=Linux-3.19.0-28-generic-x86_64-with-Ubuntu-14.04-trusty
  615. HOST_BUILD_TYPE=release
  616. BUILD_ID=MDB08M
  617. OUT_DIR=out
  618. ============================================

  619. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$
  620. 需要使用openjdk7.....
  621. 安装openjdk7,【23】
  622. 安装依赖
  623. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ sudo apt-get install git-core gnupg flex bison gperf build-essential   zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386   lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache   libgl1-mesa-dev libxml2-utils xsltproc unzip
  624. 然后编译android source 6.0.0r26
  625. ....
  626. make_ext4fs -s -T -1 -S out/target/product/deb/root/file_contexts -L system -l 880803840 -J -a system out/target/product/deb/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/deb/system out/target/product/deb/system
  627. Creating filesystem with parameters:
  628.     Size: 880803840
  629.     Block size: 4096
  630.     Blocks per group: 32768
  631.     Inodes per group: 7680
  632.     Inode size: 256
  633.     Journal blocks: 0
  634.     Label: system
  635.     Blocks: 215040
  636.     Block groups: 7
  637.     Reserved block group size: 55
  638. Created filesystem with 1713/53760 inodes and 97056/215040 blocks
  639. Install system fs image: out/target/product/deb/system.img
  640. out/target/product/deb/system.img+out/target/product/deb/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=899137536 blocksize=135168 total=385506217 reserve=9191424
  641. #### make completed successfully (22:28 (mm:ss)) ####
  642. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$
  643. 编译完成
  644. 烧录
  645. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ adb reboot bootloader
  646. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ export ANDROID_PRODUCT_OUT=/home/senrsl/android/source/WORKING_DIRECTORY/out/target/product/deb
  647. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$ fastboot -w flashall
  648. Creating filesystem with parameters:
  649.     Size: 28521246720
  650.     Block size: 4096
  651.     Blocks per group: 32768
  652.     Inodes per group: 8176
  653.     Inode size: 256
  654.     Journal blocks: 32768
  655.     Label:
  656.     Blocks: 6963195
  657.     Block groups: 213
  658.     Reserved block group size: 1024
  659. Created filesystem with 11/1741488 inodes and 153337/6963195 blocks
  660. Creating filesystem with parameters:
  661.     Size: 587202560
  662.     Block size: 4096
  663.     Blocks per group: 32768
  664.     Inodes per group: 7168
  665.     Inode size: 256
  666.     Journal blocks: 2240
  667.     Label:
  668.     Blocks: 143360
  669.     Block groups: 5
  670.     Reserved block group size: 39
  671. Created filesystem with 11/35840 inodes and 4616/143360 blocks
  672. --------------------------------------------
  673. Bootloader Version...: FLO-04.05
  674. Baseband Version.....: DEB-Z00_2.44.0_0213
  675. Serial Number........: 0a6aad85
  676. --------------------------------------------
  677. checking product...
  678. OKAY [  0.003s]
  679. sending 'boot' (7466 KB)...
  680. OKAY [  0.241s]
  681. writing 'boot'...
  682. OKAY [  0.821s]
  683. sending 'recovery' (8212 KB)...
  684. OKAY [  0.264s]
  685. writing 'recovery'...
  686. OKAY [  0.284s]
  687. erasing 'system'...
  688. OKAY [  0.180s]
  689. sending 'system' (376062 KB)...
  690. OKAY [ 11.788s]
  691. writing 'system'...
  692. OKAY [ 17.180s]
  693. erasing 'userdata'...
  694. OKAY [  2.937s]
  695. sending 'userdata' (139065 KB)...
  696. OKAY [  4.361s]
  697. writing 'userdata'...
  698. OKAY [  5.658s]
  699. erasing 'cache'...
  700. OKAY [  0.075s]
  701. sending 'cache' (10984 KB)...
  702. OKAY [  0.351s]
  703. writing 'cache'...
  704. OKAY [  0.457s]
  705. rebooting...
  706. finished. total time: 44.666s
  707. senrsl@senrsl-T540p:~/android/source/WORKING_DIRECTORY$
烧录完成看效果
这个是昨天烧的镜像的


这个刚烧的编译完成的


看来有必要等repo服务部完改一下重烧。。。。

然后装android auto的那几个apk

goto24



22,win7共享wifi开启vpn.txt
一定要按顺序
 
1,建立vpn,保持关闭状态
 
 
2,建立虚拟网卡
C:\Windows\system32>netsh wlan set hostednetwork mode=allow ssid=SENRSL_WIN7 key
=01234567
承载网络模式已设置为允许。
已成功更改承载网络的 SSID。
已成功更改托管网络的用户密钥密码。
 
3,将vpn共享指向到虚拟网卡,下面设置按钮配置如下
 
4,启动虚拟网卡
C:\Windows\system32>netsh wlan start hostednetwork
已启动承载网络。
 
5,启动vpn

23,无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。
头疼多年的依赖关系,原来这么可以解决。。。。
把这俩勾上

把用不到的去掉


然后更新
安装就好
然后改bashrc
  1. #java path
  2. #export JAVA_HOME=/home/senrsl/java/jdk1.7.0_71
  3. #export JAVA_HOME=/home/senrsl/java/openjdk7u/build/j2sdk-image
  4. #export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
  5. #export JAVA_HOME=/home/senrsl/java/jdk1.6.0_45
  6. export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
  7. export JRE_HOME=${JAVA_HOME}/jre
  8. export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
  9. export PATH=${JAVA_HOME}/bin:$PATH
验证
  1. senrsl@senrsl-T540p:~$ java -version
  2. java version "1.6.0_45"
  3. Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
  4. Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
  5. senrsl@senrsl-T540p:~$ source ~/.bashrc
  6. senrsl@senrsl-T540p:~$ java -version
  7. java version "1.7.0_85"
  8. OpenJDK Runtime Environment (IcedTea 2.6.1) (7u85-2.6.1-5ubuntu0.14.04.1)
  9. OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode)
oracle的jdk用的好好地为什么要换openjdk,shit!!!

24,搭建android auto模拟器环境
官方介绍地址developer.android.com/training/auto/start/index.html

1)nexus7为手机端,笔记本为车机端;
2)手机端刷6.0镜像,挂vpn并保持全程开启,从play商店下载安装android auto应用;
3)点击标题栏上的文字【 Android Auto】10次,下面会有提示开启开发者模式,然后右边菜单栏Start head unit server.


4)笔记本执行端口转发
  1. senrsl@senrsl-T540p:~$ adb  forward  tcp:5277 tcp:5277
5)笔记本启动车机端模拟器脚本


第一次启动此脚本时,nexus7会弹出界面,点击各种ACCEPT,及允许各种授权访问,然后会自动更新google相关服务为最新,更新完成 后,桌面版车机有画面为连接成功。

车机端数据及网络来源于手机端,声音及画面输出于车机端。

此为android auto开发模式


25,明日又莞城
2015年11月24日14:54:19

--
senRsl
2015年10月19日18:11:09

没有评论 :

发表评论