yashsingh1/xdaforums huggingface dataset:
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] AsD Monio:
The way I did it was I have never ever installed stock Oreo. I left the factory Nougat firmware untouched (or maybe I updated it a bit, I can't remember; but definitely nothing newer than the latest Nougat) and only flashed the modem and fsg from Oreo, the modem is the least of what's required for the fingerprint scanner to work. If you already installed stock Oreo then you would need to downgrade to achieve this.

There are a few guides on how to do that on the forums but first, you definitely won't end up with the same exact firmware as me because I have the Nougat bootloader. AFAIK you should never downgrade a bootloader in any device because it will hard brick, so the guides should skip that. Secondly, IMO you should not downgrade because there is no real benefit to this setup, aside from possibly not being able to brick the bootloader (can't downgrade if the oldest is already installed) - but if you already upgraded yours obviously this doesn't apply.

And finally, according to your previous posts, your device is montana_retcn and mine is montana, so this will not help you boot this ROM at all. The error you got from the bootloader was because the kernel is for montana and because of that it failed to load and execute on your incompatible hardware. If you had a kernel for montana_retcn with the proper DTs then maybe this ROM would boot. But like I said, most likely we would need to create entirely separate sources and builds to get it fully working.

I thought it was device (Qualcomm) specific and would not be included in GSIs. Also, it seems like different devices use different versions of it, so I thought we would have to include the exact one we have in our trees. And is VoLTE not broken because of missing blobs? I think separating /product could fix those issues. But if we can get everything working with just what the GSIs provide, then I agree that it's just unnecessary. I guess I should just try booting a GSI then, when I'm done with the non-GSI bugs.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] omonra2004:
Some lineage-15.1 lineage-16 builds I managed to install in them everything worked except the front camera and NFC .
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] GivFNZ:
No, I can't record videos even reopening the app. For some reason, I can't grab logcats here :(
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Mutcholoko:
I did literally everything you said but it still didn't work... But I guess it's my phone tho, it's like that even on stock. Not even the SIM card is detected...
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] DHDDS:
hi, just a update

I'm using your fast, smooth ROM and the 4G worked for me from the box. Right before the first boot, later I'll test more, now I'm using the wifi network.

Before:

- Moto G5S (montana = XT1792)

- Android 8.1 Oreo (August19 security update)

Now:

- Lineage 17 Android 10
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] AsD Monio:
New build is up:

lineage-17.1-20200814-UNOFFICIAL-montana.zip

Changelog:

* Vendor blobs updated:
** Reverted netmgrd and libdiag to deen Pie - should fix mobile data
** mm-qcamera-daemon from montana stock Oreo - should fix camera

[MENTION=9715553]GivFNZ[/MENTION] [MENTION=9876543]Some random[/MENTION] Camera and mobile data should work now, both are working for me on this build. Thanks for reporting

Are you sure you have the right (correct region) firmware? Other than that, I think I'm out of ideas for now, usually modem issues have something to do with those files and partitions.

Thanks for the feedback, any issues with the camera? Also, today's build has different netmgr blobs so I'm hoping it will still work for you if you decide to update.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
woo!

nice, im going to imidiately download!

Also, i saw you wanted to check GSI After fixing bugs, so before you do that, i can confirm none boot, in any format, A/B, AOnly, none boot, A/B Gets stuck at logo, and AOnly obviously doesnt boot due to SAR

---------- Post added at 16:26 ---------- Previous post was at 16:17 ----------

okay im sed now, somehow its still not fixed, but w h y ?

im gonna clean flash to make sure, but its still weird

edit:

Clean Flash also didnt work

