How to extract firmware from Ambarella 0803?

camera800

New Member
Joined
Jun 22, 2014
Messages
25
Reaction score
15
Country
Spain
Dash Cam
0803
Hi, I know that there are all the firmwares in this forum, just out of curiosity I'd like to know how to extract the firmware from my dashcam. Is the same way in dashcam Ambarella GS1000?. Thanks.

This is copy paste from http://dashcamtalk.com/gs1000/#Firmware_Backup

Firmware Backup

Before updating your firmware, it is highly recommended to backup your existing firmware. This can be easily done using the following method.
  1. Download the Backup autoexec.ash file. This is a simple text file with the following contents (firmfl gen 5 bst bld pri rom dsp d:\backup.bin). This file has the necessary commands to extract the existing firmware from the dash cam.
  2. Make sure the camera battery is fully charged
  3. Format the micro SD-card (via the dash cam or your computer).
  4. Copy the autoexec.ash file to your formatted micro SD-card. DO NOT copy the autoexec.ash file to the DVR’s internal memory, only to the micro SD-CARD!
  5. Insert the micro SD-card with the autoexec.ash file in the dashcam and turn it on. The process to backup the firmware takes about 10 seconds. However, we recommend that you wait 1 to 2 MINUTES.
  6. The Dash Cam will turn itself off. Remove the memory card.
  7. Insert the micro SD-card into the computer.
  8. Copy the firmware stored as BACKUP.BIN
  9. Rename the resulting BACKUP.BIN in accordance with the number of your firmware. For example, v4.35.210512A.bin
 
Last edited:
If the device supports autoexec scripts than it is the same way as you mentioned. If you try it please let me know if it worked,
 
Update: The autoexec wont create a valid Firmware binary... A7 has another Partition order and one extra Partition (HAL). Someone would Need to modify the autoexec and test if it works.
If someone is willing to test this, let me know.
Would be very easy to test it if soemone solders a Serial port converter onto his 0803s pcb.
 
I'll prove when I get a microSD .
 
I´m trying to understand the autoexec.ash to build one that works on 0803.

rm a:autoexec.ash. QUESTIONS ->
- rm is a LINUX command like delete in DOS, right? a: is the internal unit or the microSD? Why to delete autoexec.ash?

firmfl gen 5 bst bld pri rom dsp c:/backup.bin QUESTIONS ->
- I think firmfl is a command to extract o flash whith gen to generate and prog to flash (I´ve seen in http://dashcamtalk.com/forum/threads/firmware-doesnt-update.29/)
- 5 is the number of partition, but how do I know the number of partition that I want to extract?
- bst, bld, pri, dsp are types of partition, but I think that the 0803 has these ones and others like HAL and RFS (I've seen in the post from Tobi@s http://dashcamtalk.com/forum/threads/r-d-a7-r-d-thread.5119/).
- rom. I don`t know if this reffers to another type of partition and if is applicable to the 0803.
- c:/backup.bin. Ok, backup.bin is the name of the file that we want to be named, but the unit c: is the microSD?

rm d:/autoexec.ash QUESTIONS ->
- what partition or unit is d:? Why to delete autoexec.ash?

The final result of a file autoexec.ash whould be something simmilar to this? ->

rm ?:/autoexec.ash
firmfl ? bst bld pri dsp hal rfs c:/backup.bin
rm ?:/autoexec.ash




Sorry, These are a lot of questions. ;)

EDIT: Others options can be added to firmfl ->
valid targets for firmfl are:
prog
prog_only
prepro
postpro
gen


from (http://pixeldoc.kicks-ass.net/wiki/doku.php?id=hardware:goprohdhero)
 
Last edited:
those letters (a: d: are the drives' letters)
a: probably internal Card (not sure)
d: is external memory card
z: is romfs section (read-only)

execution order of autoexec.ash is from a: to z:. The first found autoexec.ash is going to be executed. rm a:/autoexec.ash does not make sense since d: is executed after a: :D
firmfl <num> <partitions ...> <save-file>
<num> is the number of partitions -> 6
<partitions> = all the partitions you want to have extracted: BST BLD HAL PRI ROM DSP
<save-file> = save-file :D d:\backup.bin

prog and prog_only both initialize flashing I guess
prepro checks if the fw is valid
postpro does the check after programming
gen generates the Firmware for backup purposes

A working autoexec.ash should look soemthing like this:
Code:
firmfl gen 6 bst bld hal pri rom dsp d:\backup.bin
rm d:\autoexec.ash

It's important to use unix linebreaks (LF)
 
Last edited:
Which chipset does the G90 have? A2 or A7?
 
A7la30 (d?)

I've just tried the firmware in the a7tool but it is erroring, I wonder if maybe it has extracted in the wrong format maybe for the tool?
 
I've just tried the firmware in the a7tool but it is erroring, I wonder if maybe it has extracted in the wrong format maybe for the tool?
Thats why I asked :P
Lets move to the A7Tool thread. Will answer there.
 
It's important to use unix linebreaks (LF)

I didn`t know. Good advice. Thanks. Now I just to see the differences in Windows and UNIX in http://www.qfs.de/qftest/manual/en/tech_linebreaks.html

The difference in the treatment of line breaks between Unix and Windows is a well-known problem. While Unix uses a single LineFeed character ('\n', hex 0x0A) as line separator, Windows uses the combination CarriageReturn/LineFeed ('\r\n', hex 0x0D0A). Java automatically converts text as needed which generally works well.

Is possible to edit the file autoexec.ash in Windows whitout corrupt it?
 
If you use Notepad++ you can easily convert from Windows to Unix style via Edit menu - EOL Conversion - UNIX and then save :)
 
I build the file autoexec.ash with the lines:
firmfl gen 6 bst bld hal pri rfs dsp d:/backup.bin
rm d:/autoexec.ash

I used Notepad++ and saved it as unix script file (.sh) and then I renamed with the .ash extension.

It not works. Maybe d: isn`t the external card or the camera doesn't recognize the autoexec.ash.
 
If you just add a line of text into the autoexec.ash saying the following:
Code:
drives > drives.txt
You should get a text file called drives.txt with all the volumes it can see.
 
Thanks. I Added the line "drives > drives.txt". The result is a file named drives.txt with this
4 drives present in system
drive 'A' - NFTL Media
drive 'D' - SD/MMC
drive 'E' - SD/MMC 2
drive 'Z' - ROMFS
 
Great! Now you just need to replace d: with e:
Good to know that 0803 supports autoexec.ash as well! (0801 didn't)
:D
 
This time, whitout changes, I don´t know the reason, I have a file named backup.bin with 6.121 kb. I think this is small. I'll try again.

firmfl gen 6 bst bld hal pri rfs dsp d:/backup.bin
rm d:/autoexec.ash
drives > drives.txt
 
Let it run for a few minutes to make sure it has enough time to dump all the sections.
 
Ok, I think this is the reason ;). I'll wait 5 minutes.
 
Back
Top