Android Tablets Forum banner
41 - 60 of 84 Posts

· Registered
Joined
·
49 Posts
Okay, let us figure out how this unpack and repack with boot.img/recovery.img work. I'm only a beginner in linux stuff, but all together we have a chance to find the solution.
These are the scripts for a start from the first page http://www.mediafire.com/?al8yy1v5f4v6jxr

I start with the unpacking tool. That seems to be always the same one in internet.

Code:
[email protected]:~/amlogic/boot_pack# ./unpack.sh boot.img<br />
Checking for uImage magic word...<br />
1+0 records in<br />
0+1 records out<br />
4 bytes (4 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 0.000414124 s, 9.7 kB/s<br />
uImage recognized.<br />
Extracting data...<br />
56251+1 records in<br />
7031+1 records out<br />
3600101 bytes (3.6 MB) copied, 0.437504 s, 8.2 MB/s<br />
Checking for ARM mach-type...<br />
3+0 records in<br />
0+1 records out<br />
3 bytes (3 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 0.000424253 s, 7.1 kB/s<br />
Checking for zImage...<br />
1+0 records in<br />
0+1 records out<br />
4 bytes (4 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 5.693e-05 s, 70.3 kB/s<br />
>>> boot.img extracted to Image<br />
>>> Image unlzma'd to Image-ext<br />
Extracting initramfs image (start = 154600, end = 2300000)<br />
2145400+0 records in<br />
2145400+0 records out<br />
2145400 bytes (2.1 MB) copied, 38.8765 s, 55.2 kB/s<br />
4191 blocks<br />
initramfs.cpio extracted<br />
[email protected]:~/amlogic/boot_pack# <br />
Any comments to that part?

Code:
[email protected]:~/amlogic/boot_pack# ./repack_boot.sh<br />
bash: ./repack_boot.sh: /bin/sh^M: bad interpreter: No such file or directory<br />
[email protected]:~/amlogic/boot_pack# ./repack_boot.sh boot.new<br />
bash: ./repack_boot.sh: /bin/sh^M: bad interpreter: No such file or directory<br />
[email protected]:~/amlogic/boot_pack# ./repack_boot.sh boot.img<br />
bash: ./repack_boot.sh: /bin/sh^M: bad interpreter: No such file or directory<br />
[email protected]:~/amlogic/boot_pack# ./repack_boot.sh ./boot_pack<br />
bash: ./repack_boot.sh: /bin/sh^M: bad interpreter: No such file or directory<br />
[email protected]:~/amlogic/boot_pack# <br />
This happens with the repack_boot from the fuser-invent link. Any suggestions? What means the bad interpreter? Do I need an extra package in the /bin?

Now I will use the repack script from here http://www.slatedroid.com/topic/41030-recovery-twrp-v2410/page__view__findpost__p__558354

Code:
[email protected]:~/amlogic/boot_pack# ./repack.sh<br />
.<br />
./init<br />
./init.factorytest.rc<br />
./ueventd.amlogic.rc<br />
./init.usb.rc<br />
./boot<br />
./boot/ump.ko<br />
./boot/mali.ko<br />
./ueventd.goldfish.rc<br />
./system<br />
./ueventd.rc<br />
./dev<br />
./initlogo.rle.bak<br />
./init.goldfish.rc<br />
./proc<br />
./sbin<br />
./sbin/adbd<br />
./sbin/ueventd<br />
./sys<br />
./data<br />
./default.prop<br />
./init.rc<br />
./init.trace.rc<br />
4191 blocks<br />
New initramfs is too big (2145792 vs 2145400)<br />
[email protected]:~/amlogic/boot_pack# <br />
I got this result, if I change nothing in the unpacked boot.img.

Now I will take out the initlogo.rle for example.
Code:
[email protected]ubuntu:~/amlogic/boot_pack# ./repack.sh<br />
.<br />
./init<br />
./init.factorytest.rc<br />
./ueventd.amlogic.rc<br />
./init.usb.rc<br />
./boot<br />
./boot/ump.ko<br />
./boot/mali.ko<br />
./ueventd.goldfish.rc<br />
./system<br />
./ueventd.rc<br />
./dev<br />
./init.goldfish.rc<br />
./proc<br />
./sbin<br />
./sbin/adbd<br />
./sbin/ueventd<br />
./sys<br />
./data<br />
./default.prop<br />
./init.rc<br />
./init.trace.rc<br />
4163 blocks<br />
New initramfs is 2131456 bytes (13944 bytes spare)<br />
Adding padding to end of initramfs.new.cpio<br />
13944+0 records in<br />
13944+0 records out<br />
13944 bytes (14 kB) copied, 0.191176 s, 72.9 kB/s<br />
Adding initramfs.new.cpio to kernel (start = 154600, end = 2300000)<br />
154600+0 records in<br />
154600+0 records out<br />
154600 bytes (155 kB) copied, 2.89475 s, 53.4 kB/s<br />
7917508+0 records in<br />
7917508+0 records out<br />
7917508 bytes (7.9 MB) copied, 151.405 s, 52.3 kB/s<br />
Compressing kernel to LZMA<br />
Making uImage<br />
./repack.sh: line 36: mkimage: command not found<br />
[email protected]:~/amlogic/boot_pack# <br />
The result is no new image file repack in the last line of the script.
Thats enough for today. Hopefully someone has an idea for getting closer to an solution for crystal.

JDfense
 

· Registered
Joined
·
115 Posts
Okay, let us figure out how this unpack and repack with boot.img/recovery.img work. I'm only a beginner in linux stuff, but all together we have a chance to find the solution.
These are the scripts for a start from the first page http://www.mediafire.com/?al8yy1v5f4v6jxr

I start with the unpacking tool. That seems to be always the same one in internet.

Code:
[email protected]:~/amlogic/boot_pack# ./unpack.sh boot.img<br />
Checking for uImage magic word...<br />
1+0 records in<br />
0+1 records out<br />
4 bytes (4 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 0.000414124 s, 9.7 kB/s<br />
uImage recognized.<br />
Extracting data...<br />
56251+1 records in<br />
7031+1 records out<br />
3600101 bytes (3.6 MB) copied, 0.437504 s, 8.2 MB/s<br />
Checking for ARM mach-type...<br />
3+0 records in<br />
0+1 records out<br />
3 bytes (3 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 0.000424253 s, 7.1 kB/s<br />
Checking for zImage...<br />
1+0 records in<br />
0+1 records out<br />
4 bytes (4 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 5.693e-05 s, 70.3 kB/s<br />
>>> boot.img extracted to Image<br />
>>> Image unlzma'd to Image-ext<br />
Extracting initramfs image (start = 154600, end = 2300000)<br />
2145400+0 records in<br />
2145400+0 records out<br />
2145400 bytes (2.1 MB) copied, 38.8765 s, 55.2 kB/s<br />
4191 blocks<br />
initramfs.cpio extracted<br />
[email protected]:~/amlogic/boot_pack# <br />
Any comments to that part?

Code:
[email protected]:~/amlogic/boot_pack# ./repack_boot.sh<br />
bash: ./repack_boot.sh: /bin/sh^M: bad interpreter: No such file or directory<br />
[email protected]:~/amlogic/boot_pack# ./repack_boot.sh boot.new<br />
bash: ./repack_boot.sh: /bin/sh^M: bad interpreter: No such file or directory<br />
[email protected]:~/amlogic/boot_pack# ./repack_boot.sh boot.img<br />
bash: ./repack_boot.sh: /bin/sh^M: bad interpreter: No such file or directory<br />
[email protected]:~/amlogic/boot_pack# ./repack_boot.sh ./boot_pack<br />
bash: ./repack_boot.sh: /bin/sh^M: bad interpreter: No such file or directory<br />
[email protected]:~/amlogic/boot_pack# <br />
This happens with the repack_boot from the fuser-invent link. Any suggestions? What means the bad interpreter? Do I need an extra package in the /bin?

Now I will use the repack script from here http://www.slatedroid.com/topic/41030-recovery-twrp-v2410/page__view__findpost__p__558354

Code:
[email protected]:~/amlogic/boot_pack# ./repack.sh<br />
.<br />
./init<br />
./init.factorytest.rc<br />
./ueventd.amlogic.rc<br />
./init.usb.rc<br />
./boot<br />
./boot/ump.ko<br />
./boot/mali.ko<br />
./ueventd.goldfish.rc<br />
./system<br />
./ueventd.rc<br />
./dev<br />
./initlogo.rle.bak<br />
./init.goldfish.rc<br />
./proc<br />
./sbin<br />
./sbin/adbd<br />
./sbin/ueventd<br />
./sys<br />
./data<br />
./default.prop<br />
./init.rc<br />
./init.trace.rc<br />
4191 blocks<br />
New initramfs is too big (2145792 vs 2145400)<br />
[email protected]:~/amlogic/boot_pack# <br />
I got this result, if I change nothing in the unpacked boot.img.

Now I will take out the initlogo.rle for example.
Code:
[email protected]:~/amlogic/boot_pack# ./repack.sh<br />
.<br />
./init<br />
./init.factorytest.rc<br />
./ueventd.amlogic.rc<br />
./init.usb.rc<br />
./boot<br />
./boot/ump.ko<br />
./boot/mali.ko<br />
./ueventd.goldfish.rc<br />
./system<br />
./ueventd.rc<br />
./dev<br />
./init.goldfish.rc<br />
./proc<br />
./sbin<br />
./sbin/adbd<br />
./sbin/ueventd<br />
./sys<br />
./data<br />
./default.prop<br />
./init.rc<br />
./init.trace.rc<br />
4163 blocks<br />
New initramfs is 2131456 bytes (13944 bytes spare)<br />
Adding padding to end of initramfs.new.cpio<br />
13944+0 records in<br />
13944+0 records out<br />
13944 bytes (14 kB) copied, 0.191176 s, 72.9 kB/s<br />
Adding initramfs.new.cpio to kernel (start = 154600, end = 2300000)<br />
154600+0 records in<br />
154600+0 records out<br />
154600 bytes (155 kB) copied, 2.89475 s, 53.4 kB/s<br />
7917508+0 records in<br />
7917508+0 records out<br />
7917508 bytes (7.9 MB) copied, 151.405 s, 52.3 kB/s<br />
Compressing kernel to LZMA<br />
Making uImage<br />
./repack.sh: line 36: mkimage: command not found<br />
[email protected]:~/amlogic/boot_pack# <br />
The result is no new image file repack in the last line of the script.
Thats enough for today. Hopefully someone has an idea for getting closer to an solution for crystal.

JDfense
I'm facing a same problem, when i try to make unsecure boot img from aurora II stock ROM

Sent from my Aurora-II using Tapatalk HD
 

· Registered
Joined
·
49 Posts
Thx cxz, that could be the cause. Need that extra command in the /bin directory for the final repack, I'll check this out later.

JDfense
 

· Super Moderator
Joined
·
1,154 Posts

· Registered
Joined
·
49 Posts
Here is a tool I just put together. Hope it works alright... (it's almost 4 a.m. here... --->
)
It contains needed Cygwin files, modified sh scripts and a Windows batch file to run them.

http://yadi.sk/d/YJ9dYZUS2ux5v
Thanks cxz.

Here comes the result of the test. The Christian Troy script failed with repack again with the message
Code:
New initramfs is too big (2145792 vs 2145400)
I have copied the mkimage file in the work directory and the Linux system /bin directory.
Anyway no choice with the repack script.

After that I tried your batch script in cygwin. Congratulations, it seem to look fine accept of one point. The original file is larger than the repacked file, but I had nothing changed in the unpacked boot.img.
3.600.165MB original boot.img
3.598.963MB original boot.img.new

Here comes the script run.
Code:
================================================<br />
uImage/_recovery unpack-repack batch file by cxz<br />
<br />
About to run unpacking-sh-script. Target file:<br />
C:\cygwin\home\crystalpack\boot.img<br />
<br />
Removes uImage-tmp and initramfs directories!<br />
(press Ctrl+C to cancel)<br />
================================================<br />
Drücken Sie eine beliebige Taste . . .<br />
<br />
Unpacking<br />
C:\cygwin\home\crystalpack\boot.img<br />
================================================<br />
<br />
Checking for uImage magic word...<br />
cygwin warning:<br />
  MS-DOS style path detected: C:\cygwin\home\crystalpack\boot.img<br />
  Preferred POSIX equivalent is: /boot.img<br />
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.<br />
  Consult the user's guide for more details about POSIX paths:<br />
    [URL=http://cygwin.com/cygwin-ug-net/using]http://cygwin.com/cygwin-ug-net/using[/URL].html#using-pathnames<br />
1+0 records in<br />
0+1 records out<br />
4 bytes (4 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 7.1797e-05 s, 55.7 kB/s<br />
uImage recognized.<br />
Extracting data...<br />
56251+1 records in<br />
7031+1 records out<br />
3600101 bytes (3.6 MB) copied, 0.120966 s, 29.8 MB/s<br />
Checking for ARM mach-type...<br />
3+0 records in<br />
0+1 records out<br />
3 bytes (3 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 0.000122082 s, 24.6 kB/s<br />
Checking for zImage...<br />
1+0 records in<br />
0+1 records out<br />
4 bytes (4 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 0.000127949 s, 31.3 kB/s<br />
>>> C:\cygwin\home\crystalpack\boot.img extracted to Image<br />
>>> Image unlzma'd to Image-ext<br />
Extracting initramfs image (start = 154600, end = 2300000)<br />
2145400+0 records in<br />
2145400+0 records out<br />
2145400 bytes (2.1 MB) copied, 15.9616 s, 134 kB/s<br />
initlogo.rle.bak<br />
sbin<br />
sbin/ueventd<br />
sbin/adbd<br />
sys<br />
system<br />
init.factorytest.rc<br />
proc<br />
default.prop<br />
dev<br />
ueventd.goldfish.rc<br />
data<br />
ueventd.rc<br />
init.rc<br />
ueventd.amlogic.rc<br />
init.usb.rc<br />
init.trace.rc<br />
boot<br />
boot/ump.ko<br />
boot/mali.ko<br />
init.goldfish.rc<br />
init<br />
4191 blocks<br />
initramfs.cpio extracted<br />
<br />
<br />
================================================<br />
Unpacking done!<br />
Now edit initramfs and press any key when done.<br />
<br />
Press Ctrl+C to cancel now without repacking.<br />
================================================<br />
<br />
Repacking<br />
C:\cygwin\home\crystalpack\boot.img<br />
================================================<br />
<br />
cygwin warning:<br />
  MS-DOS style path detected: C:\cygwin\home\crystalpack\boot.img<br />
  Preferred POSIX equivalent is: /boot.img<br />
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.<br />
  Consult the user's guide for more details about POSIX paths:<br />
    [URL=http://cygwin.com/cygwin-ug-net/using]http://cygwin.com/cygwin-ug-net/using[/URL].html#using-pathnames<br />
1+0 records in<br />
0+1 records out<br />
32 bytes (32 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 0.000112025 s, 286 kB/s<br />
boot<br />
boot/mali.ko<br />
boot/ump.ko<br />
data<br />
default.prop<br />
dev<br />
init<br />
init.factorytest.rc<br />
init.goldfish.rc<br />
init.rc<br />
init.trace.rc<br />
init.usb.rc<br />
initlogo.rle.bak<br />
proc<br />
sbin<br />
sbin/adbd<br />
sbin/ueventd<br />
sys<br />
system<br />
ueventd.amlogic.rc<br />
ueventd.goldfish.rc<br />
ueventd.rc<br />
4191 blocks<br />
2145400+0 records in<br />
2145400+0 records out<br />
2145400 bytes (2.1 MB) copied, 16.2973 s, 132 kB/s<br />
New initramfs is 2145400 bytes (0 bytes spare)<br />
Adding padding to end of initramfs.new.cpio<br />
0+0 records in<br />
0+0 records out<br />
0 bytes (0 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 2.3746e-05 s, 0.0 kB/s<br />
Adding initramfs.new.cpio to kernel (start = 154600, end = 2300000)<br />
154600+0 records in<br />
154600+0 records out<br />
154600 bytes (155 kB) copied, 1.3845 s, 112 kB/s<br />
7917508+0 records in<br />
7917508+0 records out<br />
7917508 bytes (7.9 MB) copied, 29.3055 s, 270 kB/s<br />
Compressing kernel to LZMA<br />
Making uImage<br />
Image Name:   Linux-3.0.8-g710665b-dirty<br />
Created:      Wed Feb 27 22:22:56 2013<br />
Image Type:   ARM Linux Kernel Image (lzma compressed)<br />
Data Size:    3595355 Bytes = 3511.09 kB = 3.43 MB<br />
Load Address: 80008000<br />
Entry Point:  80008000<br />
<br />
<br />
================================================<br />
Repacking done! Output file:<br />
C:\cygwin\home\crystalpack\boot.img.new<br />
<br />
Removing uImage-tmp files. ( Ctrl+C to cancel )<br />
================================================<br />
Drücken Sie eine beliebige Taste . . .
Do you think the new boot.img will work. I would try to change something, maybe the bootlogo.rle in the next step and repack the boot.img. Then it would be time for the first flashing.

JDfense
 

· Registered
Joined
·
115 Posts
Thanks cxz.

Here comes the result of the test. The Christian Troy script failed with repack again with the message
Code:
New initramfs is too big (2145792 vs 2145400)
I have copied the mkimage file in the work directory and the Linux system /bin directory.
Anyway no choice with the repack script.

After that I tried your batch script in cygwin. Congratulations, it seem to look fine accept of one point. The original file is larger than the repacked file, but I had nothing changed in the unpacked boot.img.
3.600.165MB original boot.img
3.598.963MB original boot.img.new

Here comes the script run.
Code:
================================================<br />
uImage/_recovery unpack-repack batch file by cxz<br />
<br />
About to run unpacking-sh-script. Target file:<br />
C:\cygwin\home\crystalpack\boot.img<br />
<br />
Removes uImage-tmp and initramfs directories!<br />
(press Ctrl+C to cancel)<br />
================================================<br />
Drücken Sie eine beliebige Taste . . .<br />
<br />
Unpacking<br />
C:\cygwin\home\crystalpack\boot.img<br />
================================================<br />
<br />
Checking for uImage magic word...<br />
cygwin warning:<br />
  MS-DOS style path detected: C:\cygwin\home\crystalpack\boot.img<br />
  Preferred POSIX equivalent is: /boot.img<br />
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.<br />
  Consult the user's guide for more details about POSIX paths:<br />
    [URL=http://cygwin.com/cygwin-ug-net/using]http://cygwin.com/cygwin-ug-net/using[/URL].html#using-pathnames<br />
1+0 records in<br />
0+1 records out<br />
4 bytes (4 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 7.1797e-05 s, 55.7 kB/s<br />
uImage recognized.<br />
Extracting data...<br />
56251+1 records in<br />
7031+1 records out<br />
3600101 bytes (3.6 MB) copied, 0.120966 s, 29.8 MB/s<br />
Checking for ARM mach-type...<br />
3+0 records in<br />
0+1 records out<br />
3 bytes (3 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 0.000122082 s, 24.6 kB/s<br />
Checking for zImage...<br />
1+0 records in<br />
0+1 records out<br />
4 bytes (4 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 0.000127949 s, 31.3 kB/s<br />
>>> C:\cygwin\home\crystalpack\boot.img extracted to Image<br />
>>> Image unlzma'd to Image-ext<br />
Extracting initramfs image (start = 154600, end = 2300000)<br />
2145400+0 records in<br />
2145400+0 records out<br />
2145400 bytes (2.1 MB) copied, 15.9616 s, 134 kB/s<br />
initlogo.rle.bak<br />
sbin<br />
sbin/ueventd<br />
sbin/adbd<br />
sys<br />
system<br />
init.factorytest.rc<br />
proc<br />
default.prop<br />
dev<br />
ueventd.goldfish.rc<br />
data<br />
ueventd.rc<br />
init.rc<br />
ueventd.amlogic.rc<br />
init.usb.rc<br />
init.trace.rc<br />
boot<br />
boot/ump.ko<br />
boot/mali.ko<br />
init.goldfish.rc<br />
init<br />
4191 blocks<br />
initramfs.cpio extracted<br />
<br />
<br />
================================================<br />
Unpacking done!<br />
Now edit initramfs and press any key when done.<br />
<br />
Press Ctrl+C to cancel now without repacking.<br />
================================================<br />
<br />
Repacking<br />
C:\cygwin\home\crystalpack\boot.img<br />
================================================<br />
<br />
cygwin warning:<br />
  MS-DOS style path detected: C:\cygwin\home\crystalpack\boot.img<br />
  Preferred POSIX equivalent is: /boot.img<br />
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.<br />
  Consult the user's guide for more details about POSIX paths:<br />
    [URL=http://cygwin.com/cygwin-ug-net/using]http://cygwin.com/cygwin-ug-net/using[/URL].html#using-pathnames<br />
1+0 records in<br />
0+1 records out<br />
32 bytes (32 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 0.000112025 s, 286 kB/s<br />
boot<br />
boot/mali.ko<br />
boot/ump.ko<br />
data<br />
default.prop<br />
dev<br />
init<br />
init.factorytest.rc<br />
init.goldfish.rc<br />
init.rc<br />
init.trace.rc<br />
init.usb.rc<br />
initlogo.rle.bak<br />
proc<br />
sbin<br />
sbin/adbd<br />
sbin/ueventd<br />
sys<br />
system<br />
ueventd.amlogic.rc<br />
ueventd.goldfish.rc<br />
ueventd.rc<br />
4191 blocks<br />
2145400+0 records in<br />
2145400+0 records out<br />
2145400 bytes (2.1 MB) copied, 16.2973 s, 132 kB/s<br />
New initramfs is 2145400 bytes (0 bytes spare)<br />
Adding padding to end of initramfs.new.cpio<br />
0+0 records in<br />
0+0 records out<br />
0 bytes (0 <img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' /> copied, 2.3746e-05 s, 0.0 kB/s<br />
Adding initramfs.new.cpio to kernel (start = 154600, end = 2300000)<br />
154600+0 records in<br />
154600+0 records out<br />
154600 bytes (155 kB) copied, 1.3845 s, 112 kB/s<br />
7917508+0 records in<br />
7917508+0 records out<br />
7917508 bytes (7.9 MB) copied, 29.3055 s, 270 kB/s<br />
Compressing kernel to LZMA<br />
Making uImage<br />
Image Name:   Linux-3.0.8-g710665b-dirty<br />
Created:      Wed Feb 27 22:22:56 2013<br />
Image Type:   ARM Linux Kernel Image (lzma compressed)<br />
Data Size:    3595355 Bytes = 3511.09 kB = 3.43 MB<br />
Load Address: 80008000<br />
Entry Point:  80008000<br />
<br />
<br />
================================================<br />
Repacking done! Output file:<br />
C:\cygwin\home\crystalpack\boot.img.new<br />
<br />
Removing uImage-tmp files. ( Ctrl+C to cancel )<br />
================================================<br />
Drücken Sie eine beliebige Taste . . .
Do you think the new boot.img will work. I would try to change something, maybe the bootlogo.rle in the next step and repack the boot.img. Then it would be time for the first flashing.

JDfense
Wow you have try it and it work for ya, big thanks to cxz for bring the working tools


Sent from my Aurora-II using Tapatalk HD
 

· Registered
Joined
·
1,847 Posts
Discussion Starter · #49 ·
Awesome work cxz, thanks!
 

· Registered
Joined
·
115 Posts
Here is a tool I just put together. Hope it works alright... (it's almost 4 a.m. here... --->
)
It contains needed Cygwin files, modified sh scripts and a Windows batch file to run them.

http://yadi.sk/d/YJ9dYZUS2ux5v
Confirm the tools are really working with my Aurora II
, now I can edit my boot.img correctly many thanks for CXZ and fuser for helpfull link in this thread
 

· Super Moderator
Joined
·
1,154 Posts
Nice to know that it works for others too...


Here comes the result of the test. The Christian Troy script failed with repack again with the message
Code:
New initramfs is too big (2145792 vs 2145400)
I have copied the mkimage file in the work directory and the Linux system /bin directory.
Anyway no choice with the repack script.

After that I tried your batch script in cygwin. Congratulations, it seem to look fine accept of one point. The original file is larger than the repacked file, but I had nothing changed in the unpacked boot.img.
3.600.165MB original boot.img
3.598.963MB original boot.img.new

Do you think the new boot.img will work. I would try to change something, maybe the bootlogo.rle in the next step and repack the boot.img. Then it would be time for the first flashing.
That old repack script packs also the root dir . to the cpio package. -> too big error
I substituted that bug with my own, it works but doesn't include file names starting with "." ...
I'll fix it soon but if needed before just change "find * -print0" -> "find . -mindepth 1 -print0" on line 12.

The size can vary because the files are not in the same order inside cpio. Also lzma options/versions may be different...

Keep us updated about that logo project... I tried with initlogo.rle.bak but I couldn't get a picture out of it.
 

· Registered
Joined
·
1,847 Posts
Discussion Starter · #52 ·
Yeah, I'd like to know how to extract the logo image, edit it and then repackage it as a .rle.bak file. So if anyone figures that out please post your solution here.

Also, does anyone know how to take a boot.img and recovery.img that was extracted from a device via ROM dump and convert to to a uImage of the correct size? I'm trying to help some people with a Karbonn Smart Tab but there is no official stock firmware release. I have the extracted files but they aren't recognized as uImage files.
 

· Super Moderator
Joined
·
1,154 Posts
Also, does anyone know how to take a boot.img and recovery.img that was extracted from a device via ROM dump and convert to to a uImage of the correct size? I'm trying to help some people with a Karbonn Smart Tab but there is no official stock firmware release. I have the extracted files but they aren't recognized as uImage files.
If they have different headers they might need different scripts... or some manual labour...
But do you have to edit them? If not, why not just write them to the partitions as they are...

If you want to do the trimming, correct sha1 sums for them might hide inside etc/install-recovery.sh script...
 

· Super Moderator
Joined
·
1,154 Posts
Okay, I figured out how convert initlogo.rle.bak to a raw and back.
There are many posts about the subject, usually without rle -> raw conversion.

The tools needed are from565 (for rle -> raw) and to565 (for raw -> rle)
Other names for them: 5652rgb and rgb2565.

Usage:
from565.exe -rle < initlogo.rle.bak > initlogo.raw
to565.exe -rle < initlogo.raw > initlogo.rle.new

To edit raw images one can use free tools like IrfanView.
Or Imagemagick to convert the file type for editing:

convert -depth 8 -size 1024x600 rgb:initlogo.raw initlogo.png
convert -depth 8 initlogo.png rgb:initlogo.raw # seem to do -depth 8 even without it...

Here is one place to download them for windows: https://github.com/OlegKyiashko/RK29kitchen/tree/master/win
The cygwin1.dll file is also needed...

@fuser: there is also abootimg.exe that you can use to check those boot images you asked about, that is,
if they are those that have the 2048 byte ANDROID! header, "page" or whatever it is. Our tab doesn't have it
for some reason... You really should have given more info about them (and files perhaps) if you want more than
blind guessing... Hopefully the program gives the sizes you wanted although those sha1 sums would be good to
have too in case of dump errors. (Don't know if there is some check sums in the headers too...)
(BTW, the 64 byte header (having the image name) also contains the size(-64) written in hex, bytes 14-16)

edit: in 64 byte header the bytes 19-22 contain crc-32 sum of lzma (should probably read some manual about the structure(s))
 

· Super Moderator
Joined
·
1,154 Posts
Confirm the tools are really working with my Aurora II
, now I can edit my boot.img correctly many thanks for CXZ and fuser for helpfull link in this thread


An updated version of uImage/_recovery unpack-repack batch file

- previously mentioned little bug is now fixed
- running from command prompt also works correctly
- added gzip to make cpio package smaller if it doesn't fit anymore
- cpio package size is now correctly calculated (-> a tiny amount of more space for a new package if needed badly)
- made more changes to sh scripts to make them to run faster...

The download link is the same: http://yadi.sk/d/YJ9dYZUS2ux5v
 

· Registered
Joined
·
49 Posts
Hey cxz, you have done it again. Thank you very much.
Now its time to try a bootlogo change.

By the way, what does your oven know about a Linux for amlogic devices.

Ubuntu touch comes up - early state of course, but for a Linux guy there is maybe some insperation inside.

JDfense
 

· Super Moderator
Joined
·
1,154 Posts
Oven knows not much about the Linux... and baked a bit burned cake again...

Just re-checked the script because of bad vibes, and yes I somehow managed to put
a half done unpacking file to the package. It cuts (*) the cpio pretty much like
before, not good... Sorry! A fixed version of this version is now uploaded...

Hopefully it works now correctly...

edit:
(*)in the worst case
 

· Registered
Joined
·
49 Posts
I had no time to check so fare and I see it is tricky stuff.
I think, we have to wait for ubuntu touch, its to early, works not really for tegra3.
JDfense
 

· Registered
Joined
·
1,847 Posts
Discussion Starter · #60 ·
So here is an example of what I was talking about with the boot.img not being recognized as a uImage. This is the boot..img from the latest Ainol Fire ROM but it won't extract. The package is built to be used with the AML USB burning software so that might be part of the problem.
 
41 - 60 of 84 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top