How To Port boot.img And Port Kernel- Unpack/Repack
Things You Need:
Cygwin and Android Kitchen Properly set up : Guide here
Notepad++ : Download Here
WORKING FOLDER (Guide to create working folder at the end of this post)
Stock_ROM boot.img
Port_ROM boot.img(needed if you want to port kernel)
Kernel can be ported from any MT65XX to any MT65XX
To Unpack boot.img
1. Right Click on Cygwin and run as an administrator
2. Type cd kitchen
3. Type ./menu
4. Once Android Kitchen opens type "0" without ""
5. Now type 12
6. Now type "w" without "" (note : you first need to set up a working folder, steps to create working folder at the end of post)
7. It will extract the stock boot.img in the folder where you setup Cygwin and Android Kitchen
8. Now type "a" without ""
9. A folder with the name bootimg_xxxxx_xxxx will be create copy and paste the Port boot.img in the folder
10. Press enter after placing the Port boot.img in the new bootimg_xxx_xxx folder
11. Now after the Port boot.img ha been unpacked open the kitchen folder
12. Now open BOOT-EXTRACTED and bootimg_xxxx_xxxx in two different windows
13. Open boot.img-ramdisk in both the Port and Stock folders and copy everything that is inside Port boot.img-ramdisk folder except for init.rc
14. Now delete all the folders in Stock boot.img-ramdisk
15. Now paste and replace all the files from Port boot.img-ramdisk folder in Stock boot.img-ramdisk folder
16. Now right click on the Stock and Port init.rc and select edit with notepad++
17. Now go to the export BOOTCLASSPATH line of Port init.rc and copy the entire line and replace it with the Stock export BOOTCLASSPATH (make sure they are in the correct category see image to understand)
18. Now save the Stock init.rc file and close notepad++
19. Now open cygwin and type "b" to repack the ported boot.img
20. After the boot.img is successfully repacked you can find the ported boot.img in the Working_xxxx folder
DONE!!!
Now to create Working Folder
1. In Cygwin type 1 and put your stock rom.zip file in original_update if you do not have it you can use the boot.img and settings.img
2. You can get system.img and boot.img from this guide BackUp Using MTK Droid TOOLS follow step 1 to 8 on the guide
4. Now Follow the steps on Android Kitchen to create working folder
IF YOU HAVE ANY PROBLEMS PLEASE FEEL FREE TO ASK ME
I tried these but I stuck on android updating screen, I ported ROM and boot also , what to do now for porting boot successfully???
ReplyDeleteIf it get past the boot screen and shows android is upgrading screen this means boot.img is correct and working fine. In case of wrong boot.img it wont get past the splash screen or boot screen.
DeleteSo in your case it might be a storage problem. Try to fix storage.
But how to fix it??
DeleteMy phone have mt6735m chipset and the ROM which I porting have mt6735p,, how to fix android is upgrading stuck problem??
DeleteOpen both stock and port framework-res.apk with 7zip or any other.
Deletego to res/xm/storage_list.xml and replace the file from stock storage_list.xml
Also replace :-
system/bin/vold
system/bin/sdcard
In Boot.img make sure your system paths are correct. check the files like
boot.img/ramdisk/fstab*** or init.rc and if it contains system path edit them.
Hey I still stuck in the same screen 😞😞
DeleteHere's the link of my port and stock boot.IMG if you can help me...
Okk i'll look at it asap.
DeleteHey can you do something with the boot.img
DeleteHave you edited system mount points in Port boot img's /ramdisk/fstab.goldfish
Deleteedit them according to your stock.
Still at the same problem.. My stock boot havnt any goldfish related files. But the port boot have so I edited the mount points but still stuck
DeleteCan you take a logcat.
DeleteWhen I tried to port cm12.1 ROM of lenovo vibe p1m rom , it stuck in android is upgrading screen but when I port RR ROM of lenovo vibe p1m ROM it successfully boot up without any bug so I think its a error of the cm ROM . now I want to know can I port android marshmallow ROM or cm 13 ROM to my phone Using lollipop as base rom??
DeleteYah that could be a problem of port rom.
DeleteYes you can use ported cm12 rom as a base to port cm13.
I think this is the bootclasspath on mine? Can you confirm?
ReplyDeleteI'm experiencing bootloop.
on early-init
# Set init and its forked children's oom_adj.
write /proc/1/oom_score_adj -1000
# Disable sysrq from keyboard
write /proc/sys/kernel/sysrq 0
# Set the security context of /adb_keys if present.
restorecon /adb_keys
# Shouldn't be necessary, but sdcard won't start without it. http://b/22568628.
mkdir /mnt 0775 root system
# Set the security context of /postinstall if present.
restorecon /postinstall
start ueventd
In this way can i port upgrade version kernel ,For Example MM to Nougat,3,18,19 to Up
ReplyDelete