Jump to content

Motorola Moto G4 Play (motorola-harpia): Difference between revisions

From postmarketOS Wiki
Halamix2 (talk | contribs)
mNo edit summary
Sorixelle (talk | contribs)
Add information relevant to mainline distribution in pmaports
Line 18: Line 18:
| status_touch = Y
| status_touch = Y
| status_screen = Y
| status_screen = Y
| status_wifi =  
| status_wifi = Y
| status_xwayland =  
| status_xwayland = Y
| status_fde =  
| status_fde =  
| status_mainline =  
| status_mainline = Y
| status_battery =
| status_battery =
| status_3d =  
| status_3d = N
| status_accel =  
| status_accel =  
| status_audio =  
| status_audio =  
Line 30: Line 30:
| status_gps =  
| status_gps =  
| status_mobiledata =  
| status_mobiledata =  
| status_sms = P
| status_sms =  
| status_calls =  
| status_calls =  
| booting = yes
| booting = yes
}}
}}
== Users owning this device ==
{{Device owners}}


== Contributors ==
== Contributors ==
* the-returning-void
* Sorixelle


== 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.


== Wifi ==
== Installation ==
Configure your kernel and enable the prima wifi staging driver
As some features are still in development for this device, the kernel needs to be built from source using envkernel. To do this, you'll need a copy of
 
[https://gitlab.com/postmarketOS/pmbootstrap/blob/master/helpers/envkernel.sh envkernel.sh], and the [https://github.com/msm8916-mainline/linux latest kernel tree]
<source>
for the device. Once you have those, and you have run <code>pmbootstrap init</code>, run the following commands:
pmbootstrap menuconfig motorola-harpia
pmbootstrap build linux-motorola-harpia
</source>
 
On the device
 
<source>
apk add wcnss-wlan
/etc/init.d/wcnss-wlan start
</source>
 
== Firmware {Wifi/Modem} (TODO: package it) ==
On the device extract firmware
<source>
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
</source>
 
Make a link in case the firmware path doesn't include /lib/firmware/postmarketos
 
<source>
cd /lib/firmware
ln -s /lib/firmware/postmarketos/* /lib/firmware/
</source>
 
 
== Modem ==
Make the necesary links for qcom_rmtfs
 
<source>
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
</source>
 
Install necessary software
<source>apk add modem-qcom-msm-downstream-common qcom_rmtfs libsmdpkt_wrapper libqipcrtr4msmipc ofono</source>
 
Start the wcnss-wlan service to initialize the wifi card (helps the modem?)
<source>/etc/init.d/wcnss-wlan start</source>
 
Start a tmux for multiple windows
<code>tmux</code>
 
Start qcom_rmtfs on a terminal
 
<source>
export LD_PRELOAD=/usr/lib/preload/libqipcrtr4msmipc.so
qcom_rmtfs -v
</source>
 
Start ofonod on another terminal
 
<source>
export LD_PRELOAD=/usr/lib/preload/libsmdpkt_wrapper.so
ofonod -d -n
</source>
 
Send an SMS!


<source>
<source>
export PHONE_NUMBER="<number to send sms to ex: 1234567890>"</code>
cd /path/to/linux/kernel
sudo dbus-send --print-reply --system --dest=org.ofono /gobi_0 org.ofono.Modem.SetProperty string:"Powered" variant:boolean:"true"
source /path/to/envkernel.sh
sudo dbus-send --print-reply --system --dest=org.ofono /gobi_0 org.ofono.Modem.GetProperties
make msm8916_defconfig pmos.config
sudo dbus-send --print-reply --system --dest=org.ofono /gobi_0 org.ofono.Modem.SetProperty string:"Online" variant:boolean:"true"
make -j<cores>
sudo dbus-send --system --print-reply --dest=org.ofono /gobi_0 org.ofono.MessageManager.SendMessage string:"$PHONE_NUMBER" string:"Hello world! -postmarketOS"
pmbootstrap build --envkernel linux-postmarketos-qcom-msm8916
</source>
</source>


Receive SMS like this (might be spammy if you have other DBus apps):
After that, proceed with [[Installation_guide#Installation_and_flashing|installation]] as usual.
<code>sudo dbus-monitor</code>


== See also ==
== See also ==
* Device requires msm-refresher to get a display past the boot splash, even though <code>cat /sys/class/graphics/fb0/modes > /sys/class/graphics/fb0/mode</code> doesn't fix the display
* [https://gitlab.com/postmarketOS/pmaports/tree/master/device/device-motorola-harpia Device package]
* Steps outlined for [[Troubleshooting:display#Screen_is_blank_outside_of_Weston|Screen is blank outside of Weston]] is still required to get a display after the boot splash
* [https://github.com/Sorixelle/linux Development kernel tree]
* Xorg starts with a blank display, to make the screen show ssh into the device and run <code>sudo osk-sdl -t</code> to fix display

Revision as of 13:36, 1 February 2020

Warning WARNING: This device is not recommended for future use with postmarketOS due to its armhf architecture. Alpine Linux (the distribution that postmarketOS extends) pmaports#599 has been considering dropping it.
The processor of the device may support the armv7 architecture. If so, you can modify the device package and change the architecture accordingly.
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
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
Software
Original software Android 6.0.1
postmarketOS
Category testing
Pre-built images no
Mainline yes
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
No data
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Broken
Audio
No data
Camera
No data
Camera Flash
No data
Connectivity
WiFi
Works
Bluetooth
No data
GPS
No data
NFC
No data
Modem
Calls
No data
SMS
No data
Mobile data
No data
Miscellaneous
FDE
No data
USB OTG
No data
HDMI/DP
No data
Sensors
Accelerometer
No data
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data


Users owning this device


Contributors

  • Sorixelle

How to enter flash mode

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

Installation

As some features are still in development for this device, the kernel needs to be built from source using envkernel. To do this, you'll need a copy of envkernel.sh, and the latest kernel tree for the device. Once you have those, and you have run pmbootstrap init, run the following commands:

cd /path/to/linux/kernel
source /path/to/envkernel.sh
make msm8916_defconfig pmos.config
make -j<cores>
pmbootstrap build --envkernel linux-postmarketos-qcom-msm8916

After that, proceed with installation as usual.

See also