Skip to main content

PORTING ROM FOR ALL DEVICE

>>>>Follow STEP I if you have port rom flashable via cwm.To check that your rom is flashable vai cwm see above post for structure.Those who having SP Tools flashable port rom follow StepII directly.<<<<



First we will port and check that rom boots or not by simple way,then if it boots then we will modify it and tweak it by using kithcen.Or you can skip this step I and directly follow step II but you have to do almost all things from step I in Step II except modifying updater script.If you do these things in step I then no need to do in Step II.

STEP I

  

  • Make a folder and name it as you want and copy and paste your port rom zip in it,means make a clone file of it and we will be working with clone zip,always keep in mind.I said to copy paste as if your rom did not boot up then you have a backup of clean port rom.
  • Now create a folder under original update of kitchen- " WORKING_XXXX " 
  • Then open zip using 7zip(make 7zip is as default app) and drag drop boot.img to " WORKING_XXXX " folder.Now Open kitchen and Press 1 to setup working Folder.And go with default in all steps forward.(keep 7zip opened,you will need to drag back boot.img in it)
  • After working folder setuped.Now press 0 for advance option and hit enter.Now press 12 and hit enter.Now you press "w" to extract boot.img from working folder.
  • After sucessful extraction you will find a folder under kitchen named BOOT EXTRACTED.
  • Now you have to copy zImage from stock boot extracted folder(which was created by you in second post last step) to this BOOT EXTRACTED folder and replace it.
  • Then switch to kitchen and press "b" to build boot.img from BOOT EXTRACTED folder then after repacking boot.img finish,you have to drag and drop only boot.img(kitchen/working folder)(not meta-inf) to port rom zip.

  • Now Open System Folder In port Zip and drag drop build.prop file out of it to anywhere you wish.
  • Now edit it with Notepad++.
  • Add this line if you are porting from a higher resolution device- ro.sf.lcd.density=220 .Change its value after rom boots as to your display resolution.If after rom boots up and everything looking large then reduce the value and if looking small then increase it.
  • You can Edit These Values as desired:-

    Code:
    ro.build.id=
    ro.build.display.id=
    ro.custom.build.version=
    ro.build.version.release=This is Andriod version That Displays in Settings
    ro.product.model=
    ro.product.brand=
    ro.product.name=
    ro.product.device=
    ro.product.manufacturer=
    ro.build.bluetooth.name=
  • EDIT BELOW LINES TO SET YOUR TIMEZONE AND AREA REGION.You can find your default details in your stock rom's build.prop which you extracted earlier.
    Code:
    ro.product.locale.language=(en for English,ru for Russian and other similar codes for other language)
    ro.product.locale.region=(us for usa, IN for india etc.)
    persist.sys.timezone=( Asia/kolkata for india,Asia/... different for different regions)
  • Now after editing done drag build.prop to port zip. 

  • Now keep opened port zip one side and open stock rom system folder which we extracted in post 2.
  • Open System/etc/firmware in both zip and stock folder.Now drag modem.img from stock folder to zip and drop it.
  • Now head to lib folder in both.Here you have to drag and drop libcamercustom.so file to port zip.
  • Go to system/lib/modules now,here drag and drop mtk_stp_wmt.ko file to port zip.If rom did not boots forward then you should drag and drop whole modules folder under system/lib of port zip.
  • Go to usr/keylayout in both and drag drop Generic.kl file from stock to port zip.
  • Lastly drag and drop a launcher like nova,apex or any to system/app/ of port zip in case port launcher did not worked.
  • IF you rom did not booted by applying all above steps then replace these folder/files from stock to port:-
    1)system/etc/firmware
    2)system/lib/hw
    3)system/lib/modules
    4)system/vendor

  • If your cwm port rom zip have these files then delete those.
    ---uboot.bin
    ---preloader
    ---logo.bin(you can keep it but you need your stock logo.bin which is available in sptool flahable roms.I will also tell you how to create own logo.bin and bootanimation in below post.)
  • Your zip should look like this-
    --Meta-inf
    --system
    --boot.img
    --data (in some roms)


  • After deleting the extra files you need to modify the updater script which can be found under,Meta-inf/com/google/android/updater-script...we are modifying by own only this time as we have to check only.During building rom from kitchen,it will be automatically created
    as we registered our device.If we do not register our device in kitchen then during making roms from kithcen our current updater script will converted to update script which will be again converted to updater script and that will cause installation aborted error.
  • Now drag and drop updater script from zip to anywhere and open it with notepad++,now find lines below-
    Code:
    format("ext4", "EMMC", "/dev/block/mmcblk0p7", "0");
    format("ext4", "EMMC", "/dev/block/mmcblk0p5", "0");
    mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/data");
    mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");
  • Here you have to deal with text in red.Your updater script may be different so use your brain and understand what i am saying forward.Text in red is mount point.In above mmcblk0p7 is mount point of data folder and mmcblk0p5 is mount point of system folder.So you need to replace mount points of updater script with your device mount points.You must found mount points of your device during registering device to kitchen.So open recovery.fstab or that kitchen/tool/edify_defs/your file with notepad++ and copy replace mount points from your device file to updater-script of port zip.If you find those lines any more places in updater script then also replace there.Here you only need some mind to use.For example if you edited and replaced red text then you must also replace orange text as they are also same.
  • Remove the lines of the files which you removed in zip if there,like uboot.bin,logo.bin,preloader etc...they will look like below codes,you only need to find the line matching to the file you removed and deleat that.

    Code:
    package_extract_file("uboot.bin", "/dev/uboot");
                    or
    assert(package_extract_file("uboot.img", "/tmp/uboot.img"),
           write_raw_image("/tmp/uboot.img", "uboot"),
           delete("/tmp/uboot.img"));
                   or
    assert(package_extract_file("preloader.img", "/tmp/preloader.img"),
           write_raw_image("/tmp/preloader.img", "preloader"),
           delete("/tmp/preloader.img"));
  • And replace this line
    Code:
    assert(package_extract_file("boot.img", "/tmp/boot.img"),
           write_raw_image("/tmp/boot.img", "bootimg"),
           delete("/tmp/boot.img"));

    From this if any error occurs during installtion like boot.img assert failed.

    Code:
    package_extract_file("boot.img", "/dev/boot");
  • Drag back the updater-script to zip from where it was taken from.

