[Android General] alfansa:
Flashing S920 with MIUI ROM

Hi,

Just want to share my experiance flashing S920 with MIUI ROM V4.1.25. This is step by step and I think worth to doing, even tough I ended flasing again with original S920 ROM ;)

Pre-requisites:

S920 already rooted

Have a CWM recovery

Original ROM, URL already at page one.

MIUI ROM, can be downloaded from en.miui.com/download-140.html

Step:

Nandroid your data, this handy when you decided want to go back

Check your partition, this is important given install script for MIUI ROM maybe have a different partition layout with your S920. You can look partition for internal memory at S920 by going to look symbolic at / folder. My partition looked like this:

lrwxrwxrwx root root 1970-01-01 08:00 emmc@android -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 1970-01-01 08:00 emmc@cache -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 1970-01-01 08:00 emmc@ebr1 -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 1970-01-01 08:00 emmc@fat -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 1970-01-01 08:00 emmc@preload -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 1970-01-01 08:00 emmc@protect_f -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 1970-01-01 08:00 emmc@protect_s -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 1970-01-01 08:00 emmc@sec_ro -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 1970-01-01 08:00 emmc@usrdata -> /dev/block/mmcblk0p8

What we look is emmc@android that going to be /system folder and emmc@usrdata that going to be /data. In my case, /system is /dev/block/mmcblk0p6 and /data is /dev/block/mmcblk0p8.

Inspect install script at MIUI ROM, file updater-script at folder META-INF/com/google/android. The first eight lines should be looked like this:

assert(getprop("ro.product.device") == "S920" ||
getprop("ro.build.product") == "S920");
show_progress(0.500000, 0);
ui_print("Formatting system...");
unmount("/system");
format("ext4", "EMMC", "/dev/block/mmcblk0p5", "0");
ui_print("Installing system files...");
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");

mormat and mount commad refer to different devices block from my S920, so I must change them with apropriate value, in this case changed to /dev/block/mmcblk0p6. And delete two first line above, assert commad, that I don't know yet what command is that, tha I do know is with that commad installation will became fail ;)

furthermore, see the last five lines that should look like this:

mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/data");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0755, 0644, "/data/preinstall_apps");
unmount("/data");
unmount("/system");

mount command, again, refer to different block device with my own, so I changed /dev/block/mmcblk0p7 to /dev/block/mmcblk0p8. With that changes placed already, return updater-script back to zipped MIUI ROM. Copy that ROM to your sdcard.

Power off the phone and power on to CWM recovery with holding the volume up, volume down and power buttom at the same time. Wipe user data (factory reset) and wipe dalvik cache. Give it a roll to install that zipped ROM. Be patience and reboot after installing process finished.

That's all, have a nice day with your MIUI at S920 :)