yashsingh1/xdaforums huggingface dataset:
[Motorola Edge 40 Pro  / Moto X40 (China)] jimmie32:
Worse than that. Since the build is unsigned from the perspective of AVB (and Moto has no way of enrolling custom AVB keys), once the bootloader is relocked the phone will be permanently bricked with the error No valid operating system could be found. The device will not boot. and unlocking again is impossible because the system cannot be booted and verified.

Relocking the bootloader is futile on moto devices anyway, as the original state (oem_locked) is permanently disabled by e-fuse once first unlocked (fastboot getvar iswarrantyvoid). Relocking only returns the user to flashing_locked and not oem_locked. Moto service centers will refuse to service the phone without a motherboard replacement once ever unlocked.
[Motorola Edge 40 Pro  / Moto X40 (China)] elbra444:
Mine is relocked and can be unlocked again according to the Motorola website. So does this mean I can still flash LOS on it? Or will I just end up with a bricked device?
[Motorola Edge 40 Pro  / Moto X40 (China)] clubwagon:
hi guys, how can i send a log cat.
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
It was already answerred.. as long you can in fact unlock bootloader, you can install LineageOS. My point was just to figure out if you already created a problem by relocking, so far you didn't. Just don't do it again after installing LineageOS and you'll be fine..
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
By using adb.. just enter this command: `adb logcat > logcatOutput.txt` and it will end up in the same folder as adb.exe

of course, reproduce whatever issue you're collecting it for right before saving logcat, so relevant lines are included. Avoid leaking sensitive data, search & replace lines that include (parts) of your phone number, IMEI, Google account, etc.
[Motorola Edge 40 Pro  / Moto X40 (China)] jimmie32:
That's fine. Just don't relock unless you're on the stock ROM.
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
It appears that on the latest build, there is no issue with using in-app camera for: Instagram, Facebook or WhatsApp, as has been said before. I'm happy to notice i can use it perfectly fine.

Can anyone else confirm? Here, both the viewport and capturing works.
[Motorola Edge 40 Pro  / Moto X40 (China)] callme-ll:
I am a rookie, who can give a complete tutorial after unlocking to brush into LineageOS, video priority, a lot of rookies.
[Motorola Edge 40 Pro  / Moto X40 (China)] nstream:
Step by step guide to flash Lineage OS or any other custom ROM.

Hello rtwo users, after being asked several times on telegram. Here is the step by step guide to flash Lineage OS or any other custom ROM on rtwo. Follow the guide after making necessary backup. Step--1=Download: Download all the images (5) and...

xdaforums.com
[Motorola Edge 40 Pro  / Moto X40 (China)] clubwagon:
hi. at least on telegram the camara get block and i had to close app and open again
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
How about other apps that had the issue before: Facebook, WhatsApp and Instagram? We need to understand if there's still inconsistent results and if so; how they come to be. The_MarD can't use in-app camera for Facebook, WhatsApp and Instagram, while i can at the moment, which is odd. More specific tests from more people can be useful.
[Motorola Edge 40 Pro  / Moto X40 (China)] BlakieDiaz:
Hello. First of all, I thank you for all the beautiful work. Can you help me? After installing everything, I have no sound. How can it be solved? Thank you.
[Motorola Edge 40 Pro  / Moto X40 (China)] clubwagon:
i only use telegram and signal, and i have the same issue with the camera in app. also i have problems with audiobook and sms stock app no playing voice messages, how about you, can you play voice clips on sms app and audiobooks?
[Motorola Edge 40 Pro  / Moto X40 (China)] Yotoprules:
That's great! Good to know.
[Motorola Edge 40 Pro  / Moto X40 (China)] Drasner:
I have only taken pictures with Element messaging app and it worked fine. Moto X40.
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
@Drasner , afaik X40 (RETCN) device firmware doesn't like these LineageOS builds. Please switch to RETEU or RETUS device firmware and then reflash LOS from scratch
[Motorola Edge 40 Pro  / Moto X40 (China)] b2sql:
Hello everyone. I'm just considering buying edge 40 pro, but I'm a bit worried reading the reviews stating updates are a bit crap on the device. Could anyone actually say if LOS is actually going to be 100% officially available on the phone in near future? I mean, once installed will I be able to update it and use as a daily driver? Thanks for the answers and sorry if it's been already answered 1000 times 😉
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
Already, the unofficial builds here are well maintained by well-known LineageOS team members. You can see the commitment to regular updates, including security patches, and that we keep saying we're close to applying for official status. Even if we were not, this spirit would guarantee reliable and timely updates into the future, a world of difference from the many devs that port LOS to some device and rarely (or never) revisit it.

