# hughbohl/google-ultra architecture

> Architecture diagram of the GitHub repository hughbohl/google-ultra, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hughbohl/google-ultra
- Repository: https://github.com/hughbohl/google-ultra

## Overview

google-ultra is a local Android automation script for activating Google One AI Ultra’s free-trial offer through Google Play Billing. The main workflow checks the rooted device, prepares and verifies the target Play account, queries and selects an eligible offer inside Google One, confirms only a zero-cost checkout, then verifies the subscription and writes a report. The README documents these stages; the sampled source excerpts do not expose most of their implementation details, so relationships below cite that documentation.

Main entry points: [`ultra0.py`](https://github.com/hughbohl/google-ultra/blob/main/ultra0.py) (Add account)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Device and account"]
  node_environment["Environment check<br/>[ultra0.py]"]
  node_account_setup["Add account<br/>[ultra0.py]"]
  node_account_switch["Switch and verify<br/>[ultra0.py]"]
end

subgraph group_billing["Offer and checkout"]
  node_google_one["Google One process"]
  node_frida_billing["Frida billing bridge<br/>[ultra0.py]"]
  node_offer_query["Offer query<br/>[ultra0.py]"]
  node_offer_select["Trial selection<br/>[ultra0.py]"]
  node_play_checkout["Play checkout"]
  node_checkout_confirm["Zero-cost confirmation<br/>[ultra0.py]"]
end

subgraph group_results["Verification and records"]
  node_subscription_verify["Subscription verification<br/>[ultra0.py]"]
  node_report["Run report<br/>[ultra0.py]"]
end

node_user(("Operator"))
node_accounts["Account input"]
node_device["Rooted Android"]
node_payment_method["Payment method"]

node_user -->|"runs check"| node_environment
node_environment -->|"checks access"| node_device
node_user -->|"provides accounts"| node_accounts
node_accounts -->|"supplies credentials"| node_account_setup
node_account_setup -->|"adds account"| node_device
node_account_setup -->|"hands off account"| node_account_switch
node_account_switch -->|"switches and checks"| node_device
node_account_switch -->|"starts workflow for"| node_google_one
node_frida_billing -->|"attaches to"| node_google_one
node_frida_billing -->|"loads billing module"| node_offer_query
node_offer_query -->|"queries products"| node_google_one
node_offer_query -->|"returns offers"| node_offer_select
node_offer_select -->|"launches selected offer"| node_play_checkout
node_play_checkout -->|"shows checkout"| node_checkout_confirm
node_payment_method -->|"authorizes subscription"| node_play_checkout
node_user -->|"adds if needed"| node_payment_method
node_checkout_confirm -->|"confirms zero price"| node_play_checkout
node_checkout_confirm -->|"opens subscription page"| node_subscription_verify
node_subscription_verify -->|"records outcome"| node_report
node_user -->|"reviews results"| node_report

click node_environment "https://github.com/hughbohl/google-ultra/blob/main/ultra0.py"
click node_account_setup "https://github.com/hughbohl/google-ultra/blob/main/ultra0.py"
click node_account_switch "https://github.com/hughbohl/google-ultra/blob/main/ultra0.py"
click node_frida_billing "https://github.com/hughbohl/google-ultra/blob/main/ultra0.py"
click node_offer_query "https://github.com/hughbohl/google-ultra/blob/main/ultra0.py"
click node_offer_select "https://github.com/hughbohl/google-ultra/blob/main/ultra0.py"
click node_checkout_confirm "https://github.com/hughbohl/google-ultra/blob/main/ultra0.py"
click node_subscription_verify "https://github.com/hughbohl/google-ultra/blob/main/ultra0.py"
click node_report "https://github.com/hughbohl/google-ultra/blob/main/ultra0.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_environment,node_account_setup,node_account_switch toneBlue
class node_google_one,node_frida_billing,node_offer_query,node_offer_select,node_play_checkout,node_checkout_confirm toneAmber
class node_subscription_verify,node_report toneMint
class node_user,node_accounts,node_device,node_payment_method toneIndigo
```

## Components

### Device and account

- [Environment check](https://github.com/hughbohl/google-ultra/blob/main/ultra0.py): `ultra0.py`
- [Add account](https://github.com/hughbohl/google-ultra/blob/main/ultra0.py): `ultra0.py`
- [Switch and verify](https://github.com/hughbohl/google-ultra/blob/main/ultra0.py): `ultra0.py`

### Offer and checkout

- **Google One process**
- [Frida billing bridge](https://github.com/hughbohl/google-ultra/blob/main/ultra0.py): `ultra0.py`
- [Offer query](https://github.com/hughbohl/google-ultra/blob/main/ultra0.py): `ultra0.py`
- [Trial selection](https://github.com/hughbohl/google-ultra/blob/main/ultra0.py): `ultra0.py`
- **Play checkout**
- [Zero-cost confirmation](https://github.com/hughbohl/google-ultra/blob/main/ultra0.py): `ultra0.py`

### Verification and records

- [Subscription verification](https://github.com/hughbohl/google-ultra/blob/main/ultra0.py): `ultra0.py`
- [Run report](https://github.com/hughbohl/google-ultra/blob/main/ultra0.py): `ultra0.py`

### Other components

- **Operator**
- **Account input**
- **Rooted Android**
- **Payment method**

## Connections

- Operator → Environment check: runs check (evidence: `README.md`)
- Environment check → Rooted Android: checks access (evidence: `README.md`)
- Operator → Account input: provides accounts (evidence: `README.md`)
- Account input → Add account: supplies credentials (evidence: `README.md`)
- Add account → Rooted Android: adds account (evidence: `README.md`)
- Add account → Switch and verify: hands off account (evidence: `README.md`)
- Switch and verify → Rooted Android: switches and checks (evidence: `README.md`)
- Switch and verify → Google One process: starts workflow for (evidence: `README.md`)
- Frida billing bridge → Google One process: attaches to (evidence: `README.md`)
- Frida billing bridge → Offer query: loads billing module (evidence: `README.md`)
- Offer query → Google One process: queries products (evidence: `README.md`)
- Offer query → Trial selection: returns offers (evidence: `README.md`)
- Trial selection → Play checkout: launches selected offer (evidence: `README.md`)
- Play checkout → Zero-cost confirmation: shows checkout (evidence: `README.md`)
- Payment method → Play checkout: authorizes subscription (evidence: `README.md`)
- Operator → Payment method: adds if needed (evidence: `README.md`)
- Zero-cost confirmation → Play checkout: confirms zero price (evidence: `README.md`)
- Zero-cost confirmation → Subscription verification: opens subscription page (evidence: `README.md`)
- Subscription verification → Run report: records outcome (evidence: `README.md`)
- Operator → Run report: reviews results (evidence: `README.md`)
