Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/scripts/install-android-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ fi

missing=()
for package in "$@"; do
directory="${ANDROID_HOME}/${package//;/\/}"
relative=${package//;/\/}
directory="${ANDROID_HOME}/${relative}"
if [[ -f "$directory/package.xml" || -f "$directory/source.properties" ]]; then
echo "Using installed SDK package: $package"
else
Expand Down
7 changes: 6 additions & 1 deletion .github/scripts/provision-https-ca.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ pem=$pem_dir/emudhra-ca.pem
if [[ $ca_source == secret ]]; then
# Base64 only encodes bytes; GitHub Secrets provides the confidentiality, so the
# value must never be echoed or written into the checkout.
if ! printf '%s' "${encoded//[[:space:]]/}" | base64 --decode > "$pem" 2>/dev/null; then
# BSD base64 can ignore invalid characters and still exit successfully.
# Check the alphabet and padding before using the platform decoder.
encoded=${encoded//[[:space:]]/}
base64_pattern='^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$'
if [[ ! $encoded =~ $base64_pattern ]] ||
! printf '%s' "$encoded" | base64 --decode > "$pem" 2>/dev/null; then
rm -f -- "$pem"
fail 'WHEELPLAY_HTTPS_CA_PEM_BASE64 is not valid Base64. Re-encode the combined PEM file and update the secret.'
fi
Expand Down
71 changes: 69 additions & 2 deletions .github/workflows/debug-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
ANDROID_KEY_ALIAS: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && secrets.ANDROID_KEY_ALIAS || '' }}
ANDROID_KEY_PASSWORD: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && secrets.ANDROID_KEY_PASSWORD || '' }}
run: |
tasks=( :projection-plugin-api:assembleRelease :projection-plugin-sample:lintDebug :projection-plugin-sample:assembleDebug :common:assembleDebugAndroidTest :mobile:lintDebug :mobile:assembleDebug :mobile:assembleDebugAndroidTest )
tasks=( :projection-plugin-api:assembleRelease :projection-plugin-carlink:lintDebug :projection-plugin-sample:lintDebug :projection-plugin-sample:assembleDebug :common:assembleDebugAndroidTest :mobile:lintDebug :mobile:assembleDebug :mobile:assembleDebugAndroidTest )
if [[ "$USE_RELEASE_SIGNING" == true ]]; then
bash .github/scripts/build-signed-android.sh "${tasks[@]}"
else
Expand All @@ -107,7 +107,10 @@ jobs:

# Native compilation and time-sensitive socket tests must not compete for runner CPU.
- name: Run unit tests
run: ./gradlew --no-daemon --build-cache :projection-plugin-api:testDebugUnitTest :shared:testDebugUnitTest :common:testDebugUnitTest
run: ./gradlew --no-daemon --build-cache :projection-plugin-api:testDebugUnitTest :projection-plugin-carlink:testDebugUnitTest :shared:testDebugUnitTest :common:testDebugUnitTest

- name: Verify offline CarLink dependency tooling
run: python3 -m unittest discover -s test -p 'carlink_sdk_test.py'

- name: Upload plugin SDK and independent sample APK
uses: actions/upload-artifact@v4
Expand All @@ -126,6 +129,8 @@ jobs:
path: |
projection-plugin-api/build/reports/tests/
projection-plugin-api/build/test-results/
projection-plugin-carlink/build/reports/tests/
projection-plugin-carlink/build/test-results/
shared/build/reports/tests/
shared/build/test-results/
common/build/reports/tests/
Expand Down Expand Up @@ -167,6 +172,68 @@ jobs:
if: always()
run: rm -rf -- "$RUNNER_TEMP"/wheelplay-https-ca.*

carlink-apk:
name: CarLink plugin APK
runs-on: ubuntu-24.04
timeout-minutes: 20
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: temurin

- name: Set up Gradle cache
uses: gradle/actions/setup-gradle@v5
with:
cache-read-only: ${{ github.event_name == 'pull_request' }}

- name: Locate preinstalled Android SDK
run: |
echo "$ANDROID_HOME/cmdline-tools/latest/bin" >> "$GITHUB_PATH"
echo "$ANDROID_HOME/platform-tools" >> "$GITHUB_PATH"

