Android build with DTV Support

Hi Gouwa,
How to build Android Mmallow or Nougat with DTV support. General build process is not generating DTVPlayer apk and not compiling other supported dvb libraries.


Tried adding BOARD_HAVE_TV := true in , but nothing happened.!

I only have test ROM for DVB. Did you need the source code? @Frank.DTV can answer your question.

@Terry Yes need the source code to build android, can you share the ROM atleast will try with it initally.

@Terry you got the ROM from @Frank.DTV .?

I only have the DVB apk and library but don’t have the DVB source code.
That ROM was built by myself and not from Frank.DTV.

@Terry can you tell me how to build the ROM with DVB, you can share the apk and libraries i can install them and check.

Now is National Day Holidays in China. I am not at office.
I will provide the DVB patch for you after the holiday.
You can try to flash the DVB ROM and have a test.

@Terry Thanks. Enjoy your holidays.!

@Terry Can you provide me the DVB ROM link, and Please please provide me the DVB Patch also.


This is DVB ROM
This is DVB Patch
Have a try.

Are there instructions how to build Android Nougat with DTV support like VIM2_Nougat_vTV_V170930?

You only need to patch the DVB Patch and build android update image again.

# cd  ~/$Project/uboot
# make distclean
# make CROSS_COMPILE=aarch64-linux-gnu- kvim2_defconfig
# make CROSS_COMPILE=aarch64-linux-gnu- 
# cd ~/$Project
# source build/
# lunch kvim2-userdebug-64
# make otapackage -jN
1 Like

Can you advise how to apply patch? As I can see in the archive it contains diffs to the files, probably those available on regular Nougat image GitHub.


The directory ‘device-khadas’

  • Copy the file ‘0001-DVB-add-support-for-DVB.patch’ to the directory ‘device/khadas’
  # copy device-khadas/0001-DVB-add-support-for-DVB.patch ~/$PROJECT/device/khadas
  • Copy the file ‘0002-DVB-add-build-config-for-VTV-application-KVIM2.patch’ to the directory ‘device/khadas’
  # copy device-khadas/0002-DVB-add-build-config-for-VTV-application-KVIM2.patch ~/$PROJECT/device/khadas
  • Go to the directory ‘device/khadas’
  # cd ~/$PROJECT/device/khadas
  • Apply the patch
  # git am 0001-DVB-add-support-for-DVB.patch
  # git am 0002-DVB-add-build-config-for-VTV-application-KVIM2.patch
1 Like

This patch fails:


All other patches succeed.

Problem is that device/khadas/0001-DVB-add-support-for-DVB.patch is not corresponding to kvim/init.amlogic.board.rc file that is on GitHub.

Used DVB_Patch uploaded on 2017-10-10.

1 Like

You can modify this file manually.
I will verify it tommorow because I’m not at office now.

Modified manually, but stuck on build error:


This error is shown when patches were applied on never built sources. Make sure to build kvim2, then apply patches and rebuild again - then it succeeds.

It doesn’t matter about DVB patch. Maybe you need to check your PC host environment.

This is how I solved:

  1. Download sources
  2. Build kvim2 as usual
  3. Apply patches
  4. Build again

If patches were applied on sources that were not built yet, build fails on mpeg part. If it was built before applying the patch, it worked.

Anyway, I have another issue - VTV app fails channel search - whether it’s automatic or manual, as soon as it is initated it stops and comes back to start window of app. The same happens with VIM2_Nougat_vTV_V170930 firmware.

I have tried with DVB-T (Lithuania) antenna plugged in.

And one more thing - can I make VTV app not autostart when Android boots up? I want to launch it myself when wanted.

I didn’t find the issue from built error message provided by you.
The amffmpeg don’t matter about DVB Patch. Maybe you need to provide more build error message for me.

@Frank.DTV Can you answer this question? Thanks very much.