maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N9 / N950 (https://talk.maemo.org/forumdisplay.php?f=51)
-   -   How to rescue MyDocs from Nokia N9 16GB? (https://talk.maemo.org/showthread.php?t=89640)

mpy 2013-03-28 18:34

How to rescue MyDocs from Nokia N9 16GB?
 
My question is already stated in the title -- following some more info how it came about (italics), and at the bottom a summary what I tried so far:

Probably, I was incredible stupid today. After increasing numbers of issues with the tracker, which couldn't be cured by the usual means, I made a tracker reset. No big deal as I saved everything to the MyDocs partition.

To save the SMS I used QTweakN9 (http://talk.maemo.org/showthread.php?t=80600), which I installed the first time. During the first start the "bash" gets installed, too. That reminded me to search if there's a package of my favorite shell "zsh" for the N9. Yes, there is (http://talk.maemo.org/showthread.php?t=55947) and I was happy as it worked really well. So happy, that I appended "exec /bin/zsh" to my ~/.profile -- changing the login shell is sometimes not such a good idea, so I used that workaround. (That was mistake no. 1 I suppose, but I'm not sure, that my problem has something to do with that or if that was just an accidental coincidence...)

However, everything worked well and after an hour everything was restored from tracker reset. Haven't done a backup to my PC quite long, so I thought that now would be a good time. I already had MyDocs opened in the explorer, but then I realised I didn't made a fresh backup with the internal N9 backup app. So, unplugged USB (mistake no. 2), and was about to start the backup, but the keyboard didn't appear to name the backup... crap, what's going on?! I already wanted to copy&paste some string, but than made a reboot instead (mistake no. 3) -- "it won't hurt". But it hurt badly! The N9 get stuck at the NOKIA logo -- nothing happened anymore. (So at that moment no boot-loop.) Damn!


I searched the internet and found some options I have:
  • put the device in R&D mode with flasher (http://talk.maemo.org/showthread.php?t=85596), trying with "no-lifeguard-reset" set or cleared.
    => that enabled some fancy messages, but didn't help to boot the device.
  • flash a rescue system (http://wiki.meego.com/N950/Fixing_MALF_state)
    => sounded very promising and device was recognized by my linux box:

    Code:

    [262423.057512] usb 1-8: Product: Nokia N9
    [262423.057514] usb 1-8: Manufacturer: Nokia
    [262423.057516] usb 1-8: SerialNumber: 357923046591014
    [262423.067414] scsi26 : usb-storage 1-8:1.0
    [262424.069077] scsi 26:0:0:0: Direct-Access    Nokia    Nokia N9        0316 PQ: 0 ANSI: 2
    [262424.071939] sd 26:0:0:0: Attached scsi generic sg9 type 0
    [262424.076530] sd 26:0:0:0: [sdh] Attached SCSI removable disk

    BUT: sdh didn't show up in /proc/partitions.
    According to this (german) site (http://opensmartpad.org/meego/howtos...ll-backup.html) that rescue system does not work with the 16GB version of the N9! *@@$$!!!
  • tried the MOSLO kernel (http://talk.maemo.org/showpost.php?p...&postcount=457)
    => no luck either, but I tried this time with windows, as I never used networking via USB under linux.
  • flashed the firmware (but not the MMC, I want my data alive!)
    => N9 gets stuck at the NOKIA logo, LED lits and then reboots again.

I have no more ideas, but I deeply hope some of the pros in this forum have another one.

Especially I'm interested, if somebody can confirm that the approach with the rescue initrd is working also with 16GB devices.

My phone is not SIM locked, but however I have MfE accounts setup (which can trigger the device lock, according to a page I did not find anymore).

Thanks a lot in advance!

myname24 2013-03-28 20:57

Re: How to rescue MyDocs from Nokia N9 16GB?
 
try again the moslo kernel but on linux because it will only work in linux . I used it to recover files from my damaged-screen N9 .

mpy 2013-03-28 22:15

Re: How to rescue MyDocs from Nokia N9 16GB?
 
Thanks for your answer! I'll give the MOSLO kernel another try. Today I was not sure, what to expect. Should the device boot into some kind of command line or is this "Warning you modified your device" screen the final state?

The README says you should do "sudo ifconfig usb0 192.168.2.14" -- do you remember, if one needs a special kernel module? The default debian kernel does not offer a network device usb0...

Hurrian 2013-03-29 00:10

Re: How to rescue MyDocs from Nokia N9 16GB?
 
IIRC g_multi (the kernel module which exposes a USB Composite Device with a USB Ethernet and USB Mass Storage device) is supported by the host-side Linux drivers for RNDIS or CDC ACM.

juiceme 2013-03-29 07:52

Re: How to rescue MyDocs from Nokia N9 16GB?
 
Quote:

Originally Posted by mpy (Post 1332666)
Thanks for your answer! I'll give the MOSLO kernel another try. Today I was not sure, what to expect. Should the device boot into some kind of command line or is this "Warning you modified your device" screen the final state?

The README says you should do "sudo ifconfig usb0 192.168.2.14" -- do you remember, if one needs a special kernel module? The default debian kernel does not offer a network device usb0...

When you boot the device with the MOSLO rescue kernel, it does 2 things, firstly it exports all your partitions like the Fix-MALF kernel, and additionally it allows you to telnet into the device via USB.

If the correct module is as Hurrian says the rndis or cdc-acm module, both are available on latest stable:

Code:

juice@neumi:~$
juice@neumi:~$ cat /etc/debian_version
6.0.6
juice@neumi:~$
juice@neumi:~$ uname -a
Linux neumi 3.2.0-0.bpo.2-686-pae #1 SMP Sat Jun 30 08:29:17 UTC 2012 i686 GNU/Linux
juice@neumi:~$
juice@neumi:~$ find /lib/modules/3.2.0-0.bpo.2-686-pae | grep -e cdc-acm -e ndis
/lib/modules/3.2.0-0.bpo.2-686-pae/kernel/drivers/net/usb/rndis_host.ko
/lib/modules/3.2.0-0.bpo.2-686-pae/kernel/drivers/net/wireless/rndis_wlan.ko
/lib/modules/3.2.0-0.bpo.2-686-pae/kernel/drivers/usb/class/cdc-acm.ko
juice@neumi:~$


mpy 2013-03-29 12:29

Re: How to rescue MyDocs from Nokia N9 16GB?
 
I tried the MOSLO kernel again, with Debian 7 (Wheezy), Knoppix 7 (also Debian based) and another LIVE-Rescue-System (probably Gentoo kernel).

The modules you both mentioned are present and load w/o error. However after the flashing of the MOSLO kernel, dmesg tells me:

Code:

[  202.780040] usb 2-2: new high-speed USB device number 4 using ehci_hcd
[  202.904244] usb 2-2: unable to get BOS descriptor
[  202.905367] usb 2-2: New USB device found, idVendor=0421, idProduct=0106
[  202.905376] usb 2-2: New USB device strings: Mfr=34, Product=38, SerialNumber=0
[  202.905384] usb 2-2: Product: Nokia USB ROM
[  202.905391] usb 2-2: Manufacturer: Nokia
[  205.905888] usb 2-2: USB disconnect, device number 4
[  207.723401] usb 2-2: new high-speed USB device number 5 using ehci_hcd
[  207.853782] usb 2-2: New USB device found, idVendor=0421, idProduct=0105
[  207.853792] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[  207.853800] usb 2-2: Product: N9 (Update mode)
[  207.853807] usb 2-2: Manufacturer: Nokia
[  207.853814] usb 2-2: SerialNumber: 3579***********
[  208.476565] usb 2-2: USB disconnect, device number 5
[  209.961452] NET: Registered protocol family 35
[  210.051338] usbcore: registered new interface driver cdc_phonet

Especially the immediate "USB disconnect" looks bad, and no usb0 interface was shown up. (At that point I really hated the N9 for not having a simple µSD-Card for Data storage!)

Also the USB Mass Storage Mode only works as far as that of the Fix-MALF kernel (initial post), no possibility to read the reported SCSI device /dev/sdb.

After searching some more about that latter problem, I stumbled over a forum post (http://debianforum.de/forum/viewtopic.php?f=13&t=131373, german) describing a very similar behavior with a simple USB stick -- the bottom line was: Flash Memory damaged, Data lost, Stick dumped to landfill :(

I think I have to look for a replacement, too. Perhaps I can get a (screen) broken unit on ebay...

Thanks again for your hints!

juiceme 2013-03-29 15:47

Re: How to rescue MyDocs from Nokia N9 16GB?
 
Yes, it looks that your USB interface or the flash memory might be broken, if neither Fix-MALF or MOSLO method export anything to your computer. Too bad.

Apart from the USB bus, there is nothing much you can do. There is serial maintanance connection pins under the SIM tray, but you need a special adapter to access that interface.

rainisto 2013-03-29 20:10

Re: How to rescue MyDocs from Nokia N9 16GB?
 
multiple options:
- telnet into moslo kernel rescue mode and check partitions from there

- rescue kernel, most likely you should not see anything in proc/partitions, did you even try to mount the whole device and/or check with fdisk how it looked?

vs trickier version
- connect serial ttl converter to rx & tx pins and login to serial console and do magic in there.

juiceme 2013-03-29 20:22

Re: How to rescue MyDocs from Nokia N9 16GB?
 
Quote:

Originally Posted by rainisto (Post 1332853)
vs trickier version
- connect serial ttl converter to rx & tx pins and login to serial console and do magic in there.

Well, he already tried rescue kernel and moslo kernel, and neither exported the FS'es or allowed telnet in... It looks to me there could be something wrong with his USB port...

rainisto 2013-03-29 20:46

Re: How to rescue MyDocs from Nokia N9 16GB?
 
1st post said that it exported sdh, thats why I was asking that did he do fdisk on /dev/sdh.

And most likely its just debian usbnetworking which sucks, maybe he should try ubuntu or something.

juiceme 2013-03-29 21:03

Re: How to rescue MyDocs from Nokia N9 16GB?
 
Quote:

Originally Posted by rainisto (Post 1332861)
1st post said that it exported sdh, thats why I was asking that did he do fdisk on /dev/sdh.

And most likely its just debian usbnetworking which sucks, maybe he should try ubuntu or something.

Granted, it's possible debian doesn't handle it correctly. I have to admit I have always used Ubuntu for connecting to my device in rescue mode since my laptop runs 12.04. I do have several pure Debian 6.0.6 installations but they are run on machines I use just remontely.

mpy 2013-03-30 10:43

Re: How to rescue MyDocs from Nokia N9 16GB?
 
Quote:

Originally Posted by rainisto (Post 1332853)
- rescue kernel, (...) did you even try to mount the whole device and/or check with fdisk how it looked?

Indeed, I tried to read the whole device with sfdisk (cannot read device) and testdisk (device does not show up at all). And after some time, the device even vanished out of /dev. I think that is connected to the kernel message: "[ 208.476565] usb 2-2: USB disconnect, device number 5"

Quote:

Originally Posted by rainisto (Post 1332853)
- connect serial ttl converter to rx & tx pins and login to serial console and do magic in there.

I think I'll give that a try... can't get worse ;) Is the serial console enabled with MALF and MOSLO kernel or even with NOKIA kernel? I stumbled over a R&D flag in flasher:
Code:

flasher --set-rd-flags=serial-console
I suppose that flag must be set? Apart from that, can you direct me to some link... okay, searching TMO helps. I found your post (http://talk.maemo.org/showpost.php?p...39&postcount=2) giving the essentials :)

Quote:

Originally Posted by juiceme (Post 1332857)
It looks to me there could be something wrong with his USB port...

I really hope that that's the case, and the flash memory is still fine!

Quote:

Originally Posted by rainisto (Post 1332861)
And most likely its just debian usbnetworking which sucks, maybe he should try ubuntu or something.

Quote:

Originally Posted by juiceme (Post 1332862)
I have always used Ubuntu for connecting to my device in rescue mode since my laptop runs 12.04.

Fine, I used Debian and Gentoo kernels, but no one from Ubuntu. I'll try that first. Unfortunately I have no other device I can test with, but thanks for the explicit Ubuntu version number!

juiceme 2013-03-30 20:49

Re: How to rescue MyDocs from Nokia N9 16GB?
 
Quote:

Originally Posted by mpy (Post 1332945)
Quote:

Originally Posted by rainisto (Post 1332853)
- connect serial ttl converter to rx & tx pins and login to serial console and do magic in there.

I think I'll give that a try... can't get worse ;) Is the serial console enabled with MALF and MOSLO kernel or even with NOKIA kernel? I stumbled over a R&D flag in flasher:
Code:

flasher --set-rd-flags=serial-console
I suppose that flag must be set?

There serial console can also be activated on the default Harmattan kernel. The tricky part is the physical connection. When you remove the sim tray you can see the contacts on the PCB edge. The levels are 3v3 TTL, so you need a level shifter (or 3 volt TTL <-> USB serial) adapter between the device and your computer.

mpy 2015-12-28 17:38

Re: How to rescue MyDocs from Nokia N9 16GB?
 
So, only 33 month later I can report the outcome of my efforts with my bricked N9/16GB.

Perhaps for future visitors which are interested in this topic (more and more unlikely as time goes by), but mainly to give the guys an update who helped a lot (hopefully you are still subscribed to this thread).

Cut a long story short: I was able to rescue my phone and also my data :)

But much less spectacular than you might think:

After digging through the schematic and the layout to find the serial rx/tx port (my thought-so last resort), I though it would be a good idea to fresh up my memory how the phone behaves when booted via the flasher. So, I tried to boot the bare mainboard via the flasher (under Debiab GNU/Linux 8.2 (jessie)):

Code:

flasher -l -b --enable-rd-mode --set-rd-flags=serial-console --suppress-warranty-warning -k malf/vmlinuz-2.6.32.20112201-11.2-adaptation-n950-bootloader -n malf/initrd.img-rescue-2.6.32.20112201-11.2-n950
(This could be, but must not be the command I used before, because I didn't documented it back then)

And, just by accident the volumes of my phone popped up after some time! Just for a few seconds, but reproducible after a reboot, so that was enough to rescue the important files I was after and to fix the issue with ~/.profile.

I put the mainboard back in its case and my thought-dead N9/16GB was back to life again. No problems what-so-ever! Either it was some self-healing over the years (that's my favorite guess ;) ), I did something wrong with the flasher back then because I had blinders on or some kernel update on my computer helped. I don't know.

So, the lesson is clear:

- the MALF kernel works also on the Nokia N9 with only 16GB
- and most important: Don't ever mess with the .profile file!


Thanks to those who answerd my questions patiently, especially juiceme :)

juiceme 2015-12-28 19:06

Re: How to rescue MyDocs from Nokia N9 16GB?
 
Excellent, I am so happy you managed to finally do it :D
And incidentally, this probably is the longest duration a fix took, indeed 2-and-3/4-years!


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

vBulletin® Version 3.8.8