github mazer666/PhairPlay v1.0.0-alpha.8
PhairPlay v1.0.0-alpha.8

pre-releaseone hour ago

What's changed (since v1.0.0-alpha.7)

  • chore(release): prepare v1.0.0-alpha.8 for publication
  • fix(dlna): never advertise a description the renderer cannot serve
  • fix(airplay): give the mirror audio both address families and isolate its failure
  • fix(airplay): stop duplicate receivers and stale mDNS entries
  • fix(airplay): advertise the receiver under a name that cannot collide
  • feat(spec): add the requirement baseline v4.0 with a generated traceability chain
  • feat(ci): add the native library, secret and dependency gates
  • feat(release): build the supply chain artefacts with the release
  • fix(security): bound the plist decoder and unify the media URL policy
  • fix(airplay): reject a picture that the decoder scaled down and reported as a crop

What this release is. The release of the security, compliance and production
readiness
cycle and of the three open television reports. The receiver was
invisible in the AirPlay picker on Android 14, it was found twice and sometimes not
at all, and the screen mirroring of an iPhone had no sound while switching the
sound on stopped the picture. Nothing of the user interface changed; what changed
is what the app refuses, what the build proves, what the documentation claims —
and what the receiver announces.

Fixed

  • The receiver was invisible in the AirPlay picker on Android 14 (issue #23,
    reported on an XGIMI MoGo 3 Pro with an iPhone 15 Pro as the sender). Since
    Android 14 the platform registers its own remote-control service
    (_androidtvremote2._tcp) under the device name of the television, and the
    mDNS daemon checks the instance name for uniqueness across all service
    types
    . A receiver that advertised _airplay._tcp under the bare device name
    was therefore rejected with a NameConflictException and never answered a
    query — while the app itself looked healthy.
    • The _airplay._tcp service is now advertised as <Device name> (AirPlay),
      which is unique on the device. The name the owner chose stays readable in the
      picker of the sender.
    • A registration that fails anyway is retried under a name with its own
      number, so that a name that is already taken on the network cannot keep the
      receiver invisible.
    • The _raop._tcp name is now built by the same rule and stays inside the
      DNS-SD limit of 63 characters — the MAC prefix eats 13 of them, so a long
      device name used to produce a label the daemon rejects.
  • The advertised device id was the same on every television. The placeholder
    aa:bb:cc:dd:ee:ff was used whenever the platform did not hand out the real
    MAC address — which is the case on every Android 10+ device. Two receivers in
    one network claimed the same identity and overwrote each other in the pairing
    cache of the sender. The app now advertises a random, locally administered
    address
    that it generates once per installation and keeps across restarts.
    The hardware address of the television is no longer broadcast.
  • The receiver was found only some of the time, and sometimes twice (seen on a
    Xiaomi TV Box S 2nd gen running LineageOS 24 / Android 17, iPhone as the sender).
    Two causes, both measured on the device with dumpsys servicediscovery:
    • Two receiver stacks started at once. Opening the app sends ACTION_START
      from the boot receiver and from the app screen; both ran concurrently, so two
      RTSP servers fought over port 7000 and a second _airplay._tcp advertisement was
      renamed to <Name> (AirPlay) (2) — pointing at a server that was not listening.
      PhairPlayService now runs start / stop / restart under one lock and ignores a
      start while the receivers are already running.
    • Overlapping mDNS restarts leaked registrations. Every end of a streaming
      session restarted the advertisement, and iOS ends a session over several
      connections, so three restarts ran within 50 ms. A restart also registered again
      before the platform had released the old registration. The result was a stale,
      duplicated _raop._tcp entry. MdnsService.restart now merges requests that
      arrive within 500 ms and waits (up to 3 s) for the unregistration callbacks before
      it registers again; after a streaming session the advertisement is only renewed
      when it is actually incomplete (ensureAdvertising).
  • The screen mirroring had no sound on an iPhone, and switching the sound on
    stopped the picture
    (issue #25).
    • The audio socket only listened on the IPv6 wildcard. The sender delivers the
      audio to the address it used for the RTSP control connection — IPv4 from an
      iPhone, the IPv6 link-local address from a Mac. On the Android TV network stacks
      that do not dual-stack an IPv6 socket onto the LAN's IPv4 interface, the audio
      packet never arrived: the picture came, the television stayed silent. Every
      other socket of the project binds the IPv4 wildcard explicitly for exactly that
      reason. The audio socket now binds both families on the same port — the
      one port the SETUP answer names.
    • A stream that cannot start no longer fails the whole SETUP. When the sender
      added the audio stream to a running mirror and the audio server could not be
      started, the whole SETUP was answered with "400 Bad Request" — and the sender tore
      the session down, so the picture stopped as well. A stream that cannot be started
      is now left out of the answer, and the mirror keeps running without it.
  • The DLNA renderer could be advertised without being able to serve its
    description
    (issue #23, second report, on a Google TV with Android 14). The SSDP
    answer named a description.xml on a port that nothing was listening on — a control
    point found the renderer and then waited for a description that never arrived. The
    renderer now checks that its description server really serves before it announces
    anything, rebuilds the server when it stopped, and stops advertising — and shows the
    error in the app — when it cannot serve.

Added

  • The requirement baseline v4.0 — every requirement with eight attributes,
    a codec matrix, the acceptance criteria with a contradiction register, and a
    traceability matrix that is generated instead of written. The generator
    (scripts/build-traceability.sh) fails when a requirement loses its proof.
  • Three new gates — the native libraries (16 KB page size, the ELF and the
    ZIP alignment of the artefacts that were built), the secret scan of the
    repository, and the dependency decisions (the SBOM in the CycloneDX format
    plus the allowlist of the assessed dependencies and the version ceilings of
    the known advisories). Each gate has a self-test that proves it turns red.
  • The third-party notices and the SBOM of the release — the artefacts of a
    release now say what is inside them.

Documented

  • The documentation was consolidated and brought onto the state of the code.
    The superseded documents are in docs/archive/, the architecture decision
    records in docs/adr/, the index lists every live document, and the state of
    the CI pipeline is documented honestly: the jobs of the CI workflow need a
    self-hosted runner and the repository has no runner.

The signed APKs are not attached to this entry yet

The tag and these notes are published; the signed APKs are built and uploaded by
the release pipeline
:

./scripts/release.sh v1.0.0-alpha.8

The script builds both flavours, checks the version and the signature inside the
artefacts, uploads them to this release — replacing these notes with its own — and
writes the manifest, the checksums, the SBOM and the third-party notices. It
finds this release and updates it, so nothing is published twice.

Until that has run, v1.0.0-alpha.7
is the newest release that carries an APK:

  • PhairPlay-1.0.0-alpha.7-GoogleTV.apk — Google TV / Android TV APK (Android 10+)
  • PhairPlay-1.0.0-alpha.7-FireTV.apk — Amazon Fire TV APK (Android 7.1+)
  • PhairPlay-1.0.0-alpha.7-GoogleTV.aab — Google Play Store Android App Bundle (Google TV)

Use adb or a sideloading app like Downloader to install.

What was not tested

This is a prerelease. No television has run this build: 0 of the 16 device test
cases
of the device test plan have been executed. The three fixes above come from
reports of real televisions — but a fix that is not measured on a device is a
fix that is not proven. Report what you find as an issue.

The log lines that answer the reports are:

adb logcat -d | grep -i "MdnsAdvertiser\|mDNS"        # no NameConflictException, "Probing finished"
adb logcat -d | grep -i "Audio UDP socket\|Audio RTP"  # the port and the family of the sender
adb logcat -d | grep -i "DLNA"                         # the description URL the renderer announces

The build itself

  • The JVM protocol suite was green on the tagged commit: 657 tests, 0 failures,
    0 errors, 0 skipped
    (measured locally with JDK 17 and Gradle 8.7).
  • The repository gates were green as well: the file size, the KDoc headers, the
    documentation links, the i18n completeness, the secret scan and the traceability
    check.
  • The Android lint and the two debug builds were not run here — this release was
    cut without the Android SDK. The pipeline runs them before it publishes the APKs.

Don't miss a new PhairPlay release

NewReleases is sending notifications on new releases.