PDA

View Full Version : Nokia 770 "root-enabled" image.


KreAture
01-08-2006, 03:51 PM
With the new (a tad old?) image release from Nokia I decided someone had to do this, so why not me. I had searched all over and not found a patched image, just loads of docs on how to do it. So, now others don't have to follow that tedious list, just flash this image.

This image is a full image, like the original "Nokia_770_SE2005_3_2005_51-13.bin" from Nokia.
What I have done is change the gainroot script so it ignores the R&D flag completely and just does as it's told.

In addition I added the /var/lib/install/usr/bin folder to the path in both /etc/profile and /root/.profile to make it more convenient.

I have tested this image on my own device only, and it does flash with both the Linux flasher and the Nokia 770 Software Update Wizard.

Image can be downloaded at:
Removed! See later post for downloading a patch instead.
Filesize is 62,016,973 bytes.

Enjoy, and I hope you find this usefull.

AaronL
01-08-2006, 05:13 PM
This would have been done in the past except for the bit concerning Nokia's license agreement, which expressly doesn't allow redistribution of their firmware. So, you are taking a risk by posting this firmware.

Aaron

KreAture
01-08-2006, 06:44 PM
Hmm. Thanks for noting that.
How do you think they would look on a set of scripts and two small utilitys rewritten a bit, but essentially the same as posted in howtos on maemo.org ?

I refined them a bit and think the average user with a computer running Linux and having the necessary kernel modules would be able to create a patched image in about 5-10 minutes.

Alternatively, a diff could be made? Patch to the image instead of a full image?

That would ofcource lock all those using only Windows out of the fun. This would be really sad as the ability to gain root is essential for some software to be installed.

On a sidenote, I am not trying to hide who I am at all.
If Nokia or anyone else has a strong objection I can easily remove the image from the server.

AaronL
01-08-2006, 07:26 PM
How do you think they would look on a set of scripts and two small utilities rewritten a bit, but essentially the same as posted in howtos on maemo.org?
I don't see any problem with doing that.

Alternatively, a diff could be made? Patch to the image instead of a full image? That would of course lock all those using only Windows out of the fun. This would be really sad as the ability to gain root is essential for some software to be installed.
The patch option is definitely viable. Take a look at the "Quick alternative" section at http://maemo.org/maemowiki/HowDoiBecomeRoot. The only issue with the patch is it will be specific to a particular version of the firmware. I think the patch mentioned on this Web page is for an older firmware, and if someone applies it to the latest firmware, I don't think this "patched" firmware will work. Using a patch doesn't lock Windows users "out of the fun". For instance, Windows users can install cygwin and get the patch utility that way.

Aaron

AaronL
01-08-2006, 07:34 PM
I should add that there is good reason to require that users do something out of the ordinary to get root as opposed to simply downloading and flashing a new firmware. If users don't know what they are doing, they could screw things up on their device if they have root access. It seems that there is a wide range of 770 users based on the forum posts that I've read. This includes Windows and Mac users, some of which have no Unix/Linux experience. Making it easy for this class of users to get root access could be problematic. And, the class of users that "need" root access should already know what to do. There are a limited number of situations that absolutely require root access, and those situations typically come with the prerequisite that the user already have some Unix/Linux experience.

Aaron

bigboote
01-08-2006, 08:16 PM
If users don't know what they are doing, they could screw things up on their device if they have root access. It seems that there is a wide range of 770 users based on the forum posts that I've read. This includes Windows and Mac users, some of which have no Unix/Linux experience. Making it easy for this class of users to get root access could be problematic. And, the class of users that "need" root access should already know what to do. There are a limited number of situations that absolutely require root access, and those situations typically come with the prerequisite that the user already have some Unix/Linux experience.
Aaron

No offence, but that attitude is the typical response from Linux savy folk and seems a bit elitist to me. How are us stupid "Windows and Mac users" supposed to learn about Linux without getting in a mucking about a little? And, I don't agree about not needing root: there are many tweaks, applications, and operations a person might encounter that require root. That is - any person who wants more from their 770 than a web-browser and PDA replacement. I leave my 770 in R&D mode because I keep making little changes to suit my needs.

And, yeah, I've done some dumb stuff and bricked the device several times. But, you know what? All you have to do is reflash it to make it just like new again! Frankly, I think the 770 is a great device to learn about linux for exactly that reason. I treat my desktop Ubuntu with kidd gloves, but happily thrash away at my 770.

