yashsingh1/xdaforums huggingface dataset:
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
I went through the steps to install it, and I believe I've installed it correctly, but after enabling it and restarting, it doesn't do anything to stop the barrage of com.google.android.gms SystemUpdate calls that lead to the battery drain issue. I briefly looked at the code, and I have a hunch that it only modifies things specific to Google Photos -- in other words, it doesn't go deep enough to remove all of the spoofing involved here.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] LeMaJo:
i wonder if there will be the current security patches once more?
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
I don't think people would mind to just get a new build with *zero* code changes other than build date, just to workaround the battery draining bug for a few more months. The build could even be automated, lol.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] gururug:
lovely ROM, thanks all for the efforts

the trusty moto g lives on!

(although my ear speak busted long ago... lots of rain usage ;) )
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] LeMaJo:
i fully agree, the phone still works fine and so does the ROM. just the current security patches would be fantastic :)
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] cjdijk:
I wonder if someone else could maintain this rom? If GtrCraft would explain how to do it, I would do it myself. The battery draining is a mayor issue for me. But if possible it would be he best thing, to loose the Pixel 6 spoofing for unlimited storage, I wouldn't miss that for sure.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
I mentioned this in the crdroid Telegram channel. Hopefully he responds.

Btw, I was reading back over that channel and it had me recall that the latest Arrow OS build claimed to have removed the Pixel spoofing, but I don't remember the actual result of that, whether it actually fixed the battery draining bug.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
GtrCraft replied to me on Telegram.

I said: "a few people in the XDA thread would like to take over the potter code if that would be possible. We're wanting to continue making builds to get around the battery draining bug."

He said: "Well good luck with that, but I am not helping"

:(

So, my own thoughts on this:

The last device specific commit on GitHub was Oct 10, 2021:

GitHub - crdroidandroid/android_device_motorola_potter

Contribute to crdroidandroid/android_device_motorola_potter development by creating an account on GitHub.

github.com

Looking at the ROM's changelog, the only listed additional change following that date, other than security patches, was on July 2022: "Updated host file to block system update data drain":

https://raw.githubusercontent.com/crdroidandroid/android_vendor_crDroidOTA/11.0/changelog_potter.txt

So, as a starting point, I guess it could be possible that nothing else would be needed to reproduce the build from December other than what's already on GitHub? I'm asking, because I've never built crdroid.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] Wolfcity:
I'm no pro in ROM building but if it's only an entry in the host file that could block the system battery drain shouldn't it be possible to block that entry with something like AdAway?
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
Yes, but it probably is just stopping the *data* drain, not the battery drain. Those repeated SystemUpdate requests keep happening, even if the data requests are getting blocked.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] cjdijk:
Yes, that's it. Modifying host file only prevents mobile data eating. Your phone still continuesly tries to update, becouse Google thinks our Moto G5 Plus is a Google Pixel 6 pro. This updating failes, and the process starts again and again. Our phone is busy with that, draining the battery.

At one time he stated that CrDroid was not based on a Google Pixel Phone, so it wouldn't have this issue. Unfortunately this wasn't true (about 3-4 months after the last update). When I switched to my backup Moto G5 Plus, restoring from my Google Account it said "do you want to restore from the backup of your Google Pixel 6 Pro". I only have Moto G5 Plus smartphones. So I guess CrDroid also uses Pixel phone spoofing.

Also I have got a similar message back from the CrDroid developer (tweakers.net). He had told me in in the past which city he lives in the Netherlands, I told him he could borrow my back Moto G5 Plus if needed, saying I live about 10 KM away from you. He answered he would call the cops if I wanted to come visit him??? I never said I have his address and never would visit him without asking.

