altstoreio / altstoreio/AltStore
AltJIT: attach failed (Not allowed to attach) when app has multiple PIDs; needs PID retry/selection
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 14.4k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- macOS 26.3 (25D125)
- AltServer 1.7.2 (build 90) with bundled altjit
- iPadOS 26.2.1 (23C71)
Problem
AltJIT can fail with:
"Could not attach debugger ... Not allowed to attach to process".
In my case the app spawns multiple processes with the same name (ManicEmu). AltJIT sometimes picks a PID that denies attach, while another PID attaches fine and JIT is enabled.
Example output (PID redacted, but the key part is attach denial):
- Started debugserver on port ####
- Attaching debugger...
- (lldb) attach -p
- error: attach failed (Not allowed to attach to process)
Repro (happens frequently)
- Connect iPad over USB, unlock it, open Manic EMU, keep it in the foreground.
- Run: sudo /Applications/AltServer.app/Contents/MacOS/altjit enable "Manic EMU" --udid
- AltJIT starts debugserver, then LLDB attach fails with "Not allowed to attach to process".
- Listing processes shows multiple PIDs for ManicEmu:
- python3 -m pymobiledevice3 processes pgrep --udid ManicEmu
- Re-running altjit with the other PID succeeds:
- sudo .../altjit enable <other_pid> --udid
Expected
- Enabling JIT by app name should be reliable.
Suggested fix
- When enabling by app name/bundle, enumerate candidate PIDs and retry attach if the first one is denied (newest PID first is often the right one).
- Alternatively, resolve the correct main app PID via SpringBoard/frontmost app/bundle id rather than a name match.
- If attach fails, show candidate PIDs in the error so users can recover.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the altjit enable entry point and reproduce the failure using the listed pymobiledevice3 processes pgrep command, then trace how the selected PID reaches debugserver and LLDB attach. Done means enabling JIT by app name reliably handles multiple candidate PIDs, or reports candidates clearly when attachment is denied; verify against the Manic EMU reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, swift
- Domain
- devtools, mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100