Android OS Forum banner
1 - 20 of 88 Posts

·
Premium Member
Joined
·
422 Posts
Discussion Starter · #1 ·
How to Port Miui from O2x to G2x

Ok everyone. As requested here is how I port Miui from the O2x to the G2x every week. My only request is simple. DO NOT PM ME ABOUT THIS GUIDE. I WILL STRAIGHT UP IGNORE YOU. If you are unsure of something please post in this thread so EVERYONE can learn together. I will pop in when I have time and try to answer any questions ppl might have and make sure everyone is on track (and make sure I hopefully didn't forget anything!). You might also take note of the [DEV!] in the header. This is intended for those aspiring to learn or already have a fair amount of android know-how. Again, DO NOT PM ME ABOUT THIS GUIDE. Thank you.

I always work directly off the builds that Miui.us post. Why? Because they use a build bot that adds the power menu (reboot options) that everyone loves. It is also already translated into English. I prefer the Miui.us translations to the Miui Android translations, but this guide should work for either build you decide to work off of. Now, let us continue shall we?

Step 1
Download Optimus 2x build from roms.miui.us

Step 2
Download latest CM Nightly (official, unofficial, really doesn't matter)

Step 3
There are a number of files from the CM Nightly you need to copy over to the O2x Miui build. You do not need to download the latest CM Nightly every week... only if you want to. The files should more or less stay the same from build to build unless drastic changes are noted. The following files/folders are being copied from the CM build TO the Miui build. You are to REPLACE the files in the Miui build with the ones from the CM build.
a. copy apns-conf.xml, gps.conf and wifi folder from /system/etc
b. copy Kineto.apk from /system/app
c. copy entire /system/lib/hw folder (delete existing one in miui build prior)
d. copy lge-ril.so, libganril.so, libril.so, librilswitch.so, libkineto.so and libwpa_client.so from /system/lib
e. copy entire /system/lib/modules folder (delete existing one in miui build prior)

Step 4
Take the boot.img from the CM Nightly and run it through dsixda's kitchen. (I will not go into detail on this. It's very easy... just read a little) All you are doing with this is adding the "run-parts" feature which enables init.d scripts. This is what allows the "theme" folder to be created at boot so themes work out of the box. I believe from the kitchen menu it's option 0 then option 17. Again, you need to do a little research here. I've provided more than enough info for you to get going...

Step 5
Download this zip HERE. You need to take ALL of the files inside and copy them to their respective folders. The only files that are optional are the init.d scripts, but I recommend using them as they do nothing but benefit the end user. Most of these files are unique and must be used from this zip or you will have issues. You have been warned. I have also included the META-INF folder which is what installs the rom.

Build.prop instructions
The build.prop included in the zip attached is what you want to use with EVERY build. However a few lines need to be updated each week. Copy the following lines from the O2x version to the included build.prop each week. It updates the information regarding the miui build number, etc.

ro.build.id=
ro.build.display.id=
ro.build.version.incremental=
ro.build.version.sdk=
ro.build.version.codename=
ro.build.version.release=
ro.build.date=
ro.build.date.utc=

Step 6 - Please do this step!
Delete the MIUIStats.apk and MIUI.us_Forums_1.1.2_AdSupported.apk from /system/app. I was asked to do this since it is not officially supported by Miui.us. PLEASE DO THE SAME. Thank you.

Step 7 - Finishing up
Once you have done all the above steps you will have two folders and a boot.img (META-INF, system). Zip all three up using 0 compression. I use winrar to do this. Be sure you test flash before posting so you know for sure you did everything correctly.

*I have not included instructions for scrollable widgets because I'm afraid it just might be too much and go over most ppl's heads. I suppose you can use the Launcher2.apk from one of my earlier builds, however if Miui makes changes/additions to the launcher you will be sacrificing them...*

Hope this helps everyone. Again, for those trying to learn PLEASE post in this thread so everyone can learn together. I will be around to make sure ppl are on the right track, however many other ppl will be able to help you too which is another reason to post here. Thank you and I hope everyone has a happy holiday season! ^^
 

·
Premium Member
Joined
·
422 Posts
How to Add Scrollable Widget Support to Miui Launcher

First of all. I DID NOT CREATE THIS MOD. It was originally done by roee88 over on XDA. I have just been updating the new Launcher with it every week.

So I suppose this is actually pretty easy too. Let's begin...

Step 1
Download this zip HERE.

Step 2
Take the Launcher2.apk from your Miui build and decompile with APK Manager. I will not go into detail on this program. Just read about it if you are unfamiliar.

Step 3
Once decompiled open the smali folder. Inside you will see a "com" folder. Take the "mobi" folder from the zip you downloaded above and put it in the smali folder. You now have TWO folders in the smali folder. One that says "com" and another that says "mobi."

Step 4
Inside the smali folder, navigate to the folder com/android/launcher2. Take the FOUR additional included smali files from the zip you downloaded above - CellLayout, Launcher, LauncherAppWidgetInfo, Workspace - and copy them into the launcher2 folder over-writing the existing files.

Step 5 - OPTIONAL
Take the default_workspace.xml from the downloaded zip and place it in the res/xml folder over-writing the original. This is NOT needed for the scrollable widgets. All this does is correct the layout of the launcher when you first install the rom to show everything nice and neat on your screens. The reason stuff is off is because in my instructions above I have you replace the stock Miui Superuser files with the newer ones that most are familiar with. If you have followed my instructions above you know what I'm talking about.


Step 6
Now recompile your Launcher2.apk. When prompted answer Y (for YES) to both questions asked. Now navigate to the "keep" folder in apk manager and delete the following files - classes.dex, resources.arsc and /res/xml/default_workspace.xml (only if you did Step 5) - now go back to APK Manager and press any key to finish recompiling. DONE.

Additional Info
If the launcher looks off - meaning your have weird images or something where the dots should be - then you need to edit the Launcher.smali from the zip you downloaded above. I've only had to do this ONCE. You will need to correct the resource ids. It will take some time... but you can do it... anyways, Enjoy.
 

·
Registered
Joined
·
22 Posts
Appreciate it Whitehawkx. Wish you and Team Kang continued success.

And i couldn't have said this better myself: If you are unsure of something please post in this thread so EVERYONE can learn together
 

·
Android Apprentice
Joined
·
62 Posts
This is amazing!!!! I can't wait till CM start putting out Nightly's again so I can give this a try! Thanks Whitehawkx!! Does this mean you're gonna stop making releases to G2xMIUI?
 

·
Android Apprentice
Joined
·
76 Posts
Thx white

Sent via MIUI-G2X
 

·
Android Apprentice
Joined
·
76 Posts
G2x

Sent via MIUI-G2X
 
  • Like
Reactions: kwattro

·
Android Apprentice
Joined
·
76 Posts
no doubt.. i had all that stuff written on sticky, and was working on G2X Port LOL.. Given White is moving on.. and i salute him for his effort.. I moved from iPhone because i certainly wanted to be part of open source once again.
 
  • Like
Reactions: kwattro

·
Android Beginner
Joined
·
38 Posts
Many thanks for this awesome guide! Just ported the Galnet build (http://bayimg.com/jALpNAaDI - 2.11.26) and it works perfectly
so what exactly did you do to "run it through dsixda's kitchen" as white put it? obviously there are so many things that can be done as i was on the kitchen page but I'm lost. I at the point where I have downloaded the kitchen and have put the CM boot image in the kitchens original_update folder but then what? I guess I'm trying to "run-parts" feature which enables init.d scripts and so on
Thanks
 

·
Registered
Joined
·
4 Posts
Put the nightly rom in original_update,,,create a working folder (theres a pictorial guide on xda: http://hotfile.com/dl/123907924/6ebd9fd/Dsixda_Kitchen_Install_Picture_Tutor.zip.html) ...once done, select option 00 (advanced options) and 17 in Kitchen....it will ask you about adding spare parts / init.d etc....just say yes....

Once you are through with that, just copy the boot.img from original_update to your MIUI rom folder
 

·
SHaDoW
Joined
·
77 Posts
Great instructions WH. I cooked the latest release from MIUI.us and Latest CM nightly. Running perfectly so far but still testing.

P.S I did everything on Linux not on Windows.
 
1 - 20 of 88 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top