# echiiiro453/google-trial-tool architecture

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

- Interactive diagram: https://gitdiagram.com/echiiiro453/google-trial-tool
- Repository: https://github.com/echiiiro453/google-trial-tool

## Overview

This repository provides two related trial-offer workflows: host scripts use ADB and Frida to discover Google Play subscription offers and open the native payment sheet; a browser extension configures offer injection into Google One checkout pages and warns about checkout charges. The README documents runner capabilities, while sampled Frida and extension code shows portions of their runtime behavior. Runner internals and the extension manifest were not sampled, so those links rely on README statements or are omitted where unverified.

Main entry points: [`auto-trial.ps1`](https://github.com/echiiiro453/google-trial-tool/blob/main/auto-trial.ps1) (Windows runner), [`auto-trial.sh`](https://github.com/echiiiro453/google-trial-tool/blob/main/auto-trial.sh) (Unix runner), [`frida-auto-trial.js`](https://github.com/echiiiro453/google-trial-tool/blob/main/frida-auto-trial.js) (Billing hook), [`browser-extension/popup.js`](https://github.com/echiiiro453/google-trial-tool/blob/main/browser-extension/popup.js) (Extension popup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Host runners"]
  node_windows["Windows runner<br/>[auto-trial.ps1]"]
  node_unix["Unix runner<br/>[auto-trial.sh]"]
end

subgraph group_frida["Android offer workflow"]
  node_billing_hook["Billing hook"]
  node_offer_discovery["Offer discovery"]
  node_offer_analysis["Offer analysis"]
end

subgraph group_extension["Browser extension"]
  node_popup["Extension popup<br/>[popup.js]"]
  node_extension_ui["Popup UI<br/>[popup.html]"]
  node_content_bridge["Content bridge<br/>[content.js]"]
  node_offer_injector["Offer injector<br/>[inject.js]"]
  node_play_guard["Checkout guard<br/>[play_guard.js]"]
end

node_user(("User"))
node_adb["ADB device"]
node_frida_server["Frida server"]
node_play_billing["Google Play Billing"]
node_payment_sheet["Payment sheet"]
node_module_apk["Billing helper APK<br/>[module.apk]"]
node_server_bundle["Frida server bundle<br/>[frida-server.zip]"]
node_checkout_page["Google One checkout"]
node_extension_storage[("Extension settings")]

node_user -->|"runs"| node_windows
node_user -->|"runs"| node_unix
node_windows -->|"connects via"| node_adb
node_unix -->|"connects via"| node_adb
node_windows -->|"deploys"| node_frida_server
node_unix -->|"deploys"| node_frida_server
node_windows -->|"pushes"| node_module_apk
node_unix -->|"pushes"| node_module_apk
node_server_bundle -->|"contains"| node_frida_server
node_windows -->|"injects"| node_billing_hook
node_unix -->|"injects"| node_billing_hook
node_billing_hook -->|"queries"| node_play_billing
node_billing_hook -->|"queries offers"| node_offer_discovery
node_offer_discovery -->|"parses offers"| node_offer_analysis
node_windows -->|"exports results"| node_offer_analysis
node_unix -->|"exports results"| node_offer_analysis
node_billing_hook -->|"launches"| node_payment_sheet
node_user -->|"confirms manually"| node_payment_sheet
node_user -->|"configures"| node_popup
node_extension_ui -->|"provides controls"| node_popup
node_popup -->|"reads and writes"| node_extension_storage
node_content_bridge -->|"reads settings"| node_extension_storage
node_content_bridge -->|"sends config"| node_offer_injector
node_offer_injector -->|"rewrites checkout"| node_checkout_page
node_play_guard -->|"checks charges"| node_checkout_page

click node_windows "https://github.com/echiiiro453/google-trial-tool/blob/main/auto-trial.ps1"
click node_unix "https://github.com/echiiiro453/google-trial-tool/blob/main/auto-trial.sh"
click node_billing_hook "https://github.com/echiiiro453/google-trial-tool/blob/main/frida-auto-trial.js"
click node_offer_discovery "https://github.com/echiiiro453/google-trial-tool/blob/main/frida-auto-trial.js"
click node_offer_analysis "https://github.com/echiiiro453/google-trial-tool/blob/main/frida-auto-trial.js"
click node_module_apk "https://github.com/echiiiro453/google-trial-tool/blob/main/module.apk"
click node_server_bundle "https://github.com/echiiiro453/google-trial-tool/blob/main/frida-server.zip"
click node_popup "https://github.com/echiiiro453/google-trial-tool/blob/main/browser-extension/popup.js"
click node_extension_ui "https://github.com/echiiiro453/google-trial-tool/blob/main/browser-extension/popup.html"
click node_content_bridge "https://github.com/echiiiro453/google-trial-tool/blob/main/browser-extension/content.js"
click node_offer_injector "https://github.com/echiiiro453/google-trial-tool/blob/main/browser-extension/inject.js"
click node_play_guard "https://github.com/echiiiro453/google-trial-tool/blob/main/browser-extension/play_guard.js"

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_windows,node_unix,node_user toneBlue
class node_billing_hook,node_offer_discovery,node_offer_analysis,node_extension_storage toneAmber
class node_popup,node_extension_ui,node_content_bridge,node_offer_injector,node_play_guard,node_frida_server,node_server_bundle toneMint
class node_adb,node_play_billing,node_payment_sheet,node_checkout_page toneIndigo
class node_module_apk toneTeal
```

## Components

### Host runners

- [Windows runner](https://github.com/echiiiro453/google-trial-tool/blob/main/auto-trial.ps1): `auto-trial.ps1`
- [Unix runner](https://github.com/echiiiro453/google-trial-tool/blob/main/auto-trial.sh): `auto-trial.sh`

### Android offer workflow

- [Billing hook](https://github.com/echiiiro453/google-trial-tool/blob/main/frida-auto-trial.js): `frida-auto-trial.js`
- [Offer discovery](https://github.com/echiiiro453/google-trial-tool/blob/main/frida-auto-trial.js): `frida-auto-trial.js`
- [Offer analysis](https://github.com/echiiiro453/google-trial-tool/blob/main/frida-auto-trial.js): `frida-auto-trial.js`

### Browser extension

- [Extension popup](https://github.com/echiiiro453/google-trial-tool/blob/main/browser-extension/popup.js): `browser-extension/popup.js`
- [Popup UI](https://github.com/echiiiro453/google-trial-tool/blob/main/browser-extension/popup.html): `browser-extension/popup.html`
- [Content bridge](https://github.com/echiiiro453/google-trial-tool/blob/main/browser-extension/content.js): `browser-extension/content.js`
- [Offer injector](https://github.com/echiiiro453/google-trial-tool/blob/main/browser-extension/inject.js): `browser-extension/inject.js`
- [Checkout guard](https://github.com/echiiiro453/google-trial-tool/blob/main/browser-extension/play_guard.js): `browser-extension/play_guard.js`

### Other components

- **User**
- **ADB device**
- **Frida server**
- **Google Play Billing**
- **Payment sheet**
- [Billing helper APK](https://github.com/echiiiro453/google-trial-tool/blob/main/module.apk): `module.apk`
- [Frida server bundle](https://github.com/echiiiro453/google-trial-tool/blob/main/frida-server.zip): `frida-server.zip`
- **Google One checkout**
- **Extension settings**

## Connections

- User → Windows runner: runs (evidence: `README.md`)
- User → Unix runner: runs (evidence: `README.md`)
- Windows runner → ADB device: connects via (evidence: `README.md`)
- Unix runner → ADB device: connects via (evidence: `README.md`)
- Windows runner → Frida server: deploys (evidence: `README.md`)
- Unix runner → Frida server: deploys (evidence: `README.md`)
- Windows runner → Billing helper APK: pushes (evidence: `README.md`)
- Unix runner → Billing helper APK: pushes (evidence: `README.md`)
- Frida server bundle → Frida server: contains (evidence: `README.md`)
- Windows runner → Billing hook: injects (evidence: `README.md`)
- Unix runner → Billing hook: injects (evidence: `README.md`)
- Billing hook → Google Play Billing: queries (evidence: `frida-auto-trial.js`)
- Billing hook → Offer discovery: queries offers (evidence: `frida-auto-trial.js`)
- Offer discovery → Offer analysis: parses offers (evidence: `frida-auto-trial.js`)
- Windows runner → Offer analysis: exports results (evidence: `README.md`)
- Unix runner → Offer analysis: exports results (evidence: `README.md`)
- Billing hook → Payment sheet: launches (evidence: `README.md`)
- User → Payment sheet: confirms manually (evidence: `README.md`)
- User → Extension popup: configures (evidence: `browser-extension/popup.js`)
- Popup UI → Extension popup: provides controls (evidence: `browser-extension/popup.js`)
- Extension popup → Extension settings: reads and writes (evidence: `browser-extension/popup.js`)
- Content bridge → Extension settings: reads settings (evidence: `browser-extension/content.js`)
- Content bridge → Offer injector: sends config (evidence: `browser-extension/content.js`)
- Offer injector → Google One checkout: rewrites checkout (evidence: `browser-extension/inject.js`)
- Checkout guard → Google One checkout: checks charges (evidence: `browser-extension/play_guard.js`)
