yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
I've been testing your ROM, and this is an incredible ROM so far.

Thank You @Royna for all your hard work on this.

Couple things I want to bring to your attention:

1. I've been checking power consumption and noticed that I can't get the OS to go into deep sleep with AOD active. If there is any tips/hints you can give me to achieve this it would be appreciated.

2. On the status bar tiles there is a tile for AOD AND Ambient Display but I can't find settings for the Ambient Display and it doesn't seem to do anything, think it might be leftovers of another implementation or maybe I just don't know the function of the Ambient Display on this ROM.

3. The finger print sensor isn't active after the screen dims (when locked). While the screen is lit the finger print reads correctly, but when the phone is asleep(screen dimmed), you have to press the power button to scan finger print. It would be nice if the finger print sensor was active all the time (or maybe a setting for it, would be awesome)

4. The double tap feature doesn't work when the screen is dimmed (when locked) - so you can't double tap to wake the phone to scan finger print when the phone lays on the table. You have to press the power button.

Everything else just works, it's amazing it's one of the cleanest and best functioning 'early release' ROM's I've ever seen.

I'm still testing and will post as I find bugs but just one more time - THANKS DUDE | EPIC JOB
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Royna:
First, thanks for the detailed feedback

1,3 I will work on fixing it

2 I think ambient display is screen liting up for a bit when notifications come and screen is off

4 I will check if I can fix it later
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
Just another update on the power consumption and AOD issue:

I don't see any wake locks keeping the phone awake but, this is honestly the first time I spent this much time diagnosing this.

With AOD active it hovered at 111maH over a period of 6 hours in Doze Powersaver but never went into deep sleep. Without AOD it hovered at 45maH for 4 hours with a Deep Sleep percentage of 97%.

I have to add, while trying to improve the power consumtion I installed BatteryGuru and enabled Quick Doze (will immediately go into doze mode when locked) and 'Power Saver on Screen Off'. These power consumption figures are with BatteryGuru Doze optimizations active.

Then I checked the screen refresh rate on the AOD (developer options), it runs at 60Hz, it would be nice if it went down to 1 or 2Hz during AOD.

I also realized that the AOD doesn't jump, so pixel burn-in is a real concern, long-term.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
I've been trying 3rd party AoD's too, as usual they come no where close to the stock implementation.

I'd rather not have an AoD then to use 3rd party.

Lineages'/your implementation is good and I would love to use it if you can fix the Sleep issue and the clock jump but...

I've been thinking, wouldn't it be easier to just use the samsung aodservice? I tried to find the aodservice apk that the stock OneUI5 uses but it gives an error about the package name already being in use.

I mean the stock aod is really good and it might be the easiest to implement here.

I am a developer but, I don't have tons of experience on android development. However, If there is any way I can help reduce your workload; Let me know!
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Zakaria2328:
The A51 doesn't, unfortunately, have the display technology to be able to go all the way down to 1Hz, unless someone makes a magisk mod for it and tweaks DEEPLY with the display. Honestly I'd just suggest to stop using AOD in general until this is fixed, not the end of the world anyways.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
For me an AOD is really important. I know a lot of ppl don't really care for AoD but I really love the AOD feature up to the point where it's ALMOST a deal breaker for me.

I tried AlwaysOn (open-source) too and it's almost perfect except for 2 problems.

1. Still doesn't go into deep sleep - in fact it's actually worse then the stock implementation cuz it stays on doze-idle and doesn't even go to doze-powersaver. And cuz it's a 3rd party implemetation the animations aren't seemless and the status bar is accessable from it. If it would go into deep-sleep I might be able to overlook that but both of these together is a no-go.

Then I also used my SM-A305F to download a bunch of A13 ROMs to see if any1 else managed to get this implemented correctly to have a code axample. But I didn't manage to find a single one.

Roms included: Pixel Experience, BananaOS, SparkOS, LineageOS, crDroid

Same axact problem on all of them, no deep-sleep.

This is driving me crazy.

Point me in the right direction, and I'll start looking into it. What component is responsible for initiating the deep-sleep? Is it the kernel?

And I'm still thinking integrating the stock Samsung aodservice would be the best all-round solution. How would I go about doing that?

Sorry if I seem like a complete noob on this, it might be cuz I am :ROFLMAO:

:ROFLMAO::ROFLMAO:. Or if you're already looking into it let me help...

If you can check if you can find a fix for it on the lineage side, I'll check if it;s possible to use the aodservice on my side.

Like I said: just point me in the right direction... where do I start?
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Royna:
New build up with AOD deep sleep
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
Can I use Lineage Updater? or do I have to dirty flash the new ROM?
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Royna:
Dirty

