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?
Download Optimus 2x build from roms.miui.us
Download latest CM Nightly (official, unofficial, really doesn't matter)
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)
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...
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.
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.
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! ^^