Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,810,055 Members 47,878 Now Online
XDA Developers Android and Mobile Development Forum

Help unpack and repack kernel !!

Tip us?
 
roshan2989
Old
#1  
roshan2989's Avatar
Senior Member - OP
Thanks Meter 133
Posts: 552
Join Date: Apr 2012
Location: Penang
Default Help unpack and repack kernel !!

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
Samsung Galaxy SII GT-19100
Android Version:4.4.4 KTU84P
Kernel:PA Stock 3.064
Internal:790MB RAM,200-1200Mhz CPU with Pegasusq,SIO
Rom:Paranoid Android 4.4.4 FINAL
 
I98
Old
#2  
Senior Member
Thanks Meter 109
Posts: 158
Join Date: May 2013

 
DONATE TO ME
Quote:
Originally Posted by roshan2989 View Post
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: [ Click to Expand ]
 
roshan2989
Old
#3  
roshan2989's Avatar
Senior Member - OP
Thanks Meter 133
Posts: 552
Join Date: Apr 2012
Location: Penang
Quote:
Originally Posted by I98 View Post
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]
Samsung Galaxy SII GT-19100
Android Version:4.4.4 KTU84P
Kernel:PA Stock 3.064
Internal:790MB RAM,200-1200Mhz CPU with Pegasusq,SIO
Rom:Paranoid Android 4.4.4 FINAL
 
I98
Old
#4  
Senior Member
Thanks Meter 109
Posts: 158
Join Date: May 2013

 
DONATE TO ME
Quote:
Originally Posted by roshan2989 View Post
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
 
roshan2989
Old
#5  
roshan2989's Avatar
Senior Member - OP
Thanks Meter 133
Posts: 552
Join Date: Apr 2012
Location: Penang
Quote:
Originally Posted by I98 View Post
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
Samsung Galaxy SII GT-19100
Android Version:4.4.4 KTU84P
Kernel:PA Stock 3.064
Internal:790MB RAM,200-1200Mhz CPU with Pegasusq,SIO
Rom:Paranoid Android 4.4.4 FINAL
Thread Tools
Display Modes