yashsingh1/xdaforums huggingface dataset:
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
It's been discussed in previous posts, but initially sideloading LOS using Lineage recovery was wrecking the gpt table (causing the exact issue your reported). I was able to fix that by updating gpt-utils (was missing dtbo partition), TWRP didn't have this issue as it accounted for the dtbo partition whereas Lineage recovery wasn't.

So that was fixed on the 20200408 build.

What I didn't realize at the time, is that wasn't the whole issue for taking OTA's, which were causing the same issue (wrecking the gpt table).

I scratched my head over that for a couple days, until I realized it was actually an SELinux issue. Our file_contexts wasn't accounting for the fact that Lake actually has one more partition than the other sdm660 devices we share the tree with, so some of the partitions in the higher mmcblk0p* values weren't being flashed correctly (if at all), thus causing your issue as described above.

FWIW, flashing the builds same as you do for Lineage 16.0 using TWRP would not have had any issues. You can download the full update and dirty flash in twrp same as you guys do on Lineage 16.0.

Anyway, starting with 20200413 (which is currently in the pipeline to be built) it will have the SELinux changes needed for properly working OTA's. I've thoroughly tested OTA's/Seamless updates using the Updater app, so they should work for real this time.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] chincheta0815:
Thanks a lot for all your efforts. I am really keen to install it.

But before I just flash right now (I got a little coward...), I checked the changelog and there is no "lake SELinux" commit in the list. Could you just re-check that the relevant commit is in?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
The 20200413 build isn't finished yet, looks like it's still in the works, but when it's ready the commit I'm referring to should be there.

Also, for clarification purposes, most of the SELinux stuff is in the sdm660-common tree, only a couple very specific device policies are in Lake's device tree.

Commit: sdm660-common: update eMMC block nodes sepolicy
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] brunopetit17:
Thanks for your explanation and for your hard work.

I did everything as was described in the lineage 16 post, flashed the latest version of lineage OS 17, but my device still cannot connect to any wifi or recognize the sim card. It's like those parts of the phone just shut downed.

Is there any way to solve that? Looking at what has been discussed in this post I do not find an answer. Or maybe it's so complicated I don't understand the answer that is already there.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] gerchla:
What always worked for me is to go fully back to stock ROM using the Lenovo Moto Smart Assistant (LMSA) tool and start all over.

You should at least be able to download the stock ROM ("resue"). If flashing with the tools doesn't work, do it manually

# (this folder is part of the downloaded, unzipped ROM)
cd RomFiles/LAKE_RETEU_QPWS30.61_21_3_subsidy_DEFAULT_regulatory_DEFAULT_CFC.xml

fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase modemst1
fastboot erase modemst2
fastboot flash bluetooth BTFM.bin
fastboot flash dsp dspso.bin
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system_b system_other.img
fastboot flash vendor vendor.img_sparsechunk.0
fastboot flash vendor vendor.img_sparsechunk.1
fastboot flash oem oem.img
fastboot flash oem_b oem_other.img
fastboot erase carrier
fastboot erase userdata
fastboot erase ddr
fastboot oem fb_mode_clear

fastboot reboot
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] gerchla:
Fakeedit: I cannot access the sim card in 2nd slot either. (on this ROM)
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] onnoêzeler:
The LMSA doesn't recognize my phone when it's plugged in.

And any attempts at flashing/ booting into recovery have proven fruitless.

I'm considering my device bricked since there's nothing I can do with it.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] gerchla:
I was at that point, too.

The intention of my post was to say that you should only download the latest stock ROM with that tool. For actual flashing, use fastboot from "platform tools" with the commands decribed in my post

Was is your phone showing when you turn it on?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] onnoêzeler:
It boots straight to bootloader. Flashing using platform tools nets no result either.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] gerchla:
OK, if you have tried to flash as described above, and it did not work, then it may be bricked ¯\_(")_/¯
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] onnoêzeler:
Figured so unfortunately :(

Thanks for your help.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] oscararm10:
#66

