Cedric - Motorola Moto G5

The Moto G5 is a mid-range phone, with a few variants. It has multiple factors that are different for each variant: - XT number - 2GB or 3GB RAM - 16GB or 32GB Internal Storage - Single SIM or Dual SIM


Document some other device variants.



Who What GitHub XDA-Developer Other Links
Olivier Initial documentation reivilibre LambdaPerl n/a
nift4 More docs nift4 nift4 http://nift4.tk


Halium porting for this device is centered around Ubuntu Touch. There are only a few bugs left.

GitHub: https://github.com/halium-on-cedric

Telegram: https://t.me/noandroidoncedric


Distribution Device Specific Files Kernel What works What doesn’t work
Unofficial LineageOS 14.1 (GitHub User: Wzedlare) android_device_motorola_cedric/cm-14.1 android_kernel_motorola_msm8937/cm-14.1 based on v3.18.49 Everything Nothing
Unofficial LineageOS 15.1 (GitHub User: Sohamlad7) android_device_motorola_cedric/lineage-15.1 android_kernel_motorola_msm8937/lineage-15.1 based on v3.18.100 Almost everything USB tethering (can be fixed tho)
Unoffical LineageOS 16.0 (GitHub User: Sohamlad7) android_device_motorola_cedric/lineage-16.0 android_kernel_motorola_msm8937/lineage-16.0 based on the newest 3.18 Almost everything Audio for Wfd & Camera problems
Unoffical LineageOS 17.1 (GitHub User: Sohamlad7) android_device_motorola_cedric/lineage-17.1 android_kernel_motorola_msm8937/lineage-17.1 based on the newest 3.18 Almost everything Camera problems

Kernel & Hardware

Mainline (v4.16-rc7 as of writing, 2018-03-31): Not Mainline

There is no device tree source (dts) file in the mainline kernel, neither for the device itself nor for the underlying SoC (MSM8937). Consult the table below for status on other hardware. There is some progress here (boots pmOS but no touch, no USB, no network): https: //github.com/Hacker1245/linux-1.

Kind Component Progress
Chipset/SoC MSM8937 (msm8937.dts) Not mainline yet. No known work yet.
GPU Adreno 505 YES, mainline
Image Sensor (Front) OV5695 (5 MP) TODO
Image Sensor (Back) IMX258 (13 MP) TODO

Other hardware still needs research.

Unofficial LineageOS 15.1 Android Kernel (3.18.100)

Note: the 3.18.x branch of the Linux kernel has been marked as End-Of-Life (EOL).

Available at:

Unofficial LineageOS 14.1 Android Kernel (3.18.49)

I have included this, despite being less updated than the LOS15.1 version, as it (LOS 14.1) is what I use on my phone today.

Available at:

Motorola Kernel Sources (?.??.???)

As used on the XT1676 devices. Not sure about the version, would have to check.


Other devices have a different set of sources from Motorola. Research may be required if someone is interested in locating them.

Device Specifics


Unlocking the bootloader

To unlock the bootloader, you have to provide a code to Motorola’s online service who will warn you that your warranty will be void before giving you an unlock code.

Be sure to back up your stock image if you want to return to it, as Motorola do not provide images for this device, despite there being a friendly-looking ‘stock ROMs’ section on their developer site.

Once your device is unlocked, your boot photograph will be replaced by a warning with hard-coded text over the top of it. You can change the boot photograph but the white text will always remain, so you need to use a boot photograph with white in the correct region to prevent this from being visible.


There have been reports of hard-bricking devices by restoring stock, relocking the bootloader and updating through Motorola channels. Consult xda-developer threads about this issue if this concerns you. (If you don’t intend on returning to stock, this is likely not a concern.)


TODO provide a nice link to help users unlock their bootloader

Access the bootloader

When your device is turned off: Hold down the Volume-Down button whilst you hold down the Power button. Within a few seconds, you should be greeted by the bootloader menu.

Use Volume-Up and Volume-Down to choose between the choices (such as ‘Start’, ‘Recovery’, ‘Restart Bootloader’, amongst others) and press Power to activate your choice.

Developer Info

The XT1676 had segmentation faults with a particular (kernel?) configuration under LineageOS 14.1 and other custom Android versions. Investigation may be required to track down the cause and solution in the event that the Halium porting effort runs into it again. Update: Solved.

Useful Resources


Provide some useful resources here.