ma1co / Sony-PMCA-RE

Reverse Engineering Sony Digital Cameras
MIT License
2.07k stars 232 forks source link

Sony A6000 bricked? Blinks 3x short, 7x long #488

Open 0xPIT opened 7 months ago

0xPIT commented 7 months ago

Looks like I‘ve somehow managed to brick my a6000, any tips to restore?

Powering from battery or USB solely leads to the red LED next to the battery door blinking 3x short following 7x long, then repeating this pattern.

PC or Mac does not recognize any USB device. Characters appear on the debug serial, but I can‘t seem to find the correct baud rate.

This smells like some DFU bootloader mode? Is there any way to bring the camera into another mode or restore from the SD card somehow?

0xPIT commented 7 months ago

I've unpacked the firmware. Looks like there's a shell script function blink_error() that is called from endupdate.sh, which is run if the file /root/IAMUPDATER is present, with an argument of ERROR_NAND_UNMOUNT, which is defined to 73. <-- suspiciously close to the blinking pattern I see, just bytes reversed

But as I can't access the device or the file system, I can't do anything...

Any options to force some boot loader mode or interrupt and enable serial console? I guess a solution to this would save many bricked devices...

Also, those are other blink error codes:

ERROR_INVALID_FIRMWARE=41
ERROR_UINCOMP=54
ERROR_NAND_MOUNT=72
ERROR_NAND_UNMOUNT=73
ERROR_SYSTEM=87
ERROR_MPR_ERASE=45
ERROR_POWER_IC_TYPE=47
ERROR_FSYS_FORMAT=48
0xPIT commented 7 months ago

Ah, the debug serial port (115200,8,N,1) gives the following output:

mumin_pbm_s_mount_per_die : Err : ret=0x00800001
mumin_pbm_s_read_extra_of_top_pages : Warn : ECC uncorrectable error on page!
mumin_pbm_s_read_extra_of_top_pages : Warn : die=0 pl=0 pblk=0x0006 n_pblks=1996
mumin_vbm_s_check_power_failure_etb_and_recover : Warn : etb num=2
mumin_pbm_s_erase_pblkgroup : Warn : Erase error, badinfo=0x80000000
mumin_warn_print_pblkgroup : Warn : pblkgroup n_dies=1
mumin_warn_print_pblkgroup : Warn :     die[0]=0 n_planes=1
mumin_warn_print_pblkgroup : Warn :         pblk[0]=0x00e2
mumin_pbm_s_link_newpab_and_store_pbi : Err : ret=0x00800001
mumin_pbm_erase_vblk : Err : ret=0x00010003
mumin_vbm_erase_vblk : Err : ret=0x00010003
mumin_vbm_s_erase_etbs : Err : ret=0x00010003
mumin_vbm_s_check_power_failure_etb_and_recover : Err : ret=0x00010003
mumin_vbm_mount : Err : ret=0x00010003
mumin_ebm_s_check_num_of_eblks_between_ebi_and_vbi : Err : ret=0x00040006 ebi=62 vbi=63
mumin_ebm_mount : Warn : ret=0x00040006
mumin_pbm_s_read_extra_of_top_pages : Warn : ECC uncorrectable error on page!
mumin_pbm_s_read_extra_of_top_pages : Warn : die=0 pl=0 pblk=0x0006 n_pblks=1996
mumin_vbm_s_reconstruct_vblk_in_vbi : Err : vblk=0x00e2 typ=0
mumin_vbm_reconstruct_vbi : Err : ret=0x00010005
mumin_ebm_mount : Err : ret=0x00010005
mumin_mount : Err : ret=0x00010005
MMD_MUMINBLK( 147[init_mumin]) : Error : mumin_mount() failed...[-5]
MMD_MUMINBLK( 449[muminblk_init]) : Error : init_mumin() failed...[-5]
MMD_MODULE( 210[_mumindrv_ldr_init]) : Error : failed to muminblk_init()

Looks like the on-chip flash is defective. Bummer. I wonder what boot loader that is, I could not find uboot on Sony's OSS page.

valnaumov commented 6 months ago

@0xPIT How did you manage to unpack the firmware? Did you get it from camera or from the website?

0xPIT commented 6 months ago

Get the official macOS download, the installer contains the bin file as-is. (Right click -> show package contents)

Then use https://github.com/ma1co/fwtool.py on the bin.