Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Help unpack and repack kernel !!

OP roshan2989

22nd August 2014, 05:24 PM   |  #1  
roshan2989's Avatar
OP Senior Member
Flag purgatory
Thanks Meter: 134
 
566 posts
Join Date:Joined: Apr 2012
More
guys anyone know how to unpack and repack boot.img (s2 kernel)
i tried to unpack with android kitchen it say

Code:
Android 'magic' header not found at start of boot.img\par
Checking if it exists elsewhere ...\par
Warning: Android header not found in boot.img (unsupported format)\par
\par
Kernel found at offset 24061976 in boot.img\par
od: cannot skip past end of combined input\par
\par
Extracting kernel ...\par
Error: zImage is empty!\par
Extracting ramdisk ...\par
Error: No ramdisk folder found!\par
help would be appreciated
22nd August 2014, 10:53 PM   |  #2  
Senior Member
Thanks Meter: 185
 
245 posts
Join Date:Joined: May 2013
Donate to Me
More
Quote:
Originally Posted by roshan2989

guys anyone know how to unpack and repack boot.img (s2 kernel)
i tried to unpack with android kitchen it say

Code:
Android 'magic' header not found at start of boot.img\par
Checking if it exists elsewhere ...\par
Warning: Android header not found in boot.img (unsupported format)\par
\par
Kernel found at offset 24061976 in boot.img\par
od: cannot skip past end of combined input\par
\par
Extracting kernel ...\par
Error: zImage is empty!\par
Extracting ramdisk ...\par
Error: No ramdisk folder found!\par
help would be appreciated

Hello
This may be of help
http://forum.xda-developers.com/gala...t-img-t2455103
Please tell me if it helped you
Thank you
The Following User Says Thank You to I98 For This Useful Post: [ View ]
23rd August 2014, 09:06 AM   |  #3  
roshan2989's Avatar
OP Senior Member
Flag purgatory
Thanks Meter: 134
 
566 posts
Join Date:Joined: Apr 2012
More
Quote:
Originally Posted by I98

Hello
This may be of help
http://forum.xda-developers.com/gala...t-img-t2455103
Please tell me if it helped you
Thank you


i just follow the guide but im getting this error..btw in im bbq linux