- name: Install missing Android packages
run: |
bash .github/scripts/install-android-packages.sh \
"platforms;android-$ANDROID_API_LEVEL" \
"build-tools;$ANDROID_BUILD_TOOLS"

- name: Provision pinned CarLink runtime
run: |
sdk_apk="$RUNNER_TEMP/carlink-reference.apk"
sdk_url="$(python3 -c 'import json; print(json.load(open("projection-plugin-carlink/sdk-lock.json"))["apkUrl"])')"
curl --fail --location --retry 3 --proto '=https' --proto-redir '=https' "$sdk_url" --output "$sdk_apk"
python3 scripts/carlink_sdk.py prepare --apk "$sdk_apk" --sdk .local/carlink-sdk
python3 scripts/carlink_sdk.py verify --sdk .local/carlink-sdk

- name: Build and verify CarLink Debug APK
env:
USE_RELEASE_SIGNING: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }}
ANDROID_KEYSTORE_BASE64: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && secrets.ANDROID_KEYSTORE_BASE64 || '' }}
ANDROID_KEYSTORE_PASSWORD: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && secrets.ANDROID_KEYSTORE_PASSWORD || '' }}
ANDROID_KEY_ALIAS: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && secrets.ANDROID_KEY_ALIAS || '' }}
ANDROID_KEY_PASSWORD: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && secrets.ANDROID_KEY_PASSWORD || '' }}
run: |
if [[ "$USE_RELEASE_SIGNING" == true ]]; then
bash .github/scripts/build-signed-android.sh :projection-plugin-carlink:assembleDebug
else
./gradlew --no-daemon --build-cache :projection-plugin-carlink:assembleDebug
fi

- name: Upload CarLink Debug APK
uses: actions/upload-artifact@v4
with:
name: wheelplay-carlink-debug-apk
path: |
projection-plugin-carlink/build/outputs/apk/debug/projection-plugin-carlink-debug.apk
projection-plugin-carlink/build/outputs/apk/debug/carlink-build.json
if-no-files-found: error

browser-runtime:
name: Browser HTTP on Android ${{ matrix.api-level }}
needs: build
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
**/local.properties

# Build outputs and dependency caches
__pycache__/
*.pyc
*.pyo
node_modules/
.gradle/
.kotlin/
Expand All @@ -33,8 +36,12 @@ mobile/debug/

# IDE-local state (shared project configuration remains trackable)
.idea/
.vscode/
*.iml

# Local diagnostic attachments
.codex-attachments/

# Logs, crash dumps, temporary files, and editor backups
*.log
*.hprof
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ Run CarPlay on an Android device and use it from your car's browser. WheelPlay h
| --- | --- |
| **CarPlay** | USB and wireless iPhone connections, browser display and touch control. Requires valid CarPlay authentication resources. |
| **Android Auto — experimental** | USB AOA, explicit Head Unit Server TCP connections, and a guided same-phone connection. Device compatibility still needs validation. |
| **CarLife — experimental** | Same-phone and Wi-Fi reception; [USB AOA](docs/CARLIFE_USB.md) adapter with 3.0 / 4.1, audio, microphone and touch. USB video/touch validated with a computer host; Android-host USB validation is pending. |
| **VNC — experimental** | Remote desktop over RFB 3.3/3.7/3.8, JPEG/WebP display, touch, mouse and physical keyboard input, and view-only mode. Actual server/device compatibility still needs validation. |
| **Android virtual desktop — experimental** | Shizuku UserService, local app selection, fixed-size JPEG/WebP output, multi-touch and Back. Requires Android 10+/Shizuku 13+; no physical-device compatibility validated yet. See the [guide](docs/ANDROID_DESKTOP.md). |
| **Diagnostic sources** | H.264, Surface, and framebuffer test sources for checking the display pipeline without a phone connection. |
| **Plugin APKs** | Install and enable independent Surface video/touch sources. Includes a standalone SDK and sample APK; see the [plugin guide](docs/PROJECTION_PLUGINS.md). |
| **ICCOA CarLink** | Planned as a separate plugin APK. No proprietary SDK or CarLink plugin is included. |
| **ICCOA CarLink** | [Independent APK plugin](docs/CARLINK.md) with device-validated Wi-Fi Direct, manual hotspot, USB, and Surface / WebRTC output. Replug the USB cable for error 10007. CI provides a plugin Debug APK; the receiver requires arm64 / 4 KB pages. |

