maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   building an image (https://talk.maemo.org/showthread.php?t=94226)

pmrb 2014-11-28 11:01

building an image
 
Hi,

How is it possible to modify a firmware image please?

For example, how can I open or unpack or mount the image
"DFL61_HARMATTAN_40.2012.21-3_PR_LEGACY_001-OEM1-958_ARM.bin" ?

And then replace some files, and in the end rebuild a new image for flashing?

TIA for any hints, Peter

coderus 2014-11-28 12:20

Re: building an image
 
no, please don't do it. everything you can do without flashing.

peterleinchen 2014-11-28 12:24

Re: building an image
 
Unpacking goes with old flasher 3.5 (N900), parameter -u or --unpack.
But getting it together not.

This might be possible with pali's open flasher 0xffff, but I am not sure now. Just go ahead.

--
BUT you know how to deal with AEGIS?

nokiabot 2014-11-28 16:23

Re: building an image
 
You mean a cfw :eek:
coderus was on of the kingpins !

thedead1440 2014-11-28 17:15

Re: building an image
 
Quote:

Originally Posted by nokiabot (Post 1449699)
You mean a cfw :eek:
coderus was on of the kingpins !

Therein lies the main difference between Symbian/Android and Harmattan. You don't need to jump thru hoops to change some system files by unpacking firmware then flashing a cfw.

pmrb 2014-11-28 19:07

Re: building an image
 
Quote:

Originally Posted by peterleinchen (Post 1449678)
This might be possible with pali's open flasher 0xffff, but I am not sure now. Just go ahead.

--
BUT you know how to deal with AEGIS?

No, it seems Aegis is something very complicated. It seems to be difficult to build a cfw for the n9, and I don't want to take the risk to brick it.
I just had a little hope, that there would be something as easy as "make" for building a cfw. (I'm used to OpenWrt.)

(When I bought the N9, I thought, that it would be possible to build a cfw from source ("make world"), just some files would be "binary blobs" from Nokia.)

Thanks for your help, Peter

hedayat 2014-11-29 07:14

Re: building an image
 
Once I had modified (not creating from scratch) harmattan firmware and built a new slightly modified kernel; and you can find the tools to unpack/re-pack firmware in this forum. However, as being said, it's usually better to not do it; unless you are required to.

But, building a firmware from source could have lots of issues that you should deal with yourself, as nobody has done it (at least, publicly!).

pmrb 2014-12-01 15:27

Re: building an image
 
Hi,

Probably the least risky way is flashing original firmware and then modifying individual files step by step. So I only need backups of modified files.

But it seems, that there are dozens of original firmwares and there is no more official download location? I have the firmware for product code 059J228. But can I use it for an N9 with another code?
Or should I buy only a model with same product code?

TIA for any hints, Peter

coderus 2014-12-01 15:49

Re: building an image
 
http://talk.maemo.org/showthread.php?t=82693

pmrb 2014-12-02 20:57

Re: building an image
 
Quote:

Originally Posted by pmrb (Post 1450099)
Probably the least risky way is flashing original firmware and then modifying individual files step by step.

There seems to be problem: I still rely on downloads.maemo.nokia.com to get the developer-mode. What happens, when this site disappears?

Or am I missing something?

Here in detail how I would like to prepare a new N9 (even some years in the future, when there is no more nokia.com):
- flash device with original firmware (I have flasher and the firmware)
- enable developer-mode (here it seems, that nokia.com is needed)
- copy packages and other files from my backups to device with ssh

(Perhaps I really need to switch to uniboot, but I would like to keep it as basic as possible...)

Ok, I've one idea: simulating downloads.maemo.nokia.com on a local server. But other (probably better) ideas are very welcome!

TIA for your efforts, Peter

pmrb 2014-12-02 21:40

Re: building an image
 
Quote:

Originally Posted by pmrb (Post 1450409)
There seems to be problem: I still rely on downloads.maemo.nokia.com to get the developer-mode. What happens, when this site disappears?

Or am I missing something?

Yes, of course, I was missing this option:

"Applications -> Installations -> Allow installations from non-Store sources"

Sorry about the noise, Peter

www.rzr.online.fr 2014-12-02 23:04

Re: building an image
 
Quote:

Originally Posted by pmrb (Post 1450099)
Hi,

Probably the least risky way is flashing original firmware and then modifying individual files step by step. So I only need backups of modified files.

But it seems, that there are dozens of original firmwares and there is no more official download location? I have the firmware for product code 059J228. But can I use it for an N9 with another code?
Or should I buy only a model with same product code?

TIA for any hints, Peter

Well legally speaking it would be nice to be able to make a pure floss image and make it available for hackers ....

Do you have the name of the file for 059J228 ? is this the code in SIM tray mine is 059K117 ...

pmrb 2014-12-02 23:49

Re: building an image
 
Quote:

Originally Posted by www.rzr.online.fr (Post 1450456)
Well legally speaking it would be nice to be able to make a pure floss image and make it available for hackers ....

Oh yes...


Quote:

Originally Posted by www.rzr.online.fr (Post 1450456)
Do you have the name of the file for 059J228 ? is this the code in SIM tray mine is 059K117 ...

Yes, on the SIM tray. I have 2 N9s (one for using, one for repairing...):
- 059J228 is DFL61_HARMATTAN_40.2012.21-3_PR_LEGACY_006-OEM1-958_ARM.bin
- 059M8W9 is DFL61_HARMATTAN_40.2012.21-3_PR_LEGACY_001-OEM1-958_ARM.bin

Greetings to Rennes, Peter

rainisto 2014-12-03 09:58

Re: building an image
 
Yes you cannot unpack, modify and repack firmware image as flasher checks that .bin is signed with nokia master key. (And that key is safely stored in some Nokia vault that nobody has access to).

So if you want to be able to update 'offline' or when official repository dies then procedure is to flash original firmware. Then enable developer mode, which can be a bit tricky if you dont have network or terminal access. But there are couple options:
- use serial cable to ttl serial pins that are located under sim to gain access to getty shell
- use mass-storage-mode to drop in couple debian packages for terminal, allow unknown sources, install terminal package. Use some dpkg exploit (like inception) to gain com.nokia.maemo privileges so you can install developer mode .deb and/or change repository url to your own custom one. And your ready to rock.

So don't worry if someday official repository dies, there are still multiple ways to flash and setup your favourity N9 device.

pmrb 2014-12-03 11:00

Re: building an image
 
Quote:

Originally Posted by rainisto (Post 1450501)
Use some dpkg exploit (like inception) to gain com.nokia.maemo privileges so you can install developer mode .deb and/or change repository url to your own custom one. And your ready to rock.

I did not try it, but shouldn't it be possible to install the original developer-mode.deb (and other original packages) without any exploit?
This is what I understand from the N9-user-guide...


Quote:

Originally Posted by rainisto (Post 1450501)
So don't worry if someday official repository dies, there are still multiple ways to flash and setup your favourity N9 device.

Ok, thanks. I'm just a bit worried, because there are so many dead links to nokia web-sites. I've already downloaded several GB to my hard-disk, just to be sure, to be able to set up a N9 in the future.

Peter

hedayat 2014-12-03 11:23

Re: building an image
 
Quote:

Originally Posted by rainisto (Post 1450501)
Yes you cannot unpack, modify and repack firmware image as flasher checks that .bin is signed with nokia master key. (And that key is safely stored in some Nokia vault that nobody has access to).

Sorry, bust as I said earlier, you can.

Update: using the tool available here: http://talk.maemo.org/showthread.php?t=82471

juiceme 2014-12-03 17:31

Re: building an image
 
Quote:

Originally Posted by hedayat (Post 1450515)
Sorry, bust as I said earlier, you can.

Update: using the tool available here: http://talk.maemo.org/showthread.php?t=82471

With sparsify you can of course create fiasco's but when you flash the binaries, you will note that the device defaults to Open Mode. There's no easy way to fool the flasher to revert the device into Closed Mode without Nokia-signed binaries.


Quote:

Originally Posted by rainisto (Post 1450501)
Yes you cannot unpack, modify and repack firmware image as flasher checks that .bin is signed with nokia master key. (And that key is safely stored in some Nokia vault that nobody has access to).

I'd go a bit farther even. I am fairly sure the original signing keys were destroyed with rest of the build infrastructure when the production line was decomissioned. A pity, though. It would not have harmed anyone now later, if some of the more closely guarded stuff would have leaked out...

hedayat 2014-12-03 17:41

Re: building an image
 
Yes, it goes into open mode. I just wanted to make it clear that it is possible to flash an unsigned firmware into phone. But you're right, it'll be in open mode.

rainisto 2014-12-05 12:13

Re: building an image
 
Quote:

Originally Posted by pmrb (Post 1450508)
I did not try it, but shouldn't it be possible to install the original developer-mode.deb (and other original packages) without any exploit?
This is what I understand from the N9-user-guide...

Peter

No, you are wrong, original developer-mode.deb needs to have active valid pgp signature on server side, so you cannot install it from commandline, or you can but if you install it with commandline, then its missing the developer-mode capabilities. Thats why system needs to be incepted before devel-mode can be installed from commandline.

peterleinchen 2014-12-05 12:54

Re: building an image
 
To have flashed an open-mode kernel in advance may also be helpful! ;)


All times are GMT. The time now is 15:58.

vBulletin® Version 3.8.8