Ask / Submit
8

[HOWTO] Permanent Device Lock - Recover your Data onto SDCard (IF you know the pin)

asked 2014-05-05 17:45:37 +0300

ozzi gravatar image

updated 2014-05-05 21:57:22 +0300

So i let my little cousin play with my phone and tada, its in permanent lock mode now.. I recently made a backup with the integrated Function, so i wanted to save that & the pictures made since then etc.

  1. Start device in Recovery mode https://together.jolla.com/question/22079/howto-all-pc-users-recover-or-reset-a-device-that-is-stuck-in-boot-loop/

  2. Enter 4 for Shell

  3. Enter your pin

  4. Do bklid and note the first part, example output .. /dev/mmcblk1p1: UUID="B474E96674E92BB4" LABEL="SDCARD" TYPE="vfat" ..

  5. Edit /etc/fstab and add following line: /dev/mmcblk1p1 /mnt/SDCARD vfat rw,defaults 0 0 This is an example for a Fat32 partition (note the vfat), you have to use the TYPE which blkid returned you

  6. Enter this command: mkdir /mnt/SDCARD

  7. Do mount /dev/mmcblk1p1

  8. Enter following commands: MOUNT_DIR=/mnt

    ROOT=$(cat /proc/cmdline | sed -e "s/ /\n/g" | grep ^root= | cut -d "=" -f2)

    mount -o subvolid=0 $ROOT $MOUNT_DIR

  9. Now you have your SD Card under /mnt/SDCARD and your home directory under /mnt/@home

  10. Copy the files you need with cp command

  11. If you want to save the backup file (.vault) do this: tar cf /mnt/SDCARD/vault.tar -c /mnt/@home/nemo/.vault

  12. Now shut down your phone (take out battery + USB) and remove SDCard

  13. Go into Recovery mode again

  14. Make a factory reset

  15. Start phone and enable developer mode + SSH

  16. Use a SCP program (i used winscp) to copy your documents + pictures, also copy the vault.tar file to the user home (~)

  17. Unpack the tar tar -xvf vault.tar

    1. Go to ~/mnt/\@home/ and use mv to copy the .vault folder into the home (~)

    2. Do a restore

Im really tired, i shall retype this all, or at least correct the many typo's.

Hope this hels

edit retag flag offensive close delete

Comments

One thing I do not get here, is what do you mean by "permanent lock mode", sure, if your cousin changed your PIN and locked the device, that'd be permanent lock mode.

However, you state that you KNOW what your PIN code is... How is your device locked then?

juiceme ( 2014-05-05 22:02:04 +0300 )edit
2

If there a number of tries set under device lock, in my case it was 10. We are talking about device lock, not pin code btw. So after 10 tries a red font stating "permanently locked" appears. Rebooting, waiting 24h etc doesnt help ;)

ozzi ( 2014-05-06 08:18:36 +0300 )edit

Of course, I did not think of this long enough. And of course on my own device I have set unlimited tries to the lock code :)

juiceme ( 2014-05-06 08:23:05 +0300 )edit
2

Well i had the bad luck that i had set one, since there was no mentioning the device will get permanently locked.. I thought, oh well it will be locked for like 15 minutes and then give me new tries. Like most devices. #unlike ;)

ozzi ( 2014-05-06 15:19:07 +0300 )edit

So, a factory reset removed the permanently locked screen?

gabriel ( 2014-06-21 19:19:55 +0300 )edit

4 Answers

Sort by » oldest newest most voted
4

answered 2015-04-28 17:26:13 +0300

chemist gravatar image

To recover from permanent lock https://together.jolla.com/question/91297/how-to-recover-from-permanent-device-lock/

edit flag offensive delete publish link more

Comments

This is the solution

llg179 ( 2015-08-30 11:26:53 +0300 )edit
1

answered 2015-04-20 23:50:48 +0300

dyraig gravatar image

updated 2015-04-21 01:01:09 +0300

First of all thanks for this HOWTO - it proved valuable when my Jolla suddenly showed "Permanently locked" (my guess is that I failed to switch off the screen and that somehow random keys were entered while I carried it in my pocket, though I'm not quite certain how that could have happened...).

Thanks to the HOWTO, I was able to enter the device (steps 1-3, as I do know the lock code).

Steps 5-7 can be shorter and easier:

5) mkdir /mnt/SDCARD

6) mount /dev/mmcblk1p1 /mnt/SDCARD - this works for vfat in any case, for others, adding -t FILESYSTEMTYPE may be needed

There's no need to edit fstab just to mount a partition.

There's a typo in 8) - MONT_DIR should be /mnt/ROOT, as otherwise, you will mount the second partition over the one where you just mounted the SD card. Subsequently, in 9), the home directory is to be found under /mnt/ROOT/@home

Another tip with regard to copying the files: Using tar to make tarfiles on the SD card is recommended if the SD card is using vfat, as vfat cannot deal with all file names, permissions, etc. that are present on the Linux file system. That way, you can back them up the way they are.

Finally, once I was so far as having mounted ROOT, I noticed that that gives me access not only to the home directory, but also to the root directory of the Jolla itself - it's mounted under /mnt/ROOT/@. Using that access, I was able to remove the permanent lock itself without the need for a factory reset. It took me some fiddling and some sweat, but in the end I seem to have succeeded, though I'm a tad vague on which step really did it. I have the Jolla running and can now lock it and unlock it again (though I have not dared to reboot yet...). I'm not quite certain whether the details may be described here... In any case, you must know the lock code, as you need to enter recovery mode, so I think the security impact is limited.

edit flag offensive delete publish link more

Comments

I just had to perform the unlock procedure again - when I took the Jolla out of my pocket it was "permanently locked" again (I'd really like to know why...).

As for the procedure for removing the permanent lock without factory reset, I now know which steps are relevant (but still don't known whether it is ok to list them here), at least for 1.1.2.16.

dyraig ( 2015-04-21 11:15:22 +0300 )edit
0

answered 2014-08-03 22:13:14 +0300

mark gravatar image

I would recommend doing a software update between 14 and 15. The launch firmware doesn't like settings from the latest updates all that much.

edit flag offensive delete publish link more
0

answered 2018-07-28 19:04:10 +0300

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2018-07-28 19:04:10 +0300

Breeze gravatar image

Does this work on my Xperia X? I'm in hungary on vacation watching Formula One and find my phone in the pocket with "Permanent Lock" . I'm stuck, no numbers to call or flight ticket anymore, looks i'm stranded here....

edit flag offensive delete publish link more

Comments

@Breeze

Oh dear, I doubt very much that this 4 year old 'how-to' will work on XperiaX.

Clearly you have internet access, so instead of asking if it will work, why don't you just try it, then if it doesn't work, you can use your access to contact Jolla directly, who by the way, are away on summer holidays right now, so you likely will not get a response except for a standard automated reply stating "we're on holiday". If you don't get any joy from this 'how-to', I would be inclined to post a new question asking for help from the community.

Currently, your question is hardly visible being buried here at the bottom of an old question.

I can't help directly, as I am still using Jolla1.

Good luck getting home! :/

Edz ( 2018-07-29 10:52:19 +0300 )edit
Login/Signup to Answer

Question tools

Follow
6 followers

Stats

Asked: 2014-05-05 17:45:37 +0300

Seen: 3,525 times

Last updated: Jul 28 '18