I would like to know if the Ota update already works with the version of 20200423. If so, is it time to have the lineage recovery?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] brunopetit17:
Okay but with the motorola smart assistant I cannot download the latest stock. It keeps on telling me it cannot recognize my device and that's it. No option to only download the latest stock ROM anywhere.

So I've searched the internet and the latest I could find was 9.0_PPWS-29.98-111-5. I successfully flashed it with the .bat file but that didn't solve my issue. I then tried to flash it using the code you shared but I had to change a few lines:

I had to delete this one: fastboot flash system system.img_sparsechunk.5

I had to change this one: fastboot flash system_b system_other.img

to: fastboot flash system_b system_b.img_sparsechunk.0

and then add: fastboot flash system_b system_b.img_sparsechunk.1

Flashing this way worked also but still didn't solve my original issue, that Wi-fi and network functionalities disappeared.

I am wondering if not finding an Android 10 version could be the problem? My device was upgraded to Android 10 before I first unlocked it and flashed anything.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] gerchla:
sorry, was wrong
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] chincheta0815:
First of all Thanks to [MENTION=4481495]Jleeblanch[/MENTION]: I am not happily updating OTA.

But now I got a strange issue concerning "Android WebView" that makes the Jelly Browser crash (or not)...

Once I installed lineage from flash and the browser did it's job like a charm. I installed and uninstalled Googles WebView for a testing purpose. This was SLOT A.

Then I did OTA to SLOT B. Here I noticed that there was no WebView at all installed. I thought okay... Maybe I deleted it with uninstalling the Google One... This was SLOT B.

No after another OTA to SLOT A there is WebView again...

I always checked for WebView in the Developer Settings...

How do I get Android Stock WebView back in SLOT B???

The one from PlayStore simplay causes issues and Jelly won't work....
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] nightmw:
Hi is Slot A and Slot B identical LOS nightly version? Maybe only the newer nightlies lack a WebView?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] chincheta0815:
They all were different. 20200415 has WebView. 20200414 did not. Let's wait for the next.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] maciocho:
This had helped me unbrick

https://xdaforums.com/g7-plus/how-to/hard-brick-moto-g7-plus-downgrade-t3958608
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] nightmw:
somehow it seems like one of your system_slots has webview and one not. Because my 20200415 "fresh" installation does not have it. You probably dirty flashed it or had it OTA-updated?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] chincheta0815:
Sounds resonable, although I did not flash anything dirty on purpose: The installations instructions more or less tell you so. They say that you install the custom recovery and then copy over the partitions... I did a factory reset of course, but after the copy. This leave the "inactive slot" dirty and ready to be mixed with a Lineage OTA.

As I remember: Both slots should contain the webview.apk which puzzles me a bit.

Anyway the issue needs to be talked somehow. I wonder how to get the correct WebView into both slots (hopefully without flaishing). I did not have any success with using the WebView from the PlayStore...
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] nightmw:
i did not have success with the one from play store either - i actually don't want to use it anyway.

i can see (adb shell) that there is the webview.apk in /system/product/app/webview but in the UI I cannot choose it under developer options.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] chincheta0815:
Same for me. In all slots there is one, but only in one I can choose - and this one works. The Google one does not even work well: It breaks the Jelly Browser, whereas the LOS one works on both...
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] nightmw:
sorry if i bother you, but do you see the webview folder also under /system/app (without product)?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] chincheta0815:
You're not bothering ;o)

There is just one in /system/product/app which should be okay as this seems to be one possible install location.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] chincheta0815:
The changelogs for 20200414 state that there should be now an option in the "Developer Options" where I should be able to disable the "Update for Recovery" (see HERE). But I do not find such option in "Settings" -> "Developer Options".

Is it possible that something went wrong? How can I find that option?

I am right now on 20200415.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] gerchla:
I still have troubles with dual sim - only the first slot is accepted. Both slots work fine on stock ROM.

Anybody can confirm? Or am I missing something?

