huawei system.img done pack error - Other Tools & General Discussion

huawei system.img done pack error
i've been modded system.img
first i'm extract system.img ,and i'm mod system.img
andthen pack system.img ..
allmost done !
i'm flash system.img
nothing error found ..
flashing system.img finished !
give me an error
like this
- exec '/system/bin/sh' failed: No such file or directory (2) nRet(-1) -
what is that error?
compiling system.img error
plz give me some reason for that's error and how to fix it
thanks to all XDA members ...

Related

[DEV][Tools] simg2img for Windows

Hello, although I'm working in Linux (VM too) I rewrote the SIMG2IMG so far for Windows (PE32, x86)
Usage: simg2img.exe -i <chunked Image file name> -o <outputname>
Optional: -d for debugging messages, listing all chunks of the image (.ext4.img) files to stdout (in case there are partial image files )
MD5: e5fc02b2f27756c1de270d31e29447e6 *simg2img.zip
cant unpack system.img (3.48GB) Samsung G928P . After Unpacking image size 164MB.
Error calling ftruncate() to set the image size
simg2img.exe -i system.img -o system.ext4
packed img filename: system.img
output img filename: system.ext4
Error calling ftruncate() to set the image size
Note: system.img is 1.9G.
Victor_Hsu said:
simg2img.exe -i system.img -o system.ext4
packed img filename: system.img
output img filename: system.ext4
Error calling ftruncate() to set the image size
Note: system.img is 1.9G.
Click to expand...
Click to collapse
I got the same problem when I ran this on system.img.ext4 from the Samsung Galaxy S5 Lollipop firmware. However, the output file still looked like it was the right size, and EXT2Read opened and extracted it without a problem.
MAXIMATOR said:
cant unpack system.img (3.48GB) Samsung G928P . After Unpacking image size 164MB.
Click to expand...
Click to collapse
same here output is only 104mb while system.img is 3.55 gb
Same problem here:
packed img filename: system.img
output img filename: system.img2
Error calling ftruncate() to set the image size
Output file was 2.8GB, input file 2.4GB wich looked OK, so I tried opening the output file with ext4_unpacker_exe wich failed, then I tried opening it with ext2explore-2.2.71 and it was able to open it !!!!
Thanks
your tool not working, Error calling ftruncate() to set the image size
https://github.com/KinglyWayne/simg2img_win
this work better
G:\vbox_share\simg2img>simg2img.exe -i userdata.img -o new-userdata.img
packed img filename: userdata.img
output img filename: new-userdata.img
Wrote "new-userdata.img"
The userdata.img only 21.4MB , but the new-userdata.img is 1.19 GB . Is right ?
I couldn't get this version to work, but I did find another version that did. I then created this thread with complete instructions: [GUIDE]How to extract /system from Samsung S7 OTA/FW in Windows without a Phone Hope it helps. Thanks!
kevin71246 said:
I couldn't get this version to work, but I did find another version that did. I then created this thread with complete instructions: [GUIDE]How to extract /system from Samsung S7 OTA/FW in Windows without a Phone Hope it helps. Thanks!
Click to expand...
Click to collapse
does anyone know why it would say bad magic?

exec '/system/bin/sh' failed: No such file or directory

Hello.
I built CM11 for my chinese tablet Onda V989 and i successfully flash my rom via CWM. (I wipe data & cache after flashing).
After rebooting it stuck on the bootloader logo. (I think that it happens because system partition was not mounted correctly)
Then i tried to get logcat but i got this error:
Code:
exec '/system/bin/sh' failed: No such file or directory
Then i checked otapackage which i built ands i found that sh file did not exist. It is strange.
Any idea?
Here is a my device tree which i used for building:
device folder
vendor folder
kernel folder

Simg2img not successfully compiled Help !

Hi err i have a Problem after setting up a working folder in the end it shows this error
Compiling simg2img ...
simg2img.c:30:22: fatal error: sys/mman.h: No such file or directory
compilation terminated.
Error: simg2img.exe not successfully compiled!
Can anyone help me?

[GUIDE][Linux/Win] How to unpack system_1.img+system_2.img+...+system_*.img | 2019

