
How to remarry BD drive on PS3 Linux
-------------------------------------

# Used tools: ps3vuart-tools, bd-tools, aes_cbc, des_cbc


# dump EID2 with ps3dm or directly from FLASH

ps3dm iim get_data 2 > eid2.bin


# create pblock_des.bin

dd if=eid2.bin bs=1 skip=$((0x20)) count=$((0x80)) | ./aes_cbc -d -i <EID2 iv> -k <EID2 key> > pblock_des.bin


# create sblock_des.bin

dd if=eid2.bin bs=1 skip=$((0xa0)) count=$((0x690)) | ./aes_cbc -d -i <EID2 iv> -k <EID2 key> > sblock_des.bin


# create pblock.bin

dd if=pblock_des.bin bs=1 skip=$((0x10)) count=$((0x60)) | ./des_cbc -d -i 0000000000000000 -k 6ccab35405fa562c > pblock.bin


# create sblock.bin

dd if=sblock_des.bin bs=1 skip=$((0x10)) count=$((0x670)) | ./des_cbc -d -i 0000000000000000 -k 6ccab35405fa562c > sblock.bin


# write pblock.bin

./bd_enable_buffer_write -b 2

./bd_write_buffer -b 2 -i pblock.bin

# athenticate BD drive

ps3dm -v sm drive_auth 0x29
ss status 0


# write sblock.bin

./bd_enable_buffer_write -b 3

./bd_write_buffer -b 3 -i sblock.bin


# write default HRL

./bd_enable_buffer_write -b 4

./bd_write_buffer -b 4 -i default_hrl.bin