Biomech
01-08-2006, 08:26 PM
I personally would love to see something like this for Windows users. I want to gain root to do things like switching images and setting up swap space on my 1gb card but I am faced with getting a second used PC to run Linux or duel booting my current machine which I do not want to do.

I was crushed when I saw that KreAture's link was no longer working because I thought this would be my one chance to get the 770 setup the way I'd like without setting up Linux. I think this should be an option during the install process.

KreAture
01-08-2006, 08:41 PM
The link stopped working due to my firewall deciding to go nuts.
It is fixed now.

I'll leave it as-is while I work on a patch method not involving brains, brawns and forced Linux use. There must be a nice and easy patch tool available that is also ported to Windows ?

NokNok770
01-08-2006, 09:02 PM
Can a user mess up his/her machine to the point they can't reflash the image? If not, then I say go ahead and post it. If someone don't want to take the risk of messing up their machine, they won't do it. But if they do...they have a choice. The only way to learn is take that first step into the unknown.

timc28
01-08-2006, 10:28 PM
installed it and works perfectly.

now i can easily install the other softwares that need root access.

thanks a million!!!

KreAture
01-08-2006, 10:36 PM
This was just the first alternative I could think of.
It's not pretty but it's very simple.

Basically I have used a tool called PatchWise to create a self-installing patch.

Upon start it will ask for a folder to patch.
In this folder, there should be a single file namely Nokia_770_SE2005_3_2005_51-13.bin from Nokia.
The tool will patch this file and leave it in place. Optionally creating a backup of it. Dialog is odd/ugly but "FC /B <original>.bin <patched>.bin" sais there is no differences in my tests.

The patch is only 347k and can be downloaded from here:
http://kreature.dynu.com/files/Nokia_770_SE2005_3_2005_51-13_patch.exe

I have found that bsdiff can do the job on Linux/Unix and is also ported to Windows! I will be making a patch in bsdiff and test it later.

KreAture
01-08-2006, 10:57 PM
As promised. I am back...
This time with a lovely little patch :)

http://kreature.dynu.com/files/Nokia_770_SE2005_3_2005_51-13.bin.bsdiff

The file is a silly 69,932 bytes!

To use it one will need bspatch available at a LOT of places...
Windows: http://sites.inka.de/tesla/f_others.html#bsdiff (Also needs bzip2 from http://gnuwin32.sourceforge.net/packages/bzip2.htm )
Linux/Unix/Python??? http://www.daemonology.net/bsdiff/

Well, enjoy and tell me what you think?
Is this easy enough now that I can take the original .bin off the "air" and stop violating that licence?

MikeB
01-08-2006, 11:36 PM
I personally would love to see something like this for Windows users. I want to gain root to do things like switching images and setting up swap space on my 1gb card but I am faced with getting a second used PC to run Linux or duel booting my current machine which I do not want to do.


