Samsung - Galaxy S9 - starlte - Documentation Suggestions

This XDA official TWRP thread give the correct information to get installation on this device

Hey Piero,

Sorry for my late answer… I used to be sick for the past week so I just avoid doing technical stuff on my free time.

So what I did :

  1. I installed a stock Android 10, the latest available ROM on SAMFREW. I did it through a VM on Windows with Odin rather than with Heimdall on my Linux OS, because it looked far easier this way after reading a few posts on the XDA forum. I followed this tutorial, very easy.

  2. After booting on the stock ROM, Android Q with all the SAMSUNG apps, I checked for updates, and well, it was already up to date. I activated the dev settings, then did the OEM unlock and allowed the USB flashing.

  3. I installed twrp-3.5.0, cause I remembered having troubles with the 3.6.0

  4. I boot on TWRP and did the Resize userdata part of the official turotial

  5. I patched the device but… I got an ERROR 1 again (see my screen above)

  6. I still want to try the /e/ OS installation, so I do the adb sideload e-0.19-q-20211027142973-dev-starlte.zip and it works

  7. I boot on /e/ OS for the first time on my Galaxy S9, it looks fully fonctionnal.

I’m just wondering if it’s OK this way, because it seems to work, but maybe something could go wrong in a few time ?

I am surprise to see that the system takes 8,4 Go on my phone memory… It seems very huge to me, even more since the /e/ .zip file is only 852,8 Mo while the stock ROM I installed before is near 5 Go.

I’m afraid there is still files and data I don’t need on my phone. Do you know which size /e/ OS Q is supposed to take on the S9 memory ?

Sorry for my beginner questions, but I would like to get a clearest mind on it.

1 Like

in some recent experiences using ODIN with recent samsung, it is recomanded to put VBmeta or disable_encryption or no-verity-opt-encrypt-samsung as “BL” and put twrp as "AP"
and flash them toguether,

untill you brick your phone, i am not 100% sure of that as i don’t have this devices in hands
check the forum search bar for validation about that ! and the web ! ( cannot remember clearly, but i think it is not CP ! )

hello, my Samsung S9 is running lineage-17.1-20210125-nightly-starlte (Android 10) & twrp 3.5.2_9-0.

TWRP cannot mount the data partition so I think that /data is encrypted:

starlte:/vendor/etc $ grep ' /data'  /proc/self/mounts                                                                                                                                                                                                 
/dev/block/dm-0 /data ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,noauto_da_alloc,resgid=1065,errors=panic,data=ordered 0 0

I’d like to install /e/ OS Q (Android 10). Do I need to patch the device with no-verity-opt-encrypt? Some people mention no-verity-opt-encrypt-6.1.zip. Which is the correct version? Could you add a SHA256 of the patch file to the installation documentation so that we do not patch our device with a virus?

Can I directly install the latest Q dev image in /e/ image ROM download? I am worried about the message: ensure that the device is on the latest Android Stock firmware same as the version of the /e/OS you are planning to install.

@legrec14 were you able to install /e/ without running no-verity-opt-encrypt or did no-verity-opt-encrypt work and disable encryption before failing?

Hello @piero, thank you for your links, I rode many posts on the XDA forum and found interesting things that helped to solve my case.

Hello @stuart, yes I’ve been able to install /e/ OS (S) without running no-verity-opt-encrypt not any other similar package. But in this way, I’m not sure if everything would be OK in the long-term.

I rode this other testimony that goes the same way as mine : it seems that @mospaeda has also been able to install /e/ OS on his S9 without “patching” the device with code to remove the encryption.

But just as him, I installed the stock ROM up to date on my cellphone, through Odin, before to install TWRP and then /e/ OS. Once again, I share this process, well describe. You just need a machine running on Windows for it. (I haven’t tried to install the stock ROM through Heimdall on Linux, but it seems far more difficult due to the fact you have to manually list all the repertories needed for the system, and to do it all in one command, and in the right order because if you don’t respect the expected pattern it will fail. Plus some people experienced a limitation transfer of 4Go with Heimdall.)

So, I really recommend you to update your cellphone with the latest firmware, via the installation of the stock ROM through Odin.

Then, during the first boot on the stock ROM, you have to parameter many things, but you don’t mind all of this because it’s just a transition step for us, who hope to be /e/ OS users :slight_smile: .
So I recommend to skip every steps you can skip, especially those related to the encryption (when the system asks you to “protect your phone” with facial recognition, iris, fingerprints, etc…).

I haven’t do many tests so I cannot be certain of it, but I wonder that maybe it plays a role in the encryption you encounter then via TWRP. So just install the stock ROM without connecting your google account, without parameter the “phone protection” etc. Just have a look for updates and activate the developer parameters to activate OEM Enlock and USB flashing etc… At this point, you can follow the official process.

