yashsingh1/xdaforums huggingface dataset:
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
@frilalo do not relock bootloader on a Motorola device unless you are on the stock ROM meant for your device variant, or you'll get a corrupt bootloader and have to bring your phone to a service centre for them to fix it

As for SafetyNet? LineageOS doesn't allow haxxs of it on official builds so I don't try it but if you ask around others might have guides for how to make it work
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
Wahoo! Looks like RETUS 14 stock ROM just released so I can Kang some blobs from it and hope they're better for us than RETCN 14

lolinet mirrors - firmware, software, iso etc.

lolinet mirrors - powered by h5ai

mirrors.lolinet.com

I go on days off Wednesday but I'll see if I can get a build ready beforehand (y)
[Motorola Edge 40 Pro  / Moto X40 (China)] liko9477:
RETEU 14 Stock just came to Edge 40 Pro

Bulgaria/Yettel
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
Good news.. please post the build number (exactly)
[Motorola Edge 40 Pro  / Moto X40 (China)] liko9477:
U1TR34.8-30-13
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
Heyyo, update, so I tried making a build with RETAIL A14 device firmware, and just like RETCN my rtwo didn't want to boot to recovery, so I tried reflashing some A13 device firmware to try and diagnose it, and boom, black screen and not detected in device firmware... so I hard bricked my rtwo... I got an EDL cable ordered to see if I can force it into EDL so I can blankflash (Amazon says the EDL cable should arrive tomorrow), but if that doesn't work? I guess I'll need to ship it to a Motorola service centre and pay a fee lol fml, oh well, it is always a risk when doing dev work on a phone I guess
[Motorola Edge 40 Pro  / Moto X40 (China)] Soketto:
Damn that sucks. Always respect the work, time and sacrifice you put in to make this happen. Thank you. Let us know if there's anything we can do to help or chip in in some way.
[Motorola Edge 40 Pro  / Moto X40 (China)] zw666:
Nice work bro! I just flashed this version in my retcn x40. But there is no 5g and Voice over Wifi (I use Visible/Verizon). Do you have any clue about it? (I flash A13 RETUS stock Rom first then flash Los21) Other functions are perfect! Thank you for your work!
[Motorola Edge 40 Pro  / Moto X40 (China)] vasilkotsov1:
Hello,thank you for your hard work!Is there any changelog for latest update 02/02 I saw it's uploaded?
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
New test build is up! lineage-21.0-20240202-UNOFFICIAL-rtwo contains a fresh LOS source sync, a swap to RETAIL 14 blobs (but retain RETUS 13 device firmware) and a update of kernel from LOS qcom sm8550 repo and I also included an APN update for Telus MVNO's in Canada (Koodo, Public Mobile and PC Mobile) so MMS will work again.

Please report if this build works for you or not as I cannot currently test it as I accidentally bricked my rtwo

LineageOS for rtwo - Browse /lineage-21/lineage-21.0-20240202-UNOFFICIAL-rtwo at SourceForge.net

LineageOS for rtwo (Motorola Edge 40 Pro / X40 / Edge Plus 2023)

sourceforge.net
[Motorola Edge 40 Pro  / Moto X40 (China)] xuyh0120:
Mobile network broke for me again on the latest build, same behavior as lineage-21.0-20240115-UNOFFICIAL-rtwo. Although this time I noticed that changing APN settings can restore mobile network access.

On the plus side, SMS started working for me again.

US, ATT, Boost variant (project genesis) device.
[Motorola Edge 40 Pro  / Moto X40 (China)] Soketto:
Thanks for the release despite the borked phone, just flashed and seems my 4G is working again!
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
Well the EDL cable came in... unfortunately it didn't fix it, so I guess I gotta send my rtwo to a Motorola Service Centre and pay them to revive it :(

I'm glad to hear the new build is an improvement for all the RIL issues! Can anyone by chance test eSIM too? I saw in the logs that eUICC was acting up before
[Motorola Edge 40 Pro  / Moto X40 (China)] zw666:
My X40 5G in Visible still didn't work in 20240202 build QAQ
[Motorola Edge 40 Pro  / Moto X40 (China)] Soketto:
I tried to activate an esim but got:

"Network not activated - Something went wrong while trying to activate your number."

