Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

nandroid restore のあとブートしない件

HT-03AにHEROカスタムROMを入れた。CyanogenMod 4.0.4 を経て、今使っているのはJACxHEROSkiv1.6r2 – MoDaCo custom Hero 1.51 mergeというやつ。

それはそれでちゃんと動いていて楽しんでいる。ところが、Cyanogen Recovery 1.4のメニューから restore latest backup をするとその後、決してブートしない。最初のDoCoMoの画面で固まったままである。そこから、電池を抜いて、リカバリーモードで起動することはできて、さらに、apply any zip from sd コマンドでROMをFlashすることはできる。その後はちゃんとブートする。

リカバリーモードで立ち上げて、コンソールに落として、中を見てみると、nandroid-mobile.sh というスクリプトがあり、nandroid backup/restore の実体はどうやらこれである。きっとこのシェルスクリプトを呼んでいるだけかもしれないな、と思ってコマンドプロンプトから手動で実行してみた。

するとこんなエラーメッセージが出て、boot.imgの書き込みに失敗している。

mtd: erase failure at 0x000c0000 (Input/output error)
mtd: erase failure at 0x000c0000 (Input/output error)
mtd: skipping write block at 0x000c0000
error writing boot: No space left on device

これって何? ひょっとしてNANDメモリが壊れてんのか?
なんかもう手が出ない領域のような感じなのでここまでで終了。しかし、なぜZIPファイルのApplyはうまくいって書き込みできるのかがよくわからない。不思議だ。

ともかく今はちゃんと動いているのでそのままにしてあまり触りたくない感じではある。

この件に関して、xda-developersのforumで聞いてみた。nandroid backup/restore と update ではboot.imgのサイズが異なるらしい。

http://forum.xda-developers.com/showpost.php?p=4506521&postcount=1496

いろいろ調べてわかったこと
・nandroidはShellスクリプトであり、restore には flash_image というコマンドを使っている。
・flash_image はFlash ROMへの書き込み前に Eraseを行うが、Bootパーティションの 0x000c0000 アドレス直後のブロックに不良があり、Eraseに失敗する。
・不良ブロックはスキップして書き込みを続ける。しかし、nandroid でBackupしたboot.imgはBootパーティションをまるごとダンプしたものなので、不良ブロックをスキップすると最後に書き込みスペースが足りないといって失敗する。
・リカバリーモードのメニューからの .zip ファイルの適用に関しては、bootパーティションのerase をせずにboot.img を書き込んでいるのでうまくいくようだ。たいていのカスタムROMのboot.imgのサイズは1.7M~2M程度、nandroid backup はbootパーティション全体をDumpするので boot.img のサイズが2.5Mある。
・最近の 10M RAM increase hack の boot.img など、Bootパーティションより小さなboot.imgならば、erase failure が出てもちゃんと書き込めているので、きちんとブートする。

PAGE TOP