yashsingh1/xdaforums huggingface dataset:
[Upgrading, Modifying and Unlocking] egtavares:
Can't pack back

I have the following situation:

1- I have boot.img from a RK3026 ~16.7 MB

2-Run: "imgRePackerRK /2nd boot.img"

3-Output: boot.img.cfg (14 B) and boot.img.unkrnl (~1.1 MB)

4-Run: "imgRePackerRK /2nd boot.img.unkrnl", the output is "boot.img.unkrnl.dump" folder with all files in it (GREAT!) and "boot.img.unkrnl.cfg"

The thing is: I'm not sure how to pack everything back again. I tried, like indicated before in this forum:

5-Run: "imgRePackrRK /2nd boot.img.unkrnl.cfg", output is a new "boot.img.unkrnl" with ~1.1 MB

6-Run: "imgRePackrRK /2nd boot.img.cfg", output is a new "boot.img" with ~1.1 MB (!)

The original was 16 MB. After unpacking and repacking without changing anything it ends up with 1.1 MB. Is that correct? What am I missing here?

Thanks in advance for any help.
[Upgrading, Modifying and Unlocking] ontherocks62:
You always use the *.dump folder to repack.

The general procedure is as follows:

Unpack always creates *.dump folders.

Then you make changes to the files or replace the files inside the *.dump folders.

When you want to repack, you run the command "imgRePackrRK *.dump"
[Upgrading, Modifying and Unlocking] egtavares:
That's the thing, it doesn't create a .dump, it creates a .cfg and a .unkrnl as I said before. When I unpack the .unkrnl then it creates a .dump, but if I try to repack the .dump it shows an error stating there's no packing file. This issue was treated before here and the pointed solution was to repack using the .cfg file. That works, but the sizes don't match, hence my question.
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Please provide link to this boot.img
[Upgrading, Modifying and Unlocking] egtavares:
I'm still not able to post links, but here is it in text (remove spaces and replace DOT for ".":

https: // wwwDOTdropboxDOTcom /s/ oxgmce3zi8jrji4 /boot.img?dl=0
[Upgrading, Modifying and Unlocking] ontherocks62:
I am facing a problem with repacking.

I have a stock ROM. I unpack it with imgRePackerRK and then replace resource.img and kernel.img and then repack the complete ROM using imgRePackerRK. Now, if I install this repacked ROM, my device either doesn't boot properly or after booting doesn't work correctly.

On the other hand, if I install the stock ROM and then use Android Tool v2.35 to replace the same resource.img and kernel.img, things work correctly.

What am I doing wrong?
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Yes, all is correct.

Original boot.img has size 16 777 216, but in header we can see size 0x0011ca4d (1 165 901). I can to assume some trash after end of real boot.img (may be alignment to 16MB)
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
I need all links
[Upgrading, Modifying and Unlocking] ontherocks62:
Link to Stock ROM - https://mega.nz/#!rQoB2aaR!-wd2nEVOOSm5O4fvwDq58k1fNtIFReQsDYFMWC4FAQA

Link to Kernel & Resource that need to be replaced in the above Stock ROM - http://www.mediafire.com/download/tlrbr8l53f9bns6/Kernel_Resource.7z
[Upgrading, Modifying and Unlocking] kcxda1:
unknown file format

hello, i own inkbook classic ereader (bouye e61h clone) i've tried to use this tool but it failed to extract files. (unkrnl phase worked though). here is the link to the example archive: https:// transfer.sh/VjrH5/recovery.img
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Yes, this is really unknown format (for me)
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
I can't download stock ROM
[Upgrading, Modifying and Unlocking] kcxda1:
any chance/plans to get it supported?
[Upgrading, Modifying and Unlocking] ckom26:
[MENTION=4582467]RedScorpioXDA[/MENTION]

