xiaolu / galaxys2_kernel_repack Goto Github PK
View Code? Open in Web Editor NEWunpack s2¬e kernel and rebuild,thanks :z4mod,Tungstwenty
Home Page: http://666w.com
unpack s2¬e kernel and rebuild,thanks :z4mod,Tungstwenty
Home Page: http://666w.com
My OS is Arch Linux x64
I checkout the latest version, and I've set LC_ALL=C. Then,
[me@me-laptop galaxys2_kernel_repack]$ ./unpack.sh /tmp/boot.img /tmp/z
[I] Extracting lzma'd kernel image from file: /tmp/boot.img (start = 7089)
./unpack.sh: line 319: [: -le: unary operator expected
./unpack.sh: line 320: [: -le: unary operator expected
grep: /home/me/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/me/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/me/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/me/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/me/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar: No such file or directory
grep: /home/me/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar: No such file or directory
./unpack.sh: line 298: [: =: unary operator expected
mv: cannot stat '/home/me/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar': No such file or directory
[I] Found payload: 'recovery' compression= offset=, len=
[I] Extracting '/home/me/galaxys2_kernel_repack/unpack_kernel_tmp/recovery.tar' ...
cat: /home/me/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/me/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/me/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/me/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/me/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/me/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar: No such file or directory
grep: /home/me/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar: No such file or directory
./unpack.sh: line 298: [: =: unary operator expected
mv: cannot stat '/home/me/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar': No such file or directory
[I] Found payload: 'boot' compression= offset=, len=
[I] Extracting '/home/me/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar' ...
cat: /home/me/galaxys2_kernel_repack/unpack_kernel_tmp/boot.tar: No such file or directory
[I] CPIO compression type detected = none | offset = 236392
[I] Extracting non-compressed CPIO image from kernel image (offset = 236392)
[I] Expanding CPIO archive: initramfs.cpio to /tmp/z.
How to solve this problem?
If $2 is a file, repack.sh fails to find file.cpio path
To fix, add elif part in the code:
if [ -d $new_ramdisk ]; then
printhl "make initramfs.cpio"
#mkbootfs $new_ramdisk > $tempdir/initramfs.cpio
cd $new_ramdisk
#find . | fakeroot cpio -H newc -o > $tempdir/initramfs.cpio
find . | sed 's/.///g' | cpio -R 0:0 -H newc -o > $tempdir/initramfs.cpio
new_ramdisk=$tempdir/initramfs.cpio
cd $workdir
elif [ -f $new_ramdisk ]; then
new_ramdisk="$workdir/$new_ramdisk"
fi
EDIT: errors at rm for payload and new zImage are caused by clean up of old files, so not a big deal
Maybe using rm -f to fix it or just add an exit vs warning if file exist before overwrite
Big thanks
Each time I try I get this : http://pastebin.com/0zy08nRR
It used to work a few months ago. I don't understand what is happening...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.