Rockbox Technical Forums

Rockbox Development => New Ports => Topic started by: Llorean on March 11, 2007, 07:08:30 PM

Title: Sandisk Sansa e200R
Post by: Llorean on March 11, 2007, 07:08:30 PM
This thread is for discussion of the problems still preventing Rockbox from running on the Sansa e200R.
Title: Re: Sandisk Sansa e200R
Post by: dan_a on March 11, 2007, 07:20:48 PM
There was talk about this on IRC - see this link (http://www.rockbox.org/irc/reader.pl?date=20070312#00:01:04) (the conversation between Bagder and donvito)
Title: Re: Sandisk Sansa e200R
Post by: donvito on March 11, 2007, 09:34:58 PM
Hey guys,

Basically what we were working on was to get the original bootloader to load, just to do a kind of "proof of concept" test with it.  

It's kind of boiling down to the signing and the "all plaintext" not working with the new BL...
Title: Re: Sandisk Sansa e200R
Post by: Bagder on March 12, 2007, 03:36:31 AM
The main obstacles seem to be:

* signing the mi4 with the "dummy" digital signature doesn't work. This implies that they fixed this flaw in the BL code. This is the exploit we've been using that has made it possible for us to load custom code without having to patch any existing firmware code since we cannot sign the mi4 with a legitimate key since it is 160 bit DSA and cracking that is time consuming beyond manageable.

* it looked like donvito could "upgrade" to the BL image we extracted from another R model. This proves that we have the right file name and the right image. However, when he modified a single byte in the BL image, it would no longer get recognized and upgraded to by the firmare. I guess this implies some kind of checksum/signature within the BL image that we can't worked out...
Title: Re: Sandisk Sansa e200R
Post by: Bagder on March 12, 2007, 05:37:19 AM
I got this amusing idea!

(warning warning warning this may harm your sansa quite a bit)

1. Boot your R model into manufacturing mode.
2. use e200tool to restore a vanilla e200 BL image

This might effectively turn the R model sansa into a vanilla model sansa.

3. Put a non-R model mi4 file on the device while in recovery mode.
4. Reboot and see if things still run.
5. Report the outcome here. If things go terribly wrong, try to recover the original R-model BL using e200tool. Don't blame me for any problems you may end up in.
Title: Re: Sandisk Sansa e200R
Post by: timmeh87 on March 12, 2007, 08:50:06 PM
How long would it take to crack a 160-bit DSA? This might be a crazy idea but what about making some sort of distributed computing effort? I seem to recall that dovoto or someone working on the Nintendo DS did the same thing to crack the encryption on the games...

Programming it is beyond my capability though :(
Title: Re: Sandisk Sansa e200R
Post by: Bagder on March 13, 2007, 09:26:15 AM
How long would it take to crack a 160-bit DSA?

It would take so insanely long time there's no need to waste brains on it. Compare with the 72bit RC5 challange on distributed.net . They have 7000 active hosts (but over 75000 over time) that's been cracking for 1500 days and they're reaching 0.4% of the total key space now!

I don't think I need to explain how much larger key space 160 bits is compared to 72 bits...
Title: Re: Sandisk Sansa e200R
Post by: Bagder on March 13, 2007, 09:31:07 AM
Dan A, me and MrH have been poking around (well I mostly talk while they poke) and we have been making some fun progress and have been able to convert a vanilla e200 to a e200R and back...

So, if we're lucky we might soon be able to replace the BL in e200R models with out custom-patched version, that will accept dummy-signed mi4 files.
Title: Re: Sandisk Sansa e200R
Post by: donvito on March 13, 2007, 01:17:20 PM
Bagder,

...AWESOME...

That is really good news, I will be on IRC for awhile this afternoon, maybe I'll catch you on there and we can talk.

As I've said, I'll be a "guinea pig" for this, because I am confident that I'll be able to unbrick.

donvito
Title: Re: Sandisk Sansa e200R
Post by: Downsider on March 13, 2007, 04:04:51 PM
I would test it, im DYING to get it to work on my e200r
Title: Re: Sandisk Sansa e200R
Post by: Destroyer14094 on March 18, 2007, 02:08:48 AM
Is there any way to get some kind of sansa e200r emulator that will run the firmware on windows and let me change that around so I don't end up bricking my sansa in the process of trying to get rockbox to work properly?
Title: Re: Sandisk Sansa e200R
Post by: saratoga on March 18, 2007, 03:41:58 AM
Is there any way to get some kind of sansa e200r emulator that will run the firmware on windows and let me change that around so I don't end up bricking my sansa in the process of trying to get rockbox to work properly?

Thats a good question.  Toni's emulator has been able to run the retail firmware for a good while now, but I believe hes only tried it on the non-R model.  Might be worth looking into:

http://www.rockbox.org/tracker/task/6524
Title: Re: Sandisk Sansa e200R
Post by: Bagder on March 18, 2007, 04:38:44 AM
Is there any way to get some kind of sansa e200r emulator that will run the firmware on windows and let me change that around so I don't end up bricking my sansa in the process of trying to get rockbox to work properly?

The problems we have to get Rockbox on the R models aren't really related to the firmware, but rather to the differences in the pre-bootloader. At least two people have already run the R model firmware on a vanilla e200 player.

Our problem is that we haven't yet managed to get an R model to load the rockbox bootloader and accept it as a fine mi4.
Title: Re: Sandisk Sansa e200R
Post by: DWHippster on March 25, 2007, 08:39:31 PM
Dan A, me and MrH have been poking around (well I mostly talk while they poke) and we have been making some fun progress and have been able to convert a vanilla e200 to a e200R and back...

So, if we're lucky we might soon be able to replace the BL in e200R models with out custom-patched version, that will accept dummy-signed mi4 files.

That sounds great! All I have to offer though is my best wishes on success.
And...thanks for yours and everyone else's efforts!
Title: Re: Sandisk Sansa e200R
Post by: eric_leseur on April 01, 2007, 06:09:18 PM
I tried to replace the firmware on an e250r with the firmware of an e250, but i just got "load main image failed." the easy fix is to just drag the old e250r firmware back to the player in recovery mode. :-[
Title: Re: Sandisk Sansa e200R
Post by: Bagder on April 02, 2007, 04:59:55 PM
I tried to replace the firmware on an e250r with the firmware of an e250, but i just got "load main image failed." the easy fix is to just drag the old e250r firmware back to the player in recovery mode. :-[

Let me repeat known facts:

1 - The R models have a different mi4 encryption key.

2 - The R models have fixed the digital signature flaw we exploit in the vanilla version so we can't sign the mi4 files to be accepted by the BL.

3 - The R models don't allow the BL to be updated in recovery mode.

4 - The R model mi4 files have different embedded magic numbers.

So blindly trying things won't do much good.

Title: Re: Sandisk Sansa e200R
Post by: xhozt on April 03, 2007, 02:47:25 AM
hmm can i toss something up here ...the R version has real/rhapsody helix drm in it and not just in the firmware from what real has told me . If its part of the hardware  helix drm is VERY open as far as licenceing and such .. could this be the slight diffrence that is preventing the bootloader from working ? ,,, ps im still willing to use my R as test fodder...
Title: Re: Sandisk Sansa e200R
Post by: Bagder on April 03, 2007, 07:49:31 AM
the R version has real/rhapsody helix drm in it and not just in the firmware from what real has told me .

I don't understand. You mean that there's a DRM key stored somewhere in the player, like in one of the flashes? I would actually assume something like that. Compare with the US iriver H300 models.

Quote
If its part of the hardware  helix drm is VERY open as far as licenceing and such ..

I don't understand this point.

Quote
could this be the slight diffrence that is preventing the bootloader from working ? ,,,

Please read my previous post in this thread. It detailed several aspects to why our bootloader doesn't work on the R model yet. If you can think of other reasons, please give us details.

Quote
im still willing to use my R as test fodder...

What are you waiting for exactly?
Title: Re: Sandisk Sansa e200R
Post by: xhozt on April 03, 2007, 02:20:57 PM
the R version has real/rhapsody helix drm in it and not just in the firmware from what real has told me .

I don't understand. You mean that there's a DRM key stored somewhere in the player, like in one of the flashes? I would actually assume something like that. Compare with the US iriver H300 models.

Quote
If its part of the hardware  helix drm is VERY open as far as licenceing and such ..

I don't understand this point.

Quote
could this be the slight diffrence that is preventing the bootloader from working ? ,,,

Please read my previous post in this thread. It detailed several aspects to why our bootloader doesn't work on the R model yet. If you can think of other reasons, please give us details.

Quote
im still willing to use my R as test fodder...

What are you waiting for exactly?

Sorry for not being clear

A. per Real/rhapsody there is DRM info stored on the actual hardware not just the firmware on the player

B. The diffrent DRM used on the R is called Helix and Its quite open source "helixcommunity.org"  this portion of the DRM may be the thing that diffrent about the pre/bootloader and more than likely we can get some help from the helix community if this is the case .

C. I think the helix DRM may be the diffrence thats causing the plaintext trick not to work

D. I have and will keep on trying any new firmware on my E250R and if any one has a idea they want to try on my player that may help get us moving along I will gladly use my player to get us there .


Better???
Title: Re: Sandisk Sansa e200R
Post by: Bagder on April 03, 2007, 04:07:41 PM
A. per Real/rhapsody there is DRM info stored on the actual hardware not just the firmware on the player

"DRM info" as in a unique key used for DRM purposes is most likely stored in one of the flash memories, yes.

Quote
B. The diffrent DRM used on the R is called Helix and Its quite open source "helixcommunity.org"  this portion of the DRM may be the thing that diffrent about the pre/bootloader and more than likely we can get some help from the helix community if this is the case .

I don't understand why you believe the DRM implementation has anything to do with the problems we have to run our bootloader on the R models. I've told you several matters that we have problems with. Can you please tell me how the particular DRM implementation changes any of that?

Quote
C. I think the helix DRM may be the diffrence thats causing the plaintext trick not to work

No. Go back and read up on what the "plaintext trick" is. It has nothing to do with DRM.

Quote
D. I have and will keep on trying any new firmware on my E250R and if any one has a idea they want to try on my player that may help get us moving along I will gladly use my player to get us there .

Here's a few ideas to start with:

1 - dump a boot rom from an R model
2 - compare the boot roms we have and figure out what the differences are
3 - figure out how you can convince your R model to accept a custom-patched version of the BL to force it to accept the "plaintext" trick again (we have such a one to test with)
4 - bring your own ideas and research and figure out how to run custom code
Title: Re: Sandisk Sansa e200R
Post by: Wyldfire on April 23, 2007, 05:06:25 PM
SNIP/

No. Go back and read up on what the "plaintext trick" is. It has nothing to do with DRM.

/SNIP

OK... Ive searched the forums... where is the info on the "plaintext trick"?  I can't seem to find it anywhere.
Title: Re: Sandisk Sansa e200R
Post by: Bagder on April 23, 2007, 05:23:20 PM
Quote
Ive searched the forums... where is the info on the "plaintext trick"?  I can't seem to find it anywhere.

See http://daniel.haxx.se/sansa/mi4.html check the description of the mi4 header at index 0x18
Title: Re: Sandisk Sansa e200R
Post by: xhozt on May 08, 2007, 05:25:48 AM
Quote
Ive searched the forums... where is the info on the "plaintext trick"?  I can't seem to find it anywhere.

See http://daniel.haxx.se/sansa/mi4.html check the description of the mi4 header at index 0x18
Ok after taking a break to clear my mind on working on this . I started over with this in mind

{0x18   32bit length of the plaintext part. The YH-920 mi4 file has zero there. Every other file has it 0x200. Most bootloaders seems to be OK with this value being the entire file's size and thus effectively removing encryption.}}

now i am thinking i see were the diffrences in the R may make this tricky {this is per a email chat i am having with a person over at real about the player he wants rockbox on the R also . } what we are thinking will need to be done is to try and find a way to trick the player into thinking its a regular e2XX , then it will  take the plaintext trick . but as has been said before without help from some one with a R with more experance than me in coding this is gonna take a good long time ..
Title: Re: Sandisk Sansa e200R
Post by: Bagder on May 08, 2007, 06:43:51 AM
now i am thinking i see were the diffrences in the R may make this tricky {this is per a email chat i am having with a person over at real about the player he wants rockbox on the R also . } what we are thinking will need to be done is to try and find a way to trick the player into thinking its a regular e2XX , then it will  take the plaintext trick . but as has been said before without help from some one with a R with more experance than me in coding this is gonna take a good long time ..

To "trick" an R model to become a vanilla model you need to flash a vanilla bootloader to it, and since the R models don't allow upgrading the bootloader you would need to use the e200tool approach or similar to attempt to do it.

Once we can put a custom bootloader there, we can put the regular R model bootloader there but with the key signing check patched out (we have such a binary lying around) and we should be able to boot Rockbox.

So again, this is all known facts to us. The problem we're facing is how to put a new bootloader on the R models.
Title: Re: Sandisk Sansa e200R
Post by: killermusic900 on June 01, 2007, 11:40:50 AM
i'm about to get my sansa returned, so i was just screwing around with it, and if you format the 16mb drive in recovery mode, it says LUN0 unlocked. does that mean anything?
Title: Re: Sandisk Sansa e200R
Post by: killermusic900 on June 06, 2007, 08:25:59 PM
sorry for double-posting, but can anyone get me a copy of their 250R's .txt file, the one you can access in recovery mode, with the version info and all that? I wanna try something.
Title: Re: Sandisk Sansa e200R
Post by: Avenged_One on June 09, 2007, 07:28:57 PM
Of course. :)

Here's a copy of the text within the file

Version Info: Product Rev.: PP5022AF-05.51-S301-01.01-RN01.02.165-D
Base Code: 05.51-S301-01.01-RN01.02.165-D
ODM Ver.: S301-01.01-RN01.02.165-D
OEM Ver.: RN01.02.165-D
Build Type: -D
Build Date: 2007.04.27
Build Number: (Build 32.10)                                                                                                                                                                                                                                                                            
Title: Re: Sandisk Sansa e200R
Post by: zajacattack on July 28, 2007, 08:46:37 PM
OK, I want to legitimately try something. Since it is possible to extract the R series bootloader with e200tool using this:

e200tool init
e200tool read bl.rom 0x10600000 391512

Could I flash a vanilla bootloader to it with this:

e200tool init
e200tool write bl.rom 0x10600000 392888
Title: Re: Sandisk Sansa e200R
Post by: GodEater on July 29, 2007, 05:28:04 AM
http://forums.rockbox.org/index.php?topic=9263.msg79083#msg79083

In this post, Bagder states very clearly that we have no idea how to do what you're asking about. Why do you keep asking the same question ? Especially since saratoga already warned you not to?
Title: Re: Sandisk Sansa e200R
Post by: Bagder on July 29, 2007, 08:45:57 AM
0x10600000 is SDRAM...
Title: Re: Sandisk Sansa e200R
Post by: zajacattack on July 29, 2007, 02:03:09 PM
Well, it says here (http://daniel.haxx.se/sansa/e200tool.html) that you can use e200tool to extract the R series BL from the memory. Can't we just reverse it and write it to the memory, or is it not possible since we don't know where the R series BL is stored (no hidden partition)?
Title: Re: Sandisk Sansa e200R
Post by: elborak on July 29, 2007, 02:53:41 PM
And how will writing it to DRAM store it to non-volatile memory?

You really are covering ground already covered.
Title: Re: Sandisk Sansa e200R
Post by: GodEater on July 29, 2007, 03:12:15 PM
Well, it says here (http://daniel.haxx.se/sansa/e200tool.html) that you can use e200tool to extract the R series BL from the memory. Can't we just reverse it and write it to the memory, or is it not possible since we don't know where the R series BL is stored (no hidden partition)?

zajacattack, you really seem not to have any clue about what's going on when you run this command - and I strongly suggest you stop filling this thread with pointless nonsense.
Title: Re: Sandisk Sansa e200R
Post by: Bagder on July 29, 2007, 03:14:22 PM
Well, of course we could theoretically download the vanilla BL into the R model's memory and attempt to run it there, but the chance that the vanilla BL would then be able to upgrade bootloader properly is veeeery slim I'd say.

Of course, if someone is willing to take a very long shot with a high risk of frying their hardware, so feel free to experiment!
Title: Re: Sandisk Sansa e200R
Post by: zajacattack on July 29, 2007, 03:47:57 PM
I'm sorry if I'm filling up the thread, but no one else is working on this, so I am trying to brainstorm ideas to help move the work along. Well, where is the R series BL permanently located? (Also, why would writing the vanilla BL to the memory fry the hardware? And, I wasn't sure if writing the vanilla BL to the memory would somehow put it in permanently, so I was just double-checking because I don't know how the vanilla BL operates.)
Title: Re: Sandisk Sansa e200R
Post by: Bagder on July 29, 2007, 04:08:24 PM
1) we don't know where the BL is stored in the R models

2) running a vanilla bootloader in an R model (if you manage to do it) wouldn't do any harm to the player (and in fact we could very likely even handicraft a rockbox (bootloader?) image to get loaded and started on an R model using e200tool this way)

What could cause harm to your player, however, is if you manage to start the vanilla BL in your R model using e200tool, and then you use that vanilla BL and *upgrade* the BL or even the mi4 image, as the vanilla and R models (most likely) don't store the images at the same place/way.
Title: Re: Sandisk Sansa e200R
Post by: zajacattack on July 29, 2007, 05:40:04 PM
OK, great idea! Would it be possible to patch the BL used in the vanilla build of rockbox onto the player and upload rockbox and the vanilla firmware? Then, you would have an R series with a patched BL, and the bootloader wouldn't mess up because the vanilla firmware would be on the player, right?
Title: Re: Sandisk Sansa e200R
Post by: Bagder on July 29, 2007, 05:48:12 PM
OK, great idea! Would it be possible to patch the BL used in the vanilla build of rockbox onto the player and upload rockbox and the vanilla firmware?

First, since we can't store anything on the R model, this have to be done with e200tool every time.

Then, I don't understand what patching of the vanilla BL you talk about but that's a plain raw binary image so you can patch it all you like.

Quote
Then, you would have an R series with a patched BL, and the bootloader wouldn't mess up because the vanilla firmware would be on the player, right?

Hell no. You would have an R model that you can load code to with e200tool, just as I said. Nothing else. The code you load on your player can possibly be a vanilla BL or (a modified) Rockbox.
Title: Re: Sandisk Sansa e200R
Post by: zajacattack on July 29, 2007, 05:50:33 PM
OK, I have another idea. On the vanilla series it is possible to put the mi4 and BL rom in the player in recovery mode and it will write them to the player as long as they are the right name. We should be able to do the same on the R series if we can find the right filename for the BL rom so that the player accepts it (the mi4 is PP5022.mi4). Now, I have been able to decode the BL into hex and into text, but I need to know how to get the filename out of the text and/or hex. So, is there a way to do that?
Title: Re: Sandisk Sansa e200R
Post by: Bagder on July 30, 2007, 01:37:52 AM
Now you're getting annoying. We've been over this many times before.

The R model's software (BL and mi4) cannot upgrade the bootloader at all, and we know the right file name (.btl extension).
Title: Re: Sandisk Sansa e200R
Post by: GodEater on July 30, 2007, 10:31:25 AM
Bagder has kindly put together this wiki page describing the current status of this port.

http://www.rockbox.org/twiki/bin/view/Main/SansaE200R

Now - NO more posts rehashing things in this page.
Title: Re: Sandisk Sansa e200R
Post by: Febs on July 30, 2007, 01:22:48 PM
zajakattack, I have deleted two posts from you that ask questions already addressed in Bagder's wiki page.  Please stop posting in this thread unless you have something substantive to add to the discussion.-

Edit:

zajacattack, I just cleared 15 more of your posts from this thread.    In the last of those posts, you asked how to use a Ubuntu live CD.  That is not what this thread is supposed to be about.   As I said in another thread in this forum:

Quote
It is too easy for threads in this forum to become bloated with unhelpful or irrelevant posts.  For obvious reasons, that hampers the development effort.  We can and do attempt to carefully moderate these threads to keep them focused and on point.  However, off topic and unhelpful posts are nevertheless disruptive, because (1) it takes time to go through these threads and clean them up, and (2) some developers subscribe to these threads so that they receive an e-mail whenever there is an update, and getting an e-mail about something like a "Hello World" instead of actual useful content is at best annoying.

Do not post in this thread again unless it is to report an actual development with respect to the E200R.
Title: Re: Sandisk Sansa e200R
Post by: bloodbath on August 09, 2007, 03:21:20 PM
Someone mentioned that none of the developers of Rockbox has the R series Sansa.  Unfortunately,  I have no coding experience what-so-ever.  Is there anything (files, etc) on the Sansa which I could send to any of the developers which might be of any use.  I'm going to guess that the answer is "no" since I believe the firmware and boot program need to be updated and are probably nontransferable.  However, I thought I would ask just in case there is an extremely minute chance that something may be of use to someone.

I am also willing to try to look at some of the coding, etc myself, but I would need some initial help; a tutorial or something.  Anyway, I just would like to help in some way if it's possible.  
Title: Re: Sandisk Sansa e200R
Post by: Bagder on August 09, 2007, 04:42:24 PM
We need one or many persons who own e200R players and who are willing and capable of working on these problems.

People who don't own such players are generally not eager or even interested in spending hours and hours to do this.

We have a few ideas on what can be done as a "next step", but it takes someone to be able to write code, upload to the target using e200tool, evaluate the results, tweak it, re-run etc until success or failure, and depending on that outcome move on to the next level.

We cannot start this by educating people in programming or in electronics. That's way way waaaay too much work and a too time-consuming task.
Title: Re: Sandisk Sansa e200R
Post by: e280ruser on August 09, 2007, 07:07:08 PM
I don't know how, but I have a sansa e280R, yes the R model, and it works perfectly with Rockbox.  I used the instructions from the manual
http://download.rockbox.org/manual/rockbox-sansae200/rockbox-buildch2.html
and everything went without a hitch.  As I use linux, I used the sansapatcher application.  The link is as follows:
http://download.rockbox.org/bootloader/sandisk-sansa/e200/linux32x86/sansapatcher
When I booted it up, I noticed that in both the regular firmware and in rockbox I have 2 wierd lines at the top, which I have figured are probably something to do with the framebuffers, and quickly manually patched the file lcd-e200.c in the source based on the patch #7438:
http://www.rockbox.org/tracker/task/7438?histring=sansa&pagenum=2

I have no problems running both the original firmware and the custom rockbox build dated yesterday.  I don't know if I am an unusual case or whatever, but I am happy to offer any help that I can in order to find out why I am able to run rockbox on this model, while it looks like most people cannot.
Title: Re: Sandisk Sansa e200R
Post by: Bagder on August 10, 2007, 03:21:21 AM
If you can install Rockbox using the e200 installation instructions, you do not have a e200R model.

Does it truly say e280R when you connect it to USB? Does it reveal only one partition when you do "fdisk -l" on the device?

We've seen other guys have what looked like refurbished R models where the vanilla version has had a Rhapsody logo on the back etc.
Title: Re: Sandisk Sansa e200R
Post by: zajacattack on August 10, 2007, 04:28:36 PM
Here's the easiest way to tell if you have a true R series: If you have the Rhapsody Channels option in the main menu of the original firmware, you have an R series. If not, you have a vanilla.
Title: Re: Sandisk Sansa e200R
Post by: X86 on August 12, 2007, 01:28:37 PM
I've had read about the sansa rhapsody player in the sansa port section and regarding about the bootloader,I read in some part of that article,that the player has its own memory and a ram,that ram is a like the ram in our pc's but is backed up by a battery,if you dissasemble a sansa you are going to see at the front something with some masking tape,remove the tape and then the battey,if you want to get the bootloader,as I've read it is stored on a ram,and the ram's are volatile,so if you cut the power is going to loose the info stored on the ram,so I guess that is going to help to develop the rockbox for rhapsody,thanks for reading this and wish luck to all.
Title: Re: Sandisk Sansa e200R
Post by: Bagder on August 12, 2007, 03:54:19 PM
X86: unless you can back up something like that with real world facts, it is just a wild theory together with all the other wild theories.

A unit is likely to be able to survive a total battery run-down.

The bootloader we've extracted from an R model was copied from its RAM, sure, but we can copy the vanilla one the exact same way and that's because the bootloader is loaded from the non-volatile place into ram.
Title: Re: Sandisk Sansa e200R
Post by: X86 on August 12, 2007, 09:06:53 PM
badger sorry if I said something you didn't like, the idea just came to my mind,I'm going to think about that,I have a ruined sansa wich I dont use,I'm going to use it like a test hamster,count with me for this,I want to colaborate in this project,damn it,sorry again,I just wanted to help,I don't know something about programming but I can help simulating scenarios in my mind,doing aproximations and analysis about something in matter,count with me,sorry if I made a mistake.
Title: Re: Sandisk Sansa e200R
Post by: Bagder on August 13, 2007, 03:10:26 AM
I'm Bagder

This thread and all other places we read stuff about the e200R is littered with people speculating and throwing out wild ideas or crazy things claimed to be facts. We all have an obligation to pause such behaviors and stop and think a little before we post facts we believe we might have read somewhere.

That's the main reason why I bounce on all weirdo claims posted here. I'd love to see new break-troughs and interesting new angles on how to get the R models hacked, but we need to filter out all the junk along the way.
Title: Re: Sandisk Sansa e200R
Post by: X86 on August 13, 2007, 12:31:27 PM
ok bagder I understand,I'm going to think before I post something may become into junk,I'm going to dissasemble my sansa to see it analyze it and I'm going to do some research,I want to help to get rockbox running on sansa  rhapsody.
Title: Re: Sandisk Sansa e200R
Post by: e280ruser on August 15, 2007, 06:46:57 PM
Yes, sorry, but I think that it is a refurbished E200, only with the rhapsody logo printed on the back side.  It does say e280R, when I mount it, however, there are 2 partitions, the fat32 storage partition, and a hidden OS/2 partition, which I guess holds the original firmware(?).  Sorry for any misplaced hopes in regards to making that model work.  I guess I will need to get a hold of a REAL e280R and get to tearing that thing to shreds to try and figure out what is hindering this model from working, which will hopefully lead to some kind of a hack to make it work.
Title: Re: Sandisk Sansa e200R
Post by: John Brown on August 17, 2007, 04:32:41 PM
i don't know if i'm slow or not making any sense but i've found out that if you change the file extention to .txt you can read the info in the file.
if you've already covered this well you don't explain things to people so how would i understand?

Title: Re: Sandisk Sansa e200R
Post by: Bagder on August 17, 2007, 04:36:56 PM
i don't know if i'm slow or not making any sense but i've found out that if you change the file extention to .txt you can read the info in the file.

What file are you talking about and how is this really relevant to get Rockbox to the R models?

And we can read all files no matter what they're named...
Title: Re: Sandisk Sansa e200R
Post by: Bagder on September 02, 2007, 05:03:57 PM
A plea for some help from one or more e200R owners:

Can you please use e200tool while in manufacture mode and dump the i2c rom (with i2cdump) and make it available to me?
Title: Re: Sandisk Sansa e200R
Post by: clutch on September 02, 2007, 06:20:13 PM
If no one else does it by morning.  I'll give it a go.  My box that dual boots to linux is currently re-encoding some video.  Hopefully there are not any issues using FC5.

Clutch
Title: Re: Sandisk Sansa e200R
Post by: clutch on September 02, 2007, 07:22:35 PM
Okay, killed the encoding.

Used this on my 250R to enter manufacturing mode:
This mode requires a special driver or tool to access it, and I just got a complete system lock when I tried it without one!

    * Power off
    * Turn ON lock/hold
    * Hold down center select button
    * Insert USB cable

Got this:

[wess@localhost ~]$ ./e200tool i2cdump mysansa
e200tool v0.2.3-alpha (c) by MrH 2006, 2007
Dumping i2c rom (address=87) range 0x0000-0x2000 to 'mysansa'
Searching for device 6666:e200 ... 9 8 7 6 5 4 3 2 1 0 not found!
[wess@localhost ~]$                                

I pulled the battery and it came back to normal.

When I plugged in the sansa in normal mode I got this:

system:/media/sdb1

Fedora Core 5 automounted it just fine.

I'll be up for a bit longer.  I only sleep a few hours at a time so I'll check for advice in a few hours.

Clutch
Title: Re: Sandisk Sansa e200R
Post by: Bagder on September 02, 2007, 07:27:06 PM
It's been a while since I played with this... I guess you need to use 'init' first, before i2cdump works?
Title: Re: Sandisk Sansa e200R
Post by: clutch on September 03, 2007, 01:33:04 AM
[wess@localhost ~]$ ./e200tool init
e200tool v0.2.3-alpha (c) by MrH 2006, 2007
Searching for device 0781:0720 ... found!
Failed to claim the interface (-1, Operation not permitted)
Searching for device 0b70:0003 ... 9 8 7 6 5 4 3 2 1 0 not found!
[wess@localhost ~]$ su
Password:
root@localhost wess]# ./e200tool init
e200tool v0.2.3-alpha (c) by MrH 2006, 2007
Searching for device 0781:0720 ... found!
Initializing USB stub (4780 bytes) ... done!
[root@localhost wess]# ./e200tool i2cdump mysansa
e200tool v0.2.3-alpha (c) by MrH 2006, 2007
Dumping i2c rom (address=87) range 0x0000-0x2000 to 'mysansa'
Searching for device 6666:e200 ... found!
Dumping at 0x2000
Dump done!
[root@localhost wess]# gzip mysansa

I put it at: http://wess.freeshell.org/sansa/

Clutch


Title: Re: Sandisk Sansa e200R
Post by: Bagder on September 03, 2007, 02:58:38 AM
Thanks!

Just for the record, is that e200r.tgz anything I care about?

And BTW, since you seem to have enough clues: can you do a "fdisk -l" on the device your sansa appears as and show it to us here? We're interested in seeing exactly how big the "disk" is reported to be...
Title: Re: Sandisk Sansa e200R
Post by: clutch on September 03, 2007, 03:54:37 AM
I tried doing it in manufacturing mode and failled.  So I switched to the normal mode.  The .tgz file contains the three files that change every time I've updated the os.  I haven't done that for a while in case sansa / rhapsody is changing their drm along the way.  I seem to remember  a thread about that.

[root@localhost wess]# /sbin/fdisk -l /dev/sdb1

Disk /dev/sdb1: 1988 MB, 1988884992 bytes
62 heads, 62 sectors/track, 1010 cylinders
Units = cylinders of 3844 * 512 = 1968128 bytes

This doesn't look like a partition table
Probably you selected the wrong device.

     Device Boot      Start         End      Blocks   Id  System
/dev/sdb1p1   ?      202429      499388   570754815+  72  Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(357, 116, 40) logical=(202428, 43, 11)
Partition 1 has different physical/logical endings:
     phys=(357, 32, 45) logical=(499387, 30, 51)
Partition 1 does not end on cylinder boundary.
/dev/sdb1p2   ?       43884      547534   968014120   65  Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(288, 115, 43) logical=(43883, 52, 47)
Partition 2 has different physical/logical endings:
     phys=(367, 114, 50) logical=(547533, 14, 42)
Partition 2 does not end on cylinder boundary.
/dev/sdb1p3   ?      486442      990091   968014096   79  Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
     phys=(366, 32, 33) logical=(486441, 36, 30)
Partition 3 has different physical/logical endings:
     phys=(357, 32, 43) logical=(990090, 59, 39)
Partition 3 does not end on cylinder boundary.
/dev/sdb1p4   ?      750698      750712       27749+   d  Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
     phys=(372, 97, 50) logical=(750697, 30, 25)
Partition 4 has different physical/logical endings:
     phys=(0, 10, 0) logical=(750711, 57, 33)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order
[root@localhost wess]#

I'm taking another nap.  Will check in later.

HTH,
Clutch
Title: Re: Sandisk Sansa e200R
Post by: GodEater on September 03, 2007, 04:06:01 AM
Try again, with fdisk -l /dev/sdb (not /dev/sdb1 as you did previously)  :)
Title: Re: Sandisk Sansa e200R
Post by: clutch on September 03, 2007, 04:33:19 AM
Sorry.  

[root@localhost wess]# /sbin/fdisk -l /dev/sdb

Disk /dev/sdb: 1989 MB, 1989148672 bytes
213 heads, 35 sectors/track, 521 cylinders
Units = cylinders of 7455 * 512 = 3816960 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         522     1942270+   6  FAT16
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(0, 8, 12) logical=(0, 14, 26)
Partition 1 has different physical/logical endings:
     phys=(241, 212, 35) logical=(521, 28, 21)
[root@localhost wess]#

Clutch


Title: Re: Sandisk Sansa e200R
Post by: Bagder on September 03, 2007, 05:57:25 AM
thanks!

Now, can anyone with a vanilla e250 player show us the exact same command line and its output?
Title: Plan B
Post by: Bagder on September 03, 2007, 07:43:31 AM
Hey, there's now a "Plan B" (http://daniel.haxx.se/blog/2007/09/03/mrhs-take-on-e200r/) suggested for those e200R owners who wants more adventure in their lives:

http://www.rockbox.org/twiki/bin/view/Main/SansaE200R#Plan_B
Title: Re: Sandisk Sansa e200R
Post by: krazykit on September 03, 2007, 08:35:41 AM
This is on a Rockbox'd e250:

Code: [Select]
proto% /sbin/fdisk -l /dev/sdc

Disk /dev/sdc: 2010 MB, 2010120192 bytes
62 heads, 62 sectors/track, 1021 cylinders
Units = cylinders of 3844 * 512 = 1968128 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        1011     1942270+   b  W95 FAT32
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(0, 8, 12) logical=(0, 8, 20)
Partition 1 has different physical/logical endings:
     phys=(241, 212, 35) logical=(1010, 42, 12)
Partition 1 does not end on cylinder boundary.
/dev/sdc2            1011        1022       20480   84  OS/2 hidden C: drive
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(241, 212, 36) logical=(1010, 42, 13)
Partition 2 has different physical/logical endings:
     phys=(244, 97, 45) logical=(1021, 20, 52)
Partition 2 does not end on cylinder boundary.

If you need it on a player without Rockbox, I can remove Rockbox when I get back in a few hours.
Title: Re: Sandisk Sansa e200R
Post by: GodEater on September 03, 2007, 08:45:13 AM
To summarise :

Code: [Select]
Model  Heads   Sectors  Cylinders  Size
e250   62      62       1021       2010120192
e250r  213     35       512        1989148672

The difference being about 20MB - the size of the hidden partition on the non-R series...
Title: Re: Sandisk Sansa e200R
Post by: chrisjs169 on September 03, 2007, 12:56:15 PM
Bagder, linuxstb, and GodEater all saw me on IRC, but we were able to convert the e200 to an  e200R (with the R bootloader) and, using e200tool, were able to convert it back.  In other words, the same thing that MrH did back in March, except this (for the most part) was for testing Plan B, which didn't seem to work.
Title: Re: Sandisk Sansa e200R
Post by: GodEater on September 03, 2007, 01:54:06 PM
...and by "didn't work" chrisjs169 means :

The patched R bootloader froze his sansa on start up.

(assuming I interpreted his actions properly whilst reading them in IRC).
Title: Re: Sandisk Sansa e200R
Post by: chrisjs169 on September 03, 2007, 02:03:25 PM
Yes, using the patched bootloader found in the wiki (http://www.rockbox.org/twiki/bin/view/Main/SansaE200R#Plan_B) I tried placing the rockbox firmware file on to the Sansa.  The (patched) Rhapsody bootloader accepted the file without problems, but would not boot into it.
Title: Re: Sandisk Sansa e200R
Post by: Enterprise 1701 on September 03, 2007, 04:18:11 PM
Hello I'm new here.

I see that you have gotten the Bootloader to accept the file, but does not work with it. Could someone explain where that code came from that is listed above?
Title: Re: Sandisk Sansa e200R
Post by: GodEater on September 03, 2007, 04:28:02 PM
Wait till we (chrisjs169) posts the how to.
Title: Re: Sandisk Sansa e200R
Post by: Enterprise 1701 on September 03, 2007, 04:37:31 PM
OK, Sorry for my impatience.
Title: Re: Sandisk Sansa e200R
Post by: GodEater on September 03, 2007, 04:38:43 PM
On IRC, right now this second, we're trying to see if we can get the e200 (which we've turned into an R) booting Rockbox directly, without having to turn it back into a vanilla e200.
Title: Re: Sandisk Sansa e200R
Post by: Enterprise 1701 on September 03, 2007, 04:45:19 PM
I read the IRC. So you think that you can boot RB in the R firmware now?
Title: Re: Sandisk Sansa e200R
Post by: GodEater on September 03, 2007, 04:51:10 PM
That's what we're attempting to find out...

Rockbox just successfully booted on the e200 converted to an e200r.

Title: Re: Sandisk Sansa e200R
Post by: scorche on September 03, 2007, 10:10:40 PM
Rockbox is successfully running on my e250r.
Title: Re: Sandisk Sansa e200R
Post by: Boktai1000 on September 03, 2007, 10:53:32 PM
Rockbox is successfully running on my e250r.
Woot, Tempted to try this on my e250r running newest firmware, but i would have to read up on how-to do some of this stuff.. also would i need a form of linux for e200tool?  I have an ubuntu disc but ever since i reformated its not installed, i would re-install just to do this though.
Title: Re: Sandisk Sansa e200R
Post by: chrisjs169 on September 03, 2007, 11:33:42 PM
Rockbox is successfully running on my e250r.
Woot, Tempted to try this on my e250r running newest firmware, but i would have to read up on how-to do some of this stuff.. also would i need a form of linux for e200tool?  I have an ubuntu disc but ever since i reformated its not installed, i would re-install just to do this though.

Ubuntu usually can be run as a LiveCD, which would work fine for this.  But yes, because e200tool is used, Linux is required.
Title: Re: Sandisk Sansa e200R
Post by: scorche on September 03, 2007, 11:34:42 PM
As I said in http://www.rockbox.org/mail/archive/rockbox-archive-2007-09/0025.shtml , I would recommend waiting a bit for a safer and less involved method of installing unless you want to risk harm to your device.
Title: Re: Sandisk Sansa e200R
Post by: Boktai1000 on September 04, 2007, 12:23:50 AM
Yea ok im just excited :) ill wait till more guinea pigs (sp?) try this :P
Title: Re: Sandisk Sansa e200R
Post by: scorche on September 04, 2007, 01:05:02 AM
Testing isn't really needed as much as many things, as the 2 devices are essentially the same in most aspects.  To clarify a bit on what I meant by risking harm, I was referring to basically "if you don't know what you are doing, this can be dangerous".  The current method involves a number of steps that most users would find difficult.  Please don't try this and then ask us to fix it for you if you encounter issues.
Title: Re: Sandisk Sansa e200R
Post by: scorche on September 04, 2007, 08:21:51 AM
Locking this thread, as Rockbox now works on the device.  Any installation problems you have, go to the Sansa installation forum now.

Installation instructions are located at http://www.rockbox.org/twiki/bin/view/Main/SansaE200RInstallation although, they are not for the faint hearted.