yashsingh1/xdaforums huggingface dataset:
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] ektus:
I did toggle SELinux to permissive using com.ibuprophen.selinux, but that one states it will do so only after boot, so likely won't help with the intended operation of liveboot. I was able to get the 5s demo to run a couple times by tapping the menu entry repeatedly, so looks like it is the problem you described.

I'll watch for news in this regard, but don't boot so often that I really need this. It'd be just cool to have :cool:
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] andyro2008:
I was thinking that it can be useful during the script installation. Luckily, most apps will work after several attempts to get ROOT. So although it is annoying it is not a big problem. If you come across another similar problem, you already know, try multiples times and it will work in most cases.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] okubax:
Nice!:good:
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] Sakura90:
Hi,

I'm a bit of a n00b here. Recently I installed LineageOS with root on my old Moto G 2014. I followed the detailed instructions at the LineageOS site. I can safely follow those for the G5, right?

https://wiki.lineageos.org/devices/athene/install

That's for the G4 which are the same for the G2 and probably the same for every other Moto. Of course, using the build from the 1st post and the TWRP from here: https://xdaforums.com/g5/development/unofficial-twrp-3-1-0-0-moto-g5-t3574450

When installing LineageOS I don't have to worry about that forced data encryption of the stock firmware which TWRP can't read? Once I wipe Cache, System and Data and install the Lineage zip that encryption won't bother anymore, right?

Thanks :3
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
Flashing a rom with twrp is the same for every device

Format all partitions

Flash rom gaps root zips

Restart

Our twrp cannot read encrypted data partition which is why you need to format data & reboot to recovery in order for it to be mountable - if you encrypt your device after booting the rom twrp will no longer be able to mount data but you don't have to encrypt
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] Sakura90:
Great, I'll use it for a day or two to ensure I don't have to return it and then I'm moving to Lineage.

Yes, I understand why. But I don't have to do that, format data & reboot in order for it to be mountable (that would be if I wanted to stay in the stock OS in order to remove the encrypted data). For Lineage just boot TWRP once, wipe partitions and flash zips. Correct?

Thanks again
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
It doesnt matter what rom you are using - stock or custom

If you want to use twrp you need flash twrp - enter twrp - wipe data - reboot to recovery

You only need to do this the first time you flash twrp to remove encryption from data partition so twrp can mount it as it cannot mount encrypted partition

Please read the twrp thread instructions for more details
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] Sakura90:
I see...

But I don't need to do the verity thing, as I'm installing Lineage. Will try installing tomorrow. Let's hope it works :highfive:

EDIT:

I just did it. I have to admit it was an exciting ride. I followed your instructions here: https://xdaforums.com/showpost.php?p=73537615&postcount=478

Except that upon looking for the zips I couldn't find them anywhere. Could they had been erased when wiping the partitions? Anyway, I saw an OTG option there and it was a life saver. I copied the zips to a flash drive and I flashed the OS and GApps zips from there. But after flashing the apps zip I couldn't see anything in the flash drive. Plugged it out and into the PC. The files where there but Windows told me that there was an error upon connecting it (that one that prompts you to "fix" it). I formatted it and copied again the su zip for root. Back into TWRP, now it read the drive, flashed the su, wipe cache and reboot. Everything went perfect.

What happened *after* installing the GApps zip? It looks like *something* messed up with the flash drive file system somehow. No big deal, just curious.

Thanks everyone for the work. So far so good. LineageOS with the pico apps package is just perfect, zero bloat. Also the OS has much more options than the stock. Launcher is neat too. Can't live without it. In fact, I only upgraded the phone after seeing it had a stable build for it.

Now hoping that TWRP can be updated to support encryption and this Lineage for the G5 goes official.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
If you download them they will be in the download folder of the phones internal sdcard unless of course you wiped internal storage!

Iv no idea what happened but iv always recommended flashing nano gapps from

http://opengapps.org/ arm 7.1 nano

Looking at latest changelog for twrp updating probably wont make any difference - It was fixed for some devices in 3.1.0.0 and the changelog for 3.1.1-0 doesn't mention any fixes for encryption

It has already been submitted - you will have to ask the OP if he has had any response yet
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] m_vaisakh:
Awesome work there bro!
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] tjMF6:
Update to Septemper Security Level

Please Update LineageOS to the latest September Security Patch Level. :)

Regards :good:
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
Yes sir

Will get on it right away sir

Do you need your feet kissed too sir?

Please don't ask for updates etc - people do this in their own time & will release updates when they have time to do so

If you really can't wait than the source code is available so you can compile it yourself
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] wzedlare:
September security patch is not released for LineageOS yet, so I have no choice.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] sahim82:
I've read that the maintainer (@wzedlare) has submitted this build for official LineageOS integration a few weeks ago without any success so far (without answer as i recall). Are there any plans to resubmit this or put this forward any other way (if there even is)?

