Skip to content

feat: Add Android TV support#3389

Open
TUSHAR91316 wants to merge 9 commits into
ReVanced:devfrom
TUSHAR91316:main
Open

feat: Add Android TV support#3389
TUSHAR91316 wants to merge 9 commits into
ReVanced:devfrom
TUSHAR91316:main

Conversation

@TUSHAR91316

Copy link
Copy Markdown

Description

This PR introduces support for Android TV devices. It has been streamlined and cleaned up to act strictly as a minimal, non-disruptive starting point for an Android TV platform support branch.

Based on valuable maintainer feedback from @oSumAtrIX and @validcube, all build-related, packaging, toolchain, credentials, and documentation files have been completely reverted. The PR now focuses solely on establishing the TV entry point.

Key Changes

  • Android TV Leanback Support: Added leanback support and LEANBACK_LAUNCHER intent filters to app/src/main/AndroidManifest.xml so the application can appear natively in the Android TV home screen.
  • Both android.software.leanback and android.hardware.touchscreen are set to required="false" to prevent imposing touchscreen constraints or breaking non-TV platforms.

Reverted Changes (Based on maintainer feedback)

  • Reverted ABI Packaging: Reverted the conditional packaging exception in app/build.gradle.kts. The file matches upstream exactly. Contributors testing locally are advised to use an x86_64 AVD as recommended.
  • Reverted Toolchain Updates: Removed the Foojay resolver plugin additions in settings.gradle.kts and deleted gradle/gradle-daemon-jvm.properties.
  • Reverted Credentials Mapping: Reverted settings.gradle.kts back to using the standard PasswordCredentials block.
  • Deleted Documentation: Removed README_TV.md to keep the root repository clean.

Testing Performed

  • Successfully built and deployed onto a local Android TV (API 28) x86_64 Emulator.
  • Verified app appears correctly in the Leanback TV launcher.

Related Issues

Resolves #3385

Add README_TV.md with instructions for building, installing, and testing ReVanced Manager on an Android TV (API 28) emulator, including SDK/NDK mapping and GitHub Packages guidance. Add gradle/gradle-daemon-jvm.properties (generated by updateDaemonJvm) to pin foojay toolchain URLs and version. Remove dummy githubPackagesUsername/githubPackagesPassword from gradle.properties to avoid committing credentials. Update settings.gradle.kts: bump fooyay resolver plugin to 1.0.0 and switch GitHub Packages repository credentials to read from gradle properties via providers.gradleProperty instead of PasswordCredentials.
Make x86 native libs available for Debug builds to support local Android TV x86 emulators: jniLibs now conditionally excludes /lib/x86/*.so only when the invoked Gradle tasks are not Debug, preventing INSTALL_FAILED_NO_MATCHING_ABIS during emulator testing while keeping release builds size-optimized. README_TV.md updated with an emulator ABI compatibility note and the githubPackagesUsername set to TUSHAR91316 to reflect local setup instructions.
@TUSHAR91316 TUSHAR91316 changed the title feat: Add Android TV support and fix local x86 emulator testing #3386 feat: Add Android TV support and fix local x86 emulator testing May 31, 2026
@TUSHAR91316 TUSHAR91316 marked this pull request as draft May 31, 2026 23:57
@TUSHAR91316 TUSHAR91316 changed the base branch from main to dev May 31, 2026 23:57
@TUSHAR91316 TUSHAR91316 marked this pull request as ready for review May 31, 2026 23:57
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ENFORCE_UPDATE_OWNERSHIP" />

<!-- Declare Leanback TV support (touchscreen is optional) -->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats touchscreen for

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by default android thing we require touch screen but android does not have touch screen and we need to use d-Pad.I will help Android TV OS from filtering out the app during installation. also while the comment clarifies that the app remains fully compatible with touchscreen-enabled phones/tablets.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have provided the explaination pls check

Comment thread .gitignore Outdated

@TUSHAR91316 TUSHAR91316 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since TV devices do not have touchscreens, this declaration prevents Android TV OS from filtering out the app during installation

@Axelen123

Copy link
Copy Markdown
Member

Does the app behave sensibly on Android TV?

@TUSHAR91316

Copy link
Copy Markdown
Author

@Axelen123

Screen_recording_20260605_080108.mp4

here the video of the app launching in tv and controlled by d pad/remote

Add TV_PR_NOTES.md documenting the Android TV support PR (ReVanced#3385) with maintainer feedback, QA steps for TV emulators, and ready-to-use reply text. Update gradle/wrapper/gradle-wrapper.properties to use Gradle 9.5 (update distributionUrl and remove obsolete wrapper entries). Add the Foojay toolchain resolver plugin declaration in settings.gradle.kts.
Comment thread .gitignore Outdated
Comment thread settings.gradle.kts Outdated
@TUSHAR91316 TUSHAR91316 requested a review from Axelen123 June 6, 2026 02:36
@validcube

validcube commented Jun 6, 2026

Copy link
Copy Markdown
Member

Next time please don't recreate your PR, this so to make it easier to keep track of the prior comments.

Ref: old pr #3386

@validcube validcube changed the title feat: Add Android TV support and fix local x86 emulator testing feat: Add Android TV support Jun 7, 2026

@validcube validcube left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

FYI from prior comment in first attempt PR: My primary concern with this is the manager doesn't have a design for leanback devices which needs to be discussed with the designer in advance. The layout of the manager may be more suited towards a mouse pointer navigation instead of keyboard. The overall UI/UX is I'd imagined to be not that great for leanback. But this PR can be as a starting point for Android TV support branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add Android TV (Leanback) support and x86 emulator compatibility

4 participants