yashsingh1/xdaforums huggingface dataset:
[Nook Color General] sangandongo:
I really hope so. :)

Logically, if the device nodes can be recreated, I could flash a new mod in. Perhaps I'm going about that the wrong way.
[Nook Color General] jll544:
Have you verified that the partition table is actually intact/correct? No point trying to create device nodes if the underlying devices aren't there. What does "fdisk -l /dev/block/mmcblk0" give you, and how does it compare to the standard layout?

Maybe check notes with the OP of this thread -- appears that both of you have essentially the same problem.
[Nook Color General] sangandongo:
Sorry, I should have included that earlier. The partition table is b0rked. I also had attempted applying the zips from the [ZIP][RECOVERY] EMMC Recovery Repair thread to no avail.

~ # fdisk -l /dev/block/mmcblk0

fdisk -l /dev/block/mmcblk0

Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes

4 heads, 16 sectors/track, 242432 cylinders

Units = cylinders of 64 * 512 = 32768 bytes

Device Boot Start End Blocks Id System

/dev/block/mmcblk0p1 1 15260 488312 b Win95 FAT32

/dev/block/mmcblk0p2 15261 242432 7269504 83 Linux
[Nook Color General] ExploreMN:
Not to sounds like a smartass (or maybe a dumbass) but have you tried to restore back to stock?
[Nook Color General] sangandongo:
Yes. In my initial post, I stated that no restoring via zip works.

Currently I am attempting to rebuild the partition table as mine is hosed. I get the following output though, which is troubling by comparison to what I should be seeing:

~ # busybox fdisk /dev/block/mmcblk0

busybox fdisk /dev/block/mmcblk0

The number of cylinders for this disk is set to 242432.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

p

Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes

4 heads, 16 sectors/track, 242432 cylinders

Units = cylinders of 64 * 512 = 32768 bytes

Device Boot Start End Blocks Id System

/dev/block/mmcblk0p1 1 15260 488312 b Win95 FAT32

/dev/block/mmcblk0p2 15261 242432 7269504 83 Linux

Command (m for help): d

d

Partition number (1-4):
[Nook Color General] jll544:
Right, virtually all .zip restore files are filesystem-level recovery and assume that the partition table is unchanged.

Try forcing the geometry using "fdisk -H 255 -S 63 /dev/block/mmcblk0"
[Nook Color General] sangandongo:
Before I write this, does the following look like what you'd expect? I mean, it makes sense considering...

~ # fdisk -H 255 -S 63 /dev/block/mmcblk0
fdisk -H 255 -S 63 /dev/block/mmcblk0

Command (m for help): p
p

Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 61 488312 b Win95 FAT32
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 1, 1) logical=(0, 0, 17)
Partition 1 has different physical/logical endings:
phys=(1023, 3, 16) logical=(60, 202, 14)
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 61 966 7269504 83 Linux
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(1023, 3, 16) logical=(60, 202, 15)
Partition 2 has different physical/logical endings:
phys=(1023, 3, 16) logical=(965, 205, 8)
Partition 2 does not end on cylinder boundary
[Nook Color General] fattire:
What he said. Texas Instrumentss OMAP devices such as the nook require that media, whether sd, mmc, etc, be formatted with particular geometry. One that's set up, you can create the partitions normally and forget it ever happened. Remember that the first partition should be FAT, and this is where the kernel (uImage) and ramdisk (uRamdisk) as well as bootloader (u-boot.bin) and pre-bootloader (mlo) go.

See here for more info.
[Nook Color General] sangandongo:
I believe the version of busybox available to me on this 3.0.2.8 CWR SD image is too old to accomplish what the instructions on this post state: http://xdaforums.com/showpost.php?p=13971291&postcount=110

