Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

S905X Android 8.0 Oreo (Tested on Mini M8S II. Possibile to work on other GXL/S905X boxes. Testing needed! "WIP")

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

    Originally posted by soldiaz View Post
    01520717 : I used AML Tools 6.0.0 and with them it was possible to open DTB. There are 2 DTBs inside.

    Remote.cfg does have factory code but all I can see is customcode. Is it the same?

    Then..in which order is keymap filled??? I mean in remote I guess you could "declare" what happens when pressing key. In those dtbs its like

    ....but no information what this shall do, understand?

    Remote.cfg is like this:
    Edit this file.Select values from your remote.conf from the old version.

    Comment


      Sorry for asking again...

      I have unpacked several DTB now....

      A. OREO (8.0.0)lewy DTB (1 inside): no remote.conf, customcode, keymap in DTB
      B. Poison (7.1.2) DTB (2 inside): remote.conf, no customcode, no keymap in DTB

      This is old remote.conf:

      #amlogic NEC remote
      factory_code = 0xfe010000
      work_mode = 0
      repeat_enable = 1
      repeat_delay = 40
      repeat_peroid = 39
      release_delay = 121
      debug_enable = 1

      fn_key_scancode = 0x00
      left_key_scancode = 0x51
      right_key_scancode = 0x50
      up_key_scancode = 0x16
      down_key_scancode = 0x1a
      ok_key_scancode = 0x13

      mouse_begin
      0 0x51 //mouse key left
      1 0x50 //mouse key right
      2 0x16 //mouse key up
      3 0x1a //mouse key down
      mouse_end
      key_begin
      0x11 102 #HOME
      0x19 158 #EXIT
      0x4c 125 #SETUP(MENU)
      0x40 116 #ON/OFF
      0x18 115 #VOL+
      0x10 114 #VOL-
      0x4e 2 #1
      0x0d 3 #2
      0x0c 4 #3
      0x4a 5 #4
      0x09 6 #5
      0x08 7 #6
      0x46 8 #7
      0x05 9 #8
      0x44 266 #SHORTCUT_AUDIO
      0x0f 255 #MAIN_MENU f7
      0x12 269 # F9
      key_end
      This is OREO DTB:

      map_0 {
      mapname = "amlogic-remote-1";
      customcode = <0x7f80>;
      release_delay = <0x50>;
      debug_enable = <0x1>;
      fn_key_scancode = <0x52>;
      fn_key_scancode_other = <0x5b>;
      cursor_left_scancode = <0x25>;
      cursor_right_scancode = <0x27>;
      cursor_up_scancode = <0x26>;
      cursor_down_scancode = <0x28>;
      cursor_ok_scancode = <0xd>;
      size = <0x1f>;
      keymap = <0x30000b 0x310002 0x320003 0x330004 0x340005 0x350006 0x360007 0x370008 0x380009 >;
      linux,phandle = <0x23>;
      phandle = <0x23>;
      };

      map_1 {
      mapname = "amlogic-remote-2";
      customcode = <0xfe01>;
      release_delay = <0x50>;
      size = <0x35>;
      keymap = <0x10002 0x20003 0x30004 0x40005 0x50006 0x60007 0x70008 0x80009 0x9000a 0xa000b 0x1f01d2 >;
      linux,phandle = <0x24>;
      phandle = <0x24>;
      };

      map_2 {
      mapname = "amlogic-remote-3";
      customcode = <0xbd02>;
      release_delay = <0x50>;
      size = <0x11>;
      keymap = <0xca0067 0xd2006c 0x990069 0xc1006a 0xce0061 0x450074 0xc50085 0x800071 0xd0000f 0xd6007d 0x950066 0xdd0068 0x8c006d >;
      linux,phandle = <0x25>;
      phandle = <0x25>;
      };
      In OREO there is no factory_code, instead customcode? Is this equal?

      Old remote.conf has factory_code and assigns values to keys: 0x44 266 #SHORTCUT_AUDIO

      How do I continue? like this?

      map_1 {
      mapname = "amlogic-remote-2";
      customcode = <0xfe010000>;
      release_delay = <0x50>;
      size = <0x35>;
      keymap = <0x10002 0x20003 0x30004 0x40005 0x50006 0x60007 0x70008 0x80009 0x9000a 0xa000b 0x1f01d2 >;
      linux,phandle = <0x24>;
      phandle = <0x24>;
      };

      Tried to make it clear with colors...

      Comment


        Cant edit prior post...

        0x11 102 #HOME
        0x19 158 #EXIT
        0x4c 125 #SETUP(MENU)
        0x40 116 #ON/OFF
        0x18 115 #VOL+
        0x10 114 #VOL-
        0x4e 2 #1
        0x0d 3 #2
        0x0c 4 #3
        0x4a 5 #4
        0x09 6 #5
        0x08 7 #6
        Or just paste the values from old remote?

        keymap= <0x08 0x11 0x4c> ? ....

        Comment


          Originally posted by soldiaz View Post
          Cant edit prior post...



          Or just paste the values from old remote?

          keymap= <0x08 0x11 0x4c> ? ....
          Those codes that are in the new from the old.

          Comment


            Originally posted by soldiaz View Post
            Sorry for asking again...

            I have unpacked several DTB now....

            A. OREO (8.0.0)lewy DTB (1 inside): no remote.conf, customcode, keymap in DTB
            B. Poison (7.1.2) DTB (2 inside): remote.conf, no customcode, no keymap in DTB

            This is old remote.conf:



            This is OREO DTB:



            In OREO there is no factory_code, instead customcode? Is this equal?

            Old remote.conf has factory_code and assigns values to keys: 0x44 266 #SHORTCUT_AUDIO

            How do I continue? like this?

            map_1 {
            mapname = "amlogic-remote-2";
            customcode = <0xfe010000>;
            release_delay = <0x50>;
            size = <0x35>;
            keymap = <0x10002 0x20003 0x30004 0x40005 0x50006 0x60007 0x70008 0x80009 0x9000a 0xa000b 0x1f01d2 >;
            linux,phandle = <0x24>;
            phandle = <0x24>;
            };

            Tried to make it clear with colors...
            Did you replace /vendor/etc remote.conf in OREO rom by your remote.conf?

            Comment


              No, there was no VENDOR directory...

              Comment


                Those codes that are in the new from the old.
                Sorry, didnt understand

                Comment


                  Originally posted by soldiaz View Post

                  Sorry, didnt understand
                  In the custom code line ,you need to write something in the factory code 0?fe01 line.Then the console should be determined by the prefix.

                  Comment


                    factory_code=custom_code.Although i already confused.

                    Comment


                      You are confused? :-P

                      seems like yes factory_code=custom_code
                      • # factory_code each device has it's unique factory code.
                      • # pattern: custom_code(16bit) + index_code(16bit)
                      • # examble: 0xff000001 = 0xff00(custom_code) + 0001(index_code)
                      I have a new TX3-Pro (S905X- Android 6) box. I run it with kszaq 7.0.2.009 version (thanks to kszaq, great job!). The only problem I had was that the remote control didn’t work at all. Also copying remote.conf from the Android /etc folder to libreelec…


                      Guess we supposed to open special remote thread, you want to contribute? :-P

                      Comment


                        Originally posted by soldiaz View Post
                        01520717 : I used AML Tools 6.0.0 and with them it was possible to open DTB. There are 2 DTBs inside.

                        Remote.cfg does have factory code but all I can see is customcode. Is it the same?

                        Then..in which order is keymap filled??? I mean in remote I guess you could "declare" what happens when pressing key. In those dtbs its like

                        ....but no information what this shall do, understand?

                        Remote.cfg is like this:
                        The information in remote.conf is basically the same as a remote custom_map in the device tree.
                        - customcode in the device tree is the same as the factory code in remote.conf
                        - the keymaps in the device tree are scancodes and keycodes, e.g.

                        keymap = 0xc000b 0x540002 0x160003 0x150004
                        first entry scancode=0xc (this is actually a 16-bit hex code but leading zeros can be omitted), keycode=0x000b (the 0 key on the remote)
                        second entry scancode=0x54, keycode=0x0002 (the 1 key)
                        etc.
                        If you see a keymap entry something like 0x1, this means scancode=0x0000, keycode=0x0001 (the 2 key)

                        This link gives some background info on how to do this and also shows the keycode table. They use a REMOTE_KEY macro that converts something like REMOTE_KEY(0x01,0x02) to 0x10002.

                        Comment


                          01520717 Thanks! The lighted bit up!

                          If I understood correctly then

                          1. Insert factory / customcode to DTB
                          2. Map buttons

                          I found an example through your given link but it is not clear to me

                          In this example there is no "keymap" just the mapping....

                          map_0{ mapname = "amlogic-remote-1"; customcode = <0xfb04>; REMOTE_KEY(0x01,158) REMOTE_KEY(0x48,102)>;
                          right here they give it like this:

                          keymap = <REMOTE_KEY(0x09,115)>
                          I would like to set like 10 buttons....

                          Is it then like this?

                          keymap = <1st_KEY(0x09,115); 2nd_KEY(0x09,115;>

                          Comment


                            I would like to set like 10 buttons....

                            Is it then like this?

                            keymap = <1st_KEY(0x09,115) 2nd_KEY(0x09,115)>
                            How do you get scancode? With an app?

                            Comment


                              You can find your remote's scan codes by opening up a terminal, e.g. Terminal Emulator for Android, pressing one key on the remote then running
                              dmesg | tail
                              and you should see the scan code generated by that key. Then you look up the key code for that key at the link in my last post and find the hex code for the key. In the keymap entry in the device tree, there should be one entry for each key on your remote.

                              For example, if you press the Home key and you see a scancode of 0x15 in the dmesg output you lookup the Home key in the keycode table and see it is 102 or 0x66. The keymap entry for this key will be 0x150066. Do the same for the next key and separate entries in the keymap with a space, e.g. 0x150066 0x130064 etc.

                              Comment


                                Thanks! I guess I will try it!

                                I am still thinking of one thing:

                                There are Nougat DTBs without customcode (=factorycode) inside BUT with etc\remote.conf....

                                The DTBs with customcode inside do not have etc\remote.conf but have (in my case) remote_mouse1.tab, remote_mouse2.tab in etc\

                                ...

                                Maybe, if customcode is missing in DTB then device looksup etc\remote.conf?

                                Comment

                                Working...
                                X