FORUMS

[TUT] How to easily port CM7,CM9,CM10 Based ROMs to HTC Aria

202 posts
Thanks Meter: 75
 
Post Reply Email Thread
Quote:

Easiest and best way to port CM7,CM9,CM10 Based ROMs to HTC Aria/Intruder/Gratia

Code:
I do not guarantee any successful porting.
I am not responsible for bricked devices, dead SD cards, or a broken device. 
YOU are choosing to make these modifications,
and if you point the finger at me for messing up your device,
 I will laugh at you. 
->Copied from some xda thread.
*****
But a rom, no matter how bad should *not* do any physical non recoverable harm to your device,flashing a rom or restoring a nandroid backup via cwm *should* immediately fix any problems what so ever.
And I will try to help in any ways I can.
I am NOT a developer, I can not code,compile,etc, I am only an android enthusiast with half a brain able to follow specific instructions.

This guide is actually somewhat a good combination of various "how to port roms"
guides found here on xda suited and very slightly modified for our beloved Aria.
Thanks to all of those threads and their writers.

Actual Tutorial starts here:
I will try to make this guide as straight forward as possible.

PORT ROM:
First you need to figure out what rom you are going to be porting.
For our Aria, The rom you want to port should belong to a device that has:
  • HTC brand (optional but recommended)
  • A ArmV6 CPU (VVVV important)
  • A HVGA Resolution (optional, any mdpi should do,if not just open the system apk files using 7zip and resize all the BIG images.)
The Rom needs to be:
  • CM7 BASED OR CM10 BASED OR CM9 BASED.
  • The full zip size less than 150MB(Recommended).

What Does Port Mean:
This simply refers to the rom you will be trying to port.

Recommended device to port from is the HTC Wildfire S a.k.a Marvel.
But any other device

BASE ROM:
What Does Based Mean:
It means that the rom should have similar sources and stuff,
Meaning you can only attempt to port a android 2.3 rom if you already have a 2.3 rom on the device.(In our case cm7).
So,
For porting 2.3 roms, chose cyanogenmod 7.2 as BASE.
For porting 4.0 roms, chose cyanogenmod 9 as BASE.
For porting 4.1 roms, chose cyanogenmod 10 as BASE.
ETC... I hope you get the point.

The Following 4 Users Say Thank You to sifat3d For This Useful Post: [ View ] Gift sifat3d Ad-Free
24th February 2013, 02:18 PM |#2  
sifat3d's Avatar
OP Senior Member
Flag Chittagong
Thanks Meter: 75
 
More
Prompt
Quote:

Thing you will need:

  • A good Zip extractor and compressor. (I use 7zip, its free. If you have winrar or something else,it will also do.)
  • Notepad++ (This thingy is awesome! And you need it for some stuff)
  • Android SDK(Not the whole thing, just adb zip from our sticky thread will do.)
  • Some Basic Android Knowledge, Root knowledge.
  • Mostly Common Sense.

Step 1:
Extract our device rom zip and name the folder AriaRom,
Extract our Port rom zip and name the folder PortRom.

Step 2:
Delete the following folders on the AriaRom/system folder:
  1. App(You can keep some non conflicting indepent apps if you want)
  2. Framework
  3. Fonts
  4. Media

Step 3:
Go to
Code:
PortRom folder/system
and copy:
  1. App(You can keep some non conflicting indepent apps if you want)
  2. Framework
  3. Fonts
  4. Media

    and then paste them to AriaRom/system.

Step 4:
You need to open these two folders side by side(on windows, open both folders then right click on the task bar and click "Tile windows vertically").
The two Folders are:
Code:
  • AriaRom/system/etc
  • PortRom/system/etc
In
Code:
etc/permission
folder copy all the permissions files in PortRom to your AriaROM folder except
Code:
platform
handheld_hardware
Then open init.d Folder in AriaRom and Delete Everything except
Code:
banner
and then copy all the files inside init.d folder of PortRom to init.d folder of AriaRom.

