Skip to content

Commit ea56fc4

Browse files
committed
Document signed release installation as recommended Pepper deployment
1 parent 55b92d4 commit ea56fc4

1 file changed

Lines changed: 34 additions & 6 deletions

File tree

‎README.md‎

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,17 +282,20 @@ YOUTUBE_API_KEY=your_youtube_api_key
282282

283283
**🤖 Pepper Flavor (Default)**
284284
```bash
285-
./gradlew assemblePepperDebug
285+
./gradlew assemblePepperRelease
286286
```
287287

288+
Use **Release** for normal use and performance testing on Pepper's older tablet. This is the non-debuggable variant used on the robot; `minifyEnabled` is currently `false`, so it is not an R8-shrunk/optimized build. The command produces an **unsigned** APK that must be signed before installation (see Step 4 below). On Windows PowerShell, use `.\gradlew.bat` instead of `./gradlew`.
289+
288290
**📱 Standalone Flavor**
289291
```bash
290292
./gradlew assembleStandaloneDebug
291293
```
292294

293295
**In Android Studio:**
294296
- Select build flavor from: `Build` → `Select Build Variant`
295-
- Choose `pepperDebug` for Pepper robot
297+
- Choose `pepperRelease` for normal Pepper use (requires APK signing)
298+
- Choose `pepperDebug` only for development/debugging on Pepper
296299
- Choose `standaloneDebug` for testing on any device
297300

298301
### 4. Open in Android Studio
@@ -337,17 +340,42 @@ YOUTUBE_API_KEY=your_youtube_api_key
337340
- **Device not listed**: Ensure same WiFi network, check IP address, restart ADB server (`adb kill-server && adb start-server`)
338341
- **"Unauthorized"**: Accept the USB debugging popup on Pepper's tablet
339342

340-
#### Step 4: Deploy from Android Studio
343+
#### Step 4: Install the Release APK (Recommended)
344+
345+
The following PowerShell commands reproduce the local release installation used on Pepper. Run them from the project root after connecting with ADB. They use Android SDK Build Tools `35.0.1`; adjust the SDK path/version if yours differs.
346+
347+
```powershell
348+
# Build the non-debuggable Pepper release APK
349+
.\gradlew.bat assemblePepperRelease
350+
351+
# Sign with the existing local debug certificate to update a debug-signed install
352+
$apksigner = "$env:LOCALAPPDATA\Android\Sdk\build-tools\35.0.1\apksigner.bat"
353+
& $apksigner sign --ks "$env:USERPROFILE\.android\debug.keystore" --ks-key-alias androiddebugkey --ks-pass pass:android --key-pass pass:android --out app/build/outputs/apk/pepper/release/app-pepper-release-local.apk app/build/outputs/apk/pepper/release/app-pepper-release-unsigned.apk
354+
& $apksigner verify app/build/outputs/apk/pepper/release/app-pepper-release-local.apk
355+
356+
# Install only after the build, signing and verification succeed
357+
adb install -r app/build/outputs/apk/pepper/release/app-pepper-release-local.apk
358+
```
359+
360+
Signing with a debug certificate does **not** turn the release build into a debug build. This certificate is for local testing only, not public distribution. The existing `debug.keystore` must be present and must match the certificate used for the installed app. For distribution, use your own protected release keystore or Android Studio's **Build > Generate Signed Bundle / APK** with the `pepperRelease` variant.
361+
362+
`adb install -r` keeps app data and settings when the package and signing certificate match. If Android reports `INSTALL_FAILED_UPDATE_INCOMPATIBLE`, use the original signing key rather than uninstalling the app and losing its data. With multiple devices connected, add `-s <PEPPER_IP>:5555` after `adb`. Each rebuild may remove the locally signed APK; sign the new unsigned output again before installing.
363+
364+
**Optional Windows build workaround:** If Gradle fails with `Unable to establish loopback connection` due to Java Unix-domain sockets, set `$env:JAVA_TOOL_OPTIONS = '-Djdk.net.unixdomain.tmpdir=C:/nonexistent-codex-socket-dir'` in the build terminal and retry. Use a path that does not exist; this enables the TCP fallback used for our local build. This is not needed for normal builds.
365+
366+
#### Alternative: Deploy a Debug Build from Android Studio
367+
For development only; select `pepperDebug` first. Use the signed release instructions above for normal use and performance comparisons.
368+
341369
1. In Android Studio's toolbar, verify that **"ARTNCORE LPT_200AR"** appears in the device dropdown
342370
2. Click the green **Run button** (▶️) in the toolbar
343371
3. Android Studio will build and install the app on Pepper
344372
4. The app will start automatically on Pepper's tablet
345373

346374
**Note:** The ADB connection persists between sessions. You only need to reconnect if Pepper reboots or changes IP address.
347375

348-
**Alternative: Manual APK Installation**
376+
**Alternative: Manual Debug APK Installation (Development Only)**
349377
```bash
350-
# Build the Pepper APK
378+
# Build the Pepper debug APK
351379
./gradlew assemblePepperDebug
352380

353381
# Install via ADB (APK path: app/build/outputs/apk/pepper/debug/app-pepper-debug.apk)
@@ -1520,7 +1548,7 @@ This approach provides natural-looking robot behavior even when using external a
15201548
# Debug build
15211549
./gradlew assembleDebug
15221550

1523-
# Release build
1551+
# Release build (unsigned; sign before installing, see Pepper deployment above)
15241552
./gradlew assembleRelease
15251553

15261554
# Run tests

0 commit comments

Comments
 (0)