PDA

View Full Version : HOW TO: Hacking Maemo on the Nokia 770. Pics Inside


SeRi@lDiE
2006-12-27, 09:05
Hacking Maemo on the Nokia 770.

I am going to post a quick tutorial on how to hack the Icons, Aliases,The file system logos, etc…

Note and WARNING:
I am not responsible for any damages or bricks you cause by you trying to hack your N770.

The tools you will need installed on maemo are:

OpenSSH - (I prefer OpenSSH over dropbear)
Osso-xterm
root access ( http://maemo.org/maemowiki/HowDoiBecomeRoot2 )


On the PC:

SSH client
gFTP
Terminal (or putty for Windows)
Gimp (or any photo editing software)


Ok first will start by hacking those Icons that do not have a icon on the Extras menu for example if you install xmaeme by default xmaeme does not have an icon and it can be quite annoying look at the below image…

http://i106.photobucket.com/albums/m260/xcom7/screenshot00.png

So how can we fix that?

Simple first you are going to use an scp browser like (gFTP) and go to the fallowing directory
/usr/share/applications/hildon

http://i106.photobucket.com/albums/m260/xcom7/ScreenshotSmall.png

In /usr/share/applications/hildon you will find most of the .desktop links also under /usr/share/applications… Download the appropriate one in our case xmaeme.desktop after you download it you can open it using ether VI or geditor… If you use Windscrow use Win32Pad. Win32Pad is Linux compatible so you can open Linux files and retain the Linux code.

After the file is open you will see the following


[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Name=XMaeme
Exec=/usr/bin/xmaeme
Icon=qgn_list_gene_default_app
MimeType=application/x-executable


We are going to change the line “Icon=qgn_list_gene_default_app” to “Icon=The-Icon-We-Are-Going-To-Use” After that you can save it. Now we are ready to upload since we don’t have access to systems folder we are going to upload it to /media/mmc1 …
After is upload it we are going to copy it from /media/mmc1 to /usr/share/applications/hildon but to do that we are going to ssh to the 770…
This is the part where you going to need root access to your 770.

Note: If the .desktop file calls on X-Window= Than you will have to change the path from /usr/share/applications/hildon to /usr/share/icons/hicolor/scalable/hildon this is not always the case I only had to follow that path in icons that where broken like xVNC server if you are making your own icon and there is no Icon= than you follow the normal procedure.

From Linux…

ssh –l user 10.XX.XX.XX

once in CLI

sudo su –

Once you are in root

cp /media/mmc1/xmaeme.desktop /usr/share/applications/hildon/xmaeme.desktop

It will ask you to overwrite if you feel safe at this point than type yes at the command…

Now we are ready to upload the image the link is calling for in my case mame-blue_2.png

Here is a nice trick I use with GIMP you can download any image from the net or where ever you want and use GIMP to scale the image to the correct size for maemo icons you can use 25x25 or 64x64… How you can resize in Gimp? In GIMP you will open the image than right click on the image ----image----scale image… at this point you will hit the locks by the width and height that way we can change the W x H without automatic scaling….

http://i106.photobucket.com/albums/m260/xcom7/Screenshot4Small.png


After you are done you can save it and we can repeat the same steps as before using the cp command but this time will change the path to /usr/share/pixmaps in pixmaps you will find most of the applications Icons.
Here is how we will execute the command…

cp /media/mmc1/mame-blue_2.png /usr/share/pixmaps/mame-blue_2.png


http://i106.photobucket.com/albums/m260/xcom7/Screenshot5Small.png


Ok so now we have the .desktop link and the image in place now all we have to do now is go in to the Extras Menu again and whala! Is there :) No reboot required…


http://i106.photobucket.com/albums/m260/xcom7/screenshot011.png


Ok c00l so now we have the Extras Icons how about the rest of the file system?

You can change any Icons image as you like but please be very care full you can brick your device… consider your self warn ;P

Startup logos and sounds.

The big Nokia logo you see on startup comes from the file /usr/share/icons/hicolor/scalable/hildon/qgn_indi_startup_nokia_logo.png.

The Nokia hands live at /usr/share/icons/hicolor/scalable/hildon/qgn_indi_nokia_hands.png

The Nokia tunes are in /usr/share/sounds (ui-wake_up_tune.wav) and (ui-shutdown.wav).

Replace the files as you like.

Please make sure as a I explain above resize the image you are going to use to the appropriate size for the Startup logos I use 770x470 …. Also make sure you have the correct permission set in the images and files once upload it… you can check by typing ls –l in terminal in the same directory as the file. If you see that the images or files you upload it don’t have the appropriate permissions use chmod to change the file IE: chmod 666 file_name. This only apply to system wide files not the .desktop links etc…. better safe than sorry.

Browse the File System…


Ok you can use 3rd party app to browse the file system or you can use Opera to do so by going to the address bar and typing / that will take you to the file system but you can only browse no copy or paste available…. Also if you want to take advantage of the built in file browser you can make a symlink to another folder outside the Home Dir….
From Terminal as root…

cd /MyDocs
ln -s /var/log

Now the folder /var/log is mounted in the file browser and you can browse to it.

~Fin

Good Luck and Have Fun!
SeRi@lDiE aKa nUll

=DC=
2006-12-27, 14:22
Very nice tutorial. Thanks for taking the time to make this.

SeRi@lDiE
2006-12-27, 15:05
Thank You. I will post more soon.

SeRi@lDiE
2006-12-27, 22:18
HOW TO: How to back up your repositories.

Note and WARNING:
I am not responsible for any damages or bricks you cause by you trying to hack your N770.

Ok backing up your repositories can be very useful..
#1- You could have added a bad repositories causing your application manager go unusable with the back up repositories you can replace the bad one restoring your application manager to usable state.

#2- You want to re flash your N770 or just simply upgrade now you don’t have to go thru the pain of adding the repos... All you have to do is replace the sources.list.

#3- Your repo list got corrupted. You can replace it with a usable back up.

The list can go on………

The tools you will need installed on maemo are:

OpenSSH
Osso-xterm
root access ( http://maemo.org/maemowiki/HowDoiBecomeRoot2 )


on the PC:

gFTP (If you use Windows download WinSCP)
Terminal SSH Client (putty for windows)


Now you are going to ssh to the N770

From Linux:

ssh –l user YOUR IP

once granted access type
sudo su –

once in root

type

cp /etc/apt/sources.list /media/mmc1/souces.list

Now with gFTP using the SSH protocol you can SCP to the N770 and browse to /media/mmc1 and download the sources.list file…

Here is a screen shoot

http://i106.photobucket.com/albums/m260/xcom7/ScreenshotSmall33.png

Now you have a back up of a working repo list… if for any reason you need to recover your sources.list all you have to do is replace it with the back up…

Here is how.

From Linux:

With gFTP using the SSH protocol you can SCP to the N770 and browse to /media/mmc1 and upload the sources.list file…


Now you are going to ssh to the N770

From Linux:

ssh –l user YOUR IP

once granted access type
sudo su –

once in root

type

cp /media/mmc1/sources.list /etc/apt/sources.list

And you are done you have replace your bad sources.list with a good one… the application manager can be a very bad migraine so I recommend to back up your sources.list

Note:

Once you have the sources.list in your system you can add and dele repos to it as you please… You can also do it from the Terminal in the N770 by typing……

vi /etc/apt/sources.list


http://i106.photobucket.com/albums/m260/xcom7/Screenshot8Small.png

Be very care full a small typo can render your application manager unusable.

Have Fun and Good Luck

SeRi@lDiE aka nUll

vista
2006-12-28, 00:55
Grate tutorial!!! :cool:
Replacing the logo work for me I had to get my friend to resize the picture for me since I didnt have any software that can help me resize the picture.. I was looking in to Photoshop but is damn expensive! :eek:
It would be awesome if you can list some steps in Windows :)

vista
2006-12-28, 00:57
One more question is "GIMP" free? and if so where can I get it?

Thanks!

SeRi@lDiE
2006-12-28, 05:52
Yes GIMP is free and You can download it from http://www.gimp.org/

SeRi@lDiE
2006-12-29, 14:46
By Request:


How to Install software in the Nokia 770:

Note and WARNING:
I am not responsible for any damages to your N770.

--------------------------------------------------------------------------------

Ok.... Most software for the Nokia 770 are installed thru repositories... Here is a small How To on installing apps...

What Are Repositories?
(Repositories are *dumps* of packages for any nix distribution in our case maemo)
When you use the application manager to install apps from the repositories it will install the required dependencies for the application automatically for you.... Word of warning is not the case all the time... Also adding repositories to the application manager can some times render your device unusable due to bad repos.... And to bring it back is going to Require you to hack your maemo...

Ok here is how to add repositories to your 770.

First get familiar with http://maemo.org maemo
Than Go to

https://maemo.org/maemowiki/ApplicationRepositories

Some of the repos listed there are all ready in your list skip those and get those that you want
Here is how...

From the Maemo site:
To add new repositories to your 770 running the 2006 OS, select Tools > Application Manager, then hit the title bar or menu key, select Tools > Application catalog… and away you go.

So in IE:
You want to install Maemo Mapper and you got to the application list and in the Maemo Mapper link you see the following information...

Maemo Mapper
Home Page: http://gnuite.com:8080/nokia770/maemo-mapper/


Author: John Costigan


Status: Working

Maemo Garage Page: https://garage.maemo.org/projects/maemo-mapper/

Downloads: https://garage.maemo.org/frs/?group_id=29

Repository: http://repository.maemo.org/extras

Distribution: mistral

Component: free


In the above info it gives you the repo information and that is what you are going to use to install the repo to the application manager..
Here is the repo info:



Repository: http://repository.maemo.org/extras

Distribution: mistral

Component: free


If you where to install packages manually is going to required you to install the missing dependencies manually….. Not the case all the time but on most time it is..

I recommend you install osso-xterm (advance) you will use it a lot.
Also Openssh so you can use your desktop to connect to your 770 and use your desktop keyboard...
Also if you want to transfer files to your 770 I would recommend you use SCP instead of the USB cable I found it some what slow and unreliable...
For Windows - WinSCP
For *nix - gFTP

~Fin

Have Fun and Good Luck!
SeRi@lDiE aKa nUll

maxilogan
2006-12-29, 15:54
Thanks for your work, I appreciate particularly the repos backup (I recently needed to reflash the device, so I know what it means to have all the repos ready to be sarched for the needed applications...).

Besides, apart from the need of knowing the corresponding repository, or having it already installed, isn't this all supposed to work without ssh-ing to the nokia, but just using the X-terminal plus the becomeroot packages?

Omar

SeRi@lDiE
2006-12-29, 17:06
Besides, apart from the need of knowing the corresponding repository, or having it already installed, isn't this all supposed to work without ssh-ing to the nokia, but just using the X-terminal plus the becomeroot packages?

Omar

Yes you can do it from xterm and becomeroot and back it up to your MMC and retrive it using USB. I just realy dont rely on the MMC since I had the MMC go corrupted before.

Thanks!

SeRi@lDiE
2006-12-30, 22:38
Up we go... I dont want the thread to die... It could be usefull for many.

Hedgecore
2006-12-30, 23:47
Could this be stickied? Or perhaps put into a tutorial forum that disallows new posts (even more work for ya Reggie) ;)

