yashsingh1/xdaforums huggingface dataset:
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
[IMG="LineageOS"]https://i.imgur.com/P6tVwPF.jpg[/IMG]

/*
* Your warranty is now void.
*
* I am 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 me for messing up your device, I will laugh at you.
*/

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

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 out Gerrit Code Review. You can also view the Changelog for a full list of changes & features.

[size=+2]

Introduction:

[/size]

This is the unofficial Lineage OS thread for the Moto G7 Plus, codename lake.

We support all the T-Mobile, International, and Project Fi variants, as their bootloaders are unlockable, while we can't support the Verizon and AT&T variants, as their bootloaders are permanently locked.

[size=+2]

Downloads:

[/size]

[size=+1]ROM[/size]

Latest build || All builds

[size=+1]Recovery[/size]

Official TWRP

[size=+1]GApps[/size]

OpenGApps || arm64 - nano version recommended

[size=+2]

Installation:

[/size]

Download the ROM and GApps from the links above.

Boot the latest twrp.img (or reboot the bootloader and then to twrp if already installed).

IF YOU ARE COMING FROM STOCK AND WANT TO INSTALL CUSTOM ROMS FOR FIRST TIME, INSTALL THE copy-partitions-AB.zip (to avoid bricking)

In TWRP, click "Wipe", "Format Data", then type "yes" as prompted.

Flash latest build of lineageos

Flash latest twrp-installer zip (to keep twrp installed, it'll flash to both slots)

Reboot and let ROM boot once (It is necessary to reboot between ROM flash and GApps/Addon flash due to verity/slot-swap logic.

Reboot back to the bootloader and then recovery

In TWRP, click "Wipe", "Format Data", then type "yes" as prompted

Flash GApps (and Magisk if you want root) and Reboot

Profit :P

[size=+2]

Notes:

[/size]

Lineage OS builds will not pass CTS/SafetyNet -- due to the AVB flag's "red" status. (Magisk works fine, though is not supported.)

XDA:DevDB Information

Lineage OS 16.0, ROM for the Moto G7 Plus

Contributors

Jleeblanch, erfanoabdi

Source Code: https://github.com/LineageOS

ROM OS Version: 9.x Pie

ROM Kernel: Linux 4.x

ROM Firmware Required: Official Pie

Based On: Lineage

Version Information

Status: Stable

Created 2019-09-08

Last Updated 2019-09-29
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
BUGS

The mic is muted (meaning the other person can't hear you) when using Speaker phone in Calls <- FIXED

Low in-call volume <- WIP

SELinux is Permissive Enforced
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] hkzlab:
Great! Can't wait to try this....

...And to be able to build it on my own too, so I can patch it for microg (and wireguard) natively :)

Thanks for your work.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Dahenjo:
Many thanks [MENTION=4481495]Jleeblanch[/MENTION]!

It's definitely faster & smoother than stock, and everything is working fine except for passing ctsProfile in safetynet as noted, also keep getting the SD card setup notification on every reboot, but very minor stuff for an initial release of the first ROM created for the G7 Plus. Camera works with no errors, there are several Moto gestures, advanced reboot & other useful customization, really a nice job! I don't currently have a SIM in it so can't speak to call quality & such.

Since July my device was stuck either in a damaged bootloader with fastboot commands not working (thus unable to flash any firmware) or an early version of TWRP without touch working, also couldn't boot to system so was basically dead in the water. ADB still worked in recovery however, and I recently found a 'adb reboot sideload' command that starts an ADB sideload session without needing any touch, then I was able to sideload twrp-installer-3.3.1-v6.0-lake.zip to get a functional TWRP again! The device could then boot to system again but it was still on 29.98.66-2 that I couldn't update either by OTA or with fastboot since commands still not working. Apparently I can install ROMs with no problems in TWRP.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
Not sure if anyone noticed, but I posted a new build earlier today (updated the Latest build in the OP ?

It was discovered that the touchscreen wasn't working in Android 10 based GSI's, so I've fixed at least that issue in the new update! However, there are still other issues that need resolving, so use at your own risk.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Xharos:
Wow, this came out of nowhere! Do you plan on getting it to official status eventually? If so I will migrate to this as soon as the Moto update support ends!
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] rajatgupta1998:
Wow, I wasn't aware of this thread. Great work as always brother! [MENTION=4481495]Jleeblanch[/MENTION] . Let's hope to have a great experience in the G7 community.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
Thanks! Glad to see you around these parts!
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] jamesladderton:
Mobile Data does not appear to work.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
Guessing you figured out the LED light situation? Should only be on when device is plugged in. You can also changes that in > Apps & notifications > Notifications > Battery light/Notification light

