Follow the official docs to install pmbootstrap in the host machine.
Run pmbootstrap init
, and use the following configuration:
- Channel: edge
- Vendor: motorola
- Device codename: ali
- Username:
- Provider: default
- User interface: none (as of now the display driver for Moto G6 is glitched so there is no visual interface available)
- Additional options (default values):
extra free space: 0 MB, boot partition size: 256 MB, parallel jobs: 9, ccache per arch: 5G, sudo timer: False, mirror: http://mirror.postmarketos.org/postmarketos/
- Extra packages:
vim,wget,wpa_supplicant
- Use this timezone: y
- Locale: en_US
- Device hostname:
- Build outdated packages: y
- Zap chroots: y
lk2nd is a bootloader for Qualcomm MSM devices, necessary to run PostmarketOS in this device. Clone the lk2nd fork for Moto G6 and compile it with these instructions:
cd lk2nd
make TOOLCHAIN_PREFIX=arm-none-eabi- msm8953-secondary
Reboot your device into Fastboot mode (press Volume Down
while booting), and then test the lk2nd with the command:
fastboot boot ./build-msm8953-secondary/lk2nd.img
If everything works well, you can now flash lk2nd. Reboot the device into Fastboot again and then run:
fastboot flash boot ./build-msm8953-secondary/lk2nd.img
Reboot the device into Fastboot if it is not already, then run:
pmbootstrap flasher flash_rootfs
pmbootstrap flasher boot
Reboot the device, and you should have PostmarketOS installed!
Connect the phone to the host machine via USB to SSH into it. It should be available automatically at 172.16.42.1
.
ssh user@172.16.42.1
The device likely won't have Wi-Fi configured for the first time. You can follow these instructions to route internet from the host machine to the phone through USB. This will be necessary to download the necessary packages to configure Wi-Fi.
Follow these instructionsh to configure networking.
If you'd like to configure a static IP address, you can modify your /etc/network/interfaces
file as below:
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet static
address 192.168.0.2/24
gateway 192.168.0.1
hostname foobar
After making sure everything is working, you can disconnect the USB and use the local network IP address to connect to the phone.