Rockbox Technical Forums

Third Party => Repairing and Upgrading Rockbox Capable Players => Topic started by: Darko on October 25, 2011, 10:01:46 PM

Title: [Tutorial] Sandisk Sansa Clip v2 Rockbox Unbrick Recovery Procedure
Post by: Darko on October 25, 2011, 10:01:46 PM
This tutorial is free to copy, link to and distribute as long as you credit people mentioned here.

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

WARNING: Before you decide to install Rockbox on your Sandisk Sansa Clip v2, read other people's experiences. Restrain yourself from impatience and hurry. Original Firmware Sansa is still better than a bricked one. :)

WARNING: The steps presented here are a "last resort" repair guide (beside JTAG magic). Be patient and wait for several days, even weeks, before you make a final decision to open your Sansa Clip v2 and repair it this way. Learn from my  mistake.

WARNING: This tutorial assumes you have following skills:

10 Confident at opening and managing fine miniature electronic devices
20 Have solid soldering/unsoldering skills of fine wires in a crowded space


If you lack any of this required skills, DO NOT engage in repairing process - instead pass it to a skilled electronic engineer or repair person and print this tutorial for him! Chances are you will mechanically damage your player or unintentionally cut tiny battery wires, effectivly rendering your player beyond easy repair. DO NOT short-circuit the battery! This may damage charging-control circuit resting on battery's body. Wires are very near each other, pay close attention to black and red wire. When you un-solder black (ground) wire, be carefull that it does not touch red wire by accidental move.

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

NOTICE: This tutorial assumes you are running Windows Operating System and you have Sandisk Sansa Clip v2 1GB model. This is important because all units (Megabytes) and values are a reference to it. If you have 2GB/4GB/8GB model values should be higher -- this is only my logical guess! If you are running  Linux already, some steps obviously do not apply (like booting up into Linux).

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

tags: Sandisk Sansa Clip v2 Rockbox Recovery Repair Help

Post Merge: October 25, 2011, 10:03:23 PM

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

REPAIR PROCEDURE (BRIEF)

