ラベル Nexus7 の投稿を表示しています。 すべての投稿を表示
ラベル Nexus7 の投稿を表示しています。 すべての投稿を表示

2018年9月12日水曜日

Nexus7 に FactoryImage をインストールして復活させる方法

概要

間違って /system などを削除してブートローダ以降 Android が起動しなくなったりすることがあります
そんな場合に Factory Image をインストールし直すことで復活することがあります

環境

  • macOS 10.13.6
  • Nexus7 (2012)
  • Factory Image (5.1.1 nakashi)

やり方

  • wget https://dl.google.com/dl/android/aosp/nakasi-lmy47v-factory-5a0bb059.zip
  • unzip nakasi-lmy47v-factory-5a0bb059.zip
  • cd nakasi-lmy47v
  • ./flash-all.sh

全ログ

(bootloader) Bootloader is already unlocked
OKAY [  0.018s]
Finished. Total time: 0.020s
Erasing 'boot'                                     OKAY [  0.171s]
Finished. Total time: 0.216s
******** Did you mean to fastboot format this ext4 partition?
Erasing 'cache'                                    OKAY [  0.130s]
Finished. Total time: 0.175s
Erasing 'recovery'                                 OKAY [  0.025s]
Finished. Total time: 0.070s
******** Did you mean to fastboot format this ext4 partition?
Erasing 'system'                                   OKAY [  0.166s]
Finished. Total time: 0.211s
******** Did you mean to fastboot format this ext4 partition?
Erasing 'userdata'                                 OKAY [  3.510s]
Finished. Total time: 3.556s
Sending 'bootloader' (2100 KB)                     OKAY [  0.278s]
Writing 'bootloader'                               OKAY [  1.227s]
Finished. Total time: 1.550s
rebooting into bootloader                          OKAY [  0.020s]
Finished. Total time: 0.020s
extracting android-info.txt (0 MB) to RAM...
--------------------------------------------
Bootloader Version...: 4.23
Baseband Version.....: N/A
Serial Number........: 015d3f1889401e0a
--------------------------------------------
Checking product                                   OKAY [  0.030s]
Checking version-bootloader                        OKAY [  0.020s]
extracting boot.img (5 MB) to disk... took 0.026s
archive does not contain 'boot.sig'
archive does not contain 'dtbo.img'
archive does not contain 'dt.img'
archive does not contain 'odm.img'
archive does not contain 'product.img'
extracting recovery.img (5 MB) to disk... took 0.022s
archive does not contain 'recovery.sig'
extracting system.img (634 MB) to disk... took 4.725s
archive does not contain 'system.sig'
archive does not contain 'vbmeta.img'
archive does not contain 'vendor.img'
mke2fs 1.43.3 (04-Sep-2016)
Creating filesystem with 3557120 4k blocks and 889440 inodes
Filesystem UUID: 38a9d4ae-bd16-4304-8491-43451e8518a3
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

mke2fs 1.43.3 (04-Sep-2016)
Creating filesystem with 113408 4k blocks and 113408 inodes
Filesystem UUID: dc58664c-1964-4c17-b029-bb11c10581c2
Superblock backups stored on blocks:
        32768, 98304

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

Sending 'boot' (5184 KB)                           OKAY [  0.650s]
Writing 'boot'                                     OKAY [  0.319s]
Sending 'recovery' (5738 KB)                       OKAY [  0.734s]
Writing 'recovery'                                 OKAY [  0.396s]
Sending 'system' (649455 KB)                       OKAY [ 81.857s]
Writing 'system'                                   OKAY [ 49.607s]
Erasing 'userdata'                                 OKAY [  2.268s]
Sending 'userdata' (4288 KB)                       OKAY [  0.568s]
Writing 'userdata'                                 OKAY [  2.622s]
Erasing 'cache'                                    OKAY [  0.087s]
Sending 'cache' (292 KB)                           OKAY [  0.063s]
Writing 'cache'                                    OKAY [  0.171s]
Rebooting                                          
Finished. Total time: 144.729s

これで unfortunately supersu has stopped も出なくなります

2018年9月11日火曜日

Nexus7 (2012) を Root 化してみた

概要

タイトルの通りやってみました
2012 と古いバージョンの Nexus7 になります
作業は自己責任でお願いします

環境

  • macOS 10.13.6
  • Nexus7 (2012)
  • TWRP
  • SuperSU

ADK (fastboot) のインストール

  • brew cask install android-platform-tools

SuperSU をダウンロードして Nexus7 に転送する

まずは電源 ON で普通に Android を起動します

ここから「SR5-SuperSU-v2.82-SR5-20171001224502.zip」をダウンロードします
ダウンロードしたファイルを Android file transfer などを使って Nexus7 に配置します
パスはどこでも OK ですが今回は /Android/data/SR5-SuperSU-v2.82-SR5-20171001224502.zip に配置しました

zip が Nexus7 にあればいいので Nexus7 で直接ファイルをダウンロードしても大丈夫かと思います
ただしその場合はパスがダウンロード用のパスになるので SuperSU をインストールする際にファイルを探す必要があります

カスタムリカバリイメージをインストールする

ここから Android っぽい作業になります
Android にはリカバリツールが標準でインストールされています
ただしそれだと SuperSU をインストールすることができません
なので zip を直接実行してインストールすることができるカスタムリカバリイメージをインストールします
ここから「openrecovery-twrp-2.8.5.1-grouper.img」をダウンロードしましょう

一旦電源を OFF しましょう
そして「電源」+「音量を下げるボタン」を同時に押しながら Nexus7 を起動します
すると以下のようなブートローダの画面になります
supersu1.jpg

ここでターミナルを立ち上げてダウンロードしたカスタムリカバリイメージのあるパスに移動します
そしてカスタムリカバリイメージを書き込みます

  • fastboot flash recovery openrecovery-twrp-2.8.5.1-grouper.img
sending 'recovery' (9426 KB)...
OKAY [  1.205s]
writing 'recovery'...
OKAY [  0.735s]
finished. total time: 1.940s

これで書き込み完了です
Nexus7 で音量を上げるボタンを 2 回押すと「Recovery mode」になるので電源ボタンを押して決定しリカバリーモードで起動します
supersu2.jpg

しばらくすると今回インストールしたカスタムリカバリイメージの「Team Win Recovery Project (TWRP)」が立ち上がります
supersu3.jpg

SuperSU をインストールする

TWRP の画面で一番左上の「Install」を選択します
そして先程 Nexus7 に配置した /Android/data/SR5-SuperSU-v2.82-SR5-20171001224502.zip を探します
どうやら /sdcard 配下にあるようなのでそこに移動しましょう
すると「SR5-SuperSU-v2.82-SR5-20171001224502.zip」があるので選択します
supersu4.jpg

そして「Swipe to Confirm Flash」でスワイプしてインストールします
supersu5.jpg

インストール中は以下のような感じです
supersu6.jpg

完了したら「Reboot System」を選択しましょう
supersu7.jpg

動作確認

Nexus7 が起動するとアプリ一覧に「SuperSU」があると思います
supersu8.jpg

設定画面は以下のような感じになっています
supersu9.jpg

最後に

今更ですが Nexus7 を Root 化してみました
ClockworkMod というカスタムリカバリイメージを使ってやってみましたができなかったので TWRP でやってみたらうまくできました