# Setup ARM64 Emulator on Windows

## Option 1: Android Studio AVD (Recommended)

1. **Download Android Studio**: https://developer.android.com/studio
2. **Open AVD Manager**: Tools → Device Manager
3. **Create New Device**:
   - Device: Pixel 5 or any modern phone
   - **System Image**: Choose ARM64 (arm64-v8a)
     - API 30+ recommended
     - Download the ARM64 image (NOT x86_64)
4. **Configure**:
   - RAM: 4GB+
   - Enable hardware acceleration
5. **Start Emulator**
6. **Install frida-server ARM64**:
   ```powershell
   # Download ARM64 frida-server
   Invoke-WebRequest -Uri "https://github.com/frida/frida/releases/download/17.5.1/frida-server-17.5.1-android-arm64.xz" -OutFile "frida-server-arm64.xz"
   
   # Extract (use 7-Zip or Python)
   python -c "import lzma, shutil; f_in = lzma.open('frida-server-arm64.xz', 'rb'); f_out = open('frida-server-arm64', 'wb'); shutil.copyfileobj(f_in, f_out); f_in.close(); f_out.close()"
   
   # Push to device
   adb push frida-server-arm64 /data/local/tmp/frida-server
   adb shell "chmod 755 /data/local/tmp/frida-server"
   adb root
   adb shell "/data/local/tmp/frida-server &"
   ```
7. **Install app**:
   ```powershell
   adb install-multiple cpc_extracted\base.apk cpc_extracted\split_config.arm64_v8a.apk cpc_extracted\split_config.xxhdpi.apk
   ```
8. **Run Frida**:
   ```powershell
   frida -U -f com.canadapost.android -l frida_ultimate_bypass.js
   ```

## Option 2: Use Your Real x86 Phone (Easiest!)

Since your phone already runs the app with ARM translation:

1. **Enable USB Debugging** on your phone
2. **Connect via USB** or **wireless ADB**
3. **Check connection**:
   ```powershell
   adb devices
   ```
4. **Download correct frida-server** (probably x86_64):
   ```powershell
   adb shell getprop ro.product.cpu.abi
   # Then download matching frida-server
   ```
5. **Setup frida-server** (same steps as before)
6. **Run Frida** on your real phone!

## Option 3: WSA (Windows Subsystem for Android) - Experimental

If you have Windows 11:
1. Install WSA from Microsoft Store
2. Enable Developer Mode
3. Connect with `adb connect 127.0.0.1:58526`
4. WSA is x86_64 but has better ARM compatibility

## Option 4: BlueStacks with Rooted Version

1. Download BlueStacks
2. Use rooted version (harder to find)
3. May have ARM translation support

---

## Quick Start: Use Your Real Phone!

**Wireless ADB Setup:**
```powershell
# On phone: Settings → Developer Options → Wireless Debugging → Pair device
# Get IP and port, then:

adb pair <IP>:<PORT>
# Enter pairing code

adb connect <IP>:<PORT>
adb devices
```

Then follow the frida-server setup from the main guide!