10 Download Ubuntu Linux Live CD distribution (http://www.ubuntu.com/) and burn it with slower speeds (12x-32x) on a high-quality CD-R disc (Verbatim, Taiyo-Yuden etc.)

20 Download latest Original Firmware ("OF" in further text) image ("clip02.01.35.zip", when unzipped becomes "m30pa.bin") from here http://daniel.haxx.se/sansa/amsfw.html and put it in a root of your C:\ drive under Windows

30 Open your Sansa Clip with a surgical knife or plastic pry tool (pry tool is preffered, but skilled persons can gently use sharp metal knife or "scalpel"). Follow this video tutorial by IRISH0627 on YouTube http://www.youtube.com/watch?v=6LRyDOxbdCI . Good news: you do not need to dissasamble entire device - only "first layer".

301 Open back-panel plastic case
302 gently push battery to un-stick it from bottom sticky-tape
303 Remove 5 screws from the aluminium heatsink
304 Remove heatsink
305 Unsolder "minus" black-colour wire from Battery.

Soldering Advice: do it quickly, do not overheat nearby circuits. Also, when soldering black wire back (after flashing firmware) do not try to be machine-precise! Solder it as quickly as possible and as good as possible! The more you fiddle with this tiny wires the greater the chance is to accidentally push battery on a side and physicaly damage the wires! Stay calm and confident with your work.

(http://img535.imageshack.us/img535/8759/directview.th.jpg) (http://imageshack.us/photo/my-images/535/directview.jpg/) (http://img515.imageshack.us/img515/1329/sansaclipopened.th.jpg) (http://imageshack.us/photo/my-images/515/sansaclipopened.jpg/) (http://img821.imageshack.us/img821/436/sansaclipopenedinstruct.th.jpg) (http://imageshack.us/photo/my-images/821/sansaclipopenedinstruct.jpg/)

40 Short-circuit NAND memory chip and induce special recovery mode exactly as described in this forum topic http://forums.rockbox.org/index.php?topic=25248.0 [or direct link to Fugu's post http://forums.rockbox.org/index.php/topic,25248.msg172403.html#msg172403] (thanks Fugu!). If you are doing this while running Windows, your device should be recognised as "M200Plus" UNDEF storage USB device with 979.75MB (approx. 980MB) of unallocated space. Do not format it.*

(http://img21.imageshack.us/img21/6453/m200plususbdeview.th.png) (http://imageshack.us/photo/my-images/21/m200plususbdeview.png/)

* There is no danger in doing that, as it proved in my case, but there is no point in doing it either. Use Quick Format and FAT32 if you must feed your curiousity, you will effectively turn your MP3 player into a Flash Disk drive with 980* MB of space. Now, you copy some files on it as a test... (I did! I did! And then again run Rockobox wizzard and installed Rockbox again with "all good" message in the tool at the end, but Sansa was still black afterwards with no success obviously - luckily, my old songs were still intact -- can you imagine a crazy amount of luck I had? Plausable explanation: NAND chips contain wear-leveling controllers with a single task to spread memory cells usage even onto entire chip, so this is probably the only reason why my songs and .rockbox files survived! So, when you format it, and your curiosity is behind, now you need to "unformat it" again and restore it in an unallocated state as before by deleting entire partition. Windows will not allow you to do that, so boot Mini Linux from Hiren's Boot CD, start GPartition and delete it from there. Probably, there is a GPartition inside Ubuntu, I leave that part for you to discover -- or just do not format it and skip this entire adventure as best :)


50 Insert Live Linux CD and reboot you computer

60 Start Linux Terminal & execute several commands

70 Execute dd command and restore Original Firmware (m30pa.bin) to Sansa Clip v2 player

80 Wait untill you get feedback information in Terminal window that 16 MB of data are succesfully copied (usually takes around 60-80 seconds depending on USB & computer speed)

90 Disconnect Sansa Clip from USB

100 Gently short the unsoldered battery wire to correct PCB joint (with metallic object such as small screw-driver) and push the Power-On switch to see if the procedure was succesfull. Be shure you are making firm and uninterupted contact with the Battery all the time. LED & LCD should be activated and all your songs (if you copied any), folders and files should be there intact. Turn-Off player.

110 Re-solder battery wire and re-assemble Sansa Clip v2 in exact reverse of step 30

(http://img510.imageshack.us/img510/2206/batteryassembled.th.jpg) (http://imageshack.us/photo/my-images/510/batteryassembled.jpg/) (http://img27.imageshack.us/img27/2282/finalcheck.th.jpg) (http://imageshack.us/photo/my-images/27/finalcheck.jpg/) (http://img522.imageshack.us/img522/8671/restoredhappines.th.jpg) (http://imageshack.us/photo/my-images/522/restoredhappines.jpg/) (http://img148.imageshack.us/img148/4530/backtolife.th.jpg) (http://imageshack.us/photo/my-images/148/backtolife.jpg/) (http://img513.imageshack.us/img513/6462/afterrockbox.th.png) (http://imageshack.us/photo/my-images/513/afterrockbox.png/)
------------------------------------------------------------------------------------------------------------------

STEP 60...90: DETAILED PROCEDURE

Assuming Sansa Clip v2 is still connected as unrecognised/unallocated USB drive and you just rebooted into Linux:

601 After Ubuntu Linux Live CD distribution boots up, you will see regular desktop with a ribbon and common tasks and programs like Firefox. Run Firefox and connect to Rockbox IRC channel if you need assitance from good people here.

602 Click on a Dashboard > Search, then type "Terminal". Click on "Terminal" icon to run it.

#The next step is optional, but since you are here, open another instance of Terminal (right click with your mouse over the old instance and click Terminal, or, again start Dashboard > Search > Terminal). In this new Terminal window type Funman's script for real-time monitoring of USB devices:

603 sudo su -c "while : ;do dmesg -c;read -t 1 && clear;done"

#The next idea is to find out "where" is our USB player connected, what "drive letter" equivalent it has (sda, sdb, sdc, sde etc.) so we can confidently run dd-command and restore OF to the right target. You do not want to restore firmware on your Windows C:\ drive by accident! Also, another idea is to "mount" our C:\ partition so Linux can access m30pa.bin OF file via dd-command. This procedure is tricky part currently not documented in SansaAMSunbrick wiki page and that was a point of confusion for me. Thanks to good people over at IRC channel, I succedeed in "dd-ing" my Sansa player.

Let's start! Type these commands in Terminal window:

604 sudo fdisk -l

#result:
Code: [Select]
Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders, total 78140160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x671e671e
 
Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    15101099     7550518+   7  HPFS/NTFS/exFAT
/dev/sda2        15101100    78140159    31519530    5  Extended
/dev/sda5        15101163    78140159    31519498+   7  HPFS/NTFS/exFAT

Disk /dev/sdb: 1027 MB, 1027342336 bytes
32 heads, 62 sectors/track, 1011 cylinders, total 2006528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
 
Disk /dev/sdb doesn't contain a valid partition table

ubuntu@ubuntu:~$ ^C
ubuntu@ubuntu:~$

# as you can see, I have a 40 GB hard-disk drive (SATA interface, system drive) with 2 partitions (sda1=7GB and sda2/sda5=33GB) and "1027 MB" Sansa Clip which "does not contain valid partition table" (remember that unallocated space?). Important thing here for a dd-command is to notice "/dev/sdb" path. That is the address of my player. Also, remember that I have put "m30pa.bin" Original Firmware file at the root of my C:\ drive in Windows (1st partition).

# The next part I do not understand entirely, since I am Linux newbie, but I think this procedure will create a temporary folder on which we will "mount" our "C:\" partition so Linux can access it via dd-command. [someone correct me if I am wrong] (thanks to bluebrother & AlexP!)

605 sudo su -
606 mkdir /tmp/sda1 && mount /dev/sda1 /tmp/sda1
607 mount /dev/sda1 /tmp/sda1
608 ls -l /tmp/sda1

#result:
Code: [Select]
root@ubuntu:~# ls -l /tmp/sda1
total 2110893
-rwxrwxrwx 1 root root          0 2009-06-13 04:53 AUTOEXEC.BAT
-rwxrwxrwx 1 root root        216 2009-06-14 07:24 boot.ini
-rwxrwxrwx 1 root root          0 2009-06-13 04:53 CONFIG.SYS
-rwxrwxrwx 1 root root          0 2011-09-05 19:04 debug.txt
drwxrwxrwx 1 root root       4096 2009-06-13 04:59 Documents and Settings
-rwxrwxrwx 2 root root         67 2011-09-05 18:44 HGSounds_Scales_Path.txt
-rwxrwxrwx 1 root root          0 2009-06-13 04:53 IO.SYS
-rwxrwxrwx 1 root root   15728640 2010-01-29 16:54 m30pa.bin
-rwxrwxrwx 1 root root          0 2009-06-13 04:53 MSDOS.SYS
-rwxrwxrwx 1 root root      47564 2008-04-13 21:13 NTDETECT.COM
-rwxrwxrwx 1 root root     250048 2008-04-13 23:01 ntldr
-rwxrwxrwx 1 root root 2145386496 2011-10-25 05:10 pagefile.sys
drwxrwxrwx 1 root root      24576 2011-10-24 00:02 Program Files
drwxrwxrwx 1 root root          0 2009-06-13 05:03 RECYCLER
drwxrwxrwx 1 root root       4096 2009-06-13 05:11 System Volume Information
drwxrwxrwx 1 root root     102400 2011-10-25 20:05 WINDOWS
root@ubuntu:~#

#So, everything went fine, and as you can clearly see from above, original firmware file is clearly where I've put it, except now it can be accessed via dd-command.

#NOW IT IS TIME TO USE "DD" and put Original Firmware back to Sansa!

70 dd if=/tmp/sda1/m30pa.bin of=/dev/sdb

80 wait around 60-80 seconds untill you get this message:
Code: [Select]
root@ubuntu:~# dd if=/tmp/sda1/m30pa.bin of=/dev/sdb
30720+0 records in
30720+0 records out
15728640 bytes (16 MB) copied, 70.9951 s, 222 kB/s
root@ubuntu:~#

#Now, you still cannot turn it on (battery is still unsoldered), but first look at the Funman's script.
You should see a new line similar to this:

Code: [Select]
[ 2321.468924] scsi 5:0:0:0: Direct-Access SanDisk Sansa Clip 1GB v02. PQ: 0 ANSI: 0

#So it is recognised as Sansa Clip, that line was not there before when you first plugged it in!

90 Disconnect your Sansa Clip v2 and skip to step 100 described above. Pray!

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

I wish to thank following people from IRC and forums: Saint, saratoga, gevaerts [initial Linux support and help with finding Terminal and commands], AlexP and especially bluebrother for guiding me through "dd" command process! BIG THANKS! I own them that "bear".
Title: Re: [Tutorial] Sandisk Sansa Clip v2 Rockbox Unbrick Recovery Procedure
Post by: Chronon on October 25, 2011, 10:52:33 PM
It looks like you put a bit of work into this post.  Unfortunately, I'm afraid this might get lost on the forums.  Would you consider posting it to the wiki instead?  It will have a stable location and it will be easier for other people to make contributions.   :)
Title: Re: [Tutorial] Sandisk Sansa Clip v2 Rockbox Unbrick Recovery Procedure
Post by: Darko on October 25, 2011, 11:01:07 PM
Well, could I just copy/paste entire article over at Wiki? Will special formatting be lost at wiki? I still plan to add few more pictures to complete it, but I beleive this is it.
Title: Re: [Tutorial] Sandisk Sansa Clip v2 Rockbox Unbrick Recovery Procedure
Post by: Ste- on October 26, 2011, 04:20:19 AM
Also think it should be copied to the wiki.
Not sure if formatting will stay. Sure try and see and if not I'm sure someone will fix it for you.
IF you attach more pictures and are finished if you don't publish to the wiki I'd like to do so for others benefit. Adding a static link to images etc as opossed to image hosting sites that can go offline.
Title: Re: [Tutorial] Sandisk Sansa Clip v2 Rockbox Unbrick Recovery Procedure
Post by: Darko on October 27, 2011, 12:12:56 PM
Tutorial is now officially finished. I have added part with Funman's script initially missed, added some pictures and corrected some spelling/syntax errors for clarity. I was granted Wiki access and will put it there later this evening. I plan to put this tutorial as a branch from this section link:

http://www.rockbox.org/wiki/Main/SansaAMS#Unbricking

If anyone has a better suggestion please tell me.

edit: The core page has been created with some basic editing, still needs formating of text, pictures and url's *sigh*

http://www.rockbox.org/wiki/SansaClipV2UnbrickingTutorial
Title: Re: [Tutorial] Sandisk Sansa Clip v2 Rockbox Unbrick Recovery Procedure
Post by: Chronon on October 27, 2011, 05:09:12 PM
Thank you.  :)
Title: Re: [Tutorial] Sandisk Sansa Clip v2 Rockbox Unbrick Recovery Procedure
Post by: joy77division on October 18, 2013, 10:22:20 AM
For others who stumble upon this thread, I don't know if these actions are entirely necessary; at least, they weren't in my case. To others who fear that they may have "bricked" their SanDisk Sansa Clip v2, please see the following thread: http://forums.rockbox.org/index.php?action=post2;start=0;board=28.

Here's what I'd posted on that thread:

Quote from: jistme on March 22, 2013, 11:28:25 AM

(I can get it working into Sandisk firmware by holding 'back' button while powering on)

"THANK YOU!!! :D My SanDisk Sansa Clip v2 seems to be working again now with the original firmware! All I had to do was format the Clip as FAT32, download the latest v2 firmware image from SanDisk [and copy it to your SanDisk Sansa Clip v2, obviously], and hit the back button in order to get it to reboot and overwrite the ROCKbox firmware with the original firmware."
Title: Re: [Tutorial] Sandisk Sansa Clip v2 Rockbox Unbrick Recovery Procedure
Post by: Jackieflash on September 17, 2014, 01:58:26 PM
Sorry to bump this thread up again, but could you possibly link that topic again?  I get a "Start New Thread" window when I click on your link.  My Zip Clip was dead, dead, dead, but I just partially resurrected it via the back button and start button.  But now I'm not sure what I need to do next to get RockBox back...The screen says "refreshing your media" and has been there for several minutes....

Thanks a lot for the help so far!  I'm getting kinda sick of this little b*tch of a player by now...I never would have had to futz with it had the original installed software not gotten a deadly glitch.  Just not worth the hassle.
Title: Re: [Tutorial] Sandisk Sansa Clip v2 Rockbox Unbrick Recovery Procedure
Post by: Serenity on September 17, 2014, 09:57:22 PM
If you're able to get into the OF, you should be able to restore your player. Sometimes "Refreshing your media" stays for an uncomfortably long time. Let it run its course.

If it never finishes (after a day), power it down, hold the Select (center) button and plug it into your computer. Holding the center button forces the Zip's original firmware into MSC mode, after which you can try reinstalling Rockbox.