Indeed, when you come from the stock ROM, the official process works fine for me.

The only thing that used to block me was this incapacity to install the “patch” no-verity-opt-encrypt.

Even if I did install /e/ OS without this patch, I was anxious that something could be wrong, so I decided to install again the stock ROM, and try it all again.

I did it, and the only thing I changed is that I installed TWRP 4.0 instead of the 5.0 or even the 6.0. The file I chose to install it through Heimdall is twrp-3.4.0-0-starlte.img dowloaded from the official TWRP site.

I rode on XDA forum that anterior versions (3.0 and below) does not support Android 10 (Q).
TWRP 4.0 has been designed for Android 10 (Q). The upper versions can be more buggy for the functionality we are looking, don’t ask me why as I’m not at all an expert. I just rode it from others, and experienced if myself so I can confirm I didn’t worked for me with TWRP 5.0 and 6.0, but it did work with TWRP 4.0 : I’ve been able to successfully install the no-verity-opt-encrypt-6.1.zip (you can get it from here, as @piero shared it in a previous post) :slight_smile: !

Then continue to follow the steps described in the official process, things you have to do with the data, cache, etc. And finally install /e/ OS (Q), and it should work as it did for me :wink: .

I hope my experience helped you, please let us know if it works for you as well.

PS = to share it in detail, the /e/ OS Q (0.19) took approximately 3min15sec to be installed on my phone after I launched the command through Heimdall.

And if other people was wondering, the memory place dedicated to /e/ OS Q (0.19) is effectively 8,4Go on my phone. I checked the stock ROM while I reinstalled it, and the memory space dedicated to the system took 11,5Go. That difference is not surprising due to all the proprietary apps on it (Google apps + Samsung apps) on the stock ROM.

1 Like

I ran into the same problem but fortunately managed to install /e/ without the patch. I was wondering though: could I install the patch after installation of /e/ or would that mess things up?

Hello everyone!

I just installed /e/ on my Samsung Galaxy S9 (SM-G960F) successfully. I used /e/'s guide, but some steps were not straightforward or didn’t work, so I’d like to document my experience.

  1. Rebooting after flashing TWRP: I was supposed to reboot to recovery (twrp), but my only option was to reboot to system - no other reboot options, or power off, is possible at that point. However when that reboot to system happened, and I rebooted again to recovery, twrp was lost. So I flashed TWRP again, rebooted to system, but as soon as the screen turned off for reboot, immediately switched from Vol Down + Power (key combo to reboot to system) to Vol Up + Bixby + Power (key combo to boot to recovery). This worked, TWRP loaded, and the sun was shining again.

  2. “Patch the device” section The no-verity thing was not going to happen, at all. Flashing any version failed with a red ERROR 1 line. I tried the linked no-verity thing samsung edition 1.0, the standard no-verity 6.1, 5.1, 4.1, all failed with the dreaded ERROR 1. I searched for solutions but nothing seemed to work. Then I stumbled upon this XDA thread, flashed it, and the console said success. Then I proceeded with the original install instructions.

  3. “Patch the device” section: instruction #2 makes no sense by itself (“Install the patch”). I guess #3 and #4 is what actually constitutes “Installing the patch”.

  4. Installing /e/: We format “data” the second time here, I wonder why. First the instructions say in “Resize userdata” to format data, then tinker something with it, then before installation we format it again? I wonder if that reverted that tinkering phase after the first format, the “Resize File system” step. Also I wonder what we resize to, and from, in this phase?

All in all, the installation succeeded, and I’m now a happy /e/ user. Cuz my data is MY data :slight_smile:

Versions:
Phone: Samsung Galaxy S9 SM-G960F (originally sold, I think, in Belgium, with the Proximus provider)
Previus Android: 10
Heimdall: v1.4.2
ADB: Android Debug Bridge version 1.0.39, Version 1:8.1.0+r23-5ubuntu2

/e/: e-0.21-q-20220124158536-dev-starlte (Android 10)
TWRP: twrp-3.6.0_9-1-starlte
The patch thingie: Disable_Dm-Verity_ForceEncrypt_11.02.2020

1 Like

Rebooting after flashing TWRP: I was supposed to reboot to recovery (twrp), but my only option was to reboot to system - no other reboot options, or power off, is possible at that point. However when that reboot to system happened, and I rebooted again to recovery, twrp was lost. So I flashed TWRP again, rebooted to system, but as soon as the screen turned off for reboot, immediately switched from Vol Down + Power (key combo to reboot to system) to Vol Up + Bixby + Power (key combo to boot to recovery). This worked, TWRP loaded, and the sun was shining again.

