This repository builds HaP: a standalone Android IPTV player server for AceStream and IPFS content, for phones and Android TV.
HaP packages AceServe and HTTPAceProxy for AceStream, a bundled IPFS gateway, and a launcher-accessible native configuration screen. It serves plain M3U/EPG URLs that TiviMate, OTT, and other IPTV players can consume directly — no other app required.
It can also run as a StreamVault companion plugin, exposing the same functionality through StreamVault's plugin API. That integration is one way to use HaP, not its primary purpose; see StreamVault Integration below for the plugin-specific details.
HaP works standalone: open the HaP launcher icon (phone or Android TV), enable External player server and/or IPFS, then use the local or LAN M3U/EPG URLs in TiviMate, OTT, or any other IPTV player.
It can also be installed alongside StreamVault as a companion plugin. When
present, HaP exposes the com.streamvault.plugin.API bound service and
advertises these capabilities:
provider.m3u: publishes the local HaP/aioplaylist URL.playback.prepare: starts HaP before local HaP playback.cast.rewriteUrl: switches HaP to LAN mode and rewrites local URLs for Cast.configuration.activity: opens the native HaP configuration activity.
HaP uses configurationMode: "activity". StreamVault should open
com.streamvault.plugin.hap.CONFIGURE instead of rendering a host schema. The
native activity is the supported configuration surface because HaP needs
interactive source management, runtime controls, channel testing, logs, and
TV-first custom layout behavior.
The configuration screen is implemented by
com.streamvault.plugin.hap.HapConfigActivity. It is exported for StreamVault
through com.streamvault.plugin.hap.CONFIGURE and is also advertised as a phone
and Android TV launcher activity so HaP can be configured without StreamVault.
The UI uses Android resources for localization. English is the default locale and
Spanish is provided through values-es; Android selects the language from the
system locale.
The screen contains:
- Runtime summary: color-coded runtime state, phase, AIO URL, LAN URL, and runtime actions.
- External players: a persistent server switch for standalone use.
- IPFS: a local IPFS gateway switch, with an advanced section for external node mode.
- AIO and LAN server: copyable local/LAN M3U and EPG URLs.
- Sources: collapsible and collapsed by default.
- Clients: connected HTTPAceProxy clients.
- Channel status: collapsible and collapsed by default.
- Logs: recent HaP runtime output.
External player server mode is for TiviMate, OTT, and other IPTV players that consume ordinary M3U URLs.
When enabled, HaP:
- Enables LAN server mode.
- Starts AceServe and HTTPAceProxy.
- Keeps the mode enabled after reboot or app update.
- Exposes copyable playlist and EPG endpoints:
- Local device:
http://127.0.0.1:8888/aio - Local EPG:
http://127.0.0.1:8888/aio/epg.xml - LAN playlist:
http://<device-lan-ip>:8888/aio - LAN EPG:
http://<device-lan-ip>:8888/aio/epg.xml
- Local device:
Use the local URL when the IPTV player runs on the same Android device. Use the LAN URL when the player runs on another device on the same network.
The IPFS switch starts a bundled kubo (IPFS) daemon and its HTTP gateway. It
does not add ipfs:///ipns:// playback support by itself: add the
gateway's HTTP URL for a given CID or IPNS name as a regular M3U source in
Sources instead, for example
http://127.0.0.1:8080/ipns/<name>/path/to/list.m3u.
When enabled, HaP:
- Prepares and starts the bundled kubo binary for the device's ABI
(
arm64-v8aorarmeabi-v7a), using kubo'slowpowerprofile (no reprovide, limited connection manager) since the node only consumes content. - Exposes a local gateway (default
http://127.0.0.1:8080, configurable under Advanced). - Keeps the RPC API on
127.0.0.1:5001and the libp2p swarm on4001, regardless of LAN mode — only the gateway is ever exposed to the network. - Binds the gateway to the LAN when the "LAN server" switch (AIO and LAN server section) is on, so devices on the same network can also reach it.
Advanced options (collapsed by default):
- Use external node: point HaP at an already-running IPFS node's
host/port instead of starting the bundled one (a Termux
ipfs daemon, a NAS, a PC on the same LAN, etc.). - Gateway port and disk storage quota (
Datastore.StorageMax) for the embedded node.
The libipfs.so binaries are not committed to git — building them requires
compiling kubo from source, which is too heavy to check in and update on
every kubo release. Run tools/fetch-kubo.sh before building; it fetches
kubo, and needs only Go for arm64-v8a (no cgo) but the Android NDK for
armeabi-v7a (android/arm requires cgo linking, enforced by the Go
toolchain itself). :app:preBuild fails with a clear message if the
binaries are missing from app/src/main/jniLibs/.
Sources are intentionally user-managed for public distribution. The plugin no longer ships hardcoded playlist sources.
The Sources section allows users to add M3U lists or AceStream API endpoints. Each source requires:
- Name.
- HTTP or HTTPS M3U URL, or an AceStream API URL.
When a list is added or updated, HaP downloads it and validates that:
- M3U playlists start with
#EXTM3U. - M3U playlists contain channels.
- AceStream API responses contain at least one
infohash. - At least one channel points to AceStream content.
AceStream content is accepted when the channel URL is one of:
acestream://...infohash://...- A bare 40-character AceStream hash.
- HTTP or HTTPS URLs that point to AceStream-like media files, such as
.acelive,.acestream,.acemedia, or.torrent. - HTTP or HTTPS URLs with
id,infohash, orcontent_idquery parameters.
AceStream API sources are accepted for:
https://api.acestream.me/allhttps://api.acestream.me/search
HaP preserves the user-provided query filters, adds the public AceStream API
defaults when api_version or api_key are omitted, and formats JSON results
as M3U channels internally.
The Sources section also contains a Custom source. When Custom is enabled,
the UI expands a nested custom-channel editor.
Each custom channel requires:
- Channel name.
- AceStream ID.
The AceStream ID may be entered as a plain 40-character hash, an
acestream://... URL, or a URL that contains an id, infohash, or
content_id query value. HaP normalizes it and writes a generated custom.m3u
playlist for HTTPAceProxy.
The Channel status section starts collapsed. Open it to load lists, inspect channels, and run peer checks with visible focus states.
Available actions:
- Load lists: reads the current HaP playlists and shows available channel lists.
- Test list: tests all channels in the selected list and marks each result.
- Stop: cancels an active list test.
- Channel row click: selecting a channel row tests that single channel and updates the row status.
There is no separate top-level Test channel button; single-channel tests are
driven by the selected row.
The service manifest should declare Activity configuration mode:
<service
android:name=".StreamVaultHapPluginService"
android:exported="true">
<intent-filter>
<action android:name="com.streamvault.plugin.API" />
</intent-filter>
<meta-data
android:name="com.streamvault.plugin.CONFIGURATION_MODE"
android:value="activity" />
<meta-data
android:name="com.streamvault.plugin.CONFIGURATION_ACTIVITY_ACTION"
android:value="com.streamvault.plugin.hap.CONFIGURE" />
<meta-data
android:name="com.streamvault.plugin.CAPABILITIES"
android:value="provider.m3u,playback.prepare,cast.rewriteUrl,configuration.activity" />
</service>The configuration activity must be exported and include the DEFAULT category:
<activity
android:name=".HapConfigActivity"
android:exported="true"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.streamvault.plugin.hap.CONFIGURE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>Do not advertise configuration.schema for HaP unless a complete
StreamVault-rendered schema is intentionally supported. HaP's rich configure
experience is native, so the Activity is the source of truth.
Build the bundled IPFS (kubo) binaries once before the first Gradle build (see IPFS below for what this needs):
tools/fetch-kubo.shUse the Android SDK and a Java runtime compatible with the Android Gradle plugin:
JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" \
ANDROID_HOME="$HOME/Library/Android/sdk" \
./gradlew :app:assembleUniversalDebugThe app is split into arm64/armv7/universal product flavors (see
Install); for local development, the universal flavor bundles
both ABIs into one APK. The debug APK is written to:
app/build/outputs/apk/universal/debug/app-universal-debug.apk
Each release publishes three APKs. Both the bundled IPFS (kubo) binary and the AceServe engine ship a separate ~40-60MB blob per ABI, so the universal APK (both ABIs) is ~125MB; picking the APK matching your device's CPU drops that to ~65-70MB by dropping the other ABI's unused native libraries and assets. On storage-constrained Android TV boxes (common with older/cheap 32-bit devices) that difference can be what separates a clean install from a generic "app not installed" failure:
IPTV-Plugin-HaP-<version>-armeabi-v7a.apk— 32-bit ARM (most older/cheap Android TV boxes).IPTV-Plugin-HaP-<version>-arm64-v8a.apk— 64-bit ARM (most phones and recent Android TV/Google TV devices).IPTV-Plugin-HaP-<version>.apk/IPTV-Plugin-HaP.apk— universal, both ABIs bundled. Use this only if you don't know your device's ABI.
Install the debug APK on a connected device:
$HOME/Library/Android/sdk/platform-tools/adb install -r app/build/outputs/apk/universal/debug/app-universal-debug.apkAfter installation, refresh StreamVault's Plugins screen. The HaP plugin should
appear as HaP, version 1.3.3, with configuration.activity.
The configuration activity can also be opened directly:
$HOME/Library/Android/sdk/platform-tools/adb shell am start \
-a com.streamvault.plugin.hap.CONFIGURE \
-p com.streamvault.plugin.hapThe standalone launcher entry can be opened with:
$HOME/Library/Android/sdk/platform-tools/adb shell monkey \
-p com.streamvault.plugin.hap 1The current manual device targets are:
- Chromecast with Google TV.
- Nexus 5X.
Recommended smoke test:
- Install the plugin APK on both devices.
- Open HaP from the launcher and from StreamVault's Plugins screen.
- Enable External player server and confirm M3U/EPG URLs are shown for local and LAN playback.
- Enable IPFS and confirm the status pill reaches Online and the gateway URL
serves a known CID (
curl http://127.0.0.1:8080/ipfs/<CID>viaadb forward). - Confirm Sources and Channel status start collapsed.
- Add a real M3U AceStream list.
- Load channel lists, run Test list, then click a channel row to test only that channel.
- Enable the plugin in StreamVault and confirm the HaP AIO provider URL is available.