Beginner for install Linux and *BSD in the inexpensive ARM and Intel based mobile devices in #COSCUP 2020
1. Aug 2020•0 gefällt mir
1 gefällt mir
Sei der Erste, dem dies gefällt
Mehr anzeigen
•9,165 Aufrufe
Aufrufe
Aufrufe insgesamt
0
Auf Slideshare
0
Aus Einbettungen
0
Anzahl der Einbettungen
0
Downloaden Sie, um offline zu lesen
Melden
Mobil
I will talk it in Taian COSCUP 2020, 8/2 15:30〜16:00 online.
Let's enjoy to install Linux for Beginner, in English
https://coscup.org/2020/zh-TW/agenda/AL73DQ
Please see it.
Thank you!
Beginner for install Linux and *BSD in the inexpensive ARM and Intel based mobile devices in #COSCUP 2020
Beginner for install Linux and *BSD in the inexpensive ARM
and Intel based mobile devices in COSCUP 2020
1、 自己紹介 Self introduction
2、Recently my activities
3、Install AOSP in Nexus7
4、Install postmarketOS in Nexus7
5、Install Wubi for Ubuntu
in Intel UMPC and WindowsTablet
6、Install Linux Core2Duo Macbook
7、NetBSD Teokure Live Images
This materials is in Slideshare.
@kapper1224
Gadget Hacking
User Group
Speaker:Kenji Shimono
COSCUP 2020 Taiawn
2020年8月2日 15:30〜16:00
Place: AU 視聽館
This Presentation:
Slideshare & PDF files
publication of my HP
http://kapper1224.sakura.ne.jp
Nexus7 2012
and Android 7.1.2 AOSP
自己紹介 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.
And I write my novels「Industrial revolutions in the otherworldy」 in Japan.
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
●
Recently used devices is very inexpensive and can install Linux.
So a lot of Mobile devices can install Linux and reuse it.
●
But Taiwan’s 二手 prices is very expensive, 2〜3 times as
expensive from Japan,I think it. So I recommended 二手 shopping.
二手Shop Tablet and SmartPhone in Taiwan
E-Bay Hongkong Buyee Yahoo Auction
from Japan(recommended!)
Hard・Off 品光數位 US3C & Auction
Yahoo奇摩拍賣 二手
Yahoo Auction Taiwan
Let’s Enjoy Linux in Taiwan!
●
Taiwan Linux community is very good. It’s style is hackason.
●
Japan Linux community is unconference presentations style,
is different Taiwan’s Linux community style.
Opensource conference is only online Zoom and Youtube
Live in Japan. Covid-19 is still remains...
https://www.youtube.com/c/OSPNjp
Used and JUNK Devices on Japan in 2020
RaspiZero
NanoPi
Raspi2,3,4 Thinkerboard
JetsonNano
Atom board
JetsonTK1
JetsonTX1
Win7 Notebook
8,10 Win Tablet
Core2Duo Macbook
T100TA,HA
2in1 Win Tab
Corei3,i5 Tab
Surface3Pro
GPD-Win
GPD-Pocket
Macbook Pro
Kobo
Touch,Glo
Kobo Aura
Kindle PapperWhite
2012〜2014
Galaxy Tab
Galaxy S2
Nexus7 2013
NexusPlayer
ME176C
Nexus5,5X
ZenPhone2
Nexus10
Nexus6,6P
PineTab
Pinebook
ThinClient
Atom
Netwalker
WindowsRT
Nokia N900
Linux Zaurus
Windows Phone DM200
Galaxy Nexus
Nexus7 2012
CoreM Win Tab
NANOTE
Surface3
Corei7 Macbook
W-Zero3
iPhone〜4
Kindle Fire HD
Kindle PapperWhite
2015〜2018
Nexus9
SurfaceRT
Xperia Z1〜Z5
TF101,TF201
Windows7
JUNK Tablet
G3,G4 iBook
TW06W
FCmini
PSClassic
DreamCast
PS2,XBOX,GC
PS3
XBOX360
1 board
ARM PDA
SmartPhone
Android
SmartPhone
Tablet
Windows
Tablet
Macbook
ThinClient
NAS
E-book
Calc
Game
Console
OpenWRT
Router
Nintendo
Switch
NSB-3NR1T1MLV
OpenBlocks
XperiaXA2
GooglePixel
OnePlus3,3T
XperiaX
Google
Pixel3XL
Gemini
PDA
PinePhone
PinebookPro
PS4
GL-MT
300N
Xiaomi MiReader
TI-Nspire
HP Prime
Lets Hack Linux!LowSpecCPU
〜US$40 〜US$60 〜US$100 〜US$150 〜US$200 US$300~
Used lowend Current
〜US$20〜US$10
iPhone7
Recently my hacking 「Xiaomi MiReader」
●
Xiaomi MiReader is E-book reader US$97(in Summer sale).
●
MiReader is Android 8.1 can install some 「.apk」 applications
「adb install」 command and the rooted device.
●
Spec:Allwinner B300 Cortex-A7 480〜1800MHz、1GB/16GB
●
Let's install Android apps and Linux chroot.
Kindle Reader
UserLAnd +
Debian,Ubuntu,Arch Opera WebBrowser
Limbo PC Emulater
+ Windows95
Let’s install Linux G3,G4 PowerPC iBook
●
G3, G4 based PowerPC iBook is not supported now.
No new Web browsers and so on…
●
But still supported Lubuntu16.04, Debian 8, Gentoo,Void
Linux, FreeBSD,OpenBSD,NetBSD in G3,G4 iBook.
●
G3,G4 Macbook has the CPU specs like RaspberryPi 1,
2… And the 二手 is US$10〜 only. (No one use it now…)
●
Linux can boot 「Option」key and PowerOn from USB and
DVD only. Let’s using Linux now.
G3 iBook boot Linux G4 PowerBook Lubuntu16.04G3 iBook Lubuntu16.04
Install Linux in ARM Android Devices
●
Custom ROM based Android
●
postmarketOS(Alpine Linux)
●
UBPorts
●
SailfishOS
●
And the others...
But this session is 30 min only.
⇒Today the report model is Nexus7 2012.
1.AOSP 7.1.2 Android CUSTOM ROM
2.postmarketOS Linux distributions
Supported Distributions in Nexus7 2012
●
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
Install Android 7.1.2 AOSP on Nexus7
1.Upgrade the newest Android version in Nexus7.
2.Connect Nexus7 to PC at Micro USB cable.
3.Change DeveloperMode in Android,check Hackable device,
disable OEMlock and enable USBDebug .
4.Install Android-tools(fastboot) in the mother PC.
5.「fastboot oem unlock」 in bootloader
6.Download AOSP, TWRP, Gapps about ZIP files.
7.Install TWRP 「fastboot flasher recovery twrp〜」 in Nexus7
8.Boot TWRP recovery mode and write AOSP ROM,
OpenGapps.
9.Reboot Nexus7 and Android 7.1.2 AOSP
Google USB driver in Windows
●
When connect PC and Android, need to use Google USB
driver in Windows. Download it from Google Website.
●
CustomROMs and some OS can install 「fastboot」 and 「adb」
commands, needs to install 「SDK Platform-Tools」.
●
Set Path about 「D:Program Files (x86)Androidplatform-
tools」 in Windows CMD. And type command 「adb」 to test it.
Google USB driver(Windows) SDK-Platform-Tools(Windows)
Adb shell on Linux and Nexus7
1.Nexus5 connect Linux, like Ubuntu. Please install android-
tools(fastboot).
2.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.Please see ID Vendoer in Google HP and write it.
https://developer.android.com/studio/run/device?hl=ja
4.「sudo service udev restart」 and 「adb shell」
/etc/udev/rules.d/51-android.rules
ASUS ID Vendor
Vendor ID in LinuxCompany names
Unlock Bootloader on Nexus7
1.When boot Nexus7, holding down Botton 「Power」 and 「sound
down」 together. Nexus7 is no locked bootloader.
2.Connect USB cable to the mother PC,
「sudo fastboot oem unlock」
3. Push 「unlock allowed Yes」 and reboot it.
Install TWRP and ROM in Nexus7
1.Download TWRP, AOSP ROM, OpenGapps(ARM,7.1,pico)
https://dl.twrp.me/grouper/
https://androidfilehost.com/?w=files&flid=117850
https://opengapps.org/
2.While Install 「fastboot flash recovery twrp-3.3.1-0-grouper.img」
in Nexus7.
fastboot flash recovery twrp-3.3.1-0-grouper.img
3. Boot TWRP from recovery and install ROM and OpenGapps.
adb push aosp_grouper-7.1.2-ota-2020xxxx.eng.ds.zip /sdcard
adb push open_gapps-arm-7.1-pico-2020xxxx.zip /sdcard
4.Copy imagefile flash_rootfs partations.
5.Reboot
This Screenshot is next slide...
low memory Problems old devices
●
Android 7.1.2 use 480MB memory, some applications are
shutdown now.
●
Android 7.1.2 and applications are OOM killer, it is too unstable
now. Let’s use SWAP file.
●
Next, To use Swapper 512MB need Root and Magisk. Magisk can
install TWRP. And FKM can use ZRAM 256MB, CPU is ondemand.
●
Nexus7 can play non supported apk application like Kankore and
FGO.
「Next」 Install postmarketOS
pmbootstrap.py on Nexus7
1.Download pmbootstrap.py from Github in Linux Device (Ubuntu,
ArchLinux PC)
git clone https://gitlab.com/postmarketOS/pmbootstrap
cd pmbootstrap/
2.While Install 「./pmbootstrap.py init」 command and select
devices, usernames, WM.
3. Download images and install 「./pmbootstrap.py install --fde」
4.Copy imagefile flash_rootfs partations.
./pmbootstrap.py flasher flash_rootfs --partition userdata
5.Format /system partations to boot /userdata
sudo fastboot format system
6. Write Kernel in Nexus7
./pmbootstrap.py flasher flash_kernel
7.Reboot Nexus7
./pmbootstrap.py shutdown
Storage problems in Nexus7
●
Old Android devices has / system is 650 MB bootpartitions only.
If you want to install the newer OS, it is too small to use it.
●
postmarketOS can boot / userdata partitions is the larger partitions
But it need to erase / system partitions to boot OS.
●
postmarketOS can boot it in SD card(MicroSD) and use 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
./pmbootstrap.py init
1.Download pmbootstrap.py from Github, postmarketOS can
install 「./pmbootstrap.py init」 command and select device
names.
●
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 ← Select device names
2.Select edge or stable release channnel
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)
./pmbootstrap.py init
3.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 ← Select WM
Boot XFCE4 in Nexus7 2012
●
After install / system command
「./pmbootstrap install」
「./pmbootstrap flasher flash_kernel」
「./pmbootstrap flasher flash_rootfs」
●
To boot Xfce4 in Nexus7. Need to use
xvkbd or onboard software keyboard.
●
Xfce4 can use NetworkManager and
Wifi after booting.
Add packages 「apk add」command
●
Let’s use Linux in Nexus7 2012
「Next Devices」
Install Linux in Intel x86 Devices
●
Intel Windows Tablet, StickPC UEFI32bit, 64bit
●
Intel UMPC、Notebook PC UEFI64bit
●
Intel CoreDuo〜Core2Duo Macbook UEFI 32bit
●
Legacy BIOS NotePC
But this session is 30 min only.
⇒Today report model is,
1.UMPC(like Windows Tablet)
2.Core2Duo Macbook
Install Linux in UMPC, Windows Tablet
●
A lot of Intel device can install Linux in Notebook PC,
StickPC,UMPC and WindowsTablet.
●
If you want to use Ubuntu and Android-x86, they can install
loopback images only double clicks in windows, like Wubi.
Ubuntu 20.04 Fedora32 OpenSUSE Tumbleweed
Debian buster Cloudready 78 Android-x86 9.0r2
Kernel4.19
Kernel5.3、5.4
Wubi for Ubuntu Dualboot
●
Development version Ubuntu can install Wubi and CMD 「--
isopath」option in Windows.
●
Copy Ubuntu ISO and Wubi’s EXE in each USB memory folder.
●
Install only double click in windows10.
(But development version Ubuntu can install CMD and 「--isopath」
options.
●
Insert username, password and storage. After install and reboot.
Install Wubi for Ubuntu
and Dualboot Windows10
Error 「no EFI partiton」, but it’s no problems in Wubi for
ubuntu.
Reboot and change boot settings in BIOS(UEFI)
●
Push 「ESC」 and 「F2」, boot BIOS Menu.
●
UMPC Boot WBM,so I change 「QuickBoot」 settings OFF in
BIOS.
●
Boot Wubi from 「Boot Override」 in BIOS menu.
Boot Ubuntu20.04 and screen inversion
●
Invert NANOTE and 「Unlock Screen Rotation」
●
Boot Ubuntu after upgrade it.
●
Please change mouse speed in gnome options.
「Unlock Screen Rotation」
「xrandr -o right」 and 「Autoboot application」
●
The screen rotation is 「xrandr -o right」, in xrandr.sh.
●
Add xrandr.sh in 「autoboot application」
●
nano xrandr.sh
#!/bin/bash
xrandr -o right
chmod +x xrandr.sh
Linux in JUNK US$40 Macbook
●
Core2Duo Macbook is UEFI32bit and OS64bit, Let’s play
Linux.
●
No supported MacOSX in Core2Duo Macbook now, No
operate Safari browser.
●
It is very inexpensive Macbook in JUNK and 二手.
Linux dualboot in Intel Macbook
●
Intel CoreDuo and Core2Duo Macbook can boot linux in
UEFI32bit.
●
Push 「Option」 keys and PowerOn, can boot USB and Linux.
●
Intel CoreDuo Macbook is UEFI32bit and OS32bit only.
Core2Duo’s are OS32 and 64bit supported.
●
Macbook is the higher CPU clocks than the others, So it is
not slow for the CPU generations.
Core i7 3520M Macbook Pro 2012
UEFI64bit, OS 64bit
US$45 Core2Duo Macbook 2007
UEFI64bit,OS 32 and 64bit
Recommended to install Linux in Macbook
●
Install Linux in HDD or USB memory
●
Diffrent install process in First CoreDuo Macbook.
First CoreDuo Macbook need to boot rEFInd on Linux.
BIOS
Boot
Boot
Mac
OSX
Resize
HFS+
CUI
disk
utils
Install
rEFInd
in HDD
Boot
Linux
USB
Memory
Install
HDD
Or
USB
Memory
Boot
Linux
Boot
Linux
USB
Memory
DVD-R
Install
HDD
Or
USB
Memory
Boot
Linux
Install
rEFInd
in HDD
Boot
Linux
USB
Memory
Install
HDD
Or
USB
Memory
Boot
Linux
Install
rEFInd
in HDD
Install
WIFI
Driver
Install
WIFI
Driver
Install
WIFI
Driver
CoreDuo
Core2Duo
Macbook HDD
Core2Duo
Macbook
USB boot
CoreDuo
Core2Duo
Macbook
USB boot
Install Linux process in Macbook
Diskbootloader rEFInd
●
In Mac, usually use rEFInd diskbootloader in Linux, Windows,
in root.
●
rEFInd also use chainbootloader to grub,MSM,MBM, NetBSD
bootloader, USB memory autoscanning it, can boot Legacy
BIOS OS like WinXP.
●
Download and install rEFInd in HDD(sda1:ESP partitions)
sudo refind-install –usedefault /dev/sda1
BIOS
rEF
Ind
Mac
OSX
Grub
Net
BSD
Boot
WBM
Intel Macbook Boot process(UEFI)
Linux
Chrome
OS
Android
WinXP
7,10
Net
BSD
USB
DVD
Linux
*BSD
rEFInd bootloader
Boot Linux in Core2Duo Macbook
●
Push「Option」key and PowerOn, after boot USB memory.
●
Push「C」key and PowerOn, after boot DVD-ROM(CD-ROM).
●
Macbook can use Liveimages and Thinclient OS, only to use
USB memory.
●
To use wifi in Linux and Macbook, add Broadcom wifi driver.
●
Linux can’t resize HFS+ HDD, so you need to use MacOSX
and diskutil CUI applications.
●
Install Linux in USB memory, it is dangerous to erase your
HDD.
HFS+ resize in MacOSX
●
To use MacOSX and Linux, resize HFS+
●
MacOSX’s GUI resize tools is freeze it, So you use diskutils
CUI tools.
●
$ diskutil list (The list of partations)
$ diskutil resizeVoluem /dev/disk0s2 50G
(resize HFS+ partations to **GB)
●
Don’t erase /dev/disk0s1 EFI partations.
●
Install Linux new partations and EFI partations.
●
To boot Linux in USB memory, and install rEFInd.
$ sudo refind-install –usedefault /dev/sda1
●
To boot and select Linux in rEFInd
Broadcom Wifi driver in Macbook
●
Macbook may be using broadcom driver.
●
Boot Linux after install broadcom driver.
In Ubuntu
$ sudo apt-get --reinstall install bcmwl-kernel-source
$ sudo modprobe -r b43 ssb wl brcmfmac brcmsmac bcma
$ sudo modprobe wl
●
In Debian, Add non-free repository.
deb http://http.debian.net/debian/ wheezy main contrib
non-free
$ sudo apt-get install linux-headers-$(uname -r|sed 's,[^-]*-
[^-]*-,,') broadcom-sta-dkms
$ sudo modprobe -r b44 b43 b43legacy ssb brcmsmac
$ sudo modprobe wl
Resize screensize in xrandr
●
Old Macbook is small screensize, Let’s resize xrandr in it.
●
Check xrandr command and Driver it.
$ xrandr
●
To use LVDS-1 driver in my Macbooks.
$ xrandr --output LVDS-1 --scale 1.25x1.25
●
Add .profile and boot it.
Difficult CoreDuo First Intel Macbook
●
First CoreDuo Macbook supported OS32bit and UEFI32bit
only, I recommended Debian and ArchLinux 32bit.
●
CoreDuo Macbook BIOS has the bugs and no boot USB
memory to push「Option」key and poweron. So Linux must
install rEFInd HDD and boot it.
●
Install rEFInd from MacOSX or removed HDD and install
rEFInd the other PCs.
●
Let’s install rEFInd and boot Linux CoreDuo Macbook.
NetBSD Teokure Live Images
●
Boot NetBSD teokure Live images from Core2Duo Macbook.
Push 「Option」 keys and poweron.
●
CoreDuo and Core i7 Macbook can’t boot it.
●
Autoreconized NetBSD bootloader in rEFInd.
Conclusions
●
A lot of inexpensive devices can install Linux,like
ARM Android, Intel devices and so on.
●
The third SmartPhoneOS can install some devices,
and developing now.
●
Easy to install Linux in Intel inexpensive Macbook.
●
Let’s use to install Wubi for Ubuntu in Windows.
●
Let’s install Linux and *BSD, and reuse it.
That’s all for today.
This presentation material in Slideshare.
Thank you very much.