146 lines
7.3 KiB
Markdown
146 lines
7.3 KiB
Markdown
# AppsManager iOS 27 Source
|
|
|
|
**中文:** 这是 **Apps Manager** 的 iOS 27 非官方分支的源码部分。应用名仍为 **AppsManager**,仓库名为 **AppsManager27**。
|
|
|
|
**English:** This is the source portion of the unofficial iOS 27 fork of **Apps Manager**. The app name remains **AppsManager**; the repository is named **AppsManager27**.
|
|
|
|
> 本目录只包含 iOS 27 兼容 Hook、内置文件浏览器集成和构建脚本。原版 Apps Manager 的应用本体源码是闭源的,不在此仓库中;构建时需要你自己提供原始 IPA 中解包出的 `ADManager.app`,以及签名证书和描述文件。
|
|
> This directory contains only the iOS 27 compatibility hook, the built-in file browser integration, and build scripts. The original Apps Manager app source is proprietary and is not included. You must provide the extracted `ADManager.app` from the original IPA, plus your own signing certificate and provisioning profile.
|
|
|
|
## 目录结构 / Layout
|
|
|
|
```text
|
|
source/
|
|
├── hook/src/
|
|
│ ├── WBHook.m # AppsManager iOS 27 hook and feature fixes
|
|
│ ├── main.m # WQ Files browser UI, modified for AppsManager
|
|
│ └── WQ*.m / WQ*.h # WQ Files file browser, editors, media, ZIP, etc.
|
|
├── build_dylib.sh # Compile AppsManagerHook.dylib
|
|
├── build_app.sh # Inject the dylib, sign the app bundle
|
|
├── LICENSE # GPL-3.0 (WQ Files-derived source)
|
|
└── README.md
|
|
```
|
|
|
|
## 主要修改 / Main changes
|
|
|
|
- Hook `LSApplicationWorkspace` and `LSApplicationProxy` to expose app containers.
|
|
- Parse the LaunchServices CSStore database for bundle/container/name mapping.
|
|
- Grant per-container access through `worse_query`.
|
|
- Real app data sizes, pull-to-refresh full size scan.
|
|
- Backup / restore with fallback for the keychain nil-array failure.
|
|
- Wipe user data using `worse_query`-backed recursive deletion.
|
|
- Recalculate the affected app size after backup, restore and wipe.
|
|
- Detail page version/path/date/app-group support.
|
|
- Replace the `filza://` prompt with the built-in WQ Files browser.
|
|
- Present media through the native `AVPlayerViewController`.
|
|
- Build the app list by traversing `/private/var/mobile/Containers/Data/Application` through `worse_query` on every launch. LaunchServices is optional and only used for names and bundle paths.
|
|
- Resolve app names from the native LaunchServices API, the bundle `Info.plist`, LaunchServices display names, and finally a prettified bundle ID.
|
|
- Rebuild the list after preparation if the first load ran before the container registry was ready.
|
|
|
|
## 应用列表 / App list
|
|
|
|
The list no longer requires a readable LaunchServices CSStore:
|
|
|
|
1. Enumerate app data containers through `wq_enumerate` (MCM / LaunchServices API / full inode scan fallback).
|
|
2. Resolve each container's bundle ID from the native API, LaunchServices map, container xattr, metadata plist, or bundle ID resolver.
|
|
3. Resolve the display name from the native API, bundle `Info.plist`, LaunchServices display names, or the bundle ID.
|
|
4. If the screen loaded before preparation finished, reload it once the registry is ready.
|
|
|
|
The first full scan on a device where the LaunchServices API and container manager return nothing can take around 30 seconds; the launch progress sheet is shown. Later launches reuse the incremental scan cache.
|
|
|
|
## 构建要求 / Build requirements
|
|
|
|
- macOS with Xcode command line tools and an iPhoneOS SDK.
|
|
- `insert_dylib` / `idylib` available in `PATH`, or set `INSERT_DYLIB`.
|
|
- An original `ADManager.app` extracted from the IPA you are allowed to modify.
|
|
- A code signing identity and a `.mobileprovision` for your target device(s).
|
|
- An entitlements plist that includes the App Group used by `worse_query`.
|
|
|
|
## 构建 / Build
|
|
|
|
### 1. Compile the dylib
|
|
|
|
```sh
|
|
cd source
|
|
./build_dylib.sh
|
|
```
|
|
|
|
Output: `source/hook/AppsManagerHook.dylib`
|
|
|
|
### 2. Build and sign the app
|
|
|
|
```sh
|
|
export APP_SOURCE="/path/to/Payload/ADManager.app"
|
|
export PROVISION="/path/to/your.mobileprovision"
|
|
export SIGN_IDENTITY="Apple Distribution: Your Name (TEAMID)"
|
|
export ENTITLEMENTS="/path/to/entitlements.plist"
|
|
export KEYCHAIN="/path/to/signing.keychain" # optional
|
|
export INSERT_DYLIB="/path/to/idylib" # optional if already in PATH
|
|
|
|
./build_app.sh
|
|
```
|
|
|
|
Output: `source/out/AppsManager.app`
|
|
|
|
The script:
|
|
|
|
1. Copies the original app bundle.
|
|
2. Injects `AppsManagerHook.dylib` into `ADManager`.
|
|
3. Sets `CFBundleIdentifier` to `com.jbjf.appsmanager` by default.
|
|
4. Embeds your provisioning profile.
|
|
5. Signs the dylib and the app with your identity.
|
|
|
|
You can override `BUNDLE_ID` and `OUT_DIR` if needed.
|
|
|
|
## 签名与权限 / Signing and entitlements
|
|
|
|
The published IPA is signed for a personal certificate and is not installable on arbitrary devices. Re-sign with your own certificate.
|
|
|
|
For `worse_query` and App Group access, the app needs the relevant entitlements from your provisioning profile, including an App Group. The original build used an App Group such as:
|
|
|
|
```text
|
|
group.<your-team-id>.<your-app-id>.01
|
|
```
|
|
|
|
The exact value must match your own profile. Do not reuse someone else's certificate, profile, or App Group.
|
|
|
|
The hook is stored as a nested framework at:
|
|
|
|
```text
|
|
Payload/AppsManager.app/Frameworks/AppsManagerHook.framework
|
|
```
|
|
|
|
Standard signing tools must sign `Frameworks` recursively. If a tool signs only the main executable, the app will fail to launch after re-signing. The published build uses the framework layout specifically so tools such as AltStore, SideStore, Sideloadly, and similar signers handle the hook as nested code.
|
|
|
|
### 重签名 / Re-signing
|
|
|
|
- 必须保留 App Group 权限;如果新的描述文件没有 App Group,App 会提示 `No usable App Group`,无法访问其他 App 容器。
|
|
The new provisioning profile must include an App Group. Without it the app reports `No usable App Group` and cannot access other app containers.
|
|
- 修改 Bundle ID 时,必须同时使用与该 Bundle ID 匹配的描述文件和 entitlements。
|
|
When changing the Bundle ID, use a matching provisioning profile and entitlements.
|
|
- 签名工具必须递归签名 `Frameworks` 目录;不要只签名主程序。
|
|
The signing tool must recursively sign the `Frameworks` directory, not only the main executable.
|
|
- 免费 Apple ID 通常不支持 App Group,因此无法让 worse_query 正常工作。
|
|
Free Apple ID profiles generally do not support App Groups, so worse_query will not work with them.
|
|
|
|
## 第三方代码 / Third-party code
|
|
|
|
This source includes and links code from:
|
|
|
|
- **WQ Files** by kolbicz — <https://github.com/kolbicz/WQFiles> — GPL-3.0-or-later.
|
|
- **worse_query** by Taj C (forcequit) — <https://github.com/forcequitOS/worse_query> — GPL-3.0-or-later.
|
|
|
|
The WQ Files-derived files retain their copyright headers. See `LICENSE` for the full GPL-3.0 text. The AppsManager hook source in this directory is distributed under the same GPL-3.0-or-later terms to the extent required by the combined work.
|
|
|
|
## 测试 / Tested
|
|
|
|
- iPhone 18 Pro Max (iPhone19,7)
|
|
- iOS 27.0.1 (24A446)
|
|
|
|
## 说明 / Notes
|
|
|
|
- Activation remains trial; no activation bypass is included.
|
|
- Keychain data cannot be wiped due to sandbox/permission restrictions.
|
|
- Some third-party bundles cannot be read; version/icon may be `null` or a placeholder.
|
|
- Use this source only for personal testing and data migration. Respect the original apps' licenses and applicable laws.
|