One projection source and one browser control session can be active at a time. For Android Auto, audio plays on the Android host and microphone input uses the host; browser audio/microphone routing and automatic wireless discovery are not implemented. See the [Android Auto guide](docs/ANDROID_AUTO.md) for setup and limitations.

Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
| **Android 虚拟桌面(实验性)** | Shizuku UserService、本机应用选择、固定尺寸 JPEG/WebP、多指触控与返回。需要 Android 10+/Shizuku 13+,尚未完成真机兼容性验证,见[使用与验收指南](docs/ANDROID_DESKTOP.md)。 |
| **诊断输入源** | 提供 H.264、Surface 和帧缓冲测试源,无需连接手机即可检查画面链路。 |
| **插件 APK** | 安装并启用独立的 Surface 画面/触控输入源;提供独立 SDK 和示例 APK,见[插件指南](docs/PROJECTION_PLUGINS.md)。 |
| **ICCOA CarLink** | 计划通过独立插件 APK 提供;本版本不包含专有 SDK 或 CarLink 插件。 |
| **ICCOA CarLink** | [独立 APK 插件](docs/CARLINK_USER_GUIDE.md),支持 Wi-Fi Direct、手动热点和 USB,以及 Surface / WebRTC 输出,已通过实机验证。USB 报 10007 时拔插数据线重连。CI 提供插件 Debug APK;接收设备需 arm64 / 4 KB 内存页。 |

同一时间只运行一个投影输入源,并允许一个浏览器控制会话。Android Auto 的音频播放和麦克风输入均使用 Android 宿主,尚不支持浏览器音频/麦克风转发或自动无线发现。连接方式与限制见 [Android Auto 指南](docs/ANDROID_AUTO.md)。

Expand Down
21 changes: 21 additions & 0 deletions common/CARLIFE_NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# CarLife protocol references

The built-in WheelPlay CarLife receiver lives in `common`. The framing, protobuf
field numbers and handshake sequence were implemented with reference to:

- [CarPToCarL](https://github.com/jjuugk/CarPToCarL/tree/3cbc8e85544bcffcc2aa45f1f3c5e1c70f9ca715),
commit `3cbc8e85544bcffcc2aa45f1f3c5e1c70f9ca715`: `CarLifeHuClient.kt` and
`CarLifeProtocol.kt`. MIT, copyright (c) 2026 lizhihua.
- [mcarplay](https://github.com/wangxso/mcarplay/tree/8e25e0f69ab7a3bec14649542adea6eb22f74f9a),
commit `8e25e0f69ab7a3bec14649542adea6eb22f74f9a`: CarLife channel, launcher and
session architecture. MIT, copyright (c) 2026 lizhihua.

License texts are included in `src/main/assets/CarPToCarL-LICENSE.txt` and
`src/main/assets/mcarplay-LICENSE.txt`, and packaged in the APK.

No vendor APK, decompiled vendor implementation, signing material or
authentication keys are distributed. The vivo-specific field/behavior checks
and their limitations are recorded in `docs/CARLIFE_LOOPBACK_VIVO.md` in the
repository root. Current integration and protocol verification are recorded in
`docs/CARLIFE_WIFI.md` and `docs/CARLIFE_XIAOMI.md`. Support for a protocol version
does not establish compatibility with every vendor or system build.
1 change: 1 addition & 0 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ dependencies {
implementation(libs.androidx.remote.core)
implementation(libs.androidx.remote.player.core)
implementation(libs.androidx.remote.player.view)
implementation(project(":ui-theme"))
implementation("dev.rikka.shizuku:api:13.1.5")
implementation("dev.rikka.shizuku:provider:13.1.5")
implementation(project(":projection-plugin-api"))
Expand Down
Binary file not shown.
Loading
Loading