bytedance / appshark

Appshark is a static taint analysis platform to scan vulnerabilities in an Android app.
Apache License 2.0
1.49k stars 165 forks source link

java.io.IOException: Cannot run program "/java/jdk-11.0.1/bin/config/tools/ApkName.sh": error=2, No such file or directory #40

Closed listentlky closed 1 year ago

listentlky commented 1 year ago

您好,帮看看这个问题怎么解决。已经为ApkName.sh添加了权限 image

nkbai commented 1 year ago

使用最新版的0.1.2即可

listentlky commented 1 year ago

您好,我使用的就是0.1.2版本的jar,但是在第一行启动都输出welcome to appshark 0.1.1 这个版本。 错误依旧存在。 [root@VM_0_2_centos bin]# java -jar AppShark-0.1.2-all.jar config/config.json5 2023-06-01 14:58:37:473:welcome to appshark 0.1.1 2023-06-01 14:58:37:534:started... 2023-06-01 14:58:37:683:loadNecessaryClasses 2023-06-01 14:58:37:720:memory usage=init = 31457280(30720K) used = 10524616(10277K) committed = 30408704(29696K) max = 466288640(455360K) 2023-06-01 14:58:38:726:memory usage=init = 31457280(30720K) used = 9853208(9622K) committed = 30408704(29696K) max = 466288640(455360K) 2023-06-01 14:58:39:727:memory usage=init = 31457280(30720K) used = 8745560(8540K) committed = 30408704(29696K) max = 466288640(455360K) 2023-06-01 14:58:40:728:memory usage=init = 31457280(30720K) used = 8765224(8559K) committed = 30408704(29696K) max = 466288640(455360K) 2023-06-01 14:58:41:748:memory usage=init = 31457280(30720K) used = 52712624(51477K) committed = 86593536(84564K) max = 466288640(455360K) 2023-06-01 14:58:42:844:memory usage=init = 31457280(30720K) used = 54975816(53687K) committed = 120475648(117652K) max = 466288640(455360K) 2023-06-01 14:58:43:849:memory usage=init = 31457280(30720K) used = 100551224(98194K) committed = 120475648(117652K) max = 466288640(455360K) 2023-06-01 14:58:44:856:memory usage=init = 31457280(30720K) used = 108668168(106121K) committed = 120475648(117652K) max = 466288640(455360K) 2023-06-01 14:58:45:908:memory usage=init = 31457280(30720K) used = 105256432(102789K) committed = 215494656(210444K) max = 466288640(455360K) 2023-06-01 14:58:46:919:memory usage=init = 31457280(30720K) used = 135013192(131848K) committed = 215494656(210444K) max = 466288640(455360K) 2023-06-01 14:58:47:924:memory usage=init = 31457280(30720K) used = 162910560(159092K) committed = 215494656(210444K) max = 466288640(455360K) 2023-06-01 14:58:48:928:memory usage=init = 31457280(30720K) used = 183835168(179526K) committed = 215494656(210444K) max = 466288640(455360K) 2023-06-01 14:58:49:938:memory usage=init = 31457280(30720K) used = 181293200(177044K) committed = 370978816(362284K) max = 466288640(455360K) 2023-06-01 14:58:50:943:memory usage=init = 31457280(30720K) used = 216420152(211347K) committed = 370978816(362284K) max = 466288640(455360K) 2023-06-01 14:58:51:946:memory usage=init = 31457280(30720K) used = 278846416(272310K) committed = 370978816(362284K) max = 466288640(455360K) 2023-06-01 14:58:52:958:memory usage=init = 31457280(30720K) used = 250586648(244713K) committed = 370978816(362284K) max = 466288640(455360K) 2023-06-01 14:58:53:967:memory usage=init = 31457280(30720K) used = 283071216(276436K) committed = 370978816(362284K) max = 466288640(455360K) 2023-06-01 14:58:54:302:loadNecessaryClasses Done classes=25182 2023-06-01 14:58:54:303:soot init done 2023-06-01 14:58:54:362:[/java/jdk-11.0.1/bin/config/tools/ApkName.sh, /java/jdk-11.0.1/bin/mrlx_jrttly_230517.apk] 2023-06-01 14:58:54:529:/java/jdk-11.0.1/bin/mrlx_jrttly_230517.apk -> out java.io.IOException: Cannot run program "/java/jdk-11.0.1/bin/config/tools/ApkName.sh": error=2, No such file or directory at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1140) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1074) at net.bytedance.security.app.android.AndroidUtils.parseApkInternal(AndroidUtils.kt:241) at net.bytedance.security.app.android.AndroidUtils.parseApk(AndroidUtils.kt:217) at net.bytedance.security.app.StaticAnalyzeMain.startAnalyze(StaticAnalyzeMain.kt:52) at net.bytedance.security.app.StaticAnalyzeMainKt$main$2.invokeSuspend(StaticAnalyzeMain.kt:99) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284) at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85) at kotlinx.coroutines.BuildersKtBuildersKt.runBlocking(Builders.kt:59) at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source) at kotlinx.coroutines.BuildersKtBuildersKt.runBlocking$default(Builders.kt:38) at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source) at net.bytedance.security.app.StaticAnalyzeMainKt.main(StaticAnalyzeMain.kt:99) at net.bytedance.security.app.KotlinEntry$Companion.callMain(KotlinEntry.kt:24) at net.bytedance.security.app.KotlinEntry.callMain(KotlinEntry.kt) at net.bytedance.security.app.JavaEntry.main(JavaEntry.java:6) Caused by: java.io.IOException: error=2, No such file or directory at java.base/java.lang.ProcessImpl.forkAndExec(Native Method) at java.base/java.lang.ProcessImpl.(ProcessImpl.java:319) at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:249) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1111) ... 17 more 2023-06-01 14:58:55:459:memory usage=init = 31457280(30720K) used = 323962920(316370K) committed = 466288640(455360K) max = 466288640(455360K) 2131492914 2023-06-01 14:58:56:472:memory usage=init = 31457280(30720K) used = 301122832(294065K) committed = 466288640(455360K) max = 466288640(455360K) 2023-06-01 14:58:57:280:apk parse done 2023-06-01 14:58:57:292:Load config file /java/jdk-11.0.1/bin/config/rules/ 2023-06-01 14:58:57:301:read config file /java/jdk-11.0.1/bin/config/rules/ failed java.lang.Exception: read config file /java/jdk-11.0.1/bin/config/rules/ failed at net.bytedance.security.app.rules.Rules$Companion$loadConfigOrQuit$jsonStr$1.invokeSuspend(Rules.kt:82) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) [root@VM_0_2_centos bin]#

nkbai commented 1 year ago

config目录需要再当前目录下

listentlky commented 1 year ago

您好,是在当前目录下

------------------ 原始邮件 ------------------ 发件人: "bytedance/appshark" @.>; 发送时间: 2023年6月1日(星期四) 下午3:09 @.>; 抄送: "Bruce @.**@.>; 主题: Re: [bytedance/appshark] java.io.IOException: Cannot run program "/java/jdk-11.0.1/bin/config/tools/ApkName.sh": error=2, No such file or directory (Issue #40)

config目录需要再当前目录下

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

listentlky commented 1 year ago

image image

listentlky commented 1 year ago

您好,我已经跑起来了,谢谢您的回复。我使用github或者工程内的jar都会出错。编译工程后生成的jar是没有问题的。