Is there is no going back!? (Reflash to stock ROM fails with bootloop, S9+, Q)

As written elsewhere, I’ve upgraded my S9+ from Oreo to Q (8 to 10), and then installed /e/.
However, I have some audio problems so I wanted to go back to stock ROM and check if they
are there too.
I have tried several times to revert to stock ROM, but the phone always enters a boot loop (Vibrates and Shows “Samsung S9+ secured by knox” about every 9 seconds). Have wiped cache, data etc.

I can boot into TWRP and install /e/ with no trouble.

I also tried installing Android 8 stock rom, but phone download refuses to accept it due to some version difference.

Any help or suggestions appreciated.

Your bootloop sounds like failure of Verified Boot. All the science here is about how to regain control of the device. I think, if you want to have Samsung double check that you have a verified Samsung Andriod system, you must flash a 100% Samsung image.

I asked and got an answer over on XDA forum

Details:

@hainguyenthao : “To be able to flash stock without server that’s means you need official repair and device must be knox 0”
So i guess no need to flash stock and u can stay on custom better"
Me: “Oh. So basically it is impossible to go back to stock after flashing a custom ROM (Using ordinary tools odin/heimdall)?”
@hainguyenthao : “Yes”

Hi @ewblen. Here is a bit more technical reading for you.

You are talking here about Rollback protection or as I prefer to call it anti-rollback and it is all part of Verified Boot and Android Verified Boot.

These official articles make it all sound quite benign, but Android provide the framework, manufactures exploit it to build in obsolescence.

A fun thing to note is that the rules change between Android 8, 9, 10, and an even more sealed system is promised for 11!

Edit. Re-reading you OP, I am talking theory, is there a practical issue still to fix?

I still have very low volume on top speaker, both for phone calls and music.

I am just trying to retrace your steps - you thought you might check if the phone had a hardware issue by seeing if sound was fine on Stock ROM.

I think that to complete that bit of research through “forced” Samsung channel, you would be forced to boot into latest Android Stock ROM.

If you thought “can I just see what the sound would be like on verified_by_Samsung, Oreo?”, the answer is

No - we can only serve you latest due to Rollback protection

Here you mention that you can get heimdall to cooperate in producing a solution where you avoid verified boot.

That is great.

I think to meet the requirement to install a “Stock ROM”, the ROM (probably) must be complete and full, in order to meet the “Verified boot”?

@aibd you mostly summarise correctly
However, even after fully flashing latest Android Q stock ROM, the phone enters a bootloop (so not rollback prevention). I guess that this is the stock system not accepting the state of the bootloader and Knox. I.e. Verified Boot.
I can live with the current status, but will be a pain if I want to resell this phone on the general market, where stock firmware is expected. The XDA user mentioned above offered to do this for me, in exchange for a “donation”.

Is there no going back?

Unless something is broken, locked or scrambled in some way Odin (and hence Heimdall) should be able overwrite whatever OS is on the phone to latest “Samsung stock ROM”.

We know it is possible, as /e/ documentation tells us to flash a new Android 10 Stock ROM before installing /e/ q, lots of people must have done it.

Perhaps I said it rather obliquely, but when you say you flashed the Android 10 Stock ROM, are you sure it was the exact correct download for your phone and region, and was it was with the whole Stock ROM, with no added TWRP?

That is one of the points about “Verified boot”, the Odin/Heimdall process organises the phone should be 100% Samsung/Andriod before allowing the phone to boot as “verified” Samsung/Andriod with their names on the screen! “Something” on the phone must fail to be an exact match with Samsung/Andriod “expectations”.

(One thing that does crop up is where the phone was sold new, in one region, used now in a different region. In this case there would be some negative message on the Download mode (Odin) screen, or in the prompt when Android recovery starts).