:(

edit 2:

do you have a telegram btw?

it would be easier to contact you that way
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] AsD Monio:
Great, it's broken on my device now as well, but definitely worked right after I flashed. So it seems like an intermittent issue (try a few reboots maybe?). There is one thing both the RIL and camera use - the QMI, to communicate with the modem and camera subsystems. I had to update this to get the RIL working at all (no SIM card and the telephony framework kept crashing) but it seems like it's not perfect. I'll try updating this next.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] GivFNZ:
Camera still crashing when I set to video mode on my XT1792. I mean, nothing changed from previous build. I'll upload some logcats, then you can check them.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
I mean

I did enough reboots due to setup

But sure, I'll try
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] AsD Monio:
A little update on how things are going.

I downgraded libril, libqmi and netmgrd to ones from deen's Pie stock ROM, a newer release of what's currently being used on the G5. So far mobile data seems pretty stable, but I can't be sure since it breaking was seemingly random (or maybe that was because the mobile network reception at my house is not so good).

I'm still working on the camera. It actually doesn't use libqmi, I remembered that wrong, but our vendor libraries are not working 100% correctly. During testing I ran into the infamous low light glitches known on the Moto G5. After some trial and error I got the camera working using a mix of blobs from our stock and deen Pie, no more glitches after that so far. Hopefully that's fixed now as it didn't seem intermittent.

No changes with regards to video recording. From my testing it looks like it works right after booting, but breaks after some time with the app geting stuck upon trying to end the recording. Logcat output is not very useful. I suspect it's more libmmcamera libraries misbehaving, but may also be a fault of our HAL itself, and it might not be so easy to get a different one running. This will probably take a bit longer to fix as it takes longer to test.

[MENTION=9715553]GivFNZ[/MENTION] First off, the camera. From your logcat it looks like it's just the app that's crashing because it's missing some bits (bad cache? APK is corrupted? no idea how could that happen across multiple builds which also worked fine for me):

08-14 12:01:03.196 8817 8817 E AndroidRuntime: FATAL EXCEPTION: main
08-14 12:01:03.196 8817 8817 E AndroidRuntime: Process: com.android.camera2, PID: 8817
08-14 12:01:03.196 8817 8817 E AndroidRuntime: android.content.res.Resources$NotFoundException: Drawable com.android.camera2:drawable/ic_capture_video with resource ID #0x7f070050
08-14 12:01:03.196 8817 8817 E AndroidRuntime: Caused by: android.content.res.Resources$NotFoundException: File res/drawable/ic_capture_video.xml from drawable resource ID #0x7f070050

So a different camera app should work for you, at least for now. I can't see anything abnormal from the HAL itself.

Second, your montana variant has a compass, right? Does it work for you? I'm seeing some compass-related crashes as well, that's the compass sensor HAL crashing. But I think our main sensors HAL may support the compass as well, if so then I need to remove that first HAL entirely.

And finally, I noticed the NFC service is also crashing (expect battery drain). AFAIK (please correct me if I'm wrong) the XT1792 doesn't have NFC hardware so it seems our "device features checker" script has failed - it's supposed to remove NFC stuff from devices that don't have it. I'll work on that too for the next build.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] JarlPenguin:
[MENTION=6879971]AsD Monio[/MENTION] The XT1792 does not have an ecompass, only the XT1790 to my knowledge has one. Also, for camera to work correctly, you should try using all stock libs, disable HAL3, switch to Snap and disable HAL3 in the Snap overlay, and use aljeter's libmot_gpu_mapper.so.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] GivFNZ:
Yes, I'm using a different camera app now, and video recording is working perfectly. My montana variant doesn't have compass, neither NFC, so unfortunately I can't test it.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] GivFNZ:
Hey, after making clean flash, camera is working properly now... :D

Nevermind... For some reason, camera stops working properly when I set my montana's display to 720p. And I always use this resolution, because it's more comfortable for me.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] peterpetrus:
Thank you for making this Rom.

Some newbe questions:

- What is system-as-root and where can I get it? I did not see a link in this thread. Or is it already included in TWRP 3.4.0.0?

