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

Fields missing in loaded classes from android.jar #2020

Open
cgobel opened this issue Nov 13, 2023 · 3 comments
Open

Fields missing in loaded classes from android.jar #2020

cgobel opened this issue Nov 13, 2023 · 3 comments

Comments

@cgobel
Copy link

cgobel commented Nov 13, 2023

Hello,

I am writing a tool to analyse Java and Android applications. I followed the tutorial and downloaded the android jars. But I noticed that some fields are missing for some classes (e.g. String has only CASE_INSENSITIVE_ORDER but no other fields). I found that this problem occurs for a few version.
However, it is working for version 11 where I can see 8 fields in String class.
Can anyone help me with this? Am I doing something wrong?
I am using the nightly build version 4.5.0

@jpstotz
Copy link
Contributor

jpstotz commented Nov 14, 2023

As far as I remember the provided android.jar files are from taken Android SDK, this means they only provide the public API. The methods are usually dummy stubs only throwing an Exception.

Looking at the Android API JavaDoc of the [String class]/(https://developer.android.com/reference/java/lang/String#fields_1) there is exactly one field defined: CASE_INSENSITIVE_ORDER.

If one andorid.jar (Android 11 API30 or do you mean the android.jar of API 11?) is different I don't know why, may be a mistake.

@cgobel
Copy link
Author

cgobel commented Nov 15, 2023

Well, but when I unpack the Jar (especially android-10) and look into the class file using "javap -p", I do see all fields. But somehow soot does not load them.

@jpstotz
Copy link
Contributor

jpstotz commented Nov 15, 2023

Can you please post the link to the tutorial and/or the link to the android.jar files you are using?

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