Skip to content

feat: Add Android TV support and fix local x86 emulator testing#3386

Closed
TUSHAR91316 wants to merge 5 commits into
ReVanced:mainfrom
TUSHAR91316:main
Closed

feat: Add Android TV support and fix local x86 emulator testing#3386
TUSHAR91316 wants to merge 5 commits into
ReVanced:mainfrom
TUSHAR91316:main

Conversation

@TUSHAR91316

Copy link
Copy Markdown

Description

This PR introduces support for Android TV devices and fixes issues related to local testing on TV emulators, along with essential project build improvements.

Key Changes

  • Android TV Leanback Support: Added leanback support and LEANBACK_LAUNCHER intent filters to AndroidManifest.xml to ensure the application properly appears in the Android TV home screen.
  • Emulator ABI Fix: Modified app/build.gradle.kts to conditionally exclude x86 native libraries only during Release builds. This resolves INSTALL_FAILED_NO_MATCHING_ABIS errors when installing and testing the app on local x86 Android TV emulators, while keeping release build sizes optimized.
  • Documentation: Added README_TV.md with step-by-step instructions on how to set up, build, and test ReVanced Manager on an Android TV emulator.
  • Build Toolchain Fix: Updated the foojay-resolver-convention plugin in settings.gradle.kts to version 1.0.0 to resolve JVM toolchain crashes on newer versions of Gradle.
  • Safe Credentials Configuration: Modified settings.gradle.kts to read GitHub Packages credentials via providers.gradleProperty to prevent accidental credential leaks.

Testing Performed

  • Successfully built and deployed onto a local Android TV (API 28) x86 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.

@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.

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.

Comment thread app/build.gradle.kts Outdated
Comment thread gradle/gradle-daemon-jvm.properties Outdated
Comment thread settings.gradle.kts Outdated
Comment on lines +9 to +12

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
}

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.

From our internal discussion, we have decided to not include foojay resolvers. Not related to the PR.

Comment thread settings.gradle.kts Outdated
Comment on lines +24 to +27
credentials {
username = providers.gradleProperty("githubPackagesUsername").orNull ?: ""
password = providers.gradleProperty("githubPackagesPassword").orNull ?: ""
}

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.

You are supposed to put your PAT in the Gradle user home properties. Not related to the PR.

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.

Makes perfect sense. I have reverted this file entirely to use the original PasswordCredentials block, keeping user configurations in global home properties.

Comment thread README_TV.md Outdated

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.

This file is not needed here as we already have a guide that encompasses the building process.

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.

Reverted and deleted! I have removed the TV-specific markdown file to keep the root directory clean and consistent with your existing guides.

@TUSHAR91316

Copy link
Copy Markdown
Author

You are absolutely right. A comfortable, polished TV Leanback UI/UX will require dedicated design collaboration, D-pad focus traversal, and layout adaptations. Since we declared both android.software.leanback and android.hardware.touchscreen to required="false", it doesn't force any strict touchscreen constraints but simply registers the entry point for Android TV.

I completely agree with treating this PR as a minimal starting point to unlock the Android TV branch. Having the launcher entry point merged will allow the community and designers to start collaborating on remote navigation and layout adaptations on top of this baseline.

To align with your guidelines, I have cleaned up the PR and reverted all unrelated changes. It now contains only the necessary manifest declarations to unlock Android TV support!

@TUSHAR91316 TUSHAR91316 requested a review from validcube May 31, 2026 23:44
@validcube validcube mentioned this pull request Jun 6, 2026
2 tasks
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

2 participants