Jump to content
IGNORED

Unpacking and Repacking Update Img Files


Recommended Posts

Hello...

I am on a mission to learn how to unpack and repack Atari Flashback X Normal/Deluxe Firmware files so everyone can have an updated console.

Not only will this benefit me, but everyone who wishes to do the same thing.

 

I used the 0.1.5 update img downloaded from the official source and renamed it atari_update.img as their tutorial states.

 

I unpacked the atari_update.img file to to a atari_update.dump folder using imgRepackerRk.

Extraction Log Dump:atari_update.img.log

 

But when I try to repack the atari_update.dump folder using the same app, it seems to build the atari_update.img file fine, but it refuses to load into AndroidTools. (Obviously this is how I know it is not right)

Packing Log Dump: atari_update.img.dump.log

 

That I believe is where I am stuck at. 

 

Useful things I need to, or should know:

  1. Do I use windows or Linux?
  2. What app to use?
  3. What is the step by step process?
  4. Is my dump correct to begin with?
  5. what is the correct file structure of the atari_update.img?
  6. What kind of img is this? Cramfs, ext4, etc...
  7. What are the correct files I need? package-file, parameter, etc...
  8. Am I even on the right path?

 

Any help or contributions to this endeavor will greatly be appreciated and will possibly help many! ?

 

 

Edited by MrFister
Link to comment
Share on other sites

Study these links:

custom firmware for sega flashback 2018 | GBAtemp.net - The Independent Video Game Community
Custom Firmware for Atgames Legends Flashback with support for Arcade games | GBAtemp.net - The Independent Video Game Community

 

More info:

...use a tool called "ImgRePackerRk", you can find it in xda-developers. This tool will allow you to decompress the img file and see the contents so you can rebuild the update file. After that you will need to use mksquashfs (in Linux) to recreate the .img file.

 

 

 

 

  • Like 1
Link to comment
Share on other sites

5 hours ago, Draxxon said:

Study these links:

custom firmware for sega flashback 2018 | GBAtemp.net - The Independent Video Game Community
Custom Firmware for Atgames Legends Flashback with support for Arcade games | GBAtemp.net - The Independent Video Game Community

 

More info:

...use a tool called "ImgRePackerRk", you can find it in xda-developers. This tool will allow you to decompress the img file and see the contents so you can rebuild the update file. After that you will need to use mksquashfs (in Linux) to recreate the .img file.

So I was reading up a bit in those threads you provided and I have a couple questions...

  1. If I don't alter anything in the update file after I unpack it, Do I still need to use mksquashfs to repack?
  2. How do I know what partitions I have to use mksquashfs on?
  3. I have a Windows build mksquashfs, Is it compatible with what this?

Basically it is the mksquashfs I am confused on.

Link to comment
Share on other sites

1. I have no clue. Complete guess would be yes, why would it matter if something was changed or not?

2. I have no clue. I dont understand the question. You unpack it (i use .7zip btw) and find basically the /rom folder and/or the emulator folder on old firmare, and a cluster f of crazy files on the newer firmwares. then edit the files, hex edit, notepad edit, rename switcheroos, idk and then repack it.

3. I have no clue.

Sorry im so clueless. Basically I never figured it out. those were the places ive seen it talked about, and when i asked someone in PM, that more info bit was the response i got. it makes a little sense now, it made no sense then to me and its all over my head anyways. I tapped out when i saw you needed linux to repack it. its not that i couldnt set linux up on a machine, but i wouldnt even know what to do after that. So when it comes to the MK Squash (AKA Arcane Linux Tools), I never even got that far. I'm just the art guy. I never understood why "IMGREPACKER" couldnt just repack the GD image. lol.

You can also check here, no promises:

Sega flashback 2018 Firmware for playing games off the sd card - AtGames Flashback and Portable Consoles - AtariAge Forums
Release: Custom Firmware for the Super-Retrocade | GBAtemp.net - The Independent Video Game Community

Genesis Flashback HD (2018) Game Manager | GBAtemp.net - The Independent Video Game Community

I dont know how accurate this is, but, it appears to me that Gaster did it on the Super Retro Cade and the Genesis FBHD. Not sure where the info/idea came from before that. Maybe older.
Next rrifonas AKA rmr_md (we call him Mr. MegaDrive at our house, lmmfao) took gasters SFB hack over to the LFB2018 and LFB2019(unreleased). Brad took the idea over to the AFB9 and added the control files for adding box art games, rrifonas took that addition and implemented it on the LFBs. Meanwhile Sega FB got a different type of game manager made for it. never really looked into it as i became proficient with tools making setups, but, im rambling now. Next I bugged brad via PM for an AFBX CFW and he obliged. There is no step by step guide out there on how to do it, or i would have followed the steps and figured it out. i would never be able to do it blindly as a linux noob.

The thing to keep in mind when looking for clues on how to do this is that all these devices are basically the same thing, and the CFW is the same hack approach. to my knowledge. again, im never an expert. this is just how it seems to me, i may have some of the history incorrect.

So, thats it. 3 people figured it out. I also wanted to, but it was really just beyond my skills and i didnt want to bug those nice guys to death in PM to help me. I learned a lot from them, and a lot on my own. maybe they might show up and help... maybe not.

Edited by Draxxon
  • Like 1
Link to comment
Share on other sites

I know you are just the art guy lol ?

Seriously though you are more than that..

I installed Nexus and was blown away by it. Looking at the files and what has become of them looks just as hard to learn as trying to make an update.img. Good Stuff!

 