FYI... You do not necessarily have to get a second PC or dual boot. I downloaded the free VMware Player (http://www.vmware.com/products/player/) and free Ubuntu Virtual Machine (http://www.vmware.com/vmtn/vm/ubuntu.html) and was able to gain root on my 770 without any problems.

KreAture
01-09-2006, 12:28 AM
Hehe. I like this way better. It fixes the annoyance too, no manual editing needed.

Hedgecore
01-10-2006, 06:20 PM
I would say at the very least add the default user to sudoers. Not being able to rearrange my menus, etc is a bit of a griping point. Besides, very few technically inept people would find themselves in XTerm on their 770.

Mike Cane
01-10-2006, 06:51 PM
FYI... You do not necessarily have to get a second PC or dual boot. I downloaded the free VMware Player (http://www.vmware.com/products/player/) and free Ubuntu Virtual Machine (http://www.vmware.com/vmtn/vm/ubuntu.html) and was able to gain root on my 770 without any problems.

Live via 770:

Damn. Another option. These tips *must* be consolidated! Reggie!

Hedgecore
01-10-2006, 08:44 PM
http://www.internettablettalk.com/forums/showthread.php?p=6744#post6744

*pants* And now for a smoke.

JMills
01-13-2006, 03:38 AM
Live via 770:

Damn. Another option. These tips *must* be consolidated! Reggie!


Now, did you download the VMware built (well, actually _me_) Browser Appliance virtual machine, or the Canonical/Ubuntu-built virtual machine?

I've been toying with the idea of extending the BAVM a bit for use with the Maemo/Scratchbox development environment as well.

-JMills (at VMware dot com)

JMills
01-13-2006, 03:39 AM
Now, did you download the VMware built (well, actually _me_) Browser Appliance virtual machine, or the Canonical/Ubuntu-built virtual machine?

Whups, I didn't read the second thread... it is the BAVM. :-) :-)

KreAture
01-19-2006, 06:58 PM
I'm sorry to say there has been some downtime on the host of the patches.
Those who gave up downloading due to this should try again.

Those who have downloaded might comment on their experience?
I'd like some ideas to other mods the Nokia 770 base image desperately needs.
Been tinkering with the idea of adding some packages. Not dead weight style, but as packages you can actually deinstall if you like.

Robette
01-20-2006, 02:48 AM
You don't need a 2nd PC or even to dual-boot to run linux. Simply burn a live-CD like Phlak or Knoppix.

RogerS
01-28-2006, 05:38 PM
Those who have downloaded might comment on their experience?Well, this comment is a little premature, because I have downloaded the patch, applied it and then installed the patched version on my 770.

But I did that just 15 minutes ago, and I haven't used things yet.

I wanted to add a little more information for any Windows users who would do this.

The program you need to download, as KreAture noted is at sites.inka.de/tesla/f_others.html#bsdiff (http://sites.inka.de/tesla/f_others.html#bsdiff)

What I should have done, but didn't initially, was go to the real home page of the program, at www.daemonology.net/bsdiff/ (http://www.daemonology.net/bsdiff/) where a brief description of the utilities can be found. When you unpack/install it, you have two utilities, not one.

bsdiff is the program that KreAture used to create his patch. bspatch is the program we users use. I thought I was supposed to use bsdiff (because the patch file has that as an extension), until I read the description.

And the first time around, I wasn't paying attention and what I did was run the patch on the zip file of the image that I had downloaded. That doesn't work. So, be sure to unzip the binary image and use bspatch to apply the patch to the file with the .bin extension. And of course you run bspatch from a command prompt window.

Typing simply "bspatch" on the command line gives you the usage the program expects, btw. And if the patched file isn't created within a short period of time -- 20 seconds? 30? In my case, well under a minute -- something isn't right.

Roger

RogerS
01-30-2006, 05:43 PM
Just a follow-up:

Works perfectly.

RogerS
01-31-2006, 10:39 PM
I think I made small errors at each stage of this, typing the wrong name or picking the wrong file, and of course getting nothing or a bad file as a result. So I kept at it until I got it right.

First thing, of course, was to make sure bspatch was installed in a directory in the path, so that I could execute it from the directory where the patch and image files were located.

Because I knew I had messed up earlier, I redownloaded the patch file, just in case.

I unzipped the Nokia firmware image.

Then I opened a command window and navigated to the directory with the firmware and patch files.

I entered the command (I won't use the full file names since they're so long):

bspatch Nokia-image-51-13.bin a-new-name-for-the-result.bin the-patch-file-51-13.bin.bsdiff

Note that there are 4 parts:
- bspatch
- the firmware image name ending in bin
- a name for the resulting patched image
- the patch file ending in bsdiff

If you're doing all that and don't get a result in under a minute, I don't know what's going wrong.

Good luck!

Roger

Twonky
03-08-2006, 11:07 AM
You don't need a 2nd PC or even to dual-boot to run linux. Simply burn a live-CD like Phlak or Knoppix.

And it's even better you don't even need a CD-burner...
Just download the VMWare player, and any linux image (e.g. ubuntu) and off you go....

;-)

cespo
04-02-2006, 08:08 AM
When I try to use the Windows .bin patcher, it keeps telling me "Wrong directory selected". I'ved tried numerous directories, moving the .bin file (only file in the directory) around, renaming directories, etc...

Any suggestions?

Thanks,
ce

c_legaspi
04-18-2006, 01:30 AM
the patch worked for me though i havent flashed it in yet.

download the patch
download nokia firmware
unzip the nokia firmware

execute the patch
point the dialog box asking for the nokia firmware


thanks again kreature, your patch helps illiterate linux users like me to start upgrading our nokia 770

Claudio

kutibah
04-18-2006, 08:27 AM
What's the difference in patching the image and flashing the 770 in Linux to enabled R&D mode? Is it just to be made easier for end users or is there an advantage?

aflegg
04-18-2006, 10:55 AM
Nope, both result in exactly the same effect. The patching is most useful for users without a Linux or Mac box available.

uNtouched
04-21-2006, 12:26 PM
Will there be a patch for the new version? or can I just use the same one?

aflegg
04-21-2006, 01:29 PM
Almost certainly the same one won't work (if the patching process is any good, it'll check a checksum of the file to be patched anyway, and will refuse to even try to patch it)

