System upgrade of S7?

No need to revert back to Stock OS to upgrade it, because there is not more recent available than the one you already have, based on android 8.

You can check there :
select your country ( CSC = carrier dépendant or not…)

Thanks @piero for the quick reply.
Do I install the first or the latest release?: /e/ image ROM download
And can I install the image via twrp and the latest image on an sd-card without using a computer as I did the first time or do I have to do it via the instructions given (using adb)?

I think latest is good
as installing all the builds one after one is not needed.

Yes !
But take a backup, (don’t forget “internal-storage” that is not included in the /data backup using TWRP) …
and first don’t wipe anything, as official instructions don’t require it
https://doc.e.foundation/devices/herolte/upgrade

I’m attempting the same upgrade (herolte 8.1 → q)
Following the upgrade guide all seemed to go well until, after rebooting and decrypting, I was asked to log in (draw pattern).
When the correct pattern is drawn the screen just goes black, and after some seconds the login screen reappears. The loop continues forever, also after new reboots.

adb logcat says (among other things):

9
10-30 22:36:06.808 4663 4950 D LockSettingsService: spBasedDoVerifyCredential: user=0 challengeType=0 hasEnrolledBiometrics=true
10-30 22:36:06.851 3535 3535 I TlcTeeGatekeeper: TEE_Verify:479 mcMap - current_password_handle
10-30 22:36:06.870 4564 4564 D keystore: AddAuthenticationToken: timestamp = 192215, time_received = 200
10-30 22:36:06.879 4564 8512 E keymaster_worker: getAuthToken failed: -5
10-30 22:36:06.886 4663 4950 W System.err: android.security.keystore.KeyPermanentlyInvalidatedException: Key permanently invalidated
10-30 22:36:06.886 4663 4950 W System.err: at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1368)
10-30 22:36:06.887 4663 4950 W System.err: at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1413)
10-30 22:36:06.887 4663 4950 W System.err: at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeySt
oreCryptoOperationUtils.java:54)
10-30 22:36:06.887 4663 4950 W System.err: at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreC
ryptoOperationUtils.java:89)
10-30 22:36:06.887 4663 4950 W System.err: at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(
AndroidKeyStoreCipherSpiBase.java:265)
10-30 22:36:06.887 4663 4950 W System.err: at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpi
Base.java:148)
10-30 22:36:06.887 4663 4950 W System.err: at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2980)
10-30 22:36:06.887 4663 4950 W System.err: at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
10-30 22:36:06.887 4663 4950 W System.err: at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
10-30 22:36:06.888 4663 4950 W System.err: at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
10-30 22:36:06.888 4663 4950 W System.err: at javax.crypto.Cipher.init(Cipher.java:1288)
10-30 22:36:06.888 4663 4950 W System.err: at javax.crypto.Cipher.init(Cipher.java:1223)
10-30 22:36:06.888 4663 4950 W System.err: at com.android.server.locksettings.SyntheticPasswordCrypto.decrypt(SyntheticPasswordCrypto.ja
va:65)
10-30 22:36:06.888 4663 4950 W System.err: at com.android.server.locksettings.SyntheticPasswordCrypto.decryptBlob(SyntheticPasswordCrypt
o.java:144)
10-30 22:36:06.888 4663 4950 W System.err: at com.android.server.locksettings.SyntheticPasswordManager.decryptSPBlob(SyntheticPasswordMa
nager.java:1137)
10-30 22:36:06.888 4663 4950 W System.err: at com.android.server.locksettings.SyntheticPasswordManager.unwrapSyntheticPasswordBlob(Synth
eticPasswordManager.java:998)
10-30 22:36:06.888 4663 4950 W System.err: at com.android.server.locksettings.SyntheticPasswordManager.unwrapPasswordBasedSyntheticPassw
ord(SyntheticPasswordManager.java:927)
10-30 22:36:06.888 4663 4950 W System.err: at com.android.server.locksettings.LockSettingsService.spBasedDoVerifyCredential(LockSettings
Service.java:2664)
10-30 22:36:06.888 4663 4950 W System.err: at com.android.server.locksettings.LockSettingsService.doVerifyCredential(LockSettingsService
.java:1901)
10-30 22:36:06.888 4663 4950 W System.err: at com.android.server.locksettings.LockSettingsService.doVerifyCredential(LockSettingsService
.java:1880)
10-30 22:36:06.888 4663 4950 W System.err: at com.android.server.locksettings.LockSettingsService.checkCredential(LockSettingsService.ja
va:1858)
10-30 22:36:06.889 4663 4950 W System.err: at com.android.internal.widget.ILockSettings$Stub.onTransact(ILockSettings.java:527)
10-30 22:36:06.889 4663 4950 W System.err: at android.os.Binder.execTransactInternal(Binder.java:1021)
10-30 22:36:06.890 4663 4950 W System.err: at android.os.Binder.execTransact(Binder.java:994)
10-30 22:36:06.891 4663 4950 E JavaBinder: *** Uncaught remote exception! (Exceptions are not yet supported across processes.)
10-30 22:36:06.891 4663 4950 E JavaBinder: java.lang.RuntimeException: Failed to decrypt blob
[…]