The builds are already extremely stable, enough so for daily driving. Most people subbed/engaged to this thread and the Telegram group are daily driving it since months, loving the experience.. i can only recommend you do it.

And yes, this device absolutely rocks if you bypass all of Motorola's crappy software (and unreliable update policy) by using LineageOS. Even though Moto makes good hardware, most owners have learned by now that no matter all the promises they make, update policy won't go as they portray it.

Not even to speak of, as with all smartphone brands these days, the amount of crap that LineageOS can eliminate & optimize, to harness the hardware's true potential. Like from my benchmark results seen here. The security & privacy benefits (full transparency on the code your device runs, which is opensource, and not sending data back to China, where 99% of brands manufacture these days, and 90% are Chinese by nature and may be pressured by their government) weighs even more for me and many other advanced users.
[Motorola Edge 40 Pro  / Moto X40 (China)] David5ito:
A few hours ago, I tried to flash the lineage os 20 ROM on my motorola X40 , but when it finished it sent me bootloop, the LOS logo appears, but it restarts and returns to the same thing, I am left in bootloop, try to follow the guide exactly as it says and flash again and I still have this problem, has anyone experienced this and how did you solve it? Or what can help me in this situation?
[Motorola Edge 40 Pro  / Moto X40 (China)] b2sql:
What about the battery life? Some reports suggest it's very good, others say not really - mostly due to higher load. I'm referring here to stock android available on the phone. Does LOS change anything in that aspect?
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
No one has, so it can only be a mistake you're making somewhere during the process. Check again.. also read the part about which firmware to use beforehand (RETUS is recommended)

Stock battery life is good (competition is likely involved in claims it's not), but LOS makes it even better. Snapdragon 8 Gen 2 is known for its power efficiency/performance ratio.
[Motorola Edge 40 Pro  / Moto X40 (China)] b2sql:
How would that stand against report on notebook check:

Motorola Edge 40 Pro review: High-end smartphone with 165 Hz display at a reasonable price

Motorola's flagship series is back, starting with the Edge 40 Pro in 2023. At just under US$1000, the premium smartphone has become a little more expensive, but still offers convincing specs such as a 165 Hz screen, fast charging technology and pure Android. Does this succeed?

www.notebookcheck.net

They saying it's draining fast under higher loads. Could that be the software issue LOS can solve?
[Motorola Edge 40 Pro  / Moto X40 (China)] tengaar:
Flashed my X40 to LineageOS. Everything is working fine at the Moment.

I have one strange Problem though. It already started after I flashed the Global Rom to the X40. Fingerprint works fine but when I want to unlock the phone using my unlock code it always says "wrong pin". But Im 100% sure that I type in the right one.

Luckily when I restart the phone the pin works for first log in. Anyone know this Problem?
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
@tengaar you'll need to flash device firmware from either RETAIL, RETEU or RETUS the most recent release as some of the early device firmware has keystore issues as soon as bootloader is unlocked. I've even observed this bug on stock ROM with bootloader unlocked lol

The latest test build I wasn't able to include the full device firmware, so I'm guessing that the DRM part is indeed kept in the radio/modem partition.
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
So, given the issues with gitlab recently changing free accounts to have a 100 MB filesize limit which will affect us including radio/modem device firmware and also the full MotCamera4 APK? We have decided we might as well switch to LinageOS 21 which we will be able to use git-lfs (large filesystem) to workaround the filesize problem.

It is unsure yet if we will be able to dirty flash upgrade from A13 to A14, so I'll try to find out once we get to that point.

I've already done a full kernel rebase on the latest LOS QCOM sm8550 base and there was some camera changes, and it seems to have fixed the camera issues! MotCamera4 can take pictures during video and apps like WhatsApp and Telegram and Facebook Messenger can also take pictures! (y)

The downside is it'll be a bit before I release a public build... I'm having some serious battery drain issues and my device is getting hot to the touch and logcat shows some services like zygote crashing, so there's some stability issues that will need to be resolved first.

My device also drained empty overnight and is stuck in offline charging mode, even after trying a factory reset, oof! So battery stats must not be working either...

Since we didn't go official with LOS 20? I'll just be repurposing this thread to LOS 21 as it'll essentially be the same builds anyways, just with A14 and I guess no more camera bugs, so there's a major bug squashed which is great!
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
My job isn't to convince non-Motorola users to get one, so please make your own choice. I already mentioned that the competition may be involved, it's widely known that professional reviewers may be heavily opinionated, as much that's a human trait due to cognitive bias/being in a certain camp, and in the world of product reviewers this can be amplified by engagement with sponsors.

All i can say is that i never used a device with better battery life (mixed use, multimedia and gaming included) than this one, and i've owned mostly flagships. But my experience goes only as far as optimizing the device with LineageOS.

So now, please make your own decision. This discussion isn't productive, you don't need to reply again, just decide if this device is for you or not. Not everything is the right choice for everyone.
[Motorola Edge 40 Pro  / Moto X40 (China)] tengaar:
I flashed X40 from newest EU rom with RETEU update channel. The problem was already present after I flashed the X40 to a Edge 40 Pro.

So there is a chance that this bug will be fixed in a later update or maybe with LineageOS21?

Edit: I just saw, that this was already mentioned a few months back in this topic. But did anyone fixed it?

@ mxz55: I think you had this problem with not working unlock codes back in August. Is it still present?
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
@tengaar on LOS 21 builds we will include the proper full device firmware to ensure the keystone (lockscreen) crash bug won't come back
[Motorola Edge 40 Pro  / Moto X40 (China)] tengaar:
Great I can live with it till then :-).