I guess we have to accept the battery draining, hoping Google may be stop supporting the Pixel 6 Pro soon. I am even considering going back to stock Android 8.1 As I am writing this, I already have done this on my backup Moto G5 Plus, going to try if all apps I am using still work, not finished with that. I have to manually install those apps, becouse for some reason copying apps, settings, caller history from my Google backup doesn't work. I guess that Android 11 backup isn't useable for Android 8.1
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
Some of these dudes developing ROMs can be personal privacy paranoid, and lack social skills and patience, I think. :( (That "elite" hacker mentality or whatever.) That guy could've just said, sure, just send the phone by mail.

Some of these guys are supposedly all about FOSS and everything, but won't even give people the time of day, just basic tips from whoever last built the ROM in December so we could take it over.

I still believe there has to be some way to disable that SystemUpdate process by manipulating the ROM in some way. Unpacking it, modifying it, repacking it, without having to compile the whole thing from scratch. Go into the ROM image and change whatever date is being used by SystemUpdate or com.google.android.gms to trigger the checking. Unfortunately, I don't have enough Android experience to think up what sort of fix that might be.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
Btw, PixelExperience supposedly came up with a fix for this a few months ago (the code is referenced at the end of the bug report): https://github.com/PixelExperience/android-issues/issues/4478
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
Also, it looks like at least a fix for the data draining part of this was merged into a bunch of ROMs, including crdroid recently (blocking the OTA downloading part of it), but we'd need a backport of that, or we might as well just keep blocking it in the hosts file without having a true fix for the battery draining:

Continuous system updates download · Issue #1008 · PixelExperience/android-issues

Build date Passing from PixelExperience_surya-11.0-20210621-1717-OFFICIAL To PixelExperience_surya-11.0-20211016-1800-OFFICIAL Expected Behavior The update gets downloaded when I click on the downl...

github.com

hosts: Block OTA downloading from GMS · crdroidandroid/android_system_core@c0b97a8

https://github.com/PixelExperience/android-issues/issues/1008 Change-Id: I4d611ee8b8490832b310fca48f2576fc9790d483

github.com
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] cjdijk:
Mobile data eating is already fixed for most rom's, and indeed easy to solve by editing host file. A fix for battery draining would be great. I don't mind not getting security updates. I hope they create a fix which works for all smartphones and rom's. I personally think I would switch to DotOS. I like that rom the most, when I pick up my smartphone, it not only shows date and time (like other potter rom's), but also wheater report and coming appointments for that day using calendar from google.

I can't do anything with the code in the link you provided. Maybe someone can make an installable twrp zip from it? But reading that link, someone gives a temporary fix: Disable Google Play Services (from Settings, Apps). I have disabled it myself, let's see if it stays disabled and if battery drainage is back to normal. I will let you know if it's makes any differance. Good thing I have a backup Moto G5 Plus, so I can switch easy from 8.1 to 11 without having to re-install, just moving simtray.

It looks like disabeling Google Play Services does the trick, but when I picked up my smartphone, lots of warning messages came up, from: Device Health Services, Android Auto, Googe Meet, Google Maps isn't working with Google Play Services disabled. You can disable those warnings. And just enable Google Play Services temporary during using those Google apps. I will give some update later.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
That PixelExperience code, it's adding lines to overlay/common/frameworks/base/core/res/res/values/config.xml, but I don't know if that is part of the code that needs to be compiled, or if it's a file that can be edited on the phone.

Edit: To clarify, it's code that needs to be compiled, but I don't know if there ends up being a file with these lines on the phone that could be modified.

