sonyxperiadev / bug_tracker

Empty repository that is used as a bugtracker for Open Devices project
52 stars 13 forks source link

Xperia XZ2 Compact Dual (H8324) & XZ2 Dual (H8266) don't boot with A11 binaries but they do with A10 binaries #661

Closed mielletseed closed 3 years ago

mielletseed commented 3 years ago

Platform: Android or TAMA or whatever is meant with platform Device: Xperia XZ2 Compact Dual (H8324) Kernel version: 4.14 Android version: 11 Software binaries version: SW_binaries_for_Xperia_Android_11_4.14_v3a_tama.img (v2a too) Previously working on works with A10 binaries (SW_binaries_for_Xperia_Android_10.0.7.1_r1_v11a_tama.img)

Description doesn't boot, hangs on "andriod", no ADB active

Symptoms dosn't boot

How to reproduce try to boot

Additional context Add any other context, e.g. upload logs or screenshots about the bug here.

jevgenp commented 3 years ago

No updates/solutions? With r17/r18 same behavior.

MartinX3 commented 3 years ago

XZ2C boot.img with CONFIG_QPNP_POWER_ON_PANIC_ON_KPDPWR_RESIN=y defconfig https://www.dhsfileserver.de/ftp/MartinX3/0Tests/XZ2C/2020-12-12_boot_CONFIG_QPNP_POWER_ON_PANIC_ON_KPDPWR_RESIN.img.gz

  1. Connect your phone with your computer over USB and keep it connected until you get the pstore
  2. Flash the december 11 SODP AOSP
  3. Flash the newest A11 OEM
  4. Flash the boot.img I linked here
  5. Wait until you're stuck
  6. Press shortly PWR+VolUP
  7. The device should crash now in the next 5 seconds
  8. Keep VolUP pressed until the LED turns blue
  9. Flash the A10 OEM and boot TWRP or the rooted android system
  10. Get the generated PSTORE in /sys/fs/pstore and post it here
jevgenp commented 3 years ago

I hope it's that one pstore.zip

MartinX3 commented 3 years ago

Thank you!

Maybe this is important

[   10.573776] ipa-wan ipa3_handle_indication_req:117 not send indication
[   10.580171] ipa ipa3_uc_state_check:292 uC is not loaded
[   19.181426] init: Control message: Could not find 'android.hardware.soundtrigger@2.0::ISoundTriggerHw/default' for ctl.interface_start from pid: 540 (/system/bin/hwservicemanager)
[   19.946735] msm_pcm_path_latency_ctl_get substream runtime not found
[   21.531725] bt_ioctl: BT_CMD_PWR_CTRL pwr_cntrl:0
[   21.531787] bt_ioctl: BT chip state is already :0 no change d
[   21.531787] 
[   21.532582] bt_ioctl: BT_CMD_PWR_CTRL pwr_cntrl:1
[   21.532721] bt_power vendor:bt_wcn3990: vendor:bt_wcn3990 supply qca,bt-vdd-vl not found, using dummy regulator
[   21.532999] bt_power vendor:bt_wcn3990: vendor:bt_wcn3990 supply qca,bt-vdd-vm not found, using dummy regulator
[   21.533215] bt_power vendor:bt_wcn3990: vendor:bt_wcn3990 supply qca,bt-vdd-5c not found, using dummy regulator
[   21.533371] bt_power vendor:bt_wcn3990: vendor:bt_wcn3990 supply qca,bt-vdd-vh not found, using dummy regulator
[   21.534353] bt_power vendor:bt_wcn3990: vendor:bt_wcn3990 supply qca,bt-chip-pwd not found, using dummy regulator
[   21.816644] bt_ioctl: BT_CMD_CHIP_VERS soc_version:40010214
[   23.994390] Unrecognized mount option "unshared_obb" or missing value
[   23.994392] sdcardfs: invalid options
[   23.995846] init: DM_DEV_STATUS failed for system: No such device or address
[   27.500717] init: updatable process 'dpmd' exited 4 times in 4 minutes
[   27.503251] apexd: Native process 'dpmd' is crashing. Attempting a revert
[   27.503410] apexd: Revert failed : Revert requested, when there are no active sessions.
MartinX3 commented 3 years ago

@jevgenp Could you please repeat it? :) If you get stuck at the sony logo, wait 5 seconds and trigger the kernel panic :)

MarijnS95 commented 3 years ago

Stuck in this case means: wait for a total of 5-10 seconds on that screen, then trigger the reboot. Pmsg has already rolled over with the device - according to dmesg - being up for well over 80 seconds.

jevgenp commented 3 years ago

@jevgenp Could you please repeat it? :) If you get stuck at the sony logo, wait 5 seconds and trigger the kernel panic :)

pstore.zip Am I doing something wrong?

MarijnS95 commented 3 years ago

@jevgenp Yes, the device is on way too long, all startup messages have already disappeared because the pstore log buffer is rather small.

This one is even worse, the device has been on for over 3 minutes.

jevgenp commented 3 years ago

Specially waited about 15min on android logo... Thought will be better. So how long to wait on this?

MarijnS95 commented 3 years ago

@jevgenp As said above, wait at most 10 seconds on the Android logo, then press the button combination to freeze and crash it.

jevgenp commented 3 years ago

Misunderstood... android logo/sony logo. My bad. pstore.zip

MarijnS95 commented 3 years ago

@jevgenp What screen you're on doesn't matter for the timing. As soon as the screen shows up where it usually gets stuck, give it at most 5 seconds, then press the combination.

However, what screen is actually important in diagnosing the issue when there is no adb. Seeing the android boot animation as opposed to the Sony logo indicates a lot of things have gone right already. Which one is it?

Anyway, this pstore again shows a device that only rebooted after 90 seconds, way too long. Can you time how long every screen takes after turning the device on?

