Skip to content
peyo-hd edited this page Jan 17, 2016 · 35 revisions

Usage

Screen resolution : 1280x720 : Any monitor/TV which support this resolution could be connected.

Keymap with generic PC keyboard

  • F1 : Home
  • F2 : Back
  • F3 : Menu
  • F11 : Volume Down
  • F12 : Volume Up

ADB connection

  • Boot the android image with ethernet connected.
  • Check IP address of the board at Settings->About->Status
  • At host do 'adb connect [IP address]'

Avoid logcat flood

Apply following patch under frameworks/base, to avoid logcat flood by mouse event.

 core/java/android/view/GestureDetector.java
 @@ line 490 @@ public class GestureDetector {
     public boolean onTouchEvent(MotionEvent ev) {
 +        switch(ev.getAction() & MotionEvent.ACTION_MASK) {
 +        case MotionEvent.ACTION_HOVER_MOVE:
 +        case MotionEvent.ACTION_HOVER_ENTER:
 +        case MotionEvent.ACTION_HOVER_EXIT:
 +        case MotionEvent.ACTION_BUTTON_PRESS:
 +        case MotionEvent.ACTION_BUTTON_RELEASE:
 +        case MotionEvent.ACTION_SCROLL:
 +            return false;
 +        }
          if (mInputEventConsistencyVerifier != null) {

Enable GLSurfaceView

Currently mesa3d vc4 build is supporting only following formats.

  • RGB 565, Alpha 0, Depth 24 or 0, Stencil 8 or 0
  • RGB 888, Alpha 8, Depth 24 or 0, Stencil 8 or 0

Then apply following patch under frameworks/base, to modify default EGL config.

opengl/java/android/opengl/GLSurfaceView.java
@@ line 976 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
         public SimpleEGLConfigChooser(boolean withDepthBuffer) {
-            super(8, 8, 8, 0, withDepthBuffer ? 16 : 0, 0);
+            super(8, 8, 8, 8, withDepthBuffer ? 24 : 0, 0);
         }

Avoid screen flashing

On eng build, Strict mode behavior - flash screen when apps do long operations on main thread - is enabled by default. We can avoid it by applying following patch under frameworks/base. This option could be turned on via Settings -> Developer options -> Strict mode enabled.

core/java/android/os/StrictMode.java
@@ line 1068 @@ public final class StrictMode {
     if (IS_ENG_BUILD) {
-            doFlashes = true;
     }

Enable SW video decoder

HW video decoder is not ready yet. SW mode could be used by applying following patch under frameworks/av - with limited size & performance.

media/libstagefright/colorconversion/SoftwareRenderer.cpp
@@ line 113 @@ void SoftwareRenderer::resetFormatIfChanged(const sp<AMessage> &format) {
     case OMX_TI_COLOR_FormatYUV420PackedSemiPlanar:
     {
-            halFormat = HAL_PIXEL_FORMAT_YV12;
-            bufWidth = (mCropWidth + 1) & ~1;
-            bufHeight = (mCropHeight + 1) & ~1;
         break;
     }

How to apply Android TV Leanback Launcher

Find latest version of Launcher binary in following link.

https://developers.google.com/android/nexus/drivers#fugu

Before doing Android build step, Extract the binary package on top of the Android source, Then LeanbackLauncher apk will be placed on the path below.

vendor/google/fugu/proprietary/LeanbackLauncher.apk

After that do Android build and write target filesystem. Check Launcher2 is replaced by LeanbackLauncher on target SD card's /system/priv-app filder.

If both launchers co-exist. Remove Launcher2 by mounting the SD card on host PC.

Clone this wiki locally