Hovatek Forum DEVELOPMENT Android [Development] How to create a flashable zip for Mediatek or Unisoc / Spreadtrum
Can't login? Please, reset your password.
Hovatek is recruiting! Apply Now


[Development] How to create a flashable zip for Mediatek or Unisoc / Spreadtrum

[Development] How to create a flashable zip for Mediatek or Unisoc / Spreadtrum

hovatek
hovatek
hovatek
Administrator
49,570
25-09-2017, 05:36 PM
#1



This guide is for those who wish to create a custom recovery-flashable zip from boot.img and system.img. This guide will come in handy when:
  • You wish to port/build a custom ROM and release it in flashable zip format (not scatter format)
  • You have USB port problems and can therefore only rely on SD card and custom recovery mode for flashing

Obtaining boot.img and system.img


Before you proceed, you first need to obtain the boot.img and system.img. You have two options here:

  1. Extract both from the phone
  2. Extract both from the stock ROM / firmware

Mediatek (MTK)


If you wish to extract both files from the phone then consider Miracle Box (ensure to rename from .bin to .img) or Wwr_MTK . If you can find the stock ROM / firmware for your model @ https://www.hovatek.com/forum/forum-89.html then simply download the zip, rar or 7z file and extract using 7zip or Winrar.

Spreadtrum (SPD)


If the phone is rooted then consider the adb dd method or use a Chinese box like Chinese Miracle II SPD or NCK Pro Box. If you can find the stock ROM / firmware / PAC file @ https://www.hovatek.com/forum/forum-89.html then extract the contents of the PAC file

Requirements for creating flashable zip


Steps to create a flashable zip from boot.img and system.img


See the video tutorial below or @ https://youtu.be/x-cyFvljO_g

Step 1: Unpacking boot.img and system.img


  1. Unzip Assayyed Kitchen

    [Image: How-to-create-a-flashable-zip-for-a-Medi....img-1.jpg]

  2. Copy the boot.img and system.img into the PLACE folder

    [Image: How-to-create-a-flashable-zip-for-a-Medi....img-2.jpg]

  3. Run ASSAYYED.exe

    [Image: How-to-create-a-flashable-zip-for-a-Medi....img-3.jpg]

  4. Wait till the Dashboard opens

    [Image: How-to-create-a-flashable-zip-for-a-Medi....img-4.jpg]

  5. Type 1 (which is for START CREATING PROJECT) then tap Enter

    [Image: How-to-create-a-flashable-zip-for-a-Medi....img-5.jpg]

  6. Tap Enter (which is for DEFAULT)

    [Image: How-to-create-a-flashable-zip-for-a-Medi....img-6.jpg]

  7. Type 1 (which is for STOCK IMG ROM [system.img.ext4] ) then press Enter

    [Image: How-to-create-a-flashable-zip-for-a-Medi....img-7.jpg]

  8. Type any name for your Project (It's named Hovatek in this example) then tap Enter

    [Image: How-to-create-a-flashable-zip-for-a-Medi....img-8.jpg]

  9. Wait while the tool renames and copies the files to the WORK folder

    [Image: How-to-create-a-flashable-zip-for-a-Medi....img-9.jpg]

  10. The tool should now begin extracting the contents of system.img

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-10.jpg]

  11. Select the installer you wish to use, and type 2 (which is STANDALONE) if you're not sure which to select then tap Enter

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-11.jpg]

  12. Type a name for the ROM (it's named Hovatek in this example) then tap Enter

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-12.jpg]

  13. Wait while the tool generates the updater-script and finishes up

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-13.jpg]

  14. You should see COMPLETED. PRESS ENTER TO CONTINUE, tap Enter to finish

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-14.jpg]

  15. You should now see the Project details in the kitchen

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-15.jpg]

  16. In the WORK folder, you should find a META-INF folder, a system folder and boot.img

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-16.jpg]

Step 2: Tweaking / Optimizing the ROM


Make whatever changes you want to the ROM but note that making the wrong changes could cause the ROM to brick your phone once flashed