Step 5:
Now
Code:
AriaRom/system/buid.prop
and
PortRom/system/buid.prop
files using Notepad++

On AriaRom Build.prop make changes as you wish.
Code:
  • ro.build.id=
  • ro.build.display.id=
  • ro.build.date=
  • ro.modversion=
Copy and replace these values from PortRom buildprop to Aria rom buildprop.
ro.config.ringtone=
ro.config.notification_sound=
ro.config.alarm_alert=

Also Copy anything you Find Extra and important-ish in ADDITIONAL BUILD PROPERTIES using common sense.(Not much major stuff, but if bootlooped, copy whole thingy.)

IMPORTANT Step of commons sense:
Open up both
Code:
 META-INF/com/google/android/updater-script
using Notepad++.

Compare AriaRom AND PortRom line by line(on two tabs in notepad++ easily done).
Copy extra/additional lines from PortRom which are not present in AriaRom to aria roms updater script.

Step 6:
If You find any extra file or folder in system folder of PORTrom than copy them to your Ariarom system folder.

Finally, zip the
Code:
META-INF
system
boot.img
data(if exists).
folders/files togather and use "normal" compression if asked.
Name the zip to whatever you want, and walla you have successfully ported the rom!
The Following 2 Users Say Thank You to sifat3d For This Useful Post: [ View ] Gift sifat3d Ad-Free
24th February 2013, 03:33 PM |#3  
sifat3d's Avatar
OP Senior Member
Flag Chittagong
Thanks Meter: 75
 
More
Info 2

Doing the above steps should land you a pretty solid rom, as solid as the base rom.


Quote:

Still,Incase of problems:
If the ported rom does not boot:

  • Stuck at boot screen
  • Bootlooping
Then copy system/lib/
Code:
    
    libandroid_runtime.so
    libandroid_servers.so
    libmedia_jni.so
files from PortRom to AriaRom system/lib.

It should boot, if it still doesnt, check the above steps and find out what you did wrong.
Common reasons could be:
  • Build.prop mess up
  • Updater Script mess up
  • Forgot to delete or copy file

After it boots,
  • Everything that worked on Base rom, should work on Ported.
  • Every problem on Base Rom will exist on Ported.

In case of root related problems(settings not being saved,system app FCs,etc), install a root app like titanium backup or something and check if it works,if it doesnt its surely root issue,just download and flash latest superuser zip.

If some FC,Port rom funciton not working,etc issues appear, you need to decompile framework-res.apk using apktool and change device specific xml files to ours.This is a part where I have the most trouble and suck at.

Just search xda for
Quote:

How to Logcat,

this will help you to find the problems and search xda to solve them. Ask me if you want on this thread, & I will try to help, but I dont think I will be able to help much as I have very limited knowledge on compile De-compile stuff.
If someone is good at framework-res and framework decompile & recompile stuff, please help us.


Thanks for reading this,I hope you port over some awesome roms to our device.
24th February 2013, 11:27 PM |#4  
Recognized Contributor
Flag Aachen
Thanks Meter: 1,283
 
More
I just tried to port the PACman ROM from Samsung Galaxy Ace to the Aria, but I am stuck at boot screen after following your tut, which is awesome by the way. Could you post a working build.prop and updater-script for this ROM? Maybe this will help me get it booting...
25th February 2013, 08:15 PM |#5  
sifat3d's Avatar
OP Senior Member
Flag Chittagong
Thanks Meter: 75
 
More
Re: [TUT] How to easily port CM7,CM9,CM10 Based ROMs to HTC Aria
Quote:
Originally Posted by dansou901

I just tried to port the PACman ROM from Samsung Galaxy Ace to the Aria, but I am stuck at boot screen after following your tut, which is awesome by the way. Could you post a working build.prop and updater-script for this ROM? Maybe this will help me get it booting...

That's an Armv7 device.
Still I'm gonna download it & try.
In the meantime take a look at bootclass path.
Why are SMARTphones soo... Freaking Dumb?
25th February 2013, 09:13 PM |#6  
Recognized Contributor
Flag Aachen
Thanks Meter: 1,283
 
