Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Android 9 partition repack tool!

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

    #91
    Originally posted by jblsound View Post
    bumerc


    ???????download:
    update_part_size_fix.tar.xz

    The link is not working, can you re-upload it? I have the same problem with the negative image file size.

    Thank you
    updated in 1st post

    Comment


      #92
      I'm having a chllenging time increasing my system partition size. Can someone please provide step by step instructions?
      Thanks in advance

      Comment


        #93
        Originally posted by james739 View Post
        I'm having a chllenging time increasing my system partition size. Can someone please provide step by step instructions?
        Thanks in advance
        It is necessary to increase the size of system in dtb.

        Comment


          #94
          If in dtb the size system 0×50000000 is written it is possible to increase it for example 0×60000000.

          Comment


            #95
            Originally posted by sagert View Post
            If in dtb the size system 0×50000000 is written it is possible to increase it for example 0×60000000.
            Hi Sager,
            Thanks for the prompt response. How do I decome dtb file sot that I can make the edit?

            Comment


              #96
              @james739
              I added the option to resize partitions. Wait for update

              Comment


                #97
                Originally posted by bumerc View Post
                @james739
                I added the option to resize partitions. Wait for update
                Nice! I can't wait to use it.
                Thank you

                Comment


                  #98
                  Originally posted by james739 View Post

                  Nice! I can't wait to use it.
                  Thank you
                  Done! Check 1st post

                  Comment


                    #99
                    hi i want to extract u-boot.bin from back up stock rom, can i use this tool to do that?

                    Comment


                      The image must be available as aml_upgrade_package.img.

                      Comment


                        Hi bumerc ! I'm trying to resize partitions of the SlimBox Pie AOSP rom for my Tanix TX3 S905X3 4GB/32GB QZ box, using your wonderful tool. I think there is a problem decompiling / extracting the DTB file. Here is the screen output when I attempt to "make mod-resize":
                        Code:
                        /afck$ make mod-resize
                        mkdir -p "bc-tool/stamp"
                        cd bc-tool/ && ./part_resize
                        
                        detected gzip compressed file...
                        awk: line 2: function strtonum never defined
                        awk: line 2: function strtonum never defined
                        awk: line 2: function strtonum never defined
                        awk: line 2: function strtonum never defined
                        dtb offsets:
                        
                        extract multi-dtb...
                        
                        ******************************************
                        * Welcome to the selection menu! *
                        * Change your Android 9 partition size *
                        ******************************************
                        (1) change ODM size
                        (2) change PRODUCT size
                        (3) change VENDOR size
                        (4) change SYSTEM size
                        
                        chose partition number: 4
                        
                        Couldn't open blob from '2048.img': No such file or directory
                        Current odm partition size:
                        0
                        Couldn't open blob from '2048.img': No such file or directory
                        Current product partition size:
                        0
                        Couldn't open blob from '2048.img': No such file or directory
                        Current vendor partition size:
                        0
                        Couldn't open blob from '2048.img': No such file or directory
                        Current system partition size:
                        0
                        
                        enter system size in hex: 0
                        
                        system size changed to 0 byte
                        
                        cleanup...
                        DTB combiner:
                        Input directory: './'
                        Output file: 'DTB'
                        => Found 0 unique DTB(s)
                        replace old dtb...
                        rm out/amlogic/device/1-2g/img-unpack/_aml_dtb.PARTITION
                        cp bc-tool/DTB out/amlogic/device/1-2g/img-unpack/_aml_dtb.PARTITION && sync
                        cp: cannot stat 'bc-tool/DTB': No such file or directory
                        make: *** [build/mod.mak:62: bc-tool/stamp/.stamp.mod-resize] Error 1
                        I have attached the DTB file (extracted from DTB.gz, then re-zipped to be able to upload as an attachment) associated with the slimbox rom. I tried to decompile the extracted DTB file directly using dtc command, but it doesn't work.
                        Please help!
                        DTB_TX3.zip

                        Comment


                          thanghn90
                          Is secure boot activated? Please show the contents of the image.cfg file

                          EDIT:
                          Code:
                          bumerc@bumerc-linux-server:/SSD2/afck-test$ make mod-resize
                          mkdir -p "bc-tool/stamp"
                          cd bc-tool/ && ./part_resize
                          dtb offsets:
                          2048
                          79872
                          157696
                          245760
                          
                          extract multi-dtb...
                          
                          1+0 Datensätze ein
                          1+0 Datensätze aus
                          79872 Bytes (80 kB, 78 KiB) kopiert, 0,000554872 s, 144 MB/s
                          1+0 Datensätze ein
                          1+0 Datensätze aus
                          79872 Bytes (80 kB, 78 KiB) kopiert, 0,000357297 s, 224 MB/s
                          38+0 Datensätze ein
                          38+0 Datensätze aus
                          77824 Bytes (78 kB, 76 KiB) kopiert, 0,000728422 s, 107 MB/s
                          1+0 Datensätze ein
                          1+0 Datensätze aus
                          157696 Bytes (158 kB, 154 KiB) kopiert, 0,00100065 s, 158 MB/s
                          1+0 Datensätze ein
                          1+0 Datensätze aus
                          157696 Bytes (158 kB, 154 KiB) kopiert, 0,000511083 s, 309 MB/s
                          76+0 Datensätze ein
                          76+0 Datensätze aus
                          155648 Bytes (156 kB, 152 KiB) kopiert, 0,00116596 s, 133 MB/s
                          1+0 Datensätze ein
                          1+0 Datensätze aus
                          245760 Bytes (246 kB, 240 KiB) kopiert, 0,00135236 s, 182 MB/s
                          0+1 Datensätze ein
                          0+1 Datensätze aus
                          88064 Bytes (88 kB, 86 KiB) kopiert, 0,000530289 s, 166 MB/s
                          119+0 Datensätze ein
                          119+0 Datensätze aus
                          243712 Bytes (244 kB, 238 KiB) kopiert, 0,00177692 s, 137 MB/s
                          
                          ******************************************
                          * Welcome to the selection menu! *
                          * Change your Android 9 partition size *
                          ******************************************
                          (1) change ODM size
                          (2) change PRODUCT size
                          (3) change VENDOR size
                          (4) change SYSTEM size
                          
                          chose partition number: 4
                          
                          Current odm partition size:
                          0x8000000
                          Current product partition size:
                          0x8000000
                          Current vendor partition size:
                          0x14000000
                          Current system partition size:
                          0x50000000
                          
                          enter system size in hex: 6c000000
                          
                          system size changed to 1811939328 byte
                          
                          cleanup...
                          DTB combiner:
                          Input directory: './'
                          Output file: 'DTB'
                          Found file: 245760.dtb ... chipset: sm1, platform: ac213, rev: 4g
                          Found file: 157696.dtb ... chipset: sm1, platform: ac213, rev: 2g
                          Found file: 2048.dtb ... chipset: g12a, platform: u212, rev: 2g
                          Found file: 79872.dtb ... chipset: g12a, platform: u212, rev: 4g
                          => Found 4 unique DTB(s)
                          
                          Generating master DTB... completed
                          replace old dtb...
                          rm out/amlogic/device/1-2g/img-unpack/_aml_dtb.PARTITION
                          cp bc-tool/DTB out/amlogic/device/1-2g/img-unpack/_aml_dtb.PARTITION && sync
                          touch "bc-tool/stamp/.stamp.mod-resize"
                          Your dtb will be correctly decompiled and processed.
                          What is the output on file command, with compressed DTB?
                          Code:
                          file bc-tool/DTB
                          is AWK installed? Post the command output
                          Code:
                          which awk
                          Code:
                          awk --version
                          Last edited by bumerc; 04-08-2021, 11:09.

                          Comment


                            bumerc for some reason, I could not see your reply to my post in freaktab. I'm contacting the site admin to see what the issue is.
                            Anyway, here is the image.cfg file you asked for. There are several image.cfg in ~/afck, but I think you mean the one in ~/afck/out/amlogic/device/1-2g/img-unpack/
                            image_cfg.zip
                            How do I know if secure boot is activated?
                            Attached Files
                            Last edited by thanghn90; 04-08-2021, 15:32.

                            Comment


                              Originally posted by thanghn90 View Post
                              ...
                              How do I know if secure boot is activated?
                              If extracted IMG files contain an "ENC" suffix.
                              You can also see it in the image.cfg file. In your case it is an ordinary IMG unencrypted. Your main problem is AWK, which does not appear to be working properly or not installed on your PC. Please answer my questions about this above

                              Comment


                                bumerc : found the culprit: it was because I'm using Ubuntu 20.04.1 LTS, and the default awk is pointing to mawk, not gawk (GNU awk). A quick googling on the "line 2" error of awk reveals that I need to install gawk. So I typed:
                                sudo apt install gawk
                                And since then, I was able to extract the DTB and resize the partition.

                                By the way, I was also having some trouble installing
                                android-tools-fsutils
                                Instead, apt suggests me to install the followings two packages, and I followed it:
                                android-sdk-libsparse-utils android-sdk-ext4-utils
                                So far, no problem (aside from the awk, which is not related to the above package).

                                Please update the first post for people with the latest Ubuntu focal release. Thanks!

                                Comment

                                Working...
                                X