Ota will be implemented later I think
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
Ur the bomb dude... downloading now.

Will let you know how it goes.

If if works I think you'll be one of the only ppl to have a fully working AOD on Lineage20.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
Checking the deep-sleep, but...

New problem: There is a place on the touch screen, right over the finger print sensor that locks the device.

This happens everywhere. So its really hard to press the 'zero' on the pin pad, also make sit impossible to use the finger print sensor and this happens everywhere. Home screen settings app etc.

On the plus side it is active when locked so I assume that's the attempt to fix the fingerprint sensor not being active while locked.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
Tested for 15 min with AOD on. No Deep Sleep

5 Min without AOD. 2 min 50 Deep Sleep.

Looks like it's not working.

Will test over night and see if it goes into deep sleep after longer maybe

Edit:

2nd test:

1h 38min screen off:28 sec deep sleep.

First time it went into deep sleep at all, so progress def, but not quite there yet
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Jhenriquelc:
+1, I've had these issues too after upgrading, not only that, I had to wipe data+internal storage to be able to install it otherwise it wouldn't boot, and after it installed, it didn't encrypt the internal storage.

If there's anything I can do to help diagnose any of those issues, I'd love to help! (e.g. reinstalling the new build and getting logs)
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
Oh yeah, the NFC is also broken on the newest build.

And it seems somewhat less smooth. Like the animations stutter and sometimes I have to press the power button 2 or more times to get the screen-on lockscreen to enter the pin.

But the Mobile Service works better. I THINK I got 4G.

I only get 3G on the older build and I haven't had a chance to test if the connection works cuz I don't have data on that SIM :ROFLMAO:.

It shows no signal on the status bar (newer build) but I can call fine.

The older build shows strong signal in the status bar but only 3G.

The LTE isn't a complete train smash but, is there any way we can get 4G?

I reverted to the older build for now cuz the lock button thingy is really irritating.

I tested the deep-sleep for another 3 sessions before reverting:

1. 14 hours screen-off - no deep-sleep

2. 2 hours screen-off - no deep-sleep

3. 3 hours screen-off - no deep-sleep
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Royna:
Will rebuild for screen auto off and nfc
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
@Royna

I can't wipe system, vendor, or product from TWRP anymore.

The partition dissappeared sometime between the older build flash and your newer build.

I'm using your TWRP

If I select an image to flash I can select those partitions but I can't select those partition when I'm in the "Wipe" section of TWRP. It's not a BIG deal but it means I can't clean flash a new ROM.

Any ideas why this is happening?
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
I really wanna help with the AOD and the deep sleep thing. What is causing it? What are you changing to fix this.

Tell me where to look please
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Royna:
Take logcat/kmsg while phone is idle

Not with pc since it will make phone not to sleep, cuz usb
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Gruia Chiscop:
Hello! I flashed the rom. Everything work well, with some issues though.

1. When I set up my phone, I decided not to set up the fingerprint, but, after the setup, when I touch the area where my fingerprint is located, my phone gets locked and if I touch it again, it unlocks. How can I fix this issue? I tried to set my fingerprint, but the same thing, when I touch the screen to set the fingerprint, my phone gets locked.

2. Because I'm using a screen reader, I need multifinger gestures. But, when I make various gestures on the screen with more than two fingers, lineageOS does nothing, it doesn't recognize them.

3. I think the sound quality when I play something using the internal speakers is a bit reduced. In one UI the speakers have more bass than in this rom.

I hope I was clear when I explained theese issues, but the most important is 1. I need a work around, because in any screen I am, in any action I do, when I touch the area where my fingerprint is, it locks.

Thanks for understanding, and good job, royna for developing this rom!
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
Hi Grula,

1. This problem is only on the newest build. It's an attempt to fix some issues. Workaround: just install 1 version earlier: 20230405.

2. I haven't noticed that issue, can't help you on that one.

3. Try configuring AudioFX. It's an app you can find in the launcher. There you can configure the sound in detail.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Royna:
Yes for now 1. Has a fix but will do a rebuild, will take down latest zip for now
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Gruia Chiscop:
OK! Thanks for the work around.As for the problem with the gestures, first I should install the previous version, to see if the problem was not caused by the fingerprint.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Gruia Chiscop:
Also, i can't use mobile data on this Rom.

Only Whatsapp seems to work and an other app. But the others don"t work.

YouTube, Chrome or any other browser, Gmail and so on.

Is there a setting should enable?

Or it"s an other bug?
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
I figured out that this ROM's LTE works fine, it was the sim I was using that only gave me 3G. New SIM - Everything works perfectly.