(start with stock, boot twrp, sideload LOS, reboot system)
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] jadephyre:
Have you updated your phone to Android 10 stock before flashing LOS? LOS17 is Android 10 and needs probably needs appropriate updated modem drivers for both slots to work. The Android 9 drivers might not be appropriate.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] gerchla:
Yes, stock rom is Android 10 (QPWS30.61-21-3)

Does the Lineageos ROM not include all required drivers/blobs? Do I need to use any of the "copy-partitions.zip" or "copy-partitions-AB.zip" before flashing Lineageos?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] nightmw:
hi, both slots work for me. I use the first slot for data and the second for calls/sms. Do You need any assistence or info about this?

I'm on LOS17.1 20200415

---- UPDATE ---

can't get data to work on any of the slots. :(

---- UPDATE 2 ----

got it to work. first i inserted one of the sims (data) and it could connect to LTE in both slots. Then I added sim 2 (voice/txt) and prohibited the second sim from being used for data.

No both sims connect and the first sim can be used for data.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] jadephyre:
Yes, you do... if it says so in the instructions, you better follow them to the letter.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Z-Prime:
Got to say YAY! to seeing this go official. Will be flashing my phone with this shortly. Am hoping to see if Lineage improves performance in general. I've heard lots say that online that the official stock was poorly implemented by Moto and from what ive seen of other Moto phones from 2019, I would say it seems battery is poorest on the G7plus so curious to see how Lineage goes on it :)
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] djashnew:
How do I install gapps on 17.1?

I just tried open_gapps-arm64-9.0-nano-20200417.zip from lineage recovery and it may have worked but in recovery it says

open gapps 9.0

incompatable android rom detected

So How do I get gapps working?

error in /sideload/package.zip (status 20)
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] RoAM73:
You need to use open_gapps-arm64-10.0-*-*.zip
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] djash40:
Thank you the Pico version worked.

Everything seems to be fine now but with the exception of low in call volume / speakerphone.

I tried viperfx but it didn't make a difference.

Any ideas on how to get this fixed?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] gerchla:
Surprisingly, both slots work when following the instructions :cyclops:

However, I'm facing a different problem right now: As soon as I disconnect the device from PC (unplug USB cable), LineageOS powers off and reboots into LOS recovery ("Poweing off / shutting down"). The error message then says "Can't load Android system. Your data ma[...]" with the options to "Try again" and "Factory reset data". Either option results in the same behaviour (power off as soon as USB data cable is unplugged).

Any ideas?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Rask40:
So I just tried to follow the instructions to install the latest nightly (with its accompanying recovery) and I think I've bricked my device. I told it to reboot to recovery after it had seemingly installed LineageOS, and a pinhole sized light lit up at the top of the phone and the screen went black. Doesn't matter what I do at this point, the screen remains black. Any thoughts, anyone, or am I toast?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] digitaljeff:
Does it get detected when plugged in to your computer (check device manager, might show up as a Qualcomm something). Holding power button down for 20+ seconds does nothing ?

I had this happen while on stock. Left in plugged in to power for awhile and then booted to stock recovery for a full wipe , had to hold vol down and power for probably 20-30 seconds though to get it to break it's trance.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Rask40:
I don't see it in Device Manager, but the computer does make the same chirp it does when it detects a flash drive etc has been plugged in.

Tried holding power for 30 seconds, nothing. Tried Vol Down and Power for the same time. Nada. Letting it charge (though it was at about 80% when this all happened) so I guess I'll check it again in a few hours and see if I can wake it up.

Waiting for Best Buy to open to take ownership of a Moto G Stylus - if the G7 + ends up waking from the dead, I guess I'll just make it my work phone and recycle the Z2 Force to my Mom to use!
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Adai0:
Hi. I've just bought this phone (XT1965-3) and got it yesterday. Is it normal that I don't get any stock updates via OTA? I'm stuck on Android 9 PPW29.98-66. I though I'll do an OTA update to Android 10 and then begin with LineageOS, but nothing happens... Any ideas?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] dr.haggis:
Hi Adai0

you can try to update your Moto with the LMSA Tool:

https://support.lenovo.com/id/en/solutions/ht102605

Best regards,

