Difference between revisions of "Moto G4 Play (motorola-harpia)"

From postmarketOS
Jump to: navigation, search
m
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Not booting]]
 
 
{{Infobox device
 
{{Infobox device
 
| manufacturer = Motorola
 
| manufacturer = Motorola
 
| name =  Moto G4 Play
 
| name =  Moto G4 Play
| codename = harpia
+
| codename = motorola-harpia
 
| image = File:Motorola_Moto_G4_Play.png
 
| image = File:Motorola_Moto_G4_Play.png
 
| imagecaption = Moto G4 Play running Weston
 
| imagecaption = Moto G4 Play running Weston
Line 14: Line 13:
 
| display = HD (720x1280)
 
| display = HD (720x1280)
 
| memory = 1GB or 2GB
 
| memory = 1GB or 2GB
 +
| architecture = armhf
 +
| status_usbnet = Y
 +
| status_flashing = Y
 +
| status_touch = Y
 +
| status_screen = Y
 +
| status_wifi =
 +
| status_xwayland =
 +
| status_fde =
 +
| status_mainline =
 +
| status_battery =
 +
| status_3d =
 +
| status_accel =
 +
| status_audio =
 +
| status_bluetooth =
 +
| status_camera =
 +
| status_gps =
 +
| status_mobiledata =
 +
| status_sms = P
 +
| status_calls =
 +
| booting = yes
 
}}
 
}}
  
 
== Contributors ==
 
== Contributors ==
 
* the-returning-void
 
* 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 ==
 
== How to enter flash mode ==
 
Hold down POWER + Vol Down while booting 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 ==
 
== Wifi ==
 
Configure your kernel and enable the prima wifi staging driver
 
Configure your kernel and enable the prima wifi staging driver
  
<code> pmbootstrap menuconfig linux-motorola-harpia </code>
+
<source>
<code>pmbootstrap build linux-motorola-harpia </code>
+
pmbootstrap menuconfig motorola-harpia
 +
pmbootstrap build linux-motorola-harpia
 +
</source>
  
 
On the device
 
On the device
  
<code> apk add wcnss-wlan</code>
+
<source>
 
+
apk add wcnss-wlan
<code>/etc/init.d/wcnss-wlan start</code>
+
/etc/init.d/wcnss-wlan start
 +
</source>
  
 
== Firmware {Wifi/Modem} (TODO: package it) ==
 
== Firmware {Wifi/Modem} (TODO: package it) ==
 
+
On the device extract firmware
<code>
+
<source>
#on the device extract firmware
 
 
cd /lib/firmware
 
cd /lib/firmware
 
mkdir postmarketos
 
mkdir postmarketos
 
cd postmarketos
 
cd postmarketos
 