Mobile data works for me and everyone else. Would need more information including at minimum a radio log to debug. Have you checked to make sure your APN settings are correct?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
Unfortunately, what you did post of the log is mostly just about NFC ?. Check the Lineage Wiki section "how to capture a log" which explains how to get a log on the device or using ADB. Either one will work.

As far as APN settings go, you just wanna make sure it's the same as on stock
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] jamesladderton:
Ok thanks. It says LTE but the bars have a little x on it. Not sure what stock APN was but it is using pda.bell.ca which is my provider.

I cant upload a external link link to radio.txt yet. ill have to wait/make more posts. Thanks!

---------- Post added at 02:36 PM ---------- Previous post was at 01:43 PM ----------

I also only have the option to "Reset to default" in APNs. There isn't an option to edit or add new. Is this normal or is there a setting I need to change?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
I got your log, thanks. I'll take a look and let you know if I need any more info.

If you're able to edit your APN settings on stock, I would assume you'd be able to on custom ROMs too.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] jamesladderton:
OK thanks!

I didn't attempt editing or adding APN prior to flashing, but have seen others running Android 9 with this capability.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] CharlieBros:
Greetings from Mexico!, So far so good, it's been a pleasure to use. For updating the rom I just do a dirty flash or what do I do?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] DR4LUC0N:
Will this work for other variants of the G7? Like the Power by chance?

I'm guessing not but thought I'd ask.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Teos_93:
Of course not. G7+, aka Lake, is powered by snapdragon 636 whether the Power has got the snapdragon 632. It also has got totally different hardware than G7+
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] CharlieBros:
Also another question, in the notes is mentioned that magisk is not supported, that means we cant root or have a safety workaround?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] washoq:
Magisk works fine, just doesn't pass safetynet.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] CharlieBros:
Thanks for the answer, I headed up to install it, it says it "passes" safetynet but ctsProfile is "false" which I think is what the OP means I guess. Even after all that it seems my bank app works just fine after using Magisk Hide so all good :P.

Will the MagiskHide Props Config module will help to fully pass safetynet? :confused:
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
I would assume so, yes.

On another note, new builds of RR-P and AOSiP (pie) available. Will do xda posts for each asap. Just look in my AFH (AndroidFileHost folders. Not trying to post links in my Lineage thread, but figured I'd give you a heads up.

I've fixed the mic issue when using speaker phone and possibly any mobile data issues in RR and AOSiP, update for Lineage with the fix also coming too.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] CharlieBros:
Thanks for answering me.

I'm really pleased with the performance so far, I haven't noticed the low volume in calls, at least not too much, I'm happy to say that taking calls with my in-ear bluetooth headphones (Marshall Minor II) works wonderfully and I can be easily understood.

The only 2 things I have seen that aren't good, is that first, the security patch is from March 2019 and the second, I can't find the portrait mode in the camera app. I will test GCAM later and report the results.

I will continue to use LineageOS, as the ROM perfectly suits me, however I'm very grateful that you have finally kickstarted the development in this otherwise kinda boring phone, huzzah!

When you release the next update how can I update? I seem to have conflicting information about this, some say dirty flash the rom, reboot to rom, reboot again and install GAPPS, Is this correct?, I hope we can get a tutorial.

Once again, thanks a lot!
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
The March Security patch is for the vendor.img only, the ROM is September's security patch iirc tho. As far as portrait mode, are we talking about Moto Camera 2 or something else, like Snap (default camera app)?

As far as updating goes, either until Lineage is official (or I setup ota's myself), updating by dirty flashing is hit or miss meaning some have luck, some don't. In theory, you should be able to..

Dirty flash update

- reboot to twrp

- flash rom

- flash twrp-installer

- reboot and let boot once (due to flashing to other slot)

- reboot back to twrp

- flash gapps (same zip/version you originally flashed)

- flash magisk (only needed if had before updating)

- wipe dalvik cache

- reboot, done.

**Please do at your own risk**

If this works, or someone finds a better way, lemme know and I'll add it to one of the first few posts.

Once OTA's are enabled, in any ROM, updating won't be an issue. You'll be able to update very similar to the way stock does, but we'll go more into that when the time comes.

Update just about ready.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] CharlieBros:
Thanks for the quick reply.

I'm talking with the native app that came with Lineage, didn't know that you could install the Moto Camera app, huh. I installed GCAM without issues, will give it a spin tomorrow.

So the March 2019 security patch the system informs is just for looks? It's fine then :P

Is there a way to perform a full backup directly from Windows?, due to my music downloaded from Spotify, the backup will be bigger than what I have as free space (unless it only backups the rom which in that case never mind...)

---------- Post added 26th September 2019 at 00:14 ---------- Previous post was 25th September 2019 at 23:59 ----------

Nevermind, I answered myself: I can backup only the rom and system itself, I can also backup my data but I have very fast internet so it's all ok :P
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] NikioXD:
I can't install the rom Help please

