Skip to content

initial zbic decompression support - #105

Closed
borntohonk wants to merge 1 commit into
Adubbz:masterfrom
borntohonk:zbic-exefs
Closed

borntohonk wants to merge 1 commit into
Adubbz:masterfrom
borntohonk:zbic-exefs

Conversation

@borntohonk

@borntohonk borntohonk commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

support for exefs .NSO0 binaries that are zbic compressed without having to decompress them first.

(inspiration taken from https://github.com/kinnay/zbic/tree/main/src to port it ontop of zstandard first to pure python https://github.com/borntohonk/Switch-Ghidra-Guides/blob/master/scripts/zbic.py and then now pure java for the purpose of supporting this usecase)

@Adubbz

Adubbz commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Happy to merge, though it seems there’s some compiler errors per GitHub Actions. Could you kindly fix those and then I’ll merge

@borntohonk

borntohonk commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Happy to merge, though it seems there’s some compiler errors per GitHub Actions. Could you kindly fix those and then I’ll merge

hmm, it compiles on my end

image image
ef6031d (HEAD -> zbic-exefs, origin/zbic-exefs) initial zbic decompression support
2f7954d (upstream/master, upstream/HEAD) Bump antoniovazquezblanco/setup-ghidra from 2.1.5 to 2.1.6 (#104)
1e5add9 Bump actions/setup-java from 5 to 6 (#103)
c30563c Bump antoniovazquezblanco/setup-ghidra from 2.1.4 to 2.1.5 (#102)
183b0a0 Bump antoniovazquezblanco/setup-ghidra from 2.1.3 to 2.1.4 (#100)
f269b17 Bump antoniovazquezblanco/setup-ghidra from 2.1.2 to 2.1.3 (#99)

(all of these warnings are addressed in the other PR that was merged)

./gradlew

> Task :compileJava
/build/Ghidra-Switch-Loader/src/main/java/adubbz/nx/analyzer/ipc/IPCEmulator.java:68: warning: [removal] MemoryState in ghidra.pcode.memstate has been deprecated and marked for removal
    private MemoryState state;
            ^
/build/Ghidra-Switch-Loader/src/main/java/adubbz/nx/analyzer/ipc/IPCEmulator.java:69: warning: [removal] MemoryBank in ghidra.pcode.memstate has been deprecated and marked for removal
    private MemoryBank ramBank;
            ^
/build/Ghidra-Switch-Loader/src/main/java/adubbz/nx/analyzer/ipc/IPCEmulator.java:70: warning: [removal] MemoryBank in ghidra.pcode.memstate has been deprecated and marked for removal
    private MemoryBank registerBank;
            ^
/build/Ghidra-Switch-Loader/src/main/java/adubbz/nx/analyzer/ipc/IPCEmulator.java:71: warning: [removal] BreakTableCallBack in ghidra.pcode.emulate has been deprecated and marked for removal
    private BreakTableCallBack bTable;
            ^
/build/Ghidra-Switch-Loader/src/main/java/adubbz/nx/analyzer/ipc/IPCEmulator.java:72: warning: [removal] Emulate in ghidra.pcode.emulate has been deprecated and marked for removal
    private Emulate emu;
            ^
/build/Ghidra-Switch-Loader/src/main/java/adubbz/nx/analyzer/ipc/IPCEmulator.java:111: warning: [removal] MemoryFaultHandler in ghidra.pcode.memstate has been deprecated and marked for removal
        MemoryFaultHandler faultHandler = new MemoryFaultHandler()
        ^
/build/Ghidra-Switch-Loader/src/main/java/adubbz/nx/analyzer/ipc/IPCEmulator.java:111: warning: [removal] MemoryFaultHandler in ghidra.pcode.memstate has been deprecated and marked for removal
        MemoryFaultHandler faultHandler = new MemoryFaultHandler()
                                              ^
/build/Ghidra-Switch-Loader/src/main/java/adubbz/nx/analyzer/ipc/IPCEmulator.java:117: warning: [removal] Emulate in ghidra.pcode.emulate has been deprecated and marked for removal
                Emulate emu = IPCEmulator.this.emu;
                ^
/build/Ghidra-Switch-Loader/src/main/java/adubbz/nx/analyzer/ipc/IPCEmulator.java:140: warning: [removal] DefaultMemoryState in ghidra.pcode.memstate has been deprecated and marked for removal
        this.state = new DefaultMemoryState(this.sLang);
                         ^
/build/Ghidra-Switch-Loader/src/main/java/adubbz/nx/analyzer/ipc/IPCEmulator.java:143: warning: [removal] MemoryPageBank in ghidra.pcode.memstate has been deprecated and marked for removal
        this.ramBank = new MemoryPageBank(this.sLang.getAddressFactory().getDefaultAddressSpace(), false, 4096, faultHandler);
                           ^
/build/Ghidra-Switch-Loader/src/main/java/adubbz/nx/analyzer/ipc/IPCEmulator.java:144: warning: [removal] MemoryPageBank in ghidra.pcode.memstate has been deprecated and marked for removal
        this.registerBank = new MemoryPageBank(this.sLang.getAddressFactory().getRegisterSpace(), false, 4096, faultHandler);
                                ^
/build/Ghidra-Switch-Loader/src/main/java/adubbz/nx/analyzer/ipc/IPCEmulator.java:148: warning: [removal] BreakTableCallBack in ghidra.pcode.emulate has been deprecated and marked for removal
        this.bTable = new BreakTableCallBack(this.sLang);
                          ^
/build/Ghidra-Switch-Loader/src/main/java/adubbz/nx/analyzer/ipc/IPCEmulator.java:149: warning: [removal] Emulate in ghidra.pcode.emulate has been deprecated and marked for removal
        this.emu = new Emulate(this.sLang, this.state, this.bTable);
                       ^
/build/Ghidra-Switch-Loader/src/main/java/adubbz/nx/analyzer/ipc/IPCEmulator.java:423: warning: [removal] BreakCallBack in ghidra.pcode.emulate has been deprecated and marked for removal
        BreakCallBack callBack = new BreakCallBack()
        ^
/build/Ghidra-Switch-Loader/src/main/java/adubbz/nx/analyzer/ipc/IPCEmulator.java:423: warning: [removal] BreakCallBack in ghidra.pcode.emulate has been deprecated and marked for removal
        BreakCallBack callBack = new BreakCallBack()
                                     ^
15 warnings

> Task :buildExtension

Created SwitchLoader-1.6.1-ef6031d-Ghidra_12.1.2.zip in /build/Ghidra-Switch-Loader/dist

@borntohonk

borntohonk commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor Author

This can actually be closed, i rebased my master to include this commit and you accepted that PR (the other one) @Adubbz #98

@borntohonk borntohonk closed this Sep 9, 2026
@borntohonk

borntohonk commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor Author

I will try to see why the github action is failing what doesn't fail locally for me

https://github.com/Adubbz/Ghidra-Switch-Loader/actions/runs/34339189862/job/102425682298

seems to build succesfully with the other fixes from the other PR

@borntohonk

borntohonk commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor Author

https://github.com/borntohonk/Ghidra-Switch-Loader/releases/download/12.1.2/SwitchLoader-1.6.1-2a1cb05-Ghidra_12.1.2.zip

2a1cb05

oh well, i don't know why the github action isn't pushing a release when it succeeds or no artifacts, im guessing missing artifact upload action?

(I will see if i cant push a PR for an actual functioning github action for releases, i have one which just uses gh)

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.

2 participants