網路城邦
上一篇 回創作列表 下一篇   字體:
android build image
2014/04/09 16:39:00瀏覽319|回應0|推薦0

sudo apt-get install -y git gnupg flex bison gperf build-essential
sudo apt-get install -y zip curl libc6-dev
sudo apt-get install -y libncurses5-dev:i386
sudo apt-get install -y x11proto-core-dev
sudo apt-get install -y libx11-dev:i386
sudo apt-get install -y libreadline6-dev:i386
sudo apt-get install -y libgl1-mesa-glx:i386
sudo apt-get install -y libgl1-mesa-dev g++-multilib mingw32 tofrodos
sudo apt-get install -y python-markdown libxml2-utils xsltproc zlib1g-dev:i386
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

//-----------------

# adb protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="cat"
# fastboot protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="cat"
# adb protocol on crespo/crespo4g (Nexus S)
UBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="cat"
# fastboot protocol on crespo/crespo4g (Nexus S)
UBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="cat"
# adb protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="cat"
# fastboot protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="cat"
# adb protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="cat"
# fastboot protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="cat"
# adb protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="cat"
# adb protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0600", OWNER="cat"
# fastboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="cat"
# usbboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", MODE="0600", OWNER="cat"
# usbboot protocol on panda (PandaBoard ES)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0600", OWNER="cat"
# adb protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0600", OWNER="cat"
# fastboot protocol on grouper/tilapia (Nexus 7)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0600", OWNER="cat"
# adb protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0600", OWNER="cat"
# fastboot protocol on manta (Nexus 10)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee0", MODE="0600", OWNER=“cat"

echo 1 > /proc/sys/vm/drop_caches

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

中文版
原文版
 
 
前置知識: Android APK開發(會用到AVD)
 
Note:
 
ubuntu 一定要是64bit, 12.04 , 12.04.02 12.04.03 12.04.04都不能用
lsb_release -a
 
 
git download code約1hr
i5-2450 2.5G, VM disk 70G, VM ram 6G, build image約3hr
 
4.3_r2.1用的是JDK是1.6 (andorid 4.4 的JDK是1.7,)
JAVA安裝後,要確認是oracle版取代了原本的open JDK
 
build android-4.3_r2.1
~/bin/repo init -u https://android.googlesource.com/platform/manifest -b android-4.3_r2.1
 
因為AVD是跑在X86,所以用原生的gcc就可以,若是ARM的話,
(1)安JAVA後,要裝C creoss compiler
(2)download andorid source code後,要再打plateform patch (例如 change 2D HAL層)

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

用AVD驗証android-4.3_r2.1 的方式
android 4.3是API#18
 
假設你的android SDK在
c:\android\
c:\android\sdk
可以找到"AVD Manager.exe"
[New]一個AVD為test1,
 
AVD name:test1
Device:Nexus S
Target Android 4.3
 
在c:\Users\YourWin7\.android\avd\test1.avd會有相關文件產生
 
[Start] AVD "test1" ,預設AVD會去用
c:\android\sdk\system-images\android-18\armeabi-v7a\system.img
如果把system.img改名為system.x.img,則AVD就會開不起來,
 
把/out/target/product/generic/system.img拷到
c:\Users\YourWin7\.android\avd\test1.avd
 
則AVD就可以測試image
( 心情隨筆心情日記 )
回應 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=greatcat&aid=12377486