maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   recovering N900 after emmc broken (https://talk.maemo.org/showthread.php?t=83197)

ired 2012-03-22 21:07

recovering N900 after emmc broken
 
I managed to kill the emmc of my N900 after dropping it a few days ago :(

Got it into "semi-working" state by using information in this thread:
http://talk.maemo.org/showthread.php?t=69081

Basicly I have /home swap and MyDocs on a 8g sdcard.
It mostly works, but there is 1 small and 1 bigger problem.

small: camera app cannot save image:
General Settings: save target selector shows "Memory in use"

big: conversations, gtalk/skype doesn't work; clicking on a "Skype/gtalk IM/call" button in a contact just drops me back to the contacts list;
incoming skype calls don't ring; ims are not received
sms works


relevant lines from "mount"
/dev/mmcblk1p2 on /home type ext3 (rw,noatime,errors=continue,commit=1,data=writebac k)
/dev/mmcblk0p1 on /home/user/MyDocs type vfat (utf8,uid=29999,shortname=mixed,dmask=000,fmask=01 33)
/home/opt on /opt type none (bind)

notice /home/user/MyDocs mounted from mmcblk_0_p1
that's actually blk1, i just modified /etc/event.d/rcS-late to make a link and mount that


any idea what causes this? how could I fix it, or maybe how to diagnose the exact cause?

ired 2012-03-24 13:32

Re: recovering N900 after emmc broken
 
here is a log from dbus-monitor --session when pressing a gtalk chat or skype call button in the contacts manager:


Code:

method call sender=:1.75 -> dest=org.freedesktop.Telepathy.AccountManager serial=113 path=/org/freedesktop/Telepathy/Account/gabble/jabber/--removed--; interface=com.nokia.Account.Interface.ChannelRequests; member=EnsureChannel
  array [
      dict entry(
        string "org.freedesktop.Telepathy.Channel.TargetHandleType"
        variant            uint32 1
      )
      dict entry(
        string "org.freedesktop.Telepathy.Channel.TargetID"
        variant            string "--removed gmail account---@gmail.com"
      )
      dict entry(
        string "org.freedesktop.Telepathy.Channel.ChannelType"
        variant            string "org.freedesktop.Telepathy.Channel.Type.Text"
      )
  ]
  uint64 1388064
  string ""
error sender=:1.20 -> dest=:1.75 error_name=com.nokia.MissionControl.Errors.Lowmem reply_serial=113
  string "Insufficient memory"
method call sender=:1.75 -> dest=org.freedesktop.Telepathy.AccountManager serial=114 path=/org/freedesktop/Telepathy/Account/spirit/skype/--removed--; interface=com.nokia.Account.Interface.ChannelRequests; member=Create
  array [
      dict entry(
        string "org.freedesktop.Telepathy.Channel.TargetHandleType"
        variant            uint32 1
      )
      dict entry(
        string "org.freedesktop.Telepathy.Channel.TargetID"
        variant            string "--removed skype handle--"
      )
      dict entry(
        string "org.freedesktop.Telepathy.Channel.ChannelType"
        variant            string "org.freedesktop.Telepathy.Channel.Type.StreamedMedia"
      )
  ]
  uint64 1413766
  string ""
error sender=:1.20 -> dest=:1.75 error_name=com.nokia.MissionControl.Errors.Lowmem reply_serial=114
  string "Insufficient memory"

Code:

Nokia-N900:/home/user# free
              total        used        free      shared      buffers
  Mem:      245268      237944        7324            0        7140
 Swap:      822360        3036      819324
Total:      1067628      240980      826648

sd card remapped to mmcblk0 with these /etc/event.d/rcS-late modifications:

Code:

    mv /dev/mmcblk1 /dev/mmcblk0
    mv /dev/mmcblk1p1 /dev/mmcblk0p1
    mv /dev/mmcblk1p2 /dev/mmcblk0p2
    mv /dev/mmcblk1p3 /dev/mmcblk0p3
    echo "/dev/mmcblk0p2 /home ext3 rw,noatime,errors=continue,commit=1,data=writeback 0 0" >> $tmp_fstab
    echo "/home/opt /opt none bind" >> $tmp_fstab
    echo "/dev/mmcblk0p1 /home/user/MyDocs vfat nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,gid=29999,shortname=mixed,dmask=000,fmask=0133,rodir 0 0" >> $tmp_fstab




Code:

Nokia-N900:/home/user# mount
rootfs on / type rootfs (rw)
ubi0:rootfs on / type ubifs (rw,bulk_read,no_chk_data_crc)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /tmp type tmpfs (rw,noatime,size=20480k)
tmpfs on /var/run type tmpfs (rw,nosuid,noatime,size=5120k,mode=755)
none on /dev type tmpfs (rw,noatime,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noatime,size=65536k)
/dev/mmcblk0p2 on /home type ext3 (rw,noatime,errors=continue,commit=1,data=writeback)
/dev/mmcblk0p1 on /home/user/MyDocs type vfat (nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,gid=29999,shortname=mixed,dmask=000,fmask=0133,rodir)
/home/opt on /opt type none (bind)
nodev on /sys/kernel/debug type debugfs (0)
/opt/pymaemo/usr/lib/python2.5 on /usr/lib/python2.5 type bind (bind)
/opt/pymaemo/usr/share/pyshared on /usr/share/pyshared type bind (bind)
/opt/pymaemo/usr/lib/pyshared on /usr/lib/pyshared type bind (bind)
/opt/pymaemo/usr/share/python-support on /usr/share/python-support type bind (bind)
/opt/pymaemo/usr/lib/python-support on /usr/lib/python-support type bind (bind)


any idea what may cause these Insufficient Memory errors?

ired 2012-03-24 21:14

Re: recovering N900 after emmc broken
 
So, I managed to get the N900 working, after emmc has been broken..

1, turn on rd-mode on device (to be able to run sudo gainroot)
flasher --enable-rd-mode
2, flash vanilla image
flasher -F ..COMBINED...bin -f -R
3, device boots up, insert SD card formatted with n900 compatible layout:
p1: vfat
p2: ext3
p3: swap

4, edit /lib/udev/mmc_id shell script, swap the SLOT_NUM="1"/"0" lines.
this will mostly trick the device to behave as if the sd-card was the internal mmc

5, reboot, device will auto-optify (take a few minutes)
the sdcard p1 will be mounted as /media/mmc1 (I'm not sure how it knows it, when it's present on mmcblk_0_p1
so I'm not sure which init script is still detecting this..
nothing is mounted on /home/user/MyDocs..
but camera will save images to "Memory card" and instant messages/skype calls work!

--------
problems:
USB storage will probably not work, I'm not willing to try it now :)

--
will upgrade to CSSU, hope it doesn't break anything

gng554 2012-03-24 22:38

Re: recovering N900 after emmc broken
 
Thanks for posting this

Just a few questions

How much the p1,p2,p3 partitions should be?

And I didn't quit understand this step

4, edit /lib/udev/mmc_id shell script, swap the SLOT_NUM="1"/"0" lines

And after this fix I won't have to use the emmcworkaround scripts made by Durango right?

ired 2012-03-24 22:56

Re: recovering N900 after emmc broken
 
step 2; it's not the VANILLA image, but the COMBINED, you need. sorry I was writing from memory..

partitions: use the partitioning guide in Durango's emmcworkaround; actually if you already gone through that, your current partitions will be ok.
It makes sense do a
sudo gainroot
mount -t ext3 /dev/mmcblk1p2 /mnt
rm -rf /mnt/*
after the first boot, so the auto-optify works on an empty /home

step 4,
(set up connectivity; gprs or wifi)
sudo gainroot
swapon /dev/mmcblk1p3
apt-get update
apt-get install rootsh mc
mcedit /lib/udev/mmc_id

this is shell script that's called by udev to number the internal mmc/external sd
if will make sense when you open it, you just swap the numbering; so the external sd is numbered as mmcblk0 on next reboot; swap and /home will be mounted just fine; auto-optify will run
and most things should work.

--
it's only the partitioning guide you're going to use, from emmcworkaround; you should not to run any of the scripts except (if you want) the script that removes unneded packages (games/fonts)

gng554 2012-03-25 16:16

Re: recovering N900 after emmc broken
 
man you are the best :D

all works well now !!!

just a question, should I turn off the rd mode? as the keyboard is always lit in this mode. If yes how?? using the same command?

also did anything go wrong after that u install CSSU?

ired 2012-03-25 18:51

Re: recovering N900 after emmc broken
 
yes, you should turn off rd mode (it's only required so you're able to do a sudo gainroot right after the reflash)
flasher --disable-rd-mode
cssu and kernel-power install didn't cause any problems for me

ayney 2012-03-29 13:02

Re: recovering N900 after emmc broken
 
when i try to call the 'skype call test' it says 'not enough memory',

and the swap partition don't auto mount?

please help thanks

ired 2012-04-04 14:25

Re: recovering N900 after emmc broken
 
what did you exactly do?

you need to provide more information if you want help.

ayney 2012-04-04 16:30

Re: recovering N900 after emmc broken
 
1.) I flash my n900 with latest combined.bin
2.) I install rootsh and leafpad to edit /lib/udev/mmc_id then reboot
3.) camera don't work because the swap partition don't mount itself
so i use the setupswap script from emmcworkaround.zip but edit the file to mount /dev/mmcblk0p3 as swap.

when i try skype, it logins just fine, but when i try to make a call the notification said "not enough memory".

thanks


All times are GMT. The time now is 12:42.

vBulletin® Version 3.8.8