[LuvPad]nvflashでROM焼き
NVIDIAがTegra2向けにリリースしている開発者向けツール一式に nvflash と呼ばれるツールが含まれており、このnvflashを用いることで、LuvPadのパーティションを直接書き換えることができる(それ故に危険なツールでもあるので安易に使わない方が得策である)。
nvflashを含む開発者向けツールは以下のURLからダウンロードできる。
http://tegradeveloper.nvidia.com/tegra/downloads
「Android 2.2 (Froyo)」と書かれているmsiパッケージをダウンロードし、インストールするとインストール先に nvflash.exe が作成されている。
nvflashを使う上で bootloader を使用する必要があるが、標準のbootloaderを使用すると吸い出しや書き込みに失敗するため、LuvPad(SMB-A1011)向けの bootloader を別途用意する必要がある。
しかしながら、LuvPad向けのbootloaderは公開されていないので、ZPad(SMB-A1002)向けの bootloader を使用する。
ZPad向けのbootloaderは以下のURLよりダウンロードできる。
http://forum.tegratab.com/viewtopic.php?f=6&t=10
上記ファイルをダウンロード後、zipに含まれるupdate.zipを更に展開し、bootloader.binを取り出し、nvflash が存在するフォルダにコピーする。
これで、nvflashを使用する準備は完了。
…
まず、LuvPadのUSBケーブルを外してから、電源+Vol-キーを同時に押して起動するとAPXモードと呼ばれるモードで起動することが出来る(画面は真っ黒)。
次に、USBケーブルを接続するとドライバのインストールが始まる。
ドライバは nvflash のインストール先にある usbpcdriverフォルダ下にあるドライバを使用する。
以下の画像のようにデバイスマネージャーに「NVIDIA USB Boot-recovery driver for Mobile devices」という項目が表示されていればインストールは成功である。
…
nvflashは基本的に全てCUI(コマンドプロンプト)で操作を行う。
以下に代表的な操作を挙げる。
※コマンドを一回実行する度にLuvPadを再起動する必要があるので注意。
- パーティションの吸い出し
nvflash -w –bl bootloader.bin –read (パーティション番号) (出力ファイル名)
(オプション bl と read の前は ハイフン(-)が2個付いています。WordPress.comの仕様なのか、そのままコピペするとハイフンがうまくコピーされないので注意)
.- recovery領域のパーティション情報を吸い出す場合は
nvflash -w –bl bootloader.bin –read 9 recovery.img - system領域のパーティション情報を吸い出す場合は
nvflash -w –bl bootloader.bin –read 11 system.img
※system領域の読み込みはなぜか失敗するため、system領域のバックアップはClockworkMod Recoveryを使用することをお勧めする。
.
- recovery領域のパーティション情報を吸い出す場合は
- パーティションの書き込み
nvflash -w –bl bootloader.bin –download (パーティション番号) (入力ファイル名)
(オプション bl と download の前は ハイフン(-)が2個付いています)
.- recovery領域のパーティション情報を書き込む場合は
nvflash -w –bl bootloader.bin –download 9 recovery.img
※この方法で、ClockworkMod Recoveryのupdate.zipに含まれるrecovery.imgを直接書き込むこともできる。 - system領域のパーティション情報を書き込む場合は
nvflash -w –bl bootloader.bin –download 11 system.img
.
- recovery領域のパーティション情報を書き込む場合は
- 全パーティション情報の取得
nvflash -w –bl bootloader.bin –getpartitiontable luvpad_pt.txt
(オプション bl と getpartitiontable の前は ハイフン(-)が2個付いています)
.
おまけとして、LuvPadの全パーティション情報を以下に掲載する。
—
PartitionId=2
Name=BCT
DeviceId=19
StartSector=0
NumSectors=1536
BytesPerSector=2048
PartitionId=3
Name=PT
DeviceId=19
StartSector=1536
NumSectors=64
BytesPerSector=2048
PartitionId=4
Name=EBT
DeviceId=19
StartSector=1600
NumSectors=1024
BytesPerSector=2048
PartitionId=5
Name=MBT
DeviceId=19
StartSector=2624
NumSectors=64
BytesPerSector=2048
PartitionId=6
Name=BLO
DeviceId=19
StartSector=2688
NumSectors=2048
BytesPerSector=2048
PartitionId=7
Name=MSC
DeviceId=19
StartSector=4736
NumSectors=8192
BytesPerSector=2048
PartitionId=8
Name=OGO
DeviceId=19
StartSector=12928
NumSectors=16384
BytesPerSector=2048
PartitionId=9 #recovery.img
Name=SOS
DeviceId=19
StartSector=29312
NumSectors=8192
BytesPerSector=2048
PartitionId=10 #boot.img
Name=LNX
DeviceId=19
StartSector=37504
NumSectors=8192
BytesPerSector=2048
PartitionId=11#system.img
Name=APP
DeviceId=19
StartSector=45696
NumSectors=102400
BytesPerSector=2048
PartitionId=12
Name=CAC
DeviceId=19
StartSector=148096
NumSectors=111040
BytesPerSector=2048
—
PartitionIdの9番がrecovery領域、10番がboot領域、11番がsystem領域となる。