I've got the boot.img from the latest Nexbox Z68 firmware (RK3368). I can unpack the image with imgrepackerrk 1.05 but I can't re-pack the *.dump directory, because the tool can't open *.dump/package-file for reading, please see the attached logs. Here's the boot.img for your reference (5.7 MB). Thanks in advance and keep up the good work.
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
don't plan yet
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Please use

imgRePackerRK.exe latest-z68-boot.img.cfg

command
[Upgrading, Modifying and Unlocking] ckom26:
THANKS! That did the trick and, by the way, your tool is the only one I've found so far that can repack working boot images for RK3368. All other tools I've tried (linux only) result in unbootable or fallback-to-recovery situations. Thanks again.
[Upgrading, Modifying and Unlocking] ontherocks62:
What is the error that you receive?

If it says that you have exceed the quota after downloading for a while, then just create a free account, login and re-download. A free account gives you 50GB of downloading free.

Use "Download through your browser" option.
[Upgrading, Modifying and Unlocking] andikas:
Unsupported chipID ????

what does it mean ?
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
:D - Unsupported chipID

Please try to use /cid option
[Upgrading, Modifying and Unlocking] ontherocks62:
[MENTION=4582467]RedScorpioXDA[/MENTION] Were you able to download the stock ROM? If not, do you want me to provide alternate links?
[Upgrading, Modifying and Unlocking] KoTiX2:
Hi, I'm having a problem repacking the ramdisk of an rk3188 image because one file in sbin has permission set to "6755"

The tool cannot handle 6755 but only 755 (it took me all night to find it out).

Is there a way to fix it?

[MENTION=4582467]RedScorpioXDA[/MENTION] can you please help me on this?

Tnx in advance ;)
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Please provide alternate links
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Please provide link to this image
[Upgrading, Modifying and Unlocking] KoTiX2:
Here it is:

https://www.dropbox.com/s/6jqc5a4bborc3zj/boot.rar?dl=0

Tnx in advance for your help ;)
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
New test version http://ge.tt/3xVYbBf2
[Upgrading, Modifying and Unlocking] KoTiX2:
Tnx I'll let you know how it goes ;)
[Upgrading, Modifying and Unlocking] jockyw2001:
I would like to unpack a kernel.img and a boot.img which are extracted from a mk808b custom firmware package. When I run your tool on those files a kernel.img.unkrnl and boot.img.unkrnl are produced, but these files are the same as the input .img files, except the first 8 bytes KRNL bytes and the last 4 bytes (I suppose a CRC) are stripped. Is there any option to unpack/decompress these files any further? In particular I am curious what's inside the boot.img.unkrnl

Thanks for your efforts!

[EDIT] just found the answer ... need to run your tool a 2nd time on boot.img.unkrnl :)
[Upgrading, Modifying and Unlocking] Lurker0:
I'm modifying firmware for iBasso DX80, an audio player. Stripped down Android 5.1.1, RK3128, the boot.img contains the second layer. The problem is that I can do nothing with the boot.img. Even if I unpack it and then pack again, without modifications, with the resulting firmware the device boots into the recovery. No problems to make changes into the system.img though. I tried to download the test version (1.06a) from the link above, but it does not allow me to download it - just does nothing when I click any of "Download" link on the page.

Any idea on what is so specific with this particular device/firmware?

An example fo the firmware image is here: http://ibasso.com/uploadfiles/download/DX80FW_V1.5.8_aug24th_2016.rar

---------- Post added at 07:02 PM ---------- Previous post was at 06:26 PM ----------

By the way, just found a bug in 1.05! My second.dump (from the firmware in the previous post) contains subdirectories. Your tool (Windows) writes second.cfg with DOS-style pathes, e.g. "images\charge1_4.bmp", and then creates "second" binary image with same style file names in it!

