Porting Dream roms to the Magic - myTouch 3G, Magic Android Development

I'm sure I someone posted a script to automate this but I can't find it - so here goes with the question.
If I want to port a Dream rom to the Magic (32B), do I just replace the boot.img in the zip with one from a 32B rom, resign the update.zip and flash? Or is there more too it than that?

depends, most dream roms will work natively on the mt3g. a lot of the devs support it already, so you dont need to port at all.

Note that there are actually 2 different types of Magic:
- 32A has more RAM but requires a custom kernel and wireless LAN module
- 32B more or less completely compatible with most Dream ROMs

st0kes said:
I'm sure I someone posted a script to automate this but I can't find it - so here goes with the question.
If I want to port a Dream rom to the Magic (32B), do I just replace the boot.img in the zip with one from a 32B rom, resign the update.zip and flash? Or is there more too it than that?
Click to expand...
Click to collapse
Actually there's LESS to it than that.
You need to unpack the boot.img, and if there isn't already a init.sapphire.rc, copy init.trout.rc to make one, then repack the boot.img. (Granted, that's actually harder than substituting the boot.img in its entirety, but it's less of an actual change in terms of the ROM contents! )
I always do it manually but remember the script, I think it was by Deicist - search for his (or her?) posts.
But this is only for 32B - 32A won't work like that.

Loccy said:
Actually there's LESS to it than that.
You need to unpack the boot.img, and if there isn't already a init.sapphire.rc, copy init.trout.rc to make one, then repack the boot.img. (Granted, that's actually harder than substituting the boot.img in its entirety, but it's less of an actual change in terms of the ROM contents! )
I always do it manually but remember the script, I think it was by Deicist - search for his (or her?) posts.
But this is only for 32B - 32A won't work like that.
Click to expand...
Click to collapse
What do you then do for porting 32B to 32A ?

here's my script for porting dream->32b in Linux.
http://forum.xda-developers.com/showthread.php?t=547260
Doesn't do anything particularly clever, just automates the unpacking->replacing->repacking procedure.

Cheers for the replies guys.
I'll give it a whirl tonight. There are a few that look interesting, might start with Micro Hero 1.5 since a lot of people are raving about it.

Related

A suggestion for the benefit of the ROM chefs / users

Hi all!
Downloading custom ROMs is VERY cool, but a bit of a pain sometimes because the downloads are huge. I have a suggestion about how this could be resolved.
To explain my idea, let's look at how you would flash a ROM using the new method being suggested. You'd need the following things...
- USPL (as usual)
- Custom RUU (as usual)
- 'Control' ROM NBH
Here's the first difference. The control ROM in my proposal is the widely circulated HTC ROM NBH, which can be found here. You'd keep the NBH from this ROM (RUU_Signed.nbh) named as HTC.nbh, and it would be used by all subsequent updates.
So let's imagine that I have a device (USPL'd of course) that I want to flash to the T-Mobile ROM. I'd make sure I had a directory with the Custom RUU and Control ROM NBH in, then i'd download the file from the ROM creator. In this file would be a batch file, a ROM patch and the patcher. The batch file would patch HTC.nbh to T-Mobile spec, then run Custom RUU. The beauty of it? The download would be very small!
Would it work? YES! And to prove a point, please check out this post - where you'll find Orange, T-Mobile and Tilt ROMs in tiny downloads based off the control NBH. ROM chefs - let's start using this system, which i'm calling 'Kaiser TLR ROMs' for obvious reasons.
ROM chefs, to create the patches you just need to use bsdiff, which can be found here. Use the syntax 'bsdiff HTC.nbh YourROM.nbh YourRom.patch'. You can see a sample batch file in my link above.
So... what do u think?
TLR
I don't get it once your HTC is HardSPL'ed then there is no CID lock and you can flash any rom to your device. Most rar files containing the RUU_signed.nbh are only 40-50MB thats pretty small and can be deleted when your finished flashing. To me this seems like a lot of extra work for the cook(sometimes me) and more support issues I find it easy just to upload the ROM i made to rapidshare or some other file hosting site and people can download as they like.
40-50MB is a lot bigger than 6-7MB.
It's not a lot of extra work at all really, it's running one command line, and distributing a couple of files.
I think patching definitely has potential, not least that they are a lot easier (and a lot less illegal?) to host.
TLR
theloanranger said:
40-50MB is a lot bigger than 6-7MB.
It's not a lot of extra work at all really, it's running one command line, and distributing a couple of files.
I think patching definitely has potential, not least that they are a lot easier (and a lot less illegal?) to host.
TLR
Click to expand...
Click to collapse
Sounds interesting about the legal hosting capability for diff ROM files instead entire ROM. The ROM archive goes down in the past for the M$ pressing . If we can archive only diif ROMs, this can be one solution to take back the ROM archive into the FTP at XDA.
One offtopic question, where did you get the Orange Shipped ROM for Kaiser?
Cheers.
I didn't, it's a dump and repack, as is the T-Mo one.
TLR

