Skip to content

Repository files navigation

Python Android iOS License

中文 · English


🏃 Keep 修改器(可用于测验)

核心能力:按你的心意,在 Keep App 中真实调整 12 分钟跑的里程数据。

不是改截图,不是 P 图。Keep 自己从系统 GPS 读数据、自己算距离、自己存记录——考官打开 Keep,看到的是一条完整的、包含距离/配速/路线图的跑步记录。你想跑多少米,就给你加多少米。


工作原理

你的手机浏览器打开 phone.html
  │  ① 自动获取你当前的真实 GPS 位置
  │  ② 你设置想要的里程(目标总距离 / 增加米数)
  │  ③ 自动生成 GPX 轨迹:起点 = 终点 = 你的真实位置
  │  ④ 下载 GPX 到手机
  ▼
GPS Joystick(安卓 · 系统级模拟)
  │  导入 GPX → 在系统 GPS 层面播放路线
  │  (所有 App 都读取模拟后的位置,包括 Keep)
  ▼
Keep App
  │  接收系统 GPS → 记录距离、配速、路线图
  │  → 跑步历史中永久保存 ✓
  │  → 考官查看 Keep → 看到完整跑步数据 ✓

快速开始(安卓 · 免 Root)

第一步:安装 GPS Joystick

GPS Joystick

第二步:开启开发者选项

设置 → 关于手机 → 连续点击「版本号」7 次
→ 返回设置 → 开发者选项 → 「选择模拟位置信息应用」→ 选 GPS Joystick

第三步:手机上打开 phone.html

phone.html 传到手机(微信/数据线/云盘均可),用 Chrome 浏览器 打开。

页面会自动获取你的真实 GPS 位置,然后:

你想做的事 怎么设置
直接跑 3.2 km 选「目标总距离」→ 输入 3.2
平时跑 2.5 km,想多加 400m 选「增加米数」→ 平时 2.5 + 多跑 400m → 自动算 2.9 km

选好路线形状(折返跑推荐),点「生成 GPX 轨迹」→ 下载 GPX 文件。

第四步:开始跑

GPS Joystick → 右上角菜单 → 导入 GPX → 点击播放 ▶
切换到 Keep → 开始 12 分钟跑
→ 坐等 12 分钟 → Keep 记录完整里程 ✓

phone.html 功能一览

功能 说明
📍 真实定位 浏览器自动获取手机 GPS 位置,起点就是你真实所在
🎯 目标总距离 直接设置想跑多少公里
增加米数 设置平时距离 + 想多加的米数
🗺️ 三种路线 折返跑 / 矩形环线 / 400m 跑道
👁️ 地图预览 生成前在 OpenStreetMap 上查看路线
📥 一键下载 GPX 直接存到手机

路线形状对比

形状 起终点重合度 适用场景
折返跑 out_and_back ~1 米 公园/街道跑步(推荐)
矩形环线 loop ~9 米 街区环绕
400m 跑道 track_run ~3 米 标准田径场

速度模型(真人节奏)

配速 │                    ╭──╮  冲刺 +8%
     │    ╭──────────────╯  ╰──  巡航 ±5% 呼吸波动
     │   ╱                        ╲
     │  ╱ 热身 0→92%                ╲ 降温 -5%
     │ ╱                              ╲
     └───────────────────────────────────── 时间
      0   1'      7'      10'  11'40"  12'

全程余弦平滑过渡,无瞬时速度跳跃,与真人跑步数据无异。

命令行用法(电脑端)

pip install -r requirements.txt

# 交互式向导(推荐)
python interactive.py

# 命令行生成 GPX
python generate.py --distance 3.0 --shape out_and_back

# iOS 实时注入(需 USB + 开发者模式)
python simulate.py --gpx output/run.gpx

防检测

  • GPS 采样 1Hz(匹配真机频率)
  • 横向漂移 ~1.5m(匹配消费级 GPS 精度)
  • 余弦插值平滑过渡(无瞬时跳跃)
  • 转弯自动减速
  • 起终点基本重合(< 10m)

如果 Keep 仍提示检测到模拟位置

需要 Root 方案:

Magisk(Root)→ LSPosed(Xposed框架)→ MockMockLocation(隐藏模拟标记)

装完三件套后,任何 App 都无法检测 GPS 模拟。

项目结构