Thank you for your hard work. Hope you will support this great device for a long time.
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
Also, no one else here has been experiencing the keystore crashes (even on the latest LOS 20 build Marc mentioned. I also can't reproduce) .. i think RETUS over RETEU firmware is responsible for that, at some point we recommend everyone to go RETUS for that @tengaar
[Motorola Edge 40 Pro  / Moto X40 (China)] Yotoprules:
My friend is having this same problem. Did you find a fix? He tried flashing RETEU and RETUS but doesn't seem to have solved the problem.

After a reboot, it works fine, but after about 5 minutes or so it stops accepting the pin code.
[Motorola Edge 40 Pro  / Moto X40 (China)] clubwagon:
hi. where i can download the stock rom , just in case for the moto edge plus 2023 the usa version? thanks
[Motorola Edge 40 Pro  / Moto X40 (China)] Djesys:
Hi ! Here in Brazil, only the Edge 40 Neo is available. Any chance there will be support for it ? Thanks
[Motorola Edge 40 Pro  / Moto X40 (China)] Yotoprules:
It's a completely different phone, plus it's mediatek, I wouldn't keep you hopes up.
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
@clubwagon you can download the stock ROM here:

lolinet mirrors - firmware, software, iso etc.

lolinet mirrors - powered by h5ai

mirrors.lolinet.com

This link is for TinyFastbootScript which contains the download link and instructions on how to use it:

lolinet mirrors - firmware, software, iso etc.

lolinet mirrors - powered by h5ai

mirrors.lolinet.com
[Motorola Edge 40 Pro  / Moto X40 (China)] clubwagon:
thank you @ThE_MarD 👌
[Motorola Edge 40 Pro  / Moto X40 (China)] tengaar:
Sadly not with LineageOS. Went back to Stock Rom with RETUS Channel and it seems to work now.
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
@Yotoprules download the latest RETUS build from here:

lolinet mirrors - firmware, software, iso etc.

lolinet mirrors - powered by h5ai

mirrors.lolinet.com

Download TinyFastbootScript from here:

lolinet mirrors - firmware, software, iso etc.

lolinet mirrors - powered by h5ai

mirrors.lolinet.com

Extract both and place the files from TinyFastbootScript into the stock ROM download and run flash.bat

Reboot the phone to bootloader

Select the option 2 to flash "Flash BP ( Baseband Part ) [ radio / modem + fsg ... ]"

Once it is done, exit

Reboot the phone to recovery

Download copy-partitions zip

https://mirrorbits.lineageos.org/tools/copy-partitions-20220613-signed.zip

Flash copy-partitions zip via Lineage Recovery (to ensure both slots have the same device firmware on them)

Reboot to system
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
New LOS 20 build is going up. It'll be ready in 30 minutes. lineage-20.0-20231127-UNOFFICIAL-rtwo contains some more kernel updates and still has QTI Telephony Inject and I also included modem.img as part of the device firmware for anyone having issues with lockscreen crashes.

Unfortunately the kernel changes I did on LOS 21 don't seem to work on fixing camera on LOS 20, so maybe it's something on the system-side that fixed it...

Eventually the plan is to still switch to LOS 21, but for now until I can get a build without crashes and bad battery drain I'll continue LOS 20 updates

LineageOS for rtwo - Browse /lineage-20/lineage-20.0-20231127-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)] vasilkotsov1:
How to update?I try through recovery and Updater app but i get error.
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
@vasilkotsov1 You can adb sideload it in Lineage Recovery and then reboot to recovery and flash GApps then reboot to system