Dream Rom installed to magic without any change

Hi,
I mistakenly installed the PERSONAL version of theis rom
http://forum.xda-developers.com/showthread.php?t=546984
I did nothing to it and it works great. More by luck than judgement but I always thought you had to change the rom first
can you elaborate on the process and what was the configuration of your phone prior to that? were you on perfect SPL?
Erm..
I had hakura spl
I formatted sd card downloaded and installed if you tell me how to find the info on my phone I will post whatever you need
PVT32A Ship S-On H
HBOOT-1.33.0010 (SAPP10000)
CPLD-12
Radio-3.22.20.17
Jun 2 2009, 17:28:28
built number 2.53.707.2
info like this....
on a 32b board you can install dream roms. but not with working wifi + bluetooth
kingchris said:
on a 32b board you can install dream roms. but not with working wifi + bluetooth
Click to expand...
Click to collapse
It's actually very simple to fix that, you change one file in boot.img, init.trout.rc to init.sapphire.rc, and that's it. You can then use any Dream ROM you like. However it's a bit of a drag getting all the bits together you need to be able to extract and repack boot.img, and then recompress the update.zip and re-sign it afterwards. One of these days I'll write a batch file that does it for you.
Loccy said:
One of these days I'll write a batch file that does it for you.
Click to expand...
Click to collapse
Already done by Deicist : http://forum.xda-developers.com/showthread.php?t=547260
Scargoll.
Loccy said:
It's actually very simple to fix that, you change one file in boot.img, init.trout.rc to init.sapphire.rc, and that's it. You can then use any Dream ROM you like. However it's a bit of a drag getting all the bits together you need to be able to extract and repack boot.img, and then recompress the update.zip and re-sign it afterwards. One of these days I'll write a batch file that does it for you.
Click to expand...
Click to collapse
i know this, but in the first post he writes
"I did nothing to it and it works great."
ant that is only possible with a 32b board and non working wifi
Blue tooth doesnt work on and Hero rom I have tried so not difference there.
I guess as I hardly ever use wifi havent noticed it.
can anyone make for my a 32b version with personal version of theis rom.
thanks
sorry for bad english
eljuego
please
I installed on my 32b.
just no wifi or BT
has anyone tried the bat scripts to convert a dream rom?
does this actually work so wifi AND bluetooth both work because if that is the case thats kewl

Any guides on how to create/compile custom roms?

