Similar to はじめての超格安2,500円 Nexus7 2012改造と Android7.1.2 AOSP、postmarketOS in 2020 Beginner for Android 7.1.2 AOSP and postmarketOS in Nexus7 #oscnagoya (20)
はじめての超格安2,500円 Nexus7 2012改造と Android7.1.2 AOSP、postmarketOS in 2020 Beginner for Android 7.1.2 AOSP and postmarketOS in Nexus7 #oscnagoya
1. 1はじめての超格安2,500円 Nexus7 2012改造と
Android7.1.2 AOSP、postmarketOS in 2020
Beginner for Android 7.1.2 AOSP and postmarketOS in Nexus7
1、 自己紹介 Self introduction
2、Recently my activities
3、What’s AOSP and postmarketOS
4、Install AOSP in Nexus7
5、Install postmarketOS in Nexus7
5、Known issues
詳しい話はSlideshareで公開中
@kapper1224
Gadget Hacking
User Group
Speaker:Kapper
OSC2020 Online/Nagoya
2020年5月30日 13:30〜
Place: Online Zoom
This Presentation:
Slideshare & PDF files
publication of my HP
http://kapper1224.sakura.ne.jp
Nexus7 2012
and Android 7.1.2 AOSP
2. 2
自己紹介 Self Introduction
●
My name: Kapper
●
Twitter account:@kapper1224
●
HP:http://kapper1224.sakura.ne.jp
●
Slideshare: http://www.slideshare.net/kapper1224
●
Mastodon:https://pawoo.net/@kapper1224/
●
Facebook:https://www.facebook.com/kapper1224/
●
My Hobby:Linux、*BSD、and Mobile Devices
●
My favorite words:The records are the more important than the experiment.
●
Test Model:Netwalker(PC-Z1,T1)、Nokia N900、DynabookAZ、RaspberryPi
Nexus7(2012、2013)、Nexus5、Chromebook、Fx0(FirefoxOS)、
台湾Android電子辞書 無敵CD-920、CD-928,GPD-WIN、GPD-Pocket、
NANOTE、Windows Tablet、SailfishOS、UBPorts、postmarketOS
●
Recent my Activity:
Hacking Linux on Windows10 Tablet (Intel Atom) and Android Smartphone.
Hacking NetBSD and OpenBSD on UEFI and Windows Tablet.
I have been exhibiting in NT Nagoya, NT Kanazawa, Oogaki Mini MakerFaire.
I have over 200 Windows Tablet and 120 ARM Android, and test it now.
後、最近小説家になろうで異世界で製造業と産業革命の小説書いていますなう。
3. 3
Recently my activities
Sailfish X on Xperia X
Reports Linux on
Windows Tablet in Amazon Activities on NT, MakerFaire,Taiwan
NetBSD、OpenBSD、FreeBSD
Some Linux on Windows Tablet
postmarketOS on
Nexus5, Nexus7 2012
UBPorts on Nexus5
Nexus7 2013
10. 10
ジャンク¥4,500円MacbookでLinux
Linux in JUNK US$40 Macbook
●
Core2Duo世代はUEFI32bit、OS64bitでLinux動作。Winタブ
と同じ。Optionボタン押しながら起動でUSBメモリとLinux認識
Core2Duo Macbook is UEFI32bit and OS64bit, Let’s play Linux.
●
流石にCore2Duo世代ジャンク。サポートなし。safariブラウザNG
Non supported Core2Duo Macbook now, No operate Safari browser.
13. 13
中古、ジャンク ガジェット価格推定2020
~2000円~1000円 ~4000円 ~6000円 ~10千円 ~15千円 ~20千円 30千円~
RaspiZero
NanoPi
Raspi2,3,4 Thinkerboard
JetsonNano
Atom board
JetsonTK1
JetsonTX1
Miix2 8
Venue8Pro
8,10インチWinタブ
T100TA,HA
2in1 Winタブ
Corei3,i5タブ
Surface3Pro
GPD-Win
GPD-Pocket
Kobo
Touch,Glo
Kobo Aura
Kindle PapperWhite
2012〜2014
Galaxy Tab
Galaxy S2
Nexus7 2012
NexusPlayer
ME176C
Nexus5,5X
Nexus7 2013
ZenPhone2
Nexus9
Nexus6,6P
ThinClient
Atom
要改造(ハッキング)低スペックCPU
上級者・廃人ゾーン
ローエンド中古 現行機種
Netwalker
WindowsRT
Nokia N900
Linux Zaurus
Windows Phone DM200
KPD-701
7インチ中華
CoreM
Winタブ
NANOTE
Surface3
W-Zero3
iPhone~4
Kindle Fire HD
Kindle PapperWhite
2015〜2017
Nexus10
Xperia Z1~Z5
TF101,TF201
KindleFireHDX2013
Windows7
ジャンク
タブレット
TW06W
FCmini
PSClassic
DreamCast
PS2,XBOX,GC
PS3
XBOX360
1 board
ARM PDA
SmartPhone
Android
SmartPhone
Tablet
Windows
Tablet
ThinClient
NAS
E-book
Game
Console
OpenWRT
Router
Nintendo
Switch
NSB-3NR1T1MLV
XperiaXA2
GooglePixel
OnePlus3,3T
XperiaX
Google
Pixel3XL
Gemini
PDA
Pine
Phone
PS4
GL-MT
300N
14. 14
What's the Nexus7 2012?
●
現在2,500円前後で買える超格安タブレット。ヤフオクなら1,500円
Old Nexus7 can bought US$20〜, auctions in US$15...
●
RaspberryPi3相当スペック。頑張れば今でも使える必要最低限
postmarketOSならMainlineKernelが使える
Nexus7 specs like RaspberryPi3.postmarketOS can use mainlinekernel…?
●
安いので仮に壊しても痛くない。公式ROMが公開、いつでも戻せる
It is very inexpensive, easy hack, download official ROMs
●
過去に色々なOSが移植されていた。Android7.1.2AOSPサクサク
Android8.0以降はドライバが足りない。メモリがキツイ。
Nexus7 have only 1GB memory, attentions please.
postmarketOS Android7.1.2 AOSP Tizen Ubuntu13.04
16. 16
Supported Distributions
●
A lot of distributions are End of Life.
I recommended Android 7.1.2 and postmarketOS
Distribution Version Installer Multirom Root comments
Factoryimg ~5.1.1 ◎ - ○ End of Life
LineageOS ~10 △ ○ ○ Recommended 7.1.2
AOSP(and the others) ~10 △ ○ ○ Recommended 7.1.2
ArchLinux ? ? ○ End of Life
Bodhi Linux ~3.0 ○ ? ○ End of Life
Plasma Active ○ △ ○ End of Life
FirefoxOS ○ ? △ End of Life
Ubuntu Linux 12.10
~13.10
◎ ○ ◎ End of Life
Ubuntu Touch ○ ○ ◎ End of Life
Tizen ? ○ ○ End of Life
postmarketOS ◎ ◎ ◎ Mainline Kernel 5.6.0rc2
SalfishOS 2.0alpha △ △ △ Unofficial ROM End of Life
◎:official supported、◯:official reported、△:user reported
17. 17
Install Android 7.1.2 AOSP on Nexus7
1.Nexus7のAndroidを最新版までアップデート
Upgrade the newest Android version in Nexus7.
2.MicroUSBケーブルで母艦につなぎ接続確認
Connect Nexus7 to PC at Micro USB cable.
3.Androidでビルド番号をクリックして開発者モードにする。改造可否チェック。
その後、OEMロック解除とUSBデバッグをON
Change DeveloperMode in Android,check Hackable device, disable OEMlock and enable USBDebug .
4.PCにAndroid-tools(fastbootコマンド)をインストール
Install Android-tools(fastboot) in the mother PC.
5.ブートローダーをfastboot oem unlockする 「fastboot oem unlock」 in bootloader
6.AOSP、TWRP、Gappsをダウンロード
Download AOSP, TWRP, Gapps about ZIP files.
7.Nexus7にTWRPを焼く install TWRP 「fastboot flasher recovery twrp〜」 in Nexus7
8.リカバリモードでTWRPを起動してAOSPとGappsを焼く
Boot TWRP recovery mode and write AOSP ROM, OpenGapps.
9.再起動 Reboot Nexus7 and Android 7.1.2 AOSP
18. 18
Adb shell on Linux and Nexus7
1.Ubuntu Linuxなどの上でNexus7を認識出来る様にします。fastbootを入れる。
Nexus5 connect Linux, like Ubuntu. Please install android-tools(fastboot).
2.adb shell コマンドで繋がらない場合は、ATTRS{idVendor}を
/etc/udev/rules.d/51-android.rulesに書いて保存
If you don’t connect 「adb shell」 command it, Please write ATTRS{idVendor}〜 on
「/etc/udev/rules.d/51-android.rules」
sudo gedit /etc/udev/rules.d/51-android.rules
で下記文章をコピペして保存します。 Copy and paste it.
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", MODE="0666",
GROUP="plugdev"
3.各社のIDベンダー名はgoogleのHPに乗っています。 Please see ID Vendoer in Google HP
https://developer.android.com/studio/run/device?hl=ja
4.sudo service udev restartで認識。adb shellで動作確認
「sudo service udev restart」 and 「adb shell」
/etc/udev/rules.d/51-android.rules
ASUS ID Vendor
19. 19
Unlock Bootloader on Nexus7
●
1.Nexus7の電源ボタンと音声下ボタンを長押しして起動。ロックはかかって
いない。この画面が出れば復旧は可能
When boot Nexus7, holding down Botton 「Power」 and 「sound down」 together. Nexus7
is no locked bootloader.
2.母艦にUSBケーブルで繋いで「sudo fastboot oem unlock」
Connect USB cable to the mother PC,「sudo fastboot oem unlock」
●
3. unlock allowed Yesを確認する。Noだと改造できない注意
Push 「unlock allowed Yes」 and reboot it.
20. 20
Install TWRP and ROM in Nexus71.GithubからTWRP、ROM、OpenGapps(ARM,7.1,pico)をダウンロード
https://dl.twrp.me/grouper/
https://androidfilehost.com/?w=files&flid=117850
https://opengapps.org/
Download TWRP, ROM, OpenGapps(ARM,7.1,pico)
2.Nexus7のブートローダー画面でfastbootコマンドでTWRPを焼く
fastboot flash recovery twrp-3.3.1-0-grouper.img
While Install 「fastboot flash recovery twrp-3.3.1-0-grouper.img」 in Nexus7.
3. リカバリモードでTWRPを起動、InstallでROMとOpenGappsをコピー
本体にROMとOpenGappsのZIPをadb pushコマンドでコピーする
adb push aosp_grouper-7.1.2-ota-2020xxxx.eng.ds.zip /sdcard
adb push open_gapps-arm-7.1-pico-2020xxxx.zip /sdcard
Boot TWRP from recovery and install ROM and OpenGapps.
4.TWRPの画面でInstall画面を開きコピーしたZIPファイルを選びSWIPE
Copy imagefile flash_rootfs partations.
5.再起動 Reboot
22. 22
low memory Problems
Android 7.1.2は起動時に480MBもメモリを食うので足りない。
Android 7.1.2 use 480MB memory, some applications are shutdown now.
メモリ不足が原因でアプリが落ちる。OOM killer。非常に不安定。
Android 7.1.2 and applications are OOM killer, it is too unstable now. Let’s use SWAP file.
MagiskのZIPをTWRPで焼いて、root化してSwapper 512MBを入れ
れば安定化。さらにFranco Kernel ManagerでZRAMも256MB使用
する。(カスタムKernelは動かない?) CPUもondemand。
Nexu To use Swapper 512MB need Root and Magisk. Magisk can install TWRP. And FKM can use
ZRAM 256MB, CPU is ondemand.
本来サポート対象外のapkアプリも起動する。艦これやFGOとか。
Nexus7 can play non supported apk application like Kankore and FGO.
24. 24
pmbootstrap.py on Nexus7
1.Githubからpmbootstrap.pyをダウンロード
git clone https://gitlab.com/postmarketOS/pmbootstrap
cd pmbootstrap/
Download pmbootstrap.py from Github.
2.ターミナルからpmbootstrap.py init で機種の指定とユーザー名登録
./pmbootstrap.py init
While Install 「./pmbootstrap.py init」 command and select devices, usernames, WM.
3. pmbootstrap.py install –-fdeでイメージダウンロード、インストール
./pmbootstrap.py install --fde
Download images and install 「./pmbootstrap.py install --fde」
4.イメージファイルをNexus7の/userdataへコピー
./pmbootstrap.py flasher flash_rootfs --partition userdata
Copy imagefile flash_rootfs partations.
5./userdataから起動させるために、/Systemパーティションをフォーマット
Format /system partations to boot /userdata sudo fastboot format system
6.Kernelを書き込む Write Kernel
./pmbootstrap.py flasher flash_kernel
7.Nexus7をシャットダウンして再起動。 Reboot
./pmbootstrap.py shutdown
25. 25
Storage problems in Nexus7
●
重要な問題として/System領域が650 MBと非常に狭い。
In nexus7 2012, /system have 650MB is too small for Linux.
●
postmarketOSは/userdataからも起動可能。/systemを消す必要
インストール作業が若干複雑になる(特にカスタムROMなどが)
postmarketOS can boot /userdata and format /system
●
SDカードスロットがある機種はそこから起動も可能。
The devices has SD card slots, they can boot it.
●
Nexus 7 partition sizes (16Gb model) Android Nexus7 Partitions
…
Partition Name Partition Description by_name Size in Blocks Size in MB
mmcblk0p1 recovery SOS 12288 12MB
mmcblk0p2 boot LNX 8192 8MB
mmcblk0p3 system APP 665600 650MB
mmcblk0p4 cache CAC 453632 443MB
mmcblk0p5 misc MSC 512 0.5MB
mmcblk0p6 staging MSP 10240 10MB
mmcblk0p7 provisioned PER 5120 5MB
mmcblk0p8 unknown MDA 512 0.5MB
mmcblk0p9 userdata UDA 14103552 13773MB
mmcblk0boot0 2048 2MB
mmcblk0boot1 2048 2MB
Too small for postmarketOS
26. 26
./pmbootstrap.py init
1.Githubからpmbootstrap.py init を実行した後に機種を選択
Select vendors and devices.
●
Choose your target device vendor (either an existing one, or a new one for porting).
Available vendors (49): alcatel, amazon, asus, bq, chuwi, fairphone, finepower, fly, fujitsu,
google, gp, hisense, htc, huawei, infocus, jolla, leeco, lenovo, lg, medion, meizu,
motorola, nextbit, nobby, nokia, oneplus, oppo, ouya, pine64, planet, purism, qemu,
raspberry, samsung, semc, sharp, sony, surftab, t2m, tablet, teclast, tokio, wiko, wileyfox,
wingtech, xiaomi, yu, zte, zuk
Vendor [asus]: asus
Available codenames (9): duma, flo, grouper, me176c, t00f, tf101, tilapia, z00t, z00vd
Device codename [grouper]: grouper ← 機種名をコマンド入力
2.edge(ローリングリリース)かStable(開発中)を選択
select edge or stable
Choose the postmarketOS release channel. Available (2):
* edge: Rolling release channel
* stable: Stable release channel (first beta v20.05, does not have many devices yet)
27. 27
./pmbootstrap.py init
3.WMを選択。おすすめはmateとplasma-mobileとxfce4
Select WM. I recommended mate, plasma-mobile and xfce4.
●
Available user interfaces (12):
* none: No graphical environment
* gnome: (Wayland) Gnome Shell (not for armhf)
* i3wm: (X11) Tiling WM (keyboard required
* kodi: (Wayland) 10-foot UI useful on TV's
* mate: (X11) MATE Desktop Environment, fork of GNOME2 (stylus recommended)
* phosh: (Wayland) Mobile UI developed for the Librem 5 (works only with numeric
passwords!)
* plasma-desktop: (X11/Wayland) KDE Desktop Environment (works well with tablets)
* plasma-mobile: (Wayland) Mobile variant of KDE Plasma (slow without hardware
acceleration, allows only numeric passwords!)
* plasma-mobile-extras: Plasma Mobile with more apps pre-installed (video and music
players, pdf reader, etc.)
* shelli: Plain console with touchscreen gesture support
* sway: (Wayland) Tiling WM, drop-in replacement for i3wm (DOES NOT RUN WITHOUT
HW ACCELERATION!)
* weston: (Wayland) Reference compositor (demo, not a phone interface)
* xfce4: (X11) Lightweight GTK+2 desktop (stylus recommended)
User interface [xfce4]:xfce4 ← WMを入力して選択
29. 29
Boot XFCE4 in Nexus7 2012
●
Xfce4が無事起動。ソフトウェアキーボード必須。xvkvbかonboard
booting XFCE4 in Nexus7, need virtual keyboard like xvkbd or onboard
●
NetworkManagerが使えるのでWifi接続。apk addでパッケージ追加
Xfce4 can use NetworkManager and wifi. Add packages 「apk add」
●
後は自由に、Nexus7でLinuxタブレットライフを・・・
Let’s enjoy Linux in Nexus7