Step 3: Repacking the flashable zip

  • Type 7 (which is BUILD ROM FOR FLASHING) and tap Enter

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-17.jpg]

  • Select the Build method you want. Each has its advantage but I often opt for 3 (which is RAW) because that builds back each file in .img format; this way, I can flash using custom recovery, fastboot or SP Flash tool + scatter file if Mediatek

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-18.jpg]

  • The tool now needs to get the mount point for /system. You may choose DEFAULT (which is FROM_KERNEL) in which case the tool will attempt to enumerate the mount point for /system from the boot.img,  1 (which is FROM_DEVICE) in which case the tool will attempt to enumerate the mount point from the connected device or 2 (which is MANUALLY) in which case you supply the mount point. I recommend DEFAULT (just tap Enter) but if you get mount errors when flashing the zip in custom recovery then repeat this process and go for option 2. Ensure to get the device's /system mount for Manual method

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-19.jpg]

  • Type a name for the ROM (it is named Hovatek ROM in this example)

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-20.jpg]

  • Wait while the tool prepares the updater-script and symlinks

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-21.jpg]

  • When prompted whether or not to expand system, don't type anything, just tap Enter (which is DEFAULT=No)

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-29.jpg]

  • When prompted to Zipalign, you may opt for Yes or No. If you don't know what Zipalign is then type 0 (which is NO) and tap Enter

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-30.jpg]

  • Wait while the tool begins packing the ROM

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-22.jpg]

  • Type what you wish to name the final flashable zip as (its named Hovatek ROM in this example)

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-23.jpg]

  • Choose the  compression level for the zip. I often stick with default which is 5 then press Enter

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-24.jpg]

  • Wait while the flashable zip (Hovatek ROM.zip) is being prepared and packed

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-25.jpg]

  • You'll be prompted to sign the zip, I usually choose No (DEFAULT) by typing nothing and tapping Enter. You could go ahead to sign the zip if you wish.

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-27.jpg]

  • Once done, you should see COMPLETED. PRESS ENTER TO CONTINUE , tap Enter

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-28.jpg]

  • You should find the flashable zip (Hovatek ROM.zip in this case) in the READY folder. Copy it to your phone storage or SD card and flash in custom recovery

    [Image: How-to-create-a-flashable-zip-for-a-Medi...img-26.jpg]

Important Notice
  • The created flashable zip can only be flashed in a custom recovery. Attempting to flash it in a stock recovery will give a signature error
  • Its important you only flash a zip created from images for your device or from its firmware. Flashing a zip meant for another device could brick your phone
  • Ensure to make a custom recovery backup before flashing a customized rom
  • Its recommended you first create an unmodified flashable zip (no modification using the tool) before creating modified versions

Video Transcript
Quote:In this video tutorial, I'll be showing you how to create a flashable zip using Assayyed kitchen from boot.img and system.img. You might find a flashable zip helpful when you need to port a custom rom or need to flash your phone. but either don't have a PC or your phone's USB port is bad. In this case, you need to flash from recovery mode. Its very important you know that you cannot flash this kind of zip from stock recovery okay? so you need to have a custom recovery (e.g TWRP, Philz, CWM etc) installed before you can flash a zip like this.

Download Assayyed kitchen, check out website for the download link. You'll need the boot.img and system.img pasted in the PLACE folder. Launch Assayyed kitchen [resizing]. Select 1 (Start Creating Project) & tap Enter Its asking me where I want to get the ROM from. I'll just tap Enter since the default is PLACE folder. I have Stock IMG ROM which is by boot and system image. I type 1 and tap Enter. Its asking me to name the ROM I'll name it Hovatek then tap Enter. It'll copy, rename then extract. Some people start with system.new.dat

For that kind of situation, you use MTK extractor to convert from dat to img format then return to Assayyed Its very important you have enough space on your PC because you might run into the "Clean up working folder" error and you'll find out that system wasn't extracted. In that kind  of situation, you either don't have enough space or you're trying to extract a signed image [rephrase]. We have a guide on how to unsign an image at our Forum After you unsign, you can the bring the image back to Assayyed. This process takes a while so be patient.

