: "Recently, the MIUI team has opened up its source on GitHub. This makes it now possible for everybody to compile MIUI roms. However, the guide they've provided is completely in Chinese. Credits go to ThePCGuy for finding out how it works (original topic) I wrote this guide according to his findings and added complementary items that I found out during my attempts.

MIUI recently opensourced a set of tools made for porting it's ROM to other devices. Although I haven't managed to build a working ROM for our dear X8, here's a little guide on how it (kinda) works, maybe it helps someone.

Any contribution is welcome

Here's what I've found of PatchROM:

Get PatchROM from here (384MB)And make sure you have apktool installed.

The overall proccess looks like this:

Extract the tools

Get an Gingerbread ROM to install MIUI stuff;

Create the required file structure

Change the Makefile

Apply MIUI changes to the selected ROM

Flash it!

STEP 1: Extracting the toolsI've extracted the tools to ~/patchrom, but you can use another directory if you want. I'll call that folder the PatchROM root folder.

STEP 2: Choosing the ROMThe PatchROM docs recommend that we use a stock Gingerbread ROM from the device manufacturer, but there's no official Gingerbread for our device, so I used a MiniCM7 zip instead.EDIT: make sure you use an deodexed rom or deodex your rom.

STEP 3: Creating the file structureTo port, we need to create a folder inside the PatchROM root directory for our device. There's an example device for the Samsung Galaxy S on the i9000 folder, we'll use that as a base. I created a folder called 'shakira' and copied the makefile file from the i9000 folder and the MiniCM7 zip to it.

You also need to decompile the following APK files and put the resulting folder on the 'shakira' folder:

The 'local-out-zip-file' is the MIUI ROM output name (put any name you want here)

The 'local-modified-apps', as pointed by MisterGT, 'are those that are required from the original rom because they do important stuff (like Phone.apk communicates with your phone's radio). Thus these can not be easily copied from miui but have to be modified.'

The 'local-miui-apps' point to the MIUI files; I didn't changed those

The 'local-remove-apps' indicates apps to be removed from the ROM

As MisterGT also pointed out here (thanks mate!), the "local-pre-zip := local-zip-misc" line executes the code block before the zip is done, and the "local-after-zip:= local-test" executes the code block after the zip is done.

STEP 5: Apply MIUI ChangesTo apply the MIUI changes on the choosen ROM, type those commands in the root of PatchROM:

Code:

source build/envsetup.sh cd shakira # CHANGE THIS LINE TO MATCH THE FOLDER YOU CREATED IN STEP 3 make

Now it should decompile the ROM and merge the ROM's smali files with the MIUI files, and create an ZIP file with the MIUI rom, but I got some errors decompiling SystemUI.apk maybe some of the awesome devs there can solve this

4. On x64 systems you are required to install some 32-bit libraries or the android toolkit will not work. In a terminal write:

Code:

sudo apt-get install ia32-libs

Step 2: Find an appropriate source romThe package will convert a standard rom to a MIUI rom, so you'll have to choose a ROM you want to use as base. According to the manual, there are two requirements:

Android 2.3.3 - 2.3.7 supported

ROM with root abilities

Only HDPI devices are supported!

So after you've picked one, download it. In your MiCode root dir, create a new map and give it some name (I chose p990 as name). In that folder, put the ROM.zip and do not unzip it.

Step 3: Setting up the makefileFirstly, copy the makefile from the i9100 directory which is an example. This is how it looks like:

It will now do a lot of things to build the ROM. Unfortunately, I'm getting a lot of errors when it tries to modify the apps from 'local-modified-apps'. And I don't have any clue to fix it, don't know anything about that..

22 Responses so far.

zonziaglobal On this website you'll recharge your postpaid mobile on-line. postpaid Recharge for all major India's prime cellular services is offered here. except for GSM phone recharge, on-line recharge is additionally accessible for CDMA postpaid cellphones. The payments is created through all major credit cards or bank transfersand free recharge.