I see that sort of thing as just a flawed workaround, not really a fix, given that it breaks all sorts of things.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] cjdijk:
You are right. Have been testing. Battery draining stops. But several warnings appear, about which apps are affected, you can disable those warnings. Mostly Google Apps, like Contacts and Calandar can't be opened. Calling seems to be working, but also give a warning. Have tested this by calling my landline and back. SMS might work, but can't test it. So disabeling Google Play Services is something you can do when you are not actively using your smartphone. And when using an app which isn't working, just enable it temporary.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
Yeah, Messages still works for SMS, even though it gives the notification that it won't (likely other functionality in it breaks).
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] cjdijk:
I have searched for "Google Pixel 6 Pro update policy" and found that it will get Android version updates until October 2024 and security updates until October 2026. https://support.google.com/pixelphone/answer/4457705?hl=en#zippy=,pixel-later After that we probable will get rid of the battery draining problem. I guess other rom's for our Moto G5 Plus are based on the same "Google Pixel 6 Pro" or hopefully an older model? Does anyone know if there is a rom based on Google Pixel 5? (That model will stop getting updates at he end of this year).
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
I'm not so sure about this. Even after a phone will no longer get updates, it will still be eligible to download the updates that already were released. I doubt there's a cutoff date in the code for it to stop phoning home. I think it will continue indefinitely, unless we find a true fix.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] cjdijk:
Just finished installing all apps one by one on Android 8.1 (Google Backup made on CrDroid isn't usable). It seems like almost all apps are working but... As soon I did move my simcard from my Moto G5 Plus with Android 11 to my Moto G5 Plus with Android 8.1, it says "no service"? Mobile data and wifi are working, but calling and sms doesn't work. I am sure I entered the right pincode and have used this simcard on Android 8,1 about 2 years ago. Also I know my provider (Simpel/T-Mobile) has stopped supporting 2G and 3G (I think after I was already using Android1 11). They only use 4G now. Also know Android 11 supports a huge list of different network types (I use the setting automatic, it has choosen VoLTE/LTE), Android 8.1 only has 2G, 3G and 4G. Anyone know why calling and sms doesn't work using Android 8.1 anymore?
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
@cjdijk It should still work. Go to the "Phone info" hidden menu from the dialer

*#*#4636#*#*

, go to the three dot menu -> IMS Service Status to see if IMS is registered.

Depending on what ROM you had on this phone previously, it might have done something to the EFS or persist partitions. I've had to restore the stock EFS and persist partitions before to fix VoLTE and IMS.

Also, my own experience from last year, but probably tangential, I was having issues on 8.1 with a T-Mobile MVNO SIM where it seemed to be losing connectivity from the tower on a daily basis (I believe calls and texts weren't coming in). I had to go in and out of airplane mode *every day* to fix it. But then I switched to using a Verizon MVNO SIM and it stopped doing that.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] cjdijk:
Nevermind, thanks anyway. I did use the Official "Rescue and Smart Assistant" from Lenovo website to go back to stock Android. All went back to stock, except smartphone was still unlocked. I remember it only had 2G, 3G and 4G options, not VoLTE (the one I need). It wasn't an issue, until lots of providers (inclusing Simpel/T-Mobile) shut down 2G for calling. In the past you used 3G or 4G for data only. Now days you use 4G for data and calling, so the software has to deal with that. I guess I'll stick to Android 11. I have figured out a way to use Calendar and Contacts without Google Services Enabled. Just use Firefox (not sure if it works with Chrome), login to your Google/Gmail account and go to calendar.google.com and contacts.google.com and create shortcuts to your startscreen. But may be I'll go to another custom Android, but not back to Lenovo/Motorola stock.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
Just so there's no confusion, 8.1 on potter *does* support VoLTE for calling. That's not the reason it's not working for you.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] Wolfcity:
Correct, Moto G5+ 8.1 supports VoLTE and VoWiFI. Depends on the provider and apn settings.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] cjdijk:
I am sure I never had VoLTE on stock Android 8.1, I could only choose these 3: 2G, 3G and 4G under preferred network settings. May be you were using another Custom rom with Android 8.1? Or it's my provider. When using (custom) Android 11, I can choose 34 different combinations of: GSM/WCDMA/EvDo/LTE/TDSCDMA/NR. and an option to enable VoLTE (voice over LTE).

I am going to install [ROM][11.0][potter] DerpFest for Motorola Moto G5 Plus [Official][2021-08-17] now on my backup Moto G5 Plus. I have never tried that one. I says it's based on Pixel 5 (not 6 like CrDroid). Let's see if this one works better. To be continued.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
VoLTE is still using 4G LTE. The slider you're talking about is present on the hidden Testing -> Phone info menu -> VoLTE provisioned, but you should also look for a setting called Enhanced 4G LTE Mode. (Settings->Network & Internet -> Mobile network -> Advanced).

If that's turned off, or missing, then your phone is likely not IMS registered yet. You can also double check your Access Point Name from the Advanced menu, too.

Another way to check IMS registration status is: Settings -> System -> About phone -> Status -> IMS registration status.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] cjdijk:
I have been testing DerpFest, battery draining is also the issue here. But worse, I can't edit host file, it says disk full. I noticed this rom zip file was about 200MB bigger then the other rom zip's, so I guess the default system partition needs to be bigger for this rom. I am not going to increase it, becouse this rom has the same issue as the other ones.