Everything else seems to be there (I get notifications from my apps on the login screen, see my custom background image etc.).

Is there a known problem with unlocking the screen via pattern after upgrading?

Best & thx

Markus

i think you could be

supposed to remove pattern before upgrading

OR

supposed to decrypt the device before upgrading

becauseTWRP don’t manage encrypted partitions

If not working,
Mabe you can try to install the “recovery-e” using TWRP and then install /e/ using the “recovery-e”

Just to repeat: The decryption of the phone during startup works. I get prompted for the pattern, enter it, then android starts.
It’s the login into the running system that’s failing.
I made a backup of the data partition before upgrading.
Could restoring that help?

After searching the “warnings” just before your “error”, this

com.android.server.locksettings.LockSettingsService.checkCredential(LockSettingsService.java:1858)

led to this https://android.googlesource.com/platform/frameworks/base/+/4f868ed/services/core/java/com/android/server/LockSettingsService.java.
line 475:

There’s no guarantee that this will safely connect, but if it fails we will simply show the lock screen when we shouldn’t …

Are you able to do a Factory reset from TWRP?

I find it strange that the quoted upgrade guide does not include Format data – personally, I would expect an OS Upgrade from Oreo to Q to require Format data.

If Factory reset fails, you might consider Format data from TWRP.

1 Like

Thanks for the pointers!
TWRP seems to have been “automatically” replaced by e-recovery during the upgrade …
I had hoped to avoid that, but I was able to reset/format the data partition from there.
Now, after setting everything up again, the phone works, but obviously the data is gone.

Is there a chance that the backup from the old partition is still compatible with the new system?

You need your PC to reinstall TWRP to use the Backup/Restore feature.

Just did the upgrade and have the exact same problem. :worried:

Do you also have an encrypted partition?
Did you format data before the upgrade?

To start from scratch
You could restore e-0.20-o /system and /data using your TWRP’s backup, then trying to decrypt the device, and finally install the /e/ upgrade

Unfortunately, after the upgrade I am no longer able to reinstall TWRP.
Even when it is booted in download mode (home+vol-down+power or via advanced restart from developer options), the device does no longer show up in “fastboot devices” and thus can no longer be flashed… :frowning:

Also “adb root” is no longer working - the required option to allow root access via adb does no longer exist in the developer options :frowning:

You need to unplug USB cable, boot in download mode, replug USB cable.

You mean “adb devices” ?
ADB usb Debbugging must be enabled in developper options settings or in the recovery-e advanced menu

That is expected if you choose the “stable” build,
Should work using “dev” build.

A Samsung does not respond to fastboot in Download mode. We have to use Heimdall or Odin in order to use Download mode.

When I use heimdall, I get an error. During the 2-3 sec. time between “Uploading RECOVERY” and ERROR a progress bar starts on the device screen. It stops proceeding when ERROR is printed.

heimdall flash --RECOVERY twrp-3.7.0_9-0-herolte.img
Heimdall v1.4.2

[…]

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 RECOVERY
100%
ERROR: Failed to confirm end of file transfer sequence!
ERROR: RECOVERY upload failed!

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

After that, the phone booted neither in recovery nor normally, but only into download mode (where the above error persists).

All other options ended in a screen saying that “An error has occurred while updating the device software. Use the emergency recovery function in the Smart Switch PC software”

Flashing it with an older TWRP (twrp-3.6.2_9-0-herolte.img) allowed the device to boot normally again.

But when booting into recovery, TWRP is unable to decrypt the device …

My advise was decrypting the device in e-0.20-o before booting in TWRP to backup it and install e-1.4-q

or

Use the recovery-e to install e-1.4-q

I did decrypt in twrp and took a backup of /data. Then I installed e-1.4.q. This overwrote recovery with e-recovery. Then encrypted in e-1.4-q. Then I flashed twrp back, but cannot restore the backup because twrp cannot decrypt /data. (But /e/ is able to decrypt it and boots normally.)

So maybe twrp already needs to be there when the encryption is added?

When one searches the forum for encryption solid answers are difficult to find especially for Samsung.

You are writing about TWRP + decrypt.

Do you want the phone encrypted? This is set at OS level. In Android Q, encryption is now the default. If you go to Settings > Security > Encryption and credentials this is where encryption is set / changed.