maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Lock Code Question (https://talk.maemo.org/showthread.php?t=32728)

munky261 2009-10-12 16:03

Lock Code Question
 
Can anyone tell me where the configuration file is for the lock code so I can change it or delete it using emelfm2? I forgot my code and would like to change it. Any one know?

lorelei 2009-10-12 16:19

Re: Lock Code Question
 
I'm guessing that we are talking about the lock code for a N800 or N810 device?

Well the lock code is not stored in a file in the regular filesystem, and reflashing your device won't clear it.

It is stored in the partition /dev/mtd1, and as far as I know there's a way to clear it from a booted device, but I don't remember off-hand the procedure...

lorelei 2009-10-12 16:23

Re: Lock Code Question
 
A precision: reflashing the device will unlock the device but won't clear the lock code.

there's a procedure
here to retrieve the lost code, so that you can change it to something else, but for that you will need to have access either via SSH or to an xterm on the device.

Standard disclaimer: Use the script at your own risk, of course :)

munky261 2009-10-12 16:51

Re: Lock Code Question
 
Is there something on that page im supposed to download to run? How exactly do I do it, can you give me a step by step?

munky261 2009-10-12 17:33

Re: Lock Code Question
 
Can anyone tell me exactly how to take whats on that page and make it a script I can run to get my code?

lorelei 2009-10-12 17:44

Re: Lock Code Question
 
Here are the step by step instructions:

- copy and paste in a file named unlock.pl (somewhere on your tablet) the script on that page (starting at the line with "#!/usr/bin/perl" and ending at the line with "close(INFILE);"
- modify the line saying my $LOCK_OFFSET = 0x41028; and replace it with: my $LOCK_OFFSET = 0x40024; (I don't know if the offset is always the same for all devices...if it doesn't work for you, please let me know, and I will modify the script so that it is a little bit more intelligent about detecting the lock code. Disclaimer again: the original script is not mine!)
- open an xterm
- get a root prompt (sudo gainroot should do the trick, if you installed the gainroot package)
- go to the directory where you saved the script (cd name_of_directory)
- run the script with the following command "perl unlock.pl"
- you should now get your lock code

munky261 2009-10-12 17:58

Re: Lock Code Question
 
It worked, though, when it displayed the code the last two digits were cut off. I was able to remember what they were by the rest of the code so everything worked. Thanks! Now I can keep my nosy *** girlfriend out of it. lol

lorelei 2009-10-12 18:02

Re: Lock Code Question
 
ok...great...glad it worked for you

I guess that the offset I gave you wasn't 100% correct though, which should explain the partial lock code retrieval..

munky261 2009-10-12 18:09

Re: Lock Code Question
 
Does the offset govern the length of the code it is looking for?

JayOnThaBeat 2009-10-12 18:29

Re: Lock Code Question
 
Quote:

Originally Posted by lorelei (Post 344589)
A precision: reflashing the device will unlock the device but won't clear the lock code.

there's a procedure
here to retrieve the lost code, so that you can change it to something else, but for that you will need to have access either via SSH or to an xterm on the device.

Standard disclaimer: Use the script at your own risk, of course :)

Hey lorelei, good work.

Would you (or someone less lazy than myself) add this info to the wiki?

IMHO this is invaluable information, as it is bound to happen to many people over the course of time.

YoDude 2009-10-12 18:34

Re: Lock Code Question
 
Quote:

Originally Posted by JayOnThaBeat (Post 344688)
Hey lorelei, good work.

Would you (or someone less lazy than myself) add this info to the wiki?

IMHO this is invaluable information, as it is bound to happen to many people over the course of time.

Um... what's the prupose of the lock code?


What's the purpose of a publicly viewed WiKi? :confused:

JayOnThaBeat 2009-10-12 18:44

Re: Lock Code Question
 
Quote:

Originally Posted by YoDude (Post 344696)
Um... what's the prupose of the lock code?


What's the purpose of a publicly viewed WiKi? :confused:


1. Results from this forum show up on google very often.

2. Anyone smart enough to find the tablet wiki are smart enough to run a google search.

3. Putting the info in the wiki makes it easier for legit tablet users to find a solution for their locked tablet problem and makes it less likely that we will get a repeat thread started.

mrlanrat 2009-10-12 19:00

Re: Lock Code Question
 
I just used this script and it worked fine for me.

N810 with $LOCK_OFFSET = 0x40024;

Thanks!!!!!!!

lorelei 2009-10-12 19:17

Re: Lock Code Question
 
Quote:

Originally Posted by munky261 (Post 344671)
Does the offset govern the length of the code it is looking for?

The offset tells the script where to start looking for the code on the raw partition. There's another variable to change in order to modify the length of the string to retrieve, but it is currently set to 10 characters which is the maximum size of the lock code.

Probably the correct offset is 0x40028, upon further inspection of the dump, so that it will work for a code of any length up to the maximum 10 digits. For me it worked with a shorter offset, since I'm not using the full length of lock code the device offers...

epninety 2009-10-12 22:04

Re: Lock Code Question
 
For my N810 running 5.2008.43-7 the offset was different than any of those suggested so far, but the method still works once the offset is known.

YoDude 2009-10-12 23:00

Re: Lock Code Question
 
Quote:

Originally Posted by JayOnThaBeat (Post 344713)
1. Results from this forum show up on google very often.

2. Anyone smart enough to find the tablet wiki are smart enough to run a google search.

3. Putting the info in the wiki makes it easier for legit tablet users to find a solution for their locked tablet problem and makes it less likely that we will get a repeat thread started.


I'd go with number 3... It may provide some insulation from those smart enough to Google (just about everyone) but not smart enough to expand the search for a WiKi. :)

^Them's the ones I was worried about. The opportunist's.

If a WiKi entry ultimately means less hits because the question is posted on this forum less often... then #3 makes sense. :)

dantonic 2009-10-25 04:51

Re: Lock Code Question
 
can this script be harmful in any way? I actually would like to find out what my lock code is since I cannot use the lock feature. The N800 was given to me by a friend two years ago, and the lock code is long forgotten.

*EDIT* Well I tried it anyway because I was too curious and it worked :P I can finally lock my device!

lorelei 2009-10-25 10:34

Re: Lock Code Question
 
Unless modified, the script won't do any arm, since it only reads a few raw bytes from the internal memory, without ever writing anything there.

R-R 2009-10-25 14:45

Re: Lock Code Question
 
This works here too:

Quote:

grep -A 13 lock_code /dev/mtd1 | tail -1

scaler 2009-10-26 13:38

Re: Lock Code Question
 
Quote:

Originally Posted by R-R (Post 357709)
This works here too:

YES! Ever since buying a used 770 I have dreaded the possibility of touching the "Lock device" option by mistake. Your grep command worked perfectly, returning the lock code set by the previous owner (and not known to the eBay merchant who sold the 770).

I tried to include your command in the quote, but it did not carry over. Here it is in a more readable font. It has to be run as root.

sudo gainroot
grep -A 13 lock_code /dev/mtd1 | tail -1

Thanks again


All times are GMT. The time now is 16:57.

vBulletin® Version 3.8.8