keep-modifier/
├── phone.html             # 🔥 手机网页工具(零安装,主力)
├── interactive.py         # 交互式命令行向导
├── generate.py            # 命令行 GPX 生成器
├── simulate.py            # iOS 实时注入(pymobiledevice3)
├── track_generator.py     # 核心引擎:速度模型 + 路线生成
├── geo_utils.py           # 地理数学(Haversine、方位角)
├── ios_device.py          # pymobiledevice3 封装
├── config.py              # 所有可调参数
└── output/                # 生成的 GPX 文件

常见问题

Q: Keep 里会留下跑步记录吗? 会。Keep 从系统 GPS 读取数据,完整记录距离、配速、路线图和用时。考官查看 Keep 跑步历史即可看到。

Q: 需要 Root 吗? 通常不需要。phone.html + GPS Joystick 即可。仅当 Keep 检测到模拟位置时才需要 Root。

Q: Keep 能检测出来吗? 不 Root:少数手机/Keep 版本可能提示「检测到模拟位置」。Root + MockMockLocation:几乎无法检测。

Q: iOS 怎么用? 电脑端 python simulate.py --gpx xxx.gpx 通过 USB 连 iPhone 实时注入。DDI 挂载失败可用 3uTools(免费 Windows 工具)导入 GPX。


🏃 Keep Modifier (Exam Ready)

Core capability: Truly modify your 12-minute run mileage in the Keep app — exactly the way you want.

No screenshot editing. No photo manipulation. Keep reads the system GPS, calculates the distance itself, and stores the record. When the examiner opens Keep, they see a complete running record with distance, pace, and route map. You decide the meters — it delivers.


How It Works

Open phone.html in your phone's browser
  │  ① Detects your REAL GPS location
  │  ② You set desired distance or extra meters
  │  ③ Generates GPX: START = END = YOUR REAL POSITION
  │  ④ Downloads GPX to your phone
  ▼
GPS Joystick (Android · system-level spoofing)
  │  Import GPX → Replay route at OS GPS level
  │  (All apps see the spoofed location, including Keep)
  ▼
Keep App
  │  Reads system GPS → Records distance, pace, route map
  │  → Permanent record in running history ✓
  │  → Examiner opens Keep → sees complete running data ✓

Quick Start (Android · No Root)

Step 1: Install GPS Joystick from Google Play.

Step 2: Enable Developer Options → "Select mock location app" → GPS Joystick.

Step 3: Transfer phone.html to your phone, open with Chrome. The page auto-detects your GPS. Choose:

  • Target distance (e.g. exactly 3.2 km)
  • Add meters (e.g. usually run 2.5 km, add 400m → 2.9 km total)

Select route shape, generate, download GPX.

Step 4: GPS Joystick → Import GPX → Play. Switch to Keep, start 12-minute run. Done.

Route Shapes

Shape Start-End Gap Best For
Out & Back ~1 m Park / street running (recommended)
Loop ~9 m Block circuit
400m Track ~3 m Standard athletics track

Speed Model

Human-realistic pace curve with cosine-smoothed transitions — no instant jumps, indistinguishable from real running data.

Anti-Detection

  • 1 Hz GPS sampling (matches real phone GPS)
  • ~1.5m lateral drift (matches consumer GPS accuracy)
  • Cosine-interpolated speed transitions
  • Natural corner deceleration
  • Start ≈ End (under 10m)

If Keep still detects mock locations: Root + Magisk + LSPosed + MockMockLocation makes it undetectable.

CLI Usage (Desktop)

pip install -r requirements.txt
python interactive.py       # Interactive wizard
python generate.py --distance 3.0 --shape out_and_back
python simulate.py --gpx output/run.gpx   # iOS injection

FAQ

Q: Will Keep have a running record? Yes. Keep reads system GPS and records distance, pace, route map, and elapsed time — a complete running record the examiner can verify.

Q: Does it need root? No, for basic use. Root only needed if Keep detects mock locations.

Q: Can Keep detect this? Without root: some phone/app versions may flag mock locations. With root + MockMockLocation: virtually undetectable.

Q: How does iOS work? Use python simulate.py with USB-connected iPhone, or import GPX into 3uTools (free Windows tool) as fallback.


仅供学习研究 · 修改运动数据可能违反 Keep 用户协议,请自行承担风险。
For educational and research purposes only. Modifying exercise data may violate Keep's Terms of Service. Use at your own risk.

About

按你的心意,在Keep中真实调整12分钟跑里程。不是改截图,Keep自己读GPS、自己算距离、自己存记录。Truly modify Keep 12-min run mileage — Keep records it as real exercise data.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages