[ROM][7.1][AOSP][{Un,}Official] LineageOS 14.1 (Nougat)

Search This thread

stargo

Inactive Recognized Developer
Jan 7, 2011
538
1,718
Fürth
LineageOS 14.1 (Nougat) unofficial builds for the Droid 4

LineageOS is a free, community built, aftermarket firmware distribution of Android 7.1 (Nougat), which is designed to increase performance and reliability over stock Android for your device.

Code:
#include <std_disclaimer.h>
/*
 * Your warranty is now void.
 *
 * We are not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this ROM
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at any of us for messing up your device, we will laugh at you.
 * Collectively, and at the same time.
 */

LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.

All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit our Gerrit Code Review.

These are WIP builds of porting LineageOS 14.1 to the Droid 4 (and also other devices using the same device/motorola/omap4-common-infrastructure). They probably won't work, so don't expect too much. Use on your own risk!

Builds:
Current unofficial builds:
https://droid.cs.fau.de/lineage-14.1/

Last official build:
https://droid.cs.fau.de/Official_Lineage_Builds/ (Droid 4)
(When migrating from Lineage unofficial, flash this first (manually mount /data in TWRP before flashing and unmount it afterwards) and then directly flash the new image without rebooting)

Su addon for official builds: http://droid.cs.fau.de/lineage-14.1/addonsu/ (The official addon doesn't currently install on Omap4)

Manual beta builds:
https://droid.cs.fau.de/lineage-14.1/

Changes (only device/family specific, CM base is always synced before build and contains more changes):
  • 2019-12-24:
    • update lineageos base (bug- and security-fixes)
  • 2019-10-28:
    • update lineageos base (bug- and security-fixes)
  • 2017-06-10:
    • Hotspot fixed
    • Security updates
    • CM base updated
    • Last build before enabling official builds
  • 2017-05-15:
    • Security updates
    • CM base updated
  • 2017-04-11:
    • Fixed mobile data on Verizon
  • 2017-04-05:
    • DRM playback fixed
  • 2017-04-04:
    • Camcorder working, thanks to @Android-Andi (thumbnail picture is still wrong, but recorded video seems fine). This probably also fixed other media-related issues.
    • CM base updated
  • 2016-11-27:
    • CM base updated
  • 2016-11-13:
    • SELinux is enforcing
    • PackageInstaller works on ext3-based userdata again
  • 2016-11-05:
    • First build

What's working:
  • Phone (tested on Verizon and on GSM/UMTS in Europe)
  • Mobile data
  • WiFi
  • GPS
  • Camera
  • Video recording
  • Reboot to recovery
  • Playback of DRM-protected content

What's not working:
Probably most everything else, including, but not limited to:
  • HDMI
  • Data encryption (investigating, needs new unreleased safestrap)

Gapps:
OpenGApps
If you install Gapps after the ROM has been booted for the first time you either need to wipe data or manually delete /data/system/users/0/runtime-permissions.xml and reboot. Without this Gapps will crash constantly. This is due to a new permissions-system introduced in Marshmallow.

Installation:
  • You need a recovery supporting SELinux
  • A version of Safestrap (3.75) which supports SELinux can be found here: https://github.com/stargo/android_packages_apps_Safestrap/releases/tag/v3.75
  • A newer version of safestrap which will format userdata as ext4 will be released shortly. You can also just reformat userdata to ext4 in the old Safestrap for now.
  • Please read the instructions on how to install this version and follow the order of the steps in it.

GSM users:
These versions (both unofficial and official) automatically switch to GSM/UMTS without installing additional patches.

Source / Repositories:

XDA:DevDB Information
LineageOS 14.1 for Motorola Droid4, ROM for the Motorola Droid 4

Contributors
stargo, Hashcode, joojoobee666, Dhacker29
Source Code: https://github.com/LineageOS

ROM OS Version: 7.x Nougat
ROM Kernel: Linux 3.0.x
Based On: LineageOS

Version Information
Status: Beta
Beta Release Date: 2019-12-24

Created 2016-11-13
Last Updated 2019-12-24
 
Dec 29, 2015
8
2
The real trick was getting this and gapps onto the stock slot. Pico gapps are too big, and it took a lot of removing aosp apps in the aroma Installer to make it all fit. But, having done that, it actually runs really well. I honestly don't think I've ever seen my phone run this well since 5.0 came out. I'd definitely call it an improvement.
 

Careless_

Senior Member
Nov 13, 2010
626
64
The real trick was getting this and gapps onto the stock slot. Pico gapps are too big, and it took a lot of removing aosp apps in the aroma Installer to make it all fit. But, having done that, it actually runs really well. I honestly don't think I've ever seen my phone run this well since 5.0 came out. I'd definitely call it an improvement.