SeRi@lDiE
2007-01-02, 05:45
Yea that would be a good idea.. I am working on more... I seen that most of the available wikis for the 770 are outdated so hopefully this makes it to sticky or tut section :)

SeRi@lDiE
2007-01-07, 08:34
How to use apt-get:

Note and WARNING:
You should only do this if you are very comfortable hacking on your 770… Messing this up will disable the application installer at the very least. Or even brick your N770.

To use apt-get you will need the following installed in your N770:

xterm


you must also have root acces. ( https://maemo.org/maemowiki/HowDoiBecomeRoot2 )

once xterm is installed you can call on xterm once xterm is up gain root acces.


login as: user
user@10.30.2.115's password:


BusyBox v1.01 (Debian 3:1.01-4.osso10-ipv6.etc1) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ $ sudo su -
Password:


BusyBox v1.01 (Debian 3:1.01-4.osso10-ipv6.etc1) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

Nokia770-26:~#


Once you gain root you can call on apt-get.
Nokia770-26:~# apt-get update
By default apt-get is installed on OS2006 there is no further step required.
Here are a few commands that you will use in apt-get often.

apt-get -u update (Will look for all updates available to maemo in verbose mode)
apt-get --reinstall install packege.deb (Will reinstall the packegealready installed from the sources)
apt-get remove packege (Will remove the packege)
dpkg --install /path/to/package_name.deb (Will install a local packege)

Not that removing pkgs from the command line can be very dangerous and can cause your N770 to be very unstable.
TIP: When removing a pkg watch for the dependencies that are going out with it. Is very dangerous that you do as some dependencies are use by other packeges or system files and if remove you can brick your device.
TIP: I do not recommend to use apt-get (From CLI) to install a file from the souces.list but you can if you want too. If you are going too you are going to be required to transfer the GPG keys to the trusted keyrings for apt-get. Not all repos are required to have the GPG but maemo-hackers requires the GPG key if you want to use CLI. For more info please read http://wiki.debian.org/SecureApt#head-589747062cec6046da81b23e31a4bbe3ff6bb9dc

Note: if you are going to install regular packeges you dont have to worry about a GPG key you can just call on apt-get like so:

apt-get install kismet

The only repo that reuires a key is maemo-hackers.

SeRi@lDiE
2007-01-07, 09:05
I thought I share this with you guys... Today making the apt-get how to I manage to reneder the application manager unusable by doing a update from apt-get and the N770 rebooting in the middle of it. I know I was in deep trouble but I manage to re install the corrupted files wich was lessertunjo0 now the aplication manager is working again. let this be a fine example on how things can go wrong to even those who are more experience.
Lesson learn today... Never trust the moment anything can go wrong at any time to anybody :)

