Porting MIUI to HTC Evo


S

stiffspliff

Alright, let's try this again.

I'm trying to learn how to port this damn thing to the Evo.
After some reading around, this is what I basically need to do to at least be able to boot MIUI to my understanding.
Plus, I don't really want to use the automated kitchen.

Grab miui chinese deodex and Eng pack (ty MarkHUK)
Grab a rom zip for Evo (last weeks version)

add/replace all common chinese.zip with files with files from eng pack
replace these with the one from the Evo miui
boot.img
system/usr
system/lib/hw
system/lib/modules
system/etc/vold.stab
system/framework (especially framework-res.apk)
build.prop

Theoritically speaking, would this be everything I need to do in the big picture? Or am I missing something else?

Have some patience with me and I promise to start contributing soon :)
 
also, if there are more that needs to be replaced, a quick explanation of why or what it does would be helpful. Not that I don't trust whoever replies, but I like to know what I'm replacing.

This is my "simple-minded" understanding so far from looking at the files

build.prop is for market, device footprint, etc.
boot.img is for phone to boot up lol
system/lib/hw for lights (and maybe other hardware?)
system/lib/modules is for wifi
system/etc/vold.stab is for sdcard

Please feel free to correct my stupidity
 
I've tried porting the CDMA Desire ROM to the Evo with no luck using dsixda's kitchen...some advice from experienced devs would help.
 
i'm interested in the same for the d.inc
@spliff, have u tried it yet and did it work? this seems pretty straight forward, i thought it was much more complicated
@madfella, what purpose do the kitchen programs serve?
 
Im out right now but ill post here later tonight.

Sent from my Liquid using the miui-dev.com Forums App
 
I was kind of successful doing it this way on the english packs, but not on the actual ROM itself. Going to look into it more soon.

i'm interested in the same for the d.inc
@spliff, have u tried it yet and did it work? this seems pretty straight forward, i thought it was much more complicated
@madfella, what purpose do the kitchen programs serve?
 
i'm interested in the same for the d.inc
@spliff, have u tried it yet and did it work? this seems pretty straight forward, i thought it was much more complicated
@madfella, what purpose do the kitchen programs serve?

I actually don't think any kitchen will help us with porting, I've tried everything I can think of to no avail.
 
Alright, let's try this again.

I'm trying to learn how to port this damn thing to the Evo.
After some reading around, this is what I basically need to do to at least be able to boot MIUI to my understanding.
Plus, I don't really want to use the automated kitchen.

Grab miui chinese deodex and Eng pack (ty MarkHUK)
Grab a rom zip for Evo (last weeks version)

add/replace all common chinese.zip with files with files from eng pack
replace these with the one from the Evo miui
boot.img
system/usr
system/lib/hw
system/lib/modules
system/etc/vold.stab
system/framework (especially framework-res.apk)
build.prop

Theoritically speaking, would this be everything I need to do in the big picture? Or am I missing something else?

Have some patience with me and I promise to start contributing soon :)

It's a bit more involved than just copying the files. But I'll give it a try:

1) Open the most recent working MIUI EVO ROM and the ROM to be ported (N1)
2) Copy the xbin, usr, bin, etc, and lib folders over (to get more involved, open each folder and only copy the files that are in the EVO ROM that aren't in the N1 ROM)
3) Go through each folder and delete the files that start with naichimi (sp? I think?) as those are the Nexus One files. You'll see them in the usr subfolders.
4) In the etc\firmware folder, delete the default_att and default_france files.
5) In the etc\permissions folder, delete the telephony.gsm.xml file
6) In the media folder, delete the recovery.img file.
7) Copy the kernel and build.prop over along with updater-script.
8) Copy the sprint.hardward.twincam.jar file in the framework folder.

That's the long and short of it. Now for the complex part. The framework-res.apk and framework.jar files have to be decompiled and edited.