uNtouched
04-21-2006, 05:59 PM
That's exactly what happened.

c_legaspi
04-29-2006, 12:09 AM
This image is a full image, like the original "Nokia_770_SE2005_3_2005_51-13.bin" from Nokia.
What I have done is change the gainroot script so it ignores the R&D flag completely and just does as it's told.

In addition I added the /var/lib/install/usr/bin folder to the path in both /etc/profile and /root/.profile to make it more convenient.

I am not familiar with linux
when adding the /var/lib/install/usr/bin folder to the path in both /etc/profile and /root/.profile to make it more convenient, what is meant by making it more convenient.

aflegg
04-29-2006, 03:04 AM
when adding the /var/lib/install/usr/bin folder to the path in both /etc/profile and /root/.profile to make it more convenient, what is meant by making it more convenient.

That you don't have to type "/var/lib/install/usr/bin/vim", you can just type "vim".

KreAture
05-04-2006, 07:10 PM
Ofcource there will be a patch for the new version :)
I have simply been a bit buisy. I saw today that the new image was available and have already done a few changes. I am looking around and testing the original a bit more first to see if there are some other changes worth doing.

If anyone has suggestions to changes that would simplify use and/or increase usefullness of the 770 I'd be happy to try em out. One thing I'm most annoyed at on previous version is the poor memory availability. A few web windows and it is too sluggish for words and starting to yell for more memory. Hoping this version is better...

KreAture
05-05-2006, 06:17 PM
Here's what I think will be in the patch:

1. gainroot ignores R&D flag and always allow root.
2. "/var/lib/install/usr/bin" added to path in /etc/profile
3. "/var/lib/install/usr/bin" added to path in /root/.profile
4. Swap on/off buttons in Extra menu for a 16 MB swap at /media/mmc1/swap
(Pluss appropriate changes in sudoers)
5. External USB-disk mount/unmount buttons on Extra menu targeting /MyDocs/usbdisk
(Pluss appropriate changes in sudoers)
6. Pre-removed IceAge trailer
7. Pre-removed mp3 of that houling lady

The removal of the trailer and mp3 makes the new image smaller making it faster to flash :)

I have already tested the swap and it works well. The issue about MMC lifetime using it as a swap is really not too bad of an issue when it is used rarely. If using many apps often and with a lot of switching, MMC-wear might be a problem.
The good news is as I test the new release I notice that Nokia has done well in reducing the low-memory issue! I can open 8-9 webpages (all the tabs on nokia 770 homepage actually) as well as both the pdf, video and audio app without getting memory warning! And this is without enabeling the swap!

The only think I havn't found a nice way to do yet is adding vi or some other editor... I really think the image should contain an editor, but I want it to be user-removeable if wanted. I don't want to push a specific app on anyone so they must be able to remove it again from the app installer. If anyone have a good explenation on how to do this I'm all ears...

Oh, and it appears my work the last time was well spent. My tools (written for last patch) allowed me to access and modify this image in a few mins. Most of my used time this round has gone into finding nice changes for you all :)

I actually have a dual-usb power cable that might allow me to plug in a disk to the nokia and see if that can be mounted with the scripts I added. Ideally it will allow you to access your ipod with a simple power-injector thingy.

So, waddya think?

uNtouched
05-05-2006, 06:24 PM
Nice, I mean anything more than that would require a flashed kernel no? I mean there are a few apps there that I would personally like, but I have no idea about that kernel compiling stuff. Also, at this point I would personally appreciate anything you're willing to contribute. I'm sure others will feel the same.

-Edit-