Thank you very much for your effort. :good::good::good: Also for your effort on santoni. It is a real drag that xiaomi holds back kernel source. Both of them nice 5" devices and none can go official :(
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] :
I don't get what you're trying to get at!?
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] the_clapper:
Thank you again. It worked. I am now running lineage OS on my moto g5.

---------- Post added at 09:54 PM ---------- Previous post was at 09:44 PM ----------

After installing lineage-14.1-20170811-UNOFFICIAL-cedric encryption was turned off. I had to manually turn it on. Was that intended?
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] jacksonsilva173:
Send for my link ROM ,ancious for testing
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
Yes - there is no force encryption

Just be warned if you encrypt then twrp will no longer be able to mount data (twrp issue not rom related)
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] p8tgames:
Send me ROM link for the miui ROM you teased 1 month ago. I want to test.

He ist going to release it soon (I think)

It is still a preview build of Oreo!
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] JeremyHTCA9:
Any chance you could share the rom in current state?
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] p8tgames:
Read my post from before
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] Sakura90:
Weird, I only wiped what was stated in the instructions.

Anyway, it's not important. What is important is the alarming rate at which this thing eats the battery while playing music in the background. When the phone is left alone it's all good, it takes hours to go down 1%. When using the screen, apps, games, whatever the battery goes down at a reasonable rate. BUT when playing music and turning off the screen the battery goes down 10% for every hour. It's insane. It's more or less the same power consumption I get with the screen on using apps/games.

Earlier today I put the old Moto G2 and the new Moto G5 side to side. Both with LineageOS 14.1 and PowerAMP playing an opus file. As I said the G5 goes down 10% every hour but the G2 barely goes down 3% every hour. Something is wrong. I did notice that in the battery settings I can see the "awake" bar almost empty on the G2, the little filled parts only being while the screen on I assume. But on the G5 it's always full when playing music. It seems the G5 is always awake while the G2 is able to sleep? The G2 is old and the battery is aged. It also has a 2000mah battery vs the 2800 of the G5.

I don't know where the issue lies. Maybe the Lineage for the G5? It can't be another app, while not playing music it "sleeps" properly, no battery drain. I read this thread and didn't see anything like this. And aside from this everything works fine. Any ideas?

P.S.: I was just trying Foobar but it looks the same. Battery goes down quickly, "awake" bar looks full during the period of music playing.

Also I have the power profile set to "efficient" but it doesn't seem to have any effect setting it to normal.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] andyro2008:
When you are listening music where is your cellphone? In your pocket?

I'm experienced something similar. The cause was very simple. The skin on my leg was constantly activating the fingerprint sensor through the sheet of the pocket.

Putting the cell face out solves the problem, but since I do not think it was very safe (the screen is very exposed that way) I asked my wife to sew a thicker piece of cloth in my pockets. It worked.

Enviado desde mi Moto G5 mediante Tapatalk
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] :
Can I test to help you out!?
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] Sakura90:
Nope, this isn't an issue for me. Most of the time the phone is in my purse. Nonetheless I tried that, activating the fingerprint sensor through a piece of thin cloth. It didn't trigger.

Now, going back to my issue I think I found the root of it. Well, not exactly. Thing is, the CPU is stuck at 960 mhz at it's minimum frequency. When playing music and having the phone in my purse together with other things I noted that it got quite warm. Not hot but warm. If I took the phone out so that air runs through the back it cools down. "This must be the CPU sticking to a high frequency" I thought. Looking for a program to check the CPU frequency I stumbled upon Kernel Adiutor and tried it. And it was just as I thought, the CPU only seems to run between 960-1401 mhz. Even if I try to set it manually I don't have an option to set the cores to anything less than 960.

There's no deep sleep when playing music from what I read, the CPU just goes to an extremely low frequency, normally something like 300 mhz. I checked this on my Moto G2 and when idling with the screen on it rests comfortably at 300. But on the G5 it sits at an insane 960 mhz. When playing music and not in deep sleep it's constantly running at 960, thus getting warm and the battery eating away like crazy.

At this point I don't really know how to fix it. A bug in the kernel of this build of LineageOS?

Can someone try Kernel Adiutor and see what's the min frequency you can set your CPU? And at what freq it runs when doing nothing in the background. I can post screenshots later, but it's basically as I describe.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] Fedray:
Phones with custom kernels has underclock, that's why they have frequencies like 300/400, we don't have that so our min freq is 900~ (the original min freq)

Enviado desde mi Moto G5 mediante Tapatalk
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] andyro2008:
The contact against the skin through the pocket does not make the phone vibrate, turn on the screen or any of that. What it does is that the fpc1000 service (Finger Print Control) acquires wakelock, waking the CPU. It seems that it is enough to activate the sensor but not to recognize an attempt to unlock.

Using Tasker you can disable cores when the screen is off and the music player is running. It will make the battery last much longer, but be warned, activating your device trough the fingerprint sensor will be noticeable more slower.

Enviado desde mi Moto G5 mediante Tapatalk
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] Sakura90:
It's not really underclock I think. I couldn't find what is the minimum frequency this Sanpdragon 430 can run at, but I'd be very surprised if the older Snapdragon 400 can run at around 300 mhz and this one not. It would be seriously flawed if that's the case, as it would be unsuitable for any low demanding task (like playing music).

It can't be the contact with the skin as I don't have the phone on me (also when testing I let it lay on a table). But it's interesting I guess. I would had thought that the fingerprint needed a conductive surface with a little charge, like the skin on capacitive displays which can't be operated even through a thin fabric.

Well, that aside. Just as you say, I fixed it like that. More of a workaround really. Using the Kernel Adiutor I turned off cores 3-8 (leaving only 1 and 2) and set the governor to power saver. Those two cores are kept at 960 mhz but I just tried 50 min of music playing and the battery went down only 1%. Now THIS is battery life. I still have to keep the two profiles around, a "two core powersaver" for music playing and background tasks and the default "8 core interactive" for normal usage.

It's no more than a workaround, hopefully we can get some insight from a dev on this "high frequency" issue. The fingerprint indeed is a bit slow on two cores but I can live with it. I will try later what battery life/performance I can get with 4 cores.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] andyro2008:
I know that it can't be your skin if it's in your purse. I was pointing this interesting situation. I thought the same about fingerprint until the battery dump proved me wrong.

For a reason I do not understand the contact with the skin through a sheet of fabric is enough for the sensor kick the CPU on, but not enough to produce the unrecognized fingerprint error.

It should be a major problem for those who use the phone in their pocket.

As you may have noticed, it is not just the frequencies, but all the cores stay on. It does not seem to have any kind of Core control and hotplug. It is not a problem of LineageOS, it is the same in a stock device.

To improve your settings "with the screen off": The last 4 cores (3 to 7), They reach a frequency of 768Mhz if I remember correctly. Core 0 can not be disabled, but you can disable 1,2,3. And complement with some of the other cores that reach lower frequencies.

PS: Sorry about my English. [emoji14]

Enviado desde mi Moto G5 mediante Tapatalk
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] Sakura90:
I wonder why the fingerprint sensor would activate. Sure the electricity in our skin is too low for it to go through anything. And if it reacts to pressure it should activate on contact with anything. As you say, weird.

Well, finally I can put this issue to rest ("hibernate", until someone can shed more light on this). Simply put, the battery life with a "2 core powersaver" profile is nothing short of amazing. It goes down at a rate of about 1% every hour. Before this it was 10%! Crazy! What a waste of energy all those cores are. Indeed, it's unbelievable how Qualcomm/Motorola/Google or whoever is making these things work didn't implement a feature to turn off unneeded cores. Or better yet, why stuff so many cores on a CPU? Sure this is a low-end CPU I see, why not make it with two more powerful, versatile cores?

And if what you say is true, that the 960 mhz lower limit is also present on the stock OS, then I'd had returned this thing at once if I didn't knew anything about LineageOS or shutting down cores. 10 hour battery time of listening to music is abysmal. I'll try to see if I can get an app to measure CPU frequency on a stock un-rooted Moto G5. A friend of mine has one, I'm curious if I'm really going to see it stuck at 960 mhz :P

Anyway, I just tried it for 3 and a half hours. Battery went down 3-4%. Can't be too sure because when I started the test it had been at the same percentage for a while in deep sleep and was still the same from when I finished the 50 min test I talked before. So actually it could be 3.5-4%. Even if it was 4% that means 52 min for every 1% or 86 hours of music playing from a full battery. Incredible.

- Nothing running in the background. I don't use a data plan, so plain 3G with nothing updating in the background.

- Poweramp with equalizer on, playing opus/cue files from a microsd

- Screen off all the time

- Core 1 and 2 fixed at 960 (powersaver profile), the rest are off

Those were the conditions. I'm very happy now, even if I have to go switching profiles around. Not ideal but it works. Will update if anything new comes up. I'll try what you said. Yes, I've seen that cores 5-8 go as low as 768 mhz while 1-4 are the ones stuck at 960. I could try using core 1 and core 5, but I don't think you can improve those battery figures much :P
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
[MENTION=6810779]wzedlare[/MENTION]

