Comments (10)
@Ayrx
Yes,the latest commit has fixed this issue, now it works perfectly for me.
from jnianalyzer.
@eacmen
@Ayrx
How to instlall this extension, I got this error when loading it into Ghidra 9.0
from jnianalyzer.
@eacmen
@Ayrx
Right.... missing properties
I have same issue, look like jni_all.h can not be imported
from jnianalyzer.
How are you building the extension?
FWIW I used "GhidraDev->Export->Ghidra Module Extension" from Eclipse with the official Ghidra Eclipse plugin. Code has been tested against Ghidra 9.0.4. That should give you a file like ghidra_9.0.4_PUBLIC_20190903_JNIAnalyzer.zip
that you can install in Ghidra.
from jnianalyzer.
How are you building the extension?
FWIW I used "GhidraDev->Export->Ghidra Module Extension" from Eclipse with the official Ghidra Eclipse plugin. Code has been tested against Ghidra 9.0.4. That should give you a file like
ghidra_9.0.4_PUBLIC_20190903_JNIAnalyzer.zip
that you can install in Ghidra.
After install the extension built with GhidraDev from Eclipse, I got another exception
from jnianalyzer.
@Ayrx
Not sure it's a build problem, If you have time, can you release the built zip file that has been tested so that we can install it directly.
from jnianalyzer.
I can confirm this issue exists when building the extension archive through pure gradle too.
Issues are stacked on top of each other
#Trace1
Error running script: JNIAnalyzer.java
ghidra.util.exception.FileInUseException: File is in use - 'jni__all.gdt.lock(9,JNIAnalyzer.java)' by <Unknown>
ghidra.util.exception.FileInUseException: File is in use - 'jni__all.gdt.lock(9,JNIAnalyzer.java)' by <Unknown>
at ghidra.framework.store.db.PackedDatabase.lock(PackedDatabase.java:462)
at ghidra.framework.store.db.PackedDatabase.readContentTypeAndName(PackedDatabase.java:474)
at ghidra.framework.store.db.PackedDatabase.<init>(PackedDatabase.java:96)
at ghidra.framework.store.db.PackedDatabase.getPackedDatabase(PackedDatabase.java:289)
at ghidra.program.database.data.DataTypeManagerDB.<init>(DataTypeManagerDB.java:176)
at ghidra.program.model.data.StandAloneDataTypeManager.<init>(StandAloneDataTypeManager.java:55)
at ghidra.program.model.data.FileDataTypeManager.<init>(FileDataTypeManager.java:56)
at ghidra.program.model.data.FileDataTypeManager.openFileArchive(FileDataTypeManager.java:101)
at ghidra.app.plugin.core.datamgr.archive.FileArchive.<init>(FileArchive.java:54)
at ghidra.app.plugin.core.datamgr.archive.DataTypeManagerHandler.openArchive(DataTypeManagerHandler.java:429)
at ghidra.app.plugin.core.datamgr.archive.DataTypeManagerHandler.openArchive(DataTypeManagerHandler.java:419)
at ghidra.app.plugin.core.datamgr.DataTypeManagerPlugin.openArchive(DataTypeManagerPlugin.java:715)
at JNIAnalyzer.getDataTypeManageFromArchiveFile(JNIAnalyzer.java:146)
at JNIAnalyzer.run(JNIAnalyzer.java:53)
at ghidra.app.script.GhidraScript.executeNormal(GhidraScript.java:370)
at ghidra.app.script.GhidraScript.doExecute(GhidraScript.java:222)
at ghidra.app.script.GhidraScript.execute(GhidraScript.java:200)
at ghidra.app.plugin.core.script.RunScriptTask.run(RunScriptTask.java:57)
at ghidra.util.task.Task.monitoredRun(Task.java:128)
at ghidra.util.task.TaskLauncher.lambda$startBackgroundThread$2(TaskLauncher.java:315)
at java.base/java.lang.Thread.run(Thread.java:834)
#Trace2
Unable to write to lock file: /home/user/ghidra_9.0.4/file:/home/user/ghidra_9.0.4/Ghidra/Extensions/JNIAnalyzer/lib/JNIAnalyzer.jar!/jni__all.gdt.lock
java.io.IOException: No such file or directory
at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.base/java.io.File.createNewFile(File.java:1024)
at ghidra.framework.store.local.LockFile.createLockFileNoWait(LockFile.java:449)
at ghidra.framework.store.local.LockFile.createLock(LockFile.java:381)
at ghidra.framework.store.db.PackedDatabase.lock(PackedDatabase.java:456)
at ghidra.framework.store.db.PackedDatabase.readContentTypeAndName(PackedDatabase.java:474)
at ghidra.framework.store.db.PackedDatabase.<init>(PackedDatabase.java:96)
at ghidra.framework.store.db.PackedDatabase.getPackedDatabase(PackedDatabase.java:289)
at ghidra.program.database.data.DataTypeManagerDB.<init>(DataTypeManagerDB.java:176)
at ghidra.program.model.data.StandAloneDataTypeManager.<init>(StandAloneDataTypeManager.java:55)
at ghidra.program.model.data.FileDataTypeManager.<init>(FileDataTypeManager.java:56)
at ghidra.program.model.data.FileDataTypeManager.openFileArchive(FileDataTypeManager.java:101)
at ghidra.app.plugin.core.datamgr.archive.FileArchive.<init>(FileArchive.java:54)
at ghidra.app.plugin.core.datamgr.archive.DataTypeManagerHandler.openArchive(DataTypeManagerHandler.java:429)
at ghidra.app.plugin.core.datamgr.archive.DataTypeManagerHandler.openArchive(DataTypeManagerHandler.java:419)
at ghidra.app.plugin.core.datamgr.DataTypeManagerPlugin.openArchive(DataTypeManagerPlugin.java:715)
at JNIAnalyzer.getDataTypeManageFromArchiveFile(JNIAnalyzer.java:146)
at JNIAnalyzer.run(JNIAnalyzer.java:53)
at ghidra.app.script.GhidraScript.executeNormal(GhidraScript.java:370)
at ghidra.app.script.GhidraScript.doExecute(GhidraScript.java:222)
at ghidra.app.script.GhidraScript.execute(GhidraScript.java:200)
at ghidra.app.plugin.core.script.RunScriptTask.run(RunScriptTask.java:57)
at ghidra.util.task.Task.monitoredRun(Task.java:128)
at ghidra.util.task.TaskLauncher.lambda$startBackgroundThread$2(TaskLauncher.java:315)
at java.base/java.lang.Thread.run(Thread.java:834)
#Trace3
Unable to write to lock file: /home/user/ghidra_9.0.4/file:/home/user/ghidra_9.0.4/Ghidra/Extensions/JNIAnalyzer/lib/JNIAnalyzer.jar!/jni__all.gdt.lock
java.io.IOException: No such file or directory
at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.base/java.io.File.createNewFile(File.java:1024)
at ghidra.framework.store.local.LockFile.createLockFileNoWait(LockFile.java:449)
at ghidra.framework.store.local.LockFile.createLock(LockFile.java:381)
at ghidra.framework.store.db.PackedDatabase.lock(PackedDatabase.java:456)
at ghidra.framework.store.db.PackedDatabaseCache.getCachedDB(PackedDatabaseCache.java:340)
at ghidra.framework.store.db.PackedDatabase.getPackedDatabase(PackedDatabase.java:282)
at ghidra.program.database.data.DataTypeManagerDB.<init>(DataTypeManagerDB.java:176)
at ghidra.program.model.data.StandAloneDataTypeManager.<init>(StandAloneDataTypeManager.java:55)
at ghidra.program.model.data.FileDataTypeManager.<init>(FileDataTypeManager.java:56)
at ghidra.program.model.data.FileDataTypeManager.openFileArchive(FileDataTypeManager.java:101)
at ghidra.app.plugin.core.datamgr.archive.FileArchive.<init>(FileArchive.java:54)
at ghidra.app.plugin.core.datamgr.archive.DataTypeManagerHandler.openArchive(DataTypeManagerHandler.java:429)
at ghidra.app.plugin.core.datamgr.archive.DataTypeManagerHandler.openArchive(DataTypeManagerHandler.java:419)
at ghidra.app.plugin.core.datamgr.DataTypeManagerPlugin.openArchive(DataTypeManagerPlugin.java:715)
at JNIAnalyzer.getDataTypeManageFromArchiveFile(JNIAnalyzer.java:146)
at JNIAnalyzer.run(JNIAnalyzer.java:53)
at ghidra.app.script.GhidraScript.executeNormal(GhidraScript.java:370)
at ghidra.app.script.GhidraScript.doExecute(GhidraScript.java:222)
at ghidra.app.script.GhidraScript.execute(GhidraScript.java:200)
at ghidra.app.plugin.core.script.RunScriptTask.run(RunScriptTask.java:57)
at ghidra.util.task.Task.monitoredRun(Task.java:128)
at ghidra.util.task.TaskLauncher.lambda$startBackgroundThread$2(TaskLauncher.java:315)
at java.base/java.lang.Thread.run(Thread.java:834)
``
from jnianalyzer.
Ah that's bizarre.
So I realized that I was usually running the extension by installing it directly from Eclipse where this issue did not appear. Running the script after installing the built ZIP file has the issue reported here. I'll see if I can find the problem and push the fix ASAP.
from jnianalyzer.
So I think the root cause of the issue is because the attempt to open the archive file tries to acquire a write lock in a non-existent directory. I have filed an issue at NationalSecurityAgency/ghidra#976 to find out the proper way to actually do this.
In the mean time, you can manually import the src/main/resources/jni_all.gdt
file by going to "Data Type Manager->Open File Archive" and selecting the jni_all.gdt
file which will bypass the portion of the code with the bug. The rest of the script should work then.
from jnianalyzer.
My latest commit should have fixed the bug.
@eacmen @owen800q @smarek Can you check and see if it works for you?
from jnianalyzer.
Related Issues (16)
- method compile() not found HOT 2
- java.lang.OutOfMemoryError
- How to find functions loaded at runtime through RegisterNatives HOT 1
- .
- module java.base does not "opens java.util" to unnamed module HOT 2
- JNIAnalayzer.java - Uncaught Exception: java.lang.ExceptionInInitializerError
- NPE After Select APK
- Batch import .so files failed HOT 1
- JNIAnalyzer: Handle overloaded native methods and unicode names HOT 1
- NoSuchMethodError: com.google.gson.JsonParser.parseReader
- Install Error HOT 1
- Provide compiled plugin HOT 7
- Instruction on how to build HOT 1
- incompatible with ghidra HOT 2
- class file has wrong version 58.0, should be 55.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jnianalyzer.