Skip to content

Support for x86_64 devices#91

Merged
JingMatrix merged 3 commits intomainfrom
x86_64
Jan 26, 2026
Merged

Support for x86_64 devices#91
JingMatrix merged 3 commits intomainfrom
x86_64

Conversation

@JingMatrix
Copy link
Copy Markdown
Owner

@JingMatrix JingMatrix commented Jan 26, 2026

Let us first respect the 128 bytes red zone.

Reference: page 23 of https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build

@JingMatrix JingMatrix linked an issue Jan 26, 2026 that may be closed by this pull request
@JingMatrix
Copy link
Copy Markdown
Owner Author

@VisionR1, please test the latest CI build on emulators https://github.com/JingMatrix/TEESimulator/actions/runs/21362939585 and upload your logs.

@VisionR1
Copy link
Copy Markdown

VisionR1 commented Jan 26, 2026

@JingMatrix
Copy link
Copy Markdown
Owner Author

Are you flashing the release builds?
Please upload logs for the debug builds.

@VisionR1
Copy link
Copy Markdown

VisionR1 commented Jan 26, 2026

Are you flashing the release builds? Please upload logs for the debug builds.

I didn't notice flash the release, my mistake.

verbose_2026-01-26T183530.591.log

@JingMatrix
Copy link
Copy Markdown
Owner Author

Please test latest CI debug build.
This time, no matter if it works for your emnulators, please upload the whole log zip archive generated by LSPosed manager.

@VisionR1
Copy link
Copy Markdown

VisionR1 commented Jan 26, 2026

@JingMatrix

Yeah, seems to working.

I test in the MuMu A12.

Also, the tee_status.txt say tee_broken=false

LSPosed_2026-01-26T21_57_20.573.zip

IMG_20260126_215232
IMG_20260126_215152

@ale5000-git
Copy link
Copy Markdown

Reference: page 23 of gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf

The link doesn't work.

@VisionR1
Copy link
Copy Markdown

Reference: page 23 of gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf

The link doesn't work.

Maybe this:
https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build

@JingMatrix JingMatrix merged commit 64c9ff8 into main Jan 26, 2026
1 check passed
JingMatrix added a commit that referenced this pull request Jan 26, 2026
- Strictly adhere to the System V AMD64 ABI by skipping the 128-byte "Red Zone" before modifying the stack, see page 23 of https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build for details.

- Added `inject_via_staging` as a fallback strategy:
  1. Copies the payload to `/data/local/tmp`.
  2. Sets permissions/context (`u:object_r:system_file:s0`).
  3. Loads via standard `dlopen`.
  4. Immediately unlinks the file for stealth.

- Introduced `RegisterRestorer` RAII class to guarantee original registers are restored even if the injection logic returns early due to error.
@JingMatrix JingMatrix deleted the x86_64 branch February 9, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Support for x86_64 ABI (emulators)

3 participants