If I change \ to / in the second.cfg manually, the resulting "second" is correct. But it does not solve my problem :(
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
This image contains unsupported formats of files (вообще не понимаю, как моя утилита могла до конца распаковать эту прошивку - я не смог).

This is not a bug

PS. I think we can continue discuss on 4pda forum
[Upgrading, Modifying and Unlocking] chudyvf:
wavetablet.com/wave8hd-lollipop/resources/firmwareupdates

inconsistent boot.img RamdiskSize,

works if around 0x0012645d 0x0012645c

failed to boot when:

RamdiskSize = 0x001262e9

RamdiskSize = 0x001262e7

RamdiskSize = 0x0012645c
[Upgrading, Modifying and Unlocking] Lurker0:
Looks like you've faced a problem similar to mine: ramdisk size should be divisible by 4. I just pad the image with zero bytes, and it works.
[Upgrading, Modifying and Unlocking] KoTiX2:
I can confirm that this new 1.06a version has fixed my problem with 4 digits permissions.

BTW i encountered another problem that if I add a file to the sbin folder in ramdisk, i have to manually edit the ramdisk.cfg to let it repack it correctly. Otherwise the file is not repacked.

Is it suposed to work like this? No recursive control?

Tnx in advance ;)
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
What the question?

PS.
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
So conceived. Otherwise you will not be able to assign Unix files properties in Windows

What you mean?
[Upgrading, Modifying and Unlocking] chudyvf:
Don't know how to add ramdisk size, so I just add some comments in file until it matches divisible by 4. thanks
[Upgrading, Modifying and Unlocking] KoTiX2:
I just mean if the app look for subfolders recursively and automatically add them to cfg, but yo ualready answered me ;)
[Upgrading, Modifying and Unlocking] Alex Morhun:
Did somebody kernel modification and repack with freaktab rk Kitchen?
[Upgrading, Modifying and Unlocking] karelkopp:
Hello please its there any chance to dump images from rk3128 i need only boot.img to extract becasue i need to edit init.rc file

and i dont have usb for usb flashing i have this in android tv box
[Upgrading, Modifying and Unlocking] Alex Morhun:
switch device to bootloader mode and use rkflashtool to dump boot partition.
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
You can use rkDumper
[Upgrading, Modifying and Unlocking] Alex0826:
How do I get this connected/detected to a computer???

Hello, I have downloaded the latest firmware (that I know of) from geekbuying but the instructions are garbage. Can someone please elaborate further, thank you...
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
I don't understand your question
[Upgrading, Modifying and Unlocking] beatriz_araujo:
Hi. I'm getting this error while trying to repack an sdupdate.img file, from a RK3188:

==========================[ START ]==========================

--- Firmware creating ---

- "package-file" configuration file reading -

"package-file" was read

- "parameter" configuration file reading -

Begin of partition "system" don't matched end of partition "system"

Begin of partition "system" don't matched end of partition "system"

Begin of partition "user" don't matched end of partition "system"

"parameter" was read

- "image.cfg" configuration file reading -

image.cfg was read

- Files checking -

package-file (package-file)	checked

bootloader (RK3188Loader_uboot.bin)	checked

parameter (parameter)	checked (file size = 0x000002e8, partition size = 0x00400000)

misc (Image/misc.img)	checked (file size = 0x0000c000, partition size = 0x00400000)

kernel (Image/kernel.img)	checked (file size = 0x00a69030, partition size = 0x01000000)

boot (Image/boot.img)	checked (file size = 0x00cdc000, partition size = 0x01000000)

recovery (Image/recovery.img)	checked (file size = 0x00fd0000, partition size = 0x02000000)

ubootlogo (logo.bmp)	checked (file size = 0x0012c048, partition size = 0x00400000)

system (Image/system.img)	File "sdupdate.img.dump/Image/system.img" bigger than partition size (0x2331f000 > 0x012c0000). Check "parameter" file

==========================[ STOP ]==========================

Even just unpacking and repacking without any mod i get this error.

Link for the Image: https:// dl. dropboxusercontent. com/ u/ 41605513/ sdupdate.img (without the whitespaces)

