A community based topic aggregation platform built on atproto
11
fork

Configure Feed

Select the types of activity you want to include in your feed.

at a0ef112eaa6f2ca8487717f29a9bc91dfd40bec8 68 lines 2.9 kB view raw
1#!/bin/bash 2# Setup adb reverse port forwarding for mobile testing 3# This allows the mobile app to access localhost services on the dev machine 4 5set -e 6 7# Colors 8GREEN='\033[0;32m' 9CYAN='\033[0;36m' 10YELLOW='\033[1;33m' 11RED='\033[0;31m' 12NC='\033[0m' # No Color 13 14echo -e "${CYAN}📱 Setting up Android port forwarding for Coves mobile testing...${NC}" 15echo "" 16 17# Check if adb is available 18if ! command -v adb &> /dev/null; then 19 echo -e "${RED}✗ adb not found${NC}" 20 echo "Install Android SDK Platform Tools: https://developer.android.com/studio/releases/platform-tools" 21 exit 1 22fi 23 24# Check if device is connected 25DEVICES=$(adb devices | grep -v "List" | grep "device$" | wc -l) 26if [ "$DEVICES" -eq 0 ]; then 27 echo -e "${RED}✗ No Android devices connected${NC}" 28 echo "Connect a device via USB or start an emulator" 29 exit 1 30fi 31 32echo -e "${YELLOW}Setting up port forwarding...${NC}" 33 34# Forward ports from Android device to localhost 35adb reverse tcp:3000 tcp:3001 # PDS (internal port in DID document) 36adb reverse tcp:3001 tcp:3001 # PDS (external port) 37adb reverse tcp:3002 tcp:3002 # PLC Directory 38adb reverse tcp:8081 tcp:8081 # AppView 39 40echo "" 41echo -e "${GREEN}✅ Port forwarding configured successfully!${NC}" 42echo "" 43echo -e "${CYAN}═══════════════════════════════════════════════════════════${NC}" 44echo -e "${CYAN} PORT FORWARDING ${NC}" 45echo -e "${CYAN}═══════════════════════════════════════════════════════════${NC}" 46echo "" 47echo -e "${GREEN}PDS (3000):${NC} localhost:3001 → device:3000 ${YELLOW}(DID document port)${NC}" 48echo -e "${GREEN}PDS (3001):${NC} localhost:3001 → device:3001" 49echo -e "${GREEN}PLC (3002):${NC} localhost:3002 → device:3002" 50echo -e "${GREEN}AppView (8081):${NC} localhost:8081 → device:8081" 51echo "" 52echo -e "${CYAN}═══════════════════════════════════════════════════════════${NC}" 53echo "" 54echo -e "${CYAN}📱 Next Steps:${NC}" 55echo "" 56echo -e "1. Mobile app is already configured for localhost (environment_config.dart)" 57echo "" 58echo -e "2. Run mobile app:" 59echo -e " ${YELLOW}cd /home/bretton/Code/coves-mobile${NC}" 60echo -e " ${YELLOW}flutter run --dart-define=ENVIRONMENT=local${NC}" 61echo "" 62echo -e "3. Login with:" 63echo -e " Handle: ${CYAN}charlie.local.coves.dev${NC}" 64echo -e " Password: ${CYAN}charliepass123${NC}" 65echo "" 66echo -e "${YELLOW}💡 Note: Port forwarding persists until device disconnects or you run:${NC}" 67echo -e "${YELLOW} adb reverse --remove-all${NC}" 68echo ""