What we have done above is that we drag and drop some stock files from stock rom to port zip without extrating it.


Now you are good to flash your ported rom.Make CWM backup if you want to go back to previous rom or rom did not booted.After that wipe data factory reset,wipe cache partition,wipe dalvic cahce under advance option and then format system under mount and storage OF CWM RECOVEY then install zip from sd card and install your zip.I said SD card in first post if your rom did not booted and you understood your mistake and modified your port rom zip then you can do that directly by transferring zip to sd and flash instead of installing or restoring another rom.But for the users with not sd card must save their CWM backup or a working cwm flahable Rom zip otherwise they will have to reflash the rom by SP tools if rom didnot booted. 


STEP II

  

NOTES BEFORE BEGINNING STEP II :-
  • If you ported your ROM using STEP I and booted then for modifying use this STEP II.
  • If you tried porting rom using STEP I but it is showing installation aboted then follow this STEP II directly.
  • IF you have SP Flash tools format port rom and you extracted system folder and boot.img from your stock rom using my method then Follow STEP II directly.
  • STEP II contains some steps from STEP I,so if you already did those steps in STEP I and using same zip here then you can skip steps here.If you get confused then again do all steps.



STEP(A)- ADDING A WORKING FOLDER IN KITCHEN
FOR CWM ROM:-
  

FOR SP TOOLS ROM:-
  


STEP(B)-Porting Rom 
PATCHING BOOT.IMG:-
  • After successful creation of working folder you will find a new folder created named like-"WORKING_041214_135729".
  • Open kitchen then Press 0 for advance option and hit enter.Now press 12 and hit enter.Now you press "w" to extract boot.img from working folder.
  • After sucessful extraction you will find a folder under kitchen named BOOT EXTRACTED.
  • Now you have to copy zImage from stock boot extracted folder(which was created by you in second post last step) to this BOOT EXTRACTED folder and replace it.
  • Now switch to kitchen and press "b" to build boot.img from BOOT EXTRACTED folder then after repacking boot.img finish press x to exit and back to main menu.