Thanks for the additional info mmortal03. I have restored my backup phone again to stock Android 8.1, but can't make calling work. Everything else is working, including wifi and mobile data. Have searched for VoLTE in the places you mentioned but can't find it. What I do see is that IME information seems to be incorrect. These are 0 and 15 (sim1 and 2). This should be a long 15 digit number (have checked it when using DarFest on that same smartphone). Also have seen, on my smartphone with Adroid 8.1, message "bad key" instead of "n/a" during boot (showing the screen that the phone can't be trusted becouse it's unrooted/unlocked). Could it be the stock Lenovo Android 8.1 only works when phone is rooted/locked again?

It may be has to do with my provider. I have checked the dates, I see I did switch from KPN prepaid to Simpel/T-Mobile in march 2021 and one moth later switched to Android 11. But I might never have used this provider using Android 8.1, not 100% sure. I also know 2G and 3G networks are shutdown in 2022.

I wonder if anyone has saved older custom potter roms with Android 9 or 10. I can't find any online. I only have saved all Android 11 rom's:

Arrow-v11.0-potter-OFFICIAL-20220921-GAPPS.zip

crDroidAndroid-11.0-20221213-potter-v7.25.zip

DerpFest-11-Official-Beta-potter-20210817-1150.zip

dotOS-R-v5.2.1-potter-GAPPS-20211123-1441.zip

lineageos-18.1-20220414-UNOFFICIAL-potter.zip

PixelExperience_Plus_potter-11.0-20210910-0159-OFFICIAL.zip

PixelExtended_potter-11.0-20210816-1319-OFFICIAL.zip

PixelPlusUI_3.11_potter-11.0-20211125-1125-OFFICIAL.zip
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
No, it should work.

Did you check that your APN settings are completely correct?

You haven't said if your phone is IMS registered or not.

Also, the potential issue I mentioned with EFS/Persist. The "VoLTE fix" on the Telegram group states:

volte-fix:
Before trying anything backup your EFS and Persist via TWRP
Then make a dd backup
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img

It says to go to the following thread and read through it: https://xdaforums.com/t/fix-persist-resolve-imei-0-volte-4g-explanation-requirements.3825147/

There's a guy on the Telegram channel that says that he's using LOS 17.1 and it isn't causing the battery drain bug. I asked him which build he's using, but he hasn't replied. I think it is one of ZJRDroid's builds, but I haven't found a copy of it yet.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] cjdijk:
I don't know what IMS is and how to check if it's registred. Have tried and looked for all options, but wasn't been able to make it work. I guess I already gave up stock Android. May be I am going to try a custom 8.1 rom.

I have been searching myself for older rom's and think lots of rom's can be found on androidfilehost.com Just search for Potter. Some zip's are downloadable, others not. Even have found a newer Android 11 rom lineage-18.1-20230213-UNOFFICIAL-potter_security-patch-date_2023-02-05.zip but that one will just last about one month before going to drain your battery, becouse it's already some moths old.