- Can I upgrade from Lineage 16 (which is Android 9). Or how do I know if I have Oreo (Android 8) modem firmware as mentioned in OP?
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] GivFNZ:
1. System-as-root is already included in this build.

2. Yes, you can, but not recommended though.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] iamnotacell:
Thanks everybody for this work. Nowadays I am using this g5s because an update (16 -> 17.1) broke the SIM card of the other phone. My question is: will I brake this one if I make this (16 -> 17.1) upgrade? I stuck at Lineage 16.0 from 28/03/2020.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
SIM card is kinda weird right now on Android 10

Either:

It works, but camera video recording doesn't

Or:

Camera works. But the SIM card/RIL Doesnt
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
Damn AsD is really making sure that it's stable

4 days of testing

Dedication. I like it

Either that or he forgot that he didn't build it with those RIL blobs and thought it was already released
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] AsD Monio:
My bad, the device features script I've got is a bit outdated, the compass stuff should be removed for you in the next build, as well as NFC.

Resolution or DPI / interface size in the settings? I never heard about changing the resolution itself on Android, I'm a bit surprised that's even possible. Regardless, apps tend to be built for a certain DPI and a resolution change would most likely change that. Android looks for resources for a different DPI that what the app has been compiled for, doesn't find them and we get the crash.

So now we know what's going on, but I'm not sure what we should do about it. I assume the built in interface scale in the settings does not satisfy you? I'm not sure if we can make the camera app build for all DPIs (and what about other system apps - they may cause problems too). We could probably switch to the Moto camera app from stock (it should support a few DPI ranges, that same app is used for many devices), I think Jarl is doing this on Pie with the latest trees.

To put it simply, Google moved some stuff from the boot image (boot.img) to the system image in Android 10, and the system image now serves a dual purpose. We needed to change some stuff in the code to make things work with that change. For you this just means you need a recovery which supports it, so yes, it is included.

The modem firmware is only required for the fingerprint scanner (that we know of, might be more because we haven't used Nougat firmware since like Oreo IIRC). It is also required on Pie so if it works for you now, it will on Q as well. Otherwise you can download the stock Oreo ROM for your device and region and flash just the modem in fastboot (the filename is NON-HLOS.bin). You can do that even after flashing this ROM.

RIL is a bit buggy, although it's really just the mobile data we're having trouble with. We won't know for sure if it's fixed until the next build has been tested for some time. In the meantime you can wait for an update to LineageOS 16 as the Google Play bug has just been fixed.

Meh, more like 2 since the last build. I think I'll try to get one up today, mobile data still seems to be working but I'm having no luck fixing the video recording. I have to wait hours sometimes before I get the bug. And it seems like it might not be the camera blobs but some media / codec related bug - the stock app freezes on a call to MediaRecorder.stop().
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
1.

Excited for the Build ×10

2.

Use Lineage snap or (if everything goes bad) Moto Cam1, those usually work, jarl posted some more info eariler
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] AsD Monio:
OpenCamera has the same bug, so unless the current camera app messes with the mediaserver and breaks it for every app then it's not app-specific, so I doubt Snap will help. But I guess I can try it.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] GivFNZ:
I'm using Footej camera to record videos now, and it works perfectly. Some apps like Telegram don't record videos properly, and Moto Camera isn't available in Playstore
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] AsD Monio:
New build is up:

lineage-17.1-20200816-UNOFFICIAL-montana.zip

Changelog:

* Removed compass HAL
* Corrected a file path for NFC removal
* Compass permissions are now removed from XT1792 and XT1795 - might fix ro.hw.ecompass being incorrectly set
* Updated media configs from aljeter Pie
* Vendor blob updates:
** libril*, libqmi*, libmdm*, netmgrd: from deen Pie - should fix mobile data
** libmot_gpu_mapper.so: from aljeter Pie
** libchromatix_s5k3p3* and libmmcamera_s5k3p3.so: from deen Pie - fixes all kinds of camera glitches in low light conditions
** some remaining camera blobs from our stock Oreo