Andreas
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Adai0:
Thank you Andreas. I was already on this site: https://motostockrom.com/motorola-moto-g7-plus-xt1965-3 But it didn't look official and there had been too many downloads for the 10 rom hostet on Google drive already :D

EDIT: Worked with https://support.lenovo.com/id/en/solutions/ht102605! I'm on Android 10 stock QPWS30.61-21-3 now. First rescue however failed. Running it again from fastboot did the job.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] oscararm10:
Very good job bro :good:

I would like to implement a gesture to capture the screen and have the option to use the gestures of android 10 in full screen.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Adai0:
I've just installed the rom with Open GApps and Magisk on a fresh and new device and I'm very happy. Very good work [MENTION=4481495]Jleeblanch[/MENTION]! After the installation I updated (to lineage-17.1-20200423-nightly-lake-signed.zip) using the built-in updater. Magisk was kept, however TWRP had been overwritten. Though that is not a problem for me.

If anyone is interested in the steps (I basically followed the official wiki on LineageOS site):

Started with a new device on first stock rom

Updated phone to stock Android 10 with Lenovo LMSA Tool rescue_and_smart_v5.0.0.25_setup.exe from https://support.lenovo.com/id/en/solutions/ht102605 to LAKE_RETEU_QPWS30.61_21_3_subsidy_DEFAULT_regulatory_DEFAULT_CFC.xml

Unlocked boot loader by following http://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a

Enabled USB debugging

Bootet to twrp-3.3.1-lake-Q-v1.img from https://xdaforums.com/g7-plus/development/recovery-twrp-3-3-0-moto-g7-plus-t3930050 using "fastboot boot twrp-3.3.1-lake-Q-v1.img" in fastboot

Sideloaded copy-partitions.zip from https://androidfilehost.com/?fid=4349826312261712574 by selecting "Advanced" -> "ADB Sideload" in TWRP and using "adb sideload copy-partitions.zip" on PC

Crated a full backup to USB-OTG with TWRP

Formatted data using "Wipe" -> "Format Data" in TWRP

Rebooted to Bootloader (without installing TWRP App)

Bootet to twrp-3.3.1-lake-Q-v1.img from https://xdaforums.com/g7-plus/development/recovery-twrp-3-3-0-moto-g7-plus-t3930050 using "fastboot boot twrp-3.3.1-lake-Q-v1.img" in fastboot

Wiped system by selecting "System" under "Wipe" -> "Advanced Wipe"

Sideloaded lineage-17.1-20200421-nightly-lake-signed.zip from https://download.lineageos.org/lake by selecting "Advanced" -> "ADB Sideload" in TWRP and using "adb sideload lineage-17.1-20200421-nightly-lake-signed.zip" on PC

Sideloaded twrp-installer-3.3.1-lake-Q-v1.zip from https://xdaforums.com/g7-plus/development/recovery-twrp-3-3-0-moto-g7-plus-t3930050 by selecting "Advanced" -> "ADB Sideload" in TWRP and using "adb sideload twrp-installer-3.3.1-lake-Q-v1.zip" on PC

Rebooted to Recovery

Sideloaded open_gapps-arm64-10.0-pico-20200422.zip from https://sourceforge.net/projects/opengapps/files/arm64/20200422/ by selecting "Advanced" -> "ADB Sideload" in TWRP and using "adb sideload open_gapps-arm64-10.0-pico-20200422.zip" on PC

Rebooted to System

Rebooted to Recovery (TWRP)

Sideloaded Magisk-v20.4.zip from https://github.com/topjohnwu/Magisk/releases/tag/v20.4 by selecting "Advanced" -> "ADB Sideload" in TWRP and using "adb sideload Magisk-v20.4.zip" on PC

Rebooted to System

Installed MagiskManager-v7.5.1.apk from https://github.com/topjohnwu/Magisk/releases/tag/manager-v7.5.1
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] chincheta0815:
That sounds really awesome that you found a way...

I am still suffering with WebView/Jelly & OTA.