+
mount /dev/disk/by-partlabel/system /mnt
mount /dev/disk/by-partlabel/system /mnt  
 
 
cp -ap /mnt/etc/firmware/* /lib/firmware/postmarketos
 
cp -ap /mnt/etc/firmware/* /lib/firmware/postmarketos
 
umount /mnt
 
umount /mnt
Line 71: Line 75:
 
cp -ap /mnt/WCNSS_wlan_dictionary.dat wlan/prima/
 
cp -ap /mnt/WCNSS_wlan_dictionary.dat wlan/prima/
 
umount /mnt
 
umount /mnt
 +
</source>
 +
 +
Make a link in case the firmware path doesn't include /lib/firmware/postmarketos
  
#make a link in case the firmware path doesn't include /lib/firmware/postmarketos
+
<source>
 
cd /lib/firmware
 
cd /lib/firmware
 
ln -s /lib/firmware/postmarketos/* /lib/firmware/
 
ln -s /lib/firmware/postmarketos/* /lib/firmware/
</code>
+
</source>
 +
 
  
 
== Modem ==
 
== Modem ==
 
Make the necesary links for qcom_rmtfs
 
Make the necesary links for qcom_rmtfs
<code>
+
 
 +
<source>
 
cd /boot
 
cd /boot
 
ln -s /dev/disk/by-partlabel/modemst1 modem_fs1
 
ln -s /dev/disk/by-partlabel/modemst1 modem_fs1
 
ln -s /dev/disk/by-partlabel/modemst2 modem_fs2
 
ln -s /dev/disk/by-partlabel/modemst2 modem_fs2
 
ln -s /dev/disk/by-partlabel/fsg modem_fsg
 
ln -s /dev/disk/by-partlabel/fsg modem_fsg
</code>
+
</source>
  
 
Install necessary software
 
Install necessary software
 
+
<source>apk add modem-qcom-msm-downstream-common qcom_rmtfs libsmdpkt_wrapper libqipcrtr4msmipc ofono</source>
<code>
 
apk add modem-qcom-msm-downstream-common qcom_rmtfs libsmdpkt_wrapper libqipcrtr4msmipc
 
</code>
 
  
 
Start the wcnss-wlan service to initialize the wifi card (helps the modem?)
 
Start the wcnss-wlan service to initialize the wifi card (helps the modem?)
<code>/etc/init.d/wcnss-wlan start</code>
+
<source>/etc/init.d/wcnss-wlan start</source>
  
 
Start a tmux for multiple windows
 
Start a tmux for multiple windows
Line 100: Line 106:
 
Start qcom_rmtfs on a terminal
 
Start qcom_rmtfs on a terminal
  
<code>
+
<source>
 
export LD_PRELOAD=/usr/lib/preload/libqipcrtr4msmipc.so
 
export LD_PRELOAD=/usr/lib/preload/libqipcrtr4msmipc.so
 
qcom_rmtfs -v
 
qcom_rmtfs -v
</code>
+
</source>
  
 
Start ofonod on another terminal
 
Start ofonod on another terminal
  
<code>
+
<source>
 
export LD_PRELOAD=/usr/lib/preload/libsmdpkt_wrapper.so
 
export LD_PRELOAD=/usr/lib/preload/libsmdpkt_wrapper.so
 
ofonod -d -n
 
ofonod -d -n
</code>
+
</source>
  
 
Send an SMS!
 
Send an SMS!
  
<code>
+
<source>
export PHONE_NUMBER="<number to send sms to ex: 1234567890>"
+
export PHONE_NUMBER="<number to send sms to ex: 1234567890>"</code>
 
 
 
sudo dbus-send --print-reply --system --dest=org.ofono /gobi_0 org.ofono.Modem.SetProperty string:"Powered" variant:boolean:"true"
 
sudo dbus-send --print-reply --system --dest=org.ofono /gobi_0 org.ofono.Modem.SetProperty string:"Powered" variant:boolean:"true"
 
sudo dbus-send --print-reply --system --dest=org.ofono /gobi_0 org.ofono.Modem.GetProperties
 
sudo dbus-send --print-reply --system --dest=org.ofono /gobi_0 org.ofono.Modem.GetProperties
 
sudo dbus-send --print-reply --system --dest=org.ofono /gobi_0 org.ofono.Modem.SetProperty string:"Online" variant:boolean:"true"
 
sudo dbus-send --print-reply --system --dest=org.ofono /gobi_0 org.ofono.Modem.SetProperty string:"Online" variant:boolean:"true"
 
sudo dbus-send --system --print-reply --dest=org.ofono /gobi_0 org.ofono.MessageManager.SendMessage string:"$PHONE_NUMBER" string:"Hello world! -postmarketOS"
 
sudo dbus-send --system --print-reply --dest=org.ofono /gobi_0 org.ofono.MessageManager.SendMessage string:"$PHONE_NUMBER" string:"Hello world! -postmarketOS"
 +
</source>
  
# receive SMS like this (might be spammy if you have other DBus apps):
+
Receive SMS like this (might be spammy if you have other DBus apps):
sudo dbus-monitor
+
<code>sudo dbus-monitor</code>
</code>
 
 
 
  
 
== See also ==
 
== See also ==

Latest revision as of 15:50, 2 October 2018

Motorola Moto G4 Play
Moto G4 Play running Weston
Moto G4 Play running Weston
Manufacturer Motorola
Name Moto G4 Play
Codename motorola-harpia
Released 2016
Original software Android 6.0.1
Hardware
Chipset Qualcomm MSM8916 Snapdragon 410
CPU Quad-core 1.21GHz Cortex A53
GPU Adreno 306
Display HD (720x1280)
Storage 8GB or 16GB
Memory 1GB or 2GB
Architecture armhf
Features
USB Networking
Works
Flashing
Works
Touchscreen
Works
Display
Works
WiFi
Xwayland
FDE
Mainline
Battery
3D Acceleration
Accelerometer
Audio
Bluetooth
Camera
GPS
Mobile data
SMS
Partial
Calls
USB OTG



Contributors

  • the-returning-void

How to enter flash mode

Hold down POWER + Vol Down while booting to enter Flash Mode.

Wifi

Configure your kernel and enable the prima wifi staging driver

pmbootstrap menuconfig motorola-harpia
pmbootstrap build linux-motorola-harpia

On the device

apk add wcnss-wlan
/etc/init.d/wcnss-wlan start

Firmware {Wifi/Modem} (TODO: package it)

On the device extract firmware

cd /lib/firmware
mkdir postmarketos
cd postmarketos
mount /dev/disk/by-partlabel/system /mnt
cp -ap /mnt/etc/firmware/* /lib/firmware/postmarketos
umount /mnt
mount /dev/disk/by-partlabel/fsg /mnt
cp -ap /mnt/* /lib/firmware/postmarketos
umount /mnt
mount /dev/disk/by-partlabel/modem /mnt
cp -ap /mnt/image/* /lib/firmware/postmarketos
umount /mnt
mount /dev/disk/by-partlabel/persist /mnt
mkdir -p wlan/prima
cp -ap /mnt/WCNSS_wlan_dictionary.dat wlan/prima/
umount /mnt

Make a link in case the firmware path doesn't include /lib/firmware/postmarketos

cd /lib/firmware
ln -s /lib/firmware/postmarketos/* /lib/firmware/


Modem

Make the necesary links for qcom_rmtfs

cd /boot
ln -s /dev/disk/by-partlabel/modemst1 modem_fs1
ln -s /dev/disk/by-partlabel/modemst2 modem_fs2
ln -s /dev/disk/by-partlabel/fsg modem_fsg

Install necessary software

apk add modem-qcom-msm-downstream-common qcom_rmtfs libsmdpkt_wrapper libqipcrtr4msmipc ofono

Start the wcnss-wlan service to initialize the wifi card (helps the modem?)

/etc/init.d/wcnss-wlan start

Start a tmux for multiple windows tmux

Start qcom_rmtfs on a terminal

export LD_PRELOAD=/usr/lib/preload/libqipcrtr4msmipc.so
qcom_rmtfs -v

Start ofonod on another terminal

export LD_PRELOAD=/usr/lib/preload/libsmdpkt_wrapper.so
ofonod -d -n

Send an SMS!

export PHONE_NUMBER="<number to send sms to ex: 1234567890>"</code>
sudo dbus-send --print-reply --system --dest=org.ofono /gobi_0 org.ofono.Modem.SetProperty string:"Powered" variant:boolean:"true"
sudo dbus-send --print-reply --system --dest=org.ofono /gobi_0 org.ofono.Modem.GetProperties
sudo dbus-send --print-reply --system --dest=org.ofono /gobi_0 org.ofono.Modem.SetProperty string:"Online" variant:boolean:"true"
sudo dbus-send --system --print-reply --dest=org.ofono /gobi_0 org.ofono.MessageManager.SendMessage string:"$PHONE_NUMBER" string:"Hello world! -postmarketOS"

Receive SMS like this (might be spammy if you have other DBus apps): sudo dbus-monitor

See also

  • Device requires msm-refresher to get a display past the boot splash, even though cat /sys/class/graphics/fb0/modes > /sys/class/graphics/fb0/mode doesn't fix the display
  • Steps outlined for Screen is blank outside of Weston is still required to get a display after the boot splash
  • Xorg starts with a blank display, to make the screen show ssh into the device and run sudo osk-sdl -t to fix display