Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck on activation after flashing Magisk patched AP on Samsung Galaxy S21 Ultra with China mainland firmware #7242

Closed
mio-19 opened this issue Aug 16, 2023 · 11 comments
Labels
not our issue This issue is caused by third-party like customized rom or module

Comments

@mio-19
Copy link

mio-19 commented Aug 16, 2023

reopen #7241

Only Chinese firmware has this problem. I have tried Hong Kong version and activated the phone successfully

Device: Samsung Galaxy S21 Ultra Snapdragon SM-G9980
Android version: 12
Magisk version name: v26.1
Magisk version code: 26105

  1. Download latest CHC firmware using frija
  2. Flash BL AP CP CSC with odin
  3. Activated the phone. Installed Magisk debug. Patched AP. Transfered with adb push / adb pull. Checked sha512sum to ensure no corruption
  4. Flash BL Patched AP CP CSC
  5. Got [2002] -45 Error code when doing activation

image
image

@YashvirGaming
Copy link

@mio-19 flash the boot.img from the stock rom

@mio-19
Copy link
Author

mio-19 commented Aug 29, 2023

@mio-19 flash the boot.img from the stock rom

Sorry?

@Star-Seven
Copy link

Disable \system\app\ActivationDevice_V2(If there is a tWRP, you can directly delete this app. If not, you need to enter the browser through the blind keyboard on the activation interface to download the pre prepared module and disable it)

@salvogiangri
Copy link
Contributor

@mio-19 anyway you can share some kernel/system logs to see what's going on under the hood?

@gopise
Copy link

gopise commented Sep 11, 2023

same issue here. happened on Samsung galaxy s22 android 13.
Activation stage during initial setup will fail with 2002-45. Unable to enter the system. Log attached. It seems failed at attestation.

activation.txt

@salvogiangri
Copy link
Contributor

same issue here. happened on Samsung galaxy s22 android 13. Activation stage during initial setup will fail with 2002-45. Unable to enter the system. Log attached. It seems failed at attestation.

activation.txt

Can you get a more complete log? I see the activation is trying to generate a SAK but it's failing, so taking a look at the keystore logs would be great to see why it's failing in the TEE side.

@osm0sis
Copy link
Collaborator

osm0sis commented Sep 29, 2023

So is this seeming like a "not our issue" sort of thing at this point?

@salvogiangri
Copy link
Contributor

So is this seeming like a "not our issue" sort of thing at this point?

Yeah this is not directly caused by Magisk, as installing any custom kernel will change the System Status in TEE to "Custom":

01-01 17:18:40.776   679   679 D keymaster_swd: keymaster_swd [ERR] (swd_key_attest:1348) SAK cannot be used for the compromised device
01-01 17:18:40.776   679   679 D keymaster_swd: keymaster_swd [WRN] (swd_run_cb:254) swd_key_attest() returns -45
01-01 17:18:40.777   679   679 W keymaster_tee: [WRN]Cmd 14, err -45
01-01 17:18:40.777   679   679 W keymaster_tee: [WRN]nwd_attest_key  ret -45
01-01 17:18:40.777   676   676 E keystore2/skeymint: !@ getCertificate : errorCode : -45
01-01 17:18:40.777   676   676 E keystore2/skeymint: !@ attestKey : errorCode : -45

SAK is used nowadays on most Samsung apps to verify the device integrity, it isn't hard to bypass as my KnoxPatch module does the job, but again nothing directly caused by Magisk

@osm0sis osm0sis added the not our issue This issue is caused by third-party like customized rom or module label Sep 29, 2023
@osm0sis osm0sis closed this as not planned Won't fix, can't repro, duplicate, stale Sep 29, 2023
@snoolee
Copy link

snoolee commented Jan 21, 2024

Disable \system\app\ActivationDevice_V2(If there is a tWRP, you can directly delete this app. If not, you need to enter the browser through the blind keyboard on the activation interface to download the pre prepared module and disable it)

Care to explain how the blind keyboard method works? I mean even if i have downloaded such a module to disable ActivationDevice_V2, i can't install it through the magisk app cause i can't enter the system, i can't even finish magisk installation as i need to launch magisk app to let it finish additional setup and reboot the phone.

@Star-Seven
Copy link

Disable \system\app\ActivationDevice_V2(If there is a tWRP, you can directly delete this app. If not, you need to enter the browser through the blind keyboard on the activation interface to download the pre prepared module and disable it)

Care to explain how the blind keyboard method works? I mean even if i have downloaded such a module to disable ActivationDevice_V2, i can't install it through the magisk app cause i can't enter the system, i can't even finish magisk installation as i need to launch magisk app to let it finish additional setup and reboot the phone.

Based on this https://github.com/fei-ke/Magisk

@tcc0lin
Copy link

tcc0lin commented Apr 29, 2024

Disable \system\app\ActivationDevice_V2(If there is a tWRP, you can directly delete this app. If not, you need to enter the browser through the blind keyboard on the activation interface to download the pre prepared module and disable it)

Care to explain how the blind keyboard method works? I mean even if i have downloaded such a module to disable ActivationDevice_V2, i can't install it through the magisk app cause i can't enter the system, i can't even finish magisk installation as i need to launch magisk app to let it finish additional setup and reboot the phone.

Based on this https://github.com/fei-ke/Magisk

666

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not our issue This issue is caused by third-party like customized rom or module
Projects
None yet
Development

No branches or pull requests

8 participants