adb shell logcat -c
m LiveTv TVTestInput TVJankTests -j20 &&\
adb install -r -d $OUT/system/priv-app/LiveTv/LiveTv.apk &&\
adb install -r -d $OUT/system/app/TVTestInput/TVTestInput.apk &&\
adb install -r -d $OUT/data/app/TVJankTests/TVJankTests.apk &&\
adb shell pm clear com.android.providers.tv &&\
adb shell pm clear com.android.tv &&\
echo "Creating a lot of channels and EPG data, this may take a while" &&\
adb shell am instrument \
-e testSetupMode jank \
-w com.android.tv.testinput/.instrument.TestSetupInstrumentation &&\
adb shell input keyevent KEYCODE_HOME &&\
adb shell am instrument \
-w 'com.android.tv.tests.jank/android.support.test.runner.AndroidJUnitRunner'
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Reference TV app\n\nA TV app that plays live TV content is required for some classes of Android TV\ndevices, such as panel TVs and operator STBs.\nThe [source code](https://android.googlesource.com/platform/packages/apps/TV/)\nfor a reference app is available in the Android Open Source Project.\n\nThis page summarizes how to build and customize a system TV app based\non Live TV for your Android television device.\n| You can extend your TV app to implement device manufacturer or country-specific features, but this is not in the scope of the reference TV app.\n\nDependencies\n------------\n\nThe Live TV app is a component of the [TV Input Framework (TIF)](/docs/devices/tv)\nand can't be used independently of the other TIF components. Different branches of the app have\ndifferent dependencies on Android API levels:\n\n| Branch | Target API level | Minimum API level |\n|---------------------------------------------------------------------------------------------------------------|------------------|-------------------|\n| [`main`](https://android.googlesource.com/platform/packages/apps/TV/+/main) | 24 (Android 7.0) | 23 |\n| [`android-live-tv`](https://android.googlesource.com/platform/packages/apps/TV/+/android-live-tv) | 23 (Android 6.0) | 21 |\n| [`android-live-tv-l-mr1`](https://android.googlesource.com/platform/packages/apps/TV/+/android-live-tv-l-mr1) | 22 (Android 5.1) | 21 |\n\nGet the source\n--------------\n\nTo get started, select a Live TV version from Git. The following instructions are for the current\nversion of Live TV. To use an earlier version, switch to one of the Git branches\nlisted in the previous table. \n\n mkdir live-tv && cd live-tv\n repo init -u https://android.googlesource.com/platform/manifest -b main\n repo sync -j8 -c\n\nBuild\n-----\n\nTo build the Live TV code, run: \n\n . build/envsetup.sh\n tapas LiveTv x86\n make LiveTv\n\nPush\n----\n\nUse the following code to push Live TV to your test device: \n\n```\nadb install -r -d $OUT/system/priv-app/LiveTv/LiveTv.apk\n```\n\nIf you intend the Live TV app to have system permissions, use the following code to push it to\n`/system/priv-app` the first time you install it: \n\n```\nadb push $OUT/system/priv-app/LiveTv/LiveTv.apk /system/priv-app/LiveTv/\n```\n\nTest\n----\n\nAfter Live TV is installed on your device, test that it's properly integrated using the following\ntests in addition to the [Compatibility test suite](/docs/compatibility/cts)\nand the [CTS Verifier tests](/docs/compatibility/cts/verifier) for the TV app.\nYou must have a device or emulator connected to run all test types.\n\n### Unit tests\n\n```\nadb shell logcat -c\nm LiveTv TVTestInput TVUnitTests -j20 &&\\\nadb install -r -d $OUT/system/priv-app/LiveTv/LiveTv.apk &&\\\nadb install -r -d $OUT/system/app/TVTestInput/TVTestInput.apk && \\\nadb install -r -d $OUT/data/app/TVUnitTests/TVUnitTests.apk && \\\nadb shell pm clear com.android.providers.tv && \\\nadb shell pm clear com.android.tv && \\\nadb shell am instrument \\\n -e testSetupMode unit \\\n -w com.android.tv.testinput/.instrument.TestSetupInstrumentation &&\\\nadb shell input keyevent KEYCODE_HOME &&\\\nadb shell am instrument \\\n -w 'com.android.tv.tests/android.support.test.runner.AndroidJUnitRunner'\n```\n\n### Functional tests\n\n```\nadb shell logcat -c\nm LiveTv TVTestInput TVFuncTests -j20 &&\\\nadb install -r -d $OUT/system/priv-app/LiveTv/LiveTv.apk &&\\\nadb install -r -d $OUT/system/app/TVTestInput/TVTestInput.apk && \\\nadb install -r -d $OUT/data/app/TVFuncTests/TVFuncTests.apk && \\\nadb shell pm clear com.android.providers.tv && \\\nadb shell pm clear com.android.tv && \\\nadb shell am instrument \\\n -e testSetupMode func \\\n -w com.android.tv.testinput/.instrument.TestSetupInstrumentation &&\\\nadb shell input keyevent KEYCODE_HOME &&\\\nadb shell am instrument \\\n -w 'com.android.tv.tests.ui/android.support.test.runner.AndroidJUnitRunner'\n```\n\n### Jank tests\n\nThe jank tests look for dropped frames and delays in rendering. \n\n```\nadb shell logcat -c\nm LiveTv TVTestInput TVJankTests -j20 &&\\\nadb install -r -d $OUT/system/priv-app/LiveTv/LiveTv.apk &&\\\nadb install -r -d $OUT/system/app/TVTestInput/TVTestInput.apk &&\\\nadb install -r -d $OUT/data/app/TVJankTests/TVJankTests.apk &&\\\nadb shell pm clear com.android.providers.tv &&\\\nadb shell pm clear com.android.tv &&\\\necho \"Creating a lot of channels and EPG data, this may take a while\" &&\\\nadb shell am instrument \\\n -e testSetupMode jank \\\n -w com.android.tv.testinput/.instrument.TestSetupInstrumentation &&\\\nadb shell input keyevent KEYCODE_HOME &&\\\nadb shell am instrument \\\n -w 'com.android.tv.tests.jank/android.support.test.runner.AndroidJUnitRunner'\n```"]]