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

[Nokia 3.1] Crashes during boot #2375

Open
mikoxyz opened this issue Jun 28, 2022 · 10 comments
Open

[Nokia 3.1] Crashes during boot #2375

mikoxyz opened this issue Jun 28, 2022 · 10 comments

Comments

@mikoxyz
Copy link

mikoxyz commented Jun 28, 2022

Current Behavior:

Device crashes during boot and keeps rebooting.

Describe the bug

Device crashes during boot. It gets far enough into the boot process that adb can be attached (log is attached), but it ends up crashing and rebooting. There are no other indications that the device is booting apart from it showing up when listing devices in adb (i.e. no boot screen).

To Reproduce

  1. Flash the arm64-ab-gapps.img to system_a using fastboot
  2. Try booting

Expected behavior

Device shouldn't crash during boot.

Smartphone (please complete the following information):

  • Device: Nokia 3.1
  • Build Flavor: system-squeak-arm64-ab-gapps.img.xz
  • Version: v414

Log

log.txt

Additional context

For reference, this device has been unlocked using mtkclient, as there's no official way to unlock it.

@mikoxyz
Copy link
Author

mikoxyz commented Jun 30, 2022

Hi,

There are two issues at play here; the downstream 3.18 kernel provided by Nokia doesn't have bpf enabled, and even if it was, the implementation would be too old for Android 12. Android 12 seems to depend on a bpf implementation provided by Linux >=4.9.

Basically, this isn't an issue with the builds provided here, or even an issue with Android; devices with kernels <4.9 just aren't supported by Android anymore, due to the bpf implementation being too old. This should probably be documented in the wiki, so I'll leave this issue open until someone gets around to doing that.

@phhusson
Copy link
Owner

phhusson commented Jun 30, 2022 via email

@Haus3master
Copy link

Issues are there but the same is for the zenfone max m1 X00PD with 3.18 it boots but with problems... phh is right in his statement...

@mikoxyz
Copy link
Author

mikoxyz commented Jul 2, 2022

That's wrong, my gsi boots just fine on Pixel 1 running 3.18 kernel

Hm, interesting. The Lineage people say otherwise regarding 3.18, though (https://lineageos.org/Changelog-26/).

Maybe the required changes were backported to the Pixel 1's kernel? Or maybe the implementation of bpf found in 3.18 is "enough" for things to sort of work? Either way, bpf does still seem to be a dependency, so it should probably still be documented in the wiki.

@phhusson
Copy link
Owner

phhusson commented Jul 2, 2022 via email

@mikoxyz
Copy link
Author

mikoxyz commented Jul 2, 2022

I boot pixel 1 without any bpf at all. Only feature that is broken to the best of my knowledge is data consumption accounting, but maybe there's more. Either way I daily drived a pixel 1 few weeks with no issue related to bpf.

Oh, I see. Probably a problem with my device, then?

@mikoxyz
Copy link
Author

mikoxyz commented Jul 2, 2022

Aha, think I found the problem:

01-01 00:31:39.413   723   723 D TlcTeeKeyMaster: TEE_GetKeyCharacteristics [vendor/mediatek/proprietary/trustzone/trustonic/source/external/keymaster/common/410/3.0/src/tlcTeeKeymaster_if.cpp:987]
01-01 00:31:39.414   723   723 D TlcTeeKeyMaster: TEE_GetKeyCharacteristics exiting with 0 [vendor/mediatek/proprietary/trustzone/trustonic/source/external/keymaster/common/410/3.0/src/tlcTeeKeymaster_if.cpp:1074]
01-01 00:31:39.417   723   723 D TlcTeeKeyMaster: TEE_UpgradeKey exiting with 0 [vendor/mediatek/proprietary/trustzone/trustonic/source/external/keymaster/common/410/3.0/src/tlcTeeKeymaster_if.cpp:1783]
01-01 00:31:39.418   723   723 D TlcTeeKeyMaster: TEE_GetKeyCharacteristics [vendor/mediatek/proprietary/trustzone/trustonic/source/external/keymaster/common/410/3.0/src/tlcTeeKeymaster_if.cpp:987]
01-01 00:31:39.420   723   723 D TlcTeeKeyMaster: TEE_GetKeyCharacteristics exiting with 0 [vendor/mediatek/proprietary/trustzone/trustonic/source/external/keymaster/common/410/3.0/src/tlcTeeKeymaster_if.cpp:1074]
01-01 00:31:39.421   721   735 E keystore2: keystore2::error: In create_operation: Failed to begin operation.
01-01 00:31:39.421   721   735 E keystore2: 
01-01 00:31:39.421   721   735 E keystore2: Caused by:
01-01 00:31:39.421   721   735 E keystore2:     0: In KeystoreSecurityLevel::upgrade_keyblob_if_required_with.
01-01 00:31:39.421   721   735 E keystore2:     1: In utils::upgrade_keyblob_if_required_with: Calling km_op after upgrade.
01-01 00:31:39.421   721   735 E keystore2:     2: Error::Km(ErrorCode(-62))
01-01 00:31:39.421   308   913 E vold    : keystore2 Keystore createOperation returned service specific error: -62
01-01 00:31:39.421   308   913 E Cryptfs : Error starting keymaster signature transaction: -62
01-01 00:31:39.421   308   913 E Cryptfs : Signing failed
01-01 00:31:39.421   308   913 E Cryptfs : scrypt failed
01-01 00:31:39.421   308   913 E Cryptfs : Cannot create encrypted master key
01-01 00:31:39.421   308   913 E Cryptfs : Error enabling encryption after framework is shutdown, no data changed, restarting system

I should've read through the entirety of the logs before i just assumed this was related to bpf.

@mikoxyz
Copy link
Author

mikoxyz commented Jul 2, 2022

Stumbled upon #2019 (same error code on an almost identical device), and deleting the keystore libs did the trick. This probably isn't an ideal workaround though; would it be possible to bypass the vendor keystore libs for mt6750 socs (provided this is a problem with all mt6750 devices?) with the gsi?

@LikDev-256
Copy link

Sorry for posting here this is a different issue,

I have the same device and flashed the same system image but my screen turns black after the ROM boots (Because I can see the animation fade away into black)
I think this might be a problem with the kernel problem with incompatible display not sure I wanted to know if you had the same issue.
Kali nethunter has a custom kernel for my device btw, will it work.

@mikoxyz
Copy link
Author

mikoxyz commented Jul 13, 2022

Heyo, @LikDev-256

I have the same device and flashed the same system image but my screen turns black after the ROM boots (Because I can see the animation fade away into black)
I think this might be a problem with the kernel problem with incompatible display not sure I wanted to know if you had the same issue.

No, I don't have this issue. With the workaround I described in my earlier comment, the device boots up just fine.

Kali nethunter has a custom kernel for my device btw, will it work.

You'd be better off attaching adb during boot and getting some logs out of it, and then posting a separate issue here on the issue tracker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants