Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

TWRP for Amlogic devices.

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Thanks again Abdul !!

    I'll try it to copy the recovery.log file.

    Can you upload the device tree of N200 as you did to K200 https://github.com/goncalo77/android...00/tree/master.

    Thanks !!

    Comment


      Originally posted by abdul_pt View Post
      Some new images that should solve the problems with 0 size and/or not detected partitions


      This are the ones that i have now, please, remind me if someone is waiting/wants one.

      M8C - https://www.freak-tab.de/abdul_pt/am...8.7.0_N200.img
      M8C - https://www.freak-tab.de/abdul_pt/am..._N200_emmc.img

      K200 - https://www.freak-tab.de/abdul_pt/am...8.7.0_K200.img
      K200 - https://www.freak-tab.de/abdul_pt/am..._K200_emmc.img

      X8-H Plus - https://www.freak-tab.de/abdul_pt/am..._Plus_emmc.img
      Thanks Abdul.. I have a beelink s82plus (s812) and plan to test out one of the N200 images. If some thing goes bad, is there an easy way to recover ?

      Comment


        Originally posted by rapalax View Post

        Thanks Abdul.. I have a beelink s82plus (s812) and plan to test out one of the N200 images. If some thing goes bad, is there an easy way to recover ?
        Testing the images from External SDcard is pretty safe.


        I'm building new images now, i didn't include the backup of internal SDcard on previous images . That was probably what was making TWRP restore hang, since backup's made with the version that backups SDcard can't be restore with the version that doesn't backup SDcard.
        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


          New images in OP.
          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


            Thank Abdul, Good work!!

            Can you upload the source tree to github please ?

            Comment


              I can access TWRP but I can mount external SD Card to flash rom.. but it will boot from external SD.. help?

              Comment


                Originally posted by yhaddad View Post
                Thank Abdul, Good work!!

                Can you upload the source tree to github please ?
                It's already there, check TWRP gerrit for some unmerged commits.
                I have a K200 not a N200, if you want for a N200 do the appropriate changes as i already told you.
                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


                  Originally posted by PaulN543 View Post
                  I can access TWRP but I can mount external SD Card to flash rom.. but it will boot from external SD.. help?

                  Help with what ?
                  What's the problem ?
                  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


                    LOL! That didn't make sense.

                    I meant to say, TWRP will boot from external SD card but it won't mount inside TWRP.
                    Now solved.

                    I have a TV110 TV Box but when I flash a firmware it says its a k200 device, any help with that?

                    Comment


                      Originally posted by PaulN543 View Post
                      LOL! That didn't make sense.

                      I meant to say, TWRP will boot from external SD card but it won't mount inside TWRP.
                      Now solved.

                      I have a TV110 TV Box but when I flash a firmware it says its a k200 device, any help with that?
                      I can't make a image for every maker that decides to change the name of the device, it's just not doable. The simple and faster solution is for you to remove the assert check in the update script.
                      Open the zip file, go to META-INF/com/google/android and open the update-script. Delete the lines that looks like this
                      Code:
                      (getprop("ro.product.device") == "YOUR_DEVICE" || getprop("ro.build.product") == "YOUR_DEVICE") || abort("This package is for \"YOUR_DEVICE\" devices
                      this is a \"" + getprop("ro.product.device") + "\".");
                      Zip it up and flash.

                      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


                        I also have another k200 variant MXIII (1G/8G) with AP6181 wifi chip that has a build id of KOT49H that won't work with TWRP_2.8.7.0_K200.img (due to dtb not found, see below)

                        renamed to recovery.img and put on root of microSD card
                        also tried flashing through adb shell dd if=/sdcard/recovery.img of=/dev/block/recovery

                        from build.prop
                        ro.build.description=k200_MXIII_1G-user 4.4.2 KOT49H 20150619 test-keys
                        ro.build.fingerprint=MBX/k200_MXIII_1G/k200_MXIII_1G:4.4.2/KOT49H/20150619:user/test-keys

                        PCB markings MXIII-M82-V3.1 2015-01-13

                        Code:
                        cat /proc/ntd
                        
                        dev:    block_num   blocksize  name
                        ntd0: 26000000 00800000 "nfcache"
                        ntd1: 52000000 00800000 "nfcode"
                        ntd2: 17b000000 00800000 "nfdata"
                        Code:
                        cat /proc/partitions
                        
                        major minor  #blocks  name
                        
                         253        0     512000 zram0
                         250        0     524288 cache
                         250        1      32768 logo
                         250        2      32768 recovery
                         250        3      32768 misc
                         250        4      32768 boot
                         250        5    1048576 system
                         250        6    5513216 data

                        TWRP_2.8.7.0_M8N.img works but cache shows size of 0 and system backup always fails at 31% (box freezes up completely)

                        I finally got fed up and soldered a RS232 pin header

                        I'm sure abdul_pt can update TWRP_2.8.7.0_K200.img to make it work, hope these logs help


                        TWRP_2.8.7.0_K200.img recovery image boot log

                        Maybe we just need two extra dtb's
                        aml_dt soc: m8 platform: k200 variant: 1G
                        aml_dt soc: m8 platform: k200 variant: 2G

                        Code:
                        10750169 bytes read
                        ## ANDROID Format IMAGE
                        ## Booting kernel from Legacy Image at 12000000 ...
                           Image Name:   Linux-3.10.33
                           Image Type:   ARM Linux Kernel Image (lzo compressed)
                           Data Size:    6517305 Bytes = 6.2 MiB
                           Load Address: 00208000
                           Entry Point:  00208000
                           Verifying Checksum ... OK
                            Ramdisk start addr = 0x12638000, len = 0x3e7f27
                        [USER="3767"]chip[/USER] is 1G DDr@
                        [USER="3767"]chip[/USER] version B, 1GDDR@
                              Multi dtb tool version: v2 .
                              Multi dtb detected, support 6 dtbs.
                                aml_dt soc: m8 platform: k200 variant: 1G
                                dtb 0 soc: m8                 plat: k200               vari: 2gsdhc          
                                dtb 1 soc: m8                 plat: k200               vari: 2gsdio          
                                dtb 2 soc: m8                 plat: k200               vari: sdhc            
                                dtb 3 soc: m8                 plat: k200               vari: sdio            
                                dtb 4 soc: m8m2               plat: n200               vari: 1G              
                                dtb 5 soc: m8m2               plat: n200               vari: 2G              
                              Not match any dtb.
                            Flat device tree start addr = 0x12a20000, len = 0x2000000 magic=0x5f4c4d41
                        board_usb_stop cfg: 0
                           Uncompressing Kernel Image ...


                        TWRP_2.8.7.0_M8N.img - recovery image boot log

                        Code:
                        10121331 bytes read
                        ## ANDROID Format IMAGE
                        ## Booting kernel from Legacy Image at 12000000 ...
                           Image Name:   Linux-3.10.33
                           Image Type:   ARM Linux Kernel Image (lzo compressed)
                           Data Size:    5996458 Bytes = 5.7 MiB
                           Load Address: 00208000
                           Entry Point:  00208000
                           Verifying Checksum ... OK
                            Ramdisk start addr = 0x125b8800, len = 0x3e9e82
                            Flat device tree start addr = 0x129a2800, len = 0x46f5 magic=0xedfe0dd0
                        board_usb_stop cfg: 0
                           Uncompressing Kernel Image ...
                        Last edited by perpetual; 07-21-2015, 03:07.

                        Comment


                          Originally posted by perpetual View Post
                          I also have another k200 variant MXIII (1G/8G) with AP6181 wifi chip that has a build id of KOT49H that won't work with TWRP_2.8.7.0_K200.img (due to dtb not found, see below)
                          :
                          :
                          Post a link of the FW for that device, that i will look at it.
                          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


                            Hi Abdul,

                            MBX/k200_MXIII_1G/k200_MXIII_1G:4.4.2/KOT49H/20150619:user/test-keys
                            dtb (device tree blob) and dts (device tree source branch)

                            Alot of google searching / linux tools used:
                            adt-bundle-linux-x86_64-20140702.zip - adb shell
                            split_bootimg.pl
                            dtc (device tree compiler) sudo apt-get install device-tree-compiler
                            any hex editor

                            Code:
                            adb shell
                            
                            dd if=/dev/block/boot of=/sdcard/boot.img
                            
                            adb pull /sdcard/boot.img
                            
                            ./split_bootimg.pl boot.img
                            
                            Page size: 2048 (0x00000800)
                            Kernel size: 6053777 (0x005c5f91)
                            Ramdisk size: 2020808 (0x001ed5c8)
                            Second size: 38912 (0x00009800)
                            Board name:
                            Command line:
                            Writing boot.img-kernel ... complete.
                            Writing boot.img-ramdisk.gz ... complete.
                            Writing boot.img-second.gz ... complete.
                            At first I was getting FATAL ERROR: Blob has incorrect magic number when using dtc (device tree compiler)
                            A google search brought me to a page that fdt.h has FDT_MAGIC defined as 0xd00dfeed

                            Viewing boot.img-second.gz in a hex editor d00dfeed was found ... getting closer!
                            Using a hex editor remove the header (1st 0x7ff bytes) of boot.img-second.gz so the file starts with the hex values D0 0D FE ED

                            Voila!

                            Code:
                            dtc -I dtb boot.img-second.gz -O dts -o k200_MXIII_1G.dts
                            dtc -I dtb boot.img-second.gz -O dtb -o k200_MXIII_1G.dtb
                            Hope I saved you some work
                            I can't wait to try a new TWRP_2.8.7.0_K200.img

                            Thanks in advance Abdul!
                            Cheers!
                            Attached Files
                            Last edited by perpetual; 07-21-2015, 03:10.

                            Comment


                              Originally posted by perpetual View Post
                              Hi Abdul,

                              MBX/k200_MXIII_1G/k200_MXIII_1G:4.4.2/KOT49H/20150619:user/test-keys
                              dtb (device tree blob) and dts (device tree source branch)

                              Alot of google searching / linux tools used:
                              adt-bundle-linux-x86_64-20140702.zip - adb shell
                              split_bootimg.pl
                              dtc (device tree compiler) sudo apt-get install device-tree-compiler
                              any hex editor

                              Code:
                              adb shell
                              
                              dd if=/dev/block/boot of=/sdcard/boot.img
                              
                              adb pull /sdcard/boot.img
                              
                              ./split_bootimg.pl boot.img
                              
                              Page size: 2048 (0x00000800)
                              Kernel size: 6053777 (0x005c5f91)
                              Ramdisk size: 2020808 (0x001ed5c8)
                              Second size: 38912 (0x00009800)
                              Board name:
                              Command line:
                              Writing boot.img-kernel ... complete.
                              Writing boot.img-ramdisk.gz ... complete.
                              Writing boot.img-second.gz ... complete.
                              At first I was getting FATAL ERROR: Blob has incorrect magic number when using dtc (device tree compiler)
                              A google search brought me to a page that fdt.h has FDT_MAGIC defined as 0xd00dfeed

                              Viewing boot.img-second.gz in a hex editor d00dfeed was found ... getting closer!
                              Using a hex editor remove the header (1st 0x7ff bytes) of boot.img-second.gz so the file starts with the hex values D0 0D FE ED

                              Voila!

                              Code:
                              dtc -I dtb boot.img-second.gz -O dts -o k200_MXIII_1G.dts
                              dtc -I dtb boot.img-second.gz -O dtb -o k200_MXIII_1G.dtb
                              Hope I saved you some work
                              I can't wait to try a new TWRP_2.8.7.0_K200.img

                              Thanks in advance Abdul!
                              Cheers!
                              Usually it's a multi DTB, so i would prefer if you upload the stock boot/recovery images.
                              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

                              Working...
                              X