You can use the Lineage Updater if you push it from a PC

Update LineageOS on dubai | LineageOS Wiki

wiki.lineageos.org
[Motorola Edge 40 Pro  / Moto X40 (China)] vasilkotsov1:
@ThE_MarD

I had that issue when sideload the file in recovery.

Error applying update: 7 (Error Code: :kInstalDeviceOpenError)

Error: recovery: Error in /sideload/package.zip (status 1)

Install compleated with status 1.

Installaction aborted.
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
@vasilkotsov1 please redownload it as I'm guessing your download is corrupt. I have this update installed on my phone and it works fine
[Motorola Edge 40 Pro  / Moto X40 (China)] stenmarsh:
Good day.

I'm having trouble switching to lineage OS on my X2301-5.

At first time i can't go to recovery menu, because I made a mistake by following directly the instructions of the official website and not flash recovery.img and init_boot.img files.

After fixing this error and getting into recovery menu i made factory reset and after add sideload. Everything done great and ready for reboot - Get Hard Brick

Ok, thanks for man from 4PDA and after 2 hours of dancing with yellow and green cable (in my cable there are now black ) and getting EDL point i get 9008 and blankflash and Lord helping come back to bootloader.

Next at this forum i find information, that CN devices must be first converted to EU version. Ok - next two ours - done.

And from beginning - flshboot files, add sideload - Hard Brick

Can someone help me achieve my desired goal - Lineage on X40? I would be very grateful.
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
@stenmarsh , I believe you missed the copy-partitions step which is why after the flash and reboot you got the brick. On A/B partitioned devices, you must use copy-partitions to ensure the inactive slot has the same device firmware as the current slot

Install LineageOS on dubai | LineageOS Wiki

wiki.lineageos.org
[Motorola Edge 40 Pro  / Moto X40 (China)] moviefirst:
For the ones who don't know or are afraid of bricking, would be appreciated if somebody could make a video tutorial on how to install LineageOS on the moto edge 40 pro?
[Motorola Edge 40 Pro  / Moto X40 (China)] stenmarsh:
Yes, this is was my fault to miss this step and also that i didn't format device after flash.

I go in step by step by this manual https://xdaforums.com/t/step-by-step-guide-to-flash-lineage-os-or-any-other-custom-rom.4610481 and get it work.

Thank you for your help.
[Motorola Edge 40 Pro  / Moto X40 (China)] clubwagon:
read this and you would not brick device

[CLOSED][PROJECT] LineageOS 20 development for the Edge 40 Pro / Edge+ (2023) / Moto X40

// UPDATE (28-07): public test builds are out, get it at https://sourceforge.net/projects/lineageos-for-rtwo/files/lineage-20/ and please reply with feedback & bug reports // UPDATE (08-05-2023): We are past the alpha stage, now we will move to...

xdaforums.com
[Motorola Edge 40 Pro  / Moto X40 (China)] vasilkotsov1:
@ThE_MarD

I don't receive messages with latest update.

