Root Path 2 to Gingerbread

apsterling

Member
As tickerguy mentioned there may be a second path to stock Gingerbread:

Incidentally a side project for someone who wants to get inventive would be to take the Cherry nb0 file that others report works except for the radio (DO NOT FLASH THIS UNDER ANY CIRCUMSTANCES AS IT SITS - IT WILL REPARTITION YOUR PHONE AND IF YOU DO THAT YOU ARE SCREWED!), extract the system.img (easy), splice in the Motorola kernel, rild, and ril libraries (fairly easy) and make a Clockwork out of that. None of that's particularly hard and shouldn't take more than a handful of hours to do and test. There's a non-zero chance that works right out of the box. If it fails, however (if it's going to fail it will be on the radio) it's a total dead end. I'm not inclined to do it but if someone wants the kernel I built and RIL bits I can package those up into a zip and stuff 'em somewhere or explain how to do it if you just make a system.img that Clockwork can flash, then use that plus the existing file I uploaded. If you want to chase this path please do not pollute this thread with it - start a new one, and I'll help you there, not here

I'm opening this up to starting that. I've got the nb0 down, and as of now I'm just waiting on tickerguy to pop in with the rest.
 

rvarn1

Well-Known Member
ok thanks. ;) was just starting one, but gmail told me that you replied to the CM7 post, so I came here. I'll be happy to test or build this stuff, I just need to know how to build it, and I'll flash away. if I bork it, that's why we have backups. ;) (edit) also, where do i find the appropriate cherry files to do this?
Ricksta
 

apsterling

Member
Thread starter
Actually, the tools seem to want a Windows environment which kind of rules me out but I'm definitely up for testing.
 

rvarn1

Well-Known Member
um I have windows 7 home premium(cheapo laptop), point me in the right direction, ill try my best. edit
actually, what do i need to download to start working on this? I really want to help.
 

rvarn1

Well-Known Member
thanks, downloading now on my superfast (212k) internet connection.... Not flashing it, but waiting on tickerguy also. Edit: holy crap! its gonna be like an hour before it downloads the Nb0 files, according to chrome download manager... gonna be a little while. edit 2 downloading the JRE and reading the wiki
 

rvarn1

Well-Known Member
ok, all you gotta do is go to the links in apsterling's post, download appropriate software, like JRE, A688 tools, and the cherry mobile nb0 files... dont flash the cherry mobile though! just download those things... its gonna be a while on my end haha
 

Chingling

Android Enthusiast
I can also help, but I need clarification. So all I would have to do for this part is to get the nb0, unpack it, and wait for tickerguy correct? I am downloading Cherry right now.
 
ok, all you gotta do is go to the links in apsterling's post, download appropriate software, like JRE, A688 tools, and the cherry mobile nb0 files... dont flash the cherry mobile though! just download those things... its gonna be a while on my end haha

everything download it just waiting now
 

Chingling

Android Enthusiast
Hey I need some help. I downloaded the files and got the nb0, but when I try to unpack it it says "directory doesn't exist.
 

rvarn1

Well-Known Member
well, I am gonna start now myself, because it just finished. I'll let you know what I fid, otherwise I can't really help, I'm fairly new to this.
 

tickerguy

Android Enthusiast
Ok, here's the deal.

Get the Cherry ROM.
Unpack it. Inside there's a file containing the phrase "system.img.ext3"
That's a FILESYSTEM. It can be mounted on a Linux machine with a "mount -o loop ...." command. It's also the ONLY file you want; it contains the entire /system area on a normal Android environment. The other files are things like the boot (kernel, etc) and the ones that screw you, the partitioning commands and the radio code.

Ok, now you need to figure out exactly what you have to do to unpack and then pack back up a Clockwork-flashable file. It normally requires the system.img (which you have) but you need to change a few things inside. I don't know the exact sequence to do this as I use the CM7 build tools that do it for me, and I've not looked closely at exactly what they do. You're on your own with this one.

Specifically, you need a kernel (to make the zImage from) that contains the correct drivers and you also need the library files for the radio.

I'm not sure EXACTLY which radio files you need. I know what the base ones are but not all of them. Some of this is trial and error.

So here's the kernel file (which will get turned into a zImage when you repack it) and both rild (goes in /system/bin) and the RIL libraries (4 files, go in /system/lib.) All are in this file:

triumph-files.zip

If you have trouble packing the "kernel" file into a zImage, grab that file out of my archive I posted the link to in the other thread.

Remember that when you flash your cooking that (1) YOU BETTER HAVE A BACKUP OF YOUR PHONE FIRST! and (2) you need to clear the data and cache partitions on the phone or I guarantee you will crash, because neither is going to be compatible with this load as a "leftover."

Now once you have something that flashes AND BOOTS, one of two things happens: It comes up or it doesn't.

If it does then you either have a radio or not. If you do, it works. Congratulations - make that up into a nice downloadable file and call yourself a wizard!

If you have no radio (quite possible) or it doesn't boot (less likely), then it's on to the next step:

If it DOESN'T boot then you need to use "adb logcat" to see where it's dying. There are two possibilities:

