Android Tablets Forum banner

Rk29xx ImageTools V2.1

213K views 91 replies 50 participants last post by  hoangpuon 
#1 ·
This is a tool to pack/unpack RK2918 image file, which use by Teclast T760 , Cube U10GT, Yuandao N10

Usage:
1. Download the tool and unzip into a folder
2. copy the image file into this folder,and rename to wendal.img
3. double click Runme.bat ,and following the guide

Note:
1. Close your anti-virus software first!!
2. The tool may report that some file is skip. It is OK, 4 files in 2.0.3 official fireware ,and 2 files in official fireware. We had tested, those files just garbage.
3. Image file pack by this tool, when upgrade or restore by official upgrade tools, MAYBE report "Upgrade fail" or "Restore fail", Ignore it ,and reset T760, then power on.

This tools is under "Apache License 2.0", so you can modify it ,republish it as you want , BUT Pls keep my info, thank you.

This tools's source is host in https://github.com/wendal/teclast_tools

Download URL : https://docs.google.com/leaf?id=0B8hUXYDeoy_hNTc1YTVkYTMtNTNjZS00YjI2LTgyNDYtYjRjZjFmODdiZTQ1

Thanks,
Wendal Chen
 
See less See more
#2 · (Edited by Moderator)
This is a tool to pack/unpack RK2918 image file, which use by Teclast T760 , Cube U10GT, Yuandao N10

Usage:
1. Download the tool and unzip into a folder
2. copy the image file into this folder,and rename to wendal.img
3. double click Runme.bat ,and following the guide

Note:
1. Close your anti-virus software first!!
2. The tool may report that some file is skip. It is OK, 4 files in 2.0.3 official fireware ,and 2 files in official fireware. We had tested, those files just garbage.
3. Image file pack by this tool, when upgrade or restore by official upgrade tools, MAYBE report "Upgrade fail" or "Restore fail", Ignore it ,and reset T760, then power on.

This tools is under "Apache License 2.0", so you can modify it ,republish it as you want , BUT Pls keep my info, thank you.

This tools's source is host in https://github.com/w...l/teclast_tools

Download URL : https://docs.google....jRjZjFmODdiZTQ1

Thanks,
Wendal Chen
Thanks wendel, you have saved my job. +1 thank you.


One correction for Yuandao N10, it's window N10 as most foreigner recognition.
 
#89 ·
Hello Wendal
I downloaded the RK29xxImageTools_v2.1 hoping I could get into the image for a MA-107 running RK2918_ANDROID4.0.4-sdk

At start everything seemed fine, but it got into trouble when comming to cramfsck.