[extracting files from system.img]. Done extracting. What installer do you want? I go with Standalone (2) ROM name, I maintain Hovatek ROM. Wait while it generates the needed files (updater, meta-inf etc). Completed, press Enter to continue. I have my project details displayed; meta-inf, system unpacked You can begin to make any modification you want. I won't be making any. Once done, its time to repack

I'll select Build ROM for flashing (7) then tap Enter. Its asking how you want to pack, I usually go for RAW because it creates boot and system.img so you can decide to flash via fastboot or any flash tool you wish to use Now, its asking me for the /system mount point. I could select kernel (boot.img), device (I connect) or manual I advise you go for the default (kernel). If you encounter /system mount errors then get the mount point then go for manual. We have a guide on how to find the mount point of Mediatek or Spreadtrum at our Forum.

Type the name of your ROM, tap Enter. [Creating Symlinks]. Its asking If I want to expand my system.img I advise you go with No but If you know what you're doing, select Yes. Asking If I want to zipalign, I select No. [Creating system.img], [Converting Sparse Image to RAW EXT4]. Asking me to type the name of the zip file I maintain Hovatek ROM then tap enter. Compressin level (for the flashable zip), I seleect default (5) [packing in progress]. Asking If I want to sign the zip, I select No (tap Enter).

Done! To check the flashable zip open the ready folder. In my case, I have boot and system image. That's how to create a flashable zip (Mediatek & Spreadtrum) from the boot and system image using Assayyed kitchen.
This post was last modified: 11-02-2024, 03:07 PM by hovatek.

Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.

Messages In This Thread
How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by hovatek - 25-09-2017, 05:36 PM
How to create a flashable zip for a Mediatek or Unisoc / Spreadtrum Android phone - by eaz - 27-11-2017, 10:47 AM
RE: How to create a flashable zip for a Mediatek or Unisoc / Spreadtrum Android phone - by paeffiong - 09-02-2018, 01:20 PM
RE: How to create a flashable zip for a Mediatek or Unisoc / Spreadtrum Android phone - by fred@mike - 05-05-2018, 05:39 AM
RE: How to create a flashable zip for a Mediatek or Unisoc / Spreadtrum Android phone - by hovatek - 05-05-2018, 11:17 AM
RE: How to create a flashable zip for a Mediatek or Unisoc / Spreadtrum Android phone - by fred@mike - 13-05-2018, 06:47 AM
RE: How to create a flashable zip for a Mediatek or Unisoc / Spreadtrum Android phone - by hovatek - 14-05-2018, 10:38 AM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by Mikesew - 26-08-2018, 05:48 PM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by xerxes - 27-08-2018, 10:13 AM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by nhatnguyenvan58 - 03-09-2018, 11:55 AM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by xerxes - 03-09-2018, 01:55 PM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by Demainpluz - 22-02-2019, 08:23 AM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by X3non - 22-02-2019, 10:06 AM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by Kuria089 - 26-01-2020, 04:48 PM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by X3non - 27-01-2020, 01:00 PM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by DivergentSony - 16-07-2020, 03:27 PM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by DivergentSony - 16-07-2020, 04:58 PM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by X3non - 17-07-2020, 09:18 AM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by DivergentSony - 17-07-2020, 01:44 PM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by X3non - 17-07-2020, 08:04 PM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by robel pop - 12-01-2021, 07:51 PM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by X3non - 13-01-2021, 09:50 AM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by gabstar - 04-04-2021, 09:06 AM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by X3non - 05-04-2021, 11:19 AM
RE: How to create a flashable zip for Mediatek or Unisoc / Spreadtrum - by gabstar - 05-04-2021, 02:29 PM
Users browsing this thread:
 1 Guest(s)
Users browsing this thread:
 1 Guest(s)
YtWhTl
live chat
whatsapp telegram instagram