It's no biggy you really don't know much about that and can't help, I started this thread so anybody can chime in, and hopefully many do.

And by the end of it, it will be all archived in this thread for the masses!

It's like a never ending rabbit hole.  The further I get, the more I have to learn about.  Like taking one step forward, and two steps back!

 

I will keep stabbing at it and hopefully I get lucky soon.

I am also supposed to be receiving a 0.1.7 dump later this week.  So I want to make a updated cfw 0.1.7.  It's more of a "OCD" thing!

 

Link to comment
Share on other sites

the new setup really isnt that hard, just a tad complicated because of all the cloned folders and gotos, but, once I get it set up it will be easy to add and subtract stuff.
thankfully messing with MUGEN all those years really taught me how to plug stuff in properly. The trick to setting it up is start from the top menu down. get everything how you want before you move on to a new section, because if you change something, youll have to go back and change every cloned instance of it. time consuming.

As far as your CFW project, I'm guessing that you have to repack it using linux, not windows? maybe thats the issue???

Edited by Draxxon
Link to comment
Share on other sites

Today I succeeded in repacking Brad's AFBXD CFW 0.1.5 atari_update.img file.

I also succeeded in repacking v0.1.5 official firmware with Brad's hack and a theme.

Wonder what else can be packed?  

 

Now let's have some fun!

 

*** BONUS ***

I couldn't get the tools to compile in linux, so I stumbled upon another method completely done in Windows! ?

I plan on eventually writing a tutorial and leaving it here....

Thanks @Brad_from_the_80s for the info,  and @Draxxon for everything else!

 

Edited by MrFister
  • Like 1
  • Thanks 2
Link to comment
Share on other sites

  • 1 month later...
On 2/24/2021 at 11:00 AM, MrFister said:

Today I succeeded in repacking Brad's AFBXD CFW 0.1.5 atari_update.img file.

I also succeeded in repacking v0.1.5 official firmware with Brad's hack and a theme.

Wonder what else can be packed?  

 

Now let's have some fun!

 

*** BONUS ***

I couldn't get the tools to compile in linux, so I stumbled upon another method completely done in Windows! ?

I plan on eventually writing a tutorial and leaving it here....

Thanks @Brad_from_the_80s for the info,  and @Draxxon for everything else!

 

How did you repacking Brad's AFBXD CFW 0.1.5 atari_update.img file on Windows ...? 

Link to comment
Share on other sites

The unpack and repack are trivially done:

 

https://forum.xda-developers.com/t/tool-imgrepackerrk-rockchips-firmware-images-unpacker-packer.2257331/

 

Figuring out how to modify the device tree blob without the source, on the other hand - not so much.  Unless you know the uboot frequency table and offsets, you aren't going to get very far.

 

Who created the 1.2GHz OC DTB for the AFX?

Link to comment
Share on other sites

Original OC was done on the Legends Flashback 1 (50 games model) by rrifonas A.K.A. rmr_md at the GBA Temp forum.

He also did it for the LFB 2s (100 games model) for me as a private release.

That was then applied to the AFBX by RocketFan with some slight modifications.

 

The same thing will not work for the AFB9. It was attempted and failed for the AFB9 by MrFister at my request. (I requested, poorly, lol.)

Edited by Draxxon
Link to comment
Share on other sites

I have a copy of the dumps of my Mega Drive Flashback 2018.. :) so just need to work out how to use imgRePackerRK and unpack its sega_update.img then change it then repack it with it then put it in to Linux and then squash it with mksquashfs and that should be it, I think.

Edited by Spanner
Link to comment
Share on other sites

Quote

C:\Users\span1\OneDrive\Desktop\Documents\AA MD Flashback 2018\imgRePackerRK>imgRePackerRK.exe sega_update_pico.img

        imgRepackerRK (version 1.06 windows)
        Rockchip firmware batch/update images unpacker/packer

        (c) RedScorpio, Moscow, 2013-2017
            RedScorpio@land.ru

        Detected OS:    Windows 8 Pro [build 9200] x64
        Real OS:        Windows 10 Pro [build 19042] x64
        ==========================[ START ]==========================

        --- Firmware unpacking ---

        "RKAF" image file detected

        Update data header from "sega_update_pico.img" was read

        Corrected RKAF header properties
        Image properties:
                Type            RockChip update image ("RKAF")
                Id              "007"
                Model           "rk30sdk"
                Manufacturer    "RK30SDK"
                Version         4.4.2

        - Files extracting -
        Image files count = 4

        parameter (parameter.parm)              extracted (format: RockChip PARM signed file)
                "sega_update_pico.img.dump\parameter"   extracted
        emulator (emulator_scd.img)             extracted (format: SquashFS image)
        data (data_no_test_sd_on.img)           extracted (format: ext4 image)
        backup (RESERVED)       skipped

        - rkCRC summ of update.img checking -
        Stored rkCRC            = 0xcf0b9f5e
        Calculated rkCRC        = 0xcf0b9f5e

        Configuration file for RKAndroidTool v.1.xx (8-bit) created
        Configuration file for RKAndroidTool v.2.xx (16-bit) created
        - image.cfg creating -
        image.cfg created

C:\Users\span1\OneDrive\Desktop\Documents\AA MD Flashback 2018\imgRePackerRK>

Just unpack it with C:\Users\span1\OneDrive\Desktop\Documents\AA MD Flashback 2018\imgRePackerRK>imgRePackerRK.exe sega_update_pico.img

Edited by Spanner
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...