android

package module
v0.0.0-...-969fd36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 10 Imported by: 1

README

microdbg-android

Allows you to emulate Android native libraries, based on MicroDbg

Thanks

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOptionUnsupported = errors.New("option unsupported")
	ErrMethodNotFound    = errors.New("method not found")
)

Functions

func SetOption

func SetOption(v Runtime, options ...Option) error

Types

type JNIContext

type JNIContext interface {
	ClassFactory() gava.ClassFactory
	Throw(java.IThrowable) java.JInt
	ExceptionOccurred() java.IThrowable
	ExceptionDescribe()
	ExceptionClear()
	FatalError(string)
}

type Module

type Module interface {
	io.Closer
	Name() string
	BaseAddr() uint64
	FindSymbol(name string) (Symbol, error)
	Symbols(yield func(Symbol) bool)
	CallEntry(ctx context.Context) error
	CallOnLoad(ctx context.Context) (java.JInt, error)
	FindNativeMethod(vm java.JavaVM, clazz java.IClass, name, sig string) (NativeMethod, error)
	Dump(w io.Writer) error
}

type NativeMethod

type NativeMethod = func(obj java.IObject, args ...any) any

type Option

type Option func(Runtime) error

type Package

type Package interface {
	Name() string
	Label() string
	Version() (name string, code int)
	UsesSdk() (min, target int)
	Permission() []string
	CodePath() string
	LibraryDir() string
	FilesDir() string
	Certificate() []*x509.Certificate
	LoadModule(ctx context.Context, art Runtime, name string) (Module, error)
}

type Runtime

type Runtime interface {
	io.Closer
	Debugger() debugger.Debugger
	Emulator() emulator.Emulator
	LoadModule(ctx context.Context, file fs.File) (Module, error)
	FindModule(name string) (Module, error)
	LinkFS(name string, fs filesystem.FS) error
	JavaVM() java.JavaVM
	Package() Package
	ClassFactory() gava.ClassFactory
	RegisterNatives(clazz java.IClass, methods []java.JNINativeMethod) java.JInt
	UnregisterNatives(clazz java.IClass) java.JInt
}

type Symbol

type Symbol interface {
	Name() string
	Address() uint64
	Call(ctx context.Context, calling debugger.Calling, ret any, args ...any) error
}

Directories

Path Synopsis
10
apk
arm
jni
x86

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL