Difference between revisions of "Motorola Moto E 2015 (motorola-surnia)"

From postmarketOS
Jump to navigation Jump to search
m
m (Added USB otg section and added charging chip)
 
(28 intermediate revisions by 10 users not shown)
Line 1: Line 1:
 +
{{note| This device is still running on armhf, although the processor supports aarch64. If you own it, change it and test it [https://wiki.postmarketos.org/wiki/Tips_and_tricks#Update_the_architecture_of_your_device that] way.}}
 
{{Infobox device
 
{{Infobox device
 
| manufacturer = Motorola
 
| manufacturer = Motorola
| name = Moto E (2nd Gen)
+
| name = Moto E (2nd Gen)
 
| codename = motorola-surnia
 
| codename = motorola-surnia
 
| image = File:Motorola-surnia.jpg
 
| image = File:Motorola-surnia.jpg
Line 7: Line 8:
 
| releaseyear = 2015
 
| releaseyear = 2015
 
| originalsoftware = Android 5.0.2 Lollipop
 
| originalsoftware = Android 5.0.2 Lollipop
 +
| pmoskernel = 3.10.49
 
| chipset = Qualcomm MSM8916 Snapdragon 410
 
| chipset = Qualcomm MSM8916 Snapdragon 410
 
| cpu = Quad-core 1.2 GHz Cortex-A53
 
| cpu = Quad-core 1.2 GHz Cortex-A53
Line 13: Line 15:
 
| display = 540x960 IPS LCD
 
| display = 540x960 IPS LCD
 
| memory = 1 GB
 
| memory = 1 GB
| architecture = armhf
+
| architecture = aarch64
 
| status_usbnet = Y
 
| status_usbnet = Y
 
| status_flashing = Y
 
| status_flashing = Y
 
| status_touch =  
 
| status_touch =  
 
| 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 = P
| status_3d =  
+
| status_3d = Y
 
| status_accel =
 
| status_accel =
 
| status_audio =
 
| status_audio =
| status_bluetooth =  
+
| status_bluetooth = P
| status_camera = <!-- Taking photos and videos works. -->
+
| status_camera =
 
| status_gps =  
 
| status_gps =  
 
| status_mobiledata =  
 
| status_mobiledata =  
Line 33: Line 35:
 
| status_calls =
 
| status_calls =
 
| booting = Y
 
| booting = Y
 +
| status_otg = P
 
}}
 
}}
  
 
== Contributors ==
 
== Contributors ==
* unrznbl
+
* [[User:Unrznbl|unrznbl]]
 +
* [[User:Wiktorek140|wiktorek140]]
 +
* [[User:UnDevDeCatOS|UnDevDeCatOS]]
  
== Maintainer(s) ==
+
== Users owning this device ==
<!-- Only if this device doesn't run on linux-postmarketos yet! -->
+
{{Device owners}}
<!-- This person needs to be willing to answer questions from users of this device -->
+
 
 +
== Unlocking the bootloader ==
 +
Please visit the [https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a Motorola website] for instructions. You will need a valid email address and working fastboot (driver installation needed for Windows and macOS, works out of the box on Linux). The Windows instructions works as written on Linux.
  
 
== How to enter flash mode ==
 
== How to enter flash mode ==
Hold down POWER + Vol Down while booting to enter Flash Mode.  
+
Hold down {{Button|Power}} + {{Button|Volume Down}} while booting to enter Flash Mode.  
  
 
== Installation ==
 
== Installation ==
Line 49: Line 56:
  
 
== See also ==
 
== See also ==
* https://gitlab.com/postmarketOS/pmaports/merge_requests/29 Initial merge request, status: merged.
+
* As of 2020-03-01, unrznbl is starting to work on mainline with the help of the work on motorola-harpia. Referring to https://wiki.postmarketos.org/wiki/MSM8916_Mainlining
 +
* {{MR|29|pmaports}} Initial merge request, status: merged.
 +
* {{Device package|motorola-surnia}}
 +
* {{Kernel package|motorola-surnia}}
 +
* {{Firmware package|motorola-surnia}}
  
 
== Modem Setup (same as for motorola-harpia so far) ==
 
== Modem Setup (same as for motorola-harpia so far) ==
Line 59: Line 70:
 
Configure your kernel and enable the prima wifi staging driver
 
Configure your kernel and enable the prima wifi staging driver
  
<source>
+
<source lang="shell-session">
pmbootstrap menuconfig motorola-harpia
+
$ pmbootstrap menuconfig motorola-harpia
pmbootstrap build linux-motorola-harpia
+
$ pmbootstrap build linux-motorola-harpia
 
</source>
 
</source>
  
 
On the device
 
On the device
  
<source>
+
<source lang="shell-session">
apk add wcnss-wlan
+
# apk add wcnss-wlan
/etc/init.d/wcnss-wlan start
+
# /etc/init.d/wcnss-wlan start
 
</source>
 
</source>
  
== Firmware {Wifi/Modem} (TODO: package it) ==
+
== Bluetooth (Mainline) ==
On the device extract firmware
+
 
<source>
+
Using unrznbl's [https://gitlab.com/unrznbl/pmaports/-/tree/surnia-mainline tree].
cd /lib/firmware
+
bluetoothctl detects controller and pairing works.
mkdir postmarketos
+
Still needs some testing to see if it is stable.
cd postmarketos
+
 
mount /dev/disk/by-partlabel/system /mnt
+
== Battery (Mainline) ==
cp -ap /mnt/etc/firmware/* /lib/firmware/postmarketos
+
 
umount /mnt
+
Battery fuel gauge is supported, but fan54046 charging chip isn't. It does still charge but it dosen't indicate that it is charging.
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
+
== USB OTG (Mainline) ==
  
<source>
+
The internal USB hub shows up, but it dosen't detect any USB devices.
cd /lib/firmware
 
ln -s /lib/firmware/postmarketos/* /lib/firmware/
 
</source>
 
  
 +
== Firmware {Wifi/Modem} ==
 +
The firmware is now properly packaged since {{MR|1947|pmaports}}
 
== Modem ==
 
== Modem ==
Make the necesary links for qcom_rmtfs
+
Make the necesary links for rmtfs
  
<source>
+
<source lang="shell-session">
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
 
</source>
 
</source>
  
 
Install necessary software
 
Install necessary software
<source>apk add modem-qcom-msm-downstream-common qcom_rmtfs libsmdpkt_wrapper libqipcrtr4msmipc ofono</source>
+
<source lang="shell-session"># apk add msm-modem-downstream rmtfs libsmdpkt_wrapper libqipcrtr4msmipc ofono</source>
  
 
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?)
<source>/etc/init.d/wcnss-wlan start</source>
+
<source lang="shell-session"># /etc/init.d/wcnss-wlan start</source>
  
 
Start a tmux for multiple windows
 
Start a tmux for multiple windows
 
<code>tmux</code>
 
<code>tmux</code>
  
Start qcom_rmtfs on a terminal
+
Start rmtfs on a terminal
  
 
<source>
 
<source>
 
export LD_PRELOAD=/usr/lib/preload/libqipcrtr4msmipc.so
 
export LD_PRELOAD=/usr/lib/preload/libqipcrtr4msmipc.so
qcom_rmtfs -v
+
rmtfs -v
 
</source>
 
</source>
  
 
Start ofonod on another terminal
 
Start ofonod on another terminal
  
<source>
+
<source lang="shell-session">
export LD_PRELOAD=/usr/lib/preload/libsmdpkt_wrapper.so
+
$ export LD_PRELOAD=/usr/lib/preload/libsmdpkt_wrapper.so
ofonod -d -n
+
$ ofonod -d -n
 
</source>
 
</source>
  
 
Send an SMS!
 
Send an SMS!
  
<source>
+
<source lang="shell-session">
export PHONE_NUMBER="<number to send sms to ex: 1234567890>"
+
$ export PHONE_NUMBER="<number to send sms to ex: 1234567890>"
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>
 
</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):
<code>sudo dbus-monitor</code>
+
<source lang="shell-session">$ sudo dbus-monitor</source>

Latest revision as of 19:42, 18 March 2021

This device is still running on armhf, although the processor supports aarch64. If you own it, change it and test it that way.
Motorola Moto E (2nd Gen)
Motorola Moto E (2nd Gen)
Motorola Moto E (2nd Gen)
Manufacturer Motorola
Name Moto E (2nd Gen)
Codename motorola-surnia
Released 2015
Category testing
Original software Android 5.0.2 Lollipop
postmarketOS kernel 3.10.49
Hardware
Chipset Qualcomm MSM8916 Snapdragon 410
CPU Quad-core 1.2 GHz Cortex-A53
GPU Adreno 306
Display 540x960 IPS LCD
Storage 8 GB Flash
Memory 1 GB
Architecture aarch64
Features
USB Networking
Works
Flashing
Works
Touchscreen
Display
Works
WiFi
Works
Xwayland
Works
FDE
Mainline
Works
Battery
Partial
3D Acceleration
Works
Accelerometer
Audio
Bluetooth
Partial
Camera
GPS
Mobile data
SMS
Partial
Calls
USB OTG
Partial



Contributors

Users owning this device


Unlocking the bootloader

Please visit the Motorola website for instructions. You will need a valid email address and working fastboot (driver installation needed for Windows and macOS, works out of the box on Linux). The Windows instructions works as written on Linux.

How to enter flash mode

Hold down Power + Volume Down while booting to enter Flash Mode.

Installation

I have tested flashing boot.img with an sdcard rootfs and this seems to work fine.

See also

Modem Setup (same as for motorola-harpia so far)

Content below copied from https://wiki.postmarketos.org/wiki/Moto_G4_Play_(motorola-harpia).

I used these steps to configure and test SMS. It sort of worked I think. Need to do more testing.

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

Bluetooth (Mainline)

Using unrznbl's tree. bluetoothctl detects controller and pairing works. Still needs some testing to see if it is stable.

Battery (Mainline)

Battery fuel gauge is supported, but fan54046 charging chip isn't. It does still charge but it dosen't indicate that it is charging.

USB OTG (Mainline)

The internal USB hub shows up, but it dosen't detect any USB devices.

Firmware {Wifi/Modem}

The firmware is now properly packaged since pmaports!1947

Modem

Make the necesary links for 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 msm-modem-downstream 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 rmtfs on a terminal

export LD_PRELOAD=/usr/lib/preload/libqipcrtr4msmipc.so
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>"
$ 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