sonyxperiadev / device-sony-lilac

36 stars 29 forks source link

device freeze after flashing AOSP boot.img #21

Closed brenzi closed 6 years ago

brenzi commented 6 years ago

After successfully building AOSP 8.0 I flashed boot.img according to instructions on https://developer.sonymobile.com/open-devices/aosp-build-instructions/how-to-build-aosp-oreo-for-unlocked-xperia-devices/

> sudo fastboot -S 256M boot boot.img 
downloading 'boot.img'...
OKAY [  0.384s]
booting...
OKAY [  5.738s]
finished. total time: 6.122s

then the screen went on (white screen with black sony logo)

I tried the next step

> sudo fastboot -S 256M recovery recovery.img 
< waiting for device >

The phone is frozen in this state and I can't even turn it off by holding the power key.

Seems like I have to wait until the battey is low. Somewhere I read about a reset button below the SIM/microSD lid but didn't find any (Xperia XZ1 compact)

jerpelea commented 6 years ago

did you flash v7 vendor?

brenzi commented 6 years ago

that's what I had flashed before, yes:

SW_binaries_for_Xperia_AOSP_O_MR0_5.7_r1_v07_yoshino
jerpelea commented 6 years ago

i will sync and rebuild

brenzi commented 6 years ago

cheers.

what is this vendor image anyway? I thought that's what I need to get back from AOSP to get a stock phone

jerpelea commented 6 years ago

it contains all vendor binaries (everything that is not built from public code) as name suggests without it device can not boot

brenzi commented 6 years ago

thanks for the explanation. I must say I'm a bit disappointed that sony calls this "open source" if the device can't boot without a vendor binary image. Anyway, what I don't get is why the phone was booting after I flashed boot.img. I didn't disconnect or anything. Thought I could just flash these images and boot the phone after flashing everything. According to the instructions, the vendor image comes last, so again - I'd expect the phone not to boot after flashing boot.img because - as you say - It won't be able to.

Do I have to wait for the battery to run low and then recharge it, starting into fastboot mode and flashing my remaining images (recovery, system, userdata), followed by your newly built vendor image?

jerpelea commented 6 years ago

the device needs firmware to boot and it will not boot without vendor fastboot flash oem SW.....img

disconect usb and use any of the following combinations: reboot - press power+volume up untill a short vibration comes shut down - press power + volume up untill vibrates a fiew times

brenzi commented 6 years ago

great, that worked for shutting down the phone.

My apologies, I just found a typo that explains the above: I've typed:

sudo fastboot -S 256M boot boot.img 

instead of

sudo fastboot -S 256M flash boot boot.img 

no wonder that it booted.

However, I haven't flashed any vendor package anew, still the phone boots now into a clean android. also the camera works (without any white balance issues that I saw reported for AOSP). Great.

So, do I still need to flash the vendor image again for any reason?

jerpelea commented 6 years ago

i have no ideea what you flashed previously and I would recommend te flash the oem as described

jerpelea commented 6 years ago

your phone should not be sble to boot without it and i recommend to upgrade to v7

jerpelea commented 6 years ago

images for the device compiled and device boots ok

brenzi commented 6 years ago

ok, done:

sudo fastboot flash oem SW_binaries_for_Xperia_AOSP_O_MR0_5.7_r1_v07_yoshino.img

still, WIFI doesn't work, I can't turn it on, it will switch back off right away

the instructions say: SW_binaries_for_Xperia_AOSP_O_MR04.4_.zip yet on https://developer.sonymobile.com/open-devices/list-of-devices-and-resources/ it suggests: SW_binaries_for_Xperia_AOSP_O_MR0_4.4_v05_yoshino

should I try this v05? I don't remember where I got the v07 from

jerpelea commented 6 years ago

wifi is fixed on v8 which will become public soom

brenzi commented 6 years ago

OK, I see. As much as I apprechiate your very reactive support, this means this whole AOSP is far from usable. Was interesting to play around anyway.

Is there an option to get this phone

jerpelea commented 6 years ago

aosp comes without any of the above

brenzi commented 6 years ago

Where can I find the info about what's currently working on AOSP and what's not? Why are there no issues in this github? The fingerprint sensor for example didn't quite work neither.

Is there a way to get back to the original ROM until these things are fixed?

jerpelea commented 6 years ago

except fingerprint which is OSS, everything works

our page contains all the info https://developer.sony.com/develop/open-devices/

brenzi commented 6 years ago

OSS?

brenzi commented 6 years ago

;-) sorry, too obvious