AOS2 utility

Special Developer Edition Firmwares and Hacking on Archos 5 IT, 5/7 IMT, 605/705, with Android, ├àngstr├Âm and other Linux
CheBuzz
Archos Guru
Archos Guru
Posts: 274
Joined: Fri Aug 15, 2008 12:14 pm

AOS2 utility

Post by CheBuzz »

archutil download: http://download.openpma.org/archutil/archutil.tbz

Well, since everything has been active on the Archos hacking front, I think I will take this opportunity to release archutil. I have been working on this utility for a while and I consider it to be mostly bug free. Please leave me a note if you find anything that doesn't work as advertised.

This will allow you to decrypt nearly all AOS2 files. There is no documentation besides the code and the built-in help. If you have any questions, I'd be happy to answer them. It also verifies different signatures and will tell you what key was used to verify it. Code is also included to sign files with a built-in private key, or with a private key passed on the command-line. And finally, functionality is included to sign a firmware update file with your own private key.

Most of this has been initially tested. None of it has been thoroughly tested. Again, feel free to let me know of any bugs that you find.

And let me just get the first question out of the way: it will not work for A5IT files. It probably would if somebody could find its keys.

Now let me get the second question out of the way: this is not useful for hacking your Archos unless you know their private key. And let's not waste time talking about brute-forcing the key, shall we? It's just not feasible at this time.
Last edited by CheBuzz on Wed Oct 21, 2009 6:35 am, edited 1 time in total.
Deejay300
Archos User
Archos User
Posts: 115
Joined: Wed Dec 10, 2008 7:22 pm
Location: Derby, UK

Re: AOS2 utility

Post by Deejay300 »

How is this utility used?
CheBuzz
Archos Guru
Archos Guru
Posts: 274
Joined: Fri Aug 15, 2008 12:14 pm

Re: AOS2 utility

Post by CheBuzz »

Extract the contents of the archive into a folder, go to the folder on the commandline and type "make".
Deejay300
Archos User
Archos User
Posts: 115
Joined: Wed Dec 10, 2008 7:22 pm
Location: Derby, UK

Re: AOS2 utility

Post by Deejay300 »

Do I need to put an aos file in there? And what do I need to do to decrypt a .aos file?
grond
Archos Guru
Archos Guru
Posts: 627
Joined: Thu Nov 23, 2006 10:37 pm
Location: Berlin
Contact:

Re: AOS2 utility

Post by grond »

Deejay300 wrote:Do I need to put an aos file in there? And what do I need to do to decrypt a .aos file?
Just call the program and it will tell you.
openAOS
Deejay300
Archos User
Archos User
Posts: 115
Joined: Wed Dec 10, 2008 7:22 pm
Location: Derby, UK

Re: AOS2 utility

Post by Deejay300 »

It didnt work, it says it is not recognised as a internal or external command, operable program or a batch file. Could you post an example?
soviet123
Archos Expert
Archos Expert
Posts: 209
Joined: Sun Sep 13, 2009 2:53 am
Location: Parmi les Quebecois

Re: AOS2 utility

Post by soviet123 »

Deejay300 wrote:It didnt work, it says it is not recognised as a internal or external command, operable program or a batch file. Could you post an example?
...are you running MassiveSoft Doors?
A7-320 v1.7.02
grond
Archos Guru
Archos Guru
Posts: 627
Joined: Thu Nov 23, 2006 10:37 pm
Location: Berlin
Contact:

Re: AOS2 utility

Post by grond »

Deejay300 wrote:It didnt work, it says it is not recognised as a internal or external command, operable program or a batch file. Could you post an example?
Am I right in guessing that you are using a Windows computer? Then this is not for you.
openAOS
Deejay300
Archos User
Archos User
Posts: 115
Joined: Wed Dec 10, 2008 7:22 pm
Location: Derby, UK

Re: AOS2 utility

Post by Deejay300 »

Ok then :(
archilles
Archos User
Archos User
Posts: 64
Joined: Thu Feb 12, 2009 2:01 pm

Re: AOS2 utility

Post by archilles »

seems to work well chebuzz. easier than my method and you have signing stuff. have you tested that the signing stuff works?
CheBuzz
Archos Guru
Archos Guru
Posts: 274
Joined: Fri Aug 15, 2008 12:14 pm

Re: AOS2 utility

Post by CheBuzz »

CheBuzz wrote:Most of this has been initially tested. None of it has been thoroughly tested. Again, feel free to let me know of any bugs that you find.
:)
Omega Frost
Archos Novice
Archos Novice
Posts: 20
Joined: Fri Oct 09, 2009 10:36 am

Re: AOS2 utility

Post by Omega Frost »

grond wrote:
Deejay300 wrote:It didnt work, it says it is not recognised as a internal or external command, operable program or a batch file. Could you post an example?
Am I right in guessing that you are using a Windows computer? Then this is not for you.
Image

http://www.mediafire.com/download.php?omzlznizfnj

Tested with FW 2.1.04 Flash AOS, each file compared with the Linux app generated ones.
May be unstable, use at your own risk.

It will be a pleasure for me to keep porting the app to Win32 as long as updates came out, with CheBuzz permission of course :)
Last edited by Omega Frost on Sat Oct 17, 2009 12:24 pm, edited 1 time in total.
soviet123
Archos Expert
Archos Expert
Posts: 209
Joined: Sun Sep 13, 2009 2:53 am
Location: Parmi les Quebecois

Re: AOS2 utility

Post by soviet123 »

Guys...? I don't want to scare anyone but on Ubuntu 9.04 it gave me this:

Code: Select all

rm -f *.o archutil 
gcc  -g -o  md5.o -c md5.c
gcc  -g -o  utility.o -c utility.c
gcc  -g -o  arch_crypto.o -c arch_crypto.c
In file included from arch_crypto.c:12:
arch_crypto.h:18:25: error: openssl/aes.h: No such file or directory
arch_crypto.h:19:24: error: openssl/bn.h: No such file or directory
arch_crypto.c: In function ÔÇÿsign_md5ÔÇÖ:
arch_crypto.c:117: error: ÔÇÿBIGNUMÔÇÖ undeclared (first use in this function)
arch_crypto.c:117: error: (Each undeclared identifier is reported only once
arch_crypto.c:117: error: for each function it appears in.)
arch_crypto.c:117: error: expected ÔÇÿ;ÔÇÖ before ÔÇÿbn_resultÔÇÖ
arch_crypto.c:117: error: expected ÔÇÿ;ÔÇÖ before ÔÇÿbn_md5ÔÇÖ
arch_crypto.c:117: error: expected ÔÇÿ;ÔÇÖ before ÔÇÿbn_modÔÇÖ
arch_crypto.c:117: error: expected ÔÇÿ;ÔÇÖ before ÔÇÿbn_expÔÇÖ
arch_crypto.c:117: error: ÔÇÿBN_CTXÔÇÖ undeclared (first use in this function)
arch_crypto.c:117: error: ÔÇÿctxÔÇÖ undeclared (first use in this function)
arch_crypto.c:118: error: ÔÇÿbn_resultÔÇÖ undeclared (first use in this function)
arch_crypto.c:118: error: ÔÇÿbn_md5ÔÇÖ undeclared (first use in this function)
arch_crypto.c:118: error: ÔÇÿbn_modÔÇÖ undeclared (first use in this function)
arch_crypto.c:118: error: ÔÇÿbn_expÔÇÖ undeclared (first use in this function)
arch_crypto.c: In function ÔÇÿrsa_decryptÔÇÖ:
arch_crypto.c:141: error: ÔÇÿBIGNUMÔÇÖ undeclared (first use in this function)
arch_crypto.c:141: error: expected ÔÇÿ;ÔÇÖ before ÔÇÿbn_resultÔÇÖ
arch_crypto.c:141: error: expected ÔÇÿ;ÔÇÖ before ÔÇÿbn_sigÔÇÖ
arch_crypto.c:141: error: expected ÔÇÿ;ÔÇÖ before ÔÇÿbn_modÔÇÖ
arch_crypto.c:142: error: expected ÔÇÿ;ÔÇÖ before ÔÇÿbn_expÔÇÖ
arch_crypto.c:142: error: ÔÇÿBN_CTXÔÇÖ undeclared (first use in this function)
arch_crypto.c:142: error: ÔÇÿctxÔÇÖ undeclared (first use in this function)
arch_crypto.c:144: error: ÔÇÿbn_resultÔÇÖ undeclared (first use in this function)
arch_crypto.c:144: error: ÔÇÿbn_sigÔÇÖ undeclared (first use in this function)
arch_crypto.c:144: error: ÔÇÿbn_modÔÇÖ undeclared (first use in this function)
arch_crypto.c:144: error: ÔÇÿbn_expÔÇÖ undeclared (first use in this function)
make: *** [arch_crypto.o] Error 1
Please help!
A7-320 v1.7.02
Omega Frost
Archos Novice
Archos Novice
Posts: 20
Joined: Fri Oct 09, 2009 10:36 am

Re: AOS2 utility

Post by Omega Frost »

i had the same problem install libssl-dev via apt-get and it should work
CheBuzz
Archos Guru
Archos Guru
Posts: 274
Joined: Fri Aug 15, 2008 12:14 pm

Re: AOS2 utility

Post by CheBuzz »