Previously I was getting eUICC errors so this is different behavior for me.
[Motorola Edge 40 Pro  / Moto X40 (China)] xuyh0120:
I tested a trial eSIM from GoMoWorld. eSIM installed normally, but no mobile network connection (no signal). I didn't look into whether its an eSIM issue or a phone issue since I have no intention of using their service.
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
Hmm, can one of you guys please get me logcats? Maybe it can give us hints as to what is going on there
[Motorola Edge 40 Pro  / Moto X40 (China)] zw666:
here is my log, the log begins with the shutdown of the airplane mode. My problem is no 5G and VoWifi
[Motorola Edge 40 Pro  / Moto X40 (China)] zw666:
I found a way to enter the EDL please refer to my new post
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
@zw666 ok thanks for logs and also EDL procedure as that is different than the one included with the box of the EDL cable

This is the EDL cable I bought, but I can try the splicing method just in case maybe the cable I got isn't good

https://a.co/d/djr6AdF

Unfortunately I'm out of town working right meow, so I don't have my rtwo with me... But once I get back I shall definitely try
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
New test build is going up! It is uploading meow so it might take 30 mins. lineage-21.0-20240213-UNOFFICIAL-rtwo contains a fresh LOS source sync and Feb ASB including kernel too

Please note, since my rtwo is bricked this is untested! Please report any bugs, especially if it doesn't work

This build contains a potential better fix for USB tethering if someone could please test it

LineageOS for rtwo - Browse /lineage-21/lineage-21.0-20240213-UNOFFICIAL-rtwo at SourceForge.net

LineageOS for rtwo (Motorola Edge 40 Pro / X40 / Edge Plus 2023)

sourceforge.net
[Motorola Edge 40 Pro  / Moto X40 (China)] clubwagon:
Hi. What mean rtwo excuse me im noob
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
'rtwo' is the codename for all device variants: Moto X40, Edge 40 Pro and Edge+ (2023)
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
I was a little busy, but just flashed it. I can confirm it works. So everyone that was waiting can go ahead and update

Also, it somehow is even smoother than it was before
[Motorola Edge 40 Pro  / Moto X40 (China)] zw666:
Hi MarD, my base stock rom is the latest A14 retus version. It doesn't work. the phone cannot reboot to recovery. If I try it downgrade the bootloader it can be flashed but The phone will lose 5G. I think that is caused by baseband issue with bootloader and modem version. moto forbidden user downgrade the BL ,Baseband.
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
@zw666 yeah that's the same issue I was observing, but I was able to downgrade device firmware.

My brick happened because I was trying to diagnose which device firmware is causing the reboot to recovery to fail by trying to flash only one A14 device firmware file at a time and rebooting which the phone didn't like lol fml...

I'd recommend trying via lolinet device firmware file and TinyFastbootScript and do a full device firmware and factory reset to an A13 version and then test if 5G works there

But I'd recommend using either RETAIL or RETUS variants. RETCN there's definitely more restrictions
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
In lineage-21.0-20240213, misstakes were made with picking all security patches as well as it didn't really get to kernel 5.15.148 .. expect a follow up build shortly
[Motorola Edge 40 Pro  / Moto X40 (China)] debx:
Hi,

thank you firstly for the great Los!

I updated my 40pro to this one:

lineage-21.0-20240213-UNOFFICIAL-rtwo

And get this error:

./adb sideload lineage-21.0-20240213-UNOFFICIAL-rtwo.zip

serving: 'lineage-21.0-20240213-UNOFFICIAL-rtwo.zip' (~47%) adb: failed to read command: Undefined error: 0

But after installing this:

./adb sideload MindTheGapps-14.0.0-arm64-20231028.zip

Total xfer: 1.00x

I can start and copy from old edge 30 to new 40 pro.

What can i say it works for now.

Is there a problem with this error?

Thanks

Denis
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
Don't worry about it, the 47% ADB "bug" and that error, its widely known, happens in the android world in general, and when it hangs on 47% for a while before it, in reality it keeps transfering/deploying the package. So if you wait till the error as you did, everything got processed as expected, which explains why it works.
[Motorola Edge 40 Pro  / Moto X40 (China)] maicol07:
Hi,

I'm trying to upgrade from the 20240117 build to the latest one but when I try to sideload the update zip it gives me the following error:

Installing update...
Step 1/2
Error applying update: 7 (ErrorCode::kInstallDeviceOpenError)
Error in /sideload/package.zip (Status 1)
Restarting adbd...
Installation aborted.

Also re-sideloading the previous build (with the previous recovery) gives the same error.

I don't know if it's related to Magisk (I doubt it, since the boot images have been reflashed when updating) or because I tried installing it the first time via the updates in settings (using Local Install) but it was stuck.