SeRi@lDiE
2007-01-08, 06:40
For those interested GPG is available thru console.

sebastian.linux
2007-01-09, 01:41
Hi, I'm interested in installing gpg, or openssl, but don't know how. Is it at any repository?

Is it as easy as apt-get gpg? Nevertheless I prefer to install things with the Application Manager. Am I correct by doing that? Is it more safe to install things with the AM? Or is it better from the x-term by apt-get?

Thank you.

SeRi@lDiE
2007-01-09, 03:00
gpg is natively install in OS2006 with DSA and RSA only no Elgama.

Here is a post on How To:
Note and WARNING:
You should only do this if you are very comfortable hacking on your 770… I am not responsible if you brick your 770.

I first ssh to the 770 since it gives me the room.

[FFuentes@Fedora ~]$ ssh -l user 10.30.2.115
user@10.30.2.115's password:

BusyBox v1.01 (Debian 3:1.01-4.osso10-ipv6.etc1) Built-in shell (ash)

Enter 'help' for a list of built-in commands.

~ $ gpg --gen-key
gpg (stripped down GnuPG for OSSO) 1.4.2; Copyright (C) 2005 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.


Please select what kind of key you want:

(1) DSA and Elgamal (default)

(2) DSA (sign only)

(5) RSA (sign only)

