Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Unpacking and packing logo.img file - please help!!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    hey guys..

    first off, it's late in my timezone and I'm tired, so my hex maths may not be correct, but the values mentioned in offsets definately are.

    the 1080p image is stored at offset $80 in the file and has a length of $5EECC0 (can be found by looking at values in offset $54).

    the 720p file is at offset $5EECC0 and has a length of $2A3080 (value in offset $5EECD4 is $891D40).

    the 1080p and 720p images are standard 24bit bitmaps (header ASCII ''BM'').

    I haven't looked hard for the boot animation, so cannot comment where it may be.

    UPDATE: looking at offset $891D40 finds the 'poweron'' 'bitmap and it has the same ''BM'' header. The animation may just be loading each BITMAP one after another (page flipping?).. not going to look at it at the moment.


    I'm a windows user and used HxD HEX editor (freeware) to look at the LOGO.IMG file and find the ASCII headers for the files. I then used the same tool to cut the ranges mentioned above and pasted them into a new file, then saved the file as 1080.bmp and 720.bmp - then used windows image viewer to load and verify the files really were bitmaps.


    If you wanted to inject a new bitmap, you'd need to save it as uncompressed data, then copy and paste the data into the correct offsets in the file.


    Years ago I had a VM and used linux scripts to find the bitmaps in the firmware for thin clients (which I installed linux on and then used for car computers etc.), I'll see ifI can find my old VM and scripts as it should pretty much be the same method.. look in binary for specific header, note offset then load new image into binary at offset, recalculate headers etc. if needed and then save amended binary with a new filename for testing later.

    There are no easy drag and drop utilities sorry people, this is why it's called 'hacking'

    Comment


      #17
      You really don't need to go through all the trouble.

      Open it in a hex editor. Find the first BM word. This is the start of the first BMP. Go to the next BM and backup in front of the header. The stock image ends in 00 00 00 00 00 so it is easy to see where the 2nd image header is in front of the 2nd BM word. Copy this out and save it as a new file called 1080.bmp. Now at the 2nd BM header copy from that to the end of the file and copy that out as 720.bmp.

      Now you can open the BMP's in a picture editor. Edit them as you wish. Now go paste them back in the logo.img file. Your done!

      Brian is looking into scripting this so stay tuned.

      Bob
      "Pzebacz im, bo nie wiedzą, co czynią"
      "Прости им, они не ведают, что творят"
      "Perdona loro perché non sanno quello che fanno"
      "Vergib ihnen, denn sie wissen nicht, was sie tun"
      "Vergeef hen want ze weten niet wat ze doen"
      "Pardonne-leur car ils ne savent pas ce qu'ils font"
      "Perdónalos porque no saben que lo que hacen"
      "Oprosti im, jer ne znaju što čine"
      "Forgive them as they know not what they do"





      Comment


        #18
        hi,
        is there someone that can try this?

        to unpack logo. img:
        imgpack -d logo.img folder/
        To pack you need two files on the folder, names are bootup and poweron, both are bmp and please notice there's no .bmp at the end of filename, that's ok.
        then to pack run:
        imgpack -r folder/ logo.img

        hope it works on this logo.img. it works on the ones from amlogic dual core tvbox
        There are 10 types of people in the world: Those who understand binary, and those who don't...

        If you want to buy me a beer, please use this -> https://www.paypalobjects.com/en_US/..._donate_SM.gif

        Comment


          #19
          thanks for the upload.

          i tried it this morning on my pc with linux, but when i run the the script i get error like the commands are not right.

          maybe someone else could try and figure out the right commands

          Originally posted by daemonium View Post
          hi,
          is there someone that can try this?

          to unpack logo. img:
          imgpack -d logo.img folder/
          To pack you need two files on the folder, names are bootup and poweron, both are bmp and please notice there's no .bmp at the end of filename, that's ok.
          then to pack run:
          imgpack -r folder/ logo.img

          hope it works on this logo.img. it works on the ones from amlogic dual core tvbox

          Comment


            #20
            Originally posted by daemonium View Post
            hi,
            is there someone that can try this?

            to unpack logo. img:
            imgpack -d logo.img folder/
            To pack you need two files on the folder, names are bootup and poweron, both are bmp and please notice there's no .bmp at the end of filename, that's ok.
            then to pack run:
            imgpack -r folder/ logo.img

            hope it works on this logo.img. it works on the ones from amlogic dual core tvbox
            I do not know what this binary was compiled for but it does not work in Ubuntu 32bit or 64bit.

            By the way folks when using Linux and a binary like this you have to type ./imgpack I wont explain why that's too much to type (short answer it's not installed so terminal window cant find it ./ tells it to execute local). Anyway this binary doesn't work for me.

            ./imgpack: cannot execute binary file

            Bob
            "Pzebacz im, bo nie wiedzą, co czynią"
            "Прости им, они не ведают, что творят"
            "Perdona loro perché non sanno quello che fanno"
            "Vergib ihnen, denn sie wissen nicht, was sie tun"
            "Vergeef hen want ze weten niet wat ze doen"
            "Pardonne-leur car ils ne savent pas ce qu'ils font"
            "Perdónalos porque no saben que lo que hacen"
            "Oprosti im, jer ne znaju što čine"
            "Forgive them as they know not what they do"





            Comment


              #21
              Re: Unpacking and packing logo.img file - please help!!

              Originally posted by Finless View Post
              I do not know what this binary was compiled for but it does not work in Ubuntu 32bit or 64bit.

              By the way folks when using Linux and a binary like this you have to type ./imgpack I wont explain why that's too much to type (short answer it's not installed so terminal window cant find it ./ tells it to execute local). Anyway this binary doesn't work for me.

              ./imgpack: cannot execute binary file

              Bob
              I can execute it but it complains about the logo.img format, i run it under ubuntu 64bit. it works on logo.img from mx dual core firmwares.
              There are 10 types of people in the world: Those who understand binary, and those who don't...

              If you want to buy me a beer, please use this -> https://www.paypalobjects.com/en_US/..._donate_SM.gif

              Comment


                #22
                FYI I have changed the logo by hand myself using a hex editor. There are only 2 images in it. A 1080 and a 720 logo. There is no batter stats or anything else like a tablet has.

                So it is some new format.

                Bob
                "Pzebacz im, bo nie wiedzą, co czynią"
                "Прости им, они не ведают, что творят"
                "Perdona loro perché non sanno quello che fanno"
                "Vergib ihnen, denn sie wissen nicht, was sie tun"
                "Vergeef hen want ze weten niet wat ze doen"
                "Pardonne-leur car ils ne savent pas ce qu'ils font"
                "Perdónalos porque no saben que lo que hacen"
                "Oprosti im, jer ne znaju što čine"
                "Forgive them as they know not what they do"





                Comment


                  #23
                  would be interessting where the logo.img is beeing flashed to.
                  i mean we could simply replace the bmp/rle picture file in the boot.img and simply dont flash the logo.img.

                  this would be much easier

                  Comment


                    #24
                    Originally posted by feh View Post
                    would be interessting where the logo.img is beeing flashed to.
                    i mean we could simply replace the bmp/rle picture file in the boot.img and simply dont flash the logo.img.

                    this would be much easier
                    The logo.rle in boot is not used anymore. At least on the S82/S89 Kitkat ROMs I have been working on. The init binary in boot.img is no longer referencing the rle style logos. This has been true even with RockChip devices and KitKat. They aren't used anymore.


                    Bob
                    "Pzebacz im, bo nie wiedzą, co czynią"
                    "Прости им, они не ведают, что творят"
                    "Perdona loro perché non sanno quello che fanno"
                    "Vergib ihnen, denn sie wissen nicht, was sie tun"
                    "Vergeef hen want ze weten niet wat ze doen"
                    "Pardonne-leur car ils ne savent pas ce qu'ils font"
                    "Perdónalos porque no saben que lo que hacen"
                    "Oprosti im, jer ne znaju što čine"
                    "Forgive them as they know not what they do"





                    Comment


                      #25
                      Originally posted by daemonium View Post
                      hi,
                      is there someone that can try this?

                      to unpack logo. img:
                      imgpack -d logo.img folder/
                      To pack you need two files on the folder, names are bootup and poweron, both are bmp and please notice there's no .bmp at the end of filename, that's ok.
                      then to pack run:
                      imgpack -r folder/ logo.img

                      hope it works on this logo.img. it works on the ones from amlogic dual core tvbox
                      After I create the logo.img how to flash it on the tvbox ?

                      Comment


                        #26
                        Yep just tested.. my old trusted hex editor will do just fine..
                        Llearning all about amlogic now..
                        Its all a bit different than i was used to on Rochchip roms. 's a lot

                        Getting there slowly.

                        Comment


                          #27
                          Originally posted by HardwareGuru View Post
                          Yep just tested.. my old trusted hex editor will do just fine..
                          Llearning all about amlogic now..
                          Its all a bit different than i was used to on Rochchip roms. 's a lot

                          Getting there slowly.
                          Your going to find an interesting surprise on my ROM's with this
                          You have more to learn

                          Bob
                          "Pzebacz im, bo nie wiedzą, co czynią"
                          "Прости им, они не ведают, что творят"
                          "Perdona loro perché non sanno quello che fanno"
                          "Vergib ihnen, denn sie wissen nicht, was sie tun"
                          "Vergeef hen want ze weten niet wat ze doen"
                          "Pardonne-leur car ils ne savent pas ce qu'ils font"
                          "Perdónalos porque no saben que lo que hacen"
                          "Oprosti im, jer ne znaju što čine"
                          "Forgive them as they know not what they do"





                          Comment


                            #28
                            hahaha, you can just tell me.. i figure it all out anyway.. just saves time lol
                            Same as the hidden logo on rockchip roms ?

                            HWG

                            Comment


                              #29
                              Originally posted by HardwareGuru View Post
                              hahaha, you can just tell me.. i figure it all out anyway.. just saves time lol
                              Same as the hidden logo on rockchip roms ?

                              HWG

                              My hidden logo? I am not aware of a hidden logo other than my RK ROMs.

                              Bob
                              "Pzebacz im, bo nie wiedzą, co czynią"
                              "Прости им, они не ведают, что творят"
                              "Perdona loro perché non sanno quello che fanno"
                              "Vergib ihnen, denn sie wissen nicht, was sie tun"
                              "Vergeef hen want ze weten niet wat ze doen"
                              "Pardonne-leur car ils ne savent pas ce qu'ils font"
                              "Perdónalos porque no saben que lo que hacen"
                              "Oprosti im, jer ne znaju što čine"
                              "Forgive them as they know not what they do"





                              Comment


                                #30
                                Never mind.. think we are going off topic here

                                I havent patched it in full yet just extracted the bitmaps for now.. so i have to find out when i will put it together again. so... still wondering what the suprise is if its not a hidden logo

                                Comment

                                Working...
                                X