so realistically, there's no way to smoothly install this unless there is a version of Gapps that has only the necessities and doesn't produce conflicts with the stock rom slot size?

or can it be installed on another slot and run ok with no issue as well as install a prepackaged Gapps build, and not a cut-down version of pico?
 
Dec 29, 2015
8
2
so realistically, there's no way to smoothly install this unless there is a version of Gapps that has only the necessities and doesn't produce conflicts with the stock rom slot size?

or can it be installed on another slot and run ok with no issue as well as install a prepackaged Gapps build, and not a cut-down version of pico?

You can definitely install it in another slot, and without having to mess heavily with gapps. My goal was just to get it to work in the stock slot, which is something I managed to do. I was worried that wasn't even an option.
 

Bobcus Leper

Senior Member
Feb 6, 2014
2,078
1,257
Moto X4
Moto G Stylus
so realistically, there's no way to smoothly install this unless there is a version of Gapps that has only the necessities and doesn't produce conflicts with the stock rom slot size?

or can it be installed on another slot and run ok with no issue as well as install a prepackaged Gapps build, and not a cut-down version of pico?

I installed it to slot 1 with pico gapps, and a 700mb system partition. I have about 40MB free in /system. At this point, I think that we should ditch installing CM14.1 to the stock slot, because you can format the /data partition of a slot to EXT4. EXT4 provides faster R/W over EXT3, and can help to reduce lags when writing apps or files to /data.

Sent from my Motorola XT912 using XDA Labs
 
  • Like
Reactions: sd_shadow

Careless_

Senior Member
Nov 13, 2010
626
64
Good to hear. I will try it soon.

Can anyone confirm:

Bluetooth: Working?
Bluetooth audio stutter: Fixed?


those are my main concern. i work in a building with no reception anyways- so I'd rather have bluetooth music playback working rather than being able to call people at this point.

lol
 

RikuKawai

Member
Oct 13, 2016
15
4
Toronto
thisis.moe
Consistently runs for about 90s to 2 minutes, then hangs and reboots completely.

It doesn't matter what I do, it will always reboot suddenly after running around that long, even if I just sit on the home screen.

Edit: Timed it starting from when the lock screen appears, just sitting on the home screen. Ran for exactly 1m20s, then the screen goes black and it starts booting again.


Traced the problem to Linux Deploy loading on boot, it crashes whenever I try to use chroot.
 
Last edited:

moodroid

Senior Member
Jun 7, 2011
137
31
I installed it to slot 1 with pico gapps, and a 700mb system partition. I have about 40MB free in /system. At this point, I think that we should ditch installing CM14.1 to the stock slot, because you can format the /data partition of a slot to EXT4. EXT4 provides faster R/W over EXT3, and can help to reduce lags when writing apps or files to /data.

Sent from my Motorola XT912 using XDA Labs

Hi, so even if you don't use gapps and space isn't a problem in the stock slot, you still think installing in a virtual slot is a better option? Thanks
 
Dec 29, 2015
8
2
Hi, so even if you don't use gapps and space isn't a problem in the stock slot, you still think installing in a virtual slot is a better option? Thanks

Speaking as someone who worked to get this thing running on the stock slot with gapps, I'd say keeping it running on the real partitions is always going to be the better option. The overhead of a virtual slot is always going to slow this old phone down, and if the whole point is to keep this phone alive as more than just a toy, it's going to need every bit of help it can get.
 
  • Like
Reactions: moodroid

Mentor.37

Senior Member
microG GmsCore instead of the Gapps

Glad to see the cm14 on this old glory.
About the problem of installing the gapps in the little /system partition, I can advice everyone to use the great microG GmsCore project instead of the gapps.
I started using microG time ago in the Safe Slot of my modded SafeStrap for the Droid 4 and now I'm using it also on my Photon Q and G2.

microG is totally better than Gapps:
- it is really small and can be simply installed in the little partitions of the xt894
- it is very light weight compared to Gapps and for the xt894 this is good for performance in daily use and battery life
- it is the better solution for the privacy

Sorry for the OT but I really think that this is the best solution for this phone.
 

Bobcus Leper

Senior Member
Feb 6, 2014
2,078
1,257
Moto X4
Moto G Stylus
Hi, so even if you don't use gapps and space isn't a problem in the stock slot, you still think installing in a virtual slot is a better option? Thanks

Hi,

For EXT3, use the stock slot, but for EXT4 use a virtual slot. EXT4 proves 2.5 times the write speed of EXT3. As for overhead, there is practically none. One of our devs, joojoobee666, reminded us that the overhead was patched a few years back, and that the memory pressure is negligible.