Note that re flashing all the boot images, sideloading copy-partitions and then gapps let me boot into the previous build

Any ideas?

Thanks
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
@maicol07 Try with a different USB cable, can't reproduce
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
Heyyo, new test build is going up! It's uploading meow so it might take 30 minutes to be available. lineage-21.0-20240216-UNOFFICIAL-rtwo contains a fresh sync of LOS sources for the full 2024-02 ASB patches (and the new boot animation!) and also fully added the kernel 2024-02 ASB patch too. There's also a change to bring back the qccsyshal as our A13 version didn't work on A14 but meow we can use the A14 version from our stock ROM. QTI GNSS seems to depend on it for some functionality as it does show some errors in logcat.

Build taken down I'm checking into the device firmware it didn't include properly
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
I'm starting to prepare rtwo for LOS official submission and here is a preview of the wiki for it, so please check it. Device specifications, any typos and installation instructions just in case I missed something

https://blob.lineageos.org/preview/wiki/382961/

WIP Gerrit commit

https://review.lineageos.org/c/LineageOS/lineage_wiki/+/382961/1#message-edd92afa4a60d3865477e3a87cb5d20d8fcd4b5e
[Motorola Edge 40 Pro  / Moto X40 (China)] Shuvo_bd:
Hey man, whats the update on ur phone? Did u get it fixed?
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
Ok! Let's try this again... Sorry about that fellas. lineage-21.0-20240217-UNOFFICIAL-rtwo contains a fresh sync of LOS sources for the full 2024-02 ASB patches (and the new boot animation!) and also fully added the kernel 2024-02 ASB patch too. There's also a change to bring back the qccsyshal as our A13 version didn't work on A14 but meow we can use the A14 version from our stock ROM. QTI GNSS seems to depend on it for some functionality as it does show some errors in logcat.

LineageOS for rtwo - Browse /lineage-21/lineage-21.0-20240217-UNOFFICIAL-rtwo at SourceForge.net

LineageOS for rtwo (Motorola Edge 40 Pro / X40 / Edge Plus 2023)

sourceforge.net
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
@Shuvo_bd I wish it was fixed so I could test builds before pushing them out... I'm out of town working until Wednesday so hopefully then I can attempt the new EDL method. Worst case I'll see if a local repair shop has some wizardry, like maybe find out where the actual EDL contacts are on the motherboard but tbh I have no idea there...
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
I can confirm that lineage-21.0-20240217- works, i flashed it. But i still don't see a boot animation
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
I've got the best benchmark result encountered so far
[Motorola Edge 40 Pro  / Moto X40 (China)] Shuvo_bd:
My device also broke pretty much like urs. Since it was my only working device, i had to give it to a local repair shop and I dont know wheather they will be able to fix it or not. I tried the DIY EDL method from the thread but failed. I did some research and found the solution is not that much hard. Beside EDL cable or DIY EDL cable there is another ultimate method to get ur phone connected to EDL mode. But it requires removing the back part, disconnecting the battery and then finding the 'Test point' There are couple videos in youtube showing how to find the test point. U need to manually short the test point with Tweezer and then connect the phone to ur PC. This way phone will get connected in EDL mode. Rest of the steps are simple once u get it connected. Flashing the Blank Flash zip will revice the fastboot menu and from there one can easily flash desired firmware. Keep us updated. Local repair man here demanded a couple of days to fix the device but they didnt gave me any surity.
[Motorola Edge 40 Pro  / Moto X40 (China)] xuyh0120:
Flashed latest update, boot animation is still not working.

I looked into the mobile network issue a bit more. Sometimes the cellular signal icon on the status bar will disappear and reappear a few times on device boot. I'm guessing there is a crash loop.

That's also probably why SMS is working for me without the QTI injection thing, since restarting mobile network is one of the ways to workaround SMS problem.

I captured modem.log when this happens: https://pb.ltn.pw/3ZpxmWTF/+inline

BTW: I'm compiling my own kernel from your kernel source code on GitHub in order to use KernelSU. I have checked that the same issue also happens with kernel provided by you, but without root I cannot capture the complete system logs there.
[Motorola Edge 40 Pro  / Moto X40 (China)] debx:
Hi,

is there a Problem when i install Gapps from here?

Release MindTheGapps-14.0.0-arm64-20231025_234300 · MindTheGapps/14.0.0-arm64

