[ROM][DISCONTINUED][UNOFFICIAL] Lineage OS 13 for G4 Play

Search This thread

jasonmerc

Senior Member
Dec 14, 2012
1,876
942
www.ixquick.com
LINEAGE OS 13 FOR HARPIA


:D:D:D
In the wake of perfected Nougat and nearly complete Oreo for our beloved G4 Play… the ROM literally none of you have asked for is finally here!!!
:victory::victory::victory:​

NOTE: This ROM has been discontinued, due to Xposed being released for Nougat, but more so due to sync errors whenever I try to pull the latest changes to my system with repo sync. I'll keep the thread here in case any of you want to build this for yourselves, since the steps needed to build everything differ from what the official Lineage wiki says about building Lin13.


What’s Working
Everything seems good to me

What’s Not Working
I can't find anything, so let me know

How To Build
Follow the standard procedure found on the Lineage Wiki for building Lineage 13, except DO NOT INSTALL OPENJDK 7!!! If you have this on your system, remove it before starting the process. JUST STICK WITH JAVA 8!!!

After doing your repo sync to get everything on your computer, run "breakfast harpia" so it creates a roomservice.xml file. After breakfast is done, replace the roomservice file it auto-generates with this one below:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="Dark98/android_device_motorola_harpia" path="device/motorola/harpia" remote="github" />
<project name="Dark98/android_device_motorola_msm8916-common" path="device/motorola/msm8916-common" remote="github" />
<project name="SubhrajyotiSen/android_kernel_motorola_msm8916" path="kernel/motorola/msm8916" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_external_bson" path="external/bson" remote="github" />
<project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" />
<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" />
<project name="moto8916/proprietary_vendor_motorola" path="vendor/motorola/" remote="github" revision="cm-13.0" />
</manifest>

and do a "repo sync --force-sync". Once that's done, just brunch it and you'll be good to go! :)

As a side note, to add custom ringtones/alarms/sounds to your ROM, you need to wait for it to successfully build once, then put your desired .ogg files in the respective /system/media/audio/ folder that's contained in your specific device's /out directory, and build again (don't do a make clean or make clobber, it'll erase your work). Interpret me saying this however you want ;)

Download Link
DOWNLOAD FROM GOOGLE DRIVE HERE

I also recommend a custom kernel, like SomeFeak or SquidKernel.

Questions You May Want To Ask
Why would I even want to use this ROM?
Since Xposed for Nougat just came out, there's literally no practical reason for you to need to use this anymore. I guess if you want some nostalgia, but that's it.

Why would you want to even make this ROM?
Something about me just wants at least one stable, updated MM ROM for this thing. I really can’t tell you why, just a weird urge I have.

I’m getting Java build errors when I try to compile!!!
Make sure you have only Java 8, and no Java 7.

I’m getting build errors at Gello when I try to compile!!!
You can disable Gello during the build process, which I did. Edit the moto8916.mk file in moto8916-common device directory and comment out all the stuff about Gello.

I’m getting status 2 errors at the kernel part when I try to compile!!!
GET RID OF JAVA 7!!!!!

How often will you be updating this?
This is obviously an unofficial build, so while I’ll try to make regular releases if everything works out alright, don’t expect that. I’m thinking maybe once a week or so, maybe every 2 weeks if life gets really busy.

Why won't my device encrypt? When I try to make it encrypt it just bootloops or reboots without doing anything
Make sure you're UNROOTED before you try and encrypt. Having a custom kernel/Xposed/etc. is fine, you just need to take off root before running the encryption process. Once it's done, you can reroot and be happy again.

There's something wrong with jack-admin when I try to compile and it won't work!!!
Run the following commands from inside the root of your build directory:
export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx#g" (REPLACE # WITH 1GB LESS THAN THE AMOUNT OF RAM YOU HAVE)
./prebuilts/sdk/tools/jack-admin kill-server
./prebuilts/sdk/tools/jack-admin start-server
Then try to brunch again, see if that fixes it

Special Thanks
My good man @Dark98 has been a huge help in getting this to work. He was actually the first to make a Lin13 build for Harpia about 2 months ago, so without his initial work in solving all the compiler error stuff (like the BoardConfig thing mentioned above) I wouldn’t be able to release what I did. Also, special thanks to all you guys in the SomeFeak telegram group!
 
Last edited:

Arushidesu

Member
Sep 13, 2017
27
13
João Pessoa
One day I want to learn how to make ROMs and have that same willpower as you. xD
I've never used Xposed. Maybe I'll test the ROM to see what it looks like.

Good luck and good work!
 
  • Like
Reactions: jasonmerc

jasonmerc

Senior Member
Dec 14, 2012
1,876
942
www.ixquick.com
One day I want to learn how to make ROMs and have that same willpower as you. xD
I've never used Xposed. Maybe I'll test the ROM to see what it looks like.

Good luck and good work!

I just flashed back to MM firmware from soak test 7.1.1, and even when installing the ROM on this bootloader/firmware it still doesn't boot. Stay tuned though, I feel like I'm VERY close to getting this thing to work!
 
Last edited:

jasonmerc

Senior Member
Dec 14, 2012
1,876
942
www.ixquick.com
UPDATE: After fixing a command regarding GCC exporting, I'm getting new compilation errors with the kernel. I COULD skip kernel compilation, but I'm not sure how that would work out when trying to actually flash the ROM.
 

lochNESSIE

Senior Member
Feb 12, 2017
306
61
Xiaomi Redmi 4X
UPDATE: After fixing a command regarding GCC exporting, I'm getting new compilation errors with the kernel. I COULD skip kernel compilation, but I'm not sure how that would work out when trying to actually flash the ROM.
Alright, I don't know a thing about what goes on under the hood here, but doesn't getting compilation errors mean a broken kernel? And as far as I know, a broken kernel would lead to booting errors, won't even boot up I guess? Correct me if I'm wrong, please
 

jasonmerc

Senior Member
Dec 14, 2012
1,876
942
www.ixquick.com
Alright, I don't know a thing about what goes on under the hood here, but doesn't getting compilation errors mean a broken kernel? And as far as I know, a broken kernel would lead to booting errors, won't even boot up I guess? Correct me if I'm wrong, please

That's exactly what a broken kernel would do. Before the kernel would compile, but it still wouldn't boot even when flashing a different kernel. Something else under the hood is going on here, which I was told my gcc export commands would fix. Now that I put in the gcc export stuff, it can't compile the kernel, and therefore never finishes compiling the ROM. I'm looking into this right now, not sure when I'l get a solution though (seems harder than I thought to fix)
 

lochNESSIE

Senior Member
Feb 12, 2017
306
61
Xiaomi Redmi 4X
That's exactly what a broken kernel would do. Before the kernel would compile, but it still wouldn't boot even when flashing a different kernel. Something else under the hood is going on here, which I was told my gcc export commands would fix. Now that I put in the gcc export stuff, it can't compile the kernel, and therefore never finishes compiling the ROM. I'm looking into this right now, not sure when I'l get a solution though (seems harder than I thought to fix)

Appreciate the amount of effort you're putting in here, but I really think it would have been worth the hard work if you had gone for LOS 15 instead. Not many seem to have interest in opting for a MM ROM now. Personally, I would like to try Xposed on MM at least once as I stumbled across XDA only after N.
Anyways, we'll be waiting for your ROM! All the best to you mate!
 

jasonmerc

Senior Member
Dec 14, 2012
1,876
942
www.ixquick.com
Appreciate the amount of effort you're putting in here, but I really think it would have been worth the hard work if you had gone for LOS 15 instead. Not many seem to have interest in opting for a MM ROM now. Personally, I would like to try Xposed on MM at least once as I stumbled across XDA only after N.
Anyways, we'll be waiting for your ROM! All the best to you mate!

Some other developers are already working on O roms: There's an alpha build of GZOSP Oreo on Android File Host (made by the same guy that's helped me with building this ROM) if you'd like to look at that as well. I may move to Oreo eventually, but I'd REALLY like to get this working before I do. Even if it's not my daily driver forever, to be able to make builds if I want to would be ideal.
 
Last edited:

lochNESSIE

Senior Member
Feb 12, 2017
306
61
Xiaomi Redmi 4X
Some other developers are already working on O roms: There's an alpha build of GZOSP Oreo on Android File Host (made by the same guy that's helped me with building this ROM) if you'd like to look at that as well. I may move to Oreo eventually, but I'd REALLY like to get this working before I do.

GZOSP done so soon? Well gotta try it out once anyway. Let's taste it once.
 
Last edited:

jasonmerc

Senior Member
Dec 14, 2012
1,876
942
www.ixquick.com
GZOSP done so soon? Is that for harpia though?

It's far from stable, but yes it is for Harpia. Feel free to take a look and flash it if you want, help give Dark98 some support as a thanks for helping me with this :)

But back on topic though, I have another build running on my PC at home at the moment. I had to edit the gcc export script a little bit, if it fixes the problem I'll update the first post with the fixed command to add.
 
Last edited:
  • Like
Reactions: lochNESSIE

jasonmerc

Senior Member
Dec 14, 2012
1,876
942
www.ixquick.com
UPDATE: My good man @facuarmo suggested I take the boot.img of Josh's older (but more stable) Lin13 build and put it in my newer, non-booting Lin13 build for a sort of workaround until I can figure out how to get sources compiled correctly on my own. I've just uploaded a "fixed" ROM zip to my google drive if any of you want to try this out. I'll be making a NAND backup of my Nougat ROM then giving this a try myself.

EDIT: Replacing the boot image did nothing, so back to the drawing board
 
Last edited:

jasonmerc

Senior Member
Dec 14, 2012
1,876
942
www.ixquick.com
GOOD NEWS SORTA!!! Josh was able to compile a new Lineage 13 build, which I tested and can confirm it works. He's gonna share his local manifests with me so I can build and maintain it. If it still won't build even after that, I'll ask him if I can give a link to his build, to hold you guys over who are waiting for this.

Big shout out to Josh who's been a tremendous help this whole time. If I knew his XDA username I'd cite it, but otherwise you can find him on GitHub:

https://github.com/dark98
 
Last edited:
  • Like
Reactions: taadow1030

jasonmerc

Senior Member
Dec 14, 2012
1,876
942
www.ixquick.com
Neither Josh nor I have any idea why this isn't working for me. I've seemingly 1:1 copied everything he's done (besides the distro of Linux I use) and I still get weird errors when he gets none. My last hope is going to be replace Ubuntu with Debian for my Android Building VM, and if that doesn't work I'm going to have to abandon this since I'm not sure how to fix the problems I'm getting.

In the meantime though, here is his build of Lin13 in case you all want to run that.
 

lochNESSIE

Senior Member
Feb 12, 2017
306
61
Xiaomi Redmi 4X
Neither Josh nor I have any idea why this isn't working for me. I've seemingly 1:1 copied everything he's done (besides the distro of Linux I use) and I still get weird errors when he gets none. My last hope is going to be replace Ubuntu with Debian for my Android Building VM, and if that doesn't work I'm going to have to abandon this since I'm not sure how to fix the problems I'm getting.

In the meantime though, here is his build of Lin13 in case you all want to run that.
Running stable? Or is it unstable-ish?
 

jasonmerc

Senior Member
Dec 14, 2012
1,876
942
www.ixquick.com
Running stable? Or is it unstable-ish?

100% stable, everything works great from what I can see. I flashed SomeFeaK kernel as well, so maybe that's attributing to it, but still everything works fine.

Quick update though, I found out from Josh that I apparently DON'T NEED JAVA 7 AT ALL during the compilation, contrary to what Lineage WIki's build instructions say for Lineage 13. Not only am I removing Java 7 completely and trying again, but I'm editing my manifests as well. I hope this works.
 

jasonmerc

Senior Member
Dec 14, 2012
1,876
942
www.ixquick.com
Great news guys! It built on my own system!!! I'm not sure if it'll actually boot (since I'm rebuilding with a some little goodies in there to thank you all for your partience) but this is a very good sign! As usual, stay tuned for updates!

EDIT 1: New build is up, check the download link for Lineage 10062017. I haven't been able to test if it boots yet, but it's there nonetheless
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    LINEAGE OS 13 FOR HARPIA


    :D:D:D
    In the wake of perfected Nougat and nearly complete Oreo for our beloved G4 Play… the ROM literally none of you have asked for is finally here!!!
    :victory::victory::victory:​

    NOTE: This ROM has been discontinued, due to Xposed being released for Nougat, but more so due to sync errors whenever I try to pull the latest changes to my system with repo sync. I'll keep the thread here in case any of you want to build this for yourselves, since the steps needed to build everything differ from what the official Lineage wiki says about building Lin13.


    What’s Working
    Everything seems good to me

    What’s Not Working
    I can't find anything, so let me know

    How To Build
    Follow the standard procedure found on the Lineage Wiki for building Lineage 13, except DO NOT INSTALL OPENJDK 7!!! If you have this on your system, remove it before starting the process. JUST STICK WITH JAVA 8!!!

    After doing your repo sync to get everything on your computer, run "breakfast harpia" so it creates a roomservice.xml file. After breakfast is done, replace the roomservice file it auto-generates with this one below:

    <?xml version="1.0" encoding="UTF-8"?>
    <manifest>
    <project name="Dark98/android_device_motorola_harpia" path="device/motorola/harpia" remote="github" />
    <project name="Dark98/android_device_motorola_msm8916-common" path="device/motorola/msm8916-common" remote="github" />
    <project name="SubhrajyotiSen/android_kernel_motorola_msm8916" path="kernel/motorola/msm8916" remote="github" revision="cm-14.1" />
    <project name="LineageOS/android_external_bson" path="external/bson" remote="github" />
    <project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" />
    <project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" />
    <project name="moto8916/proprietary_vendor_motorola" path="vendor/motorola/" remote="github" revision="cm-13.0" />
    </manifest>

    and do a "repo sync --force-sync". Once that's done, just brunch it and you'll be good to go! :)

    As a side note, to add custom ringtones/alarms/sounds to your ROM, you need to wait for it to successfully build once, then put your desired .ogg files in the respective /system/media/audio/ folder that's contained in your specific device's /out directory, and build again (don't do a make clean or make clobber, it'll erase your work). Interpret me saying this however you want ;)

    Download Link
    DOWNLOAD FROM GOOGLE DRIVE HERE

    I also recommend a custom kernel, like SomeFeak or SquidKernel.

    Questions You May Want To Ask
    Why would I even want to use this ROM?
    Since Xposed for Nougat just came out, there's literally no practical reason for you to need to use this anymore. I guess if you want some nostalgia, but that's it.

    Why would you want to even make this ROM?
    Something about me just wants at least one stable, updated MM ROM for this thing. I really can’t tell you why, just a weird urge I have.

    I’m getting Java build errors when I try to compile!!!
    Make sure you have only Java 8, and no Java 7.

    I’m getting build errors at Gello when I try to compile!!!
    You can disable Gello during the build process, which I did. Edit the moto8916.mk file in moto8916-common device directory and comment out all the stuff about Gello.

    I’m getting status 2 errors at the kernel part when I try to compile!!!
    GET RID OF JAVA 7!!!!!

    How often will you be updating this?
    This is obviously an unofficial build, so while I’ll try to make regular releases if everything works out alright, don’t expect that. I’m thinking maybe once a week or so, maybe every 2 weeks if life gets really busy.

    Why won't my device encrypt? When I try to make it encrypt it just bootloops or reboots without doing anything
    Make sure you're UNROOTED before you try and encrypt. Having a custom kernel/Xposed/etc. is fine, you just need to take off root before running the encryption process. Once it's done, you can reroot and be happy again.

    There's something wrong with jack-admin when I try to compile and it won't work!!!
    Run the following commands from inside the root of your build directory:
    export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx#g" (REPLACE # WITH 1GB LESS THAN THE AMOUNT OF RAM YOU HAVE)
    ./prebuilts/sdk/tools/jack-admin kill-server
    ./prebuilts/sdk/tools/jack-admin start-server
    Then try to brunch again, see if that fixes it

    Special Thanks
    My good man @Dark98 has been a huge help in getting this to work. He was actually the first to make a Lin13 build for Harpia about 2 months ago, so without his initial work in solving all the compiler error stuff (like the BoardConfig thing mentioned above) I wouldn’t be able to release what I did. Also, special thanks to all you guys in the SomeFeak telegram group!
    4
    Running stable? Or is it unstable-ish?

    100% stable, everything works great from what I can see. I flashed SomeFeaK kernel as well, so maybe that's attributing to it, but still everything works fine.

    Quick update though, I found out from Josh that I apparently DON'T NEED JAVA 7 AT ALL during the compilation, contrary to what Lineage WIki's build instructions say for Lineage 13. Not only am I removing Java 7 completely and trying again, but I'm editing my manifests as well. I hope this works.
    4
    Great news guys! It built on my own system!!! I'm not sure if it'll actually boot (since I'm rebuilding with a some little goodies in there to thank you all for your partience) but this is a very good sign! As usual, stay tuned for updates!

    EDIT 1: New build is up, check the download link for Lineage 10062017. I haven't been able to test if it boots yet, but it's there nonetheless
    4
    UPDATE: My good man @facuarmo suggested I take the boot.img of Josh's older (but more stable) Lin13 build and put it in my newer, non-booting Lin13 build for a sort of workaround until I can figure out how to get sources compiled correctly on my own. I've just uploaded a "fixed" ROM zip to my google drive if any of you want to try this out. I'll be making a NAND backup of my Nougat ROM then giving this a try myself.

    EDIT: Replacing the boot image did nothing, so back to the drawing board
    3
    One day I want to learn how to make ROMs and have that same willpower as you. xD
    I've never used Xposed. Maybe I'll test the ROM to see what it looks like.

    Good luck and good work!

    I just flashed back to MM firmware from soak test 7.1.1, and even when installing the ROM on this bootloader/firmware it still doesn't boot. Stay tuned though, I feel like I'm VERY close to getting this thing to work!