Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Trying to copy system partition from one ROM to another

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

    Trying to copy system partition from one ROM to another

    I have a Tanix TX8 Max which is based on the q201 reference board. I am trying to take the system image from Magendanz' custom TVStock Marshmallow Rom for to Beelink GT1 which is also based on the q201 board. I can flash the custom ROM as is and it works fine. My problem is that I really want to have all functionality from the remote that came with the TX8 Max, which includes being able to power on the box from a cold state. I know I can replace the remote.conf file and get 99% of the functionality back but I really want to be able to boot the box with the remote, and the code for that is stored in the bootloader.

    I've tried using the Amlogic customization tool to do a level 1 unpack of the custom ROM, replace the bootloader files, repack the full image and then flash but with that approach I'm unable get past the boot logo. The only approach I've had nearly any success with is to do a level 2 unpack of the both OEM ROM for the TX8 Max and the custom ROM, replace the files in the system folder of the OEM ROM with those from the custom ROM and then repack and flash. That will give me a ROM that will let me use the stock remote to power on and the have Android TV working. The problem with doing it that way is my leanback YouTube app ends up broken. I've notice when doing it this way that all of the SELinux contexts are lost on all the files in system as well, but I'm not sure if the problem with YouTube is related to that.

    What I would like to do is perform a level 1 unpack of both the OEM and custom ROMs, take the the system partition image from the custom ROM and use it to replace the one from the OEM ROM, rebuild and flash. I have tried this and again I get stuck at the boot logo. I've tried this using kernels from both the OEM and custom ROMs as well with the same result either way.

    So, if I just swap the untouched system images it won't boot, but if I do a level 2 unpack and swap the contents of the system partitions it boots fine but YouTube is broken. It doesn't make sense to me.

    There must be a way to swap the system images and make it work. Can anyone help me figure this out?
    Alternatively, If I can figure out how to swap the bootloader of the custom ROM with the OEM I would be happy too. I just want to boot my box with the stock remote.

    #2
    Yes, I am interested in this as well. Is there anyone that can assist in this issue?

    Comment


      #3
      im also interested in unpacking images
      it seems the peope in the know e.g. rom builder's here
      dont want to share

      Comment


        #4
        Wow really. Seems to me they share too much sometimes. But google is your best friend and pretty sure threads in Rom building also a help.. Or do you need a spoon feeding kinda help?
        Many devices now mk902ii/Shield/Mk68 /Ugoos/neox5/minix5 (yes they still work lol) mk80 no it doesnt work lol.

        Comment


        • trebor
          trebor commented
          Editing a comment
          Shh don't tell them about Google that's the world's Biggest secret.

        #5
        the amlogic rom packager isnt working on 7.1.2 and every thread i have looked at says the same
        so clearly either people have a new packager or are doing it by hand
        either way pointing us to something rather than saying google it would be of help

        I have been on the internet since 1994 i knew about google before you even knew what the internet was

        Comment


          #6
          Amlogic released v2.0.10 of their customization tool which is able to repack nougat system partitions from level 2. Even previous versions were able to do level 1 repacks. Prior to v2.0.10 you could use Linux to unpack, perform file level modifications and repack. I learned how to do that from Guest , one of the devs here, so I am definitely not saying they don't want to share. I know they aren't obligated to do anything and are busy people with lives outside this forum and their development projects. I tried both using the latest Amlogic tool and the Linux method in my efforts to figure out my issue but didn't make any progress. That's why I posted here. My issue isn't about how to unpack or repack ROMs in general. It's specifically about transferring the system partition from one ROM to another and/or actually getting the Android TV leanback YouTube app to work when I add it to a customized ROM.

          Comment


            #7
            Atv rom unless custom dont work because locked down. Also level two kernels ect different from one to next unpacking those and or building from skd a complicated task. Customizition tool isnt rom building swapping parts wont work unless you know whole process to unpack each area and repack separate from tool. Again google best wsy to find more on that or post in rom building section as well.
            Many devices now mk902ii/Shield/Mk68 /Ugoos/neox5/minix5 (yes they still work lol) mk80 no it doesnt work lol.

            Comment


              #8
              I realize there are further considerations like the kernel, as you mentioned. Swapping the system partition isn't even necessary at this point. It's just something I just wanted to figure out if it could be done because it's an approach I tried that I couldn't get working.

              What I really need is to get YouTube from ATV to work. All the necessary parts from ATV are there and the ATV launcher, Play Store and other native apps work perfect. YouTube is the only problem. It's just a single app so I don't know if ROM building is the appropriate place for it.

              Comment


                #9
                v2.0.10 doesnt work with 7.1.2
                well it works in the manner that you can unpack and pack a rom
                but the image wont be bootable
                once the dev's share how they are packing images for 7.1.2 i will make an atv rom basted on the 10/10/17 image for the h96pro+

                Originally posted by joelkolb View Post
                Amlogic released v2.0.10 of their customization tool which is able to repack nougat system partitions from level 2. Even previous versions were able to do level 1 repacks. Prior to v2.0.10 you could use Linux to unpack, perform file level modifications and repack. I learned how to do that from Guest , one of the devs here, so I am definitely not saying they don't want to share. I know they aren't obligated to do anything and are busy people with lives outside this forum and their development projects. I tried both using the latest Amlogic tool and the Linux method in my efforts to figure out my issue but didn't make any progress. That's why I posted here. My issue isn't about how to unpack or repack ROMs in general. It's specifically about transferring the system partition from one ROM to another and/or actually getting the Android TV leanback YouTube app to work when I add it to a customized ROM.

                Comment


                  #10
                  That's funny. I'm pretty sure I've used v2.0.10 to repack Nougat ROMs. It was supposed to be compatible with Nougat. But to be honest I've done so much experimenting with unpacking and repacking lately that it's all blurred together, and my efforts have been focused on Marshmallow because Nougat has some issues with Amlogic that won't work for my use case.

                  Anyway, I will share with you what was shared with me. Here's how to repack an Amlogic system partition image in linux:


                  I didn't find any good info for modifying and creating ext4 sparsed images so i decided to share :) This is for all who wants to unpack and modify the original system.img that you can flash using recovery. system.img (what you get from the...


                  Once you have your repacked system partition image you will have to use the Amlogic tool to pack all your partition images into the flashable firmware image at level 1. There is no getting around using the Amlogic tool at level 1 and I know for a fact that even older versions of the tool like v2.0.8 will pack at level 1 just fine, even for Nougat.

                  Comment


                    #11
                    if the firmware is rooted, could you not just swap the remote.conf file to get the correct remote working
                    also
                    edit the build prop to make you device appear as a google tv device (MiBox) rather than mobile/tablet and download leanback launcher from the appstore.
                    YoutubeTV can be got via Aptoide

                    Comment


                      #12
                      The remote.conf is already swapped. But that doesn't allow the remote to power on the box from a cold powered off state. The remote.conf is only in effect once Android is running. The code that allows the box to boot from the remote is in the bootloader.

                      The build.prop is already heavily modified to spoof a legit Android TV box but I never thought of installing YouTube from Aptoide. That's a good idea. Honestly though, it's been so long, I've given up chasing this white whale. I just went ahead and bought the remote for the GT1 off of AliExpress for $8.00 a while back. I would still like to know the answers to the problems in the OP for my own knowledge though.

                      Comment

                      Working...
                      X