Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Compiling TWRP from sources - OTT MXQ (S805)

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

    Compiling TWRP from sources - OTT MXQ (S805)

    Hello,
    I'm trying to compile TWRP from source for my MXQ (S805) Box.
    I've based my device tree on this: https://github.com/TeamWin/android_device_amlogic_k200 modified with the files extracted from a dump of my recovery.img

    I'm able to complete the build process, but the box is not able to boot from the resulting recovery.img (It just reboot).
    How can I debug? Is there a way to log the problem?

    Thank you!

    PS: of course I'll upload my recovery.img when it is stable!

    #2
    More info would be nice.
    What branch are you using to compile?
    What TWRP branch are you using ?
    Is your device tree somewhere I can look ?

    You can try in cache/recovery/last_log and see if TWRP actually booted by reading that file. Otherwise only with a serial connection .

    There's other way but would require the use of gdb.

    Tapatalked


    if [ $up.post.type = $type.two.lazy.to_use_google ] || [ $up.post.type = $type.silly_question ];
    then mv $user.contact.up.post /.trash; set response($response.type = ignore);
    $user.up.post.ignore_in_future = true; fi;

    Comment


      #3
      Hello abdul_pt ,
      Sorry, I was on vacation and I just saw your reply!
      Anyway eventually I was able to produce a valid TWRP for this device, but the graphics is somewhat broken:


      Any idea why?

      I'm still working on it.
      I'll upload my device tree soon. I'm using platform_manifest_twrp_omni manifest.

      UPDATE: device tree: https://github.com/Luca1991/android_device_amlogic_mxq
      UPDATE 2: recovery.log file: http://pastebin.com/JyUarxRV
      Last edited by Luca91; 08-25-2016, 15:02.

      Comment


        #4
        Add this flag to BoardConfig.mk TARGET_RECOVERY_FORCE_PIXEL_FORMAT := "RGB_565"

        You can use this one also if needed RECOVERY_GRAPHICS_FORCE_USE_LINELENGTH := true

        Tapatalked

        if [ $up.post.type = $type.two.lazy.to_use_google ] || [ $up.post.type = $type.silly_question ];
        then mv $user.contact.up.post /.trash; set response($response.type = ignore);
        $user.up.post.ignore_in_future = true; fi;

        Comment


          #5
          Originally posted by abdul_pt View Post
          Add this flag to BoardConfig.mk TARGET_RECOVERY_FORCE_PIXEL_FORMAT := "RGB_565"

          You can use this one also if needed RECOVERY_GRAPHICS_FORCE_USE_LINELENGTH := true

          Tapatalked
          Tried with RECOVERY_GRAPHICS_FORCE_USE_LINELENGTH := true, same result.

          Tried with TARGET_RECOVERY_FORCE_PIXEL_FORMAT := "RGB_565", my box hang at boot logo

          Maybe RGB_565 is wrong??

          EDIT: FIXED!!!!! Doing a make clean and recompiling from scratch fixed the issue Thank you mate

          EDIT2: I've still to fix a problem with lun file (OTG doesn't work ATM), then I'll post my recovery.img
          Last edited by Luca91; 08-25-2016, 17:56.

          Comment


            #6
            Great
            if [ $up.post.type = $type.two.lazy.to_use_google ] || [ $up.post.type = $type.silly_question ];
            then mv $user.contact.up.post /.trash; set response($response.type = ignore);
            $user.up.post.ignore_in_future = true; fi;

            Comment


              #7
              Some updates: I think that I've found the brightness file (to fix the brightness warning). I'm compiling right now.
              EDIT: Brightness file fixed, device tree updated!

              abdul_pt I'm trying to fix the USB right now, I can't find the lun file, but looking at the original recovery ramdisk, I've found a script with: "busybox echo /dev/block/cache > /sys/devices/lm0/gadget/gadget-lun0/file". Strangely enough, the path /sys/devices/lm0/gadget/gadget-lun0/ doesn't exist. Is it ok to run this script when TWRP is booting? maybe in early-init? Thank you

              EDIT: FIXED lun file! OTG is OK now!
              abdul_pt we have last problem here: my device tree fail to produce a working recovery.img, I've to manually copy the TWRP ramdisk and paste it on the stock recovery (replacing the stock ramdisk), I'm pretty sure that this is due to the second stage bootloader, or maybe due to wrong address. Do you have any clue?
              Anyway TWRP is now working, I'll test it tonight and upload the img on a thread here PS: I'll add your name in the credit on the device tree repo soon.
              Last edited by Luca91; 08-29-2016, 17:37.

              Comment


                #8
                Originally posted by Luca91 View Post
                Some updates: I think that I've found the brightness file (to fix the brightness warning). I'm compiling right now.
                EDIT: Brightness file fixed, device tree updated!

                abdul_pt I'm trying to fix the USB right now, I can't find the lun file, but looking at the original recovery ramdisk, I've found a script with: "busybox echo /dev/block/cache > /sys/devices/lm0/gadget/gadget-lun0/file". Strangely enough, the path /sys/devices/lm0/gadget/gadget-lun0/ doesn't exist. Is it ok to run this script when TWRP is booting? maybe in early-init? Thank you

                EDIT: FIXED lun file! OTG is OK now!
                abdul_pt we have last problem here: my device tree fail to produce a working recovery.img, I've to manually copy the TWRP ramdisk and paste it on the stock recovery (replacing the stock ramdisk), I'm pretty sure that this is due to the second stage bootloader, or maybe due to wrong address. Do you have any clue?
                Anyway TWRP is now working, I'll test it tonight and upload the img on a thread here PS: I'll add your name in the credit on the device tree repo soon.
                can you post the working TWRP?
                I have the same box, same problem (the box is not able to boot from the resulting recovery.img It just reboot).

                thanks

                Comment

                Working...
                X