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

Missing some accessflags #952

Open
MM0n5Ter opened this issue Oct 16, 2023 · 0 comments
Open

Missing some accessflags #952

MM0n5Ter opened this issue Oct 16, 2023 · 0 comments

Comments

@MM0n5Ter
Copy link

Missing some accessflags

When I was trying to analyse some classes of an app and grab some access flags, some of them were missing.
A static nested class lose its access flag static.

Here is part of my code:

apk_obj = APK(self.apkPath)
for dex in apk_obj.get_all_dex():
   dex_obj = DEX(dex)
   for clz in dex_obj.get_classes():
      name = clz.get_name().replace("/", ".")[1:-1]
      super_class_name = clz.get_superclassname()
      class_access_flag = clz.get_access_flags()
      LOGGER.info(f"{name}: [{class_access_flag}, {super_class_name}]")

Here is the output:

2023-10-16 14:44:54,852 - Console - [18] - com.example.test.testpack.TestGson$1: [0, Lcom/google/gson/reflect/TypeToken;]
2023-10-16 14:44:54,884 - Console - [18] - com.example.test.testpack.TestGson$User: [0, Ljava/lang/Object;]
2023-10-16 14:44:54,884 - Console - [18] - com.example.test.testpack.TestGson: [1, Ljava/lang/Object;]

Here is the smali of the nested class generated by apktool: TestGson$User

.class Lcom/example/test/testpack/TestGson$User;
.super Ljava/lang/Object;
.source "TestGson.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/example/test/testpack/TestGson;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = "User"
.end annotation


# instance fields
.field private age:I

.field private email:Ljava/lang/String;

.field private isDeveloper:Z

.field private name:Ljava/lang/String;


# direct methods
.method constructor <init>()V
    .locals 0

    .line 12
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

System Information

  • Androguard Version: master
  • Python Version: 3.10
  • Operating System: Windows

Further Log Files and Output

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

1 participant