I am a linux user...
Anyone can share the howto or if there are any guides?
+1 bumping this thread
Second that...
http://www.koushikdutta.com/2009/08/build-configuration-for-t-mobile.html#links
He seems to have a script to compile the Kernel...
I don't know to what extent this would help us but it is a start. I dont quite know how the apps are installed on a new ROM....
It would be nice if someone can explain what is needed and what is optional in the kernel and some of the mods that other people are doing and how they integrate in the OS.
I see a lot of improvements in the new ROM's but no how-to on doing it your self. I thought that was the point of having open source OS.
I would quite like this as well =o)
Have made a bit of a start by following this:
http://source.android.com/download
Shows you how to get all the code and do a build.
I believe the next thing would be to pick the required files from the output folder of the build, dump the boot.img and replace the kernel with 32B or 32A one, add the Magic model config file (to ramdisk) and recreate the boot.img
Replace/Add any modules required like maybe wifi or bluetooth, then need to change the build.prop file and put it all in to update.zip and sign the file.
Haven't had time to test this out but seems kind of logical...maybe?
Hello!
I'm following the android.com tutorial, but I want to ask: how can I download the donut branch? There's no mention in the entire site about it... Also, the cyanomod's multitouch and so on, where does it come from? Is it made by himself or it's somewhere in the net?
Thanks
Learn how to use GIT to get the donut branch from here: http://android.git.kernel.org/
Proble is that it doesn't specify the donut project path
Is there a command to list all project paths? I can't seem to find it
L10nH34Rt said:
Proble is that it doesn't specify the donut project path
Is there a command to list all project paths? I can't seem to find it
Click to expand...
Click to collapse
Code:
git branch -a
in any local git directory
Ok, then so far I've downloaded the donut branch, and compiled too. What now?
1. how to create a ROM from the made files?
2. how to compile the kernel / how to replace the one created with the make command with the one I'm running on?
3. is there any option I can configure to fit my phone? (HTC Magic 32A)
4. how can I root my ROM?
thanks
there is this guide that i have found:
http://www.koushikdutta.com/2009/08/build-configuration-for-t-mobile.html
'make' finished with success but i can't find how to transform it into 'update.zip' file...
anyone?
It says that in the link you have posted yourself.

How do I port ROMs to 32A [Windows?]

Hey guys.
Is there any guide etc, that can show me how to port ROMs to 32A Magic using windows?
Thank you
WaterMan! said:
Hey guys.
Is there any guide etc, that can show me how to port ROMs to 32A Magic using windows?
Thank you
Click to expand...
Click to collapse
I think you'll be much better off using a Linux distribution for this sort of stuff. I have never looked into running perl scripts and the like in Windows but I dont imagine it is very enjoyable.
Run a virtual machine with Ubuntu or something.
The general process to port a 32B ROM --> 32A is to swap the 32b kernel for a 32a one. This also requires that you change the wlan.ko as it is tied to the specific kernel.
I recommend VirtualBox for a virtual machine - it is very simple to use and set up. Check out this article for a bit of a primer http://lifehacker.com/5204434/the-beginners-guide-to-creating-virtual-machines-with-virtualbox
Once you have Ubuntu (or w/e) set up...grab Amon_RAs port tools from here. You will also want to set up the android-sdk as well. There is a good guide on the android sdk download site. You dont need to worry about eclipse and stuff unless you are going to be a dev.
Basically, just download the sdk, unpack it, add the tools dir to your PATH and you are set.
From there you can download the update.zip I use for cyanogen ports, delete my packaged boot.img, grab a 32A kernel, get the ramdisk from a ROM you want to port and create a boot.img using the 32A kernel and the ramdisk. You will also need to replace the wlan.ko in /system/lib/modules to match the kernel you decide to use. Then, rezip everything, sign the existing zip file and flash away.
hope this helps and isnt super confusing.
bcrook said:
Run a virtual machine with Ubuntu or something.
Click to expand...
Click to collapse
or just format your comp and use ubuntu cus its the **** but ill have to agree it seems to be a headack with windows, far easier with linux
I am not getting Linux, windows has far to many things I need.
Guess I will stray away from that path then. Thanks anyways
Runnig a virtual machine is no risk. It runs ubuntu inside a window...like an application
bcrook said:
From there you can download the update.zip I use for cyanogen ports, delete my packaged boot.img, grab a 32A kernel, get the ramdisk from a ROM you want to port and create a boot.img using the 32A kernel and the ramdisk. You will also need to replace the wlan.ko in /system/lib/modules to match the kernel you decide to use. Then, rezip everything, sign the existing zip file and flash away.
Click to expand...
Click to collapse
Hi bcrook, thanks for the explanation. I have just a simple question: does it need to be the exact same kernel or can it vary (for example 2.6.27 vs 2.6.29 or TT vs gbo)?
edubarr said:
Hi bcrook, thanks for the explanation. I have just a simple question: does it need to be the exact same kernel or can it vary (for example 2.6.27 vs 2.6.29 or TT vs gbo)?
Click to expand...
Click to collapse
You can use any kernrl u want as long as it is 32a. The wlan.ko just has to match.
Alright! Thanks very much bcrook!!!
Perfect how to, thanks a lot!

