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

[FATAL EXCEPTION] analysis aborted: failed to load root <Primordial,Ljava/lang/Object> of class hierarchy #34

Open
siwwwwu opened this issue Nov 26, 2020 · 1 comment

Comments

@siwwwwu
Copy link

siwwwwu commented Nov 26, 2020

Hi, I got an error msg when using the Library Detection function (-o match). I downloaded the pre-generated profile files.

The command is:
java -jar build/libs/LibScout.jar -o match -p ../LibScout-Profiles -c config/LibScout.toml -a sdk/android.jar apks/103443com.rarlab.rar.apk

The error msg is:
20:40:04 INFO LibScoutConfig : This is LibScout 2.3.2
20:40:04 INFO Profile : Load library profiles:
20:41:31 INFO Profile : Loaded 8542 profiles in 1 min, 27 sec, 451 ms
20:41:31 INFO Profile :
20:41:31 INFO LibraryIdentifier : Process app: 103443com.rarlab.rar.apk
20:41:31 INFO LibraryIdentifier : = Manifest Parser =
20:41:31 INFO LibraryIdentifier : Package name: com.rarlab.rar
20:41:31 INFO LibraryIdentifier : Version code: 96
20:41:31 INFO LibraryIdentifier : minSdkVersion: 19
20:41:31 INFO LibraryIdentifier : targetSdkVersion: 29
20:41:31 INFO LibraryIdentifier : SharedUserId: - none -
20:41:31 INFO LibraryIdentifier : Library dependencies: - none -
20:41:31 INFO LibraryIdentifier :
20:41:31 INFO LibraryIdentifier : Found 402 unique libraries in 8542 library profiles
using /var/folders/zt/qpw4hbwn0_z6cl37q5v4p5d80000gn/T/name1738988254421587180_classes.dex
20:41:35 ERROR TplCLI : [FATAL EXCEPTION] analysis aborted: failed to load root <Primordial,Ljava/lang/Object> of class hierarchy
20:41:35 ERROR TplCLI : com.ibm.wala.ipa.cha.ClassHierarchyException: failed to load root <Primordial,Ljava/lang/Object> of class hierarchy
at com.ibm.wala.ipa.cha.ClassHierarchy.(ClassHierarchy.java:296)
at com.ibm.wala.ipa.cha.ClassHierarchy.(ClassHierarchy.java:209)
at com.ibm.wala.ipa.cha.ClassHierarchyFactory.make(ClassHierarchyFactory.java:78)
at com.ibm.wala.ipa.cha.ClassHierarchyFactory.makeWithRoot(ClassHierarchyFactory.java:89)
at com.ibm.wala.ipa.cha.ClassHierarchyFactory.makeWithRoot(ClassHierarchyFactory.java:53)
at de.infsec.tpl.modules.libmatch.LibraryIdentifier.createClassHierarchy(LibraryIdentifier.java:112)
at de.infsec.tpl.modules.libmatch.LibraryIdentifier.identifyLibraries(LibraryIdentifier.java:143)
at de.infsec.tpl.modules.libmatch.LibraryIdentifier.run(LibraryIdentifier.java:84)
at de.infsec.tpl.TplCLI.main(TplCLI.java:141)

I googled this error msg, it seems to be a runtime error for wala. See (http://wala.sourceforge.net/wiki/index.php/UserGuide:Troubleshooting) The possible solution is to change the java_runtime_dir property in the wala.properties file. However, I guess you didn't use this properties file, right? Please correct me if it's wrong. By the way, I am using java 1.8.0_60.

Thank you very much!

@reddr
Copy link
Owner

reddr commented May 23, 2021

You are right, that error msg is thrown by WALA. It does not find the root class Object that is typically included in the android.jar.

You can check the following things:

  • does your LibScout.toml include a different path to the SDK?
  • do you use an official android SDK? maybe you can try a different one.

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