Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throws error when importing BOTW or Celeste #25

Closed
Torphedo opened this issue Aug 1, 2021 · 5 comments
Closed

Throws error when importing BOTW or Celeste #25

Torphedo opened this issue Aug 1, 2021 · 5 comments

Comments

@Torphedo
Copy link

Torphedo commented Aug 1, 2021

Whenever I try to import the main NSO file of BOTW or Celeste dumped from my Switch, Ghidra throws an error. I've made sure that I have the lastest version of the JRE and JDK. I'm using Ghidra 9.1, with the extension for that version. Here's the error it gives:

java.lang.RuntimeException: java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer
	at generic.continues.ContinuesFactory.create(ContinuesFactory.java:61)
	at ghidra.app.util.bin.format.macho.MachHeader.createMachHeader(MachHeader.java:73)
	at ghidra.app.util.bin.format.macho.MachHeader.createMachHeader(MachHeader.java:61)
	at ghidra.app.util.opinion.MachoPrelinkUtils.parsePrelinkXml(MachoPrelinkUtils.java:56)
	at ghidra.file.formats.ios.prelink.PrelinkFileSystem.isValid(PrelinkFileSystem.java:79)
	at ghidra.formats.gfilesystem.factory.GFileSystemBaseFactory.probe(GFileSystemBaseFactory.java:66)
	at ghidra.formats.gfilesystem.factory.FileSystemFactoryMgr.test(FileSystemFactoryMgr.java:233)
	at ghidra.formats.gfilesystem.FileSystemService.isFileFilesystemContainer(FileSystemService.java:553)
	at ghidra.plugin.importer.ImporterUtilities.showImportDialog(ImporterUtilities.java:172)
	at ghidra.plugin.importer.ImporterUtilities.lambda$showImportDialog$0(ImporterUtilities.java:138)
	at ghidra.util.task.TaskLauncher$2.run(TaskLauncher.java:119)
	at ghidra.util.task.Task.monitoredRun(Task.java:126)
	at ghidra.util.task.TaskRunner.lambda$startTaskThread$1(TaskRunner.java:94)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer
	at generic.continues.ContinuesFactory.create(ContinuesFactory.java:45)
	... 15 more

---------------------------------------------------
Build Date: 2019-Oct-23 1737 EDT
Ghidra Version: 9.1
Java Home: C:\Program Files\Java\jdk-16.0.1
JVM Version: Oracle Corporation 16.0.1
OS: Windows 10 10.0 amd64
Workstation: 192.168.1.215
@Torphedo
Copy link
Author

Torphedo commented Aug 1, 2021

2021-08-01.15-30-17.mp4

As you can see, it doesn't even get to the point where it asks for the language.

@masagrator
Copy link

masagrator commented Aug 1, 2021

You are using release version or compiled it yourself? Because repo is now not supporting older Ghidra versions (below 9.2.2) because of API changes. So even if issue is true, it probably won't be taken into account as you are using obsolete version.

@Torphedo
Copy link
Author

Torphedo commented Aug 1, 2021

You are using release version or compiled it yourself? Because repo is now not supporting older Ghidra versions (below 9.2.2) because of API changes. So even if issue is true, it probably won't be taken into account as you are using obsolete version.

I used this release file, I'll go try building from source. Thanks!

@Torphedo
Copy link
Author

Torphedo commented Aug 1, 2021

I hate to be that guy, but I can't seem to build it. I've got my JAVA_HOME variable set up, as well as my GHIDRA_INSTALL_DIR. ./gradlew doesn't get recognized as a command, and running gradlew.bat build in the repo's folder throws this error:

Script 'E:\Emulation\BOTW\Tools\ghidra_9.1_PUBLIC\support\buildExtension.gradle' line: 31

* What went wrong:
A problem occurred evaluating script.
> Could not find method compile() for arguments [directory 'lib'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

I'm probably doing something simple wrong, but I don't have enough experience with Java to figure out exactly what that is.

@Torphedo
Copy link
Author

Update: turns out Ghidra was using JDK 16, not 11. Fixed now.

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

No branches or pull requests

2 participants