設定
→端末情報
→ビルド番号
を連打して、開発者向けオプション
を表示する設定
→開発者向けオプション
→OEMロック解除
とUSBデバッグ
を ON にする- 端末を USB 接続する
- 適当なシステムイメージをダウンロードする https://developer.android.com/about/versions/oreo/download.html#flashable-images
- zip ファイルを展開し、ダウンロードしたフォルダに移動する
cd angler-opr6.170623.013
$ adb reboot bootloader
$ fastboot flashing unlock
画面が遷移したら、電源ボタン(=YES)を押す
...
(bootloader) Please select 'YES' on screen if you want to continue...
(bootloader) Unlocking bootloader...
(bootloader) Unlocked!
OKAY [ 9.879s]
finished. total time: 9.879s
$ ./flash-all.sh
target reported max download size of 494927872 bytes
sending 'bootloader' (3552 KB)...
OKAY [ 0.115s]
writing 'bootloader'...
OKAY [ 0.210s]
finished. total time: 0.326s
rebooting into bootloader...
OKAY [ 0.022s]
finished. total time: 0.022s
< waiting for any device >
target reported max download size of 494927872 bytes
sending 'radio' (48728 KB)...
OKAY [ 1.215s]
writing 'radio'...
OKAY [ 3.218s]
finished. total time: 4.433s
rebooting into bootloader...
OKAY [ 0.022s]
finished. total time: 0.022s
target reported max download size of 494927872 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
archive does not contain 'system.sig'
archive does not contain 'vendor.sig'
wiping userdata...
Creating filesystem with parameters:
Size: 27419729920
Block size: 4096
Blocks per group: 32768
Inodes per group: 8176
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 6694270
Block groups: 205
Reserved block group size: 1024
Created filesystem with 11/1676080 inodes and 149233/6694270 blocks
wiping cache...
Creating filesystem with parameters:
Size: 104857600
Block size: 4096
Blocks per group: 32768
Inodes per group: 6400
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 25600
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/6400 inodes and 1438/25600 blocks
--------------------------------------------
Bootloader Version...: angler-03.73
Baseband Version.....: angler-03.84
Serial Number........: ENU7N15A20004825
--------------------------------------------
checking product...
OKAY [ 0.020s]
checking version-bootloader...
OKAY [ 0.021s]
checking version-baseband...
OKAY [ 0.020s]
sending 'boot' (12853 KB)...
OKAY [ 0.339s]
writing 'boot'...
OKAY [ 0.193s]
sending 'recovery' (18109 KB)...
OKAY [ 0.468s]
writing 'recovery'...
OKAY [ 0.261s]
erasing 'system'...
OKAY [ 0.566s]
sending sparse 'system' 1/5 (479645 KB)...
OKAY [ 11.953s]
writing 'system' 1/5...
OKAY [ 7.070s]
sending sparse 'system' 2/5 (477841 KB)...
OKAY [ 11.992s]
writing 'system' 2/5...
OKAY [ 6.976s]
sending sparse 'system' 3/5 (466087 KB)...
OKAY [ 11.636s]
writing 'system' 3/5...
OKAY [ 7.438s]
sending sparse 'system' 4/5 (477938 KB)...
OKAY [ 11.536s]
writing 'system' 4/5...
OKAY [ 6.936s]
sending sparse 'system' 5/5 (49108 KB)...
OKAY [ 1.271s]
writing 'system' 5/5...
OKAY [ 0.699s]
sending 'vendor' (187060 KB)...
OKAY [ 4.596s]
writing 'vendor'...
OKAY [ 3.156s]
erasing 'userdata'...
OKAY [ 1.862s]
sending 'userdata' (139001 KB)...
OKAY [ 3.398s]
writing 'userdata'...
OKAY [ 1.980s]
erasing 'cache'...
OKAY [ 0.098s]
sending 'cache' (5752 KB)...
OKAY [ 0.188s]
writing 'cache'...
OKAY [ 0.108s]
rebooting...
finished. total time: 94.854s
- Oreo 初期設定を済ませる
設定
→システム
→端末情報
→ビルド番号
を連打設定
→システム
→開発者向けオプション
→USBデバッグ
を ON にして、USB を抜いて、もう一度接続する$ adb reboot bootloader
- OEM をロックする
$ fastboot flashing lock
- 再び端末が初期化されます。再度 Oreo 初期設定を済ませて終了です
OEMロック解除
を行わない場合は手順 7 で以下のエラーが表示される。
$ fastboot flashing unlock
...
FAILED (remote: oem unlock is not allowed)
finished. total time: 0.020s