Just so you know if you haven't seen the lineageOS 15.0 source code is now available
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] markerio_91:
I've just unlocked bootloader of my Moto G5 XT1676, installed this Lineage OS build and noticed a bug that is a bit important for me, I don't know if I've done something wrong or is just a rom bug. For me, the USB tethering is not working. I toggle the switch and it gets deactivated again (nothing happens), and I need this function for my daily use. I don't know if anybody has ever experienced this.

Otherwise, really great job!! Really pleased to see how you've brought Lineage OS to our devices ;)
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
USB tethering doesn't work but wifi tether works fine

If you want usb tethering try using pdanet

https://play.google.com/store/apps/details?id=com.pdanet&hl=en_GB
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] ATechnoHazard:
Anyone else having problems with USB tethering?
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
Try reading my post directly above yours!
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] cRaZy-bisCuiT:
[MENTION=6810779]wzedlare[/MENTION]: Thanks for the build!

By the way, why is there no official build of LineageOS for this phone? Is it to be expected to get one soon, maybe with LineageOS 15?
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] ektus:
Check e.g. post 531:

https://xdaforums.com/showpost.php?p=73685570&postcount=531

It's done when it's done. If you want to get it sooner, do it yourself. It's all open source, after all!

Regards

Ektus.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] Ramonms98:
MTP is not working, I get error when trying to copy from internal storage to my desktop.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
It does work it's just a little temperamental

Make sure root is enabled in dev options

Also enable adb in dev options

Pull out the USB cable & reconnect

Try transferring again

Keep repeating & it will work

You can also reboot to recovery & transfer whilst in recovery

You can also use adb pull commands
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] Kqdi:
Every time i take a picture with snapchat or messenger shortly after when i try to add stickers or send it the app crashes am i the only one having this problem?
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
Does it work on stock rom? If it doesn't then it's the apps fault not the rom

Also without logcats there's nothing the op can do
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] marciofpa:
Disabling navbar

how could I completely disable the navbar?

In the stock ROM this is possible, because i can use the fingerprint sensor only...
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
Display setting

Enable expanded desktop

Setup gestures first for fingerprint scanner

Note that the Nav Bar will show when keyboard is open - this is how android works & not a bug
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] Aaronwhite220:
You don't have to do this with other Roms!? Why so different?
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
I'm going to take some guesses why this hasn't been made official yet

I don't think the device tree is complete - for example

The user must be able to compile lineageos just by downloading the device tree & this currently isn't the case

When the person lunches the device it should download all dependencies eg kernel vendor and all other dependences needed to build automatically via the dependencies file (kernel is set but not vendor & other dependences)

Things that iv noticed are missing

No custom audio policy - either include this or set to 0 in board config

No audio media display cafs - add this to dependencies

Proprietary files libskia audioflinger etc no rules to make - dependencies missing

So to clarify - I believe that the user needs to be able to build without error from the device tree before lineageos will make this official
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] Barons64:
Will it ever become official?
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] wzedlare:
- Dependencies are set in the required file: https://github.com/Wzedlare/android_device_motorola_cedric/blob/cm-14.1/lineage.dependencies

- Custom audio policy is already set to 1: https://github.com/Wzedlare/android_device_motorola_cedric/blob/cm-14.1/BoardConfig.mk#L84

- You don't have to add cafs to dependencies.LineageOS already downloads all of them once you sync it.

- The same with the third one.

- Also, you can't add vendor blobs(tree) to dependencies as it is not in LineageOS repositories.The user have to sync them from an external source(such as TheMuppets) or use scripts in device tree to pull blobs from their device.

Yeah, it's been a long time but they haven't replied my application yet.So, there's still hope.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
Ah my mistake missed your blobs -

Yeah I synced everything manually but didn't know lineageos doesn't let you add them to dependencies

Well lineageos 15 is out now
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] marciofpa:
Yes, its enabled, but this only HIDE the navbar, if you touch the bottom of the screen it will be shown (without keyboard).
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
This is how android works

If you want to totally disable it you will have to edit and modify files - not recommended as you will cause other apps to not function correctly which is why the build prop edit doesnt work in this rom as it breaks the camera I think if you read past posts
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] andyro2008:
LineageOS is an almost stock Android, If you want a more customizable ROM try AICP, it has lots of options, including disabling the navbar completely.

Enviado desde mi Moto G5 mediante Tapatalk
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] MarcS:
nearly October and no updates since several weeks ? (especially September security updates)

is this development "on hold" ???
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] Barons64:
I'm guessing they are waiting for Oreo to be ready. I am be wrong!
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] SearinoxNavras:
Hello, how can I disable single hand mode? It is not a feature for me and causes me nothing but mishaps. I don't care if I have to delete root files I just want it gone. It is not disablable from gestures etc. and was shoved down my throat without demand or means of remediation.