Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractFromDEX ¶
func ExtractFromDEX(data []byte) (map[string]TransactionCodes, error)
ExtractFromDEX parses a single DEX file and extracts TRANSACTION_* constants from all $Stub classes. Returns a map of fully qualified interface name to TransactionCodes.
func ExtractFromJAR ¶
func ExtractFromJAR(path string) (map[string]TransactionCodes, error)
ExtractFromJAR opens a JAR (ZIP) file, finds all DEX files inside, and extracts TRANSACTION_* constants from all $Stub inner classes. Returns a map of fully qualified interface name to TransactionCodes.
Example key: "android.app.IActivityManager"
func ExtractSignaturesFromJAR ¶ added in v0.0.8
func ExtractSignaturesFromJAR(path string) (map[string]MethodSignatures, error)
ExtractSignaturesFromJAR opens a JAR (ZIP) file, finds all DEX files inside, and extracts method signatures from all $Stub$Proxy inner classes. Returns a map of fully qualified interface name to MethodSignatures.
Types ¶
type JARContents ¶ added in v0.0.8
type JARContents struct {
Codes map[string]TransactionCodes
Signatures map[string]MethodSignatures
}
JARContents holds both transaction codes and method signatures extracted from a single JAR file in one pass.
func ExtractAllFromJAR ¶ added in v0.0.8
func ExtractAllFromJAR(path string) (*JARContents, error)
ExtractAllFromJAR opens a JAR (ZIP) file and extracts both TRANSACTION_* constants (from $Stub classes) and method signatures (from $Stub$Proxy classes) in a single pass over the DEX data. This avoids parsing the same JAR twice.
type MethodSignatures ¶ added in v0.0.8
MethodSignatures maps method names to their parameter type descriptor lists. Example: {"registerClient": ["Landroid/os/ParcelUuid;", "Landroid/bluetooth/IBluetoothGattCallback;", "Z", "Landroid/content/AttributionSource;"]}
func ExtractDescriptorSignaturesFromJAR ¶ added in v0.0.8
func ExtractDescriptorSignaturesFromJAR( path string, descriptor string, ) (MethodSignatures, error)
ExtractDescriptorSignaturesFromJAR extracts method signatures for a single AIDL interface from a JAR file. The descriptor uses dot notation (e.g., "android.app.IActivityManager"). Returns nil, nil if the descriptor is not found.
type TransactionCodes ¶
TransactionCodes maps AIDL method names to their binder transaction codes. Method names use the original AIDL camelCase (e.g., "isUserAMonkey").
func ExtractDescriptorFromJAR ¶
func ExtractDescriptorFromJAR( path string, descriptor string, ) (TransactionCodes, error)
ExtractDescriptorFromJAR extracts transaction codes for a single AIDL interface from a JAR file. The descriptor uses dot notation (e.g., "android.app.IActivityManager"). Returns nil, nil if the descriptor is not found in this JAR.