A youtube video on this guide
Watch video
Hello guys,
I rarely write guide and tutorials .so neglect my typos and gramatical mistakes
Today im gonna show you how to unpack sparsed system.img files (system_1.img+system_2.img+............+system_*.img)
supports system / cache / userdata / persist / vendor / cust / odm /oem partitions from QFIL firmwares
Lets get started
LINUX
Things Needed:
1) Packsparseimg
2) Imgextractor.exe -Need wine for this
Procedure:
1) First of all extract you device firmware in which you have sparse system.img files in a folder.
(folder path ex:~/Desktop/firmware)
2) Copy the downloaded packsparseimg_v1.1 and Imgextractor.exe in the same folder where you extracted your firmware
(ex:~/Desktop/firmware)
3) Open terminal and enter below commands.
4)
Code:
chmod 0755 packsparseimg_v1.1
5)This command will pack sparse system_1.img....files to system.raw
Code:
./packsparseimg_v1.1
you can use these commands to pack sparse cache and userdata persist,vendor,cust,odm partitions
Code:
Usage of ./packsparseimg_v1.1:
-o string
output dir path (default "./")
-t string
image to unsparse: system / cache / userdata / persist / vendor / cust / odm / oem (default "system")
-x string
xml file to load (default "./rawprogram_unsparse.xml")
6) After joining of sparse system.img's finishes you will get system.raw file
7) Use below commands to unpack system.raw to system folder
Note: You need wine on your linux to run imgextractor.exe
Code:
wine imgextractor.exe system.raw
8) Hell Yeah! you have successfully unpack those system_1,2,3,4....imgs
now you can make your own stock deodexed rom
Downloads For linux:-
[MOD EDIT: URL REMOVED]
Password:innfinite4evr
Imgextractor.exe
WINDOWS
Things Needed:
1) packsparseimg_v1.1
2) Imgextractor.exe
Procedure:
1) First of all extract you device firmware in which you have sparse system.img files in a folder.
(folder path exesktop/Myfirmware)
2) Copy the downloaded packsparseimg_v1.1 and Imgextractor.exe in the same folder where you extracted your firmware
(exesktop/Myfirmware)
3) Open Command Prompt (cmd.exe) and enter below commands.
PS: you can open command propmt by any of these methods. Here method 1 is preferred
Method 1: Most suitable method for this guide
hold down shift key while pressing the right mouse onto the folder you want to open "command prompt" then a new menu item will appear in your context menu offering you exactly that: "open command prompt here" select it and command prompt will open.
Method 2:Search is very helpful. In Windows 7, open the Start Menu and type command or cmd. Then, click or tap the Command Prompt
Method 3ne of the quickest ways to launch the Command Prompt is to use the Run window (press Win+R on your keyboard and type cmd and press enter to open it).
i guess three methods are enough for windows users
4) AFter command prompt opens enter below comamnds to proceed further
5)This command will pack sparse system_1.img....files to system.raw
Note default is "system"
Code:
packsparseimg
you can use these commands to pack sparse cache and userdata persist,vendor,cust,odm partitions
Code:
Usage of packsparseimg:
-o string
output dir path (default "./")
-t string
image to unsparse: system / cache / userdata / persist / vendor / cust / odm (default "system")
-x string
xml file to load (default "./rawprogram_unsparse.xml")
6) After joining of sparse system.img's finishes you will get system.raw file
7) Use below commands to unpack system.raw to system folder
Code:
imgextractor.exe system.raw
8) Now you will get unpacked system folder
Hell Yeah! you have successfully unpack those system_1,2,3,4....imgs
now you can make your own stock deodexed rom
Downloads for windows:-
Imgextractor.exe
Password:innfinite4evr
[MOD EDIT: URL REMOVED]
Changelog:-
in update v1.1
now supports system / cache / userdata / persist / vendor / cust / odm /oem partitions from QFIL firmwares
Credits:
kidd for initially making packsparseimg binary
@and_pDA for imgextractor,exe(Based on sources ext4_unpacker)
@Innfinite4evr for testing this method and write this guide​
Great work bro :good: Nice job and thanks for this
great work man. thanks
can you share code?
There is another way to unpacj that instead of using wine.
Code:
mount -o loop -t ext4 system.img [path]
Replace:
[Path] with path to the output directory you want (ex: ~/sys-img)
ext4: This might be different, check it by yourself, but most device now using ext4
Thanks for the info, btw
Please can somebody tell me how to revert the process? To create again sparse images and flash via qfil? Thanks in advance!
cofface said:
can you share code?
Click to expand...
Click to collapse
only prebuilts
cofface said:
can you share code?
Click to expand...
Click to collapse
only prebuilts
I get this error on Ubuntu:
bash: ./packsparseimg: cannot execute binary file: Formato eseguibile non valido
What is the procedure to do the reverse?
How to repack as parts
sir i was trying to repack system folder to system_1.img system_2.img etc.
is there any way for that?
i need to repack and flash to my phone
Doesn't seem to work for Oreo a/b system
@Innfinite4evr Hi there, can you add vendor, cust and odm support ?
AL_IRAQI said:
@Innfinite4evrHi there, can you add vendor, cust and odm support ?
Click to expand...
Click to collapse
Yes there is.
Im thinking to update this stuff
AL_IRAQI said:
@Innfinite4evrHi there, can you add vendor, cust and odm support ?
Click to expand...
Click to collapse
Ive updated the tool, maybe you can try for odm partition.
Innfinite4evr said:
Ive updated the tool, maybe you can try for odm partition.
Click to expand...
Click to collapse
I've try to buy, with all my2 credit card (master card and american express)
I was addebited 1€ in my mastercard, but it always give me error and I can't download the program.
I do not want the refund, I'd like to have the tool!
Samuele Bonzio
I give you my phone number by PM if that need!
Thank you!
Thread closed. PM me when you have download links that don't require payment to be added to the OP.

How to repack cache.img file (after changing )

How to repack cache.img file (after changing ) please tell me anybody
I have same problem

Categories

Resources