android10 (Q) go版本刷GSI失?。∕TK平臺)

android10 (Q) go版本刷GSI時候,提示如下錯誤:

$fastboot flash system system.img

Invalid sparse file format at header magic
Resizing 'system'                                  FAILED (remote: 'Not enough space to resize partition')
fastboot: error: Command failed

從提示的錯誤可以看出是空間不足,需要調(diào)整分區(qū)。

Android Q 開始有了super分區(qū),想要解決以上的問題,需要增加super分區(qū)的大小,增大分區(qū)后重新刷GSI,結(jié)果如下:

$fastboot flash system system.img

Invalid sparse file format at header magic
Resizing 'system'                                  OKAY [  0.007s]
Sending sparse 'system' 1/4 (261900 KB)            OKAY [ 23.725s]
Writing 'system'                                   OKAY [  4.112s]
Sending sparse 'system' 2/4 (261828 KB)            OKAY [ 23.732s]
Writing 'system'                                   OKAY [  4.986s]
Sending sparse 'system' 3/4 (262032 KB)            OKAY [ 23.334s]
Writing 'system'                                   OKAY [  5.008s]
Sending sparse 'system' 4/4 (49388 KB)             OKAY [  4.487s]
Writing 'system'                                   OKAY [  2.496s]
Finished. Total time: 100.740s

雖然可以刷GSI并正常開機(jī),但是仍有提示Invalid sparse file format at header magic?

這是由于fastboot支持的最大download size小于system.img的大小,需要分批下載來完成,
所以fastboot會將system.img轉(zhuǎn)成sparse file,出現(xiàn)該提示,目前沒有發(fā)現(xiàn)實質(zhì)性的影響。

可以通過 -S 來隱藏該提示

fastboot flash -S 800M system system.img

-S 的參數(shù)要大于system.img的大小即可

對于空間不足,還看到了另外一種方法,可以參考下:

Use the following command to delete the product partition and free up space for the system
partition. This provides extra space to flash the GSI:

$ fastboot delete-logical-partition product_a

The postfix “_a” should match the slot id of the system partition, such as “system_a” in this
example.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容