分散システムとポエム

Nexus7 2013(Wi-Fi)にAndroidのFactoryImageをMacを焼いてみる

SDK Managerを落としてくる

Google公式で配布されている中からAndroid Studioが含まれていないものを落とす。

Android Studio と SDK ツールをダウンロードする | Android Studio

wget https://dl.google.com/android/repository/sdk-tools-darwin-3859397.zip?hl=ja
mkdir work
cd $_
mv ../sdk-tools-darwin-3859397.zip .
unzip sdk-tools-darwin-3859397.zip

sdkmanagerを使ってplatoform-toolsを落とす

cd tools/bin
./sdkmanager --update
./sdkmanager --list
# platform-toolsのインストール
./sdkmanager platform-tools

Androidの開発者オプション

Andoridの設定にあるビルド番号を連打して開発者オプションを表示させる。

開発者オプションのUSBデバッグを有効化する。

FactoryImageをダウンロード

Factory Images for Nexus and Pixel Devices  |  Google APIs for Android  |  Google Developers

ここから自分のデバイスにあうファクトリーイメージをダウンロードする。

ダウンロードしたら展開する。スクリプト(bat, sh)があるので中を見てみると単にコマンドが羅列してあるだけだった。

書き込み

6.0.1 (MOB30X)

最初は6.0.1 (MOB30X)を4.4からあげようとしたが失敗した。

--------------------------------------------
Bootloader Version...: FLO-04.08
Baseband Version.....: none
Serial Number........: 0a0b3c1c
--------------------------------------------
checking product...
FAILED

Device product is 'flo'.
Update requires 'deb'.

finished. total time: 0.015s

5.1.1 (LMY48T)

次に5.1.1 (LMY48T)で試したところ成功した。

作業手順は以下。

参考: Factory Images for Nexus and Pixel Devices  |  Google APIs for Android  |  Google Developers

# bootloaderを表示
adb reboot bootloader

# 展開したスクリプトを実行する
# fastbootにパスを通さないとコマンドが無いと怒られる
./flash-all.sh
target didn't report max-download-size
sending 'bootloader' (3911 KB)...
OKAY [  0.141s]
writing 'bootloader'...
OKAY [  1.529s]
finished. total time: 1.671s
rebooting into bootloader...
OKAY [  0.006s]
finished. total time: 0.006s
extracting android-info.txt (0 MB)...
extracting boot.img (7 MB)...
target didn't report max-download-size
archive does not contain 'boot.sig'
archive does not contain 'dtbo.img'
archive does not contain 'dt.img'
extracting recovery.img (7 MB)...
archive does not contain 'recovery.sig'
extracting system.img (803 MB)...
archive does not contain 'system.sig'
archive does not contain 'vbmeta.img'
archive does not contain 'vendor.img'
wiping userdata...
Couldn't parse erase-block-size '0x'.
Couldn't parse logical-block-size '0x'.
Creating filesystem with parameters:
    Size: 28856791040
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8192
    Inode size: 256
    Journal blocks: 32768
    Label:
    Blocks: 7045115
    Block groups: 215
    Reserved block group size: 1024
Created filesystem with 11/1761280 inodes and 154578/7045115 blocks
wiping cache...
Couldn't parse erase-block-size '0x'.
Couldn't parse logical-block-size '0x'.
Creating filesystem with parameters:
    Size: 587202560
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 7168
    Inode size: 256
    Journal blocks: 2240
    Label:
    Blocks: 143360
    Block groups: 5
    Reserved block group size: 39
Created filesystem with 11/35840 inodes and 4616/143360 blocks
--------------------------------------------
Bootloader Version...: FLO-04.05
Baseband Version.....: none
Serial Number........: 0a0b3c1c
--------------------------------------------
checking product...
OKAY [  0.003s]
checking version-bootloader...
OKAY [  0.004s]
sending 'boot' (7256 KB)...
OKAY [  0.260s]
writing 'boot'...
OKAY [  1.056s]
sending 'recovery' (7860 KB)...
OKAY [  0.282s]
writing 'recovery'...
OKAY [  0.299s]
erasing 'system'...
OKAY [  1.596s]
sending 'system' (823014 KB)...
OKAY [ 27.928s]
writing 'system'...
OKAY [ 76.871s]
erasing 'userdata'...
OKAY [ 57.296s]
sending 'userdata' (139085 KB)...
OKAY [  4.784s]
writing 'userdata'...
OKAY [  6.232s]
erasing 'cache'...
OKAY [  0.975s]
sending 'cache' (10984 KB)...
OKAY [  0.385s]
writing 'cache'...
OKAY [  0.503s]
rebooting...

finished. total time: 178.491s

うまく行けば4色のドットが飛び交う画面がしばらく表示されてセットアップ画面が表示される。

相性とか組み合わせがあるらし

[Update: Nexus 6] [Flash All The Things] October Lollipop Security And Android 6.0 Marshmallow Nexus OTA Roundup

このサイトによるとNexus 2013 Wi-Fi

5.1.1 LMY48M -> 6.0 MRA58K

とのことなのでこの順番で焼いてみる。

5.1.1 (LMY48M)

ダウロードして焼いたら成功した。

