android
[AOSP 빌드] 3. 빌드, 플래싱
097
2014. 8. 5. 17:43
#ref. http://thdev.net/498, http://yijoongwon.com/?p=119
#1. 안드로이드 명령셋 등록 http://source.android.com/source/building-running.html
~/temp# source build/envsetup.sh |
#2. 빌드 타겟 설정
http://source.android.com/source/building-devices.html#picking-and-building-the-configuration-that-matches-a-device
여기서 자신의 device를 확인하자.
~/temp# lunch full_grouper-userdebug or
~/temp# lunch
하여 선택 가능.
|
#3. 빌드
~/temp# make (or make -j3) |
#4. usb 설정
1. lsusb로 vendor:product 알아내기.
~/temp# lsusb |
2. /etc/udev/rules.d/xx-android.rules 에 규칙 추가. (xx = 두 자리 숫자 아무거나)
~/temp# gedit /etc/udev/rules.d/99-android.rules 에 # adb protocol on grouper/tilapia (Nexus 7) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0600", OWNER="<USER>" # fastboot protocol on grouper/tilapia (Nexus 7) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0600", OWNER="<USER>" 빨간 부분을 자신에 맞게 수정하여 추가. (4e40은 fastboot mode에서의 product id이다. 직접 fastboot mode에서 lsusb로 확인해 보시길.)
그리고 udev restart.
~/temp# service udev restart
|
#5. flashing http://source.android.com/source/building-devices.html
1. fastboot 모드로 진입.
~/temp# adb reboot bootloader or http://source.android.com/source/building-devices.html#booting-into-fastboot-mode 이렇게 수동으로 진입. |
2. flash
~/temp# fastboot flashall -w |
(-w 옵션은 device의 /data 파티션을 삭제함.)