In recent versions I suffered from issues that there was no reboot in the new slot and I did not know whether it was me or a kind of bug...
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] chincheta0815:
Did you have problems with restoring the phone from google, adding the google account or with webview?

Such problems were really severe with first builds...
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] blipk99:
Are you using USB3 ports? I've had endless trouble trying to flash devices over USB3.

Strongly reccomend buying a small USB2 hub and trying via that.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] digitaljeff:
oh good call, i thumbs up this, i've also run into flash issues over USB3 on other devices.
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] blipk99:
The USB3 ports on my laptop seemed to only work the second time a command is sent, and this doesnt work well at all for partitions.

Even on the USB2 hub I have a lot of trouble in linux, I have to constantly change ports until commands start working.

More trouble with the lineage-17.1-20200424-recovery-lake.img file as well, did not want to boot at all, would just load up into the stock ROM (which I had to reflash after messing up the partition formatting) and the touch screen wont work until another reboot.

I got TWRP to boot though and managed to flash todays build.

Noticed something strange though, there's an app called "Prip" preinstalled? I looked it up and seems to be some carriers chat app, is this a mistake?

And unfortunately, moto cam is still not recording any audio in videos :(

---------- Post added at 08:21 AM ---------- Previous post was at 08:10 AM ----------

In regards to the moto cam, it says it's accessing the microphone, but I'm assuming the wrong one as there are 3 on the device, and other apps don't seem to have an issue.

It was working fine in the 16.0 build, perhaps the audio source mappings have changed around since?

[MENTION=4481495]Jleeblanch[/MENTION]

---------- Post added at 08:21 AM ---------- Previous post was at 08:21 AM ----------

In regards to the moto cam, it says it's accessing the microphone, but I'm assuming the wrong one as there are 3 on the device, and other apps don't seem to have an issue.

It was working fine in the 16.0 build, perhaps the audio source mappings have changed around since?

[MENTION=4481495]Jleeblanch[/MENTION]
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] mmelillo:
after flashing lineage recovery img, rebooting into recovery mode and sideload copy-partitions.zip i'm getting:

error: protocol fault (no status)

what should I do to proceed?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
Lenovo/Moto's LSMA tool is legit, but another place to download full official firmware zips (especially for those who use Linux only and don't have Windoze) is here: https://mirrors.lolinet.com/firmware/moto/lake/official/

I wouldn't trust any firmwares found on any sketchy click bait websites.

Are you referring to 3 finger screenshot gesture?

Full screen stock Android 10 navigation gestures are present as well as the stock feature "Swipe for notifications" which are both found in -> Settings -> System -> Advanced -> Gestures

If you want to keep TWRP installed after updating via OTA, use the "TWRP A/B Retention Script" Magisk module. You can find it's instructions for use in the modules description.

Unfortunately I'm not able to reproduce this issue, but I'd really like to get to the bottom of it as pretty much every other Lake user on the Lineage IRC channel is complaining about it.

Someone also opened an issue on this on Lineage's gitlab issues tracker. Seems it'll happen on one slot and not the other? So every other update Webview is present and working as expected and every other it's not. If you could provide logs on the slot this issue is present, I would greatly appreciate it (assuming you or someone else hasn't already).

Are you trying to fastboot boot lineage-recovery.img? Cuz that's what it sounds like [emoji848]. Lineage recovery won't boot in that manner (whereas TWRP does) and needs to be flashed to the boot partition in order to be used for the first time. Afterwards you can simply reboot to recovery and it'll boot into Lineage Recovery

Regarding the Prip app... This is strange, no such app should exist on Lineage. I haven't added any carrier specific apps at all, and GApps doesn't install anything like that. I'd like more info about this tho and where exactly is that app installed.

Try using a different USB port on your PC?
[Moto G7 Plus ROMs, Kernels, Recoveries, & Other De] Jleeblanch:
More on the Webview issues some have been having.

https://gitlab.com/LineageOS/issues/android/-/issues/1796

I found the solution! You can find more info in the link above.

A workaround fix until I push and merge the needed change is to use TWRP and wipe OEM partition. You may or may not need to Format/Wipe data also.