HTML Code:
[CODE][preshot2989@preshot2989 ~]$ cd kernel
[preshot2989@preshot2989 kernel]$ ./unpack.sh boot.img out
[I] boot.img is an uncompressed kernel image 
./unpack.sh: line 319: [: -le: unary operator expected
./unpack.sh: line 320: [: -le: unary operator expected
grep: /home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar: No such file or directory
./unpack.sh: line 298: [: =: unary operator expected
mv: cannot stat ‘/home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar’: No such file or directory
[I] Found payload: 'recovery' compression= offset=, len= 
[I] Extracting '/home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar' ... 
cat: /home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar: No such file or directory
./unpack.sh: line 303: [: -le: unary operator expected
./unpack.sh: line 304: [: -le: unary operator expected
grep: /home/preshot2989/kernel/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/boot.tar: No such file or directory
./unpack.sh: line 298: [: =: unary operator expected
mv: cannot stat ‘/home/preshot2989/kernel/unpack_kernel_tmp/boot.tar’: No such file or directory
[I] Found payload: 'boot' compression= offset=, len= 
[I] Extracting '/home/preshot2989/kernel/unpack_kernel_tmp/boot.tar' ... 
cat: /home/preshot2989/kernel/unpack_kernel_tmp/boot.tar: No such file or directory
./unpack.sh: line 197: [: =: unary operator expected
[I] CPIO compression type detected =  | offset =  
[I] Extracting non-compressed CPIO image from kernel image (offset = ) 
[I] Expanding CPIO archive: initramfs.cpio to out. 
[preshot2989@preshot2989 kernel]$ 

[/CODE]
31st August 2014, 08:09 PM   |  #4  
Senior Member
Thanks Meter: 185
 
245 posts
Join Date:Joined: May 2013
Donate to Me
More
Quote:
Originally Posted by roshan2989

i just follow the guide but im getting this error..btw in im bbq linux

HTML Code:
[CODE][preshot2989@preshot2989 ~]$ cd kernel
[preshot2989@preshot2989 kernel]$ ./unpack.sh boot.img out
[I] boot.img is an uncompressed kernel image 
./unpack.sh: line 319: [: -le: unary operator expected
./unpack.sh: line 320: [: -le: unary operator expected
grep: /home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar: No such file or directory
./unpack.sh: line 298: [: =: unary operator expected
mv: cannot stat ‘/home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar’: No such file or directory
[I] Found payload: 'recovery' compression= offset=, len= 
[I] Extracting '/home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar' ... 
cat: /home/preshot2989/kernel/unpack_kernel_tmp/recovery.tar: No such file or directory
./unpack.sh: line 303: [: -le: unary operator expected
./unpack.sh: line 304: [: -le: unary operator expected
grep: /home/preshot2989/kernel/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/preshot2989/kernel/unpack_kernel_tmp/boot.tar: No such file or directory
./unpack.sh: line 298: [: =: unary operator expected
mv: cannot stat ‘/home/preshot2989/kernel/unpack_kernel_tmp/boot.tar’: No such file or directory
[I] Found payload: 'boot' compression= offset=, len= 
[I] Extracting '/home/preshot2989/kernel/unpack_kernel_tmp/boot.tar' ... 
cat: /home/preshot2989/kernel/unpack_kernel_tmp/boot.tar: No such file or directory
./unpack.sh: line 197: [: =: unary operator expected
[I] CPIO compression type detected =  | offset =  
[I] Extracting non-compressed CPIO image from kernel image (offset = ) 
[I] Expanding CPIO archive: initramfs.cpio to out. 
[preshot2989@preshot2989 kernel]$ 

[/CODE]

Hello
I got a similar error when doing so, did you find a solution to this as I too am trying to unpack the boot.img.
Thanks
1st September 2014, 09:44 AM   |  #5  
roshan2989's Avatar
OP Senior Member
Flag purgatory
Thanks Meter: 134
 
566 posts
Join Date:Joined: Apr 2012
More
Quote:
Originally Posted by I98

Hello
I got a similar error when doing so, did you find a solution to this as I too am trying to unpack the boot.img.
Thanks

yes but im able to unpack the initrams from the boot.img

Code:
./unpack.sh boot.img 
[I] Extracting lzma'd kernel image from file: boot.img (start = 7636) 
./unpack.sh: line 319: [: -le: unary operator expected
./unpack.sh: line 320: [: -le: unary operator expected
grep: /home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar: No such file or directory
./unpack.sh: line 298: [: =: unary operator expected
mv: cannot stat `/home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar': No such file or directory
[I] Found payload: 'recovery' compression= offset=, len= 
[I] Extracting '/home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar' ... 
cat: /home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar: No such file or directory
./unpack.sh: line 303: [: -le: unary operator expected
./unpack.sh: line 304: [: -le: unary operator expected
grep: /home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar: No such file or directory
./unpack.sh: line 298: [: =: unary operator expected
mv: cannot stat `/home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar': No such file or directory
[I] Found payload: 'boot' compression= offset=, len= 
[I] Extracting '/home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar' ... 
cat: /home/preshot2989/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar: No such file or directory
[I] CPIO compression type detected = none | offset = 202052 
[I] Extracting non-compressed CPIO image from kernel image (offset = 202052) 
[I] Expanding CPIO archive: initramfs.cpio to initramfs_root. 
preshot2989@preshot2989:~/galaxys2_kernel_repack$

im using ubuntu12.04LTS 64bit to unpack this..but i cant unpack the boot.img in BBQ Linux
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes