After upgrade to 9.0.4 => Error message "corrupt data" and no way from there

ako673de

Senior Member
Nov 15, 2015
55
6
28
After upgrade to 9.0.4 => Error message "corrupt data" and no way from there

After upgrade to 9.0.4 (from 8.1, rooted with magisk) I was getting an error message "password is correct but data is corrupt... factory reset needed".

Factory reset? No way! I have a backup of the state just before upgrade to 9.0.4 (made with TWRP v3.2.3-0), and wanted to go back to that state.

First strange thing: This wasn't possible with TWRP v3.2.3-0 anymore because it needed to reformat /data with f2fs which lead to an error. TWRP v3.3.1-0 solved that issue.

After restore first I was unpatient, but waiting overnight finally returned my phone to the saved state (except that my internal storage was gone, because it was killed by the 9.0.4 upgrade).

But then it turned out that some things are not as good as before:
1) The fingerprint sensor is dead
2) "Calling" *#808# shows an error "Connection problem or invalid MMI code"
3) When re-entering TWRP the /data partition cannot be mounted (after a much too quick entry indicating that decryption did not took place)

What did the 9.0.4 update do to prevent the nandroid from 100% restore ? What can I do?
What do I need to do, to at least get my backup working just as it worked before?
What do I need for a successful upgrade to 9.0.4?
 
Last edited:

ako673de

Senior Member
Nov 15, 2015
55
6
28
After spending major part of this weekend, this is what I found out so far:

1) Doing restore directly on the filesystem after 9.0.4 upgrade was the reason for the multiple strange behavior afterwards. Correct restore was like this:
- Flash a 5.0.8 stock firmware (!!!)
- Flash TWRP v3.3.1-0 (using v3.2.3-x would still fail with /data restore)
- Restore the backup, but leaving out the "system image"

2) After the successful restore, however, TWRP couldn't decrypt the /data partition. Flashing TWRP v3.2.3-1 was the solution for this.

3) BTW: The issue with *#808# was due to a non-stock dialer I was using. What misled me was that also the non-stock dialer was able to run some USSD codes, but strangely not all, and especially not the diagnostics one.

Ok, all issues solved so far, but now I'm on 5.0.8 again. And there I have this banking app, which once in a while tells me that "a phone with these settings is not supported due to high security standards" (meaning that it's rooted). In the past this issue has always been able to be fixed by firmware or magisk update. But right now magisk is at v19.3 and no update available. So, I need to upgrade the OS (I assume).

Is there a safe way to upgrade to 9.0.4 (or 9.0.5, which came out last Friday)?
Just an idea I'm having from the issues with TWRP version (one seems to work only with 5.0.8, the other only with 9.0.x): Might it be as simple as flashing a stock recovery just for the update? Or are there other things to obey?
 

ako673de

Senior Member
Nov 15, 2015
55
6
28
Hello Dirk,

I've read so many threads these days, to just confuse me even more. This is the very first really helpful tip.
Maybe I will try it out. But as for now the mixing of 5.0.8 and 9.0.x parts of the firmwares feels so desparately dirty, that maybe I should better try everything else first.

And here your other comments about banking apps were very interesting. Why exactly did you remove them later?

First of all I need to mention, that all my banking apps worked just fine until about 2 weeks ago. Basically everything is still perfectly alright: Safetynet is still being passed, the device is still "certified", magisk is still well hidden, and none of the critical apps "see" the root. Furthermore it's only one out of 4 banking apps that has stopped working (unfortunately it's the most critcal one with no alternative access (no website, no HBCI)).

So, could you please get a little bit more in detail?
I don't know enough about the details, but intuitively an unlocked bootloader might well be something a banking app could successfully look out for. But none of my research pointed me to a thread where the bootloader was successfully relocked with TWRP present. Could you please point me to that one?
The "LOS" thread, what exactly is that, and where? LineageOS? That's a branch from CyanogenMod, as far as I have read. What exactly does this ROM better wrt banking apps? I already had CM on my former Samsung S4, and it didn't work out very well. It was full of bugs...
And what exactly is "NLOS" (wrt banking apps)?

Thank you very much for your assistance.
 

Dirk

Senior Member
May 11, 2009
12,424
3,808
0
I've read so many threads these days, to just confuse me even more. This is the very first really helpful tip.
Maybe I will try it out. But as for now the mixing of 5.0.8 and 9.0.x parts of the firmwares feels so desparately dirty, that maybe I should better try everything else first.
If your aim is to be on the latest version of OOS whilst preserving Data, you need to use the modified Firmware.


LineageOS with latest TWRP allows you to relock your Bootloader. You wouldn't have any issues with Banking Apps with that setup. You can't get from OOS to LOS without losing Data though, and there's no point discussing custom ROMs further if your objective is to be on OOS.
 
Last edited:

ako673de

Senior Member
Nov 15, 2015
55
6
28
Solved the banking app issue! It's the so called UDS detection method which was new and is not yet covered by magisk (incl. Beta), but the so called "canary" branch.

BTW: Bootloader is (should be) not something an app can detect with magisk in place.