https://gitlab.com/MindTheGapps/vendor_gapps/-/tree/41dd4da7f8afb75761c3e55ede27859f352d6881

github.com

Update:

Installing this Version was successfully. 21.0-20240217-UNOFFICIAL-rtwo.zip

No Bootlogo, is allways black screen on start.

Both sim and e-sim cards working. (I use only 4G here in germany)

W-Lan is stable.

Gapps has to be installed from the link i posted previously.

Updater still not working. Have to update via sideload.

Update 2:

First problem. Gapps is working but Play Store close the Update checking with problem. Play Sore doesnt crash. Only the popup show me thats there a problem.

Ok, im confused now. Gapps works and heals from alone...

Edit./

One more question please.

How can i remove microG, cause i use Gapps, from my previous Installation?

Or would be remove the new Rom installation the microG automatically? Sry i dont understand the function. And how works all together.

"Got it, go to the App list on your Phone. There you can find MicroG and uninstall it"

Edit./

SMS doesnt work
[Motorola Edge 40 Pro  / Moto X40 (China)] maicol07:
I've managed to flash the latest one! However, SMS are still not fixed and boot animation is not displaying.
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
Heyyo! Everyone! This does work! It takes time and patience and multiple attempts and also charging your phone before trying it, but it works! My rtwo is alive again! :love: (y)

@maicol07 that is a known telephony bug. Please try to toggle airplane mode or reinsert your sim card. This issue happens for all sm8450 and sm8550 devices on custom ROMs
[Motorola Edge 40 Pro  / Moto X40 (China)] maicol07:
Yeah, I know. Wasn't this fixed with official A14 sources?

Also it seems there are some freezes for some seconds
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
@maicol07 A14 sources didn't solve it as it seems to be a Qualcomm-related issue. Hopefully, someday a proper fix will be found though...
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
Ok, I made some tweaks to the Wiki for edge+ 2023 as it only has 8GB of RAM and 512GB storage as a single option and also launched in May 2023. I also added BeiDou and QZSS as supported features for all three variants.

The installation instructions seem fine to me and the rest of the stats afaik are good too.

I'd still like it if someone other than me check it all over just in case I did miss something

https://blob.lineageos.org/preview/wiki/382961/devices/rtwo/

Wiki LOS Gerrit commit:

https://review.lineageos.org/c/LineageOS/lineage_wiki/+/382961
[Motorola Edge 40 Pro  / Moto X40 (China)] robby968242:
Hey everyone,

