Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Android 9 partition repack tool!

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

    thanks for help i did have something to update but i get the same errors the mount point is in use with snap ?
    /dev/loop14 768 768 0 100% /snap/gnome-characters/726
    im using ubuntu 18.04.6 shall i try an earlier version ?

    Comment


      Try one of the later versions of Ubuntu

      Comment


        Still getting same errors for them partitions not mounting but extraction seems complete what actually happens when it mounts the partitions ?
        ive tried 18.04 18.04.6 and 21.04.03 and ive tried various android 9 imgs https://forum.freaktab.com/forum/tv-...fi-bcmbt-qcabt

        ok i think ive sorted it whats happening is when you do another rom if you havnt cleared the out folder of level 1 extraction it will just use them to extract and not the new ones that dont seem to be created can the clean up clean img-unpack folder too that would fix it
        Last edited by wadger; 10-11-2021, 00:59.

        Comment


          Originally posted by wadger View Post
          ok i think ive sorted it whats happening is when you do another rom if you havnt cleared the out folder of level 1 extraction it will just use them to extract and not the new ones that dont seem to be created can the clean up clean img-unpack folder too that would fix it
          Yes, but the out folder is not mounted, it is simply created during the unpacking process and does not affect the mounting of partitions in any way.

          Comment


            Originally posted by bumerc View Post
            Yes, but the out folder is not mounted, it is simply created during the unpacking process and does not affect the mounting of partitions in any way.
            ye the point is the .partitions inside the "out" folder sometimes dont get replaced with the new ones so when it comes to mount it cant do anything with em cos there already done and really this is a big problem cos i just did 2 different roms and ended up with em both having the same system and vendor partitions and you get boot loop but if i remember to delete the out folder before starting a new rom then the output is perfect and the roms work fine
            Im happy deleting the folder myself but it really needs doing with the tool to stop this happening or find out why the .partitions arent always replaced when you do a new extraction

            Ive done a few different roms now swapping out system files and apps and they all work great if i do the above. thanks for making it so easy if you need any more testing to get to the bottom of this im happy to help

            Comment


              wadger
              I can't quite understand it - build script automatically deletes the partitions in the out folder before the newly created partition is copied over. Please post build log

              Comment


                Originally posted by bumerc View Post
                wadger
                I can't quite understand it - build script automatically deletes the partitions in the out folder before the newly created partition is copied over. Please post build log
                log of 5 runs with 2 different imgs seems the first img has the mount probs and second run is missing all the unpack msgs and inherites the mount probs and when i go to edit system i still have a copy of img 1 system
                before the 3rd run i delete out folder and now i get no unpack and no mount probs and i have img 2 system to edit
                run 4 is with the img 1 again but this time no errors with mount but missing unpack msgs and i still have img 2 system to edit
                run 5 i just delete out folder again and is a copy of the first run to show this img has mount probs

                I dont think the problems are related and the img 1 with mount probs seems to extract ok

                https://justpaste.it/7e0cq

                Comment


                  wadger
                  Invalid sparse file format at header magic
                  Failed to read sparse file
                  The IMG you are trying to unpack was not compiled by android 9 sdk. The partitions have already been edited by someone and repacked incorrectly

                  Comment


                    yes its strange but both imgs run well on my box ive run the mod partitions on it and it fixes the mount problems and it still works fine but i still have to delete the out folder if i want to edit a different img

                    Comment


                      That is correct and appropriate. To do this, run make clean. If you want to clean the output directory in bc-tool, run make bc-clean and select option 2.

                      P.S. The tool repairs the incorrectly compiled partitions automatically.

                      Comment


                        option 2 dosnt delete the .partition files in /afck/out/amlogic/device/1-2g/img-unpack If they remain any imgs done after dont get dumped you can see it in the logs this bit gets skipped on second run if you dont

                        [Msg]Image package version 0x2
                        [Msg]Unpack item [USB , DDR] to (out/amlogic/device/1-2g/img-unpack/DDR.USB) size:49152 bytes
                        [Msg]Unpack item [USB , UBOOT] to (out/amlogic/device/1-2g/img-unpack/UBOOT.USB) size:819200 bytes
                        [Msg]Unpack item [PARTITION , _aml_dtb] to (out/amlogic/device/1-2g/img-unpack/_aml_dtb.PARTITION) size:58997 bytes
                        [Msg]Unpack item [UBOOT , aml_sdc_burn] to (out/amlogic/device/1-2g/img-unpack/aml_sdc_burn.UBOOT) size:868864 bytes
                        [Msg]Unpack item [ini , aml_sdc_burn] to (out/amlogic/device/1-2g/img-unpack/aml_sdc_burn.ini) size:394 bytes
                        [Msg]Unpack item [PARTITION , boot] to (out/amlogic/device/1-2g/img-unpack/boot.PARTITION) size:10065920 bytes
                        [Msg]Unpack item [PARTITION , bootloader] to (out/amlogic/device/1-2g/img-unpack/bootloader.PARTITION) size:868352 bytes
                        [Msg]Unpack item [PARTITION , dtbo] to (out/amlogic/device/1-2g/img-unpack/dtbo.PARTITION) size:438 bytes
                        [Msg]Unpack item [PARTITION , logo] to (out/amlogic/device/1-2g/img-unpack/logo.PARTITION) size:1076480 bytes
                        [Msg]Backup item [dtb , meson1] backItemId[2][PARTITION, _aml_dtb]
                        [Msg]Unpack item [PARTITION , odm] to (out/amlogic/device/1-2g/img-unpack/odm.PARTITION) size:540748 bytes
                        [Msg]Unpack item [conf , platform] to (out/amlogic/device/1-2g/img-unpack/platform.conf) size:202 bytes
                        [Msg]Unpack item [PARTITION , product] to (out/amlogic/device/1-2g/img-unpack/product.PARTITION) size:104857600 bytes
                        [Msg]Unpack item [PARTITION , recovery] to (out/amlogic/device/1-2g/img-unpack/recovery.PARTITION) size:16756736 bytes
                        [Msg]Unpack item [PARTITION , system] to (out/amlogic/device/1-2g/img-unpack/system.PARTITION) size:969932800 bytes
                        [Msg]Unpack item [PARTITION , vbmeta] to (out/amlogic/device/1-2g/img-unpack/vbmeta.PARTITION) size:4096 bytes
                        [Msg]Unpack item [PARTITION , vendor] to (out/amlogic/device/1-2g/img-unpack/vendor.PARTITION) size:235929600 bytes
                        [Msg]Write config file "out/amlogic/device/1-2g/img-unpack/image.cfg" OK!
                        Image unpack OK!

                        the log of the forth run shows the img 1 with bad partitions extract and mount fine cos its using partitons from img 2 i didnt delete out folder
                        i know this is happening because 1 of my imgs has an extra file in system so i can tell easy which one im looking at
                        I dont really understand why these partitions aren't deleted when you press option 1 cos that would be perfect

                        I just want any that use this tool to know if you work with different img then you must delete in my case/afck/out/amlogic/device/1-2g/img-unpack or /afck/out is fine for everyone
                        the way option 1 works now is fine if your running the same img all the time cos its quicker (it doesn't redump the .partitions) so maybe option 4 can be working with new img and it runs 1 2 and 3 and deletes the out folder ?

                        Comment


                          wadger
                          the “make clean” command deletes the partitions in afck/out/amlogic/device/1-2g/img-unpack, I mentioned that earlier. The “make bc-clean” command is only active in the bc-tool and does not spread to afck. This is also described in readme.md.

                          Comment


                            Originally posted by bumerc View Post
                            wadger
                            the “make clean” command deletes the partitions in afck/out/amlogic/device/1-2g/img-unpack, I mentioned that earlier. The “make bc-clean” command is only active in the bc-tool and does not spread to afck. This is also described in readme.md.
                            Thanks. I didn't notice the make clean command sorry for all the hassle, Moving on, now wearing my glasses :-)
                            Have you tried to extract the new slimbox 12.2 GT1 ultimate image sbx_beelink_gt1u_qca9377_atv_v12_2 it gives error.

                            im getting error when i rebuild a system on other imgs seems to get almost to the end, This is a log from a clean system i haven't added or changed anything before running the command on a fresh exraction

                            [email protected]:~/afck$ make mod-system
                            mkdir -p "bc-tool/stamp"
                            cd bc-tool/system && ./build
                            check source folder...
                            ok

                            remove system/lost+found
                            previous build doesn't exist

                            single-dtb detected...
                            calculate IMG size
                            size: 475136

                            building...

                            create ext4 fs...
                            #################
                            475136+0 records in
                            475136+0 records out
                            1946157056 bytes (1.9 GB, 1.8 GiB) copied, 131.822 s, 14.8 MB/s
                            mke2fs 1.43.3 (04-Sep-2016)
                            Creating filesystem with 475136 4k blocks and 118800 inodes
                            Filesystem UUID: 4861a212-e3eb-4cfb-9e4c-85b165113113
                            Superblock backups stored on blocks:
                            32768, 98304, 163840, 229376, 294912

                            Allocating group tables: done
                            Writing inode tables: done
                            Creating journal (8192 blocks): done
                            Writing superblocks and filesystem accounting information: done

                            check uuid hash
                            Filesystem UUID: 4861a212-e3eb-4cfb-9e4c-85b165113113
                            Directory Hash Seed: 9891800d-46ba-41d8-88e0-e84afc0400e3

                            set android_sparse flag...
                            ##################
                            mke2fs 1.43.3 (04-Sep-2016)
                            Discarding device blocks: done
                            Creating filesystem with 475136 4k blocks and 118800 inodes
                            Filesystem UUID: 4861a212-e3eb-4cfb-9e4c-85b165113113
                            Superblock backups stored on blocks:
                            32768, 98304, 163840, 229376, 294912

                            Allocating group tables: done
                            Writing inode tables: done
                            Writing superblocks and filesystem accounting information: done

                            generate fs_config
                            [sudo] password for wadger:
                            compile file_contexts.bin

                            create a sparse img...
                            ##################
                            loaded 2527 fs_config entries
                            ./build: line 106: 98414 Killed sudo contrib/e2fsdroid -T $TIME -C out/$FSC -B out/$PART.map -S out/$SLCB -f $PART -a / out/$OUT
                            make: *** [build/mod.mak:62: bc-tool/stamp/.stamp.mod-system] Error 1


                            Comment


                              wadger
                              Post the old and the new fs_config text files. Apparently something has not been declared in fs_config.

                              Comment


                                Post the old and the new fs_config text files. Apparently something has not been declared in fs_config.
                                https://mega.nz/file/itFTnS4a#isg72_...NtZr-tybYmGJIg
                                I didnt change anything

                                Comment

                                Working...
                                X