Changes

Jump to: navigation, search

Motorola Moto G4 Play (motorola-harpia)

613 bytes removed, 08:27, 8 September 2018
no edit summary
== Contributors ==
* the-returning-void
 
== Maintainer(s) ==
 
== What works ==
* USB Networking
* Graphical display
* Xorg
* Modem (partially?)
* SMS
 
== What does not work ==
* Wifi (wlan0 device comes up with firmware and custom kernel)
 
== How to enter flash mode ==
Hold down POWER + Vol Down while booting to enter Flash Mode.
 
== Installation ==
<!-- add more sections below as necessary, e.g. Wifi, photos, ... -->
== Wifi ==
Configure your kernel and enable the prima wifi staging driver
<codesource> pmbootstrap menuconfig linux-motorola-harpia </code> <code>pmbootstrap build linux-motorola-harpia </codesource>
On the device
<codesource> apk add wcnss-wlan</code> <code>/etc/init.d/wcnss-wlan start</codesource>
== Firmware {Wifi/Modem} (TODO: package it) ==
On the device extract firmware
<codesource>cd /lib/firmware</code> <code>mkdir postmarketos</code> <code>cd postmarketos</code> <code>mount /dev/disk/by-partlabel/system /mnt</code> <code>cp -ap /mnt/etc/firmware/* /lib/firmware/postmarketos</code> <code>umount /mnt</code> <code>mount /dev/disk/by-partlabel/fsg /mnt</code> <code>cp -ap /mnt/* /lib/firmware/postmarketos</code> <code>umount /mnt</code> <code>mount /dev/disk/by-partlabel/modem /mnt</code> <code>cp -ap /mnt/image/* /lib/firmware/postmarketos</code> <code>umount /mnt</code> <code>mount /dev/disk/by-partlabel/persist /mnt</code> <code>mkdir -p wlan/prima</code> <code>cp -ap /mnt/WCNSS_wlan_dictionary.dat wlan/prima/</code> <code>umount /mnt</codesource>
Make a link in case the firmware path doesn't include /lib/firmware/postmarketos
<codesource>cd /lib/firmware</code> <code>ln -s /lib/firmware/postmarketos/* /lib/firmware/</codesource>
Make the necesary links for qcom_rmtfs
<codesource>cd /boot</code> <code>ln -s /dev/disk/by-partlabel/modemst1 modem_fs1</code> <code>ln -s /dev/disk/by-partlabel/modemst2 modem_fs2</code> <code>ln -s /dev/disk/by-partlabel/fsg modem_fsg</codesource
Install necessary software
 <codesource>apk add modem-qcom-msm-downstream-common qcom_rmtfs libsmdpkt_wrapper libqipcrtr4msmipc ofono</codesource>
Start the wcnss-wlan service to initialize the wifi card (helps the modem?)
<codesource>/etc/init.d/wcnss-wlan start</codesource>
Start a tmux for multiple windows
Start qcom_rmtfs on a terminal
<codesource>export LD_PRELOAD=/usr/lib/preload/libqipcrtr4msmipc.so</code> <code>qcom_rmtfs -v</codesource>
Start ofonod on another terminal
<codesource>export LD_PRELOAD=/usr/lib/preload/libsmdpkt_wrapper.so</code> <code>ofonod -d -n</codesource>
Send an SMS!
<codesource>export PHONE_NUMBER="<number to send sms to ex: 1234567890>"</code> <code>sudo dbus-send --print-reply --system --dest=org.ofono /gobi_0 org.ofono.Modem.SetProperty string:"Powered" variant:boolean:"true"</code> <code>sudo dbus-send --print-reply --system --dest=org.ofono /gobi_0 org.ofono.Modem.GetProperties</code> <code>sudo dbus-send --print-reply --system --dest=org.ofono /gobi_0 org.ofono.Modem.SetProperty string:"Online" variant:boolean:"true"</code> <code>sudo dbus-send --system --print-reply --dest=org.ofono /gobi_0 org.ofono.MessageManager.SendMessage string:"$PHONE_NUMBER" string:"Hello world! -postmarketOS"</codesource>
Receive SMS like this (might be spammy if you have other DBus apps):
309
edits

Navigation menu