After installing s.th, TWRP presents yo a “reboot” button, but you can just ignore it and continue/go back to main menu. There you have access to all reboot options regularly. Maybe that was the point where you have been.

“Patch the device” section The no-verity thing was not going to happen, at all. Flashing any version failed with a red ERROR 1 line. I tried the linked no-verity thing samsung edition 1.0, the standard no-verity 6.1, 5.1, 4.1, all failed with the dreaded ERROR 1. I searched for solutions but nothing seemed to work. Then I stumbled upon this XDA thread , flashed it, and the console said success. Then I proceeded with the original install instructions.

I had also issues with this patch, but continued with the /e/ installation, and it is now running without problems. As far as I understand, the patch disables the forced encryption of user data at first boot, and doesn’t remove the ability to encrypt, correct?
Does this influence the ability of TWRP to decrypt user data? I have the experience, that TWRP isn’t able to mount the encrypted user data, when user data is not forcefully encrypted, but manually, is TWRP able to mount it then?

Like @legrec14 and @helicase and many others, for me installation of the patch no-verity-opt-encrypt-6.1.zip failed with error 1, but i proceeded to sideload /e/OS and it worked.
However at first boot I got the message “Wait while your phone is being encrypted”. I don’t know whether this is related and will come back to bite me later.
I installed TWRP 3.6.1 and e-0.22-q-20220226166118-dev-starlte.zip.

The main problem I see is that the installation guide doesn’t explain the purpose of any of the steps (not just this one) and users are supposed to just mimic along like monkeys without understanding anything. In my opinion, this only gives us enough rope to hang ourselves. It’s like handing over a loaded gun to untrained people.

Spreading /e/OS and privacy to the masses won’t succeed without some education. The /e/ Foundation should offer some basic, non-device-specific course on smartphone technology to explain the basic concepts and the essential terminology and should advice people to take it before trying installation.

1 Like

One more suggestion for improvement: instruct users to back up the stock Samsung ROM first of all things as soon as they have TWRP up and running before even attempting to install /e/OS. This way they have a safe fallback.

Shouldn’t the documentation link to where to find a Samsung Galaxy S9 official Android 10 system image ? I need one which, if I understand well, now serves as a “vendors file” and prerequisite to installing Q /e/ - but I fail to find the Samsung official source…

/e/ documentation provides this information

Samsung stock ROM
We downloaded the ROM from the sammobile site

on this page Revert Samsung Device to stock ROM on Windows PC.

There are three other sources here

What is a stock ROM and how do I get one?

Thanks to both of you. I had not realized that it is normal in Androidland to get manufacturer binaries from third parties… To me Sammobile didn’t look legit. Oh well, I did get a “vendor file” from some file hosting service so I suppose it isn’t worse. This whole universe is a baroque throwback to the world of Windows shareware download sites circa 2000.

Now, I had supposed that installing the Samsung OS image was a job for TWRP but it actually uses heimdall and Download Mode. Does that mean that I have no choice but to step through manual PIT mapping ?

The “Revert Samsung” link above uses Windows and Odin3. If you use Heimdall/Linux be sure to study carefully the GUI or heimdall-frontend method; not very well documented.

Mostly Linux and BSD around here, except the Mandatory Corporate Windows Laptop which is out of bounds for our purposes. I suppose I’ll guinea pig an heimdall method then.

I mostly followed that method, with help from the following command to match partition names to the available files:

# ls -1 | sort | while read i; do grep -B 1 $i S9.pit; done
Partition Name: BOOT
Flash Filename: boot.img
Partition Name: CACHE
Flash Filename: cache.img
Partition Name: CM
Flash Filename: cm.bin
Partition Name: DQMDBG
Flash Filename: dqmdbg.img
Partition Name: HIDDEN
Flash Filename: hidden.img
Partition Name: KEYSTORAGE
Flash Filename: keystorage.bin
Partition Name: RADIO
Flash Filename: modem.bin
Partition Name: CP_DEBUG
Flash Filename: modem_debug.bin
Partition Name: ODM
Flash Filename: odm.img
Partition Name: OMR
Flash Filename: omr.img
Partition Name: PARAM
Flash Filename: param.bin
--
Partition Name: UP_PARAM
Flash Filename: up_param.bin
Partition Name: RECOVERY
Flash Filename: recovery.img
Partition Name: BOOTLOADER
Flash Filename: sboot.bin
Partition Name: SYSTEM
Flash Filename: system.img
Partition Name: UP_PARAM
Flash Filename: up_param.bin
Partition Name: USERDATA
Flash Filename: userdata.img
Partition Name: VENDOR
Flash Filename: vendor.img

And from that we get the meat of the heimdall command:

