feat(p2jb): merge upstream P2JB 2.6 and fix elfldr dispatch #11
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-itsPLK/ps5-y2jb-autoloader!11
Loading…
Reference in a new issue
No description provided.
Delete branch "main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Merges upstream matem6/P2JB-Y2JB-Porting 2.3 → 2.6 into
src/p2jb.js, plus local fixes for elfldr delivery in this repo's environment.Upstream changes merged (2.3 → 2.6)
SECURITY_FLAGS/KERNEL_PMAP_STORE/GVMSPACEoffsets (FW 9.00–12.40)gpu.setup, PM4 DMA commands)stage_debug_menu: enables the debug menu via the GPU channel (security_flags / target_id / qa_flags / utoken_flags)load_aioshellcode) on Y2JB ≥ 1.5, sandbox-slot/USB file on ≤ 1.4get_kernel_offset()fallback inensure_kernel_offset()(upstream 1.3-compat fix — the framework-provided offsets lack the new fields, so the static table is now authoritative)Local fixes
1. elfldr dispatch (required). Upstream 2.6 dispatches elfldr delivery on
version_string, which this repo never defines. Without the fix,get_y2jb_version()returnsnulland execution falls into the sandbox path, where upstream's hardcoded names (elfldr_1320_v5.elf…) never match this repo's artifact — elfldr would be silently skipped and:9021would never open. The dispatch now uses capability detection: ifload_aioshellcodeexists, prefer kexp. Upstream's dual-path semantics are preserved.2. Sandbox probe uses the build-injected artifact name.
TITLE_IDis always assigned beforep2jb.jsloads in this repo, making the Y2JB-1.3 USB branch structurally dead — and the update package already deploys the built elfldr into the exact splash-cache directory the sandbox path probes. The 1.4/1.3 branching and USB candidate list are dropped; the probe checks a single@@ELFLDR_FILE@@placeholder substituted at build time (new Makefile sed line), mirroringELFLDR_NAMEinaioshellcode.js. Without the build step the placeholder simply failsfile_existsand the loader is skipped, jailbreak unaffected.Preserved local adaptations
start_p2jb()wrapper and true/false return contract,window.uiLogpipe logging, progress overlay aroundprepare_fds, 10 s pre-start delay, commented-out worker termination block, CRLF line endings.Notes
git diff -w), matching upstream's own 2.3→2.6 delta (+754/−53). GitHub shows a larger raw diff only if whitespace is compared; the file keeps its existing CRLF line endings.stage_debug_menudegrades gracefully in this environment:sceKernelAllocateMainDirectMemory/sceKernelMapNamedDirectMemoryare not defined, sogpu.setup()throws and is caught by upstream's try/catch ("GPU debug-menu path failed") — the jailbreak itself is unaffected. Supplying those two symbols inglobal.jswould enable the feature.node --checkpasses. Not yet tested on hardware — a full real-device run (jailbreak → kexp elfldr →:9021→ autoload chain) is recommended before merge.This doesn't change anything. We only use kexp so there's no point adding code for gpu dma patching.
Pull request closed