Here is the output from the execution:
Code:
<br />
RK29xx Image Pack/Unpack Tools<br />
Blog [URL=http://wendal]http://wendal[/URL].net<br />
Project: [URL=https://github]https://github[/URL].com/wendal/teclast_tools<br />
feedback: pad@wendal.net<br />
Pls input: 1-Unpack 2-Pack 3-Exit<br />
1<br />
Pls copy Image file into this folder,and rename to wendal.img<br />
Notify any errors!<br />
Press any key to continue . . .<br />
Reading file header...<br />
File header: RKFWf<br />
Read loader's offset<br />
Read loader's len<br />
Read update.img's offset<br />
Read update.img's len<br />
Output Loader<br />
offset(0x66) len(0x282DA)<br />
Output updata.img<br />
offset(0x28340) len(0x14C4E804)<br />
Unpack updata.img to Temp folder<br />
Check file... OK<br />
------- UNPACK ------<br />
package-file    0x00000800      0x0000021B<br />
RK29xxLoader(L)_V2.30.bin       0x00001000      0x000282DA<br />
parameter       0x00029800      0x00000258<br />
Image/misc.img  0x0002A000      0x0000C000<br />
Image/kernel.img        0x00036000      0x006F7030<br />
Image/boot.img  0x0072D800      0x000DD08E<br />
Image/recovery.img      0x0080B000      0x00974000<br />
Image/system.img        0x0117F000      0x13ACE800<br />
update-script   0x14C4D800      0x000003A5<br />
recover-script  0x14C4E000      0x0000010A<br />
Unpack firmware OK!<br />
------ OK ------<br />
Unpack system.img to system folder<br />
Cramfs 2 , Modify by Wendal Chen.<br />
My blog    [URL=http://wendal]http://wendal[/URL].net<br />
Sources    [URL=http://github]http://github[/URL].com/wendal/cramfs<br />
<br />
cramfsck: superblock magic not found<br />
Enable root permission<br />
The system cannot find the path specified.<br />
The system cannot find the path specified.<br />
chmod: cannot access `system/*': No such file or directory<br />
chmod: cannot access `system/bin/su': No such file or directory<br />
chmod: cannot access `system/app/Superuser.apk': No such file or directory<br />
Unpack -- All Done<br />
Pls input: 1-Unpack 2-Pack 3-Exit<br />
Can you identify what went wrong, and do you have a solution for it?

Any help is appreciated

Best regards
Per-Jarle
 
#3 ·
Glad to see you here in slatedroid Wendal, I'm using your tools since 1.1 and your kit that includes the partition modifier and boot extractor, made my own english version but never disclosed until I could get your approval (but my chinese is almost zero
)
 
#6 · (Edited by Moderator)
using the firmwaretool it extracts

boot.img
kernel.img
misc.img
recovery.img
system.img (system img is a cramfs filesystem)

boot.img and recovery.img are cpio initrd files encapsulated in a head and a footer...

contents of boot.img
bytes 0..3 KNRL (header)
bytes 4..7 size of initrd data (header)
bytes 8..# initrd data
bytes #+1..#+4 4bytes check code (footer)


Does anyone know how to calculate the footer value ?

filling own request:
rkcrc tool from https://sites.google.com/site/naobsd/android-tablet/apad-irobot seems to work.
 
#23 ·
using the firmwaretool it extracts

boot.img
kernel.img
misc.img
recovery.img
system.img (system img is a cramfs filesystem)

boot.img and recovery.img are cpio initrd files encapsulated in a head and a footer...

contents of boot.img
bytes 0..3 KNRL (header) (?KRNL) (removed ok)
bytes 4..7 size of initrd data (header) (removed ok)
bytes 8..# initrd data (?#)
bytes #+1..#+4 4bytes check code (footer) (?#+1..#+4)


Does anyone know how to calculate the footer value ?

filling own request:
rkcrc tool from https://sites.google.com/site/naobsd/android-tablet/apad-irobot seems to work.
Hi Aiah.

im am trying to make my own boot image.
could you give me some more info on how to remove the footer.
i removed the header files unpack ok.
but when i make no changes and re cpio and gzip the file and make image with rkcrc the files are not the same.
it is a little bit bigger.
i did change the header to KRNL.
its the remove footer that did not do.dont understand how to.

fview 7" pro rooted
 
#8 · (Edited by Moderator)
Note in advance, i'm not using a teclast brand tablet but an fview 7" (also rk29xx based)
- the wendal firmware firmware tools for splitting / rejoining / changeing system.img worked

Before i was going to change the boot.img i wanted to known if recreating an idendical boot.img was possible.
what i did to check was:
- strip header and footer from boot.img, that gave me a gzipped initrd file
- exstract the the initrd (with was a cpio)
- change nothing
- build a new initrd (with cpio and gzip)
- use rkcrc -p to recreate boot.img
with a small change to rkcrc (changing the header from PART to KNRL)
The new boot.img and the original boot.img are idendical

I made some trivial changes to the root fs (boot.img) and to system/etc (system.img)
and rebuilt het into a firmwware image (using wendal rk2918 tools and rkcrc).
The customised firmware and booted successfull
 
#9 ·
I tried to unpack a P71 rom i found somewhere on the www.teclast.com bbs board. [teclast-P71-V2.08-026F.rar]

Your tools unpack the firmware.img
but fails to extract the system.img cramfs [cramfsck: bad root offset (0)]
The file header does look like a valid cramfs

Any idea's. on how to unpack (and repack) this cramfs type ?
 
#17 ·
NO, The tool itself cant

Reason:
The wendal tools themself only split the firmware, then add root access to system.img, and repacks the parts into a new firmware file.

To make /system writeble you will have to do a lot of manual modifying

(incompleete list)
- unpack the system.img (witch is a cramfs filesystem)
- check what other filesystem are supported by your kernel
p.s. the fview-7"pro tablet only has ext3 and yaff2 and cramfs
- create a dummy file of about 200Mb using dd (call system.img)
- create a ext3 filesystem on that system.img and mount it
- copy all the files from the unpacked cramfs to the ext3 filesystem
- unmount the system.img it
- then you have to extract boot.img (its a gziped cpio with an additional header and crcsum footer)
- change the init.rc to use ext3 instead of cramfs for the system.img partition
- rebuilt the boot.img (using rkcrc tools)

P.S. any small mistake in modifying init.rc icw ext3 system.img will have your system faling to boot
rebuild the total into a firmware.

I managed to do it, but went back to cramfs
- the ext3 fs is rather slow
- any system crashes or incorrect powerdowns (like out of power) make the ext3 fs unreadable, init.rc doe not have any fsck to fix errors.
- overall ext3 usage seems rather unstable (p.s. this might be because i did it wrong)
 
#12 ·
Unfortunatelly, the ro of the system partition is because the file system used by rockchip (cramfs), that is a compressed read only file system.

With the wendal tools you can open and modify the system files in a PC and then flash the rom to the t760.
 
#14 · (Edited by Moderator)
Unfortunatelly, the ro of the system partition is because the file system used by rockchip (cramfs), that is a compressed read only file system.
Forget my last statement, our good friend Wendal made it again and figured out how to get system rw by loading it in data partition. There are still some bugs and requires a little more steps than just flashing but now is possible
 
#13 ·
Thanks Aino.

Can I use this tool to remove system apps before repacking it?

After using the tool to make a rooted ROM, will root work on third-party apps I install from Market eg. a simple app like clocksync that requires root to adjust the system time, or minfreemanager that changes the system settings of free RAM levels?
 
#16 ·
I'm having a problem with using the upgrade which I am sure is down to my inexperience. I can download the upgrade tool and the image file OK. Then you say "unzip into a folder" Where is this folder to be located? On my PC or on the T760? Does it have to be in a special location? I've tried a number of options and none of them work. I can run the .bat file and I choose option 1 to unpack. All of this works but at the end of the it I get presented with options 1 unpack, 2 pack, 3 exit. I choose 3 exit but this leaves the files unpacked and nothing on changed on the T760. I know that I'm doing something stupid, but don't know what it is. I've looked around for instructions on using Wendal's tool but I cannot find anything that helps
Thanks
joalt
 
#18 ·
This is a tool to pack/unpack RK2918 image file, which use by Teclast T760 , Cube U10GT, Yuandao N10
Thank you! A note to possible other Linux users - I succesfully used the unpack function on a Linux system (Ubuntu 11.04) by changing

os.execute('AFPTool.exe -unpack update.img Temp\\')

to

os.execute('wine AFPTool.exe -unpack update.img Temp\\')

(and commenting out the cramfs extraction stuff, as I can just loop mount the system.img if I want to look at it)

Probably only rk29xx_rom_tools.lua, BYTE.lua and AFPTools.exe are needed for Linux (and rk29xx* could be simplified), the rest appears to be pretty much just glue to get lua & cramfs stuff & unix-like stuff like chmod to Windows.

I didn't try image creation yet.
 
#19 ·
Hi,

I wonder after extracting the system.img into the temp folder, is it possible to embed ChainFire3d into it and then pack it up so that the firmware will have ChainFire3d build-in. For my understanding, normally, it is not possible to install ChainFire3D for RK2918 tablet because it requires writing to the system folder, so I'm hoping there is a way get around the limitation.

Currently, I'm using U10GT.

Thanks,
Lomui
 
#21 ·
Hi!

I don't know if I am off topic, but I've just purchased an android tv box based on rockchip 2918(R-box says the model). Anyway I have found nothing about this box, no upgrade instructions no firmware updates or download. Is there any option to somehow "extract" the current firmware image from the device and open it with this tool? It is my first android device so excuse my ignorance...
 
#39 ·
Hi Mr.Wendal, please help us to solve this prob. I got same problem, [cramfsck: bad root offset (0)] in system.img unpacking. I've successfully unpack update.img using AFPTool.exe. But I can't unpack the system.img, I've tried using rkDecrypt.exe, but it says no crypted file. so what am I gonna do now?
 
#43 ·
I am also having this same problem trying to extra the system.img from a RAMOS W3HD.

Thanks in advance if you can offer any help.

-Roman
 
#48 ·
wendal,

did you try to modify boot.img/recovery.img in update.img built by SDK2.x?

I'm trying with Yuandao/Window N50DT 11/03 ROM. structure of boot.img is same as standard android boot.img (kernel + ramdisk.cpio.gz). it can be unpacked/repacked with unpackbootimg and mkbootimg, but I noticed 20bytes SHA hash in header is different even if I just unpack/repack with same parameters


if I flash repacked boot.img, I always get recovery mode. it seems bootloader checks SHA hash (like rockchip's CRC used for old cramfs images) and it treats boot.img is broken.

do you have any idea?
 
#51 ·
I'm trying with Yuandao/Window N50DT 11/03 ROM. structure of boot.img is same as standard android boot.img (kernel + ramdisk.cpio.gz). it can be unpacked/repacked with unpackbootimg and mkbootimg, but I noticed 20bytes SHA hash in header is different even if I just unpack/repack with same parameters


if I flash repacked boot.img, I always get recovery mode. it seems bootloader checks SHA hash (like rockchip's CRC used for old cramfs images) and it treats boot.img is broken.
there is workaround. new bootloader still support old kernel.img and ramdisk only boot.img. unpack new boot.img and make kernel.img/boot.img with rkcrc -k, works for me.
 
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