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  Location of the 'work' path. Multiple chroots (native, device arch, device rootfs) will be created in there.  Work path [/home/user/.local/var/pmbootstrap]:  Target device (either an existing one, or a new one for porting).  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  Device [samsung-i9100]: t2m-flame  Username [user]:  Available user interfaces (6):  * none: No graphical environment  * hildon: (X11) Lightweight GTK+2 UI (optimized for single-touch touchscreens)  * luna: (Wayland) webOS UI, ported from the LuneOS project (Not working yet)  * mate: (X11) MATE Desktop Environment, fork of GNOME2 (stylus recommended)  * plasma-mobile: (Wayland) Mobile variant of KDE Plasma, optimized for touchscreen  * weston: (Wayland) Reference compositor (demo, not a phone interface)  * xfce4: (X11) Lightweight GTK+2 desktop (stylus recommended)  User interface [weston]: plasma-mobile  Build options: Parallel jobs: 2, ccache per arch: 5G  Change them? (y/n) [n]:  Additional packages that will be installed to rootfs. Specify them in a comma separated list (e.g.: vim,file) or "none"  Extra packages [none]:  Your host timezone: Pacific/FJT  Use this timezone instead of GMT? (y/n) [y]:  WARNING: The applications in the chroots do not get updated automatically.  Run 'pmbootstrap zap' to delete all chroots once a day before working with pmbootstrap!  It only takes a few seconds, and all packages are cached.  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  *** (1/5) PREPARE NATIVE CHROOT ***  (native) install alpine-base  (native) install cryptsetup util-linux e2fsprogs parted  *** (2/5) CREATE DEVICE ROOTFS ("t2m-flame") ***  (native) install qemu-user-static-repack qemu-user-static-repack-binfmt  Register qemu binfmt (arm)  (rootfs_t2m-flame) install alpine-base  (rootfs_t2m-flame) install postmarketos-base ttf-droid device-t2m-flame postmarketos-ui-plasma-mobile  (rootfs_t2m-flame) write /etc/os-release  (rootfs_t2m-flame) mkinitfs t2m-flame  *** SET LOGIN PASSWORD FOR: 'user' *** New password: Retype new password: passwd: password updated successfully  NOTE: No valid keymap specified for device  *** (3/5) PREPARE INSTALL BLOCKDEVICE ***  (native) mount /dev/install (host: /dev/sdb)  EVERYTHING ON /dev/sdb WILL BE ERASED! CONTINUE? (y/n) [n]: y  (native) partition /dev/install (boot: 37M, root: the rest)  (native) format /dev/installp2  (native) mount /dev/installp2 to /mnt/install  (native) format /dev/installp1 (boot, ext2), mount to /mnt/install/boot  *** (4/5) FILL INSTALL BLOCKDEVICE ***  (native) copy rootfs_t2m-flame to /mnt/install/  NOTE: Public SSH keys not found. Since no SSH keys were copied, you will need to use SSH password authentication!  *** (5/5) FLASHING TO DEVICE ***  Run the following to flash your installation to the target device:  * pmbootstrap flasher flash_kernel  Flashes the kernel + initramfs to your device:  /home/user/.local/var/pmbootstrap/chroot_rootfs_t2m-flame/boot  (NOTE: fastboot also supports booting the kernel/initramfs directly without flashing. Use 'pmbootstrap flasher boot' to do that.)  * If the above steps do not work, you can also create symlinks to the generated files with 'pmbootstrap export' and flash outside of pmbootstrap.  Done
After that, boot the phone into fastboot mode (power + volume down) and flash the boot partition.
$ ./pmbootstrap.py flasher flash_kernel  (rootfs_t2m-flame) mkinitfs t2m-flame  (native) flash kernel t2m-flame  (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  You will get an IP automatically assigned to your USB interface shortly.  Then you can connect to your device using ssh after pmOS has booted:  ssh firstname.lastname@example.org  NOTE: If you enabled full disk encryption, you should make sure that osk-sdl has been properly configured for your device  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