postmarketOS is a touch-optimized and pre-configured Alpine Linux. It can be installed on smartphones and other devices. It is in a very early, experimental state and not usable for most people yet.
pmbootstrapallows installation and development of pmOS.
- postmarketOS website and wiki
- pmbootstrap git repository
- postmarketOS on Mozilla Flame (t2m-flame)
- postmarketOS Installation Guide
- Mozilla guide on Flame (obsolete)
- Firefox OS initial setup on Flame
- Mirror of abandoned Mozilla Flame B2G builds
|CPU Architecture||ARMv7 Cortex A7|
|Chipset||Qualcomm MSM8210 Snapdragon 200|
|CPU||1.2GHZ Dual core processor|
|GPU||Qualcomm Adreno 302|
|Internal Storage||8 GiB|
|Display Size||4.5 Inches|
|Display Resolution||FWVGA (480 × 864 Pixels)|
|Rear Camera||5.0 Megapixels|
|Front Camera||2.0 Megapixels|
|Band GSM||850 / 900 / 1800 / 1900 MHz|
|Band UMTS||850 / 900 / 1900 / 2100 MHz|
|Battery Capacity||1,800 mAh|
|Dimensions||132.0 × 68.0 × 10.0 mm|
|USB network||After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system).|
|Flashing||It is possible to flash the device with |
|Touch||Touching the screen is recognized properly.|
|Screen||The device’s display is working.|
|WiFi||Connecting to wireless network is possible.|
|XWayland||Showing X11 applications in a Wayland compositor works.|
|FDE||Full disk encryption and unlocking with osk-sdl.|
|Mainline||Instead of a Linux kernel fork, it is possible to run mainline.|
|Battery||Charging the battery is possible.|
|3D acceleration||Hardware accelerated 3D graphics.|
|Accelerometers||The sensor that measures proper acceleration works.|
|Audio||Using the device’s speakers/headphone jack works.|
|Bluetooth||It’s possible to pair and use other devices via the bluetooth protocol.|
|Camera||Taking photos and videos works.|
|GPS||The Global Positioning System sensor works.|
|Mobile Data||Connecting to the Internet via cellular network.|
|SMS||Sending and receiving short messages works as intended.|
|Calls||Talking to other people over the cellular network.|
- If you don’t have Linux installed, please set up a virtual machine with VirtualBox first.
- Python 3.4+ and git must be installed.
- A few gigabytes of free space.
Start by cloning the pmbootstrap git repo.
$ git clone https://github.com/postmarketOS/pmbootstrap $ cd pmbootstrap
Initialize default configuration for your device. Make sure you specify
t2m-flame when asked. Also, select the
plasma-mobile user interface, unless you really want
weston. If you want no GUI, select
$ ./pmbootstrap.py init [20:33:01] Location of the 'work' path. Multiple chroots (native, device arch, device rootfs) will be created in there. [20:33:01] Work path [/home/user/.local/var/pmbootstrap]: [20:33:06] Target device (either an existing one, or a new one for porting). [20:33:06] Available (60): amazon-thor, asus-flo, asus-grouper, asus-t00f, asus-tf101, fairphone-fp2, google-glass, gp-peak, htc-ace, htc-bravo, huawei-angler, huawei-y530, leeco-s2, lenovo-karate, lg-d285, lg-d855, lg-dory, lg-h815, lg-hammerhead, lg-lenok, lg-mako, motorola-falcon, motorola-osprey, motorola-potter, motorola-shamu, motorola-titan, nextbit-robin, nokia-n9, nokia-n900, oneplus-bacon, oneplus-onyx, qemu-aarch64, qemu-amd64, qemu-vexpress, samsung-espresso10, samsung-i747m, samsung-i9003, samsung-i9070, samsung-i9100, samsung-i9195, samsung-i9305, samsung-i9505, samsung-klte, samsung-maguro, samsung-manta, samsung-n5110, samsung-n7100, samsung-s6500d, semc-anzu, sony-amami, sony-aries, sony-castor-windy, sony-honami, sony-scorpion, sony-yuga, t2m-flame, teclast-x80pro, wiko-lenny3, xiaomi-armani, xiaomi-ido [20:33:06] Device [samsung-i9100]: t2m-flame [20:33:11] Username [user]: [20:33:13] Available user interfaces (6): [20:33:13] * none: No graphical environment [20:33:13] * hildon: (X11) Lightweight GTK+2 UI (optimized for single-touch touchscreens) [20:33:13] * luna: (Wayland) webOS UI, ported from the LuneOS project (Not working yet) [20:33:13] * mate: (X11) MATE Desktop Environment, fork of GNOME2 (stylus recommended) [20:33:13] * plasma-mobile: (Wayland) Mobile variant of KDE Plasma, optimized for touchscreen [20:33:13] * weston: (Wayland) Reference compositor (demo, not a phone interface) [20:33:13] * xfce4: (X11) Lightweight GTK+2 desktop (stylus recommended) [20:33:13] User interface [weston]: plasma-mobile [20:33:20] Build options: Parallel jobs: 2, ccache per arch: 5G [20:33:20] Change them? (y/n) [n]: [20:33:23] Additional packages that will be installed to rootfs. Specify them in a comma separated list (e.g.: vim,file) or "none" [20:33:23] Extra packages [none]: [20:33:26] Your host timezone: Pacific/FJT [20:33:26] Use this timezone instead of GMT? (y/n) [y]: [20:33:28] WARNING: The applications in the chroots do not get updated automatically. [20:33:28] Run 'pmbootstrap zap' to delete all chroots once a day before working with pmbootstrap! [20:33:28] It only takes a few seconds, and all packages are cached. [20:33:28] Done!
The install action essentially does the following:
- build a chroot with the full installation as it will be placed on the device.
- copy that to an encrypted system image file.
- ask you for the user and encryption passwords.
$ ./pmbootstrap.py install --no-fde --sdcard /dev/mmcblkX
If you don’t have a SD card reader on your PC/laptop, use an USB adapter and adjust the device path accordingly.
$ ./pmbootstrap.py install --no-fde --sdcard /dev/sdb
Output should be similar to this.
$ ./pmbootstrap.py install --no-fde --sdcard=/dev/sdb [21:26:53] *** (1/5) PREPARE NATIVE CHROOT *** [21:26:54] (native) install alpine-base [21:26:56] (native) install cryptsetup util-linux e2fsprogs parted [21:26:56] *** (2/5) CREATE DEVICE ROOTFS ("t2m-flame") *** [21:26:57] (native) install qemu-user-static-repack qemu-user-static-repack-binfmt [21:26:59] Register qemu binfmt (arm) [21:26:59] (rootfs_t2m-flame) install alpine-base [21:27:09] (rootfs_t2m-flame) install postmarketos-base ttf-droid device-t2m-flame postmarketos-ui-plasma-mobile [21:29:33] (rootfs_t2m-flame) write /etc/os-release [21:29:35] (rootfs_t2m-flame) mkinitfs t2m-flame [21:29:41] *** SET LOGIN PASSWORD FOR: 'user' *** New password: Retype new password: passwd: password updated successfully [21:29:51] NOTE: No valid keymap specified for device [21:29:56] *** (3/5) PREPARE INSTALL BLOCKDEVICE *** [21:29:56] (native) mount /dev/install (host: /dev/sdb) [21:29:56] EVERYTHING ON /dev/sdb WILL BE ERASED! CONTINUE? (y/n) [n]: y [21:29:59] (native) partition /dev/install (boot: 37M, root: the rest) [21:30:01] (native) format /dev/installp2 [21:30:44] (native) mount /dev/installp2 to /mnt/install [21:30:45] (native) format /dev/installp1 (boot, ext2), mount to /mnt/install/boot [21:30:47] *** (4/5) FILL INSTALL BLOCKDEVICE *** [21:30:47] (native) copy rootfs_t2m-flame to /mnt/install/ [21:36:07] NOTE: Public SSH keys not found. Since no SSH keys were copied, you will need to use SSH password authentication! [21:37:04] *** (5/5) FLASHING TO DEVICE *** [21:37:04] Run the following to flash your installation to the target device: [21:37:04] * pmbootstrap flasher flash_kernel [21:37:04] Flashes the kernel + initramfs to your device: [21:37:04] /home/user/.local/var/pmbootstrap/chroot_rootfs_t2m-flame/boot [21:37:04] (NOTE: fastboot also supports booting the kernel/initramfs directly without flashing. Use 'pmbootstrap flasher boot' to do that.) [21:37:04] * If the above steps do not work, you can also create symlinks to the generated files with 'pmbootstrap export' and flash outside of pmbootstrap. [21:37:04] Done
After that, boot the phone into fastboot mode (power + volume down) and flash the boot partition.
$ ./pmbootstrap.py flasher flash_kernel [21:40:12] (rootfs_t2m-flame) mkinitfs t2m-flame [21:40:19] (native) flash kernel t2m-flame [21:40:20] (native) install android-tools target reported max download size of 301989888 bytes sending 'boot' (8670 KB)... OKAY [ 1.804s] writing 'boot'... OKAY [ 0.307s] finished. total time: 2.111s [21:40:29] You will get an IP automatically assigned to your USB interface shortly. [21:40:29] Then you can connect to your device using ssh after pmOS has booted: [21:40:29] ssh firstname.lastname@example.org [21:40:29] NOTE: If you enabled full disk encryption, you should make sure that osk-sdl has been properly configured for your device [21:40:29] Done
Place the SD card in your T2Mobile Flame device, reboot it and enjoy. You can also use ssh to your Flame device, by connecting the Flame with a microUSB cable to your PC/laptop.
$ ssh email@example.com
Since WiFi doesn’t work yet on the Flame device, you will need to enable internet through the USB cable, thus setting the PC/laptop as the gateway and let it do address translation for the smartphone.
On your PC/laptop, you need to enable IPv4 forwarding and add an
iptables rule that will perform masquerading (route traffic without disrupting the original traffic).
$ echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward > /dev/null $ sudo iptables -P FORWARD ACCEPT $ sudo iptables -A POSTROUTING -t nat -j MASQUERADE -s 172.16.42.0/24
On the Flame device, add a default gateway and DNS server (replace 18.104.22.168 with any DNS server you want).
$ sudo route add default gw 172.16.42.2 $ sudo echo nameserver 22.214.171.124 | sudo tee /etc/resolv.conf $ sudo echo 'route add default gw 172.16.42.2' > /etc/local.d/usb_internet.start $ sudo chmod +x /etc/local.d/usb_internet.start $ sudo rc-update add local
Takins screenshots is quite easy, just dump the contents of
/dev/fb0 device to a raw file, pull it off the device using scp and convert it to
On the device:
$ cat /dev/fb0 > ~/1.raw
On your PC/laptop:
$ scp firstname.lastname@example.org:/home/user/1.raw /tmp/flame-screenshots/ $ cd /tmp/flame-screenshots/ $ ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb24 -s 480x854 -i 1.raw -f image2 -vcodec png screenshot-1-%03d.png
And now, the screenshots.
Plasma Mobile is a Plasma variant for smartphones. KDE Plasma 5 is the fifth and current generation of the desktop environment created by KDE primarily for Linux systems.
Weston is the reference implementation of a Wayland compositor also developed by the Wayland project. It is written in C and published under the MIT License. Weston only has official support for the Linux operating system due to its dependence on certain features of the Linux kernel, such as kernel mode-setting, Graphics Execution Manager (GEM), and udev, which have not been implemented in other Unix-like operating systems.
Hildon is an application framework originally developed for mobile devices (PDAs, mobile phones, etc.) running the Linux operating system as well as the Symbian operating system.
Currently not working.
MATE is a desktop environment forked from the now-unmaintained code base of GNOME 2.
Currently not working.
License CC BY 4.0