Welcome to goprouser

You are currently viewing our boards as a guest, which gives you full access to view most discussions and access.. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements if any. Registration is fast, simple, and absolutely free, so please, join our community today! Any issues email [email protected]

How to reflash firmware onto a bricked Hero4 camera over USB

Discuss the GoPro Hero4 Silver Here

How to reflash firmware onto a bricked Hero4 camera over USB

Postby evilwombat » Thu May 19, 2016 7:39 pm

Let's start a Hero4 Black/Silver Debricking thread. It's about time! A few months ago, I quit my cushy and comfortable job in San Diego, moved to the Bay Area, and got a new and interesting job here. Some legal complexities with the new job have prevented me from posting this sooner, but now I am clear to do it (if I am careful).

For advanced firmware people who are good with computers, I made the following tool that can boot a hard-bricked Hero4 Black or Silver camera over USB. By "hard-bricked" I mean a camera that will not turn on at all, and shows absolutely no signs of life. But, if the camera is not turning on because of corrupted firmware (such as from an interrupted update), it may be possible to boot it up into a low-level USB command mode, and use this mode to send over a fresh set of firmware. If the camera is failing to turn on because of a hardware problem, the firmware tools will probably not help you. But, if it's a firmware problem, you might have some luck.

Only try this if you have a hard-bricked out-of-warranty Hero4 Black or Silver camera that you are about to otherwise throw in the garbage, and only if you are willing to accept all risk and all consequences of using this HIGHLY EXPERIMENTAL software. This method *will* void your warranty, so if you can otherwise get warranty from GoPro, by all means do that first! The method described here is only slightly tested, risky, and experimental, and the last thing we want is people trying to fix their cameras using this method, messing them up further, and THEN crying to GoPro for help.

You take full responsibility and liability for any and all consequences arising from the use of this HIGHLY ADVANCED AND EXPERIMENTAL SOFTWARE.

With that out of the way, here's the (rather unofficial) debricking guide.

You will need:
    * Your bricked Hero4 Black or Silver camera
    * A computer running Windows, Linux, or (experimental and often unreliable) Mac OS X
    * A USB cable
    * A blank microSD card of size 32GB or smaller
    * A microSD card reader
    * Some special software
    * Some luck

Part 1: Preparation
1. Download https://github.com/evilwombat/gopro-usb ... master.zip

2. Unzip the file somewhere on your computer

3. Insert the microSD card into the card reader, and plug card reader into your computer. Note that the card must be 32GB or smaller.
Advanced users: the card can be of any size, but must be formatted with the FAT (FAT32) filesystem. Larger cards tend to be formatted with exFAT, which will not work here. So, as long as your card is FAT-formatted, the size doesn't really matter.

4. Inside the 'gopro-usb-tools-master' directory, look for a file called h4-recovery.tgz. Copy this file onto the root directory of the card.

5. Cleanly eject the card from your computer, and insert it into the camera.

Part 2: USB Command Mode
1. Remove the battery from your camera, and unplug USB from camera (in case you had it plugged in). Leave the card in the camera.

2. Plug one end of the USB cable into your PC.
Note: try to use a USB 2.0 port if you can. The camera's USB mode is a bit flaky with USB 3.0, especially on my Thinkpad (and on Mac OS in general). This is a behavior of the camera, and I have no control over this. The USB 3.0 ports tend to be blue, so avoid those if you can, especially on Linux / Windows. If you are on a Mac, try to plug the cable directly into the Mac (avoiding hubs, etc). But, your mileage may vary.

2. Press and HOLD the Shutter button on the camera.

3. While still holding the Shutter button, plug the other end of the USB cable into the camera.

4. Let go of the Shutter button.

Part 3: Drivers
At this point, Windows might ask you to install a driver. Mac OS and Linux users do not need drivers and can skip this part.

Windows users have two options for installing drivers.
Option 1: Install my pre-made driver from gopro-usb-tools-master/UsbDrivers/. Try this first if it works for you - this is the easiest.

