Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

[EXPERIMENTAL] Unofficial CM12 for WeTek Play with Kodi & TVH Live TV

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

    [EXPERIMENTAL] Unofficial CM12 for WeTek Play with Kodi & TVH Live TV





    Release notes

    This build includes a totally new kernel and Amlogic code based on their latest SDK, and I took the chance to get rid of Amlogic DVB drivers and use those from WeTek Play's OpenELEC build; by doing this I am able to run DVBAPI apps like Tvheadend.
    Kodi Live TV support under Android was one of the most requested features, this experimental build allows you to run Kitkat (CyanogenMOD 11) or Lollipop (CyanogenMOD 12 or Android TV) and Kodi Live TV (WeTek Theater is no longer supported with the provided drivers).

    The new 3.10 kernel brings OMX support as well (Android libstagefright media decoding), while Amlogic's prebuilt libraries work very good on KitKat they don't work at all with Lollipop.
    Just to be sure to have a good media experience use Kodi, at the end of the post you will find latest stable official Kodi packed in a flashable zip and in the second post you will find a link to a modified version that should give a better experience on the WeTek device.

    Now I will give you some details on how to configure Tvheadend, if you already know what to do you can skip this section.

    Tvheadend will run automatically at boot and you can access to it from a web browser (even from a different device, you are not forced to do it from the box) at http://wetek_ip_address:9981

    From this WebUI click "Configuration" -> "DVB Inputs" -> "Networks" and add a new Network according to the type of tuner you have (for example I created a DVB-S network called "Hotbird" and assigned the E13.0 pre-defined muxes, just pay attention that they are not bleeding edge updated so if you don't find a channel you might have to insert manually the transponder by looking at frequencies on sites like kingofsat or lyngsat).

    After that go to "TV Adapters", click the link with a folder icon showing your adapter's name (if you're running the dual DVB-S2 tuner you will see two of them, #1 is the input closer to the edge of the box, while #0 the one closer to the rear usb ports), and click "Enabled", configure the eventual parameters (DiseqC, Unicable, etc.) and save the settings.
    Go to the option right under the adapter name, assign it to the network that you have created and configure the eventual parameters.

    Now go back to "Networks", after a couple of minutes you should see the "Scan Q length" lowering its value, when in reaches 0 everything has been scanned and you can proceed mapping the channels from "Services" section.

    For further instructions, here you can find a tutorial to show you how to configure the DVB-T/C tuner, and here one for the DVB-S tuner.

    Before leaving the configuration go to "Recordings" and set a "Recording System Path" pointing it to your external storage (on my roms it will be "/storage/sdcard1" for the MicroSD, "/storage/usbdisk0" for the lower rear usb port, "/storage/usbdisk1" for the upper rear usb port and "/storage/usbdisk2" for the side usb port).
    Not doing that will drive Kodi's Tvheadend client plugin crazy trying to determine the available space for recordings.

    Now you can launch Kodi, go to its settings, enable Live TV and select the "Tvheadend backend".

    Remember that this is still something EXPERIMENTAL

    Like the other Lollipop buils, remember, this is not a bug, but a consequence of the switch to art from dalvik: first boot, updates and apps installation will take longer; this happens because art compiles the apk and does not work like dalvik that was using a just-in-time approach (so expect almost 10 minutes for the first boot and future upgrades)


    First install instructions

    * As really first thing get this CWM recovery, unrar it and copy "recovery.img" to a MicroSD.
    * Power off your device and unplug the AC power cord.
    * Get the latest available ROM and GAPPS version from the links below and copy them to a MicroSD card.
    * Now insert the MicroSD card in your STB.
    * Plug the AC power cord while you keep pressed the little reset pinhole (located on the bottom of the device) for 10 seconds (just count slowly to ten and it will be good).
    * Once the device has booted to recovery perform a factory reset and flash the ROM's zip for first followed by the GAPPS zip.
    * Reboot and enjoy CyanogenMOD.



    Update instructions

    * If you're coming from the "regular", not "experimental" builds, please follow the "First install instructions"
    * Get the latest available ROM and GAPPS version from the links below and copy them to a MicroSD card.
    * Now insert the MicroSD card in your STB.
    * Enable "Developer options" following this tutorial and from it enable the "Reboot to recovery" option.
    * Bring up power menu by keeping pressed the power button on the STB for a couple of seconds (or pushing F4 if you have a keyboard plugged in) and select "Reboot -> recovery".
    * Once the device has booted to recovery flash the ROM's zip for first followed by the GAPPS zip.
    * Reboot and enjoy your updated CyanogenMOD.



    Downloads

    * ROM (CM12) 2015-03-20
    * GAPPS 2015-01-07 (LITE)

    * ROM (Android TV) 2015-03-20
    * GAPPS (Android TV) 2015-01-30

    * ROM (CM11) 2015-04-06 - Real 1080p output (r1)
    * GAPPS 2014-06-06 (LITE)

    * Kodi 14.1 "Preinstall"
    Last edited by ChristianTroy; 06 April 2015, 10:32.
    WeTek Play
    Recoveries: CWM | TWRP
    Lollipop ROMs: CyanogenMOD 12 | OMNI | Android TV
    KitKat ROMs: CyanogenMOD 11 | OMNI | ParanoidAndroid | AOKP
    Misc: Unbrick WeTek Play

    #2
    Misc tips

    * If you wanna start Kodi at boot go to "Developer options" and enable the last entry called "Start Kodi at boot"
    * There are some keyboard shortcuts: F1 (Home), F2 (Menu), F3 (App switch) and F4 (Power menu) and some CEC remote shortcuts: Red (Power off the device), Green (Home), Yellow (Menu) and Blue (Search).
    * By enabling "Google remote support" in "Other" section of "Network" configuration you will be able to control your device from your Android smartphone / tablet by using this app on it.
    * When an app forces the portrait orientation, the default behavior is to simulate a portrait / phone-like UI adding black bars to the sides (an example is Antutu when it runs the benchmark, or Box.com). If you prefer to have a landscape stretched UI flash this zip. To revert to the default behavior flash this one instead.
    Note that the setting will persist even if you upgrade the ROM so you have to flash that zip only once.
    * Once you have configured your OSCam reader, set-up Tvheadend this way.


    Real 1080p output (optional zip for CM11)

    On Android Amlogic MX SOC uses a 1280x720 framebuffer coupled with a scaler to do the up/down scaling.
    They did it for a good reason, 720p resolution has half the pixels of the 1080p one so the UI will be snappier and 3D performance will be better but if you don't care about that and you just wanna the best image quality (I noticed the scaler gives me a weird motion when watching sports) you can flash that optional zip.
    Once flashed if you wanna change resolution go to Android Display settings, set your resolution and reboot the device (this step is required because some stuff has to be set at boot because Android is not meant to change resolution while it's running).
    I didn't do it for Lollipop builds because it runs already slower than Kitkat, adding this mod might be too much

    Since you have this option (WeTek Play is the only MX device that allows you to do that) I would give it a try, if you have a good TV set you will clearly see the difference.



    Kodi 14.2 WeTek_mod_v1

    This is a Kodi build that includes some patches not included upstream that will improve (hopefully) your overall experience.

    Since it's been signed with different keys respect those from Kodi build server you won't be able to install it over the older Kodi but you'll have to uninstall it.
    Take a backup of /sdcard/Android/data/org.xbmc.kodi folder before uninstalling or Android will delete it and you'll lose your configuration; restore it after installing the new APK.

    Download

    You can use OE's /sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata/advancedsettings.xml file
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <advancedsettings>
    
      <network>
        <cachemembuffersize>20971520</cachemembuffersize>
      </network>
    
      <samba>
        <clienttimeout>30</clienttimeout>
      </samba>
    
      <network>
        <readbufferfactor>4.0</readbufferfactor>
      </network>
    
      <pvr>
        <minvideocachelevel>5</minvideocachelevel>
        <minaudiocachelevel>20</minaudiocachelevel>
      </pvr>
    </advancedsettings>
    or (this is what I'm using)
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <advancedsettings>
      <network>
        <buffermode>1</buffermode>
        <cachemembuffersize>31457280</cachemembuffersize>
        <readbufferfactor>10</readbufferfactor>
      </network>
      <gui>
        <algorithmdirtyregions>0</algorithmdirtyregions>
      </gui>
    </advancedsettings>

    External disk spindown for WeTek Play

    Flash this zip from recovery, once booted to android use a root capable file explorer (like Solid Explorer for example) and edit "/system/etc/spindown.conf" to fit your needs.

    The default configuration is set-up to spin down "sda" disk after 3600 seconds (60 minutes) using sg3-tools.

    You don't need to flash the zip again if you do a rom update because I've added the addon.d backup script.

    Note: your drive have to ne able to be set to sleep using "sg_start --stop /dev/block/$disk", I've tried it with 3 drives, 2 WDs and 1 Seagate and it worked.


    Debian chroot

    As very first thing you have to set-up a MicroSD card with two primary partitions, the first one must be formatted in FAT32, the second one can be left unformatted because the "sdcardfiles" zip will format it (I suggest you to give at least 1GB of space to the secondary partition).
    After that grab the two zips: wetek-debian-chroot-sdcardfiles.zip and wetek-debian-chroot-systemfiles-rc1.zip and copy them (together with CWM's recovery.img) to the FAT32 partition of the MicroSD (the primary one).
    Boot to recovery and flash the two zips (the order doesn't matter).

    How to actually use it:

    The "systemfiles" zip will add an helper file that I called "debian-chroot", together with the init.d script it will set up the chroot at boot and run the configured services (as a template the /system/xbin/debian-chroot file includes the execution of dropbear daemon, so you can use it as starting point for your own stuff).
    To access Debian you can just type as root from terminal emulator / serial console / adb over network "debian-chroot chroot", othwerise you can access using an SSH client to the configured Dropbear SSH server that is listening on port 2222.
    There are two default users: 'root' (pwd: wetek) and a regular user 'wetek' (pwd: wetek), both can be used to access to the ssh server.
    Last edited by ChristianTroy; 29 March 2015, 08:24.
    WeTek Play
    Recoveries: CWM | TWRP
    Lollipop ROMs: CyanogenMOD 12 | OMNI | Android TV
    KitKat ROMs: CyanogenMOD 11 | OMNI | ParanoidAndroid | AOKP
    Misc: Unbrick WeTek Play

    Comment


      #3
      ChristianTroy port tvheadend to android and works with kodi.

      Comment


        #4
        ? What do you mean?
        WeTek Play
        Recoveries: CWM | TWRP
        Lollipop ROMs: CyanogenMOD 12 | OMNI | Android TV
        KitKat ROMs: CyanogenMOD 11 | OMNI | ParanoidAndroid | AOKP
        Misc: Unbrick WeTek Play

        Comment


          #5
          Sory. I try to ask that android or openelec

          Comment


            #6
            Openelec.
            WeTek Play
            Recoveries: CWM | TWRP
            Lollipop ROMs: CyanogenMOD 12 | OMNI | Android TV
            KitKat ROMs: CyanogenMOD 11 | OMNI | ParanoidAndroid | AOKP
            Misc: Unbrick WeTek Play

            Comment


              #7
              * ROM 2015-01-30
              * GAPPS 2015-01-07 (LITE)

              * ROM (Android TV) 2015-01-30
              * GAPPS (Android TV) 2015-01-30


              In the "regular" CM12 build added some things I had forgotten when upgrading the device tree from the old to the new kernel (the most important, I had forgotten to mkdir the paths for the hard drives mounting).
              Included the new tvheadend posted in OpenELEC section (the one with the different decsa algorithm)

              Added Android TV build and just a tip for the first boot of it...
              Don't change the language, use the default english already selected (don't know why but changing language is VERY sluggish/laggy), when you're doing configuring it you can change it to your preferred one in Android's settings.
              Another thing, if the screen stays black after allowing or denying the "Network location" option (the last step of the wizard) for more than 10 seconds just bring up power menu and perform a reboot, the Wizard will kick in again, you'll have to just click continue because everything is configured and it will work. I don't know why it acts like this sometimes!
              WeTek Play
              Recoveries: CWM | TWRP
              Lollipop ROMs: CyanogenMOD 12 | OMNI | Android TV
              KitKat ROMs: CyanogenMOD 11 | OMNI | ParanoidAndroid | AOKP
              Misc: Unbrick WeTek Play

              Comment


                #8
                Guys if you experience some freezes of the box after running for certain time an encrypted channel (I noticed that it happens to me between 45/60 minutes after tuning to such channels) it might be caused by the new decsa library, it looks like it has a memory leak.

                I will revert to the older binary, in the meantime you can flash this zip to go back to the one from the older build.

                After reverting I'm tuned on an encrypted channel since an hour and I don't see any weird memory issue
                WeTek Play
                Recoveries: CWM | TWRP
                Lollipop ROMs: CyanogenMOD 12 | OMNI | Android TV
                KitKat ROMs: CyanogenMOD 11 | OMNI | ParanoidAndroid | AOKP
                Misc: Unbrick WeTek Play

                Comment


                  #9
                  Oh, guys, I forgot to mention that in this build I've enabled Amlogic's "anymote" support (the backend to be remotely controlled use Google TV remote app).
                  To use it go to "Network -> Other" options in Android's settings and enable "Google TV Remote support", after that install this app on your Android phone/tablet and you'll be able to use it as a remote.

                  PS: I didn't have much luck running the "Google TV Remote" app from the Play Store, it wouldn't find the device at all, maybe they are enforcing a private key handshake like in newer Google Cast Receiver to be able to run it only on official Google TV devices.

                  PPS: remote audio input doesn't work, the Amlogic's anymote throws an exception regarding a class not found. Can't do much about that since it comes as a precompiled APK (and I already had to do some smali hack to be able to run it on Lollipop)
                  WeTek Play
                  Recoveries: CWM | TWRP
                  Lollipop ROMs: CyanogenMOD 12 | OMNI | Android TV
                  KitKat ROMs: CyanogenMOD 11 | OMNI | ParanoidAndroid | AOKP
                  Misc: Unbrick WeTek Play

                  Comment


                    #10
                    * ROM (CM12) 2015-01-31
                    * GAPPS 2015-01-07 (LITE)

                    * ROM (Android TV) 2015-01-31
                    * GAPPS (Android TV) 2015-01-30

                    * ROM (CM11) 2015-01-31
                    * GAPPS 2014-06-06 (LITE)


                    Lollipop ROMs:

                    * Reverted tvheadend to the older version that doesn't suffer of memory leak
                    * Introduced a workaround to prevent Netflix from using OMX
                    * Updated upstream sources

                    Kitkat ROM:

                    Added CM11 based on the new kernel. It's generally faster than Lollipop, as I have said ART probably is too much for the MX
                    I haven't added the extra stuff to Android settings so I'm including the ugly MboxSettings app, I have given more love to Lollipop, I have to admit it, in case if you people prefer this rom I can start customizing it more.
                    I suggest you to install SuperSU from Play Store, let it update the "su" binary choosing the normal way and converting it into a system app + installing the backup script to let it survive rom updates. This because CM11's SuperUser doesn't work nicely with the way Kodi request root rights.
                    Beside the same F1/F4 shortcuts as the Lollipop roms above, there's a further shortcut with F8 to toggle expanded desktop mode.
                    WeTek Play
                    Recoveries: CWM | TWRP
                    Lollipop ROMs: CyanogenMOD 12 | OMNI | Android TV
                    KitKat ROMs: CyanogenMOD 11 | OMNI | ParanoidAndroid | AOKP
                    Misc: Unbrick WeTek Play

                    Comment


                      #11
                      * ROM (CM11) 2015-02-01

                      * Added the most important things of MboxSettings to Android settings (display resolution, overscan, cec, digital audio and google tv remote).
                      * Added an entry, accessible through developer settings (at the very end of the list), to enable the autostart of Kodi at boot
                      WeTek Play
                      Recoveries: CWM | TWRP
                      Lollipop ROMs: CyanogenMOD 12 | OMNI | Android TV
                      KitKat ROMs: CyanogenMOD 11 | OMNI | ParanoidAndroid | AOKP
                      Misc: Unbrick WeTek Play

                      Comment


                        #12
                        * ROM (CM11) 2015-02-02



                        * added the new suspension method (I will quote my previous post to describe it)
                        Originally posted by ChristianTroy
                        Guys I've been trying a new suspension method, it's a better solution IMHO.

                        I'm going to use Android's capabilities to prevent the device from entering suspension (with wakelocks) to only let the kernel turn off everything but without really entering suspension, something like flashing the "wetek-disable-shutdown.zip" that you find in the second post of all my other rom's threads.

                        But I did a modification in the kernel: it will turn the power led blue/red if the display is on/off so you'll know if you actually turned it off. I decided to mantain on the eventually enabled wifi or eth led so you'll see if you have connection or not.

                        This thing is very useful if you're going to program a recording in tvheadend, otherwise the device won't wake from sleep (at least not with easy work without using Android's AlarmManager to create a new wake up task) and in this way the device won't have to perform boot from scratch once you put it to sleep, but it will be instantly on again.
                        It will consume a little bit more of power though (haven't run much tests but since this device when it's on runs at 7w, I guess it will be <5w) but I think that many of you keep it running all the time, in this way it's like if it was running but just with the output turned off
                        * corrected an unwanted (by me) behavior of Amlogic's android ethernet service that was putting off the interface when the display was being turned off. If you were connected using eth you would find yourself without network with the new suspension method... if for some reason you want your eth to be turned off when the display is off add "ro.screen_off.disable_ethernet=true" to /system/build.prop

                        * disabled google setup wizard that was causing a black screen on first boot because it was invoking the AOSP version of setWifiEnabled instead of CM's one with AppOps support

                        * enabled the execution of a boot service to set up the remote (you couldn't power off the device using the remote before this build) that I had forgotten to set up after moving to the new kernel branch

                        ps: let me know what you think about this new suspension method, personally I do really love it and was thinking about that since quite some time
                        WeTek Play
                        Recoveries: CWM | TWRP
                        Lollipop ROMs: CyanogenMOD 12 | OMNI | Android TV
                        KitKat ROMs: CyanogenMOD 11 | OMNI | ParanoidAndroid | AOKP
                        Misc: Unbrick WeTek Play

                        Comment


                          #13
                          Originally posted by ChristianTroy View Post
                          * ROM (CM12) 2015-01-31
                          * GAPPS 2015-01-07 (LITE)

                          * ROM (Android TV) 2015-01-31
                          * GAPPS (Android TV) 2015-01-30

                          * ROM (CM11) 2015-01-31
                          * GAPPS 2014-06-06 (LITE)


                          Lollipop ROMs:

                          * Reverted tvheadend to the older version that doesn't suffer of memory leak
                          * Introduced a workaround to prevent Netflix from using OMX
                          * Updated upstream sources

                          Kitkat ROM:

                          Added CM11 based on the new kernel. It's generally faster than Lollipop, as I have said ART probably is too much for the MX
                          I haven't added the extra stuff to Android settings so I'm including the ugly MboxSettings app, I have given more love to Lollipop, I have to admit it, in case if you people prefer this rom I can start customizing it more.
                          I suggest you to install SuperSU from Play Store, let it update the "su" binary choosing the normal way and converting it into a system app + installing the backup script to let it survive rom updates. This because CM11's SuperUser doesn't work nicely with the way Kodi request root rights.
                          Beside the same F1/F4 shortcuts as the Lollipop roms above, there's a further shortcut with F8 to toggle expanded desktop mode.
                          Very NICE!!!! KK runs very well on the mx chip! Love the expanded desktop!

                          Comment


                            #14
                            Yes, it is, you can fetch today's build that is really a daily driver, I've been using it pretty intensively today and so far I'm pleased...

                            I even found out a button mapping for live tv in Kodi that satisfies my needs:

                            Code:
                              <FullscreenLiveTV>
                                <keyboard>
                                  <left>StepBack</left>
                                  <right>StepForward</right>
                                  <up>ChannelUp</up>
                                  <down>ChannelDown</down>
                                  <right>ActivateWindow(PVROSDChannels)</right>
                                  <backspace>Stop</backspace>
                                  <left>Back</left>
                                  <menu>ActivateWindow(PVROSDGuide)</menu>
                                </keyboard>
                              </FullscreenLiveTV>
                            Code:
                              <PVROSDChannels>
                                <keyboard>
                                  <backspace>Close</backspace>
                                  <escape>Close</escape>
                                  <c>Close</c>
                                  <menu>Info</menu>
                                  <left>PageUp</left>
                                  <right>PageDown</right>
                                </keyboard>
                              </PVROSDChannels>
                            WeTek Play
                            Recoveries: CWM | TWRP
                            Lollipop ROMs: CyanogenMOD 12 | OMNI | Android TV
                            KitKat ROMs: CyanogenMOD 11 | OMNI | ParanoidAndroid | AOKP
                            Misc: Unbrick WeTek Play

                            Comment


                              #15
                              Debian chroot

                              As very first thing you have to set-up a MicroSD card with two primary partitions, the first one must be formatted in FAT32, the second one can be left unformatted because the "sdcardfiles" zip will format it (I suggest you to give at least 1GB of space to the secondary partition).
                              After that grab the two zips: wetek-debian-chroot-sdcardfiles.zip and wetek-debian-chroot-systemfiles.zip and copy them (together with CWM's recovery.img) to the FAT32 partition of the MicroSD (the primary one).
                              Boot to recovery and flash the two zips (the order doesn't matter), after each ROM upgrade you'll have to flash only "wetek-debian-chroot-systemfiles.zip" (the other one is just to set up Debian, flash it in case you mess up the system and wanna start from scratch).

                              How to actually use it:

                              The "systemfiles" zip will add an helper file that I called "debian-chroot", together with the init.d script it will set up the chroot at boot and run the configured services (as a template the /system/xbin/debian-chroot file includes the execution of dropbear daemon, so you can use it as starting point for your own stuff).
                              To access Debian you can just type as root from terminal emulator / serial console / adb over network "debian-chroot chroot", othwerise you can access using an SSH client to the configured Dropbear SSH server that is listening on port 2222.
                              There are two default users: 'root' (pwd: wetek) and a regular user 'wetek' (pwd: wetek), both can be used to access to the ssh server.
                              WeTek Play
                              Recoveries: CWM | TWRP
                              Lollipop ROMs: CyanogenMOD 12 | OMNI | Android TV
                              KitKat ROMs: CyanogenMOD 11 | OMNI | ParanoidAndroid | AOKP
                              Misc: Unbrick WeTek Play

                              Comment

                              Working...
                              X