Will the swap on/off feature be able to be configured? Meaning will I be able to use it to turn on and off a 24mb swap created Ravenwolf method?

KreAture
05-05-2006, 06:30 PM
I was thinking of installing something like Vim or Joe from the current .deb's and diff to see what I need to stuff into the image to make it happen. That way, it can be uninstalled later as if it had been installed on the device after flashing.
I don't know of any other way to do this though. Ideas?

KreAture
05-05-2006, 07:53 PM
Hmm, as of now the swap is a file called swap on the root of the mmc card.
If the file is missing, it is created.
If it exists, mkswap is run swap enabled.
If it is a folder, it is not touched.
( I thought I'd atleast make it a bit userfriendly. )

I am unsure how one should go about making it configurable though...
Maby I could add a query? I am unsure if you can even do that from the gui running a script... Somehow I'd need to fetch a size so one doesn't have to specify it by editing multiple files. As of now, it's fixed at 16 MB.

How about: If the swap file exists, use it, if not I create a 16 MB... I'd have to read the size of the file, but that's not a problem.

KreAture
05-05-2006, 08:33 PM
Update:
New swap solution seems to work well...
I removed (really replaced) the media files as they seem to cause a very large change in the file causing the bsdiff to become around 3 MB!
Anyone can delete those two files on their own so it might as well stay in there.

KreAture
05-07-2006, 06:03 PM
Whopp-di-doo, I found a bug...
You would all have a nice patch by now, if somebody hadn't fubared the "cut" command in the 770. It has no switch to ignore consecutive delimiters and it doesn't ignore em by default. As a result I am at a loss as to how I can query the size of a file from the swapon script...

Any ideas are welcome!

DaveEL
05-07-2006, 08:13 PM
Whopp-di-doo, I found a bug...
You would all have a nice patch by now, if somebody hadn't fubared the "cut" command in the 770. It has no switch to ignore consecutive delimiters and it doesn't ignore em by default. As a result I am at a loss as to how I can query the size of a file from the swapon script...

Any ideas are welcome!

du should always output the size first so cutting the first field should get you the size

du -s /PATH/TO/FILE | cut -f 1 -d " "

DaveEL

KreAture
05-08-2006, 12:27 AM
Good idea! But it doesn't have switches in the Nokia 770 for outputting in byte-format, only blocks...

KreAture
05-08-2006, 07:38 PM
Great news! I found a way to read the filesize so the swap auto works :)
I am testing the new image now and so far everything I can test seem ok.

A few quirks on the profile adjustments and cleanup but otherwise it's looking good.

It installs Vim, Xterm and LoadPlugin on startup so they can be removed if you wish. The main thing is that they are actually there so you can start using the system right away! No need to start stuffing in deb's after flashing just to get the terminal working.

I hope to get a .bsdiff out soon :)

uNtouched
05-16-2006, 03:32 PM
Nothin yet?

KreAture
05-17-2006, 07:47 AM
Well, I wanted to test this well before releasing it.
So far it seems ok. Only thing I can't test is the external disk mounting.

The auto-install of Joe (text editor) and x-terminal works well. As does the memory monitor.

I'll diff it when I get the chance and put out a trial patch.

Robert Frommer
05-28-2006, 12:07 PM
In order to apply the patch I need the original download (Nokia_770_SE2005_3_2005_51-13.bin). It is no longer available from Nokia.
Could somebody e-mail it to me at or let me know where i can get it?
r_frommer@yahoo.com
Thank you very much.

Arjun
05-28-2006, 01:08 PM
In order to apply the patch I need the original download (Nokia_770_SE2005_3_2005_51-13.bin). It is no longer available from Nokia.
Could somebody e-mail it to me at or let me know where i can get it?
r_frommer@yahoo.com
Thank you very much.

This is a 60 MB or so File. Where do you think that you can upload such a big sized file via email or otherwise ?

:cool: :rolleyes: :cool:

Nokia_770_SE2005_3_2005_51-13.bin

aflegg
05-28-2006, 02:29 PM
Try maemo.org, last time I checked, it was still there.

HTH,

Andrew

Robert Frommer
05-30-2006, 05:21 PM
Thanks for the tip.
I did find Nokia_770_3.2005.51-13.bin.
Is this the same as Nokia_770_SE2005.51-13.bin ?