I'm facing a issue with my Moto Edge 40 Pro while trying to flash LineageOS. I've followed the instructions step-by-step(https://xdaforums.com/t/step-by-step-guide-to-flash-lineage-os-or-any-other-custom-rom.4610481/) up to the point where I used fastboot reboot recovery. Instead of entering recovery mode, my device is stuck in a bootloop to a screen alerting that "The bootloader is unlocked, and software integrity cannot be guaranteed. Any data stored on the device may be available to attackers. Do not store any sensitive data on the device." It then suggests visiting Motorola's support forums for more info.

Fastboot screen shows usual info with an unlocked device state, and upon choosing 'Recovery mode,' it loops to the warning message.

I've tried re-flashing recovery multiple times.

I would really appreciate any help or suggestions on how to get past this and successfully boot into recovery.

Thanks a ton!
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
@robby968242 instead of using 3rd party guides, please use the installation instructions linked in OP: https://xdaforums.com/t/project-lin...-pro-edge-2023-moto-x40.4584541/post-88809003

The bootloader warning happens to all of us on custom ROM's and is meaningless & not relevant to your issue, just double tap power button to skip it instead of waiting 10 seconds.

If you can't boot beyond that, it's a result of making a mistake during installation, following the instructions provided by us to the letter should help.

Edit: Because the old topic is locked, i can't edit the installation guide post to add the A14 GApps package link. So, i will re-make the installation post below this one, and Marc will put it in the OP.
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
A new test build going up! It will be ready in about 30 minutes from this post. lineage-21.0-20240226-UNOFFICIAL-rtwo contains a kernel based on the rtwo kernel source code release for A14 and that also means we meow support A14 device firmware too and it is also included with this release. We also have switched to A14 IMS stack so please test VoLTE as well. all thanks to Markus! We also worked on trying to fix that darn boot animation bug and we found a solution that mostly works... I say mostly as there's still some race condition we haven't figured out, so probably 75% of all boots, be it a cold boot from power off or just a reboot will show a boot animation. I've also done a fresh sync of LOS source code to ensure we have the latest source code there.

I'll give this a few days of testing so please test all functions and if for example VoLTE worked before and doesn't in this build? Please let us know ASAP and also provide logcat as we will be requesting the LOS team review our trees so we can get official builds.

LineageOS for rtwo - Browse /lineage-21/lineage-21.0-20240226-UNOFFICIAL-rtwo at SourceForge.net

LineageOS for rtwo (Motorola Edge 40 Pro / X40 / Edge Plus 2023)

sourceforge.net

I haven't really heard any feedback on the wiki preview but afaik it's good as it is, I'll just need to update it to say we require and ship with A14 device firmware

Anyone on this build that please fill out this telephony questionnaire

sm8450/sm8550 telephony functionality

This is to check which carriers cause issues (SMS receiving, VoLTE issues with A14, ...), and which work fine on these newer qualcomm platforms

forms.gle
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
@robby968242 I think your boot loop issue is actually because you have A14 device firmware on your phone which wasn't supported before. Please download the 20240226 build I just posted and try that.

For installation instructions please follow the one from the wiki preview

Please ignore the Android 13 device firmware requirement as I'll be updating that to Android 14 device firmware

https://blob.lineageos.org/preview/wiki/382961/devices/rtwo/
[Motorola Edge 40 Pro  / Moto X40 (China)] robby968242:
Hello @ThE_MarD and @mxz55

Thank you both so much for the quick support. I truly appreciate it!

Regarding the new build mentioned, I'm not finding the large zip file. Is it possible to use the one from February 17, 2024? Apologies for any confusion, i'm quite new to this.

Thank you!
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
@robby968242 I think it was still uploading at that time and meow it looks like it is up! Please check the link again

Oh, I just realized with rtwo A14 kernel source code and A14 device firmware and blobs there's zero camera issues! I can take pictures in apps like Telegram and no more greyscale!
[Motorola Edge 40 Pro  / Moto X40 (China)] robby968242:
I've successfully flashed the new build released today after following the exact code strings from this dthread. Also,I had Android 14 as the stock version originally.This build bypass the problem perfectly.

The ROM is impressively fast and responsive, even better than Motorola's stock A14 version. Kudos @SGCMarkus and @ThE_MarD for such a great job! Everything important works well: camera, WiFi,4g 5g Bluetooth, calls, audio, video, sensors, GPS, and more
[Motorola Edge 40 Pro  / Moto X40 (China)] debx:
Hi,

updated right now to new Rom.

Start unspectacular and normal

No Bootlogo

SMS works

4G/5G works

Mindgapps works

Magisc works

Or maybe i had to update also all of these?

fastboot flash --slot=all dtbo dtbo.img

fastboot flash --slot=all recovery recovery.img

fastboot flash --slot=all boot boot.img

fastboot flash --slot=all init_boot init_boot.img

fastboot flash --slot=all vendor_boot vendor_boot.img

Thank you for the Update

EDIT./

Dont know what happens. The Bootlogo works now.

What i did...:

Install previously only the:

Img

Gapps

Magisc

No Bootlogo

Secound step install:

fastboot flash --slot=all recovery recovery.img

fastboot flash --slot=all boot boot.img

fastboot flash --slot=all init_boot init_boot.img

fastboot flash --slot=all vendor_boot vendor_boot.img

No Bootlogo

Third step install (secound time after installing step two):

Img

Gapps

Magisc

And there is it. The Bootlogo is almost there. Also the pin asking for sim card without clicking few times on the power button cause previous was the screen black. I tested few times too rebooting the phone. Still works for now.

Therefor isnt enough only to Update the Img.
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
I added a telephony questionnaire for that new build as Markus wants to find out how many it works good for and who has issues and which country/carrier

sm8450/sm8550 telephony functionality

This is to check which carriers cause issues (SMS receiving, VoLTE issues with A14, ...), and which work fine on these newer qualcomm platforms

forms.gle
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
@debx You've posted before with vague issues that cannot be reproduced by others/aren't a thing.. now i see it's likely because you don't take the effort to follow our installation instructions. You are making a bunch of mistakes, for example not flashing all images in the exact sequence from the instructions can lead to all sorts of bugs depending on build and changes.

Please follow all steps in the future
[Motorola Edge 40 Pro  / Moto X40 (China)] debx:
Yes true was my mistake. But i tough i have only to flash the main Img and the rest can been at it is. Bytheway i made mistakes and others can learn of it.