I've been unable to find a bundle of the binaries yet, but I'm still looking. That being said, I changed the geometry of the partition table and wrote the changes, then tried to dd again - fail.
[Nook Color General] jll544:
You mean you wrote the partition table as shown above? That won't work. You need to run fdisk with the corrected geometry, delete the existing partitions, and create new ones. Those warnings say that your partition LBA's are still aligned to the incorrect geometry.
[Nook Color General] RileyGrant:
What happens when remove all if the partitioning on the emmc, format it, and repartition it? For some reason ive found linux has a tendency to corrupt storage bits of memory chips altogether and the only way to restore was to completely start over clean. Also, anyone tested for bad blocks? One of my laptops decided to take a **** and the only way I'm able to install an os on it is by installing ubuntu on half the hard drive. Maybe if it is bad blocks we could repartition around them?
[Nook Color General] khaytsus:
Save the FUD for somewhere else.... :rolleyes:
[Nook Color General] jll544:
LOL, just about any operating system will write an unsuitable partition table if the end user commands it to do so. No, the OP has omitted details about what he did to get into his situation, but there is no chance it just happened on its own (i.e., his partition layout is technically valid but unbootable by OMAP). If we're going to hazard wild guesses, I'd say he was trying to install Backtrack or some other non-Android Linux distribution.
[Nook Color General] RileyGrant:
Hahah I only used linux as an example because ubuntu its all I have run for a coupe years now. but you sir are completely oblivious too the fact that evo users, thunderbolt users and now nook users have reported the same issue and symptoms, always on gingerbread. A self corruption of internal memory.
[Nook Color General] sangandongo:
In this case, I believe it was caused either by "fixing permissions" while using Rom Manager, or by doing it in CWM. This was in an attempt to get out of CM7 nightly #69, which all but rendered my system inoperable.

I agree with you though: there's likely no reason why linux would cause corruption on a disk. If anything, an app might be to blame, but it would have to explicitly do so.

That aside, I am very close to getting my Nook fixed. I rebuilt the partition table this morning after loading busybox 1.18 onto my SD card. ran 'fdisk' with the proper geometry, deleted the existing partitions, built each out to standard specs, then changed the filesystem id for each. After that I did a mkfs.vfat and mke2fs on the appropriate partitions and wrote the configuration.

I rebooted, did a dd of a 1.0.1 boot image to mmcblk0p1 and of a system image to mmcblk0p5 and tried to boot, but I'm still getting a black screen.

Here is my current partition table after I resized it and marked the partitions with their respective types:

/busybox fdisk -l /dev/block/mmcblk0

Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 9 72261 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 10 18 72292+ c Win95 FAT32 (LBA)
/dev/block/mmcblk0p3 19 56 305235 83 Linux
/dev/block/mmcblk0p4 57 965 7301542+ 5 Extended
/dev/block/mmcblk0p5 57 114 465853+ 83 Linux
/dev/block/mmcblk0p6 115 789 5421906 83 Linux
/dev/block/mmcblk0p7 790 834 361431 83 Linux
/dev/block/mmcblk0p8 835 965 1052226 c Win95 FAT32 (LBA)

I made the Fat32 Partitions using mk.vfat and the linux partitions with mke2fs -j -L <label>. Something still just isn't right.
[Nook Color General] sangandongo:
Blah. I get so OCD about this sort of ****. I need to just go outside and play, this is driving me nuts.
[Nook Color General] racks11479:
It's not booting because you're missing your /rom partition. There is no data in /mmcblk0p2, which init calls for all your device info. Hopefully you have a backup of that as well. Without it, you won't be able to run any roms with your nook color. :(

And unfortunately that is a partition that is not good to share with anyone else besides each individual nook owner because is contains all the unique Device identifiers for your Nook. If two people would have the same Device info and you're both logged into your B&N stock, it will error out on the B&N server side and de-register your device and the other person as well.

If you need further guidance, PM me and I'll see what I can do to help to resolve your /rom partition issue.

