# Android Node Project Log

## 2026-03-11

### Issue: Build failing due to corrupted Android SDK
- The SDK at /opt/android-sdk is corrupted (duplicate platform directories: android-34, android-34-2, android-34-6, etc.)
- Each build attempt creates a new duplicate directory
- The platform files show wrong version (Platform 14 inside android-34 folder)
- **CANNOT fix without sudo access** on the laptop
- Need: `sudo rm -rf /opt/android-sdk/platforms/* && sudo sdkmanager "platforms;android-34" "build-tools;34.0.0"`

### Error: Client ID format for pairing
- Original log showed: `invalid connect params: at /client/id: must be equal to constant`
- Protocol docs show `id: "ios-node"` for iOS - so "android-node" SHOULD be valid
- **MISTAKE**: Tried changing to "android-node" but user confirmed original device hash was correct
- **REVERTED**: Changed back to using deviceId hash
- Real issue is likely something else in the connect params

### Code Changes Made
1. **Hardcoded gateway config** (TEMPORARY for testing):
   - File: `NodeService.kt`
   - Added fallback config: IP=192.168.11.46, port=18789, token=<gateway token>
   - **MUST REMOVE** after pairing works

2. **Client ID**: Kept as deviceId hash (not constant)

### Next Steps
1. **BLOCKED**: Need SDK cleanup on laptop before can build - cannot fix without sudo
   - Each build creates a new duplicate (android-34-7 now)
   - Gradle/SDK manager is confused by the duplicates
2. After build: test pairing flow
3. After pairing works: remove hardcoded config, test on real phone