And I'm using whatsapp, firefox, Youtube, gmail ... all that and I don't have any issues.

You can try going to Settings -> Apps -> Mobile Data & WiFi and see if the apps have permission to use network but, it's on by default so dunno why yours would be off. I assume you don't use a firewall like AFWall+.

Oh also, the fact that some apps work and some don't almost makes me think you have a DNS problem. So try:

Settings -> Network & Internet -> Private DNS and change it to off (just to test - automatic is preferred).

Then also check your APN: Settings -> Network & Internet -> SIMs -> Access Point Names

PS: I'm using the 20230405 release
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Royna:
New build up
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Lipsum26:
What is the difference between these two versions?
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Royna:
Updated op
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Lipsum26:
is this a bug?
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
Yo Royna,

I want to test your new ROM but the thought of going back to the old build and reinstalling EVERYTHING again just makes me cringe. I've reinstalled so many ROM so many times I could almost do it in my sleep.

Normally I would just make a TWRP backup of this ROM and restore it if anything goes wrong or I just want to go back. But, with this ROM encryption is on, and don't get me wrong I really appreciate the encryption, it's a def must have for me. But, unfortunately it also means I can't make a backup of the data partition.

Do you have any idea how I would make a backup of that image inside the ROM so I can restore it with TWRP?

I can do a 'dd' using an ADB shell but the partition would be 116GB and I don't think thats gonna go over very well with TWRP.

Any ideas to create a TWRP backup?
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] MagicJungle7053:
Could I get 3g support cus that isntt volte?
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Gruia Chiscop:
Also, can I flash the new build without erasing my all data and then flash Magisk to get root access?
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Jhenriquelc:
The ROM comes with Seedvault, it can backup and restore app data. Maybe this can work for you
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] KingLorax:
I have an issue where when I go to storage within settings, the settings app crashes.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Jhenriquelc:
Have you dirty flashed the new update or is it a clean flash?

I've heard dirty flashes need to use the EFE (enable forced encryption) version to work properly.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] lisoadsiuh:
Hey how do I restore my backup from the google one thing cuz only thing i can do is switch provider and google account
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] kevios12:
{Mod edit: Quoted post has been deleted as the post's author removed its content. Oswald Boelcke, Senior Moderator}

Give the dev a bit time to fix it and it is not needed sending the "fix" here. The dev has enough know how to fix it, i am sure. Oh well, wait, why u doesn't make ur own DT, u know how to fix. 👍🙃
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] DaReDeViL:
@TestUserG @Royna

The thread has been cleaned from all the useless off-topic drama. You are invited to restart the discussion on a more respectful basis or move it to PM.

Thank you for your collaboration.

DaReDeViL.

XDA moderation team.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] eminafsin:
thanks for rom.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Laiercito:
I recently installed this ROM, but it's impossible to get Netflix working. Every time I try to watch a show, the screen stays black and keeps loading without doing anything. Sometimes the audio loads and can be heard, but there's no video. Any solutions?
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Shezed:
So the Back camera is not working, but the front one is??
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] zSyntex:
Not the Camera itself, just the 48MP mode and HAL3 (the API access introduced on AOSP)
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] Shezed:
So the quality is inferior? I still don't get the phrasing, i'm sorry

if so how many MP can you get?
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] zSyntex:
You're right, the ROM cannot access to the full sensor and the Camera's API which could improve the quality of elaboration.

Not the dev's fault, as stated before
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] murg:
On the github page I don't see a release to download. Do I need to compile from source?
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] murg:
Never mind, I solved my own problem. The mobile version of the site does not have the large download button that the desktop version does. Instead, under the [Releases] heading, it says "No releases published".

Are you planning to make an official release?
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] murg:
I tried installing the latest version (20230722). I got the following error:

ERROR: this package requires OneUI 5 based firmware.
Please upgrade firmware and retry!
Updater process ended with ERROR: 1
Error installing ZIP file '/usb-otg/Whole-OS ROMs/2023-07-22 - LineageOS 20.0 (Android 13) for Samsung Galaxy A51 4G - lineage-20.0-20230722-UNOFFICIAL-m31s_EFE.zip'

What do I do about this? I haven't gotten any OTA updates from Samsung since I rooted my phone a few years ago since newer OTA updates change the bootloader so I can't get root with Magisk.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
***WARNING*** JUST A HEADS UP

Samsung updates it's bootloader version when you update to the new OneUI5. After you upgrade you can never go back to Android 10 or to be more specific you can never go back to the previous bootloader version. Might not bother you...

Just giving you the heads up.

