Skip to content
Merged
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
8 changes: 6 additions & 2 deletions .github/workflows/android-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ jobs:

- name: Build and lint
run: |
cd Android
chmod +x ./gradlew
./gradlew :app:assembleDebug :app:lintDebug --stacktrace

- name: Verify no INTERNET permission
run: |
cd Android
APK_PATH="app/build/outputs/apk/debug/app-debug.apk"

if grep -R -n --include='*.xml' 'android.permission.INTERNET' app/src; then
Expand All @@ -62,6 +64,7 @@ jobs:

- name: Prepare APK artifact
run: |
cd Android
VERSION_NAME="$(sed -n 's/.*versionName = "\(.*\)".*/\1/p' app/build.gradle.kts)"
SAFE_REF="${GITHUB_REF_NAME//\//-}"
ARTIFACT_DIR="build/artifacts"
Expand All @@ -77,15 +80,16 @@ jobs:
with:
name: phonepad-debug-apk
path: |
build/artifacts/*.apk
build/artifacts/SHA256SUMS.txt
Android/build/artifacts/*.apk
Android/build/artifacts/SHA256SUMS.txt
if-no-files-found: error

- name: Attach APK to GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
env:
GH_TOKEN: ${{ github.token }}
run: |
cd Android
if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then
gh release upload "$GITHUB_REF_NAME" build/artifacts/* --clobber
else
Expand Down
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ coverage/

# Android / Gradle
.gradle/
android/.gradle/
android/app/build/
android/build/
.kotlin/
Android/.gradle/
Android/.kotlin/
Android/app/build/
Android/build/
*.apk
*.aab
local.properties
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ function Assert-Environment {

$javaHome = Find-JavaHome
if (-not $javaHome) {
throw "Java was not found. Run .\scripts\setup-windows-dev.ps1 first."
throw "Java was not found. Run .\Android\scripts\setup-windows-dev.ps1 first."
}

$sdkRoot = Get-SdkRoot
if (-not $sdkRoot -or -not (Test-Path $sdkRoot)) {
throw "Android SDK was not found. Run .\scripts\setup-windows-dev.ps1 first."
throw "Android SDK was not found. Run .\Android\scripts\setup-windows-dev.ps1 first."
}

$env:JAVA_HOME = $javaHome
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,4 @@ Write-Step "Verifying Gradle wrapper"

Write-Host ""
Write-Host "Windows development setup is ready."
Write-Host "Next: .\scripts\build-windows.ps1 -Target all"
Write-Host "Next from the repository root: .\Android\scripts\build-windows.ps1 -Target all"
File renamed without changes.
12 changes: 6 additions & 6 deletions README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ PhonePad는 광고, 계정, 분석 SDK, 추적 SDK, 인터넷 권한을 사용
- [docs/ko/DRAG_MODE.md](docs/ko/DRAG_MODE.md)
- [docs/ko/TEST.md](docs/ko/TEST.md)

PRD 초안과 내보낸 채팅 로그 같은 기획 원본은 의도적으로 git에서 제외합니다. 제품 문서는 `docs/`에, 소스 코드는 일반 Flutter/Android 프로젝트 트리에 둡니다.
플랫폼 코드는 `Android/`와 `ios/`에 모읍니다. 공통 프로젝트 자산과 브리지 펌웨어는 `shared/`에 둡니다. 제품 문서는 기존 링크 안정성을 위해 `docs/`에 그대로 둡니다.

## Android Phase 0 앱

Expand All @@ -51,7 +51,7 @@ PRD 초안과 내보낸 채팅 로그 같은 기획 원본은 의도적으로 gi
- 패키지: `com.tygb99.phonepad`
- 최소 Android: API 28
- 현재 타깃: Android 16 / API 36
- APK 출력: `app/build/outputs/apk/debug/app-debug.apk`
- APK 출력: `Android/app/build/outputs/apk/debug/app-debug.apk`
- 런타임 권한: Bluetooth connect와 advertise만 사용하며 `INTERNET` 권한은 없습니다.
- 검증 환경: Windows 11 PC, macOS 26.4.1 개발 호스트, Android 16 Galaxy S23 Ultra.

Expand All @@ -74,14 +74,14 @@ PRD 초안과 내보낸 채팅 로그 같은 기획 원본은 의도적으로 gi
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home
export ANDROID_HOME=/opt/homebrew/share/android-commandlinetools
export ANDROID_SDK_ROOT="$ANDROID_HOME"
./gradlew :app:assembleDebug
(cd Android && ./gradlew :app:assembleDebug)
```

Windows에서는 PowerShell 설정/빌드 스크립트를 사용합니다.

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-windows-dev.ps1
.\scripts\build-windows.ps1 -Target all
powershell -NoProfile -ExecutionPolicy Bypass -File .\Android\scripts\setup-windows-dev.ps1
.\Android\scripts\build-windows.ps1 -Target all
```

JDK 17, Android SDK, APK 빌드, 기기 설치 절차는 [docs/ko/WINDOWS_DEV.md](docs/ko/WINDOWS_DEV.md)를 참고하세요.
Expand All @@ -90,7 +90,7 @@ JDK 17, Android SDK, APK 빌드, 기기 설치 절차는 [docs/ko/WINDOWS_DEV.md

```bash
export ANDROID_HOME=/opt/homebrew/share/android-commandlinetools
"$ANDROID_HOME/platform-tools/adb" install -r app/build/outputs/apk/debug/app-debug.apk
"$ANDROID_HOME/platform-tools/adb" install -r Android/app/build/outputs/apk/debug/app-debug.apk
```

## 저장소
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Start with:
- [docs/DRAG_MODE.md](docs/DRAG_MODE.md)
- [docs/TEST.md](docs/TEST.md)

Planning sources such as PRD drafts and exported chat logs are intentionally ignored by git. Keep product docs in `docs/` and source code in the normal Flutter/Android project tree.
Platform code is grouped under `Android/` and `ios/`. Shared project assets and bridge firmware live under `shared/`. Product docs stay in `docs/` so existing documentation links remain stable.

## Android Phase 0 App

Expand All @@ -51,7 +51,7 @@ This repository now includes a native Kotlin Android spike app for the Direct Bl
- Package: `com.tygb99.phonepad`
- Minimum Android: API 28
- Current target: Android 16 / API 36
- APK output: `app/build/outputs/apk/debug/app-debug.apk`
- APK output: `Android/app/build/outputs/apk/debug/app-debug.apk`
- Runtime permissions: Bluetooth connect and advertise only; no `INTERNET` permission.
- Validated setup: Windows 11 PC, macOS 26.4.1 development host, Galaxy S23 Ultra on Android 16.

Expand All @@ -74,14 +74,14 @@ Build locally:
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home
export ANDROID_HOME=/opt/homebrew/share/android-commandlinetools
export ANDROID_SDK_ROOT="$ANDROID_HOME"
./gradlew :app:assembleDebug
(cd Android && ./gradlew :app:assembleDebug)
```

On Windows, use the PowerShell setup and build helpers:

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-windows-dev.ps1
.\scripts\build-windows.ps1 -Target all
powershell -NoProfile -ExecutionPolicy Bypass -File .\Android\scripts\setup-windows-dev.ps1
.\Android\scripts\build-windows.ps1 -Target all
```

See [docs/WINDOWS_DEV.md](docs/WINDOWS_DEV.md) for JDK 17, Android SDK, APK build, and device install details.
Expand All @@ -90,7 +90,7 @@ Install on a connected Android device:

```bash
export ANDROID_HOME=/opt/homebrew/share/android-commandlinetools
"$ANDROID_HOME/platform-tools/adb" install -r app/build/outputs/apk/debug/app-debug.apk
"$ANDROID_HOME/platform-tools/adb" install -r Android/app/build/outputs/apk/debug/app-debug.apk
```

## Repository
Expand Down
4 changes: 2 additions & 2 deletions docs/ANDROID12_COMPAT_SMOKE_2026-05-31.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Pass. The debug APK launched on a real Android 12 Samsung device, the connection
| Branch | `codex/host-language-toggle-guide-panel` |
| Commit | `c2c4797 fix: defer drawer back callback creation` |
| App version | `0.2.0-phase0`, `versionCode=18` |
| APK | `app/build/outputs/apk/debug/app-debug.apk` |
| APK | `Android/app/build/outputs/apk/debug/app-debug.apk` |
| Device | Samsung `SM-N976N` |
| Android | `12`, API `31` |
| App target SDK | `36` |
Expand All @@ -29,7 +29,7 @@ Pass. The debug APK launched on a real Android 12 Samsung device, the connection

| Check | Result | Evidence |
|---|---|---|
| Build debug APK | Pass | `./gradlew assembleDebug` completed successfully. |
| Build debug APK | Pass | `cd Android && ./gradlew assembleDebug` completed successfully. |
| Install APK | Pass | `adb install -r app-debug.apk` returned `Success`. |
| Runtime permissions | Pass | `BLUETOOTH_CONNECT` and `BLUETOOTH_ADVERTISE` were granted for the smoke run. |
| Cold launch | Pass | `MainActivity` became the focused window after force-stop and relaunch. |
Expand Down
6 changes: 3 additions & 3 deletions docs/MOBILE_APP.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ GitHub Actions now builds the debug APK on push, pull request, and manual dispat
Current debug APK path:

```text
app/build/outputs/apk/debug/app-debug.apk
Android/app/build/outputs/apk/debug/app-debug.apk
```

## Device Test Order
Expand All @@ -54,14 +54,14 @@ Local build command:
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home
export ANDROID_HOME=/opt/homebrew/share/android-commandlinetools
export ANDROID_SDK_ROOT="$ANDROID_HOME"
./gradlew :app:assembleDebug
(cd Android && ./gradlew :app:assembleDebug)
```

Install command for a connected Android device:

```bash
export ANDROID_HOME=/opt/homebrew/share/android-commandlinetools
"$ANDROID_HOME/platform-tools/adb" install -r app/build/outputs/apk/debug/app-debug.apk
"$ANDROID_HOME/platform-tools/adb" install -r Android/app/build/outputs/apk/debug/app-debug.apk
```

## Manifest Checklist
Expand Down
20 changes: 10 additions & 10 deletions docs/WINDOWS_DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,51 +21,51 @@ Make PhonePad buildable from a clean Windows PowerShell environment without requ
From the repository root:

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-windows-dev.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File .\Android\scripts\setup-windows-dev.ps1
```

If JDK 17 or Android SDK command-line tools are missing, run:

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-windows-dev.ps1 -InstallMissing -AcceptAndroidLicenses
powershell -NoProfile -ExecutionPolicy Bypass -File .\Android\scripts\setup-windows-dev.ps1 -InstallMissing -AcceptAndroidLicenses
```

Add `-PersistUserEnv` if you want the script to save `JAVA_HOME`, `ANDROID_HOME`, and `ANDROID_SDK_ROOT` for future PowerShell windows:

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-windows-dev.ps1 -InstallMissing -AcceptAndroidLicenses -PersistUserEnv
powershell -NoProfile -ExecutionPolicy Bypass -File .\Android\scripts\setup-windows-dev.ps1 -InstallMissing -AcceptAndroidLicenses -PersistUserEnv
```

The setup script writes `local.properties` with your local Android SDK path. That file is ignored by git.
The setup script writes `Android/local.properties` with your local Android SDK path. That file is ignored by git.

## Build

Run all local development checks:

```powershell
.\scripts\build-windows.ps1 -Target all
.\Android\scripts\build-windows.ps1 -Target all
```

Run a narrower target:

```powershell
.\scripts\build-windows.ps1 -Target test
.\scripts\build-windows.ps1 -Target debug
.\scripts\build-windows.ps1 -Target lint
.\Android\scripts\build-windows.ps1 -Target test
.\Android\scripts\build-windows.ps1 -Target debug
.\Android\scripts\build-windows.ps1 -Target lint
```

The debug APK is written to:

```text
app\build\outputs\apk\debug\app-debug.apk
Android\app\build\outputs\apk\debug\app-debug.apk
```

## Install On Device

Connect an Android device with USB debugging enabled, then run:

```powershell
& "$env:ANDROID_HOME\platform-tools\adb.exe" install -r app\build\outputs\apk\debug\app-debug.apk
& "$env:ANDROID_HOME\platform-tools\adb.exe" install -r Android\app\build\outputs\apk\debug\app-debug.apk
```

## Notes
Expand Down
4 changes: 2 additions & 2 deletions docs/ko/ANDROID12_COMPAT_SMOKE_2026-05-31.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
| 브랜치 | `codex/host-language-toggle-guide-panel` |
| 커밋 | `c2c4797 fix: defer drawer back callback creation` |
| 앱 버전 | `0.2.0-phase0`, `versionCode=18` |
| APK | `app/build/outputs/apk/debug/app-debug.apk` |
| APK | `Android/app/build/outputs/apk/debug/app-debug.apk` |
| 기기 | Samsung `SM-N976N` |
| Android | `12`, API `31` |
| 앱 target SDK | `36` |
Expand All @@ -29,7 +29,7 @@

| 확인 | 결과 | 근거 |
|---|---|---|
| Debug APK 빌드 | 통과 | `./gradlew assembleDebug` 성공. |
| Debug APK 빌드 | 통과 | `cd Android && ./gradlew assembleDebug` 성공. |
| APK 설치 | 통과 | `adb install -r app-debug.apk`가 `Success` 반환. |
| 런타임 권한 | 통과 | 스모크 테스트를 위해 `BLUETOOTH_CONNECT`, `BLUETOOTH_ADVERTISE` 권한을 부여. |
| 콜드 런치 | 통과 | force-stop 후 재실행 시 `MainActivity`가 focused window가 됨. |
Expand Down
6 changes: 3 additions & 3 deletions docs/ko/MOBILE_APP.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ GitHub Actions는 이제 push, pull request, 수동 실행에서 debug APK를
현재 debug APK 경로:

```text
app/build/outputs/apk/debug/app-debug.apk
Android/app/build/outputs/apk/debug/app-debug.apk
```

## 기기 테스트 순서
Expand All @@ -54,14 +54,14 @@ app/build/outputs/apk/debug/app-debug.apk
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home
export ANDROID_HOME=/opt/homebrew/share/android-commandlinetools
export ANDROID_SDK_ROOT="$ANDROID_HOME"
./gradlew :app:assembleDebug
(cd Android && ./gradlew :app:assembleDebug)
```

연결된 Android 기기 설치 명령:

```bash
export ANDROID_HOME=/opt/homebrew/share/android-commandlinetools
"$ANDROID_HOME/platform-tools/adb" install -r app/build/outputs/apk/debug/app-debug.apk
"$ANDROID_HOME/platform-tools/adb" install -r Android/app/build/outputs/apk/debug/app-debug.apk
```

## Manifest 체크리스트
Expand Down
20 changes: 10 additions & 10 deletions docs/ko/WINDOWS_DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,51 +21,51 @@ macOS/Homebrew 경로 없이 Windows PowerShell 환경에서도 PhonePad를 빌
저장소 루트에서 실행합니다.

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-windows-dev.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File .\Android\scripts\setup-windows-dev.ps1
```

JDK 17 또는 Android SDK command-line tools가 없으면 다음 명령으로 설치까지 진행할 수 있습니다.

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-windows-dev.ps1 -InstallMissing -AcceptAndroidLicenses
powershell -NoProfile -ExecutionPolicy Bypass -File .\Android\scripts\setup-windows-dev.ps1 -InstallMissing -AcceptAndroidLicenses
```

새 PowerShell 창에서도 환경 변수를 계속 쓰고 싶으면 `-PersistUserEnv`를 추가합니다.

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-windows-dev.ps1 -InstallMissing -AcceptAndroidLicenses -PersistUserEnv
powershell -NoProfile -ExecutionPolicy Bypass -File .\Android\scripts\setup-windows-dev.ps1 -InstallMissing -AcceptAndroidLicenses -PersistUserEnv
```

설정 스크립트는 로컬 Android SDK 경로를 담은 `local.properties`를 생성합니다. 이 파일은 git에 커밋되지 않습니다.
설정 스크립트는 로컬 Android SDK 경로를 담은 `Android/local.properties`를 생성합니다. 이 파일은 git에 커밋되지 않습니다.

## 빌드

전체 로컬 개발 검증을 실행합니다.

```powershell
.\scripts\build-windows.ps1 -Target all
.\Android\scripts\build-windows.ps1 -Target all
```

필요한 대상만 좁혀 실행할 수도 있습니다.

```powershell
.\scripts\build-windows.ps1 -Target test
.\scripts\build-windows.ps1 -Target debug
.\scripts\build-windows.ps1 -Target lint
.\Android\scripts\build-windows.ps1 -Target test
.\Android\scripts\build-windows.ps1 -Target debug
.\Android\scripts\build-windows.ps1 -Target lint
```

디버그 APK는 다음 위치에 생성됩니다.

```text
app\build\outputs\apk\debug\app-debug.apk
Android\app\build\outputs\apk\debug\app-debug.apk
```

## 기기에 설치

USB 디버깅이 켜진 Android 기기를 연결한 뒤 실행합니다.

```powershell
& "$env:ANDROID_HOME\platform-tools\adb.exe" install -r app\build\outputs\apk\debug\app-debug.apk
& "$env:ANDROID_HOME\platform-tools\adb.exe" install -r Android\app\build\outputs\apk\debug\app-debug.apk
```

## 참고
Expand Down
Loading
Loading