-Racks
[Nook Color General] sangandongo:
I DD'd every partition off my friend's Nook. Every one. Just to see if I could get this puppy running. Still black.
[Nook Color General] sangandongo:
Fixed it. My steps were ok. I neglected to see the next to the boot partition.
[Nook Color General] ExploreMN:
Congrats! The relevant parts of this thread should be added to that "Help! I bricked my Nook" thread or whatever that one is called.

Sorry I couldn't help. I did keep my mental fingers crossed for you though!
[Nook Color General] sangandongo:
I will get the steps aligned and create a "how-to" which will make the process far clearer.
[Nook Color General] tuxhacker:
Congrats!!

My nook is only usable with SD boot so I followed your steps to see if it will resolve my issue too but no go. :(

My symptom is CM7 Boot loop. Once I format all blocks and DD - next boot everything comes back so it seems like I have a read only device. I get permission error when I tried adb logcat. Tried CWM permission fix but no go.

Any idea what I can try or check?
[T-Mobile Sidekick 4G] sduvick:
First off, This is not a release, it is a work in progress

As we haven't heard anything back in a while from any of the Devs, and I find myself with some free time, I'm gonna take a shot at porting CWM from the sources of the Epic4g version as well as the SGS version that had better keymappings.

If anyone who still has Clockwork installed could look under the advanced options and try using the key mapping feature to give me the keymaps of the hard buttons, that would be greatly appreciated, as I'm back on a stock recovery.
[T-Mobile Sidekick 4G] yogi2010:
i will have more time later, but i tried this real quick, and for each key i press, it gives a number. do you need the # for every key?
[T-Mobile Sidekick 4G] sduvick:
yeah, that's what i'm looking for. if you can give me a list in the format:

<button name> : <Number>

that would be greatly helpful. Those numbers are what map to keys in Clockwork/android, so all I have to do is change some numbers in the build and remap a partition in fstab.
[T-Mobile Sidekick 4G] yogi2010:
ok, unfortunately I can't get into CWM anymore, after a few failed Odin attempts. would have to successfully Odin and then reroot.

Sent from my HTC Vision
[T-Mobile Sidekick 4G] jahnbodah:
Ill be more than happy to help get things moving...

1 - 16

2 - 17

3 - 25

4 - 33

5 - 41

6 - 49

7 - 2

8 - 10

9 - 18

0 - 67

q - 68

w - 65

e - 3

r - 11

t - 19

y - 27

u - 35

i - 43

o - 51

p - 59

a - 20

s - 28

d - 36

f - 44

g - 52

h - 60

j - 5

k - 13

l - 21

DEL -4

SEARCH -45

z - 53

x - 61

c - 6

v - 14

b - 22

n - 30

m - 38

SMILE - 54

ENTER - 29

L SHIFT - 15

ALT - 23

@ - 56

, - 48

SPACE - 63

. - 64

? - 32

MICROPHONE - 40

R SHIFT - 46

VOL UP - 42

VOL DN - 58

JUMP KEY - 7

HOME - 8

MENU - 66

BACK - 34

CAMERA - 39

POWER - 26

TRACKBALL (push) - 50

Also, if it helps, this is a cheat sheet to navigate with current buttons

BACK - VOL DN

UP - CAMERA

DOWN -6

SELECT - MIC

Hope this helps
[T-Mobile Sidekick 4G] sduvick:
great work, this should be what I need!
[T-Mobile Sidekick 4G] sduvick:
In trying to build, my laptop is failing to build otatools... apparently it can't build on x86 for whatever reason. I have however changed the keymaps according to @jahnbodah's testing, to what should work with vol being up and down, power or touchpad as accept, and the back button as back. I also remapped the /sdcard partition in recovery.fstab to where ours is (according to my phone) as /dev/block/vold/179:1

I will attach the build files (still labeled as epic4g) if anyone who has a good build environment (Devs, anyone?) can compile this for us?

This is not a working flashable release, don't even try to flash this.
[T-Mobile Sidekick 4G] jahnbodah:
If you tell me how to do what is needed I will be more than happy to do so, or point me to some online tutorials.

What software is needed? I am running win7 x64
[T-Mobile Sidekick 4G] mustang9438:
Awesome Job man!! Glad to see some real dev work going on! sduvick....your my hero!
[T-Mobile Sidekick 4G] sduvick:
We're not anywhere yet, it still needs someone with a 64bit computer to compile it, as after some testing, as I thought, I can't run a 64bit vm on a 32bit computer, even though that's what koush told me to do haha.
[T-Mobile Sidekick 4G] yogi2010:
how would I build this? I have my 64-bit system set up to compile Cyanogen and AOSP, I'm not really schooled in how to set up a build, I just follwed the instructions specifically for Cyanogen and AOSP.

feel free to pm me if you have time and are able to advise.

Sent from my HTC Vision
[T-Mobile Sidekick 4G] arayray:
I tried to compile this ( for a friend ) but it isnt working because the vendors are not setup for the epic4g
[T-Mobile Sidekick 4G] brenix:
I can try to compile one shortly here... Just waiting to sync up with the sources to compile the otatools since I'm running this in a VM...
[T-Mobile Sidekick 4G] sduvick:
I really appreciate all the people jumping in on this! Hopefully between all of us we can get it figured out?
[T-Mobile Sidekick 4G] brenix:
Ok, so it took longer since I had other priorities, but I was able to compile a recovery img successfully for the sk4g..

I've taken the build files that sduvick created and modified the vendor on them so it would compile properly..

If anyone is brave enough, maybe we can test this?! I would test it, however it is my girl's phone and don't have it with me at the moment...

Here's the DL links for the recovery zip, recovery.img, and the build files that I used to compile it..

Recovery zip (signed w/SignApk):

Download link removed

Recovery zip (unsigned):

Download link removed

Build Files:

Download link removed

Recovery img:

Download link removed
[T-Mobile Sidekick 4G] jahnbodah:
I would try it, but I can't risk a brick :(
[T-Mobile Sidekick 4G] yogi2010:
I am currently soft bricked so I don't have too much to lose, but I can only get into stock recovery so I guess it would have to be signed just right? otherwise, could I perhaps Odin the tar file I extracted from the build files.tar.gz?

Sent from my HTC Vision
[T-Mobile Sidekick 4G] brenix:
I looked around other recoveries and as far as I can tell the stock recovery doesn't require the zip to be signed..
[T-Mobile Sidekick 4G] yogi2010:
ah ok, i tried flashing it and did get an error, "signature verification failed".... same thing happened with the signed ROM from the other thread here.
[T-Mobile Sidekick 4G] brenix:
Hmm... Ok maybe I was wrong about the signing... Here is the same zip, but signed using SignApk... maybe this will work?? Thanks for giving it a shot yogi2010

Download link removed
[T-Mobile Sidekick 4G] yogi2010:
no problem buddy, thanks for building! if this zip doesn't go thru either, what about Odin with the tar?
[T-Mobile Sidekick 4G] yogi2010:
nope, signature verification still failing..... seems tough to get anything to go thru in stock recovery.
[T-Mobile Sidekick 4G] jahnbodah:
Anyway to install it through download mode?

(Keep in mind this is my first phone with download mode, I know nothing about it aside from the fact that is exist)
[T-Mobile Sidekick 4G] yogi2010:
yep, that would be how to 'Odin' it.
[T-Mobile Sidekick 4G] brenix:
Still trying to figure out why your getting signature check failed, but hopefully someone else might have some insight on it..I can attempt to run the update.zip myself later on tonight and see what happens..

As far as the tar/odin... To be honest, I've never used odin.. The tar I've posted was the build files. I compressed them with tar instead of zip since I'm running in Linux...They probably shouldn't be used with odin since odin flashes the actual dump of the partitions...
[T-Mobile Sidekick 4G] yogi2010:
ok cool, thanks brenix. and yeah, i figured using that tar would be a longshot at the very best.
[T-Mobile Sidekick 4G] mattpall:
How to make a .tar for ODIN

http://xdaforums.com/showthread.php?t=1059639
[T-Mobile Sidekick 4G] Datlilboricua:
i tried everything all i get is a boot loop on tmobile sidekick screen is der any way to use fisical buttons to see if i can get into recovery
[T-Mobile Sidekick 4G] brenix:
Fully turn the phone off.

Press and hold {vol-up}+{vol-down} (and maybe the camera??), then turn the phone on while still holding down the two buttons, it should then boot into recovery..
[T-Mobile Sidekick 4G] Datlilboricua:
no go camera and up or down
[T-Mobile Sidekick 4G] sduvick:
Stock recovery requires it to be signed in a way that we cannot do, as we only have testkeys. to flash this you need to use fastboot/adb/odin. Even in a custom recovery you need to sign it with the test keys. I'm gonna work on pulling a stock recovery, and if I can get that, I'll try flashing the recovery.img.
[T-Mobile Sidekick 4G] jomarxx:
Hold vol up+down and the power at the same time.
[T-Mobile Sidekick 4G] Datlilboricua:
no go well my phone is now bricked or softed brick trying to fix nothing works
[T-Mobile Sidekick 4G] brenix:
Good to know... I was running out of ideas :)

If we need to change something in the build, let me know and I can compile it again..
[T-Mobile Sidekick 4G] noobnl:
i am willing to help i need know this:

ls -l /system/bin/recovery
[T-Mobile Sidekick 4G] jahnbodah:
Thanks for offering to help.

Now, how do I find out the answer for you?

If you look at the sidekick 4g development forums you can find full dumps, as well as some other information, the answer you seek might be able to be found there... I don't know.

Again, thank you for helping us!
[T-Mobile Sidekick 4G] noobnl:
i have a prototype of my redirector and are you willing to test it?
[T-Mobile Sidekick 4G] yogi2010:
I am definitely willing to test, if I can do so with a soft-bricked device.

Sent from my HTC Vision
[T-Mobile Sidekick 4G] noobnl:
test build: http://xdaforums.com/showthread.php?t=1115186
[T-Mobile Sidekick 4G] sduvick:
Really appreciate you jumping in! I'm reinstalling adb right now, i'll upload ls -l in a sec.

EDIT:

-rwxr-xr-x root shell 309880 2011-04-02 22:13 recovery

Feel free to PM me or get a hold of me however you can, i'm on freenode, otherwise, PM me and we can get AIM or something else set up.
[T-Mobile Sidekick 4G] noobnl:
check your pm sduvick
[T-Mobile Sidekick 4G] sduvick:
Update on testing, I found that when trying to flash a .zip, it gives me the 'can't mount sdcard' issue again.
[T-Mobile Sidekick 4G] brenix:
Are you getting it after using noobnl's recovery redirector or the recovery img/zip I posted earlier??
[T-Mobile Sidekick 4G] sduvick:
Yeah. We need to map the LUN, but I don't know how UMS works at all. I've got a working build box now if someone can direct me to the right place for LUN/UMS. I rebuilt the kernel for CWM using the source from DRockstar's Github, from his epic4g port, using initramfs from my phone. I'm gonna try to rebuild CWM now.

EDIT: using the recovery redirector, that he made from your recoveryimg.
[T-Mobile Sidekick 4G] brenix:
Ah ok... One thing I noticed with his recovery redirector was that the recovery.fstab didn't seem to have the proper mount device for the sdcard..It was still on /dev/block/mmcblk0p1 whereas I would think it should be /dev/block/vold/179:1
[T-Mobile Sidekick 4G] sduvick:
That was my guess, I still think we need to get the lunfile mapped correctly. This would be much easier if we had a more experienced dev to work on it..
[T-Mobile Sidekick 4G] brenix:
I agree... From what I've been looking around at, the last line of BoardConfig.mk (from DRockstar's CWM) has a line :

BOARD_UMS_LUNFILE := /sys/devices/platform/s3c-usbgadget/gadget/lun0/file

Is there a similar file/path on the sk4g ?? I don't have my girl's sk4g right now, but maybe we just need to determine the proper path and specify it in the Boardconfig.mk??

Edit: From what it seems, we need to have the lun0/file (wherever it may be) have the value of /dev/block/vold/179:1 for it to mount the sdcard properly..
[T-Mobile Sidekick 4G] sduvick:
I pulled it from my phone (it's in the same path you posted) but the file is empty. I think i'm confused somehow.
[T-Mobile Sidekick 4G] brenix:
Ah, the reason it is empty is probably because your usb storage is off... If the value of it is blank, then usb storage is off. If you were to run the following command, then it should mount the usb storage..

adb shell echo /dev/block/vold/179:1 > /sys/devices/platform/s3c-usbgadget/gadget/lun0/file

I was also looking at the files from noobnl's post of the OneClickRootCWM... I've modified the mountums,unmountums, and a couple of other files to point to /dev/block/vold/179:1 instead of the /dev/block/mmcblk1..

Heres the modified version... Can anyone test this??

Download link removed
[T-Mobile Sidekick 4G] sduvick:
I'm wondering if DRockstar's recovery would work if we just changed keymaps? not sure, just a thought.

EDIT: Testing now.

Ok, done testing. flashes fine, but can't mount SD at all. mountums and umountums does nothing now. So maybe the original fstab was right after all? also, perhaps we could try compiling DRockstar's CWM with our changed keys? I only didn't start with that because I didn't ever see it.

EDIT EDIT: after some working with the source of cwm 4.0.0 I have a working recovery! unfortunately it's bedtime as I have to work in 7 hours haha. i'll post the recovery in the morning, using noobnl's oneclickroot script.

EDIT EDIT EDIT: tested some more. Nandroid restore still doesn't work, and sd doesn't always unmount. But usb mass storage works now. I'll continue work in the morning.
[T-Mobile Sidekick 4G] jomarxx:
What? You going to sleep? Jk thanks for your work
[T-Mobile Sidekick 4G] stafly17:
I'm willing to test anything. Just tell me where to start. I got nothin but time and a couple SK4G's to play with.
[T-Mobile Sidekick 4G] sduvick:
I'm testing on my own SK4G, just trying to get a few tweaks right so everything mounts correctly. pretty close, hopefully done by the end of the day.

I'll continue updating my testing here.

brenix was right, the lunfile is only related to usb mass storage mount, it just writes where the sdcard is on the fs when it's mounted. sdcard mounts and unmounts just fine from a shell, and mounts via the "mounts and storage" option, but doesn't update to show it as mounted, so it tries to mount again when it should be unmounting. I suppose it's reading the placement for a mounted SDcard in the wrong spot. I'll continue searching.

Looks like it's mounting the sdcard to /mnt/sdcard rather than to /sdcard, that looks like the problem. I'll keep working on it.

Per discussion with Koush, we should disable vold in recovery. I've remapped the mountpoints in recovery.rc and fota.rc, but still cannot seem to figure out how to not start vold.

I now understand what to do to disable vold, but doesn't do me any good any more. I can't get my kernel to build correctly, it always tells me that my final boot.img is too large and gives up. I can't seem to figure out why it suddenly won't build anymore, but its frustrating that I am so close but can't do anything about it.
[T-Mobile Sidekick 4G] jomarxx:
Don't give up...... you can do it!
[T-Mobile Sidekick 4G] LesserAnimal:
If anyone's accepting donations I'll be more than happy to do so once i get paid. Thanks for all the effort thus far you guys.