9) Open framework-res.apk (using WinRar perferrably) into it's own window from both ROMs. In res\xml...copy the eri.xml file over. This gets rid of the roaming triangle. Close both windows and let WinRAR update the framework-res.apk file in the N1 rom.
10) Get apktool for these steps. Copy the edited framework-res.apk into the folder with apktool in it. Also copy the N1 framework.jar into that folder as well.
11) Open a command prompt and go to the directory with apktool in it.
12) Type "apktool if framework-res.apk". This will import the file as a library. This is helpful if you're doing translations.
13) Now decompile framework.jar by typing "apktool d framework.jar"

If you know what changes to make, then you're good...otherwise, I typically pull the framework.jar out of CM6.1 and name it frameworkc.jar. Then I decompile it.

14) Having both windows open (getting really messy here) go to smali\com\google\android and copy the mms folder over. This is the MMS fix.
15) Now go to smali\android\hardware and copy over the CameraSwitch.smali, HTCFrontFacingCam.smali, Camera.smali, Camera$Parameters.smali over.
16) This next one is iffy, but in the smali\android\media folder, you mainly want CameraProfile.smali and CamcorderProfile.smali, DecoderCapabilities.smali, Mediafile.smali, MediaRecorder.smali, and MiniThumbFile.smali. There may be other files too so you have to check for size differences. This mainly fixes the Camera and Camcorder to work with the CM6.1 Camera.apk as well as get the sound working.
17) After that, you have to recompile framework.jar (apktool b framework.jar.out) and copy the resulting file from framework.jar.out\dist back into the N1 ROM.

That's the long and short of it, but the rest is copying over the Camera.apk from the CM6.1 ROM to the N1 ROM, which should now be the new EVO ROM.

Of course BigRushDog can confirm these steps.
 
Holy~

Thanks bro!! All went perfect with your walkthrough. My 1rst port attempt wouldn't boot, then I added the 12.24 evo boot.img. Now I'm sporting a v12.31 evo.
 
if i was going to do this for the d.inc, would i just skip steps 8, 15, 16? do u happen to know if i would add any steps as well?
 
I've been trying to learn how to do the weekly updates using this thread. Since I have an Incredible and not an Evo I have just been skipping steps 8, 15, and 16 as was suggested earlier in the thread. I am on step 17 of Holyroller's post and this is what I get when I try to recompile framework.jar.out:

I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Unknown file type: framework.jar.out/smali/.DS_Store
at brut.androlib.src.SmaliBuilder.buildFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.Androlib.buildSourcesSmali(Unknown Source)
at brut.androlib.Androlib.buildSources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)

Any thoughts on how to fix this?

I also don't have a kernel folder in either the previous Incredible rom or the N1 rom. Can I flash the kernel after the rom before booting? Or can I download a kernel and put it in the rom?

Any help or advice would be appreciated. Thanks in advance.
 
Ok, fixed, upgraded to 1.3.2, haha. I read that the June 2010 version was the best. I guess that isn't true. However, stuck at splash screen so... Fail... Haha... Anyone want to take a look at my build and see if they find out what I did wrong?
 
Ok, fixed, upgraded to 1.3.2, haha. I read that the June 2010 version was the best. I guess that isn't true. However, stuck at splash screen so... Fail... Haha... Anyone want to take a look at my build and see if they find out what I did wrong?

do you have a logcat on stuck splash screen?

look at what a noob I was in the OP 2 months ago.. hahaha
but I think I'm coming through on my promise :D
 
I am trying to logcat it right now, but my terminal is just blank as it sits on the splash screen. There's no logcat posting. I started "adb logcat" and I get "-waiting on device-" then nothing else.

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

I had to leave my office for a minute but I'll try again later.
And yes, in two months I think you've come far. Hopefully I can be a pro in two months like you. :)

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

Got it! Rocking DInc 1.3.11 :) Thanks for the thread, couldn't have done it without it.
 
So... to be quiet Frank, should aosp libs and such be used, or can stock sense libs be used. I'm not talking about framework Res that's obvious.

Sent from my ADR6300 using the miui-dev.com Forums App