Android Tablets Forum banner
1 - 19 of 84 Posts

· Registered
Joined
·
49 Posts
Hi fuser-invent,

real nice collection of tools and knowledge to step into androids world.

Lets get started to cook an amlogic rom.


JDfense
 

· Registered
Joined
·
49 Posts
Yes the hype around a tablet could suddenly end. For my other tablets I have no more traffic. The crystal is my new one. I want to learn how modding with amlogic works, so I began to read your collection. For shure, I will stay for a while.

I have a tradition of the topic, while a thread is sleeping, some music always helps.

My link

JDfense
 

· Registered
Joined
·
49 Posts
I'm back again with a question. Possible a real stupid one. I began with stockrom for my batch2 crystal. First I wanted to root the room and copied the files and script files from Troy in the rom. I have only opened the rom with 7zip(tried it with winrar, too), not extracted for doing the changes, but I got always a status 7 failure, while I was flashing the rom. I have used stock recovery and TWRP - same result.
What did I miss?

JDfense
 

· Registered
Joined
·
49 Posts
Tried to fix it with changing the meta-inf, but
i have still error messages, but rom flashed complete. Parts of the script must fail.
JDfense

edit:
Now I got a rooted and deodexed stock rom with Meta-inf from TWRP.zip, but flashing works only with stock recovery so fare.
This evil permission stuff.
 

· Registered
Joined
·
49 Posts
Has someone an idea, why the signer for the amlogic roms does not work on winXP for me. I get a zero KB zip always, but on my win7 the same modded rom with the samer signer works perfect.


JDfense
 

· Registered
Joined
·
49 Posts
What errors are you getting? I have no idea why the scripts don't work in XP, I've been using Windows 7 for a pretty long time now. Are you using cygwin or the windows command prompt?
Both. But I thought for the signapk.jar I don't need any extra tools.Only the unsigned zip rom with the fitting name in the batch in the same folder. Then double click on the batch file. Waiting. Ready.

Only one error while signing. A signed.zip file with zero kilobyte and thats not funny.


JDfense

PS.: Forgot to mention, I have a batch2 crystal and my rom in progress based on 1119 stock rom.
 

· Registered
Joined
·
49 Posts
double clicking on the bat file doesn't work for me. I navigate to the folder with cygwin and type ./signerscript.bat
Hey thanks fuser, thats the trick for XP. With cygwin commandline signing works under xp for me. Now comes the next step, finding a working youtube...


JDfense
 

· Registered
Joined
·
49 Posts
Yes, that was my second thought - spare some time and take it from fuser-invents fine rom.
Now I have stock with root, init.d and youtube. Next step, the apps I like and lets get it faster over the services.jar.
And what about ubifs. Is it the best partition format for amlogic?

JDfense
 

· Registered
Joined
·
49 Posts
Hi fuser-invent,

I make some progress with my rom, but still not ready. Your work helps a lot to learn, how amlogic roms are built.
I found no kitchen for amlogic devices?
I tried to open the boot.img, but no success so fare. Last choice I will try your hint - the onda kitchen. I want to replace the ainol novo... writing and I think, I will find it in the boog.img or is it the logo.img in the stock, which I can't open too. Boot.img seems not to be a gzip file with a header, tried it to open in ubuntu.
The framework-res of the crystal JB is very large with about 12MB, maybe bad for the performance. For my other tablets, I have only about 6MB for the framework-res in JB.
Next thing are the maps.apk. Do we really need 4 versions for different dpi?
I needed some time to study the user-script(1109) difference between stock and yours, but I didn't find the cause for error with the twrp. Since I took your user-script, I had no problems to flash with twrp recovery, but why?
Copy and paste is not the real thing, but without understanding it is worse.


JDfense
 

· Registered
Joined
·
49 Posts
Thanks fuser-invent. I see you have in some points the same trouble.
I try it again with the boot.img and the 'magic' header. Yes, I have assumed that the bootlogo.rle will be in the boot.img. With the bootanimation I'm done.
I think, we have to careful with the framework-res or we end in a bootloop.
If I find out, how to repack boot.img, I let you know. Does Troy explain something about boot.img? For shure, he will know how to do the trick.


user-script from stock rom allways produces a status 7 errors.

JDfense
 

· Registered
Joined
·
49 Posts
Yes, I have a mediafire account. Here is the meta-inf from stock 1109 with rooting and no assert lines. After that I compared it with your user-script, but with any change, I always got the status 7 error. Finally I took your Meta-inf and all work fine with TWRP, but why is that?


http://www.mediafire.com/download.php?l2e6wtyp8burguc

Right now I take a look in that magic unpack script. It seems to be for the recovery, but boot.img has the same format, I assume. In rockship devices recovery.img and boot.img have the same format, too.

Yes framework will not brick my device, but it is one of the most important apks for the rom.
JDfense
 

· Registered
Joined
·
49 Posts
Hmm.. the problem may be the windows formatting ... use notepad++
haven't not tested with TWRP but #comments and empty lines are ok at least in stock updater-script.

That gzip thing is already removed in those unpack/repack scripts of Christian Troy, and those perl versions fix that wrong "Trailer!!!" problem.
(I think I saw similar sh scripts posted by somebody in Troy's TWRP thread...)
I have used always notepad++. Thats not the cause.
Could it be a different file format for user-script in stock, then in the cm10, which notepad++ ignores?

I try to find a repack solution for uImage in the evening. Maybe I find the trick for crystal, or we have to ask Troy.

JDfense
 

· Registered
Joined
·
49 Posts
Thanks cxz. I'll check the scripts out.
Don't know when it happens, the notepad++ saved in unixformat, but you are right it is windows txt.

JDfense
 

· 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]:~/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
·
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
 

· 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
·
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
 

· 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
·
49 Posts
Thats what I said to him before, but he likes it more to be a blogger.


I will use those tools, but right now, I have to update my Rockship device ROM.

JDfense
 
1 - 19 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