1. It's dying because something is either missing or faulting out that is detonating the primary Android VM. You'll see what it is in the logcat that's faulting it. In this case you may never see anything beyond the splash screen. Be aware that it scrolls by fast and you probably need to capture it to a file and go digging for what's blowing up. It may not be obvious. If the phone boots but the radio doesn't work you can use "adb logcat -b radio" to isolate only radio-related messages, but if it doesn't boot then you need to look at the whole thing because the kernel (if you packed it correctly back into the archive) **absolutely will** boot - it's the one that I'm using in the archive now. As such if you get absolutely nothing (you can't adb into it) odds are VERY high you screwed up as I know the kernel in that package is good and will boot.

2. It (the radio) is dying because the RIL code won't talk to the rest of the load. In this case you'll see something about the radio in the logcat related to whatever the error is and it will refuse to come online. This is not unlikely, incidentally, given what I discovered in the framework of CM7, so don't be surprised if you wind up here. If you do, you're screwed since you don't have source to the Cherry ROM and you need it to fix it.

If #1, find the missing bits in the file I uploaded to the other thread a couple of days ago and start "adb push"ing them. You will have to adb shell into the phone and remount the area you want to write to as writable first. You may find the magic combination and you may not, but this is the path you use to see if you can get it to work.

If #2 odds are extremely high you're hosed.
 

rvarn1

Well-Known Member
Ok, here's the deal.

Get the Cherry ROM.
Unpack it. Inside there's a file containing the phrase "system.img.ext3"
That's a FILESYSTEM. It can be mounted on a Linux machine with a "mount -o loop ...." command. It's also the ONLY file you want; it contains the entire /system area on a normal Android environment. The other files are things like the boot (kernel, etc) and the ones that screw you, the partitioning commands and the radio code.

Ok, now you need to figure out exactly what you have to do to unpack and then pack back up a Clockwork-flashable file. It normally requires the system.img (which you have) but you need to change a few things inside. I don't know the exact sequence to do this as I use the CM7 build tools that do it for me, and I've not looked closely at exactly what they do. You're on your own with this one.

Specifically, you need a kernel (to make the zImage from) that contains the correct drivers and you also need the library files for the radio.

I'm not sure EXACTLY which radio files you need. I know what the base ones are but not all of them. Some of this is trial and error.

So here's the kernel file (which will get turned into a zImage when you repack it) and both rild (goes in /system/bin) and the RIL libraries (4 files, go in /system/lib.) All are in this file:

triumph-files.zip

If you have trouble packing the "kernel" file into a zImage, grab that file out of my archive I posted the link to in the other thread.

Remember that when you flash your cooking that (1) YOU BETTER HAVE A BACKUP OF YOUR PHONE FIRST! and (2) you need to clear the data and cache partitions on the phone or I guarantee you will crash, because neither is going to be compatible with this load as a "leftover."

Now once you have something that flashes AND BOOTS, one of two things happens: It comes up or it doesn't.

If it does then you either have a radio or not. If you do, it works. Congratulations - make that up into a nice downloadable file and call yourself a wizard!

If you have no radio (quite possible) or it doesn't boot (less likely), then it's on to the next step:

If it DOESN'T boot then you need to use "adb logcat" to see where it's dying. There are two possibilities:

1. It's dying because something is either missing or faulting out that is detonating the primary Android VM. You'll see what it is in the logcat that's faulting it. In this case you may never see anything beyond the splash screen. Be aware that it scrolls by fast and you probably need to capture it to a file and go digging for what's blowing up. It may not be obvious. If the phone boots but the radio doesn't work you can use "adb logcat -b radio" to isolate only radio-related messages, but if it doesn't boot then you need to look at the whole thing because the kernel (if you packed it correctly back into the archive) **absolutely will** boot - it's the one that I'm using in the archive now. As such if you get absolutely nothing (you can't adb into it) odds are VERY high you screwed up as I know the kernel in that package is good and will boot.

2. It (the radio) is dying because the RIL code won't talk to the rest of the load. In this case you'll see something about the radio in the logcat related to whatever the error is and it will refuse to come online. This is not unlikely, incidentally, given what I discovered in the framework of CM7, so don't be surprised if you wind up here. If you do, you're screwed since you don't have source to the Cherry ROM and you need it to fix it.

If #1, find the missing bits in the file I uploaded to the other thread a couple of days ago and start "adb push"ing them. You will have to adb shell into the phone and remount the area you want to write to as writable first. You may find the magic combination and you may not, but this is the path you use to see if you can get it to work.

If #2 odds are extremely high you're hosed.
thanks... hope I wan't bugging you! also, my computer failed to download everything, because my home internet crashed. tethering to my phone, so I don't wanna download a whole bunch of stuff. Hope somebody gets this working... :S
 

tickerguy

Android Enthusiast
That's ok.... I'll help where I can on this, but it isn't my primary attention for obvious reasons - I'm after the CM7 port right now, at least until I determine that it's a fruitless endeavor (and I'm NOT anywhere near there at present.)

If you're reasonably comfortable hacking on phones, the above should be enough to get you in the game. From there, it really is a "hack on it" sort of thing - observe, try things, etc. Without source that's all you have.
 

Chingling

Android Enthusiast
I am currently working on it I have the nb0 extracted and have the ext3 file. I am now going to work on it within Ubuntu. I'll try to splice the files mentioned, but I can't guarentee that I can make a CMW flashable file
 

StaticMaal

Android Enthusiast
I was just wondering how came yall are using the .nbo gingerbread files instead of the Andro-id 2.3 rom files? Because yall probably already that the only problem that wrong with that is no 3g but everything else works fine.
 

Chingling

Android Enthusiast
Ok so I try mounting and it gives me the error "mount: can't find /home/bigshot/Desktop/FB0-0-318B-5017-system.img.ext3 in /etc.fstab or /etc/mtab. What should I do?


EDIT: Mounted the ext3 file with success now going on to the next step.
 

Chingling

Android Enthusiast
So let me get this straight. libreference-ril.so, libril.so, libril-qc-q.so. and libril-qcril-hook-oem go into system/lib correct? And libril-qc-qmi-q.so goes into system/bin?
 
Top