Your selection? 2

DSA keypair will have 1024 bits.

(null) keys may be between 1024 and 4096 bits long.

What keysize do you want? (2048) 1024

Requested keysize is 1024 bits

Please specify how long the key should be valid.

0 = key does not expire

<n> = key expires in n days

<n>w = key expires in n weeks

<n>m = key expires in n months

<n>y = key expires in n years

Key is valid for? (0)

Key does not expire at all

Is this correct? (y/N) y


You need a user ID to identify your key; the software constructs the user ID

from the Real Name, Comment and Email Address in this form:

"Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"

Real name: Test

Email address: test@here.com

Comment: GPG Key Test from Internet Tablet Talk

You selected this USER-ID:

"Test (GPG Key Test from Internet Tablet Talk) <test@here.com>"

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O

You need a Passphrase to protect your secret key.

password here

We need to generate a lot of random bytes. It is a good idea to perform

some other action (type on the keyboard, move the mouse, utilize the

disks) during the prime generation; this gives the random number

generator a better chance to gain enough entropy.

++++++++++++++++++++..++++++++++.++++++++++.++++++ ++++++++++++++.+++++.+++++.+++++.+++++++++++++++.+ ++++++++++++++++++++++++.+++++.+++++..++++++++++..>+++++....+++++

Not enough random bytes available. Please do some other work to give