Of course it's fine by me. Just make sure a copy of the GPL gets included.

And yes, you were missing ssl headers. I hope to take out the ssl dependency when I get some time.
Analias
Archos User
Archos User
Posts: 52
Joined: Sun Jan 11, 2009 9:48 pm

Re: AOS2 utility

Post by Analias »

soviet123 wrote:Guys...? I don't want to scare anyone but on Ubuntu 9.04 it gave me this:

Code: Select all

gcc  -g -o  arch_crypto.o -c arch_crypto.c
In file included from arch_crypto.c:12:
arch_crypto.h:18:25: error: openssl/aes.h: No such file or directory
arch_crypto.h:19:24: error: openssl/bn.h: No such file or directory
Please help!
Soviet123, I'm running Ubuntu 9.04 also. I simply did a

Code: Select all

sudo apt-get install openssl openssl-doc libssl-dev
and recompiled. If you don't want the rest of openssl, installing just libssl-dev should be enough.

-Analias
strazzere
Archos User
Archos User
Posts: 141
Joined: Fri Oct 02, 2009 7:06 pm
Location: Boston, Ma
Contact:

Re: AOS2 utility

Post by strazzere »

CheBuzz wrote:Most of this has been initially tested. None of it has been thoroughly tested. Again, feel free to let me know of any bugs that you find.

And let me just get the first question out of the way: it will not work for A5IT files. It probably would if somebody could find it's keys.

Now let me get the second question out of the way: this is not useful for hacking your Archos unless you know their private key. And let's not waste time talking about brute-forcing the key, shall we? It's just not feasible at this time.
I could be completely wrong, which I probably am too. Though I do have a question regarding the keys.

Could the default MPK key not be used?
- Tim Strazzere
EiNSTeiN_
Archos User
Archos User
Posts: 50
Joined: Sun Oct 11, 2009 10:53 pm

Re: AOS2 utility

Post by EiNSTeiN_ »

I did not confirm this but my feeling is that the default key is not a copy of the key that is in flash memory...
edembowski
Archos User
Archos User
Posts: 98
Joined: Mon Oct 26, 2009 8:11 pm

Re: AOS2 utility

Post by edembowski »

CheBuzz wrote:...
And let me just get the first question out of the way: it will not work for A5IT files. It probably would if somebody could find its keys.
...
It does seem to do a fair job of unpacking the file for the A5IT I just downloaded, although with some errors:

Code: Select all

A subdirectory or file aos\COPY\ already exists.
COPY size:480160 filename:upselling/upselling_dvrtraveladapter.swf
A subdirectory or file aos\COPY already exists.
A subdirectory or file aos\COPY\ already exists.
COPY size:3896464 filename:upselling/upselling_gps.swf
A subdirectory or file aos\COPY already exists.
A subdirectory or file aos\COPY\ already exists.
COPY size:580592 filename:upselling/upselling_helmetcam.swf
A subdirectory or file aos\COPY already exists.
A subdirectory or file aos\COPY\ already exists.
COPY size:380576 filename:upselling/upselling_remotefm.swf
A subdirectory or file aos\COPY already exists.
A subdirectory or file aos\COPY\ already exists.
COPY size:387824 filename:upselling/upselling_dvbtstick.swf
A subdirectory or file aos\COPY already exists.
A subdirectory or file aos\COPY\ already exists.
DLET size:272 filename:System/clouds.AAW
DLET size:272 filename:System/clouds.avi
DLET size:272 filename:System/New waterfall.avi
DLET size:272 filename:System/New waterfall.AAW
DLET size:272 filename:System/waterfall.avi
DLET size:272 filename:System/waterfall.AAW
DLET size:272 filename:Widgets/7932_1.4.zip
DLET size:272 filename:Widgets/8412_1.0.zip
COPY size:294112 filename:Widgets/8412_1.1.zip
A subdirectory or file aos\COPY already exists.
A subdirectory or file aos\COPY\ already exists.
I need to take some time & look at the source to see what's happening, but I'd probably want to rename the conflicting items just to see what's going on there. Although it may not be of direct use to hack the A5IT by putting new firmware on, it is of great value to see more detail about what's going on there.

Thanks much.

- Ed
BamBam
Archos Novice
Archos Novice
Posts: 8
Joined: Wed Nov 04, 2009 3:20 pm

Re: AOS2 utility

Post by BamBam »

1. Great work on the AOS2 Utility - fantastic.
2. Anyone got the A705 Keys ? ( At least the AES )

I'd like to extract rootfs for 1.7.13 and place it on my drive if it's possible ( My machine is 2.1.04 ).
Would that at least allow GFT - even though to install moldy cheese we would need to work around the flash lock ?

BamBam.
Post Reply

Return to “Open Development”