[GH-ISSUE #6397] [Bug] inspect-android-class does not report values of static final constant fields #3834

Closed
opened 2026-10-31 00:44:28 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @sserrgo12 on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/6397

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

Android / JADX provider

Version

rea-agents 6.7.0 (latest on npm at filing time), JADX engine via REA_JADX_MCP_JAR (jadx-headless-mcp 0.7.1), macOS, OpenJDK 21.

Observed behavior

inspect-android-class lists static final fields with name and type only. The constant value is not reported.

Because javac/d8 inline compile-time constants, such classes usually have no <clinit>, so inspect-android-method on <clinit> correctly returns "method not found". The values are then unreachable through REA, although they are present in the dex static_values (encoded_array) of the class definition.

Reproduction

An APK/dex containing, for example:

package com.example;
class Flags {
    static final long PACKET_FLAG_CONFIG = 1L << 63;
    static final int MAX_SIZE = 1024;
    static final String TAG = "flags";
}
npx rea-agents@6.7.0 inspect-android-class --path app.apk --class com.example.Flags --format json

Expected behavior

Each static final field with a dex encoded value is listed with that value (typed: long/int/string/etc.), so constants can be read without a method body.

Workaround

The JADX CLI (1.5.6) prints the values in the decompiled class source.

Originally created by @sserrgo12 on GitHub (Oct 22, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/6397 ### Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Area Android / JADX provider ### Version rea-agents 6.7.0 (latest on npm at filing time), JADX engine via `REA_JADX_MCP_JAR` (jadx-headless-mcp 0.7.1), macOS, OpenJDK 21. ### Observed behavior `inspect-android-class` lists `static final` fields with name and type only. The constant value is not reported. Because javac/d8 inline compile-time constants, such classes usually have no `<clinit>`, so `inspect-android-method` on `<clinit>` correctly returns "method not found". The values are then unreachable through REA, although they are present in the dex `static_values` (encoded_array) of the class definition. ### Reproduction An APK/dex containing, for example: ```java package com.example; class Flags { static final long PACKET_FLAG_CONFIG = 1L << 63; static final int MAX_SIZE = 1024; static final String TAG = "flags"; } ``` ```sh npx rea-agents@6.7.0 inspect-android-class --path app.apk --class com.example.Flags --format json ``` ### Expected behavior Each `static final` field with a dex encoded value is listed with that value (typed: long/int/string/etc.), so constants can be read without a method body. ### Workaround The JADX CLI (1.5.6) prints the values in the decompiled class source.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#3834
No description provided.