evilwombat / gopro-usb-tools

Tools for booting an otherwise hard-bricked GoPro Hero2 / Hero3+Black / Hero4 camera using its built-in USB command mode, to its RTOS or to a standalone Linux environment.
GNU General Public License v2.0
128 stars 37 forks source link

GoPro hero 3 silver #1

Open marek786 opened 10 years ago

marek786 commented 10 years ago

You know into it add support for GoPro Hero 3 silver?

KonradIT commented 10 years ago

It supports it already, feel free tom PR.

marek786 commented 10 years ago

Hero 3 SILVER does not work. I would need DDR init sequence and HAL patch.

evilwombat commented 10 years ago

I do not have support for Hero3 Silver in gpboot, but you may be able to add support yourself. The CPU in the Hero3 Silver (A5L) is similar to what is in the Hero2, so you may be able to re-use the Hero2 boot code. I do not know if the DDR init would be the same, since I do not know what memory part is being used...

KonradIT commented 10 years ago

Why the hero3 silver does not work if the silver uses the same processor as the hero2?

marek786 commented 10 years ago

yes processor is same (A5S). I tried to init DDR Hero 2 and also ddr init alternative for Hero 2 but without result. I always showed failed. camera is in command mode driver works the same as the Hero 2.

evilwombat commented 10 years ago

The hero2 and hero3 silver may use the same processor, but the DDR chip is probably different. Different DDR chips need different timing settings to work properly.

marek786 commented 10 years ago

Thank you for information. Where can I find DDR timing settings?

evilwombat commented 10 years ago

That is a pain in the neck. I had to reverse engineer them from the BST bootloader (section 0 in the firmware file) by dissembling the code and following through it...

marek786 commented 10 years ago

Section_0 of hero 2 and section_0 of hero 3 silver is very little different (only in 7 bytes).

marek786 commented 10 years ago

good news. I have two GoPro Hero 3 silver. The second H3S carried DDR test correctly. So DDR init should also be applicable to H3S. you know to help me make a patch for HAL and create relocate.bin file?

evilwombat commented 10 years ago

Hmmm. I wonder what the 7 bytes are. Are they at the start of the file? Maybe you can find the same bytes in the hero2 DDR sequence and replace them with the ones from the hero3silver file. Changing relocate.bin should not be necessary - that file is independent of the camera version. As far as the HAL patching goes, hmmm. In theory you need the original HAL section from the firmware, as well as a copy of the HAL from a running camera (saved using the savebin command with the right addresses). But, I only do the HAL patching to avoid giving out a copy of the HAL with my software - who knows, it's probably gopro-copyrighted, so I only have the 'differences' in my code. If you can save a working HAL from a working H3S camera, you should just be able to use THAT as your 'patched HAL' file, directly. I am incredibly sleepy right now, but I want to say the HAL lives at address 0xc00a0000 and is (at most) 64k in size.

marek786 commented 10 years ago

Thank you for information. Differences in section 0 are: position 0x000c = 0xe5 position 0x000d = 0xb2 position 0x0021 = 0x36 position 0x0022 = 0xb8 position 0x0024 = 0x7a position 0x080c = 0x87 position 0x080d = 0xac

I do not have working H3S. I have only two broken H3S. One broken H3B (boot Linux using your software) and one working H3B.

Sorry for my english.

evilwombat commented 10 years ago

Hello. If I had to take a wild guess, based on this information, I would try modifying the hero2_alt_ddr_init_seq sequence as follows: Replace "{SEQ_WRITE, 0x60004008, 0x48B7B6A3}," with "{SEQ_WRITE, 0x60004008, 0x48B836A3}," Replace "{SEQ_WRITE, 0x6000400C, 0x01FF3472}," with "{SEQ_WRITE, 0x6000400C, 0x01FF347A}," I am not sure if that will help, but if you are able to recompile the code, that may be something you could try...

marek786 commented 10 years ago

I tried but it does not work. H3S is about useless anymore. I use for parts. But I still H3B which is hard bricked (booting linux on it). Is there any way to transfer the system from the functional H3B on hard bricked H3B?

evilwombat commented 10 years ago