Thanks a lot,
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
This is due to the incorrect description of breakdown of partitions in the file parameters

2017.02.01 14:06:02	.DEBUG.	Partition description found = "0x00002000@0x00002000(misc)"

2017.02.01 14:06:02	.DEBUG.	Partition description found = "0x00008000@0x00004000(kernel)"

2017.02.01 14:06:02	.DEBUG.	Partition description found = "0x00008000@0x0000C000(boot)"

2017.02.01 14:06:02	.DEBUG.	Partition description found = "0x00010000@0x00014000(recovery)"

2017.02.01 14:06:02	.DEBUG.	Partition description found = "0x00020000@0x00024000(backup)"

2017.02.01 14:06:02	.DEBUG.	Partition description found = "0x00040000@0x00044000(cache)"

2017.02.01 14:06:02	.DEBUG.	Partition description found = "0x00400000@0x00084000(userdata)"

2017.02.01 14:06:02	.DEBUG.	Partition description found = "0x00002000@0x00484000(metadata)"

2017.02.01 14:06:02	.DEBUG.	Partition description found = "0x00002000@0x00486000(kpanic)"

2017.02.01 14:06:02	.DEBUG.	Partition description found = "0x00002000@0x00488000(ubootlogo)"

2017.02.01 14:06:02	.DEBUG.	Partition description found = "0x00140000@0x0048A000(system)"

2017.02.01 14:06:02	.DEBUG.	Partition description found = "0x000064000@0x005CA000(wincacfg)"

2017.02.01 14:06:02	.DEBUG.	Partition description found = "0x000096000@0x0062E000(preinstall)"

2017.02.01 14:06:02	.DEBUG.	Partition description found = "-@0x006C4000(user)"

Correction will be implemented in the next version of util
[Upgrading, Modifying and Unlocking] beatriz_araujo:
Thanks. =)

I have tried with the previous version (1.0.4) and it worked with this image. :D
[Upgrading, Modifying and Unlocking] onedumslack:
Do you have this test version available for linux as well? The zip only contained the windows exe.
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Not yet
[Upgrading, Modifying and Unlocking] baibaii:
Need help about repack procedure (first time user of this tool)

Successfully unpacked a two layers boot.img and edited the files created in the ./boot.img.unkrnl.dump folder.

Questions:

1) the repack is on one or two steps ?

2) if two, which files/options are involved on each step?
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
If you have

1) 2 steps

2)

imgRePackerRK.exe boot.img.unkrnl.cfg

imgRePackerRK.exe boot.img.cfg
[Upgrading, Modifying and Unlocking] leonkernan:
I've picked up one of the car headunits that have a firmware in this thread and would like to be able to work on the update image. It's powered by an RK3368.

I can pull apart the image by telling the app to ignore the ChipID but the file that is recreated from the dump is around 10kb smaller than the original.

This is with version 1.05, I was going to try the newer one but the links above are dead.

"RKFW" image file detected

Batch image header from "update.img" was read
Image properties:
Type RockChip batch image (RKFW)
Version 6.0.0
Date 2017.03.24
Time 22:15:29
ChipID 0x33333041
Code(?) 0x01060000

-- boot.img processing --

-- update.img processing --
Update data header from "update.img" was read
Image properties:
Type RockChip update image (RKAF)
Id " 007"
Model "px5"
Manufacturer " RK3368"
Version 6.0.0
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Dear leonkernan

Please provide the exact link to the firmware
[Upgrading, Modifying and Unlocking] leonkernan:
Sorry:

https://www.sendspace.com/pro/dl/jpnu9k
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Please try test version

http://ge.tt/46h0Umj2
[Upgrading, Modifying and Unlocking] leonkernan:
Thanks, I just did a quick test and it's worked fine.

Unpacked, mounted the system.img, modified build.prop to change the DPI and repacked update.img.dump