***EDIT*** I see now you know about the bootloader thing. But maybe this message will stand out for the next person

This bothered me because I wanted to go back to Android 10 due to Android11+ on OneUI (Guess it's OneUI5's fault) not being able to mock location. There is a bug where the OneUI toast stops a system service and the mock location with Fake GPS stops and it's essentially unusable. Haven't been able to find a fix for it or a workaround.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] myfanwy:
Hi, I've recently got an A51 and would like to install Lineage on it. This build looks very comprehensive, the work by Royna is much appreciated. However, I have a few questions.

1. On the sourceforge downloads page, there are range of builds, with different codes in their title: A51, F41, M21 and M31. What does that refer to? I assume A51 refers to the device they are targeted at, but I'm not sure about the others. They all appear to be Samsung phone models, if so, I'm not sure why they are in the A51 section.

2. Is the TWRP build linked in this thread necessary to use this Lineage build, or merely recommend?

3. There are multiple, conflicting guides for installing a custom recovery, linked in the thread about TWRP. Which is correct/best to follow? Some mention vbmeta and multidisabler, some don't. I'm not entirely sure what multidisabler and vbmeta are.

4. What is the likelihood @Royna will continue development of the build? I gather there was some disrespectful, off-topic debate last year. I hope that hasn't discouraged Royna from taking part, it would be a shame if a few ill-judged comments put them off.

Many thanks for any help.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
I can't talk on Roynas' behalf but here is my take.

The twrp is recommended. The install zip has a script that is targeted to a twrp build. That said, it's more broad then it sounds. So any twrp in the same major build (thats the first number eg. 3.7.0.0 - the 3) should work.

vbmeta is short for verified boot meta - it has to do with the verification of the protected partitions.

So vbmeta is to allow the bootloader to load (simplified) and the multidisabler is to disable the encryption of the data partition. Me personally hate disabling the encryption because it reduces the security of the device - same as with a custom recovery - but with the encryption enabled not even the twrp can read the data partition - so no twrp backup.

Just flash trwp and vbmeta together with odin and that's it. multidisabler is flashed through twrp (but not mandatory).

The last I heard Royna was still releasing quality improvements but don't count on it. Community builds can go EOL in a matter of days. Just be thankful for any additional releases.

This lineage build is great - but it has the same issue for me as EVERY SINGLE OTHER BUILD for the A51 (except samsung ports). The AOD prevents the phone from going into deep sleep.

Note: @Royna if that has changed in the last couple months please advise - I would love to test it again.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] myfanwy:
Hey, thanks for the prompt reply, I appreciate the advice!

OK, so in the instructions it says to flash TWRP recovery from *existing* recovery. I assume flashing via Odin (v3?) will achieve the same thing. Which partition do I flash them to, both to BL or AP? This is why I get a bit lost. Every method says something different, none reference each other. The instructions here: https://xdaforums.com/t/recovery-official-twrp-3-7-0-for-galaxy-a51-4g.4558645/ don't mention flashing vbmeta at all.

I'm using heimdall on Linux, so I assume I can flash with that instead, or Odin4 built for Linux?

I'm asking all these questions, because I'm concerned I'll flash something using the wrong method, or to the wrong partition, and brick my device.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] myfanwy:
Rather than just waiting for a complete response, expecting you or @Royna to provide me answers, I wrote up a (possibly) complete list of steps. It pulls together various pieces of info from multiple posts here and in the recovery thread, plus prior knowledge from other Lineage/Replicant installs I've done. Please comment or adjust as you see fit.

* Upgrade to Android 13, using the controls in Settings.

* Enable developer settings

* Enable USB debugging

* Enable OEM unlocking

* Download lineage-20.0-20230722-UNOFFICIAL-a51.zip and vbmeta.img from sorceforge

* Download recovery from twrp.me

* Copy lineage-20.0-20230722-UNOFFICIAL-a51.zip, vbmeta.img and recovery.img to the phone

* Reboot to download mode, unlock the boot loader

* Reboot to Recovery

* Flash recovery.img

* Flash vbmeta.img

* Reboot directly to (new) recovery

* Wipe phone. Data, cache

* Flash lineage-20.0-20230722-UNOFFICIAL-a51.zip

* Reboot. It may take 5 minutes to process
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
I see no missing steps. Go for it

EDIT: Maybe just throw in a factory reset after the lineage flash.
[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] gh0stza:
@myfanwy

After you get it working can you check for me if AoD lets the phone go into deep sleep mode please. I need a ROM for my A51 atm

You can do it by using a battery app like Accubattery or BatteryGuru or you can use one of XDA users apps like BatteryBatteryStats.