Hovatek Forum DEVELOPMENT Android [Tutorial] How to unpack signed boot, recovery or system (-sign.img)
Can't login? Please, reset your password.
Hovatek is recruiting! Apply Now


[Tutorial] How to unpack signed boot, recovery or system (-sign.img)

[Tutorial] How to unpack signed boot, recovery or system (-sign.img)

Pages (4): 1 2 3 4 Next
X3non
X3non
X3non
Recognized Contributor
22,062
08-11-2017, 06:58 PM
#1



We previously created a guide for those who wish to extract system.img @ https://www.hovatek.com/forum/thread-15855.html but that guide doesn't work for those who have signed images e.g recovery-sign, boot-sign or system-sign images. If you are amongst those with a signed image, then follow the guide below to extract the file

Update: If you get the error message 'E: File image not FB' when trying to unsign then use the tool @ https://www.hovatek.com/forum/thread-26890.html

Requirements


How to unsign system-sign.img, recovery-sign.img and boot-sign.img


See the video below or @ https://youtu.be/CV39vJsNjhY

  1. Extract the content on the zip file and launch menu.bat file

    [Image: Hovatek-How-to-unpack-system-sign.img-1.jpg]

  2. Copy the signed image you wish to extract into the _In folder. In this example, i'm using system-sign.img

    [Image: Hovatek-How-to-unpack-system-sign.img-2.jpg]

  3. The menu.bat file you launched earlier should open a CMD prompt window

    [Image: Hovatek-How-to-unpack-system-sign.img-3.jpg]

  4. Type 1 and hit Enter to proceed

    [Image: Hovatek-How-to-unpack-system-sign.img-4.jpg]

  5. We are trying to unpack FB so type 1 again and hit Enter to proceed

    [Image: Hovatek-How-to-unpack-system-sign.img-5.jpg]

  6. Waiting patiently while the tool unpacks the signed img and once its done, you should get a message as seen in the screenshot below. Unpacking the -sign img is complete and you can find the new file within the unpack folder. Press any key to proceed

    [Image: Hovatek-How-to-unpack-system-sign.img-6.jpg]

  7. Now type 3 and hit Enter to return to the main menu

    [Image: Hovatek-How-to-unpack-system-sign.img-7.jpg]

  8. At this point, you'll get an unsigned image file in the unpack folder. You can unpack / extract the unsigned image using any of your favorite tools

Unpacking the unsigned system image


  1. Now we are trying to unpacking a regular unsigned system.img in Ext4 FS. Type 3 and hit Enter 

    [Image: Hovatek-How-to-unpack-system-sign.img-8.jpg]

  2. Type 5 depending on the file system (most system.img are Ext4) and hit Enter

    [Image: Hovatek-How-to-unpack-system-sign.img-9.jpg]

  3. The tool should list all img files within the unpack folder. Choose the number that corresponds with the file you intend to unpack. Here is 1 then hit Enter

    [Image: Hovatek-How-to-unpack-system-sign.img-10.jpg]

  4. Wait while the tool unpacks the img and once its done, you should get the message "Extract finish success". Press any key to proceed then you can now exit the tool 

    [Image: Hovatek-How-to-unpack-system-sign.img-11.jpg]

  5. To locate the extracted files, navigate to the FBwintool folder > unpack > the folder bearing the name of the file you just extracted. You should find the extracted files here

    [Image: Hovatek-How-to-unpack-system-sign.img-12.jpg]

Credits: Vin2809 of 4pda for Fbwintool

Video Transcript
Quote:In this video tutorial, I'll be explaining how to unpack a signed image using FBWin tools. This particular guide is going to work for either a signed boot, recovery or system Now, first off, I need to explain what a signed image is. You might have comes across some files in your firmware where you have a file name-sign alright? Something like this Now, this is a signed image. What this means is that if you intend to port a custom recovery with your boot image or recovery image or even if you want to flash or modify the system image, you can't do that if (since) it has been altered so it's a security feature by your OEM to make sure you only flash verified images so before you can port a custom recovery with this kind of image,  you have to first un-sign the image then you can go ahead with modification.

Now, to show you how works, I first have to show you an attempt of me trying to unpack a signed image okay? so you can see the error message you're going to get First off, I'm going to copy this recovery image, its a signed image so I'm going to try to unpack using Carliv Image tool. I'm going to paste it right here. Now this tool requires me to rename to recovery.img so I'm going to rename it quickly. OK, so I have my recovery image. Now, I'm going to launch the Carliv Image tool. What I'm trying to do is to unpack a signed recovery image.

I've not yet unsigned it okay? I'm trying to unpack it in its State. I'm trying to unpack a recovery image, I select 1. I select Unpack. Alright! Great! The system cannot find the batch label specified - ~1. You can see this error. Now, this is what you get when you try to unpack a signed image. You're going to get the same thing with boot image also so I can just go ahead and close this. I'm going to clear this also. You can see it couldn't even extract the recovery image. Alright! so that is what you get when you try to unpack a signed image so now I'm going to show you how to unsign this recovery image.

After You unsign, you can then go ahead to unpack using your Carliv Image kitchen. Okay so once you have your recovery image, what you want to do is copy it and then you go to the FBWin tools. As for the software (tool) we have a link on our website. You can check our Forum for the download link for this tool or you check the description in this video for the download link. Now, once you have your recovery image (of course) You go to the _In folder and You're going to paste it here.

Now, one mistake people tend to make when trying to use this tool is that they rename this to recovery, which is wrong. You try to remove this (-sign) which you shouldn't do it should be named recovery-sign okay because that's what this tool is looking out for so You leave it that way i.e recovery-sign or boot-sign or system-sign whatever it is You're unpacking. Make sure the -sign suffix is appended then You go back. Now, You're going to launch this menu.bat, Its a batch file.

You're going to double-click it. Now, on this menu, You're going to select 1; that is FB. You're doing an FB unsign so You select 1 and You tap Enter. Now I'm going to select 1 again (FB unpack) so I'm going to select 1; I'm doing an FB unpack; that's going to unsign the image. That is done, it says FB recovery image unpacked so I'm going to head over to the Unpack folder - _Image and there I have my recovery-sign so now I can go ahead to try and unpack this using my Carliv Image since it has been unsigned. Now, in Carliv Image, You want to paste it right here in recovery-sources or whatever tool you want to use to modify Your recovery image.

Now, you need to remove the -sign suffix since you've unsigned the image now so there's no point having the -sign suffix okay? I'm going to save it as recovery.img. Don't forget this is an image file. You can come under Properties (.img is an image file). I can close this. Press any key to continue. I can close my FB, I'm done unsigning. Now to unpack I'm going to go ahead to unpack. Now, I'm going to launch the Carliv Image tool so I'll double click that. I'm trying to unpack recovery so I'll select R, select 1, select unpack, so you can see this time around, its unpacking and its unpacking very smoothly so once it's done I'll just come right here and I have my recovery image unpacked.

It's the same procedure whether you're trying to unsign a boot image, a recovery image or a system image. Before you can go ahead to unpack, you have to first unsign using FBWin tools. Once unsigned, You can then go ahead to do whatever you want with the image. So that's basically how to unsign a signed image whether boot, system or recovery using FBWin tools
This post was last modified: 04-10-2019, 11:40 PM by X3non.
kaew158
kaew158
kaew158
Techie Member
52
23-12-2017, 03:27 PM
#2
My device stuck on boot screen after flash twrp.img and boot into recovery. My stock ROM signed. (boot-sign.img / recovery-sign.img and more). Need help to solve this problem.
xerxes
xerxes
xerxes
Senior Member
8,355
23-12-2017, 05:11 PM
#3
(23-12-2017, 03:27 PM)kaew158 My device stuck on boot screen after flash twrp.img and boot into recovery. My stock ROM signed. (boot-sign.img / recovery-sign.img and more). Need help to solve this problem.

Please, create a new thread so we can focus on it. 
See https://www.hovatek.com/forum/thread-524.html for how to create a thread.
feligres
feligres
feligres
Newbie
2
05-01-2018, 08:47 AM
#4
Hello, and thanks for the tutorial.
I have a question...
Is there any way to convert a system to a system-sign to install by Flashtools?
X3non
X3non
X3non
Recognized Contributor
22,062
05-01-2018, 02:00 PM
#5



(05-01-2018, 08:47 AM)feligres Hello,  and thanks for the tutorial.
I have a question...
Is there any way to convert a system to a system-sign to install by Flashtools?

the tool has an option for doing that but it doesn't work
so for now the answer is no
feligres
feligres
feligres
Newbie
2
06-01-2018, 05:00 PM
#6
(05-01-2018, 02:00 PM)X3non
(05-01-2018, 08:47 AM)feligres Hello,  and thanks for the tutorial.
I have a question...
Is there any way to convert a system to a system-sign to install by Flashtools?

the tool has an option for doing that but it doesn't work
so for now the answer is no

Okay.
Thanks for the reply.
I thought I was doing it wrong, but I see that the option does not work because of what you say.
nijazxp
nijazxp
nijazxp
Techie Member
55
07-03-2018, 03:55 AM
#7
(06-01-2018, 05:00 PM)feligres
(05-01-2018, 02:00 PM)X3non
(05-01-2018, 08:47 AM)feligres Hello,  and thanks for the tutorial.
I have a question...
Is there any way to convert a system to a system-sign to install by Flashtools?

the tool has an option for doing that but it doesn't work
so for now the answer is no

Okay.
Thanks for the reply.
I thought I was doing it wrong, but I see that the option does not work because of what you say.

You don't need signed files. Just use spflashtool 5.1532 which works with unsigned files.

And fbwintools has at least 2 errors when packing system files:
It says to enter size in Mb but we are supposed to enter it in bytes.
It messes up files permissions. That may brick our phones. It changed all my permissions and few groups to different ones! Although it saves original permissions in statfile in unpack folder. When you extract packed by this tool files again, statfile will show all wrong/different permissions. Dangerous!
dwana
dwana
dwana
Junior Member
16
20-03-2018, 11:09 PM
#8
Where do I get the system-sign.img From. Am lost there.
hovatek
hovatek
hovatek
Administrator
49,570
21-03-2018, 10:31 AM
#9
(20-03-2018, 11:09 PM)dwana Where do I get the system-sign.img From. Am lost there.

Hold on. Which image are you trying to unsign?
This post was last modified: 21-03-2018, 10:31 AM by hovatek.

Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.
dwana
dwana
dwana
Junior Member
16
21-03-2018, 08:15 PM
#10



Recovery image. Want to use for porting custom recovery
Pages (4): 1 2 3 4 Next
Users browsing this thread:
 1 Guest(s)
Users browsing this thread:
 1 Guest(s)
YtWhTl
live chat
whatsapp telegram instagram