How can I fix that issue?
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
You have a typo in the post id.. to be clear, everyone that has trouble with the given instructions can find the short and simple way described there (https://xdaforums.com/t/project-lin...-pro-edge-2023-moto-x40.4584541/post-88809003) better. I think it's good to replace flashing instructions in OP with that, as so many non-tech people have been getting confused.
[Motorola Edge 40 Pro  / Moto X40 (China)] vasilkotsov1:
Hello guys,I can't receive SMS on latest update.I Try to change the lineage message app with Google messages but still not receive SMS.
[Motorola Edge 40 Pro  / Moto X40 (China)] clubwagon:
hi. yes i just reboot my phone and get some stuck messages looks like not working at all
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
That doesn't make much sense, because QTI injection (to avoid SMS bug) was re-added to the last build just like the second-last one where we got no such reports

@ThE_MarD may want to double check
[Motorola Edge 40 Pro  / Moto X40 (China)] Soketto:
Same here for me, my 2fa SMS didn't come until I rebooted.

Also I can only get H signal unless I force LTE Only in the hidden phone menu (*#*#4636#*#*). There is no signal or APN settings issues but it just wants to default to H/3G for some reason.
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
Hmm, maybe there's a localized issue (North America or some providers?).. i can't reproduce

Maybe those affected should downgrade to the second-last build, as Marc appears to be busy for some days
[Motorola Edge 40 Pro  / Moto X40 (China)] vasilkotsov1:
I found something interesting,the Camera can take pictures in WhatsApp and also I can activate Revolut with selfie camera without any freeze of the Camera,also SMS working. Everything working after root with Magisk with Zygisk,Systemless Hosts module and [MODULE] Play Integrity Fix (SafetyNet fix).
[Motorola Edge 40 Pro  / Moto X40 (China)] Soketto:
Thanks, yeah I'll downgrade if it gets too annoying, right now there's that simple workaround. I'm on NTT DOCOMO in Japan on an x40
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
@Soketto to be clear, you're saying that Magisk root (Zygisk & Systemless hosts) + chiteroman PlayIntegrityFix, is the SMS workaround, like vasil also worked around with?

Weirdly enough, a while ago before @ThE_MarD fixed in-app camera on a new build, some users like myself were ahead in getting it to work, by the same workaround. Maybe these issues are all related (+ SMS), not affecting all users but solvable by those environment tweaks; finding out exactly why is the key to understand what's happening. Maybe we'll get some debugging help from @SGCMarkus on it

In the newest build, the one that generates these issue reports, we merged a bunch of Motorola upstream kernel changes after they did September GPL release (we're still waiting for newer, to repeat the process).. im guessing one of those changes is bad/incompatible, as this is a regression (SMS is supposed to work for everyone, with QTI injection still included)

TL;DR - affected users' options:

Downgrade to lineage-20.0-20231114-UNOFFICIAL-rtwo/

.. or perform the reported workaround (Magisk Root + enable Zygisk in Magisk settings & install "Systemless Hosts" from Magisk Settings, + install Magisk module PlayIntegrityFix)
[Motorola Edge 40 Pro  / Moto X40 (China)] Soketto:
Sorry I meant work around to get 4g

As for SMS I am running Magisk with Zygisk and systemless hosts but I use microg so didn't think I need play integrity, I could still try it and see it it works?
[Motorola Edge 40 Pro  / Moto X40 (China)] ThE_MarD:
New LOS 20 build is going up. It'll be ready in 30 minutes. lineage-20.0-20231207-UNOFFICIAL-rtwo contains the latest merged LOS sources and ASB for December and also QTI Telephony Injection and device firmware to avoid the keystore/lockscreen issues.

LineageOS for rtwo - Browse /lineage-20/lineage-20.0-20231207-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:
I think maybe my last build I accidentally changed the qti-telephony-common.jar with one from rtwo?? That could maybe be why it didn't work, but this one I definitely double-checked and it is the correct one from eqs.

I just realized too that on LOS 20 builds yeah we will need to fix the darn camera bug once and for all for all users before we can go offciial, oof... maybe I'll try something different in my test builds... I could try my lineage-21 kernel on lineage-20 and just manually add back the IPACM stuff that we would need and see if that works for us??? If Magisk and kernel modules fixes camera for you guys, it definitely has to be something in there causing us such grief...
[Motorola Edge 40 Pro  / Moto X40 (China)] mxz55:
For anyone that wonders, yes we did manually add all available ASB patches before they are even merged here: https://review.lineageos.org/q/topic:"T_asb_2023-12" (or by any vendor) - as before, any opportunity that can be done extra to provide users security as soon as possible is taken for when we're still at liberty to make early calls (not official yet).

This month, for this ASB, the Android ecosystem got hit with some particularly severe security holes, like CVE-2023-40088
[Motorola Edge 40 Pro  / Moto X40 (China)] ryansff:
Loaded up the new build and I'm getting texts normally on T-mobile US, so we've got that going for us. Going to run it for a few days and check back in.