In order to fulfill the basic functions of our service, the user hereby agrees to allow Xiaomi to collect, process and use personal information which shall include but not be limited to written threads, pictures, comments, replies in the Mi Community, and relevant data types listed in Xiaomi's Private Policy. By selecting "Agree", you agree to Xiaomi's Private Policy and Content Policy .

Porting Team


2017-12-09 18:21:14
14487 18
Hello readers, in this guide, i'll give you the easiest way to porting rom for your device, i've broken my porting record by ported 5 roms in less than 1 hour using this method, have enjoy and hope it'll works for you too

What you need ?
- Rom base (CM or AOSP)
- Rom port (any roms that you like to port and must be CM or AOSP based)
- Apktool (for compiling .apk and .jar files)
- Note++ (for editing .txt and .xml files)
- Winrar or 7zip (for extracting and repacking rom)
- dsixda's Android Kitchen, you really need this to Port MIUI, PAC, and Slimrom
- Open mind and never give up to trying

1. Find the rom port with similar CPU like your device, clock speed doesn't matter here, the important is the number of CPU Cores, if your device is single core, find the single core rom, dual-core with dual-core, etc
2. Forget about screen sizes(4, 5, or 7 inci), the important is screen DPI(pixels destiny) you can port rom from tablet or devices that have bigger/smaller screen sizes
> etc
3. Same Android SDK version(Check in build.prop)
Example, you can port Android 4.4.3 using Android 4.4.2
4. GSM and GSM, CDMA and CDMA
Step by step

Extract booth of the roms(rom base and rom port)

> In rom port folder <
1. Delete all files and folders except "system" folder
2. Delete these folders and files in system
> tts
> usr
> vendor
> build.prop
3. Delete these folders in system/etc
> Bluetooth
> Firmware (if exist)
> Wifi
4. Delete these folders in system/lib
> hw
> modules
5. Go to system/framework
> Open framework-res.apk
> Go to res/xml
> Replace storage-list.xml with your rom base

> In rom base folder <
1. Copy all files and folders except "system" to rom port folder
2. Copy these folders and files in system folder to rom port system folder
> tts
> usr
> vendor
> build.prop
3. Copy these folders in system/etc to rom port system/etc
> Bluetooth
> Firmware (if exist)
> Wifi
4. Copy these folders in system/lib to rom port system/lib
> hw
> modules
Repack the rom then flash it in the recovery
Now the rom port should booted(to menu) now, not stuck on bootanimation anymore
if you still stuck on bootanimation, check bootclasspath in boot.img, unpack it, and check in "init.environ.rc", use note++ to edit it, there's must be something miss there
If the rom doesn't boot to menu or stuck on manufacturer logo(LG, Sony, Samsung, etc), find the same rom port from other devices. I've this experience while porting Liquid Smooth, then i used other devices and it's booted

For porting MIUI Kitkat, you need to unpack boot.img from both roms, then do these
- Copy paste init.miui.rc from rom port to rom base ramdisk folder
- Open init.rc from both roms, then compare it, there's some line you need to be edited...

->Trouble Shooting

Now, to fix some issues in rom port, do these...

1. Information about rom
Open build.prop from booth of the rom then edit information just like the rom port
You can edit these lines in build.prop

# begin build properties
# autogenerated by
# end build properties
ro.modversion= > replace with rom port > you can delete this
and the other lines relating information about rom

2. RIL
Replace these files in rom port with your rom base files
And add any files with "ril" in the name of file

3. Sensor
Replace these files in rom port with your rom base files

4. WiFi
Replace these files in rom port with your rom base files

5. Missing files
You have to copy the rest of files in base rom to port rom to make rom better, but don't replace it if the files/folders was exist

6. Files can be replace in your ported rom using files from base rom

> (for LG devices)

7. Video streaming
and all libs with "libstagefright" of the lib's name

Thank You.Please Hit Thanks! If You Like My Thread!

2017-12-09 18:21:14
Favorites19 RateRate

Rookie Bunny

1708771550 | from app


please make a YouTube video also for this . so than everyone can understand easily
2017-12-09 18:27:44

Rookie Bunny

1693200443 Author | from app


sure i will
2017-12-09 18:28:14
Hey Mate, What About Different SDK, Ex: 23 to 24 or 24 to 23, it will be work ?
2017-12-10 21:03:19
Redmi Note 5 Pro
Always stuck on Google logo (nexus 6), any help ?
2017-12-11 22:38:05

Rookie Bunny

1693200443 Author | from app


ya it will
2018-01-23 16:21:20
Can you port an oreo rom to an nougat base?

Thanks in advance.
2018-07-20 03:11:56

Rookie Bunny

1693200443 Author | from app


you can port to other nougat version like 7.0 to 7.1.1 to 7.1.2 but not oreo

same like oreo you can port from 8.0 to 8.1
2018-07-21 14:01:06

Ok, so I've got to wait until they update android to oreo.
2018-07-22 22:48:10
You say that the rom port must be CM or AOSP? So there's no possibility of porting a Samsung rom to a non Samsung device?
2018-09-29 15:08:00

Semi Pro Bunny

RockIn82 | from app


Its is good news for me. want to learn it.
2018-10-02 12:45:49
please sign in to reply.
Sign In Sign Up


Rookie Bunny

  • Followers


  • Threads


  • Replies


  • Points


Read moreGet new

Mi Comm APP

Stay updated on Mi Products and MIUI

Copyright©2010-2020, All Rights Reserved
Quick Reply To Top Return to the list