Option 2: Use Zadig to make a driver.
    1. Download Zadig from http://zadig.akeo.ie/ and install it
    2. Run Zadig. You should seen an unknown USB device with Vendor ID 4255 and Product ID 0009
    3. If Windows is still asking your for drivers, click 'Cancel' for now.
    4. Use Zadig to install a libusbK driver for your camera (see screenshot). I would have expected you to need the plain "libusb" driver, but for some reason that doesn't work for me, but "libusbK" works, at least on my Virtual Machine running Windows XP. /shrug. I guess.... if the recovery tool doesn't see the camera, try the other driver? I am mainly on Linux, so this stuff is a bit foreign to me.

    Note: You don't have to actually type in the device title "Hero4 Camera (USB Command Mode)" if you don't want to. The title doesn't do anything, but it's there for your own information.

Part 4: Running the debricker tool
1. Start the tool!

    Windows users: Find and double-click on "h4_recover_win.bat". Things should start loading.

    Mac OS users: Open a terminal, 'cd' into the 'gopro-usb-tools-master' directory, and run "./h4-recover_mac.sh". You will be asked for your password - this is needed to gain low-level access to USB devices. Note that Mac OS often has trouble with the camera's recovery mode. You will likely see issues where the camera cannot be found, and may need to try different USB ports (or a PC). Sorry guys.

    Linux users: Open a terminal, cd into 'gopro-usb-tools-master', and run 'make' to build the tool. You might need to 'sudo apt-get install libusb-1.0.0-dev' to compile it. Once the tool is build, run "./h4_recover_linux.sh". You too will need to type your password, for raw access to USB devices, though some creative udev rules can get around this.
In all cases, the scripts are basically just going to run "gpboot --h4-recovery".

2. You will hopefully see the loader start to load things onto the camera. After a few seconds, you should see a wombat on the camera's front screen. Things might take a while to load, especially on Windows. Be patient. If the percentages are going up, then it's loading.

Part 5: Actually flashing the firmware
1. A few seconds after the loader is done, you should start seeing some messages on the camera screen. This is the recovery kernel booting up.

2. A few seconds after that, you should see some messages that the camera is accessing the memory card. Remember that 'h4-recovery.tgz' file that you dropped on the card? This is being read now. If the card is accessible and the recovery file looks valid, the camera will give you a five-second countdown before erasing all firmware inside the camera (if any) and trying to rewrite it. If you are nervous, this is your last chance to turn back.
Note: If there is a problem with the card or with the recovery file, the camera will prompt you to check the card and try again. If this happens, you can pull out the card (carefully), make sure it's formatted properly and the recovery file is on it, and put it back in. You don't need to repeat the whole loading process again for this.

3. Hopefully, the camera should start flashing firmware. You should see some section names scrolling by. The whole flashing process should take less than five minutes, but some parts are bigger than others. Be patient. When the flashing is done, the camera will tell you to reboot it.

Part 6: First boot procedure
1. After flashing is done, unplug USB from the camera. Leave the card in the camera.

2. Insert a battery into the camera.

3. Wait 10 seconds (do not skip this step!)

4. Press the Power button on the camera. With any luck, it should power up, and perform a quick update-like procedure. This is normal. It may reboot one or two times. After this is done, the camera should be ready for use.

GOOD LUCK! And remember, you are solely responsible for the consequences of what happens, and these tools and instructions come with absolutely no warranty. Use at your own risk!

Please let me know how well this works. It has worked for me on a few H4 Black / Silver cameras, but your mileage may vary, especially since cameras can die for multiple reasons, with firmware being only one of them. I also have a similar tool for H3+Black, but I only have one camera to play with, and one or two people have reported some issues with that tool. So, I'm holding off on it for now. (EDIT: H3+B version: post122675.html#p122675 )


So, how does this actually work?
Basically, the USB loader (gpboot) loads a Linux kernel and a small initrd onto the camera, and boots them up. A script in the initrd mounts the memory card, and unpacks the recovery file off the card. The recovery file actually contains GoPro's v3.00 firmware, along with a script for flashing it, and a few other things. This script then erases (most of) the NAND and writes the different firmware sections where they need to go. The whole firmware is something like 27MB, so we use the memory card to save ourselves the loading time, and only load the bare minimum over USB.
Last edited by evilwombat on Mon Jul 11, 2016 8:06 pm, edited 1 time in total.
Posts: 382
Joined: Sun Oct 21, 2012 8:55 pm
Location: United States

