• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [Guide] JellyBean Rom porting quick start

Updated version can be found HERE included linux instructions and setting up adb/logcat














This guide is from my own experiences and from various sources i've found from various sources including xda, miui forums and rootzwiki.

So you found a rom that you want to port to the Optimus Elite but don't know where to start? This simple guide will hopefully give you a basis and guide you how to begin. This guide assumes you are using windows.

Reference:
Base = Rom that's made for the Elite (such as phenom's cm10
Port = Rom that you want to get to work
Tools used:
Notepad ++
winrar
WinMerge
Google
Your Common Sense
Important things to be aware of:
  1. Find a rom from a phone that is as close as possible to the Elite
  2. The version number MUST MATCH, so if you are using phenom's cm10 which is android 4.1.2 the port rom MUST be the same version.

Download the base and the port roms, open them both up using either 7zip or winrar (i use winrar myself). Do not extract them because it'll mess with the structure and permissions.

With both of them open, inside the base rom delete the folders:
  1. app
  2. fonts
  3. framework
  4. media
and replace them with the folders in the port rom.

Open up the build.prop in both base and port using notepadd ++ and at very least you want to change the following lines:
ro.config.ringtone=
ro.config.ringtone=
ro.config.notification_sound=
with the values from port, other roms have other values, for example paranoid android has:
ro.pa.family=
ro.pa.version=
so check to see if the rom you are porting has any specific values.

MIUI and Paranoid also have specific values for the updater-script which i'll cover in another guide. Most roms don't need to edit the updater-script.

After these are done, close the archives, rename the base zip, pop it on the elite and flash. Next post will cover what to do next.
 
  • Like
Reactions: Junkyarddog269
What to do next. Well there will really be 3 scenarios:

Best case scenario: The rom boots and there aren't any problems, in which case congratulations, post your port, give credits and you are now a porter.

Middle case scenario: Rom boots but there are issues. I'll be doing another guide soon that will cover basic adb usage, logcats and fixing common issues.

Worst case scenario: Rom doesn't boot

If the rom doesn't boot here are two things you can try:
In the folder /system/lib replace
libandroid_runtime.so
with the one from the port rom. If that still doesn't work then also replace
libmedia_jni.so
it SHOULD boot then, if not then there are other issues at hand.
 
Upvote 0
Here are some fixes for some common issues, these will be in order of difficulty rather than issue.

1. The infamous 'roaming indicator off'.
This is actually really easy to fix. Simply decompile the framework-res.apk from both base and port (guide coming soon). Navigate to /res/xml and replace the file eri.xml in port with the one from base.
It is important, however, that after you recompile the new apk file, you must open the old and new framework-res.apk files in winrar. Copy AndroidManifest.xml and the META-INF folder from the old apk to the new one or you will get bootloops.

2. No data/phone.
Decompile framework.jar in both the base and the port rom. Navigate to
com/android/internal/telephony/
and replace ANY file that has RIL in the name, from base to port. After this open up PhoneFactory.smali in the port rom using notepad ++ and search for RIL, you should see (among other things) the following lines:
check-cast v16, Lcom/android/internal/telephony/RIL;
and
const-string v18, "RIL"
with the device specific RIL code. This code can be found by looking at the build.prop
ro.telephony.ril_class=LGEQualcommRIL
so essentially, in this case you want to replace RIL in the above lines to then show LGEQualcommRIL instead. Once done close up your framework.jar and phone/data should be working. "RILClassname is" all gets replaced, not just the RIL part of it


3. Fixing most common graphical glitches
Coming soon
 
Upvote 0
Optimus Elite specific tweaks and edits

1. Remove reboot to bootloader.
Since there really is no need for an optimus elite user to reboot into bootloader it's easiest in my opinion to just remove it from the power menu.
With the framework-res.apk decompiled navigate to /res/values and open up arrays.xml in notepad ++ there search for the string:
<string-array name="shutdown_reboot_options">
you should see an item:
<item>@string/reboot_bootloader</item>
and
<item>bootloader</item>
not too far below it. Simply remove those and the option will no longer be available when you recompile the framework and use it next time.
vRrApWm.png


2. Remove factory reset in settings.
This will generally speaking brick a rooted device so here is how to just remove it completely. Coming soon
 
Upvote 0
And here I thought you guys started with a blank notepad and wrote everything from scratch.

Just kidding, but actually, it seems like something even I could do, using the step by step info your explaining about.

it's honestly very simple, what i've written already will fix like 90% of the issues when porting
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones