build android(ubuntu12.04&JDK6)
来源:互联网 发布:linux源码在线阅读 编辑:程序博客网 时间:2024/05/22 15:37
1、Installing required packages (Ubuntu 12.04)
http://www.cnblogs.com/zhx831/p/3550688.html
2、Configuring USB Access
The recommended approach is to create a file/etc/udev/rules.d/51-android.rules
(as the root user) and to copy the following lines in it. <username>
must be replaced by the actual username of the user who is authorized to access the phones over USB.# adb protocol on passion (Nexus One)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>"# fastboot protocol on passion (Nexus One)SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="<username>"# adb protocol on crespo/crespo4g (Nexus S)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="<username>"# fastboot protocol on crespo/crespo4g (Nexus S)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="<username>"# adb protocol on stingray/wingray (Xoom)SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="<username>"# fastboot protocol on stingray/wingray (Xoom)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="<username>"# adb protocol on maguro/toro (Galaxy Nexus)SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="<username>"# fastboot protocol on maguro/toro (Galaxy Nexus)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="<username>"# adb protocol on panda (PandaBoard)SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="<username>"# adb protocol on panda (PandaBoard ES)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0600", OWNER="<username>"# fastboot protocol on panda (PandaBoard)SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="<username>"# usbboot protocol on panda (PandaBoard)SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", MODE="0600", OWNER="<username>"# usbboot protocol on panda (PandaBoard ES)SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0600", OWNER="<username>"# adb protocol on grouper/tilapia (Nexus 7)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0600", OWNER="<username>"# fastboot protocol on grouper/tilapia (Nexus 7)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0600", OWNER="<username>"# adb protocol on manta (Nexus 10)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0600", OWNER="<username>"# fastboot protocol on manta (Nexus 10)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee0", MODE="0600", OWNER="<username>"
3. Git Preparation works
1. Install ssh and related packages.
$ sudo apt-get install ssh
Apply an account in${sh-git-server}
Enable password-less SSHauthentication
Assuming that you have an account:magicyu@shgit.marvell.com for the Git server.
Createa RSA key on your development machine:
$ ssh-keygen -trsa
$ { the keys should be generated at~/.ssh/id_rsa and ~/.ssh/id_rsa.pub}the application would prompt you to enter apassphrase, pleaseDO NOT enterany password.
If you want to enable a more securepassword-less authentication, please checkhttp://www.ibm.com/developerworks/library/l-keyc2/ about using ssh-agent.
For example:
magicyu@magicyu-desktop:~$ssh-keygen -t rsa
Generating public/private dsa keypair.
Enter file in which to save the key(/home/magicyu/.ssh/id_rsa):
Enter passphrase (empty for nopassphrase):
Enter same passphrase again:
Your identification has been saved in/home/magicyu/.ssh/id_rsa.
Your public key has been saved in/home/magicyu/.ssh/id_rsa.pub.
The key fingerprint is:
96:f6:4a:10:9f:98:5e:e0:1d:f9:a1:d9:c8:bb:64:e7magicyu@magicyu-desktop
The key's randomart image is:
+--[ DSA 1024]----+
| |
| . |
| o o . |
| . O X . |
| = S o |
| . = o |
| . = o |
| + = |
| o E |
+-----------------+
Copy the RSA public key to shgit.marvell.com
$ scp~/.ssh/id_rsa.pubmagicyu@shgit.marvell.com:~/.ssh/authorized_keys
You may need tossh to shgit.marvell.com tocreate a .ssh folder firstly for yourself.
For example: scp ~/.ssh/id_rsa.pubmagicyu@shgit.marvell.com:~/.ssh/authorized_keys
ssh-add ~/.ssh/id_rsa
Now, the RSAauthentication has been enabled. You can give it a try by: $ sshmagicyu@$shgit.marvell.com. This time it won't prompt you with the password.
Tips: If you want to log on the gitserver with your ID on different hosts, you just need to create RSA file foreach host and cat it to the original one on the server.
Setthe default login user
If the login user is not specified in URL,ssh uses the current user name as the login user. If you use the same user namein your development machine andshgit.marvell.com, there won't be any problem. But if not, youneed edit the ssh configure file to specify the default login user. on yourdevelopment machine:
$ vim ~/.ssh/config $ {add the followinglines}
Host shgit.marvell.com
User <your user name onshgit.marvell.com >
For example:
Hostshgit.marvell.com
User magicyu
4. Developer using Git&Repo
Installing Repo
$ mkdir ~/bin
$ curl http://android.git.kernel.org/repo >~/bin/repo
$ chmod a+x ~/bin/repo
[export PATH=$PATH:~/bin] or [Add “export PATH=$PATH:~/bin “ to ~/ .bashrc for bash user.]
Setup Repo sync Androidbranches from ****mirror
For getting the source code faster, setuprepo sync from Marvell mirror server, not the android official site.
$ vim ~/.gitconfig
Then add the following 2 lines:
[url"ssh://shgit.****.com/git/android/"]
insteadOf=git://android.git.kernel.org/
Setup Working Directory andInitialize Repo:
$ mkdir working_directory
$ cd working_directory
$ repo init -ussh://shgit.marvell.com/git/android/platform/manifest.git -b pxa1928-kk4.4--repo-url ssh://shgit.marvell.com/git/android/tools/repo.git
repo init -u ssh://shgit.marvell.com/git/android/platform/manifest.git -b pxa1928-kk4.4 --repo-url ssh://shgit.marvell.com/git/android/tools/repo.git
repo init -u ssh://shgit.marvell.com/git/android/platform/manifest.git -b pxa1928-kk4.4 --repo-url ssh://shgit.marvell.com/git/android/tools/repo.gitSync Source Code
$ repo sync
5、Buid PXA Android
$ cd [android_dir]
$ source build/envsetup.sh
$ chooseproduct
Which product would youlike?[generic] dkb
$ exportANDROID_PREBUILT_MODULES=[android_dir]/kernel/out/modules
$ make -j4 #parallel compiling…
[Or if you want save log: $ mm showcommands 1>log2>&1 ]
Note : If there is no modules,Please export ANDROID_PREBUILT_MODULES=no_kernel_modules
After a while (30~60 minutes), thebinaries will be generated under [android_dir]/out/target/product/dkb/.
Note: Currently we use Androiddefault toolchain version: arm-eabi-4.4.0 to compile Android, kernel andtelephony. After you run choosecombo, you can check your PATH setting and makesure it has included the path for arm-eabi-4.4.0. Please don’t specify otherandroid toolchain version.
Config ADB
1. ADB Setup forUbuntu Desktop
Generate the file to /etc/udev/rules.d/
% sudo cat > /etc/udev/rules.d/50-android.rules << __EOF__
# Google vendor ID for ADB
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4",ATTRS{idProduct}=="0c02", MODE="0666"
__EOF__
% sudo cat > /etc/udev/rules.d/51-android.rules << __EOF__
# Google vendor ID for ADB
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4",ATTRS{idProduct}=="0c02", MODE="0666",SYNLINK+="android_adb"
__EOF__
2 Restart udevd
% sudo /etc/init.d/udev restart
- build android(ubuntu12.04&JDK6)
- Ubuntu12.04安装JDK6
- ubuntu12.04安装jdk6
- Ubuntu12.04安装JDK6
- ubuntu12.04 安装java jdk6
- Ubuntu12.04安装java jdk6
- ubuntu12.04 32bit 安装 JDK6
- install jdk6 on ubuntu12.04 amd64
- ubuntu12安装JDK6
- Ubuntu12.04安装Java6 JDK6 32位or64位
- Ubuntu12.10下安装jdk6
- Ubuntu12.04安装build环境问题解决
- [原创]在ubuntu12.04下build android kernel boot.bin无法开机解决办法
- ubuntu12.04下配置jdk6 6u38版的最新方法
- ubuntu12.04编译android
- 在ubuntu12.04下build自己的openjdk
- How to build the chromium on ubuntu12.04
- ubuntu12.04 破解sublime text2 2.02 build 2221
- fastjson 的简单使用
- 设计模式 外观模式 一键电影模式
- LA3026 - Period(KMP)
- 在sql server中利用with as实现递归功能
- Linux-2.6.20的LCD驱动分析
- build android(ubuntu12.04&JDK6)
- 新手指南:Linux上vi(vim)编辑器使用教程
- C# 4.0跨程序集使用"dynamic"
- bash history command
- HTML5中div section article的区别
- Entity Framework 数据生成选项DatabaseGenerated
- java使用xfire生成JSR181版WebService客户端
- 从程序员到CTO的Java技术路线图
- java开发SSM框架的搭建(SpringMVC+Spring+MyBatis)