Metadata-Version: 2.5
Name: gphototool
Version: 0.1.1
Summary: Convert any file to video → unlimited Google Photos upload
License-Expression: MIT
Requires-Python: >=3.11
Requires-Dist: fastapi
Requires-Dist: gpmc
Requires-Dist: python-multipart
Requires-Dist: uvicorn
Provides-Extra: disguise
Requires-Dist: gp-disguise; extra == 'disguise'
Description-Content-Type: text/markdown

# GPhotoTool

Convert any file to video → upload **unlimited** to Google Photos.

No storage quota. No server. Runs 100% locally on your machine.

## What is this for?

Google Photos gives **unlimited storage** to Pixel phones. This tool spoofs that — any file disguised as a video gets unlimited upload via the Pixel XL API.

**Two ways to use unlimited GPhotos:**

| | ReVanced Google Photos | GPhotoTool |
|---|---|---|
| **Platform** | Android phone | PC (Linux/macOS/Windows) |
| **Install** | Patched APK + microG | `pip install gphototool` |
| **Upload from** | Phone gallery | Any file on your PC |
| **Auth** | Login in-app | One-time token from logcat |
| **Best for** | Phone photos/videos | Backups, archives, large files |

**Have ReVanced/Morphe GPhotos already?** You're 80% there — your phone already has the Pixel spoof. GPhotoTool lets you upload from PC too, using the same auth. See [ReVanced users](#revanced-users) below.

## Install

```bash
pip install gphototool
pip install gp_disguise@git+https://github.com/xob0t/gp_disguise.git
```

## Usage

```bash
gphototool
```

Opens browser to `http://localhost:8800`. Three modes:

- **Convert + Upload** — wraps file as video, uploads unlimited
- **Convert Only** — get the disguised MP4, do what you want
- **Upload Only** — for pre-disguised files, skips conversion

Any file or folder. Files over 9 GiB (and folders) are split automatically.

Big game folder — no browser copy:

```bash
gphototool --file "/run/media/panther/D/Applications/Port Proton/ELDEN RING" --album Games
```

Restore a split folder: download parts from Photos, `gpd extract` each, then `cat name.part* | tar xf -`.

## How it works

1. Drop any file (ZIP, PDF, APK, ISO, DOC, MP3, anything)
2. `gp_disguise` wraps it as an MP4 video
3. `gpmc` uploads via Pixel XL spoof API — **zero quota charged**
4. File stays on your machine the whole time

Already-disguised MP4? Auto-detected — skips conversion.

## Auth token (one-time setup)

**Easiest:** Open the expandable help in the web UI — step-by-step instructions.

**Or:** Copy the AI-agent prompt from [docs/AUTH_TOKEN.md](docs/AUTH_TOKEN.md) and paste to Claude/ChatGPT.

**Manual:**
```bash
adb logcat -c && adb logcat | grep auth%2Fphotos
# Open Morphe/ReVanced Photos → tap profile → sign in
# Copy the androidId=...&Token=... line
# Save: echo "TOKEN" > ~/.config/gphototool/auth_data && chmod 600 ~/.config/gphototool/auth_data
```

Token expires in ~24 hours. Re-capture when upload fails with auth error.

## ReVanced users

If you already have **ReVanced Google Photos** or **Morphe** installed on your Android:

1. Your phone already has the Pixel XL spoof active
2. You can get the auth token in seconds:
   ```bash
   adb logcat -c && adb logcat | grep auth%2Fphotos
   # Open ReVanced/Morphe Photos → tap profile → sign in
   # Copy the androidId=...&Token=... line
   ```
3. Paste the token in GPhotoTool's web UI
4. Upload from PC — unlimited, same as phone

**No ReVanced yet?** Install these on your Android:

1. **ReVanced GPhotos** (patched APK) — [revanced.app](https://revanced.app) or [Morphe](https://github.com/nicholaschum/Morphe)
2. **ReVanced GMS** (microG) — [GitHub releases](https://github.com/nicholaschum/ReVanced-GMS/releases)
3. Log into your Google account in microG
4. Open ReVanced Photos → tap profile → sign in

Then capture the auth token as above.

## Requirements

- Python 3.11+
- `gpd` (gp_disguise) — file disguise tool
- `gpmc` — unlimited GPhotos uploader

## Architecture

```
Browser (localhost:8800)
  ↕ HTTP
FastAPI server (local)
  → gpd: file → MP4
  → gpmc: MP4 → Google Photos (unlimited)
```

Files never leave your machine. Zero server costs.

## License

MIT