The file flashed successfully and the new DPI is on the unit.
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Victory Day celebrations

imgRePackerRK

RockChip's firmware images (*.img) unpacker/packer

New version (1.06 Windows & Linux) ready

+ added support of RockChip uboot format;

+ added DirtyBlk method;

+ added support of old RKFW format;

+ added support of RK???? (ChipID=0x00000021);

+ added support of RK33xx (ChipID=0x00000041);

+ check/skip BOM;

+ added OS detection;

+ added key /rmd4;

~ improved the algorithm of bcpath and lname reading;

~ minor improvements.
[Upgrading, Modifying and Unlocking] Magendanz:
I’m a FreakTab custom ROM developer, trying to put together an Android TV build for the Z28 and the Mini A5X Plus, which are based on RK3328 reference boards.

Using imgRePackerRK v1.06, I’ve been able to swap out other recoveries for the stock recovery image, provided they’re still Android boot images (bootimg.cfg, zImage, initrd.img…basically what abootimg expects). Unfortunately, the best version of TWRP I have is a RockChip KRNL signed file, not an Android boot image. If I change the package type in the image.cfg for this partition from type=04 to type=11, I’m able to repack and flash the result. The box will then boot directly to TWRP, but the OS partitions (system, boot, etc) are corrupted.

Any suggestions on how I can change this partition type without messing up the others?
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
I don't understand what and how you are doing. This is really a problem of the utility? Please provide the logs of the operation of the packer + links to firmware.
[Upgrading, Modifying and Unlocking] Magendanz:
Well, I now believe the problem is more likely with this particular Rockchip bootloader and both versions of TWRP that I tried.

I jumped to the conclusion that the OS partitions (system, boot, etc) were corrupted after flashing the repacked firmware, having it boot directly to recovery, and receiving a "No OS installed! Are you sure you want to reboot?" message from TWRP when trying to reboot to System. Apparently, this bootloader relies on recovery to wipe the user and cache partitions if they're not already formatted (which is a stupid design, creating a single point of failure if the recovery partition gets corrupted). In my case, both TWRP versions I was trying had bad fstabs, so they weren't seeing the other partitions...hence its belief that no OS was installed.

Using AndroidTool v2.1, I was able to write the TWRP image directly to the recovery partition without wiping the user and cache partitions, and in that case the device would continue to boot to the system partition. From there, if I did a factory wipe in Settings, I got into the old TWRP boot loop where I could no longer return to the system partition.

So, I apologize for the misdiagnosis. If I can find a TWRP build that works on this RK3328 device, I should be back in business building Android TV 7.1 for Rockchip.
[Upgrading, Modifying and Unlocking] TkMelter:
Thanks!!!

Great tool !!.

Thanks for your work. The linux version is for 32bits. I tried it in Debian testing amd64 but didn't work. I added support for 32bits and finally works.
[Upgrading, Modifying and Unlocking] supernielsen:
I have this Zaaptv HD509N

Would it be possible with this tool to repack this and make it use another launcher?

This zaap tv goes directly into their software, and unless you pay them money the box is useless. I have three of those and i want to be able to use it as i normal android box.

It have the rockchip 3066 :)
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
This tool to unpack/pack FW. You can unpack->change all you want->pack back
[Upgrading, Modifying and Unlocking] Vijendrasujay:
Double clicking on imgRePackerRK.exe gives me nothing. How to use this tool? Any help would be appreciated
[Upgrading, Modifying and Unlocking] osm0sis:
I'd like to add support for Rockchip KRNL format to my Android Image Kitchen, are there any open sources for tools to unpack/repack them available? I need to cross-compile for Linux, Linux x64, all NDK arches, and Windows.
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
What you mean?

KRNL it is only signing
[Upgrading, Modifying and Unlocking] osm0sis:
Sorry, I mean unsign and re-sign. Any open sources for that?
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
It's very simple

Structure of file