Video recording is still buggy - sometimes it works for hours and sometimes it breaks five minutes after booting. The camera app included is still Camera2, Snap is on my list of things to try out next.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] oziel rocha:
installed the stock oreo and I installed the twrp 3.4.0 and I installed the Lineage 17.1 and the gapps had a certain 4g working all ok.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] GivFNZ:
Yeah, video recording is still buggy for me, and RIL is still buggy for my friend Rush (Some Random) :/
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] The_Baztyx:
This rom is amazing! In the previous build the data failed me and it showed "no signal" in the last version they already work correctly!

-4g works

-3g works

-Volte not tested

-Camera works for me, I even tried to record and I had no failure.

(in the previous one when recording the app was closed)
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
Yeah, I honestly don't know what's wrong

It can't be my firmware config right? It's 100% stock Oreo latest.

I'll try clean flashing later, and maybe even using JarlPe guins old A10Fixes Module, to see if anything changes
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Jazzy@223:
Volte not working on my moto g5s (xt1795)

Plz help me,how I fix it
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Dan Mornill:
Which version do you own ? Mine is Xt1794.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] GivFNZ:
You sure? Because for me, Volte is working :confused:
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] The_Baztyx:
It's xt1790.. only the battery is Bad :/
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] infinite4evr:
I can confirm as well

I was bugged with network and IMEI 0 on initial flash, after flashing multiple times and even a hard brick, Got the stock Oreo installed, After reinstalling this rom back, Everything is super clean

No bugs as of yet

-4g works

-3g works

-Volte Work

-Camera works for me, Video recording works as well

Although seems like there's frequent( sometimes) wifi connection loss, I cannot attribute this problem to rom coz I know my router sucks.

Great work OP, Thanks !

Update :

~ Open camera stucks when clicking the pic now, Same for video recorder

~ Stock camera is working but the image produced is full of green stink
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
That was a soft brick

A hard brick would be something almost Impossible to recover from
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] AsD Monio:
[MENTION=9876543]Some random[/MENTION] Are you sure it's not that carrier thing again? Or is it not just mobile data that's broken this time?

[MENTION=7744591]infinite4evr[/MENTION] Are you running the latest build? I updated some camera libraries that specifically fixed the green glitches (on my device, at least). I think the other issue is due to HAL3 / camera2 API. It's enabled on all builds but it's buggy and known to only take one picture and break after that. Make sure it's disabled in OpenCamera settings, I can't disable it using the prop because then the camera breaks fully. I suspect that's caused by the camera HIDL changes and apperently HAL1 is deprecated on Q, so I don't think we can go back to what we had on Pie.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
No, it's not a carrier thing, before I clean flash, I'm telling some useful info here

1.

I have a XT1794 if that changes anything

2.

It says service not available even though no SIM is inserted

I'll report if anything changes after a clean flash, other than that, it's absolutely great!
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] infinite4evr:
It was a hard brick, I had to flash memory card ( 32 gb ) and use it to achieve loading bootloader, BTW My bootloader was dead, everything was dead nothing was working, No restart, no bootloader, It was in

hs usb qdloader 9008 mode

Note : This hard brick has noticed to do with this rom, It happened when I was flashing stock Oreo.

Go ahead and happy flashing.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
[MENTION=6879971]AsD Monio[/MENTION]

Turns out my friend giv here flashed it differently from what i did, or what the guide says, but the only things he did differently is format data, and use TwrpMontanaSARer.zip on 3.3.2-2 instead of 3.4

i guess ill try that

:rolleyes:
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] infinite4evr:
Yep, I am on 16 Aug Build, Ironically Switching to camera2Api at least lets me take the pic for once and then on the second one gets stuck, I have to restart open camera again for it work

Stock camera is working fine, I noticed that green stink occurs only when flash is being used to take the image, otherwise in normal conditions it works fine and I can take pic multiple times