You could try to gpboot the H3Black, and then use an autoexec.ash file containing "firmfl prog d:\HD3.03-firmware.bin" to force the camera to reflash itself. Sometimes the camera has a bit of an identity crisis and refuses to accept new firmware (thinking the header is bad because the camera model won't match, or something silly like that), but this can be overcome with an autoexec.ash command to patch away the silliness. See http://goprouser.freeforums.org/post105043.html#p105043 for an ongoing discussion on this topic.

marek786 commented 10 years ago

Thank you for your help. I've found the problem. The camera froze because of damage to the sensor image. When I changed it so the camera works without a problem. Dňa 13.8.2014 13:52 používateľ "evilwombat" notifications@github.com napísal:

You could try to gpboot the H3Black, and then use an autoexec.ash file containing "firmfl prog d:\HD3.03-firmware.bin" to force the camera to reflash itself. Sometimes the camera has a bit of an identity crisis and refuses to accept new firmware (thinking the header is bad because the camera model won't match, or something silly like that), but this can be overcome with an autoexec.ash command to patch away the silliness. See http://goprouser.freeforums.org/post105043.html#p105043 for an ongoing discussion on this topic.

— Reply to this email directly or view it on GitHub https://github.com/evilwombat/gopro-usb-tools/issues/1#issuecomment-52038500 .

nicolarr commented 9 years ago

Hi,

evilwombat, can You help me with Hero3 Silver ? It is hard bricked.... I tried stuff that You recommended to marek786, but also without success. But i do have also a working H3 Silver. With Your method I "debricked" at least ten h2, but i do not have solution for h3s. How can a working one (h3s) help me with bricked one ? In details, if You will.... I would be very greatfull....

Or how much work, trouble is for You, to add support to gpboot ? I know, it`s a big ask, but i got to ask....

P.S. Sorry for my bad English

SwInGeR commented 9 years ago

Dear, evilwombat if you add support H3S ans H3S+ to your loader it will be great!

nikko20 commented 9 years ago

Hi

nikko20 commented 9 years ago

Hi friend Will you please explain how can a working h3s can save a bricked one,is this possible to reverse all? Is there any luck to have DDR timing sequence of h3s and Hal patch.

Thanks

evilwombat commented 9 years ago

I bought an h3s a while back, but I'm out of the country for another two weeks. I can look when I get back. On Jul 19, 2015 11:18 AM, "nikko20" notifications@github.com wrote:

Hi friend Will you please explain how can a working h3s can save a bricked one,is this possible to reverse all? Is there any luck to have DDR timing sequence of h3s and Hal patch.

Thanks

— Reply to this email directly or view it on GitHub https://github.com/evilwombat/gopro-usb-tools/issues/1#issuecomment-122638229 .

nikko20 commented 9 years ago

That's very nice of you,thank you

nikko20 commented 9 years ago

Hi i found some time to make a few photos of the problem on Hero 3 silver. image1. image2. image1 1. image2 1. after nothing,no reaction like dead with working display. when i reinstall the battery dead again

evilwombat commented 9 years ago

I'm sorry, did you say you had a H3 Silver, or a H3 PLUS Silver?

I have a H3 Plus Silver at home, but I have never owned a "standard" H3 Silver (without the "Plus"), so I am not sure what to do with H3 Silver models (instead of H3+ Silver, which are quite different).

It almost looks like you are booting Hero2 firmware on the H3 Silver. Though it may be working initially, I would recommend trying to run with the H3 Silver firmware, instead. I am not sure what the section structure of H3 Silver firmware looks like, but I imagine you can try to boot the H3 RTOS section on your camera in this way.

Sorry I don't have more info - I have never played with H3 "plain" Silver.

On Wed, Jul 29, 2015 at 7:48 PM, nikko20 notifications@github.com wrote:

Hi i found some time to make a few photos of the problem on Hero 3 silver. [image: image1] https://cloud.githubusercontent.com/assets/13392894/8963711/5b4e23cc-35d6-11e5-8b4a-06c1053e5c7d.JPG.

[image: image2] https://cloud.githubusercontent.com/assets/13392894/8963728/74c9a33a-35d6-11e5-98ec-b3fe87a8588b.JPG . [image: image1 1] https://cloud.githubusercontent.com/assets/13392894/8963745/846e9f48-35d6-11e5-8381-6c215c36678a.JPG . [image: image2 1] https://cloud.githubusercontent.com/assets/13392894/8963756/99fd4c4c-35d6-11e5-9d10-0174acf1fabd.JPG . after nothing,no reaction like dead with working display. when i reinstall the battery dead again

— Reply to this email directly or view it on GitHub https://github.com/evilwombat/gopro-usb-tools/issues/1#issuecomment-126015143 .

nikko20 commented 9 years ago

I have a Second one that works,is there any way to get a running Hal or else from it? Is this possible?

nikko20 commented 9 years ago

hi again will you tell me please any possible way to take image from a working HD3S with out mess up my working one? Regards

nikko20 commented 9 years ago

hi is it possible to load linux on h3s, or not, is zImage only for H3B? can i back up nand dump from my working h3s some help will be nice Thank you

nikko20 commented 9 years ago

hi friend is there any command or ash file that can make image on sd card,i found this ,is this possible?

d:> savebin d:\memdump.bin 0xC0000000

have a nice day

nikko20 commented 9 years ago

Progress made

nikko20 commented 9 years ago

____DONE DONE DONE____ Following pictures

nikko20 commented 9 years ago

Hero 3 silver solution found,am happy not for the working gopro, but i am for the success of doing this. long nights trying and trying different options.........

nikko20 commented 9 years ago

Hi friend here is the solution: -- If you don't know the WiFi password of your camera,this method will not work--

----First you have to download the correct firmware from - www.gopro.com -use your serial number of your camera and pass all to your sdcard,just use the ash file from my files(sdcard). From my files download run gpboot and load --section_00 file--,don't try to modify any of those files,wait the gpboot to finish and leave the camera connected on usb. 1.you will see the red light on the front of your camera with nothing on the display. 2.press cameras wifi button and started,blue light on. 3.on your phone go to the Gopro app and pair the phone and camera,you will see black screen preview. 4.final step just turn off the camera from the gopro app and wait. camera will start the update normally like nothing happens.

link for the files here: https://www.dropbox.com/sh/ynqih9dj5233gbo/AADiVI95vlxItkrrK4BbYbLEa?dl=0

martinebene commented 8 years ago

Hi nikko20, could you detail how to use the files that you provide and your method , do not understand how to use " gpboot " to load the file "section" . With all that and I get tested :

"Initializing Libusb Initializing DDR ................................... done Testing DDR ............. FAILED Mismatch at DDR offset C0000000 : 00000000 expected , got e9148800 DDR test failed : -1 "

thank you very much , I have a silver gp3 dead.

nikko20 commented 8 years ago

Hi I see you have DDR fail,this can be broken DDR or no good driver installation,try first with other pc and if is the same take it from there. Usually if you mix with drivers you can end with this error.

evilwombat commented 8 years ago

Or, it could be that I have the wrong DDR settings in my code :)

The tool was never meant for Hero3 Silver, so it's totally possible they're not quite compatible. On Mar 20, 2016 1:41 PM, "Nikko" notifications@github.com wrote:

Hi I see you have DDR fail,this can be broken DDR or no good driver installation,try first with other pc and if is the same take it from there. Usually if you mix with drivers you can end with this error.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/evilwombat/gopro-usb-tools/issues/1#issuecomment-199016724

martinebene commented 8 years ago

I 'm using the version of nikko20, should work in GP3 silver , but I need the step by step description of how to use it , try to do : gpboot.exe --rtos section00 , they are perhaps other scripts that I use .

martinebene commented 8 years ago

C:\Users\Martin\Desktop\GPH3>gpboot.exe --rtos section_00

evilwombat's gopro boot thingy v0.02 (alt ddr)

MAKE SURE YOU HAVE READ THE INSTRUCTIONS! The author makes absolutely NO GUARANTEES of the correctness of this program and takes absolutely NO RESPONSIBILITY OR LIABILITY for any consequences that arise from its use. This program could SEVERELY mess up your camera, totally destroy it, cause it to catch fire. It could also destroy your computer, burn down your house, etc. The author takes no responsibility for the consequences of using this program. Use it at your own risk! You have been warned.

Initializing libusb Could not set device configuration: -2. Continuing anyway. Initializing DDR................................... done Testing DDR....................... passed Okay, loading and booting RTOS image section_00 Loading v222-bld.bin to address c0000000 ... done Loading relocate.bin to address c7000000 ... done Loading v222-hal-reloc.bin to address c8000000 ... done Loading section_00 to address c9000000 ... done Patching in a jump to our relocator.. Okay, here goes nothing... Exec c0000000: 12 (ok)

and nothing hapens, any light...

nikko20 commented 8 years ago

Hi With this method you have to power up wifi and then turn off your camera from phone app.if you can not see the wifi blue light then you can not do any. Next method is to use serial communication with tx rx. Require some soldering on board. If you have ftdi rs232 USB and you can do this let me know and I navigate you. Regards

arjendj commented 8 years ago

Hi @nikko20

Thanks first of all for your descriptions. I get this trying to unbrick a Gopro hero 3 silver:

C:\Users\arjen.SNAKEWARE\Downloads\gopro3>gpboot.exe`

--rtos section00

evilwombat's gopro boot thingy v0.02 (alt dir)

MAKE SURE YOU HAVE READ THE INSTRUCTIONS! The author makes absolutely NO GUARANTEES of the correctness of this program and takes absolutely NO RESPONSIBILITY OR LIABILITY for any consequences that arise from its use. This program could SEVERELY mess up your camera, totally destroy it, cause it to catch fire. It could also destroy your computer, burn down your house, etc. The author takes no responsibility for the consequences of using this program. Use it at your own risk! You have been warned.

Initializing libusb Could not set device configuration: -2. Continuing anyway. Initializing DDR................................... done Testing DDR....................... passed Okay, loading and booting RTOS image section00 Loading v222-bld.bin to address c0000000 ... done Loading relocate.bin to address c7000000 ... done Loading v222-hal-reloc.bin to address c8000000 ... done Could not get size of section00 Could not load RTOS file section00 This should be section_3 from the v124 firmware, or section_9 from the v198 / v222 firmware, depending on what you are doing.

C:\Users\arjen.SNAKEWARE\Downloads\gopro3>

Can you help me with some pointers on how to overcome this?

nikko20 commented 8 years ago

Hi Can you turn on wifi? If not then is not possible.in my case this was the solution. Next step is opening the cam and connect the serial com tx rx of the cam and start the ad card from there with the correct command. Regards

evilwombat commented 8 years ago

"section_whatever" is the name of a section file to load. If you are trying to load something called "section00" (which is not a standard name known to me), then you need to have a section file corresponding to that name. On Mar 28, 2016 12:35 PM, "Nikko" notifications@github.com wrote:

Hi Can you turn on wifi? If not then is not possible.in my case this was the solution. Next step is opening the cam and connect the serial com tx rx of the cam and start the ad card from there with the correct command. Regards

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/evilwombat/gopro-usb-tools/issues/1#issuecomment-202548921

arjendj commented 8 years ago

I got is further by running it on another machine with compatibility set to windows 7 and running as admin. The section00 file is included in the build from nikko

nikko20 commented 8 years ago

Hi Yes ,if I remember well the file was section5 named 00 for me as it was easiest to find it(you can see the corresponding size of the file with sections ?) maybe with some luck on my side as I didn't see any users having luck with the wifi. Next cam I made work was with 232 serial, putty and given command,this was more easy way.

arjendj commented 8 years ago

Hi @nikko20 I now get:

Initializing libusb Could not set device configuration: -2. Continuing anyway. Initializing DDR................................... done Testing DDR....................... passed Okay, loading and booting RTOS image section_00 Loading v222-bld.bin to address c0000000 ... done Loading relocate.bin to address c7000000 ... done Loading v222-hal-reloc.bin to address c8000000 ... done Loading section_00 to address c9000000 ... done Patching in a jump to our relocate.. Okay, here goes nothing... Exec c0000000: 12 (ok)

The red on the back stays on an sometimes blinks for tenth of a second. The front leds and lcd are off. Is it just pressing the wifi button to activate wifi, just as with a normal functioning gopro?

nikko20 commented 8 years ago

Ps. You must know the pass for the wifi to connect

arjendj commented 8 years ago

@nikko20 I know the wifipassword :D. What does it mean when only the red led on the back is on? Do you have a guide for the rs232 process?

nikko20 commented 8 years ago

Is it on all the time or for a few seconds? I can send you the rx tx info

arjendj commented 8 years ago

All the time. That would be great :)

nikko20 commented 8 years ago

Do you have rs232tl? for serial com

nikko20 commented 8 years ago

Have a look here. https://m.youtube.com/watch?v=VW3fp0OOeyg

This is a good solution 100%