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

jnsaf and nativedroid install failed #83

Open
kordood opened this issue Jan 15, 2022 · 1 comment
Open

jnsaf and nativedroid install failed #83

kordood opened this issue Jan 15, 2022 · 1 comment

Comments

@kordood
Copy link

kordood commented Jan 15, 2022

Hi, I tried to use nativedroid or jnsaf. But It didn't work as expected.

I build on the environment in ubuntu 20.04 system on docker. And It was installed OpenJDK 11.

I hope to get a reply on how can fix it. Such as requirements, OS version, privilege of docker or stabled commit version

root@20798e3bb242:/Argus-SAF# ./tools/scripts/install.sh
[info] Loading settings for project argus-saf-build from protoc.sbt,plugins.sbt ...
[info] Loading project definition from /Argus-SAF/project
[info] Loading settings for project argus-saf from build.sbt,version.sbt ...
[info] Set current project to argus-saf (in build file:/Argus-SAF/)
[success] Total time: 0 s, completed Jan 15, 2022, 11:35:27 PM
[info] Updating jawa...
[info] Updating saf-library...
[info] Done updating.
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Run 'evicted' to see detailed eviction warnings
[info] Updating amandroid...
[info] Compiling 3 protobuf files to /Argus-SAF/jawa/target/scala-2.12/src_managed/main/protos
[info] Compiling schema /Argus-SAF/jawa/src/main/protobuf/java_signatures.proto
[info] Compiling schema /Argus-SAF/jawa/src/main/protobuf/taint_result.proto
[info] Compiling schema /Argus-SAF/jawa/src/main/protobuf/summary.proto
protoc-jar: protoc version: 3.5.1, detected platform: linux-x86_64 (linux/amd64)
protoc-jar: embedded: bin/3.5.1/protoc-3.5.1-linux-x86_64.exe
protoc-jar: executing: [/tmp/protocjar16704320263532446993/bin/protoc.exe, --plugin=protoc-gen-scala=/tmp/protocbridge12489477421861856177, --scala_out=grpc:/Argus-SAF/jawa/target/scala-2.12/src_managed/main/protos, -I/Argus-SAF/jawa/src/main/protobuf, -I/Argus-SAF/jawa/target/protobu$
_external, -I/Argus-SAF/jawa/src/main/protobuf, -I/Argus-SAF/jawa/target/protobuf_external, /Argus-SAF/jawa/src/main/protobuf/java_signatures.proto, /Argus-SAF/jawa/src/main/protobuf/taint_result.proto, /Argus-SAF/jawa/src/main/protobuf/summary.proto]
taint_result.proto: warning: Import java_signatures.proto but not used.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/root/.sbt/boot/scala-2.12.7/org.scala-sbt/sbt/1.2.4/protobuf-java-3.3.1.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[info] Strategy 'discard' was applied to 15 files (Run the task at debug level to see details)
[info] Strategy 'rename' was applied to 5 files (Run the task at debug level to see details)
[info] Packaging /Argus-SAF/saf.library/target/scala-2.12/saf-library-3.2.1-SNAPSHOT.jar ...
[info] Compiling protobuf
[info] Protoc target directory: /Argus-SAF/jawa/target/scala-2.12/src_managed/main/protos
[info] Compiling 237 Scala sources and 20 Java sources to /Argus-SAF/jawa/target/scala-2.12/classes ...
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Run 'evicted' to see detailed eviction warnings
[info] Updating jnsaf...
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Run 'evicted' to see detailed eviction warnings
[info] Updating ...
[info] Compiling 2 protobuf files to /Argus-SAF/jnsaf/target/scala-2.12/src_managed/main/protos
[info] Compiling schema /Argus-SAF/jnsaf/src/main/protobuf/nativedroid_grpc.proto
[info] Compiling schema /Argus-SAF/jnsaf/src/main/protobuf/jnsaf_grpc.proto
protoc-jar: protoc version: 3.5.1, detected platform: linux-x86_64 (linux/amd64)
protoc-jar: embedded: bin/3.5.1/protoc-3.5.1-linux-x86_64.exe
protoc-jar: executing: [/tmp/protocjar1944458031704703463/bin/protoc.exe, --plugin=protoc-gen-scala=/tmp/protocbridge10135622914650305099, --scala_out=grpc:/Argus-SAF/jnsaf/target/scala-2.12/src_managed/main/protos, -I/Argus-SAF/jnsaf/src/main/protobuf, -I/Argus-SAF/jnsaf/target/proto$
uf_external, -I/Argus-SAF/jawa/src/main/protobuf, -I/Argus-SAF/jawa/src/main/protobuf, -I/Argus-SAF/jawa/target/protobuf_external, -I/Argus-SAF/saf.library/src/main/protobuf, -I/Argus-SAF/saf.library/target/protobuf_external, -I/Argus-SAF/amandroid/src/main/protobuf, -I/Argus-SAF/aman$
roid/target/protobuf_external, -I/Argus-SAF/jnsaf/src/main/protobuf, -I/Argus-SAF/jnsaf/target/protobuf_external, -I/Argus-SAF/jawa/src/main/protobuf, /Argus-SAF/jnsaf/src/main/protobuf/nativedroid_grpc.proto, /Argus-SAF/jnsaf/src/main/protobuf/jnsaf_grpc.proto]
/Argus-SAF/saf.library/src/main/protobuf: warning: directory does not exist.
/Argus-SAF/amandroid/src/main/protobuf: warning: directory does not exist.
[info] Compiling protobuf
[info] Protoc target directory: /Argus-SAF/jnsaf/target/scala-2.12/src_managed/main/protos
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Run 'evicted' to see detailed eviction warnings
[info] Done packaging.
[error] /Argus-SAF/jawa/src/main/scala/org/argus/jawa/core/classpath/PathResolver.scala:34:52: value mkLines is not a member of java.util.stream.Stream[String]
[error]     def asLines: String = s.trim.stripMargin.lines.mkLines
[error]                                                    ^
[error] one error found
[error] (jawa / Compile / compileIncremental) Compilation failed
[error] Total time: 14 s, completed Jan 15, 2022, 11:35:41 PM
ERROR: Environment 'nativedroid' does not exist. Create it with 'mkvirtualenv nativedroid'.
./tools/scripts/install.sh: line 9: protoc: command not found
./tools/scripts/install.sh: line 10: protoc: command not found
./tools/scripts/install.sh: line 11: protoc: command not found
./tools/scripts/install.sh: line 12: python: command not found
./tools/scripts/install.sh: line 13: python: command not found
./tools/scripts/install.sh: line 14: python: command not found

@am009
Copy link

am009 commented Jun 9, 2022

I made a Docker image so that anyone can use JN-SAF in a one-command fashion, without much configuration.
See https://github.com/am009/Argus-SAF and https://hub.docker.com/r/warrenwjk/jnsaf
If anyone has difficulty in using my docker image, please submit an issue here: https://github.com/am009/Argus-SAF/issues

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