v0l / radio_tool

Radio firmware tool
https://discord.gg/V596cyatmv
GNU General Public License v3.0
74 stars 17 forks source link

Dump firmware #15

Open suhajda3 opened 1 year ago

suhajda3 commented 1 year ago

Hello,

Is it possible to dump the whole firmware? I have two UV-15R and accidentally bricked one of them with a wrong firmware. I would like to download the original firmware from the good one and upload it to the bricked one.

Thanks!

v0l commented 1 year ago

Are you able to start the radio in programming mode?

suhajda3 commented 1 year ago

Yes, I can start programming mode on both radios.

v0l commented 1 year ago

I think you can just flash the firmware on again by downloading it online? There shouldnt be a need to copy the firmware from one radio to the other

suhajda3 commented 1 year ago

I couldn't find the firmware online, that is why I would like to dump it from the good one.

v0l commented 1 year ago

There is no support currently to dump the firmware only the bootloader

suhajda3 commented 1 year ago

Yes, I can run it on a Mac. Do you have any plans to support firmware dump as well?

v0l commented 1 year ago

I dont have a lot of spare time but i can try to see if it works in the next few days, ill update here if it worked

v0l commented 1 year ago

I dont recall does this look like vector table? image

edit: no this is the start of the bootloader

v0l commented 1 year ago

Ok it looks like it does just dump the decrypted firmware.. need to finish this off

kosciej commented 1 year ago

What's needed to finish this issue? Maybe I can help with it. I have exactly the same problem as @suhajda3 - I've installed P15UV GMRS firmware on UV-15R radio and want to go back.

v0l commented 1 year ago

Test this branch and see if works for your radio, it might not even work as some bootloaders dont allow reading at all.

https://github.com/v0l/radio_tool/tree/try-dump-firmware

radio_tool -d 0 --dump-firmware -o test.bin

This branch will only dump a small section of data so its not complete yet, we would also need to re-wrap the firmware if its dumped as decrypted

suhajda3 commented 1 year ago

Thanks.

I get this error when running the command:

error parsing options: Argument ‘-o’ failed to parse

v0l commented 1 year ago

Try with --dump-firmware at the end

suhajda3 commented 1 year ago

./radio_tool -d 0 -o test.bin --dump-firmware error parsing options: Option ‘dump-firmware’ is missing an argument

v0l commented 1 year ago

Ok add a random value --dump-firmware true

suhajda3 commented 1 year ago

./radio_tool -d 0 -o test.bin --dump-firmware true error parsing options: Argument ‘true’ failed to parse

v0l commented 1 year ago

Looks like its supposed to be a number, try with a number

suhajda3 commented 1 year ago

./radio_tool -d 0 -o test.bin --dump-firmware 1 Segmentation fault: 11

v0l commented 1 year ago

Maybe try a larger number 0x1000

v0l commented 1 year ago

Join Discord to discuss more

drzraf commented 1 year ago

Cross-referencing https://github.com/CtrlC-Root/gm30/issues/1 in case it could help.