How to Create/Make a Custom ROM using Cross UI

Building a tweaked Custom ROM using Cross UI-

This is a user Guide to Create a Fully tweaked Custom ROM using Cross UI base. in earlier article we prepare Custom ROM for own Device using Cross UI [you can find it here] and in the article we are going to creating a Custom ROM for other phone So Lets Start.

Note: Best With AOSP, Perfect with Lineage OS, Nitrogen OS, or any Other Custom ROM, OK with MIUI

Steps-

1. first of all Integrate Cross UI with Your ROM using This Guide [Here]

2. after that Download disk info app from Play store or from apk mirror.

3. open and Note this partition details
A. System
B. Boot

4. Lets Move to Next Step. reboot to twrp Do a factory Reset [Must Require] don’t bootup Phone and connect to PC you are in ‘adb mod’ or use twrp terminal. Run terminal emulator on phone or CMD with PC

Code for PC-
connect phone to PC with usb beugging enabled, make sure you have flashed SuperSu or Phone is Rooted]

adb shell
su
dd if=/dev/block/Here is correct partion name of=/sdcard/boot.img
dd if=/dev/block/Here is correct partition name of=/sdcard/system.img

EX- dd if=/dev/block/mmcblk0p8 of=/sdcard/system.img
wait some time while job is Done

code for For terminal-

type code one by one-
su
dd if=/dev/block/Here is correct partion name of=/sdcard/boot.img
dd if=/dev/block/Here is correct partition name of=/sdcard/system.img

EX- dd if=/dev/block/mmcblk0p8 of=/sdcard/system.img
wait some time while job is Done

5. OK We have System.img and boot.img in main dictionary  take both files and place in a a New Folder

6. then Download this tool Here and Convert system.img to system.new.dat

7. after converting system.img to dat you get these files

A. system.new.dat
b. system.transfer.list
c. system.patch.dat

8. take these all files and including boot.img [dumped in above steps] take a meta-inf [update script] from any ROM which is Prepared for Your ROM and create a Flashable Zip, if there is No ROm available You can use update Script creator to create a ROM update Script.

Related article-

1. How to build/Compile MIUI for any android Device [ Dev only]

here is Demo Of Update Script…

Installing rom in DAT format (TWRP)
#----
# This example is taken from Cyanogen Mod 12 (Google Nexus 5)
# It takes only part of the installation of the image!
# Use only to Lollipop (L) binary
#----
ifelse(is_mounted("/system"), unmount("/system"));
block_image_update("/dev/block/platform/msm_sdcc.1/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");