기술

fastboot을 이용한 플래싱

jayjean 2012. 1. 19. 15:10

또 다른 기초 지식으로 fastboot을 이용하여 usb를 통해 파티션 이미지를 심는 것에 대한 기본 설명.


http://www.freeyourandroid.com/guide/fastboot-guide
Fastboot Guide


Fastboot

What is Fastboot?

Fastboot is a command line tool used to directly flash the filesystem in Android devices from a host via USB. It allows flashing of unsigned partition images. It is disabled in most production devices since USB support has been disabled in the bootloader. In order to use Fastboot, you must have an unlocked bootloader or an Engineering SPL

Pre-requisites

- You must have ADB drivers installed for your device. Some devices have fastboot specific drivers too, so Google that for your device.
- Fastboot package, available HERE

Typical Partition Layout

 

recovery
N/A
A 'backup' kernel, initrd, and OS 
for system recovery / maintenance
mtdblock1
Can flash custom recovery.img (Amon_Ra, ClockworkMod, etc). 
boot
boot.img
The main kernel and ramdisk
mtdblock2
Can flash custom boot.img
system
system.img
The main OS
mtdblock3
This is the /system partition
cache
cache.img
Temp storage
mtdblock4
Unused. 
userdata
data.img
User data and settings
mtdblock5
This is the /data partition

Examples

Manual Nandroid restore
Make a Nandroid backup, and copy the folder off your SD card to your desktop.
cd ~/Desktop/path/to/backup/
fastboot flash userdata data.img
fastboot flash system system.img
fastboot flash boot boot.img
fastboot reboot
Flash Custom Recovery.img
fastboot flash recovery /path/to/.img
fastboot reboot
Flash Custom boot.img
You should make a Nandroid backup first, in case you need to recover your boot.img
fastboot flash boot /path/to/.img
fastboot reboot
Development
If you are developing a kernel, you may find it helpful to delete your boot.img and recovery.img to force booting into fastboot:
fastboot erase boot
fastboot erase recovery
You can then manually boot from your custom kernel and a ramdisk:
fastboot boot
Once you have a working kernel and ramdisk, you can automagically combine them within fastboot:
fastboot flash:raw boot

 

 

NOTE - THANKS TO THE CYANOGENMOD WIKI FOR THE BASE FOR THIS GUIDE