Hello guys,i was trying porting MIUI for Zenfone (I used Mi Pad 2's rom).I am following this guide :http://http://forum.xda-developers.com/android/software/guide-build-port-miui-rom-to-device-t3250984
I prepared the rom,now i am trying modifying boot.img but with Android Kitchen at guide it is impossible,so i googled and found this:http://github.com/shakalaca/ZenFone-boot-tools
and this:http://github.com/sndnvaps/intel-boot-tools
but i couldn't extract ramdisk and split_img files.
So how can i extract ramdisk and split_img files or is it possible?
Thanks!
Yeap its possible!
You should look this : https://github.com/xiaolu/intel-boot-tools
Yeah,i saw that,tried but when i drag boot.img top of the unpack.exe nothing happens
My recommendation is for you to use AndImgTool, download it here: https://basketbuild.com/filedl/devs?dev=dgadelha&dl=dgadelha/Tools/AndImgTool.exe
Me and tank use it to [un]pack the kernels.
Also you can use mboot.py by quanganh2627 .This script was made for Linux and it is working good.
- unpack: mboot.py -u boot.img
- repack: mboot.py new-boot.img
https://drive.google.com/file/d/0BwEWY6gMvYOedDV1LVJUVkN2dms/view
I think that you can use AOSP kernel for miui but maybe few changes in ramdisk will be needed.
Do you have space between ur computer's user account's username???If it is there,it won't work......
Try moving that unpacking software folder to Root C drive and then from there try perform dragging the img on to the unpack.exe file....
and for other ported roms ? can by port rom unbootable duo to non ported kernoel ?
Related
This tool i came across when i was working on the Ubuntu for Eris.
Code:
It copies your bootimage to a temp file so it has a space to work in
It then unpack the boot.img
Replaces the zImage you included ith the original one
Repacks the boot.img
Flashes the new boot.img with your kernel in it.
All you need to do is rename your kernel zimage, and place it in the kernel folder and re-sign it. MUCH easier than fastboot or baking up a custom boot.img each time you have to swap the kernel.
All thanks to Koush, i just found the thing
I've updated the boot.img for paxb build 504 with TWRP to replace CWM. Some were asking how to do this.
Always keep a backup of a file known as working. If your device doesn't boot after flashing a modified file, just reflash that backup.
To perform this mod on your own follow these steps:
1. Download and unpack the Android Image Kitchen
2. Extract the boot.img from the downloaded ROM to the kitchen directory
3. Unpack the image:
Code:
unpackimg.bat boot_cwm_pabx_504.img
Output:
Code:
Android Image Kitchen - UnpackImg Script by osm0sis @ xda-developers
Supplied image: boot_cwm_pabx_504.img
Removing old work folders and files . . .
Setting up work folders . . .
Splitting image to "/split_img/" . . .
BOARD_KERNEL_CMDLINE androidboot.hardware=sony user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 vmalloc=400M
BOARD_KERNEL_BASE 80200000
BOARD_NAME
BOARD_PAGE_SIZE 2048
BOARD_KERNEL_OFFSET 00008000
BOARD_RAMDISK_OFFSET 02000000
BOARD_TAGS_OFFSET 00000100
Unpacking ramdisk to "/ramdisk/" . . .
Compression used: gzip
9694 blocks
Done!
This process will overwrite previously extracted contents!!!
4. Create a directory for the original image content, e.g. "boot_cwm_pabx_504" and COPY the created directories "ramdisk" and "split_img" into it. This ensures you can recreate it if necessary or access its original contents
5. Repeat step 4 for a downloaded TWRP (or any other recovery) image, e.g. "openrecovery-twrp-2.8.0.1-yuga.img".
6. Locate the "*-ramdisk.cpio.gz" file in the dirs from step 5, most likely in "split_img".
7. Ensure the "ramdisk" and "split_img" directories in the kitchen root dir are those from the image you want to modify (i.e. copy back from the folder created in step 4. Then remove the "*.cpio" from the "ramdisk\recovery" directory
8. Extract the TWRP "*.cpio" file from the "*-ramdisk.cpio.gz" in step 6 to "ramdisk\recovery" and rename it to "ramdisk-recovery.cpio"
9. rebuilt the image with the updated content:
Code:
repackimg.bat
Output:
Code:
Android Image Kitchen - RepackImg Script
by osm0sis @ xda-developers
Packing ramdisk . . .
Using compression: gzip
Getting build information . . .
kernel = boot_cwm_pabx_504.img-zImage
cmdline = androidboot.hardware=sony user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 vmalloc=400M
board =
base = 80200000
pagesize = 2048
kernel_offset = 00008000
ramdisk_offset = 02000000
tags_offset = 00000100
Building image . . .
10. Step 9 creates a file called "image-new.img". Rename it to something more self-explanatory, i.e. "boot_twrp_2.8.0.1_pabx_504.img"
11. To flash the file flash it like any other file using the new name:
Code:
adb reboot bootloader
fastboot flash boot boot_twrp_2.8.0.1_pabx_504.img
fastboot reboot
That's it, enjoy your new recovery.
Note: I had issues getting TWRP 2.8.1.0 working, so I'm still using the predecessor 2.8.0.1.
The latest pabx "boot.img" modified with TWRP is attached.
Known issues
after restoring a Nandroid backup access to the internal storage isn't allowed anymore
Open a terminal or run through a adb shell:
Code:
restorecon -FR /data/media/0
Thank works dobře.TWRP I like long ....
cant understand what you mean in step 7 and 8..... i just unpacked boot.img (the img that i want to put a recovery on it) and then i created a folder and i copied split_img and ramdisk into it.....then i unpacked twrp.img and it replaced the previous split_img and ramdisk folders with the twrp ones..... i still have the folder i created with the original split_img and ramdisk folders from boot.img but i can understand what to do next....
well, sorry for that,...i think i got it now that i read it about 20 times..... one question though :
i copy ramdisk.cpio.gz from the twrp and i move it to the recovery folder of the boot img without extracting? just renaming it from ramdisk.cpio.gz to ramdisk-recovery.cpio ???
arismelachrinos said:
cant understand what you mean in step 7 and 8..... i just unpacked boot.img (the img that i want to put a recovery on it) and then i created a folder and i copied split_img and ramdisk into it.....then i unpacked twrp.img and it replaced the previous split_img and ramdisk folders with the twrp ones..... i still have the folder i created with the original split_img and ramdisk folders from boot.img but i can understand what to do next....
well, sorry for that,...i think i got it now that i read it about 20 times..... one question though :
i copy ramdisk.cpio.gz from the twrp and i move it to the recovery folder of the boot img without extracting? just renaming it from ramdisk.cpio.gz to ramdisk-recovery.cpio ???
Click to expand...
Click to collapse
Yeah I didn't fully understand that either, but i just tried it.
You delete ramdisk-recovery.cpio from /ramdisk.
You extract ramdisk.cpio.gz to the /ramdisk folder.
You rename it to ramdisk-recovery.cpio.
Repack image.
(note that when the kernel you use is already a dualrecovery kernel -lightning for example, cwm philz+twrp- and u want it to be multirom twrp, u need to edit init.sh also found in /ramdisk folder somewhere)
BTW thanks for this guide! I was messing with this a few days ago and I couldn't get it to work, thanks to you I now understand why!:thumbup:
I tried to put latest twrp into latest boot.IMG of Thomas lollipop 23/11/14 build and I thought it worked but I press volume up and down to enter the recovery and it does nothing....it doesn't boot,it just freezes with the led lighting.... please help I really want twrp to work with lollipop
arismelachrinos said:
I tried to put latest twrp into latest boot.IMG of Thomas lollipop 23/11/14 build and I thought it worked but I press volume up and down to enter the recovery and it does nothing....it doesn't boot,it just freezes with the led lighting.... please help I really want twrp to work with lollipop
Click to expand...
Click to collapse
Reread what I wrote.
You probably didn't extract ramdisk.cpio.gz, or you putted it into /split_img I think. Cuz I had that too, but if you follow the exact steps it will work!
no I did exactly what you said... I fully understood the instructions,I extracted it , I named it right and I moved it right... well, I will try again tomorrow but I don't think it will boot into it... Thomas boot.img has a cwm recovery ,does this have smthg to do with it?
arismelachrinos said:
no I did exactly what you said... I fully understood the instructions,I extracted it , I named it right and I moved it right... well, I will try again tomorrow but I don't think it will boot into it... Thomas boot.img has a cwm recovery ,does this have smthg to do with it?
Click to expand...
Click to collapse
What version of TWRP did you use? 2.8.1.0 will likely not work, use an older one instead.
arismelachrinos said:
cant understand what you mean in step 7 and 8..... i just unpacked boot.img (the img that i want to put a recovery on it) and then i created a folder and i copied split_img and ramdisk into it.....then i unpacked twrp.img and it replaced the previous split_img and ramdisk folders with the twrp ones..... i still have the folder i created with the original split_img and ramdisk folders from boot.img but i can understand what to do next....
well, sorry for that,...i think i got it now that i read it about 20 times..... one question though :
i copy ramdisk.cpio.gz from the twrp and i move it to the recovery folder of the boot img without extracting? just renaming it from ramdisk.cpio.gz to ramdisk-recovery.cpio ???
Click to expand...
Click to collapse
Adjusted the description of step 8, should be more clear now what to do.
I've also added a note to point out explicitly that each run of "unpackimg.bat" will overwrite existing data.
Thank you so much for the guide! Really appreciate it =D
mcfisch said:
What version of TWRP did you use? 2.8.1.0 will likely not work, use an older one instead.
Click to expand...
Click to collapse
I used the latest twrp...maybe that's why....I will try again and I will post here
thank you sooooo much.... i did it with the second try...the only thing i changed was that i downoaded a previous version of twrp because it wont work with the latest one...thanks a lot.... what about cwm? is it the same proccess?
CWM is included already. But you could split the latest cm boot.img and grab ramdisk-recovery.cpio from ramdisk/sbin to get the most up to date version
is this mean can add TWRP into .FTF files ?
that will be awesome
Can anyone share their twrp included boot.img for the latest thomas release?
i tried to do this on the cm12 expirimental build and the boot.img of that zip doesnt have a recovery folder inside ramdisk folder... i did create one just to see if it works and it didnt
arismelachrinos said:
i tried to do this on the cm12 expirimental build and the boot.img of that zip doesnt have a recovery folder inside ramdisk folder... i did create one just to see if it works and it didnt
Click to expand...
Click to collapse
Look for a *.cpio or *.cpio.gz file and replace that accordingly. The place doesn't really matter for you, the ROM knows where to find it. CM might expect it respectively at another place. Will take a look later if I can find something...
mcfisch said:
Look for a *.cpio or *.cpio.gz file and replace that accordingly. The place doesn't really matter for you, the ROM knows where to find it. CM might expect it respectively at another place. Will take a look later if I can find something...
Click to expand...
Click to collapse
can you please take look at this?because i did search all the ramdisk folder and i found nothing.... i uploaded the boot.img so that you dont have to download the rom zip
https://www.mediafire.com/?5d6swrdegr53iel
mcfisch said:
Look for a *.cpio or *.cpio.gz file and replace that accordingly. The place doesn't really matter for you, the ROM knows where to find it. CM might expect it respectively at another place. Will take a look later if I can find something...
Click to expand...
Click to collapse
Won't work like that. Needs a script to be inserted into the ramdisk, @pabx style, plus the recovery folder with ramdisk-recovery.cpio inside.
was thinking why the latest TWRP was not working, then realized that the TWRP is written to be loaded into the FotaKernal.
then it worked with TWRP flashed into FotaKernal.
have pabx_aosp_yuga-509 installed
1. Followed your steps exactly to create a new boot_pabx_aosp_yuga-509.img (with the latest TWRP image "recovery-twrp-2.8.4.1-yuga.img").
2. Flashed recovery-twrp-2.8.4.1-yuga.img into the FotaKernal.
3. Flashed the new boot_pabx_aosp_yuga-509.img
it works
Edit: On my Xperia Z c6002 (yuga)
Hello,
First of all, im new to android modding and linux. I tried to build a kernel from stock G935FXXU1BPH6 source based on their readme file. My problem is, I don't have a zImage file after build that I could put into a flashable zip. I only have Image and Image.gz (I guess thats normal for arm64 kernels?) and I don't know how to make them flashable. I found a youtube video where the dude placed the Image file in a directory called "tools" in his flashable zip, I tried it and TWRP said I installed it successfully but when I start up my phone and check kernel version its still the previous one not mine.
Used this toolchain: aarch64-linux-android-4.9/bin/aarch64-linux-android-
I've set up CROSS_COMPILE path, then I set up configuration:
make ARCH=arm64 exynos8890-hero2lte_defconfig
make menuconfig (to tweak it a little bit more, like custom kernel version string so I can see if it worked)
Then I started build:
make ARCH=arm64
Output when build finished:
>>>>> Time used for generated all hashes is 6 sec
OBJCOPY arch/arm64/boot/Image
GZIP arch/arm64/boot/Image.gz
DTC arch/arm64/boot/dts/exynos8890-smdk8890.dtb
DTC arch/arm64/boot/dts/exynos8890-universal8890.dtb
Anyone knows how could I make it flashable? Thanks.
keezay said:
Hello,
First of all, im new to android modding and linux. I tried to build a kernel from stock G935FXXU1BPH6 source based on their readme file. My problem is, I don't have a zImage file after build that I could put into a flashable zip. I only have Image and Image.gz (I guess thats normal for arm64 kernels?) and I don't know how to make them flashable. I found a youtube video where the dude placed the Image file in a directory called "tools" in his flashable zip, I tried it and TWRP said I installed it successfully but when I start up my phone and check kernel version its still the previous one not mine.
Used this toolchain: aarch64-linux-android-4.9/bin/aarch64-linux-android-
I've set up CROSS_COMPILE path, then I set up configuration:
make ARCH=arm64 exynos8890-hero2lte_defconfig
make menuconfig (to tweak it a little bit more, like custom kernel version string so I can see if it worked)
Then I started build:
make ARCH=arm64
Output when build finished:
>>>>> Time used for generated all hashes is 6 sec
OBJCOPY arch/arm64/boot/Image
GZIP arch/arm64/boot/Image.gz
DTC arch/arm64/boot/dts/exynos8890-smdk8890.dtb
DTC arch/arm64/boot/dts/exynos8890-universal8890.dtb
Anyone knows how could I make it flashable? Thanks.
Click to expand...
Click to collapse
This particular chipset (64-bit Exynos) uses the uncompressed Image and a separate dtb.img file made from combining all the dtb revisions of your device codename and region into a DTBH format.
You can flash them using my LazyFlasher project.
See: https://github.com/jcadduono/lazyflasher
You will want to use the kernel-flasher branch. The kernel-flasher-samsung branch isn't fully ready and adds additional patch files to remove TIMA/Knox. I've yet to find out everything that needs to be changed from stock state to allow a bootable custom kernel without disabling encryption, unfortunately.
You can simply git clone it, then place your Image and optionally dtb.img in the root folder of the repository, then type "make" to build a TWRP flashable zip. They will be dynamically replaced in the current boot image on the device when the zip is flashed. You can check out the README.md for more info.
If you want to generate your own dtb.img to include in the installer, you can use a script I made from my universal8890 kernel sources on GitHub:
https://github.com/jcadduono/android_kernel_samsung_universal8890/blob/stock-6.0/dtbgen.sh
(correct the toolchain location for your build in the script)
It also requires the scripts/dtbTool folder (from the same git linked above) to be present in your repository. It's not the same as the Qualcomm dtbTool, and the sources are included (and fairly clean!) if you're interested in learning the Exynos dtb.img (DTBH) format.
./dtbgen.sh hero2lte xx
Now, there's still quite a bit that needs to be done to make the device actually boot successfully and be stable with a custom kernel. While the kernel is perfectly stable, the Samsung customized Android OS will absolutely freak out. That's a bit beyond me, and the reason I haven't really worked on any custom kernels for it myself.
Have fun!
jcadduono said:
This particular chipset (64-bit Exynos) uses the uncompressed Image and a separate dtb.img file made from combining all the dtb revisions of your device codename and region into a DTBH format.
You can flash them using my LazyFlasher project.
See: https://github.com/jcadduono/lazyflasher
You will want to use the kernel-flasher branch. The kernel-flasher-samsung branch isn't fully ready and adds additional patch files to remove TIMA/Knox. I've yet to find out everything that needs to be changed from stock state to allow a bootable custom kernel without disabling encryption, unfortunately.
You can simply git clone it, then place your Image and optionally dtb.img in the root folder of the repository, then type "make" to build a TWRP flashable zip. They will be dynamically replaced in the current boot image on the device when the zip is flashed. You can check out the README.md for more info.
If you want to generate your own dtb.img to include in the installer, you can use a script I made from my universal8890 kernel sources on GitHub:
https://github.com/jcadduono/android_kernel_samsung_universal8890/blob/stock-6.0/dtbgen.sh
(correct the toolchain location for your build in the script)
It also requires the scripts/dtbTool folder (from the same git linked above) to be present in your repository. It's not the same as the Qualcomm dtbTool, and the sources are included (and fairly clean!) if you're interested in learning the Exynos dtb.img (DTBH) format.
./dtbgen.sh hero2lte xx
Now, there's still quite a bit that needs to be done to make the device actually boot successfully and be stable with a custom kernel. While the kernel is perfectly stable, the Samsung customized Android OS will absolutely freak out. That's a bit beyond me, and the reason I haven't really worked on any custom kernels for it myself.
Have fun!
Click to expand...
Click to collapse
Thank you very much!
@jcadduono couldn't make the kernel boot after packing it with lazyflasher. I built a completely stock kernel from the mentioned source, pasted the "Image" (not the Image.gz) file in lazyflasher root and then used make command. Tried including "exynos8890-smdk8890.dtb" file as well. Same story. Not sure if I need anything else in the package or I made user mistake. Do you have any ideas how could I debug what makes it stuck on that screen?
Thanks!
EDIT: Solved Problem.
keezay said:
@jcadduono couldn't make the kernel boot after packing it with lazyflasher. I built a completely stock kernel from the mentioned source, pasted the "Image" (not the Image.gz) file in lazyflasher root and then used make command. Tried including "exynos8890-smdk8890.dtb" file as well. Same story. Not sure if I need anything else in the package or I made user mistake. Do you have any ideas how could I debug what makes it stuck on that screen?
Thanks!
EDIT: Solved Problem.
Click to expand...
Click to collapse
Can you help me set up an environment to build a kernel, arm64, for s7? I'm on Ubuntu having a heel of a time..
Galaxy S7 Edge Kernel Flashing Issues
I am currently trying to flash a different kernel into a galaxy s7 edge (SM-G935S).
I have gone as far as building a kernel and extracting a Image file from it, but every time I try flashing a boot.img with a replaced kernel image file, it seems to never work.
A mkbootimg tool that I am currently using requires a dtb file, but I cannot find where to get it from.
I have tried using @jcadduono's git code, but the dtb file created from it doesn't seem to work as well.
Can anyone tell me what I should do to flash a kernel successfully?
kernel panic after flashing
Hi @ll,
with this guide I was able to compile my own kernel and also flashing it to my phone. Unfortunatelly I'm getting kernel panic after rebooting the phone. is there any possibility to get the reason for this? Or do you have any hint, what I may have done wrong?
Thanks for your help.
Kind regards
v0ti
So there's threads about how to unpack UPDATE.APP on windows/PC/OS X so i decided why not do it on android too, this apps requires some additional tools to be downloaded just as OS X/Windows and linux needs as well. but process is otherwise similar. this tutorial doesn't need root!
NOTE THIS TUTORIAL isn't fully working on OREO on Huawei devices, it has some issues and i haven't found a workaround for it yet!
Needed apps
Termux https://play.google.com/store/apps/details?id=com.termux
Recommended apps
Hacker keyboard
Needed files
https://github.com/atarii/split_updata.pl/blob/master/splitupdate
@Atarii 's modification of splitupdate to manually enter the partitions you want to unpack
The desired FW you wan't to unpack
Unpack process:
Download Termux
Open termux and type
termux-setup-storage This will allow termux to access your /sdcard
pkg install perl (this will install perl which the update.app process is using) once asked press y and enter.
copy the downloaded files to root of your SDCARD *We keep this simple*
Once copied type: cd storage
perl splitupdate UPDATE.APP partitionyouwanttoextract if everything goes well you should be good to go and having the selected files in a folder called output where selected files should be stored.
The unpack tutorial is done. But wait! If you want to browse the files you need to do one more thing or two.
Download android image kitchen
https://play.google.com/store/apps/details?id=com.redlee90.imagekitchenforandroid
This will allow you to *unpack boot/recovery and convert system image (also vendor, product, cust and version)
*in order to unpack a boot or recovery file you'll need to remove all code using a hex edit file until you see ANDROID text. Else it won't unpack. You can unpack aosp images easily with this tool and modify what you want and repack to flash it on your device tested with twrp image for honor 8.
I would suggest to not unpack/repack boot using this tool since it'll cause problem.
There's a python script that works to unpack boot and recovery which can be found https://github.com/liudongmiao/bootimg/blob/master/bootimg.py
For this you'll need to install python.
pkg install python and hit y and enter
Now you just do as the splitupdate part where you extract the file.
Command to unpack
python bootimg.py --unpack-bootimg similar is for ramdisk but you replace bootimg with ramdisk.
To repack just simply python bootimg.py --repack-bootimg
Please note if you repack ramdisk the boot might not work (it's a while since I tested this) now this covers up how you unpack boot and extract update.app from phone.
Credits to @Atarii for telling how to unpack boot on phone and for his custom splipupdate script
Sent from my FRD-L09 using Tapatalk
Known Issues:
If you get Killed when trying to extract system.img this is most likely because the image size is too big, this isn't due to small space available i guess its due to all ram is being taken yet i can't tell.
i get permission issues. yeah this can happen sometimes try chmod +x or chmod 0777 with root, it might help.
when typing termux-setup-storage i get lots of errors and i'm on 8.0 EMUI
This is not your fault it's a bug caused by android i'd guess, or app isn't adopted completely for 8.0
HOW TO PORT ROMS IN WINDOWS
WARNING :- I AM NOT RESPONSIBLE FOR BRICKED DEVICES, DEAD SD CARDS OR ANY OTHER STUFFS HAPPEN WITH YOU.
WARNING:- THIS IS FOR SNAPDRAGON DEVICES ONLY.
YOU NEED A WORKING A PC AND SOME SOFTWARES LIKE:-
WINRAR (https://www.win-rar.com/download.html?&L=0)
NOTEPAD++ (https://notepad-plus-plus.org/)
ANDROID IMAGE KITCHEN (https://mega.nz/#F!P5AA3azC!AijFT4S-dAwbt88eKkTIMA)
EXTRACTOR 4.0 (https://mega.nz/#F!y0YhwT5D!SX6cQ7lPv7XGiH7GLDXLyw)
MELD (https://download.gnome.org/binaries/win32/meld/?_e_pi_=7,PAGE_ID10,4038285101)
SO HERE WE GO,
STEP 1
EXTRACT YOUR BASE ROM AND PORT ROM IN TWO DIFFERENT FOLDER.
STEP 2
MAKE TWO DIFFERENT FOLDER AND NAME THEM PORT BOOT IMAGE AND BASE BOOT IMAGE.
(NOT INSIDE THE ROM FOLDER)
STEP 3
COPY THE BASE BOOT IMAGE IN BASE BOOT IMAGE FOLDER
AND COPY THE PORT BOOT IMAGE IN PORT BOOT IMAGE FOLDER
STEP 4
USING ANDROID IMAGE KITCHEN
EXTRACT BOTH BOOT IMAGE (BASE AND PORT)
STEP 5
REPLACE [/SPLIT_IMG/boot.img-zImage](AFTER EXTRACTION )
REPLACE [/SPLIT_IMG/boot.img-dtb](AFTER EXTRACTION )
(FROM BASE BOOT IMAGE TO PORT BOOT IMAGE)
STEP 6
USING MELD,
COMPARE FILES [RAMDISK/INIT.RC]
COMPARE FILES [RAMDISK/FSTAB.QCOM]
(FROM BASE BOOT IMAGE TO PORT BOOT IMAGE)
STEP 7
USING ANDROID IMAGE KITCHEN
REPACK YOUR BOOT IMAGE.
FINALLY WE HAVE PORTED BOOT IMAGE !!!STEP 8
EDIT YOUR UPDATE SCRIPT PRESENT IN [PORT ROM/META-INF/COM/GOOGLE/ANDROID/UPDATE SCRIPT]
ERASE
getprop("ro.product.device") == "XXXXXXX" || abort("This package is for "XXXXXX"" devices; this is a "" + getprop("ro.product.device")
FROM THE UPDATE SCRIPT
STEP 9
EDIT YOUR BUILD.PROP USING NOTEPAD++
COMPARE LCD DENSITY IN BUILD.PROP [PORT ROM/SYSTEM][WITH BASE ROM/SYSTEM/BUILD.PROP]
CHANGE YOUR MODEL NO. IN THESE LINES [IN PORT ROM'S BUILD.PROP]
ro.product.model=
ro.product.brand=
ro.product.name=
ro.product.device=
STEP 10
REPACK YOUR PORT ROM USING WINRAR
DONE !!!
HOW TO PORT ROM IN LINUX
FIRST STEP :-- INSTALL PACKAGES
ZIP, UNZIP, PYTHON,ADB, FASTBOOT, MELD
FOR DEBIAN BASED LINUX
Code:
sudo apt update; sudo apt install zip adb meld fastboot python unzip zip
DOWNLOAD THESE AND EXTRACT IT IN SEPERATE FOLDER
SUPERR 'S KITCHEN (https://forum.xda-developers.com/ap...chen-superr-s-kitchen-v1-1-50-v2-1-6-t3597434)
AIK-LINUX (https://forum.xda-developers.com/showthread.php?t=2073775) EXTRACT THIS 2 TIME AND NAME IT PORT BOOT AND STOCK BOOT
IF YOU HAVE SYSTEM FOLDER THEN
MAKE TWO FOLDER NAME STOCK AND PORT
FOR MAKING FOLDER
Code:
mkdir stock port
(YOU CAN REPLACE THE NAME)
HERE WE GOT TWO FOLDERS, COPY YOUR STOCK ROM IN STOCK FOLDER AND PORT IN PORT FOLDER
THEN EXTRACT BOTH FILES BY UNZIP LIKE
Code:
[email protected]:~/path/to/your/rom/stock$ unzip *.zip
SAME FOR PORT ROM
Code:
[email protected]:~/path/to/your/rom/port$ unzip *.zip
NOW WE HAVE TO PORT THE BOOT IMAGE
GO TO WHERE YOU HAVE EXTRACTED AIK-LINUX , COPY THE STOCK BOOT IMAGE IN STOCK BOOT FOLDER AND PORT IN PORT BOOT FOLDER
NOW EXTRACT BOOT IMAGE
Code:
[email protected]:~/path/to/your/aik-linux/stock boot$ ./unpackimg.sh
AND SAME WITH PORT
Code:
[email protected]:~/path/to/your/aik-linux/port boot$ ./unpackimg.sh
NOW REPLACE, (FROM STOCK TO PORT
Code:
/SPLIT_IMG/BOOT.IMG-ZIMAGE
/SPLIT_IMG/BOOT.IMG-DTB
AFTER THAT USE MELD FOR COMPARING RAMDISK FILES, FOR MELD WRITE THIS IN TERMINAL
Code:
sudo meld
COMPARE,(FROM STOCK TO PORT
Code:
/ramdisk/fstab.qcom
/ramdisk/init.rc
/ramdisk/uneventd.rc
/ramdisk/uneventd.qcom.rc
NOW REPACK THE PORT BOOT IMAGE BY
Code:
[email protected]:~/path/to/your/aik-linux/port boot$ ./repackimg.sh
NOW WE HAVE SUCCESSFULLY PORTED THE BOOT IMAGE
PLACE IT IN YOUR PORT ROM
NOW THROUGH MELD, COMPARE YOUR BUILD.PROP FOR LCD DENSITY AND DEVICE NAME AND BRAND (FROM STOCK TO PORT
NOW OPEN YOUR UPDATER-SCRIPT PATH:- PORT ROM/META-INF/COM/GOOGLE/ANDROID
REMOVE THESE LINES IF IT HAVE
Code:
getprop("ro.product.device") == "XXXXXXX" || abort("This package is for "XXXXXX"" devices; this is a "" + getprop("ro.product.device")
AND REPLACE YOUR MOUNT SYSTEM,FORMAT SYSTEM AND BOOT.IMG FLASHING LINE FROM YOUR STOCK UPDATER-SCRIPT
REPACK YOUR ROM BY
Code:
[email protected]:~/path/to/your/port rom$ zip -r $ROMNAME meta-inf system boot.img
REPLACE $ROMNAME WITH YOUR ROM ZIP NAME AND IF YOU HAVE FOLDER TO COMPRESS JUST ADD THOSE AFTER META-INF WITH SPACE BETWEEN EACH FOLDER
DONE !!!
IF YOU HAVE SYSTEM.IMG OR SYSTEM.NEW.DAT.BR OR SYSTEM.NEW.DAT
USE SUPERR KITCHEN TO EXTRACT THOSE AND USE METHOD WRITTEN A BIT ABOVE
bro i am totally new in porting field....however i tried porting MIUI 9 for yu yunique.....but no succeed....can you plz tell is it possible to port miui 9 custom rom for yu yunique... i Take port rom for redmi 2 and base rom MIUI 8 by Xinid for yu yunique........however i tried all the tuitorial on xda but not even single was helped... i soft bricked my deice more than 15 times....Is it compatible for yu yunique?? i found both devices has almost same configuration and android version also same.... Whats wrong??/
@AYUSH KUMAR
Hi,
Can you make a video for that? I can't do it because I don't speak English. I'm thinking of uploading the Miui 10 to Asus Ze552kl.
Bye.
Chakari said:
@AYUSH KUMAR
Hi,
Can you make a video for that? I can't do it because I don't speak English. I'm thinking of uploading the Miui 10 to Asus Ze552kl.
Bye.
Click to expand...
Click to collapse
Sorry I dont have a youtube video
@KumarAyush after Porting twrp shows this message
help me to port rom
sarthak darshan said:
@KumarAyush after Porting twrp shows this message
help me to port rom
Click to expand...
Click to collapse
That's Mount line in updater-script change it according to stock
can i port lineageos 15.1 from xperia v with msm8960 1gb ram to samsung s3 d2 with 14.1 and same chipset but 2 gb ram?
hi help me to port oneplus 5 rom to zenfone 4 pro(ZS551KL) thank you
Hi, first i want to thank you because making this tutorial, however because i'm new to this porting world, i'm stuck on a problem, the problem is, after following your steps, zipped it and flashed it on my phone, it goes to recovery back again and again when i press the reboot button, and i don't know how to solve this. can you help me? here some details about my port ROM:
ROM i want to Port: RR 5.8.5 [7.1.2_r29] [N] [OFFICIAL][LENOVO A6000]
ROM i use as Base: AOSP_RRO_Rev3 [6.0.1] [M] [UNOFFICIAL][C46B2G] (an Indonesian Phone, i think you don't know about it)
plis reply bro i'm stuck
hi,
I'm trying to port an Android 10 rom to an original that is Android 7 based. I don't see a vendor partition on this Nubia N3 original scripts (just a bunch of others).
Any idea how to fix that?
Do I need to repartition?
It's not treble ready. I am trying to port Redmi Note Pro 6 Android 10 pixel experience to an NX608J.
Any tips are greatly appreciated.
It working well i ported from Galaxy On7 to J5 2015 on miui 9 rom But touch screen not working : ( i flashed again and my phone is really dead : ( after flashed the rom!
Hey guys please suggest me similar devices to lenovo tab 10 tbx-103f. 1gb ram and 16 GB storage. Please. Anyone.
kumarayush2104 said:
HOW TO PORT ROMS IN WINDOWS
WARNING :- I AM NOT RESPONSIBLE FOR BRICKED DEVICES, DEAD SD CARDS OR ANY OTHER STUFFS HAPPEN WITH YOU.
WARNING:- THIS IS FOR SNAPDRAGON DEVICES ONLY.
YOU NEED A WORKING A PC AND SOME SOFTWARES LIKE:-
WINRAR (https://www.win-rar.com/download.html?&L=0)
NOTEPAD++ (https://notepad-plus-plus.org/)
ANDROID IMAGE KITCHEN (https://mega.nz/#F!P5AA3azC!AijFT4S-dAwbt88eKkTIMA)
EXTRACTOR 4.0 (https://mega.nz/#F!y0YhwT5D!SX6cQ7lPv7XGiH7GLDXLyw)
MELD (https://download.gnome.org/binaries/win32/meld/?_e_pi_=7,PAGE_ID10,4038285101)
SO HERE WE GO,
STEP 1
EXTRACT YOUR BASE ROM AND PORT ROM IN TWO DIFFERENT FOLDER.
STEP 2
MAKE TWO DIFFERENT FOLDER AND NAME THEM PORT BOOT IMAGE AND BASE BOOT IMAGE.
(NOT INSIDE THE ROM FOLDER)
STEP 3
COPY THE BASE BOOT IMAGE IN BASE BOOT IMAGE FOLDER
AND COPY THE PORT BOOT IMAGE IN PORT BOOT IMAGE FOLDER
STEP 4
USING ANDROID IMAGE KITCHEN
EXTRACT BOTH BOOT IMAGE (BASE AND PORT)
STEP 5
REPLACE [/SPLIT_IMG/boot.img-zImage](AFTER EXTRACTION )
REPLACE [/SPLIT_IMG/boot.img-dtb](AFTER EXTRACTION )
(FROM BASE BOOT IMAGE TO PORT BOOT IMAGE)
STEP 6
USING MELD,
COMPARE FILES [RAMDISK/INIT.RC]
COMPARE FILES [RAMDISK/FSTAB.QCOM]
(FROM BASE BOOT IMAGE TO PORT BOOT IMAGE)
STEP 7
USING ANDROID IMAGE KITCHEN
REPACK YOUR BOOT IMAGE.
FINALLY WE HAVE PORTED BOOT IMAGE !!!
STEP 8
EDIT YOUR UPDATE SCRIPT PRESENT IN [PORT ROM/META-INF/COM/GOOGLE/ANDROID/UPDATE SCRIPT]
ERASE
getprop("ro.product.device") == "XXXXXXX" || abort("This package is for "XXXXXX"" devices; this is a "" + getprop("ro.product.device")
FROM THE UPDATE SCRIPT
STEP 9
EDIT YOUR BUILD.PROP USING NOTEPAD++
COMPARE LCD DENSITY IN BUILD.PROP [PORT ROM/SYSTEM][WITH BASE ROM/SYSTEM/BUILD.PROP]
CHANGE YOUR MODEL NO. IN THESE LINES [IN PORT ROM'S BUILD.PROP]
ro.product.model=
ro.product.brand=
ro.product.name=
ro.product.device=
STEP 10
REPACK YOUR PORT ROM USING WINRAR
DONE !!!
HOW TO PORT ROM IN LINUX
FIRST STEP :-- INSTALL PACKAGES
ZIP, UNZIP, PYTHON,ADB, FASTBOOT, MELD
FOR DEBIAN BASED LINUX
Code:
sudo apt update; sudo apt install zip adb meld fastboot python unzip zip
DOWNLOAD THESE AND EXTRACT IT IN SEPERATE FOLDER
SUPERR 'S KITCHEN (https://forum.xda-developers.com/ap...chen-superr-s-kitchen-v1-1-50-v2-1-6-t3597434)
AIK-LINUX (https://forum.xda-developers.com/showthread.php?t=2073775) EXTRACT THIS 2 TIME AND NAME IT PORT BOOT AND STOCK BOOT
IF YOU HAVE SYSTEM FOLDER THEN
MAKE TWO FOLDER NAME STOCK AND PORT
FOR MAKING FOLDER
Code:
mkdir stock port
(YOU CAN REPLACE THE NAME)
HERE WE GOT TWO FOLDERS, COPY YOUR STOCK ROM IN STOCK FOLDER AND PORT IN PORT FOLDER
THEN EXTRACT BOTH FILES BY UNZIP LIKE
Code:
[email protected]:~/path/to/your/rom/stock$ unzip *.zip
SAME FOR PORT ROM
Code:
[email protected]:~/path/to/your/rom/port$ unzip *.zip
NOW WE HAVE TO PORT THE BOOT IMAGE
GO TO WHERE YOU HAVE EXTRACTED AIK-LINUX , COPY THE STOCK BOOT IMAGE IN STOCK BOOT FOLDER AND PORT IN PORT BOOT FOLDER
NOW EXTRACT BOOT IMAGE
Code:
[email protected]:~/path/to/your/aik-linux/stock boot$ ./unpackimg.sh
AND SAME WITH PORT
Code:
[email protected]:~/path/to/your/aik-linux/port boot$ ./unpackimg.sh
NOW REPLACE, (FROM STOCK TO PORT
Code:
/SPLIT_IMG/BOOT.IMG-ZIMAGE
/SPLIT_IMG/BOOT.IMG-DTB
AFTER THAT USE MELD FOR COMPARING RAMDISK FILES, FOR MELD WRITE THIS IN TERMINAL
Code:
sudo meld
COMPARE,(FROM STOCK TO PORT
Code:
/ramdisk/fstab.qcom
/ramdisk/init.rc
/ramdisk/uneventd.rc
/ramdisk/uneventd.qcom.rc
NOW REPACK THE PORT BOOT IMAGE BY
Code:
[email protected]:~/path/to/your/aik-linux/port boot$ ./repackimg.sh
NOW WE HAVE SUCCESSFULLY PORTED THE BOOT IMAGE
PLACE IT IN YOUR PORT ROM
NOW THROUGH MELD, COMPARE YOUR BUILD.PROP FOR LCD DENSITY AND DEVICE NAME AND BRAND (FROM STOCK TO PORT
NOW OPEN YOUR UPDATER-SCRIPT PATH:- PORT ROM/META-INF/COM/GOOGLE/ANDROID
REMOVE THESE LINES IF IT HAVE
Code:
getprop("ro.product.device") == "XXXXXXX" || abort("This package is for "XXXXXX"" devices; this is a "" + getprop("ro.product.device")
AND REPLACE YOUR MOUNT SYSTEM,FORMAT SYSTEM AND BOOT.IMG FLASHING LINE FROM YOUR STOCK UPDATER-SCRIPT
REPACK YOUR ROM BY
Code:
[email protected]:~/path/to/your/port rom$ zip -r $ROMNAME meta-inf system boot.img
REPLACE $ROMNAME WITH YOUR ROM ZIP NAME AND IF YOU HAVE FOLDER TO COMPRESS JUST ADD THOSE AFTER META-INF WITH SPACE BETWEEN EACH FOLDER
DONE !!!
IF YOU HAVE SYSTEM.IMG OR SYSTEM.NEW.DAT.BR OR SYSTEM.NEW.DAT
USE SUPERR KITCHEN TO EXTRACT THOSE AND USE METHOD WRITTEN A BIT ABOVE
Click to expand...
Click to collapse
I am stuck at this here:
"
REPLACE [/SPLIT_IMG/boot.img-zImage](AFTER EXTRACTION )
REPLACE [/SPLIT_IMG/boot.img-dtb](AFTER EXTRACTION )"
those two files aren't there when i try to extract the boot image for the galaxy s5