Sent from my Motorola XT912 using XDA Labs
 
  • Like
Reactions: moodroid

moodroid

Senior Member
Jun 7, 2011
137
31
Hi,

For EXT3, use the stock slot, but for EXT4 use a virtual slot. EXT4 proves 2.5 times the write speed of EXT3. As for overhead, there is practically none. One of our devs, joojoobee666, reminded us that the overhead was patched a few years back, and that the memory pressure is negligible.

Sent from my Motorola XT912 using XDA Labs

Thanks to @ramblingPrankster and Bobcus for the replies.
I'm still confused though, sorry. I got the impression that we have to use EXT4 for /data in CM14? Can we not format the stock /data partition to EXT4?
 

Bobcus Leper

Senior Member
Feb 6, 2014
2,078
1,257
Moto X4
Moto G Stylus
Thanks to @ramblingPrankster and Bobcus for the replies.
I'm still confused though, sorry. I got the impression that we have to use EXT4 for /data in CM14? Can we not format the stock /data partition to EXT4?

We used to only be able to use EXT4 with CM14.1. Stargo patched the CM14.1 bug with /data as EXT3.

No, you can not change the filesystem of the stock slot with a locked bootloader device.

Sent from my Motorola XT912 using XDA Labs
 
  • Like
Reactions: moodroid

moodroid

Senior Member
Jun 7, 2011
137
31
We used to only be able to use EXT4 with CM14.1. Stargo patched the CM14.1 bug with /data as EXT3.

No, you can not change the filesystem of the stock slot with a locked bootloader device.

Sent from my Motorola XT912 using XDA Labs

Thanks. I think I understand now. So we have a choice between....
the benefits of using real partions, which you think are negligable
VS
the benefits of using EXT4 on a virtual /data partition which gives us 2.5 the write speed
 
  • Like
Reactions: Bobcus Leper

stargo

Inactive Recognized Developer
Jan 7, 2011
538
1,718
Fürth
Hi,

No, you can not change the filesystem of the stock slot with a locked bootloader device.

you actually can format stock /data as ext4. What can not be changed is /system, this has to be ext3.
I was surprised by that, too.

And newer cm13 nightlies are also able to use ext4 on /data.

Cheers,
Michael
 

dreikk91

Member
Oct 27, 2014
47
18
Lviv
Can we use /webtop for /system and /data for /data?

Code:
if [ "$SLOT_LOC" = "stock" ]; then
/sbin/bbx umount /ss
elif [ "$SLOT_LOC" = "safe" ]; then
/sbin/bbx mv /dev/block/system /dev/block/systemorig
/sbin/bbx ln -s /dev/block/webtop /dev/block/system
 
Last edited:

Mentor.37

Senior Member
Hi,

For EXT3, use the stock slot, but for EXT4 use a virtual slot. EXT4 proves 2.5 times the write speed of EXT3. As for overhead, there is practically none. One of our devs, joojoobee666, reminded us that the overhead was patched a few years back, and that the memory pressure is negligible.

Sorry for the question but are you talking about the overhead caused by running a rom in loop devices? If yes, can you point me in how and when this problem has been patched?
I searched here on xda but I haven't found nothing.
This isn't a polemic but I'm only curious because seems to me impossible patch a thing as this.

Can we use /webtop for /system and /data for /data?

Yes, this is doable and /webtop can surely be formatted as ext4, rather, if I correctly remember it is originally formatted as ext4; and /webtop is 1,4Gb so this solution can also solve the problem about the size of the system partition.
But in this way we will break SafeStrap and the idea that is behind it, the safe and sure stock slot will no longer exist; Is really this the best solution?
 
  • Like
Reactions: Bobcus Leper

dreikk91

Member
Oct 27, 2014
47
18
Lviv
Sorry for the question but are you talking about the overhead caused by running a rom in loop devices? If yes, can you point me in how and when this problem has been patched?
I searched here on xda but I haven't found nothing.
This isn't a polemic but I'm only curious because seems to me impossible patch a thing as this.



Yes, this is doable and /webtop can surely be formatted as ext4, rather, if I correctly remember it is originally formatted as ext4; and /webtop is 1,4Gb so this solution can also solve the problem about the size of the system partition.
But in this way we will break SafeStrap and the idea that is behind it, the safe and sure stock slot will no longer exist; Is really this the best solution?

I think it is a good idea
ok, we can also use the / cache for / system and / webtop & / preinstall for / cache this is a good idea? XD
In cm14.1 we cant install gapps in stock slot and it's a problem
 
  • Like