Secondly video recorder is dead on both of the apps.

If you need any more help regarding testing/debugging, Do let me know.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] GivFNZ:
I didn't used TWrpMontanaSARe.zip! :silly:

Another thing that I made which is different is that I rebooted to recovery after wipes ;)
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
Update on the RIL Situation

For anyone having any sort of RIL Problems, which didn't occur before, download a Lineage 16 SAR Build (Latest 2020.08 one) and boot into it once, then dirty flash Los17.1!

This made RIL Finally work for me.

Thanks AsD!
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] The_Baztyx:
I got it "no signal", I fixed it by just updating the recovery to version 3.4 (before it had 3.3.1) through the same recovery and then doing a clean installation of LOS17 + gapps.

So my recommendation to everyone is to update the recovery to the latest version of the page (3.4 until today) since something must have changed in the mounting paths or some other bugfix that makes the signal work.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
Nah, I was using 3.4 since release

For me, only the above method worked, for whatever reason

Edit:

To answer your question, yes, it did change some mounting stuff, but only for system, so that it supports System-As-Root
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Dan Mornill:
Right now it looks like luck or black magic, I'll stuck with LOS16 for the moment ?
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
Latest Los16 Preview?

Because Installing latest preview and then dirty flashing Los17.1, again, worked
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Dan Mornill:
Yes, but you have no clue why it worked, and I can't afford to have mobile data not working ?
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] ARJNMRLON:
Hi, I installed the rom using LOS 16 SAR too, everything is working but I'm having a issue.

When I'm using YouTube(not vanced, vanced was working perfectly) and lock the screen and come back the video starts lagging and the audio too, if I click on a comment indicating a minute in the video this also happens(this happens on Facebook too)
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
I do actually have some idea of why it worked

Los16 Betas updated RIL Blobs, Los17.1 probably did this too

I used Los16 as a in-between-step to ensure mobile data is working with new Blobs

Because if I just verified and then clean flashed it wouldn't have worked (even jarl penguin is confused on why this works, but it does, and has been reported to do so by multiple users on telegram)

Here a quick, but full guide:

Install Twrp 3.4 or 3.3.x with TwrpMontanaSARer.zip

Wipe everything if you ARENT coming from a Lineage build

If you are on a beta build of Lineage 16:

Download Opengapps.org if you need them (Arm64 10 Pico/Nano) and just flash Lineage 17.1 (and gapps if needed) as a normal update

If you're NOT on a Beta Build:

Download beta and OpenGapps 10.0 Arm64 (if you need them)

Then clean flash latest beta and boot once

Imidiately reboot to recovery IF it worked, and wipe nothing!

Now just flash Lineage 17.1 (again, no wipes)

Reboot

Check if RIL Works
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Aythriel:
I tried flashing this rom by flashing the last los 16 beforehand and after an infintite boot animation I've messed up my phone.

here are the details.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] peterpetrus:
Worked for me, thanks. Came from Los16 beta3 with gapps9 and just flashed Los17 from 20200816 and gapps10. Mobile Data and camera are fine so far. I did not do much testing though.

Edit: Capturing Videos is not possible after some time as mentioned in OP. Once camera is broken also no other app is able to take pictures (other camera/messsnger/etc) until phone was rebooted.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
Only some low light issues and maybe camera recording issues as of right now
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Ænimal:
Most likely you'll have to set up your provider's APN manually.
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
Nah, I tried that
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] GivFNZ:
[MENTION=6879971]AsD Monio[/MENTION] Anything new?
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] rj12345:
The ROM works great, including mobile data, except for GPS. Does anyone else also have a problem getting GPS signal?
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] Rush:
Hmm, let me test
[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] DHDDS:
No issues with the camera, just is a little simple (I've tried once a gcam with HDR + bookeh effect, would be nice that your ROM have too).

I'll try now your upgrade, but the old one is so sweet to use, thanks again on your hard work.