Making custom ROM
Let's move on to make a custom ROM.
Inputs/Feedback/Suggestions are more than welcome. Lets improve this tutorial together for the betterment of the android community.
Steps involved in making a custom ROM:
- Getting the system dump from the device.
- Deodexing app and framework folders.
- Creating various mods by modifying framework and system files.
- Modifying build.prop and adding tweaks.
- Making META-INF folder and writing an updater-script (edify scripting).
- Signing the ROM and making a flashable zip.
Before going forward, let's follow the below structure folder to make the tutorial more understandable.
Let our ROM name be CustomROM
. The folder structure will be C:\Users\<your name>\CustomROM
Let's move step by step. Are you ready??
Getting the system dump from the device:
- Make sure USB debugging is ON and connect your device to the PC.
- Open command prompt on your windows PC and go to CustomROM folder path.
- Type adb devices. You should be able to see the device detected. (If not check environmental variables whether adb is in system path or not. If not present, add the adb path.)
- Type the below command to get the dump of system folder.
adb pull /system system/
Now inside the folder CustomROM, you should be able to see system folder with many folders like app, etc, framework etc inside.
Done with first step.
Deodexing app and framework folders:
how to deodex app and framework folders. Copy the app and framework folders to xUltimate folder, rename them to origi_app and origi_frame and follow the given link to deodex.
NOTE: After deodexing, merge origi_app folder with app folder under C:\Users\<your name>\CustomROM\system\app and origi_frame with framework folder under C:\Users\<your name>\CustomROM\system\framework.
Creating various mods by modifying framework and system files
Okay. This the section where your hardwork, innovation and talent comes in.
You can use the mods available already, create your own mods, port various mods from other devices and so on.
Below is a list of various mods which can be ported on to I9100G. All the credits go these respective thread owners. Thanks to them.
NOTE: Let me know more mods with links so that I can add here.
Modifying build.prop and adding tweaks
Okay. This is one of those files where you name your ROM(to be visible in settings.
) and add many tweaks.
To name your ROM (to be visible in settings), change the below code.
Check the below links for many other tweaks. All credits go to respective thread owners. Thanks to them.
Making META-INF folder and writing an updater-script (edify scripting)
Once you're done with all the modifications, mods and additions, its time to create META-INF folder and make the updater script. Once the user flashes the ROM zip, this is the script that runs and does everything written inside the script. PLEASE BE CAREFUL WITH THIS. TAKE REFERENCE FROM OTHER (SAME DEVICE) ROMS' UPDATER-SCRIPT. (In this case, take reference from other GT-I9100G roms.)
Check the below links for tutorial and how-to on writing edify script and making updater script. All credits go to respective owners of the threads. Thanks to them.
Edify Scripting, Making Flashable ZIPs, ZIP Signing & Key Creation
Edify Scripting Notes
How to Write an Updater-Script with Edify Code
Edify Installation Script Syntax's
NOTE: system folders path, boot/kernel partition path, modem partition path and so on are COMPLETELY DIFFERENT for DIFFERENT DEVICES. Check the partitions for your device properly, carefully and then work on updater-script. TAKE HELP OR REFERENCE FROM OTHER ROM DEVELOPERS FOR YOUR DEVICE.
Lets move on to last step. Making a signing and making a flashable zip.
Signing the ROM and making a flashable zip
Make sure, now you should be able to find two folders (META-INF and system) inside C:\Users\<your name>\CustomROM.
Check in THIS
thread for test signing your ROM. It WORKS with GT-I9100G. TESTED.
or Check THIS
thread to create your own signing key and certificate.
Now you're done with making a custom ROM. Hope to see more custom ROMs from many users.
For porting ROMs, refer THIS
tutorial. (thanks and credits to ayushrox)
Give me your feedback so that I can improve this tutorial. And post here about how your custom ROM making went. All the best.