Reactions: zys52712

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    LineageOS 14.1 (Nougat) unofficial builds for the Droid 4

    LineageOS is a free, community built, aftermarket firmware distribution of Android 7.1 (Nougat), which is designed to increase performance and reliability over stock Android for your device.

    Code:
    #include <std_disclaimer.h>
    /*
     * Your warranty is now void.
     *
     * We are not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features included in this ROM
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at any of us for messing up your device, we will laugh at you.
     * Collectively, and at the same time.
     */

    LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.

    All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit our Gerrit Code Review.

    These are WIP builds of porting LineageOS 14.1 to the Droid 4 (and also other devices using the same device/motorola/omap4-common-infrastructure). They probably won't work, so don't expect too much. Use on your own risk!

    Builds:
    Current unofficial builds:
    https://droid.cs.fau.de/lineage-14.1/

    Last official build:
    https://droid.cs.fau.de/Official_Lineage_Builds/ (Droid 4)
    (When migrating from Lineage unofficial, flash this first (manually mount /data in TWRP before flashing and unmount it afterwards) and then directly flash the new image without rebooting)

    Su addon for official builds: http://droid.cs.fau.de/lineage-14.1/addonsu/ (The official addon doesn't currently install on Omap4)

    Manual beta builds:
    https://droid.cs.fau.de/lineage-14.1/

    Changes (only device/family specific, CM base is always synced before build and contains more changes):
    • 2019-12-24:
      • update lineageos base (bug- and security-fixes)
    • 2019-10-28:
      • update lineageos base (bug- and security-fixes)
    • 2017-06-10:
      • Hotspot fixed
      • Security updates
      • CM base updated
      • Last build before enabling official builds
    • 2017-05-15:
      • Security updates
      • CM base updated
    • 2017-04-11:
      • Fixed mobile data on Verizon
    • 2017-04-05:
      • DRM playback fixed
    • 2017-04-04:
      • Camcorder working, thanks to @Android-Andi (thumbnail picture is still wrong, but recorded video seems fine). This probably also fixed other media-related issues.
      • CM base updated
    • 2016-11-27:
      • CM base updated
    • 2016-11-13:
      • SELinux is enforcing
      • PackageInstaller works on ext3-based userdata again
    • 2016-11-05:
      • First build

    What's working:
    • Phone (tested on Verizon and on GSM/UMTS in Europe)
    • Mobile data
    • WiFi
    • GPS
    • Camera
    • Video recording
    • Reboot to recovery
    • Playback of DRM-protected content

    What's not working:
    Probably most everything else, including, but not limited to:
    • HDMI
    • Data encryption (investigating, needs new unreleased safestrap)

    Gapps:
    OpenGApps
    If you install Gapps after the ROM has been booted for the first time you either need to wipe data or manually delete /data/system/users/0/runtime-permissions.xml and reboot. Without this Gapps will crash constantly. This is due to a new permissions-system introduced in Marshmallow.

    Installation:
    • You need a recovery supporting SELinux
    • A version of Safestrap (3.75) which supports SELinux can be found here: https://github.com/stargo/android_packages_apps_Safestrap/releases/tag/v3.75
    • A newer version of safestrap which will format userdata as ext4 will be released shortly. You can also just reformat userdata to ext4 in the old Safestrap for now.
    • Please read the instructions on how to install this version and follow the order of the steps in it.

    GSM users:
    These versions (both unofficial and official) automatically switch to GSM/UMTS without installing additional patches.

    Source / Repositories:

    XDA:DevDB Information
    LineageOS 14.1 for Motorola Droid4, ROM for the Motorola Droid 4

    Contributors
    stargo, Hashcode, joojoobee666, Dhacker29
    Source Code: https://github.com/LineageOS

    ROM OS Version: 7.x Nougat
    ROM Kernel: Linux 3.0.x
    Based On: LineageOS

    Version Information
    Status: Beta
    Beta Release Date: 2019-12-24

    Created 2016-11-13
    Last Updated 2019-12-24
    7
    Hi,


    And another one, which fixes DRM :)

    Cheers,
    Michael
    6
    Hi,

    No, you can not change the filesystem of the stock slot with a locked bootloader device.

    you actually can format stock /data as ext4. What can not be changed is /system, this has to be ext3.
    I was surprised by that, too.

    And newer cm13 nightlies are also able to use ext4 on /data.

    Cheers,
    Michael
    4
    Hi,

    please don't split the thread, I've just changed the title.

    Official builds should work as the sources used are identical to the ones I use for my unofficial builds. I'm investigating what went wrong.

    For some reason the toybox binary is actually a base64 en-/decoder. This also causes wifi-problems as the shell-scripts won't run properly.

    EDIT: Found the problem and fixed it. The builds next week should be fine.

    Best regards,
    Michael