More
Quote:
Originally Posted by sifat3d

That's an Armv7 device.
Still I'm gonna download it & try.
In the meantime take a look at bootclass path.

I don't think so... the Samsung Galaxy Ace with device number S5830 should be Armv6, but in the Galaxy Ace Forums there is also a place for the Galaxy Ace II, which is Armv7. Maybe that's a bit confusing. But nims11 PAC-Man Rom is definitely for the Armv6 device.
25th February 2013, 11:43 PM |#7  
Senior Member
Flag Aleppo
Thanks Meter: 22
 
More
hey man thnx for the tut but i tried porting the paranoid rom like you but i keep getting this error while flashing ( set_perm: some changes failed) i think it have something to do with the updater-script, could u upload the build.prop and the updater-script for me ? and btw why do we need the sdk ??

---------- Post added at 02:43 AM ---------- Previous post was at 02:03 AM ----------

actually now i tried not to change the updater-script and the rom flashed but stock at boot pleaaase help me i really want to try the paranoid rom (ive been trying to port the "pa_marvel-2.54-beta1-08NOV2012-164651" )
26th February 2013, 05:09 AM |#8  
sifat3d's Avatar
OP Senior Member
Flag Chittagong
Thanks Meter: 75
 
More
Re: [TUT] How to easily port CM7,CM9,CM10 Based ROMs to HTC Aria
Quote:
Originally Posted by rami.ejle

hey man thnx for the tut but i tried porting the paranoid rom like you but i keep getting this error while flashing ( set_perm: some changes failed) i think it have something to do with the updater-script, could u upload the build.prop and the updater-script for me ? and btw why do we need the sdk ??

---------- Post added at 02:43 AM ---------- Previous post was at 02:03 AM ----------

actually now i tried not to change the updater-script and the rom flashed but stock at boot pleaaase help me i really want to try the paranoid rom (ive been trying to port the "pa_marvel-2.54-beta1-08NOV2012-164651" )

Here you go,
http://pastebin.com/62hbaQwL
on THAT ROM,
IF you follow the guide & use my posted script,
100% assurance rom will boot and work. except cm
The sdk is for getting the logcat when a problem occurs.

Why are SMARTphones soo... Freaking Dumb?
26th February 2013, 05:40 AM |#9  
E.Cadro's Avatar
Retired Senior Moderator
Flag Just Off In The Distance
Thanks Meter: 5,213
 
More
Nice tut very well done

XDA Moderator
The Following User Says Thank You to E.Cadro For This Useful Post: [ View ] Gift E.Cadro Ad-Free
26th February 2013, 05:44 AM |#10  
sifat3d's Avatar
OP Senior Member
Flag Chittagong
Thanks Meter: 75
 
More
Re: [TUT] How to easily port CM7,CM9,CM10 Based ROMs to HTC Aria
Quote:
Originally Posted by dansou901

I don't think so... the Samsung Galaxy Ace with device number S5830 should be Armv6, but in the Galaxy Ace Forums there is also a place for the Galaxy Ace II, which is Armv7. Maybe that's a bit confusing. But nims11 PAC-Man Rom is definitely for the Armv6 device.

In that case you'll need to unpack both boot.img aka the kernel , fix bootclass path in init.RC by replacing it with the value from port roms init.rc.
Ill try to port that rom soon and upload a fixed boot.img (if I can get it to boot),if you don't beat me to it. it looks cool.

Why are SMARTphones soo... Freaking Dumb?
2nd March 2013, 03:20 PM |#11  
Recognized Contributor
Flag Aachen
Thanks Meter: 1,283
 
More
Bootclasspath is the same on both roms. So there must be a mistake in updater-script and / or build.prop. I've just messed up my updater-script, I guess, so I'll make a new one and post it later together with the build.prop.
Post Reply Subscribe to Thread

Tags
how to, port a rom, port roms, tut

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes