Hi,
This is a all in one guide for making custom roms for Infinix Hot 2.
The guide will have 3 parts:
1) Normal porting
2) Crossporting
3) Compile from source
Disclaimer:
Basics & Terms:
Terms:
Stock ROM: This is your original ROM. Can also be called Stock.
Port ROM: This is the ROM you want to port. Can also be called Port.
Boot.img: This is the kernel and the ramdisk.
BootP.img: This should be Port ROM Boot.img
BootS.img: This should be Stock ROM Boot.img
Basics:
Part 1: Normal porting
I. Get Stock ROM ready
A- Method 1:
1) Connect your phone to your PC.
- Make sure it's rooted and you're on stock rom.
- Make sure you have installed all necessary drivers including ADB, Fastboot, Vcom PreLoader etc.
- Make sure you have enabled "USB Debugging" in "Developer Options"
2) Create a folder on your desktop and name it "System". Open it and click on "Shift" on your keyboard now click "Open command window here"
3) Now type in the following command:
Once done, you should find your files in system folder you created in step 2.
4) Now time to extract stock boot.img. Type the following commands (press enter after each command):
Now you should have boot.img inside system folder. Create a new folder and name it "Stock". Move boot.img from system folder created in step 2 to the newly created "Stock" folder. Move the system folder itself to "Stock" folder.
B- Method 2:
If for some reasons that doesn't work, then follow these.
1) Get a Stock ROM for your Hot 2 (Infinix 5.1 recommended).
2) Extract it, you'll get a folder with a bunch of files inside it. We just need boot.img and system.img
3) Download and extract this file
4) Open the extracted folder, open ext4_unpacker.exe and click on the little folder near the Exit button.
5) Locate the system.img file of the stock rom you extracted in step 2.
6) Wait till it loads, now select all the files on the right column. Right click and select "Extract", point it to the system folder inside the extracted archive (extracted in step 3).
7) When done, move the system folder from the extracted archive to a new folder (name that new folder "Stock"). Copy boot.img from the extracted folder in step 2.
II. Get Port ROM ready
The Port ROM will come in either Recovery flashable or SP Flash tool flashable format. Procedure is different for each.
A- Recovery version:
If the ROM comes in Recovery version, you'll see system.new.dat inside the archive instead of system.img Follow these to get it extracted.
1) Download and extract the ROM
2) Download the archive here and extract it somewhere.
3) Move everything except META-INF from the extracted folder in step 1 to the extracted folder in step 2.
4) Do "Shift" and right click to open CMD here. Now read the IMPORTANT.txt file. Open README.txt, copy one of the command and paste it in the CMD terminal. Press enter.
5) When done, you should see a new file named "new_system.ext4"
6) Open ext2explore.exe Click file and then Open Image, locate the "new_system.ext4" file.
7) When it's loaded, right click on the file on the right column and then save, point it to the "system" folder inside the extracted folder (extracted on step 2). When done move it to a new folder (name that folder "Port"). Also copy boot.img from the Port ROM to that folder.
B- SPFT version:
If the ROM is in SPFT format, then you'll see system.img and many other .img files.
Just follow Method 2 of Stock ROM extraction :cyclops:
If for some reasons it doesn't work, Follow these:
1) Download this program and extract it in the Port ROM folder alongside all the .img and .bin files.
2) Drag and drop system.img into the ImgExtractor.exe file. Wait till the end. You'll find the extracted system.img inside system_ folder.
3) Done! So easy :D
III. Porting
Once you have Stock ROM and Port ROM ready. You can now start to port.
A- Porting system:
1) Open Stock ROM and Port ROM folders side-by-side
2) Copy these files from Stock/system/lib: libcamalgo.so , libcameracustom.so . Paste them in Port ROM/system/lib folder, replace when prompted.
3) Open build.prop of port ROM with a text editor. Search for "qemu.hw.mainkeys" and set its value to "0". If it doesn't exist then add it at the end of build.prop. It should look like this qemu.hw.mainkeys=0 Sometimes the 0 value doesn't work, you'll have to try with 1 (qemu.hw.mainkeys=1). If it still doesn't, then you'll have to use third-party navbars like "Simple Control" from Play Store.
4) Still inside build.prop, make sure that ro.sf.lcd_density value is 320. Save and exit.
A- Porting system:
1) Download Carliv Image Kitchen from this thread Extract it somewhere
2) Copy Stock boot.img to the extracted Carliv Image Kitchen/boot-ressources. Rename it to BootS.img
3) Move (yes, move) boot.img of Port ROM to Carliv Image Kitchen/boot-ressources. Rename it to BootP.img
4) Double click "Carliv.bat" and follow steps to extract both img files.
5) Now, open BootS folder, copy all the 9 files (not the ramdisk folder). Paste them in BootP folder. Replace when prompted.
6) Go back to Carliv Image Kitchen CMD window, make sure that BootP.img is selected. Now press "2" to repack the kernel.
7) When done, go to Carliv Image Kitchen/Output and copy the repacked boot.img (should be named boot_201x_xxx.img). Paste it in the Port ROM folder.
8) Copy the META-INF folder from "Extract_System.rar" archive. Paste it in Port ROM folder so that you have META-INF, system and boot.img.
9) Select all the files and zip them. Copy them to your Hot 2. Boot to recovery. Wipe data and factory reset. Click advanced wipe and select cache, dalvik-cache, system and slide to wipe. Go back and select your created ROM. Install!
10) Congratulations! You just ported a ROM to your Hot 2 :laugh:
Alternatively, you can simply follow these (only if Port ROM comes in SPFT format).
1) Extract both ROMs
2) Port Kernel using the above guide
3) Open SPFT, load the scatter file of your Stock ROM.
4) Uncheck everything. Click on boot column and load the ported kernel from step 2.
5) Click on system column and select system.img of the Port ROM
Flash your device with these two files.
!!! WARNING !!!
NEVER USE ANOTHER DEVICE'S SCATTER FILE.
THIS METHOD IS KNOWN TO EASILY CORRUPT SYSTEM PARTITION. YOU WILL HAVE TO MANUALLY FORMAT IT IN RECOVERY IF THAT HAPPENS.
Credits:
- xpirt
- Carliv
- And_PDA
Anyone is free to use my work. You are even free to give credits. But before doing so, remember that Android is about sharing. Open source is what makes Android's beauty. Many people work on MTK but they never expose all their porting secrets. :cowboy: Using this guide doesn't give you the right to port someone else's ROM without their permission.
This is a all in one guide for making custom roms for Infinix Hot 2.
The guide will have 3 parts:
1) Normal porting
2) Crossporting
3) Compile from source
Disclaimer:
Code:
I, XDA or anyone else involved in the making of this guide
can NEVER be help for any damage to your device if you
follow an even small part of this guide. We won't bear
any responsability for dead sdcards, thermonuclear
explosions, fried mother, your device gave birth to a
dragon or goes to mars!
If anything happens, bad or good, consider it as fate and
live with it. Terms:
Stock ROM: This is your original ROM. Can also be called Stock.
Port ROM: This is the ROM you want to port. Can also be called Port.
Boot.img: This is the kernel and the ramdisk.
BootP.img: This should be Port ROM Boot.img
BootS.img: This should be Stock ROM Boot.img
Basics:
Quote:
| What is porting ? Porting is simply making another device's software work on yours. Benefits ? Well, you can enjoy many custom UI beside the stock ROM's UI such as: - Amigo OS - HTC Sense - Samsung Touchwiz - Freeme OS - Flyme OS - Asus Zen UI - Etc |
I. Get Stock ROM ready
A- Method 1:
1) Connect your phone to your PC.
- Make sure it's rooted and you're on stock rom.
- Make sure you have installed all necessary drivers including ADB, Fastboot, Vcom PreLoader etc.
- Make sure you have enabled "USB Debugging" in "Developer Options"
2) Create a folder on your desktop and name it "System". Open it and click on "Shift" on your keyboard now click "Open command window here"
3) Now type in the following command:
Code:
adb devices
adb pull /system 4) Now time to extract stock boot.img. Type the following commands (press enter after each command):
Code:
adb shell
su
cd /sdcard
mkdir dd.out
dd if=/dev/block/platform/mtk-msdc.0/by-name/boot of=/sdcard/dd.out/boot.img
exit
adb pull sdcard/dd.out/boot.img B- Method 2:
If for some reasons that doesn't work, then follow these.
1) Get a Stock ROM for your Hot 2 (Infinix 5.1 recommended).
2) Extract it, you'll get a folder with a bunch of files inside it. We just need boot.img and system.img
3) Download and extract this file
4) Open the extracted folder, open ext4_unpacker.exe and click on the little folder near the Exit button.
5) Locate the system.img file of the stock rom you extracted in step 2.
6) Wait till it loads, now select all the files on the right column. Right click and select "Extract", point it to the system folder inside the extracted archive (extracted in step 3).
7) When done, move the system folder from the extracted archive to a new folder (name that new folder "Stock"). Copy boot.img from the extracted folder in step 2.
II. Get Port ROM ready
The Port ROM will come in either Recovery flashable or SP Flash tool flashable format. Procedure is different for each.
A- Recovery version:
If the ROM comes in Recovery version, you'll see system.new.dat inside the archive instead of system.img Follow these to get it extracted.
1) Download and extract the ROM
2) Download the archive here and extract it somewhere.
3) Move everything except META-INF from the extracted folder in step 1 to the extracted folder in step 2.
4) Do "Shift" and right click to open CMD here. Now read the IMPORTANT.txt file. Open README.txt, copy one of the command and paste it in the CMD terminal. Press enter.
5) When done, you should see a new file named "new_system.ext4"
6) Open ext2explore.exe Click file and then Open Image, locate the "new_system.ext4" file.
7) When it's loaded, right click on the file on the right column and then save, point it to the "system" folder inside the extracted folder (extracted on step 2). When done move it to a new folder (name that folder "Port"). Also copy boot.img from the Port ROM to that folder.
B- SPFT version:
If the ROM is in SPFT format, then you'll see system.img and many other .img files.
Just follow Method 2 of Stock ROM extraction :cyclops:
If for some reasons it doesn't work, Follow these:
1) Download this program and extract it in the Port ROM folder alongside all the .img and .bin files.
2) Drag and drop system.img into the ImgExtractor.exe file. Wait till the end. You'll find the extracted system.img inside system_ folder.
3) Done! So easy :D
III. Porting
Once you have Stock ROM and Port ROM ready. You can now start to port.
A- Porting system:
1) Open Stock ROM and Port ROM folders side-by-side
2) Copy these files from Stock/system/lib: libcamalgo.so , libcameracustom.so . Paste them in Port ROM/system/lib folder, replace when prompted.
3) Open build.prop of port ROM with a text editor. Search for "qemu.hw.mainkeys" and set its value to "0". If it doesn't exist then add it at the end of build.prop. It should look like this qemu.hw.mainkeys=0 Sometimes the 0 value doesn't work, you'll have to try with 1 (qemu.hw.mainkeys=1). If it still doesn't, then you'll have to use third-party navbars like "Simple Control" from Play Store.
4) Still inside build.prop, make sure that ro.sf.lcd_density value is 320. Save and exit.
A- Porting system:
1) Download Carliv Image Kitchen from this thread Extract it somewhere
2) Copy Stock boot.img to the extracted Carliv Image Kitchen/boot-ressources. Rename it to BootS.img
3) Move (yes, move) boot.img of Port ROM to Carliv Image Kitchen/boot-ressources. Rename it to BootP.img
4) Double click "Carliv.bat" and follow steps to extract both img files.
5) Now, open BootS folder, copy all the 9 files (not the ramdisk folder). Paste them in BootP folder. Replace when prompted.
6) Go back to Carliv Image Kitchen CMD window, make sure that BootP.img is selected. Now press "2" to repack the kernel.
7) When done, go to Carliv Image Kitchen/Output and copy the repacked boot.img (should be named boot_201x_xxx.img). Paste it in the Port ROM folder.
8) Copy the META-INF folder from "Extract_System.rar" archive. Paste it in Port ROM folder so that you have META-INF, system and boot.img.
9) Select all the files and zip them. Copy them to your Hot 2. Boot to recovery. Wipe data and factory reset. Click advanced wipe and select cache, dalvik-cache, system and slide to wipe. Go back and select your created ROM. Install!
10) Congratulations! You just ported a ROM to your Hot 2 :laugh:
Alternatively, you can simply follow these (only if Port ROM comes in SPFT format).
1) Extract both ROMs
2) Port Kernel using the above guide
3) Open SPFT, load the scatter file of your Stock ROM.
4) Uncheck everything. Click on boot column and load the ported kernel from step 2.
5) Click on system column and select system.img of the Port ROM
Flash your device with these two files.
!!! WARNING !!!
NEVER USE ANOTHER DEVICE'S SCATTER FILE.
THIS METHOD IS KNOWN TO EASILY CORRUPT SYSTEM PARTITION. YOU WILL HAVE TO MANUALLY FORMAT IT IN RECOVERY IF THAT HAPPENS.
Credits:
- xpirt
- Carliv
- And_PDA
Anyone is free to use my work. You are even free to give credits. But before doing so, remember that Android is about sharing. Open source is what makes Android's beauty. Many people work on MTK but they never expose all their porting secrets. :cowboy: Using this guide doesn't give you the right to port someone else's ROM without their permission.
from xda-developers http://ift.tt/27Mg4bz
via IFTTT
No comments:
Post a Comment