# ls -1 | sort | while read i; do grep -B 1 $i S9.pit; done | sed s/Partition\ Name:\ /--/g | sed s/Flash\ Filename:\ // | tr '\n' ' '
--BOOT boot.img --CACHE cache.img --CM cm.bin --DQMDBG dqmdbg.img --HIDDEN hidden.img --KEYSTORAGE keystorage.bin --RADIO modem.bin --CP_DEBUG modem_debug.bin --ODM odm.img --OMR omr.img --PARAM param.bin -- --UP_PARAM up_param.bin --RECOVERY recovery.img --BOOTLOADER sboot.bin --SYSTEM system.img --UP_PARAM up_param.bin --USERDATA userdata.img --VENDOR vendor.img

Room for improvement: “–UP_PARAM up_param.bin” appears twice, and a stray “–”

Good thing I built my own command: it contains two partitions and relevant files absent from the aforementioned method.

Soooo…

# heimdall flash --BOOT boot.img --CACHE cache.img --CM cm.bin --DQMDBG dqmdbg.img --HIDDEN hidden.img --KEYSTORAGE keystorage.bin --RADIO modem.bin --CP_DEBUG modem_debug.bin --ODM odm.img --OMR omr.img --PARAM param.bin --RECOVERY recovery.img --BOOTLOADER sboot.bin --SYSTEM system.img --UP_PARAM up_param.bin --USERDATA userdata.img --VENDOR vendor.img
Heimdall v1.4.2

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...

Initialising protocol...
Protocol initialisation successful.

Beginning session...

Some devices may take up to 2 minutes to respond.
Please be patient!

Session begun.

Downloading device's PIT file...
PIT file download successful.

Uploading BOOT
100%
BOOT upload successful

Uploading CACHE
100%
CACHE upload successful

Uploading CM
100%
CM upload successful

Uploading DQMDBG
100%
DQMDBG upload successful

Uploading HIDDEN
100%
HIDDEN upload successful

Uploading KEYSTORAGE
100%
KEYSTORAGE upload successful

Uploading RADIO
72%
ERROR: Failed to send file part packet!
ERROR: RADIO upload failed!

Ending session...
ERROR: Failed to send end session packet!
Releasing device interface...

Result: failure.

Relevant bit:

Uploading RADIO
72%
ERROR: Failed to send file part packet!
ERROR: RADIO upload failed!

And I reproduce that behaviour at each attempt.

Well, progress - but we’re not there yet: I find absolutely no sense in the upload failing at that specific point each time. I found another person with the same symptom, but he never found the cause.

@aibd suggested that the error could be a regional variant mismatch and he was right: download mode screen in Korean should have been a hint - mine is a SM-G965N from South Korea. Regional hardware variants… Damn. I suppose I’m a poster child for Android cluelessness and that my experience is therefore relevant for documentation improvement !

Anyway…

unzip G965NKSU5FVA2_G965NOKR5FVA2_SKC.zip && for f in *.tar.md5; do tar xf $f; done && lz4 -dm *.lz4
heimdall print-pit --no-reboot > S9.pit
heimdall flash `ls -1 | sort | while read i; do grep -B 1 $i S9.pit; done | sed s/Partition\ Name:\ /--/g | sed s/Flash\ Filename:\ // | tr '\n' ' ' | sed s/--\ //`
# Actually the command produces a duplicate "--UP_PARAM up_param.bin" I pruned by hand - exercise for the reader

The good news is that heimdall flash reported all successful. Reboot, an Android appears with a progress bar and…

The bad news is that the device is now in a boot loop - wiping cache partition from recovery didn’t help, nor did “wipe data/factory reset”, but at least I get the stock recovery rather than TWRP. On to clear the next hurdle on my path to get stock Samsung Android 10 so that I can install the latest /e/ to check if it solves my “SIM not detected SM-G960F after OTA Upgrade” problem…

Tried all the Korean G965N flavors too
G965NKSU5FVA2_G965NOKR5FVA2_SKC.zip
G965NKSU5FVA2_G965NOKR5FVA2_KOO.zip
G965NKSU5FVA2_G965NOKR5FVA2_LUC.zip
G965NKSU5FVA2_G965NOKR5FVA2_KTC.zip

I am sorry, @lottier, but perhaps we could return to your originl thread (or a new one) and add a contrbution to Document Suggestions when we have found a solution. :slight_smile:

My guess you have a Korean device | Korea firmware, where you require a Korean device | your Region firmware. CSC Codes for Korea: SKT, LUC, SKC, KTC

… and /or … star2lte - SM-G965N | starlte - SM-G960N

Yes, I now have a generic problem unrelated to documentation or to my original problem - I’ll stop updating here and find more a relevant location. Thanks !

2 Likes