[HOWTO] porting a ROM for old radio to work with new radio

I would love to help the community by using your kernel for the newer radios to port any roms for the older radio... is there any help you can give me? should i use your boot.img from the test-donut.img/test-eclair.img?
Click to expand...
Click to collapse
first, a thing we must know for porting job is what boot.img included.
here: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
the ramdisk do some initializing jobs, so if we port a ROM, we should ensure that the content in ramdisk and files which are included in ramdisk (like init.rc), have necessary things the ROM needed.
for the first step, we can just extract the boot.img from the ROM, and extract the ramdisk from the boot.img which extracted just now, then repack it with my kernel (you can extract the kernel from my boot.img with same tools).
(to execute the perl script in link above, you need linux or just cygwin. )
but if we are sure that the ROM we want to port have nothing special with ramdisk, just like common ROMs, we can use my boot.img files directly. for eclair ROM, I suggest you extract the boot.img from my ROM, and don't use the first boot.img (test-NOCDB.img) I had posted.
after this, make our update.zip (use other's ROM as an example, especially the update-script in META-INF directory). sign our zip with testkey and apply it, then we can make our phone booting into desktop.
(you can find information about sign and download tools here: http://forum.xda-developers.com/showthread.php?t=471586, though the thread is not talk about how to sign things)
the main troubles we may meet probably are symlinks and setperm* in the update-script. if there is already a file/link has a name we want to symlink to, or if there isn't a file we want to symlink from or setperm, we will fail. so check the files carefully.
the next step is make everything work properly. we can use file from a ROM which made for new radio (and work well of course) to replace the one in the ROM we are porting. we can find these files in my 2.x ROM for eclair, or other's 1.6 ROM for donut (and for new radio, since the maker of them tested them already).
the most important files are (to my knowledge):
system/lib/libhtc_acoustic.so
system/lib/libhtc_ril.so (if something wrong with mobile network)
system/lib/libcamera.so
system/lib/libcameraservice.so
system/lib/liboemcamera.so (for 2.x) or system/lib/libqcamera.so (for 1.6)
system/lib/libgps.so
system/bin/akmd
(are there something I missed?)
(if we want to use NCommander's work on CameraHardwareInterface with a 2.x ROM, we should use my kernel for DONUT instead. I didn't try it, and I don't recommend it.)
these files are some thing work with hardware partially, so different radio may need different files. but if something just work fine, don't hurry to replace the file for it.
and now...., I don't have more thing to talk about, since we have most things work well. but for further tweaks, there are lots of things to do.
everyone can post your question here. if I know the answer I will post it. if I don't or I am not online, I think others will response you. and if there are things I missed or made some mistake, plz point it out
I will update this post when we collection more info or correct something. I find that I don't organized everything in order . I will update it later.
Thanks for the post... what's the difference between your eclair/donut kernel? (This is based on your original post about your kernel... is there an updated kernel somewhere i should know about?)
Edit
Nevermind i figured it out by reading your post more. carefully thanks for the detailed instructions
Thank you very much for this sanpei. This is the type of posts that really should be on this forum
Appreciated so much. waiting for your next updates.
Phil_McRevis said:
Nevermind i figured it out by reading your post more. carefully thanks for the detailed instructions
Click to expand...
Click to collapse
sorry for my poor ability of expression
asero said:
This is the type of posts that really should be on this forum
Click to expand...
Click to collapse
I expect more people can share their knowledge, and we can make a wiki for all
Hello!
I have to edit some lines of init.rc of your kernel. I've thus extracted the ramdisk, edited the file, repacked and tried booting with fastboot boot kernel-img ramdisk-img, but the phone hangs on the operator logo. I've tried even just extracting kernel+ramdisk and boot them - same result (the boot.img works well).
how can I fix it? Thanks
Wrong post

Categories

Resources