the OS a chance to collect more entropy! (Need 278 more bytes)
At this point open a text and just type a lot is going to take some bytes
gpg: /home/user/.gnupg/trustdb.gpg: trustdb created

gpg: key 46668EBA marked as ultimately trusted

public and secret key created and signed.

gpg: checking the trustdb

gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model

gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u

pub 1024D/46668EBA 2007-01-08

Key fingerprint = C0C8 B810 E8F8 3AAB 295F 5606 80B4 F37D 4666 8EBA

uid test (gpg key test for Internet tablet Talk) <test@here.com>

Note that this key cannot be used for encryption. You may want to use

the command "--edit-key" to generate a subkey for this purpose.

Note:
This is just a test i have not fully used gpg in maemo.

sebastian.linux
2007-01-09, 03:58
This is great, I've just used gpg to encrypt and decrypt (with symmetric cipher only) some files.

Is there a way to securely delete files available (like shred, or wipe)?

Salut.
Sebas.

SeRi@lDiE
2007-01-09, 04:41
No. no shread and no wipe this is a strip down version of GnuPG.
At least I have not try it.
Report your out put if you do.

SeRi@lDiE
2007-01-12, 19:01
Per Request:
How To install Kismet on you N770:

Note and WARNING:
I am not responsible for any damages YOU cause to your N770.
Please make sure you have an active Wireless connection.
Things you will need in your N770:

xterm ( http://maemo.org/maemowiki/ApplicationCatalog2006#head-c590a3897a5b45075a407a7c36319a19dcccc7a8 )
root access ( http://maemo.org/maemowiki/HowDoiBecomeRoot2 ) - I recommend using the user password for root access.
also please add the Kismet repository.
Repository Info:
Repository: http://eko.one.pl/maemo
Distribution: mistral
Component: user

Here is how to on how to add the repository to your N770:
http://www.internettablettalk.com/forums/showpost.php?p=27414&postcount=8

Ok you have xterm install, You have root access, and have your repos in place...

Now we are going to install Kismet....

Go to your extras folder and call on xterm.
Once xterm is open gain root access..
If you use the user access from the howDoiBecomeRoot2 than type sudo su -
once you are in root we are going to call on apt-get...
apt-get install kismet
apte-get will call on kismet and all its dependecies it will install and you are done...

once install if you want to use kismet you have to be in root mode...
from root call on kismet by typing kismet

And kismet will start.... Thats it you are done ;)

Good luck and Have fun!
~Fin
SeRi@lDiE aKa nUll

mdanehart
2007-01-14, 12:24
Thanks for information. Will the above process work on the 2007 OS for the N800?

SeRi@lDiE
2007-01-14, 12:34
I am not able to confirm it will because I do not have a N800 so I ma not sure if the file system structure changed in OS2007.... I will have a N800 next week by than I will start hacking the N800

|tbb|
2007-01-15, 18:03
Hello together,

i dont know if it is right to post in here, if not just move this post to the correct section.

Finally i have written a small perl script which parses kismetlogdata and creates 2 Files with open and closed networks, which could be imported later to navicore navigations software.

short description (u can download the kis2nav.tar -> here (http://www.savefile.com/files/416341))

#1. untar the kis2nav.tar to your home directory. for example "cd /home/username && tar -xf kis2nav.tar"

#2. install kismet, gpsd and maemo-bt-plugin to your n770

#3. change the kismet configfile "/etc/kismet/kismet.conf" and make sure u have logytyp "logtype=csv" enabled also set "gps=true" and "gpslockmode=true"

#4. now pair your gps mouse with the n770 using bt-plugin, then start gpsd with following command "gpsd /dev/rfcom0", at least start kismet as root user.

#5. after your logging tour, copy the kismet log (CSV) file to your desktop pc in our case "/home/username/kismet2navicore/kismetlog.csv" there is allready a examplelogfile in the /home/username/kismet2navicore/kismetlog.csv directory!

#6. make sure youve got wine installed, then run "winecfg" from your console in our case the "D:" path should called "/home/username" (this is very important for the bitmaps importing later)

#7. open the console as normal user and type: "cd /home/username/kismet2navicore && perl kismetconverter.pl kismetlog.csv" the script will parse the logfile and write the output to a "non open network" file (wep.nce) and an "open networkfile" open.nce.

#8. copy these 2 files to your navicore mmc card "/home/username/kismet2navicore" in following folder "/media/mmc1/Navicore/extensions". After the next start of navicore u will be asked to import the new extensions.

plz let me know how u like this script

Greetings |tbb|

SeRi@lDiE
2007-02-28, 04:29
Well looks like this thread has bring a lot of request for me to post How To's and hacks... It has gone as far as to rss news feeds and even blog spots...I am going to make a official Book call "Hacking Maemo" or "Hacking the 770" you chose.... is coming out in digital format wich will be release in thoughtfix blog spot... Stay tune is coming out soon. Any body who would like to contribue please shoot me a PM.

cvmiller
2007-09-18, 23:39
Thanks for information. Will the above process work on the 2007 OS for the N800?

It didn't seem to work on my N800. So Unpacked the deb's and put them on my N800 manually. The Kismet server runs, but the client dies when it tries to spawn an xterm.

I have to ask, what does this version of kismet look like when it is running? Is it text mode, or is there a GUI client?

Thanks,

Craig...

Darius2006
2007-09-25, 22:54
It didn't seem to work on my N800. So Unpacked the deb's and put them on my N800 manually. The Kismet server runs, but the client dies when it tries to spawn an xterm.

I have to ask, what does this version of kismet look like when it is running? Is it text mode, or is there a GUI client?

Thanks,

Craig...

Hi,

is it possible to run Kismet on Nokia 770 ?
Just need to test some bluetooth pgs units
and would like Kismet to scan for b t devices and record/log signal levels coming from each one, number of satellites and signal level coming from each respective satellite.

Is that all possible with Kismet or any other bluetooth scanner application ?

Darius

Milhouse
2007-09-25, 23:40
Kismet runs fine on the 770 but it's for scanning WiFi networks not Bluetooth - use btscanner (http://maemo.org/downloads/product/btscanner/) to scan for Bluetooth devices.

bunanson
2007-09-27, 02:13
Kismet runs fine on the 770 but it's for scanning WiFi networks not Bluetooth - use btscanner (http://maemo.org/downloads/product/btscanner/) to scan for Bluetooth devices.

For the kismet newbies, EOF fatal error if not becomeroot.

bun

cvmiller
2007-10-13, 23:52
It didn't seem to work on my N800. So Unpacked the deb's and put them on my N800 manually. The Kismet server runs, but the client dies when it tries to spawn an xterm.

I have to ask, what does this version of kismet look like when it is running? Is it text mode, or is there a GUI client?

Thanks,

Craig...

Update: Got Kismet working on the n800. The terminfo file for xterm is missing. I got the terminfo files installed by installing 'screen' (screen manager with VT100/ANSI terminal emulation) which includes the terminfo files.

You don't need to use screen, just the terminfo files. You can install by
$ sudo gainroot
$ apt-get install screen

I hope this helps,

Craig...

Knille
2009-10-18, 14:05
Hej together,
is it still possible to use a up-to-date version of kismet on the nokia 770 with 0s2007HE?

Would be nice :)

Knille

SeRi@lDiE
2009-10-19, 04:48
WoW You just revived a very old thread! LOL
Sure I can work on it but it wont be something I can post right away... I have to make some time to work on it.

Take care and thanks for the interest... I will update the post as soon as I got the book compiled.

Knille
2009-10-19, 18:04
Hej,
many thanks!

Would be very great!

Nicr greetings, Knille

martinum4
2009-12-22, 10:48
I just bought a Nokia 770 and flashed it with it with 2007HE and i also want kismet, but the eko.one.pl preository has shut down and i found this tread so i ask kindly, if i could also have kismet.

Thanks, martinum4