1. Sign ("KRNL" or "PARM")

2. File size (4 bytes)

3. File ("size" bytes)

4. RockChipCRC/rkCRC (4 bytes)

Example of rkCRC
[Upgrading, Modifying and Unlocking] osm0sis:
Sounds easy enough; I'll take a stab at it (and check out rk-tools first). What's PARM signify? Thanks for the help!
[Upgrading, Modifying and Unlocking] reginamaat:
help me please!

Hello guys am new here, am regina. :crying:I have a deserve 1008c tablet I rooted n changed the font.

I restarted it and I won't boot past the android screen.

I couldn't find the download for the firmware.

Fortunately I have 4 of the tablet (same deserve brand) 2 bricked from the rooting one with display issues n 1 perfect. I found ur thread interesting n tried to backup the working ones firmware to flash the 2 bricked ones.

The problem is I have succesfuly done the android tool part n got the partitions/ individual.IMG files but I can't put it all into a single .IMG file becos the imgrepacker rk won't run, it just opens for a second and closes. Help, I need u guys.

Email me on desmondgyan2@gmail.com/ WhatsApp +233247079562.
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
It is sign of parameter file
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
You have 2 ways

1. Use rkAndroidTool to upgrade tablet

2. Unpack original FW by imgRePackerRK to and modify with obtained multy-images and pack back (to dumping you can use rkDumper)
[Upgrading, Modifying and Unlocking] reginamaat:
This I what I have from parameter IMG exported file I renamed to .txt

PARM[ FIRMWARE_VER:4.0.4

MACHINE_MODEL:rk30sdk

MACHINE_ID:007

MANUFACTURER:RK30SDK

MAGIC: 0x5041524B

ATAG: 0x60000800

MACHINE: 3066

CHECK_MASK: 0x80

KERNEL_IMG: 0x60408000

#RECOVER_KEY: 1,1,0,20,0

CMDLINE: console=ttyFIQ0 androidboot.console=ttyFIQ0 init=/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:

0x00002000@0x00002000(misc),

0x00004000@0x00004000(kernel),

0x00008000@0x00008000(boot),

0x00008000@0x00010000(recovery),

0x00100000@0x00018000(backup),

0x0003a000@0x00118000(cache),

0x00200000@0x00152000(userdata),

0x00002000@0x00352000(kpanic),

0x00200000@0x00354000(system),-@0x00554000(user)

À‰¤

---------- Post added at 08:01 AM ---------- Previous post was at 07:57 AM ----------

Sweety, I can't get imgrepackrk to launch or run.

Do I use command prompt or something else? Double click doesn't work.
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
Use command

imgRePackerRK /help in cmd mode
[Upgrading, Modifying and Unlocking] reginamaat:
Thank a lot dear
[Upgrading, Modifying and Unlocking] Lysdexiaa:
I'm having the same trouble right now, have you found how to make this work?

---------- Post added at 07:10 AM ---------- Previous post was at 06:27 AM ----------

Hi, now that I've managed to run the .exe using command line, I'm having trouble to unrepack the system.img it says that "ext4 is not supported" or something in that thought. Can anyone help me with this? I just want to update an .apk file in system then I will repack again the disk image. Thanks!
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
This tool is not designed for file systems repacking. You can mount this file in linux (or use win-apps) for edition.
[Upgrading, Modifying and Unlocking] Lysdexiaa:
Hi, I've managed to mount the system file using linux. Now, when repacking the whole fw then flash it onto my device, It's stucked on boot screen. What could be the cause to this? The change I did on system is delete a sole .apk file (test purpose)
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
I don't know - this is not a matter imgrepackerrk
[Upgrading, Modifying and Unlocking] Lysdexiaa:
btw, after I dump, the folder still there. Is this normal or I'm doing something wrong?
[Upgrading, Modifying and Unlocking] RedScorpioXDA:
I don't understand. What was the procedure?