Hi, Guest! Login / Register

Announcement: We've crossed the 100,000+ forum members milestone... READ MORE (May, 2018)
 
Thread Rating:
  • 2 Vote(s) - 3 Average

[Development] How to unpack and repack system.img or system.new.dat in Windows

#1
(This post was last modified: 05-05-2018, 05:16 PM by hovatek. )

This guide will show you how to successfully unpack and repack an Android system image

Requirements


How to unpack and repack Android system.img & system.new.dat



How to unpack system.img


  1. Run Auto_Tool.exe as as Administrator

    [Image: Hovatek-how-to-unpack-and-repack-system.img-1.jpg]

  2. You should now be in the tools Dashboard

    [Image: Hovatek-how-to-unpack-and-repack-system.img-2.jpg]

    Type 4 then press Enter

    [Image: Hovatek-how-to-unpack-and-repack-system.img-3.jpg]

  3. Copy the file_contexts and system.img into the Input-IMG folder

    [Image: Hovatek-how-to-unpack-and-repack-system.img-4.jpg]

  4. Go back to the tool and press Enter

    [Image: Hovatek-how-to-unpack-and-repack-system.img-5.jpg]

  5. Wait while the system image gets unpacked

    [Image: Hovatek-how-to-unpack-and-repack-system.img-7.jpg]

  6. Copy the size ***** bytes, you'll need it for repacking . In this example, it is 2684190720

    [Image: Hovatek-how-to-unpack-and-repack-system.img-8.jpg]

  7. Once unpacking is done, press Enter

    [Image: Hovatek-how-to-unpack-and-repack-system.img-9.jpg]

  8. You should find the unpacked system image in the Unpack-IMG folder

    [Image: Hovatek-how-to-unpack-and-repack-system.img-10.jpg]

How to repack system.img


  1. Go back to the tool, type 5 then press Enter

    [Image: Hovatek-how-to-unpack-and-repack-system.img-11.jpg]

  2. Type y then press Enter

    [Image: Hovatek-how-to-unpack-and-repack-system.img-12.jpg]

  3. Type the size in bytes you copied from above (in this example, it is 2684190720) then press Enter

    [Image: Hovatek-how-to-unpack-and-repack-system.img-13.jpg]

  4. Wait while the image is repacked

    [Image: Hovatek-how-to-unpack-and-repack-system.img-14.jpg]

  5. Once repacking is done, press Enter

    [Image: Hovatek-how-to-unpack-and-repack-system.img-15.jpg]

  6. You should see the repacked system.img in the IMG-Repack folder

    [Image: Hovatek-how-to-unpack-and-repack-system.img-16.jpg]

How to unpack system.new.dat


  1. Run Auto_Tool.exe as as Administrator

    [Image: Hovatek-how-to-unpack-and-repack-system.img-1.jpg]

  2. Type 1 then press Enter

    [Image: Hovatek-how-to-unpack-and-repack-system.new_.dat-1.jpg]

  3. Copy the file_contexts, system.new.dat and system.transfer.list into the Input-DAT folder

    [Image: Hovatek-how-to-unpack-and-repack-system.new_.dat-2.jpg]

  4. Go back to the tool and press Enter

    [Image: Hovatek-how-to-unpack-and-repack-system.new_.dat-3.jpg]

  5. Wait while the system.new.dat is unpacked

    [Image: Hovatek-how-to-unpack-and-repack-system.new_.dat-4.jpg]

  6. Copy the size in bytes, you'll need it for repacking. In this example, it is 2684354560

    [Image: Hovatek-how-to-unpack-and-repack-system.new_.dat-5.jpg]

  7. Once unpacking is done, press Enter

    [Image: Hovatek-how-to-unpack-and-repack-system.new_.dat-6.jpg]

  8. You should see the unpacked system.new.dat in the Unpack-DAT folder

    [Image: Hovatek-how-to-unpack-and-repack-system.new_.dat-7.jpg]

How to repack system.new.dat


  1. Return to the tool, type 2 and press Enter

    [Image: Hovatek-how-to-unpack-and-repack-system.new_.dat-8.jpg]

  2. Type y then press Enter

    [Image: Hovatek-how-to-unpack-and-repack-system.new_.dat-9.jpg]

  3. Type the size in bytes you copied from above (in this example, it is 2684354560) then press Enter

    [Image: Hovatek-how-to-unpack-and-repack-system.new_.dat-10.jpg]

  4. Wait while system.new.dat is repacked

    [Image: Hovatek-how-to-unpack-and-repack-system.new_.dat-11.jpg]

  5. Once repacking is done, press Enter

    [Image: Hovatek-how-to-unpack-and-repack-system.new_.dat-12.jpg]

  6. You should now see the repacked system.new.dat and system.transfer.list in the DAT-Repack folder

    [Image: Hovatek-how-to-unpack-and-repack-system.new_.dat-13.jpg]


Need further assistance? Speak with a Hovatek Representative:
Working Hours: Mondays - Saturdays ; 09:00 - 18:00 (GMT +1:00)
Reply
#2
thanks bro I will try , thanks for your quick response, great salute
Reply
#3
cant find file context
Reply
#4
(12-12-2017, 01:38 PM)chikaubah Wrote: cant find file context

Look properly
Need further assistance? Speak with a Hovatek Representative:
Working Hours: Mondays - Saturdays ; 09:00 - 18:00 (GMT +1:00)
Reply
#5
I tried using the tool and it was successful but upon trying to repack, i saw the message that says i should enter the size in MB

Reply
#6
I have successfully unpack my system new dat file but get the getting error while trying to repack it.


[Image: Untitled.png]
Reply
#7
(02-08-2018, 10:13 AM)paeffiong Wrote: I tried using the tool and it was successful but upon trying to repack, i saw the message that says i should enter the size in MB

check step 6 when unpacking. you're to take note of the size.
that's what you'll use for repacking
Reply
#8
(02-08-2018, 06:56 PM)X3non Wrote:
(02-08-2018, 10:13 AM)paeffiong Wrote: I tried using the tool and it was successful but upon trying to repack, i saw the message that says i should enter the size in MB

check step 6 when unpacking. you're to take note of the size.
that's what you'll use for repacking

My issue as screen shot has nothing absolutely to do with the size.

Look critically at the pic and you will understand what I'm facing.
Reply
#9
(02-08-2018, 07:30 PM)paeffiong Wrote: My issue as screen shot has nothing absolutely to do with the size.

Look critically at the pic and you will understand what I'm facing.

Restart the unpack-repack process running the tool as Admin.
Also try unpack and repack as RAW (system.img) using the guide at https://forum.hovatek.com/thread-20497.html
Need further assistance? Speak with a Hovatek Representative:
Working Hours: Mondays - Saturdays ; 09:00 - 18:00 (GMT +1:00)
Reply
#10
I need something that will help me out on repacking the image to its original format.

Though the ROM has already been ported to my device by me, i need to work on repacking it to its original format.
Reply




Users browsing this thread:
1 Guest(s)