jevgenp commented 3 years ago

Last time I pressed combination exactly at 10 sec after android logo appears. Ok i'll try to count every screen duration.

MarijnS95 commented 3 years ago

@jevgenp I just noticed that one of the pstores contains dmesg-ramoops-0, this time with the crashes we were looking for :)

It is indeed Keymaster which has changed from Android 10 to Android 11 blobs, requiring you to wipe userdata.

jevgenp commented 3 years ago

@MarijnS95 So nothing more needed from my side? Just wait with hope for fixed blobs? :)

MarijnS95 commented 3 years ago

@jevgenp don't think there is a wait, all you can do is back up data, wipe the phone, upgrade and restore.

It's weird though, on KeyMaster 4 (Akatsuki, all Kumano and Seine devices) the upgrade works, but downgrading back to v10 blobs is impossible (not surprising/bad though).

Your only hope is @jerpelea checking it out, but the answer is likely to wipe it or stay with a half-broken device on Android 10 blobs :(

jevgenp commented 3 years ago

@MarijnS95 so as I understand, after wiping data (fastboot -w) all should be fine? But it's not. Tried this many times before. Situation the same - infinite android logo.

This one pstore after flashing AOSP11 and wiping user data (according MartinX3 post): pstore.zip (10sec interval on android logo) Before android logo appears: ~5sec shows device unlocked, ~10sec shows sony logo.

mielletseed commented 3 years ago

No, wiping doesn't help. I always tried a clean installation, I didn't use the device before.

MarijnS95 commented 3 years ago

That changes the situation again.

Unfortunately @MartinX3 clarified the XZ2 is not affected so this can't be isolated to a KM3 issue. We'll dig for a bit and let you know when there's a solution.

jerpelea commented 3 years ago

@jevgenp please use Emma and update your device to the latest official release I tested XZ2C with v3 and boots fine

mielletseed commented 3 years ago

Strange, before i tried AOSP I used Xperifirm to download the latest official firmware and then I used newflasher to update my device to the latest firmware ... Do you think with Emma (I don't know Emma) I will get different results?

jevgenp commented 3 years ago

@jerpelea @mielletseed tried now:

  1. Flashed latest Emma's 52.1.A.0.618 FW/SW
  2. Over it AOSP11r18 (I tried my own compiled) + oem v3 with wiping

Result still the same - android logo and... nothing. Then I flash over this in recovery @MartinX3's latest rom - and again infinite android logo (oem flashed on both slots). With A10 oem and my and @MartinX3's rom boots in system.

Now I'll try to reinstall/reconfigure my VM and recompile the rom. But I think it useless...

jevgenp commented 3 years ago

Reinstalled/Reconfigured/Recompiled - still the same. Bootable only with A10 oem, not A11.

jevgenp commented 3 years ago

Just to be clear, tried Emma's 52.0.A.3.84 and 52.0.A.8.131 - nothing changed. P.S. Found similar (i think so) issue here https://github.com/sonyxperiadev/bug_tracker/issues/165.

sjllls commented 3 years ago

Just to be clear, tried Emma's 52.0.A.3.84 and 52.0.A.8.131 - nothing changed. P.S. Found similar (i think so) issue here #165.

@jevgenp Can you enter fastboot mode and run fastboot getvar all ? Paste the output here please, thanks!

jevgenp commented 3 years ago

@sjllls on what fw? (now I got back on latest stock fw 52.1.A.3.49 xperifirm/newflasher).

sjllls commented 3 years ago

@sjllls on what fw? (now I got back on latest stock fw 52.1.A.3.49 xperifirm/newflasher).

52.1.A.3.49 is Ok, Alin said him tested Android 11 on latest FW of Apollo. We could get some ver info of your bootloader from the output.

jevgenp commented 3 years ago

@sjllls here it is: getvar.txt.

mfu-mcosys commented 3 years ago

just for info: h8314 is the same (52.1.A.3.49-RC4)

mielletseed commented 3 years ago

so is there any progress on this is there a problem in the Custom ROM or in the A11 binaries or has this issue already resolved?

MartinX3 commented 3 years ago

@mielletseed It's currently under investigation :) Could you also add the normal XZ2 to you thread title? I get reports from them as well now. :(

sraase commented 3 years ago

I think this also affect aosp_h8216 (akari) and aosp_h8314 (apollo): Fails to boot with v3a binaries (no adb), boots fine with v12a binaries.

MartinX3 commented 3 years ago

I can confirm it on my XZ2 (akari/h8296). Stuck on v3a Booting on v12a

Edit: Seems like on v12a the mobile network is broken logcat_-b_radio.log

MartinX3 commented 3 years ago

Here is my pstore pstore.zip

The keymaster 3 is indefinitely looping.

MartinX3 commented 3 years ago

Using from OEM A10 lib64/hw/android.hardware.keymaster@3.0-impl-qti.so lib64/hw/libkeymasterdeviceutils.so makes the device boot.

MarijnS95 commented 3 years ago

I may have found the cause. v3a blobs introduce a new legacy check that, if false, send a different command during configure - the one that fails here. If legacy is true it sends an identical command to v12a blobs.

Unfortunately that legacy check only considers TA API Major/Minor version 4.0 as legacy, and not 3.x. Get that fixed in the blob, and this issue should be resolved.

EDIT: libkeymasterdeviceutils.so where this check resides was likely compiled/altered for 4.0 only, where 4.0 still shares a similar legacy API to 3.0, but 4.1 and above are different. Tama is a weird platform with Akari+Apollo on KM3 (API 3.0), but Akatsuki on KM4 (API 4.0, so also legacy).

jevgenp commented 3 years ago

Can confirm, r32 booting with latest A11 v4b blobs. H8324 device.