Editing Build Prop:-
  • you will find build.prop under kitchen/your_working_folder/system/
  • Edit build.prop with notepad++
  • You can Edit These Values as desired:-
    Code:
    ro.build.id=
    ro.build.display.id=
    ro.custom.build.version=
    ro.build.version.release=This is Andriod version That Displays in Settings
    ro.product.model=
    ro.product.brand=
    ro.product.name=
    ro.product.device=NAME OF FILE WHICH YOU USED TO REGISTER YOUR DEVICE TO KITCHEN
    ro.product.manufacturer=
    ro.build.bluetooth.name=
  • EDIT BELOW LINES TO SET YOUR TIMEZONE AND AREA REGION.You can find your default details in your stock rom's build.prop which you extracted earlier.
    Code:
    ro.product.locale.language=(en for English,ru for Russian and other similar codes for other language)
    ro.product.locale.region=(us for usa, IN for india etc.)
    persist.sys.timezone=( Asia/kolkata for india,Asia/... different for different regions)
  • Add this line if you are porting from higher resolution deice or lower resolution device.If from higher to lower then put lower values and if lower to higher then put higher values.
    Code:
    ro.sf.lcd_density=xxx
  • Now after editing done save it and exit.


Patching Rom With Some STOCK Rom Files:-
  • Copy modem.img from stock Rom- System/etc/firmware to kitchen/working_folder/system/etc/firmwareand replace it.
  • Copy libcamercustom.so file from stock Rom- System/lib to kitchen/working_folder/system/lib and replace it.
  • Copy mtk_stp_wmt.ko file from stock Rom- System/lib/modules tokitchen/working_folder/system/lib/modules and replace it.If ROM not booted then replace whole modules.
  • Copy Generic.kl file from stock Rom- System/usr/keylayout tokitchen/working_folder/system/usr/keylayout and replace it.
  • Download any launcher apk from net link nova,apex etc and paste intokitchen/working_folder/system/app/
  • If after Building rom from next step,your rom did not booted then replace these files from stock to port then build rom.
    1)system/etc/firmware
    2)system/lib/hw
    3)system/lib/modules
    4)system/vendor

Building Rom
  • After all above steps done,now switch to kitchen and press 99 to build ROM.
  • But before pressing 99 check that you put name of file by which you registered your device to kitchen in build.prop/ro.product.device="".If you registered with name x then put like this-ro.product.device="x"
  • If you have not done above step then you will get installation aborted error during installation.If you are confused to register device send me required fies as asked by me in above post.
  • After all checked now press 99
  • Select Build Option 1 then hit Enter
  • Now it will ask to zip-lang the apk,do as your wish.
  • After that step it will convert Updater Script and ask two option,Proceed or cancel,then Proceed by pressing "y".
  • It will then start making update.zip.Wait some time.
  • Next it will ask to sign the zip or not?You should go with default by signing update zip by hitting Enter or Pressing "y" then pressing enter.It will take some time.
  • After that if you want to change your ROM name then put desired name by pressing y or leave as it is by hitting Enter or 'N' then enter.
  • Collect you rom.zip from Output_zip folder created under kitchen directory.
  • Flash it and check it.
  • If you find some bugs then see post below to solve bugs or if you are not able to find bug solution below then post it.I will tell you how to solve it if i know.

I have ported 10+ Roms using this method,this should work for you too.Hopes that your ROM will boot.Good Luck.

Comments

Popular posts from this blog

How To Check DoulCi Server Status

Many people already unlocked their iPhone with iCloud  bypassed activation method using  DoulCi service , but a lot of people who are still not able to bypass their iPhone  iCloud Activation  just because of doulCi server status; as the doulCi server is offline now and then so we find something here to  check DoulCi server status  whether the server is online or offline just read this post for more details. Advertisements iCloud lock is very big shield against thieves, but generally the iPhone user forgot their device password or buy such an iPhone which is locked one, so there is no official mean to bypass the this iCloud Activation except few are available in the market such  Chronicunlocks  which is not a free service, as one have to pay about $149 for unlock service, but on the other hand the doulCi is a free service to bypass iCloud Activation lock. See Also: Apple iCloud Activation Lock Bypassed To Unlock Stolen iPhones iCloud Removal Tool Released By ChronicUnlo
dolby digital plus for lava iris x1 * download here   dolby digital plus.zip *flash it from cwm recovery !!! iam not resoponsible for your mobile. take your own risk,

Operating System notes Unit test for BE CSE 4th SEM (CS 6401)

                       KCG COLLEGE OF TECHNOLOGY (CSE 4C) PLEASE DOWNLOAD OPERATING SYSTEM NOTE FOR BE CSE 4TH SEM.  THIS NOTES ONLY FOR CSE-C not for other. we will get more marks from other section. UNIT -1  UNIT-2 PPT's 1. Operating systems      - Unit 1 -  View  /  Download      - Unit 2 -  View  /  Download     - Notes -  View  /  Download all are PDF files. plz use Adobe Reader to view Document.