Thanks for your info, Lineage 17.1 (this is Android 10) is downloadable on that site. I guess the best choice is the newest of Android 10. But I'm not sure. Have been able to download these two:

lineage-17.1-20210108-UNOFFICIAL-potter_security-patch-date_2021-01-05.zip

lineage-17.1-20230213-UNOFFICIAL-potter_security-patch-date_2023-02-05.zip

Have read on Lineage website they don't support GApss,

but if you want to use GApps, they prefer MindTheGApps.

At this point I have been able to downloaded these:

639.738.002 AOSiP-10-Alpha-potter-20200205.zip

603.199.087 AOSiP-9.0-Official-potter-20190704.zip

596.938.927 crDroidAndroid-8.1-20180303-potter-v4.0.zip

685.956.591 crDroidAndroid-9.0-20190827-potter-v5.7.zip

179.543.695 EvolutionX_3.5_potter-10.0-20191217-0409-UNOFFICIAL.zip

683.294.412 lineage-17.1-20210108-UNOFFICIAL-potter_security-patch-date_2021-01-05.zip

694.387.101 lineage-17.1-20230213-UNOFFICIAL-potter_security-patch-date_2023-02-05.zip

732.603.380 lineage-18.1-20230213-UNOFFICIAL-potter_security-patch-date_2023-02-05.zip

194.493.844 MindTheGapps-11.0.0-arm64-20220217_100228.zip

807.909.650 PixelExperience_potter-8.1.0-20171211-2218_64bit.zip

636.784.312 PixelExperience_potter-8.1.0-20171212-0127_32bit.zip

To be continued.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
On 8.1: Settings -> System -> About phone -> Status -> IMS registration status

GApps always worked fine for me on LOS. Sometimes one version better than the other. They just don't want to help you with it (but it doesn't matter when these LOS ROMs are no longer supported themselves).
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] cjdijk:
I wanted to switch from CrDroid to LineageOS 18.1 tomorrow, but decided to switch now. The reason is, this night battery usage was 20% instead of 10%. And with Google Play Services still disabled. Lot's of warning messages from Google to enable Google Play Services. I guess disabeling Google Play Services only has limited time effect, and those warnings use battery too. Tomorrow I will also try LineageOS 17.1 on my other Moto G5 Plus. Let's see if there is a difference between Android 10 (LineageOS 17.1) and 11 (LineageOS 18.1).

LineageOS 18.1 20230213 is working fine. Battery usage was high during installation (50%), but is defenitely very low now (1% in 4 hours, with battery saving on, no active use, everything enabled including Google Play Service). Only face recognition seems to be missing, but no problem for me. I am using fingerprintsensor for unlocking. There are some double apps. For example: Calling/sms/calendar/contacts from Lineage and from Google. I wonder if I would intall without GApps, would that make any difference for battery usage (if LineageOS isn't getting new updates), and can I still can use Calendar and Contacts from my Google account. No problem if Google Play Store would be missing, as long I can install Android apps using (Firefox) browser.

By the way, I also have found a solution to fix imei number 0 (and not being able to call) when I tried to go back to Stock Android 8.1 (not tested it). https://xdaforums.com/t/guide-how-t...in-moto-g5-plus.3739808/page-12#post-77275716

Just wanted to say, I am very happy. Yesterday 13:00 till now 9:00, battery usage of 2%. Using LineageOS 18.1 20230213. With battery saving enabled, not a very active use (sunday). But still impressive. I was seriously thinking, battery indicator isn't working.
[Moto G5 Plus ROMs, Kernels, Recoveries, & Other De] mmortal03:
I'm pretty sure we've discussed other problems with 18.1 last year in the other thread?

Good.

Yeah, I was pretty sure it was something to do with the persist partition.

Please follow up after you've done further testing. I don't have time to go back through the other thread, but I'm pretty sure we had other issues with it.