./flash-all.sh
target didn't report max-download-size
sending 'bootloader' (3911 KB)...
OKAY [  0.130s]
writing 'bootloader'...
OKAY [  1.375s]
finished. total time: 1.505s
rebooting into bootloader...
OKAY [  0.006s]
finished. total time: 0.006s
extracting android-info.txt (0 MB)...
extracting boot.img (7 MB)...
target didn't report max-download-size
archive does not contain 'boot.sig'
archive does not contain 'dtbo.img'
archive does not contain 'dt.img'
extracting recovery.img (7 MB)...
archive does not contain 'recovery.sig'
extracting system.img (803 MB)...
archive does not contain 'system.sig'
archive does not contain 'vbmeta.img'
archive does not contain 'vendor.img'
wiping userdata...
Couldn't parse erase-block-size '0x'.
Couldn't parse logical-block-size '0x'.
Creating filesystem with parameters:
    Size: 28856791040
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8192
    Inode size: 256
    Journal blocks: 32768
    Label:
    Blocks: 7045115
    Block groups: 215
    Reserved block group size: 1024
Created filesystem with 11/1761280 inodes and 154578/7045115 blocks
wiping cache...
Couldn't parse erase-block-size '0x'.
Couldn't parse logical-block-size '0x'.
Creating filesystem with parameters:
    Size: 587202560
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 7168
    Inode size: 256
    Journal blocks: 2240
    Label:
    Blocks: 143360
    Block groups: 5
    Reserved block group size: 39
Created filesystem with 11/35840 inodes and 4616/143360 blocks
--------------------------------------------
Bootloader Version...: FLO-04.05
Baseband Version.....: none
Serial Number........: 0a0b3c1c
--------------------------------------------
checking product...
OKAY [  0.003s]
checking version-bootloader...
OKAY [  0.004s]
sending 'boot' (7256 KB)...
OKAY [  0.240s]
writing 'boot'...
OKAY [  0.370s]
sending 'recovery' (7860 KB)...
OKAY [  0.262s]
writing 'recovery'...
OKAY [  0.299s]
erasing 'system'...
OKAY [  1.385s]
sending 'system' (822754 KB)...
OKAY [ 27.781s]
writing 'system'...
OKAY [ 38.190s]
erasing 'userdata'...
OKAY [ 20.386s]
sending 'userdata' (139085 KB)...
OKAY [  4.736s]
writing 'userdata'...
OKAY [  6.128s]
erasing 'cache'...
OKAY [  0.804s]
sending 'cache' (10984 KB)...
OKAY [  0.363s]
writing 'cache'...
OKAY [  0.502s]
rebooting...

finished. total time: 101.470s

6.0 (MRA58K)

手順に従って焼いてみる

./flash-all.sh
target didn't report max-download-size
sending 'bootloader' (3911 KB)...
OKAY [  0.143s]
writing 'bootloader'...
OKAY [  1.281s]
finished. total time: 1.425s
rebooting into bootloader...
OKAY [  0.006s]
finished. total time: 0.006s
extracting android-info.txt (0 MB)...
extracting boot.img (7 MB)...
target didn't report max-download-size
archive does not contain 'boot.sig'
archive does not contain 'dtbo.img'
archive does not contain 'dt.img'
extracting recovery.img (8 MB)...
archive does not contain 'recovery.sig'
extracting system.img (819 MB)...
archive does not contain 'system.sig'
archive does not contain 'vbmeta.img'
archive does not contain 'vendor.img'
wiping userdata...
Couldn't parse erase-block-size '0x'.
Couldn't parse logical-block-size '0x'.
Creating filesystem with parameters:
    Size: 28856791040
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8192
    Inode size: 256
    Journal blocks: 32768
    Label:
    Blocks: 7045115
    Block groups: 215
    Reserved block group size: 1024
Created filesystem with 11/1761280 inodes and 154578/7045115 blocks
wiping cache...
Couldn't parse erase-block-size '0x'.
Couldn't parse logical-block-size '0x'.
Creating filesystem with parameters:
    Size: 587202560
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 7168
    Inode size: 256
    Journal blocks: 2240
    Label:
    Blocks: 143360
    Block groups: 5
    Reserved block group size: 39
Created filesystem with 11/35840 inodes and 4616/143360 blocks
--------------------------------------------
Bootloader Version...: FLO-04.05
Baseband Version.....: none
Serial Number........: 0a0b3c1c
--------------------------------------------
checking product...
OKAY [  0.003s]
checking version-bootloader...
OKAY [  0.004s]
sending 'boot' (7448 KB)...
OKAY [  0.258s]
writing 'boot'...
OKAY [  0.398s]
sending 'recovery' (8194 KB)...
OKAY [  0.290s]
writing 'recovery'...
OKAY [  0.326s]
erasing 'system'...
OKAY [  1.168s]
sending 'system' (839465 KB)...
OKAY [ 28.754s]
writing 'system'...
OKAY [ 39.854s]
erasing 'userdata'...
OKAY [ 20.038s]
sending 'userdata' (139085 KB)...
OKAY [  4.780s]
writing 'userdata'...
OKAY [  6.132s]
erasing 'cache'...
OKAY [  0.740s]
sending 'cache' (10984 KB)...
OKAY [  0.384s]
writing 'cache'...
OKAY [  0.502s]
rebooting...

finished. total time: 103.648s

上手く焼けた。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です