Re: How to reflash firmware onto a bricked Hero4 camera over

Postby suryaprihadi » Fri May 20, 2016 12:43 pm

Thanks for sharing.....as always, you are Da Man !
I am a Forum Sponsor not because I sell stuff.
I owe my knowledge to this forum and I would like to do some payback.
Forum Sponsor
Forum Sponsor
Posts: 5187
Joined: Fri May 28, 2010 3:52 am

Re: How to reflash firmware onto a bricked Hero4 camera over

Postby evilwombat » Fri May 20, 2016 12:47 pm

Thanks :)
I really hope this can actually help someone. It's worked for me on a few cameras, but still...
Posts: 382
Joined: Sun Oct 21, 2012 8:55 pm
Location: United States


Postby eltesco » Mon Jul 11, 2016 12:29 pm

Followed your steps with a hero 4 Silver which was dead as a doornail - came to life and works perfect!

Thank you!!!
Posts: 10
Joined: Sat Nov 15, 2014 8:09 am

Re: How to reflash firmware onto a bricked Hero4 camera over

Postby Aw9d » Mon Jul 11, 2016 2:50 pm

I got a go pro 3+ black edition and I'd like to try your recovery tool for it. Could you please link a copy? I got nothing to loose with this go pro.
Posts: 2
Joined: Mon Jul 11, 2016 2:46 pm

Re: How to reflash firmware onto a bricked Hero4 camera over

Postby evilwombat » Mon Jul 11, 2016 2:59 pm

I threw together a similar guide for Hero3+ Black. In testing with some people this was a bit less reliable than my own tests with Hero4. But, hopefully it will still work for someone.
See here: post122675.html#p122675

The H3+B was being a bit more of a funky beast, so I didn't have official instructions for it. But, the recovery tool in the above post should actually already have H3+B support. The procedure is quite similar - you just need to use h3pb-recovery.tgz, and run gpboot --h3pb-recovery instead of --h4-recovery. If not using my premade driver, the procedure should be similar too, but you will need to use USB ID 4255:0003 instead of 4255:0009.

Some people have had success with that stuff - I'd be curious to see what happens.

As usual, no warranty, no liability, etc.
Posts: 382
Joined: Sun Oct 21, 2012 8:55 pm
Location: United States

Re: How to reflash firmware onto a bricked Hero4 camera over

Postby eltesco » Fri Aug 05, 2016 8:39 am

Hello evil Wombat

Do you think this is a fix for the common freezing issue which so often effects these cameras?
Posts: 10
Joined: Sat Nov 15, 2014 8:09 am

Re: How to reflash firmware onto a bricked Hero4 camera over

Postby evilwombat » Fri Aug 05, 2016 9:00 am

Unlikely. My tools are mainly for reflashing cameras that don't have valid firmware. If your camera turns on, that means the firmware is alive, and I'm afraid cannot help here.

For me, I haven't experienced freezing. The only time I remember the camera freezing was when I using a crappy memory card.
Posts: 382
Joined: Sun Oct 21, 2012 8:55 pm
Location: United States

Re: How to reflash firmware onto a bricked Hero4 camera over

Postby Davidfield » Thu Aug 25, 2016 10:54 am

I have updated both my hero4 blacks' firmware to v4 but they will now lo longer work with my Removu P1 And R1+. Do you know if there any way to return the firmware to its previous version while Removu work on their own update?
Posts: 2
Joined: Thu Aug 25, 2016 10:49 am

Re: How to reflash firmware onto a bricked Hero4 camera over

Postby evilwombat » Thu Aug 25, 2016 10:56 am

You should be able to just install the previous firmware. Download the v3.00 update.zip, unzip it to your card, and put the card in.

I haven't tried it, but I would think it works...
Posts: 382
Joined: Sun Oct 21, 2012 8:55 pm
Location: United States


Return to GoPro Hero4 Silver

Who is online

Users browsing this forum: No registered users and 0 guests