It turns out that I follow the steps to the letter but for some reason when starting the system directly the device is left dead and I am forced to use the blankflash to revive the device, any solution?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] jc56au:
OK have an issue with bluetooth. Not covered as a bug as I did Lineage, no Gapps, degooglize, EdXposed and XprivacyLua then noticed the problem.

If I go back to post #1 and start again with the 0923 build will that get rid of degooglize, EdXposed and XprivacyLua so I can do that stuff in stages to see the issue starts?

COMMENT - I know just enough to be dangerous to myself
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] CharlieBros:
First do an entire wipe of the data of the phone, delete all.

- Then boot TWRP from adb and install the copy-partitions-AB.zip from the first post, then install lineage and finally TWRP, reboot and let the rom boot and greets you

- Reboot once again, wipe data and cache and install gapps and magisk if you wish

Boom, done
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] NikioXD:
thanks, I managed to install the rom install magisk correctly and without any module the security network is normal, wasn't it not happening?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
I'm not 100% sure I follow, but if you're having issues with Bluetooth, I would need logs to see what's going on. No issues with Bluetooth here, tho I haven't tested every possible scenario either.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
On another note, new build of LineageOS is up.

Download -> lineage-16.0-20190926-UNOFFICIAL-lake.zip

I'll update the OP link(s) later on. Anyone that had any issues on previous builds, please update to the new build and test again.

Also, on the new builds (on all ROMs), you may notice when in twrp that the CPU temp shows as "0°". This is due to building the kernel modules inline with the kernel. Twrp expects one of the drivers to be present in vendor/lib/modules (mmi_sys_temps.ko) but it no longer is. I will update twrp with the needed kernel patches so this is fixed.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] jc56au:
Went straight to just the 0926 build Bluetooth now working fine - many thanks. I just should pay more attention and do more testing as I flash more system stuff on top of it
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] CharlieBros:
I have updated without issues to the latest build, hope to see OTA soon!
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Vastopian:
Quick question I have the TMobile XT1965-T will this work? I'm just wondering because it's not technically a Moto g7 but it is...
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] nwmvantiel:
Infinite booting after installing Gapps

i've runthrough the installation process multiple times now.

i manage to install TWRP and the LOS rom, reboot and its works, then i reboot into twrp again, clear data cache and dalvik and install the gapps, after that the LOS hangs in boot the OS.

i can reflash twrp and LOS again and itll work again, but without Gapps, using the ARm64 9.0 nano version.

am i missing something? any advice?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] ZaFTIS:
This is a great rom!

Is there any chance for Lineage os 17 for our device?

Thank you!:laugh:
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Dahenjo:
Yes, yesterday on the G7 Plus telegram group he said he's working on Lineage 17 and hopes to release a beta build soon.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] ZaFTIS:
Yay, happy days! Thanks! :good:
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] jc56au:
clear data cache and dalvik This bit - The original instructions were to wipe -format here for the second time due verity/slot

swap logic
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] nwmvantiel:
Weird thing is, first i was using the nano Gapps and it wouldnt boot after installation of Gapps,

after this i tried with pico installation and that did work...i dont think i did anything different...

just clear everything after every install and reboot just to be sure to not forget anything...

So its working for now with pico Gapps,

Ideally i would want to work withour google services, tried some alternatives, but those apps felt pretty crappy, simple searches for apps werent working etc...

Is there any good manual on which steps to take to have a working phone without google?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] jc56au:
A search on degoogle shows up quite a lot, in particular

https://www.reddit.com/r/degoogle/c...2019/?utm_medium=android_app&utm_source=share

and

https://www.reddit.com/r/degoogle/comments/cmnwrd/my_personal_degoogle_avoiding_any_automatic/
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
Micro G is the way to go for Google freedom. There was another user who planned to release a lineage build with support for Micro G. My builds don't include as they follow lineage's standards. However, iirc there is a Magisk Module which enables the support as well.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] infected36:
Hey, thanks for the ROM. I've followed all the instructions to a T, but for some reason I can't boot up after installing Gapps. Here's all my steps:

- Boot up into TWRP

- format data

- reboot into recovery

- Install lineage then TWRP.

- Boot into the system

- Reboot to TWRP

- Format data again

- install Gapps (tried nano, mini and pico)

After that it can't boot into system anymore. I've tried every variation of formatting, but maybe I've been doing it wrong. After a while I gave up and tried using the ROM without Gapps, then after messing around I decided to install magisk, but after I install it through TWRP, I couldn't boot back into system, don't know if it's in any way related, but I thought it might be relevant.

Thanks in advance!
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Vastopian:
Did you try not formating the data the second time after you booted into the system?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Vastopian:
Forget what I said. I had the same issue when I tried. I used magisk. Here's what I did.

Download magisk and the uninstaller

Then boot into twrp and use the uninstaller

Then boot into os

Boot into twrp and use magisk

Boot os and reboot into twrp

And finally do your gapps.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Filipe Baltazar:
One question, is this phone GSI/Treble capable out of the box? I have a Galaxy A3 2017 that barely has any support and came out way before GSI's were a thing. Also, does it have a Knox equivalent?

My biggest issue with mid range phones nowadays is the lack of decent custom ROM support. The G7 Plus looks amazing and full of incredible hardware but doesn't even have official LOS support. Hopefully support will improve.

I'd love to buy it.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Vastopian:
Not sure about the GSI. I know theirs am AOSP rom and LOS. But I don't think there's a Knox equivalent. I have the TMobile Moto g7+ it's the revvlry+ which was free. Only thing so far I wish is that the camera was better on LOS.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Filipe Baltazar:
Get Gcam here https://xdaforums.com/g7-plus/themes/portrait-night-sight-google-camera-port-t3908735

Thank god there's no Knox. My mom's phone is dying and I want to give her mine but having Knox tripped is always a mild bummer. Samsung sucks for custom stuff. Moto is much more forgiving, everything can be reset to stock.

I'll look more into the GSI scene.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] yazayad:
Any plans for enforcing selinux?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Vastopian:
I've tried different cameras. After you put LOS in the same camera app looks different and grainy for some reason.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] zohar_ml:
I wish to know if this rom will work on the Moto G7 Plus XT1965-6 (LAKE_RETCN)?

Apart for the added RAM is there any hardware difference that may limit this?

If it may help, I found a site with the stock rom of this device:

https://boycracked.com/2019/07/26/official-motorola-moto-g7-plus-xt1965-6-lake_retcn-stock-rom/

Thanks
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] JangTsu:
Does this work for the international variant model XT1965-2

Does anyone know if this works for the XT1965-2 model? i have that exact model but i was wondering if it works for that one, maybe the developer can anwser that question. I have the international variant
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] victorockers:
No problem tested on that model :good:
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Kaylaw:
for now, i'm using this version on my moto g7 plus, so far i have only found simple bugs like the hacked numeric keypad when used during a call in the native app, I'm looking forward to Lineage 17, which is now available, but I didn't find any gapps that work and don't break the ROM.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] delop4:
[MENTION=4481495]Jleeblanch[/MENTION]

I'm on your lineage 17 2019-11-17 build and everything works so far, but I only get EDGE as connection. Tried all over apn settings and such things, all normal. Got a radio log for you, if you need anything else just ask me.

Thanks
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
Opengapps has beta versions on sourceforge

https://sourceforge.net/projects/opengapps/files/arm64/beta/
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] delop4:
So, a quick update:

After flashing stock and reinstalling lineage 17 2019-11-17, I now have 4G.

My other problem has nothing to do with lineage, so I hope it's okay that I ask you guys here anyway:

The old problem persists, on ANY Pie rom, I get no service nor wifi, even on stock rom. Bootloader shows "Baseband: <not found>", even now on lineage 17, but surprisingly, there service and wifi works anyhow. This all started after I flashed Quack Phh-Treble and going back to stock afterwards. All efforts, flashing various stock rom's or trying to restore a full TWRP backup with all partitions, had no success. Maybe anyone of you got an idea about what I could try else...

Thanks