Skip to content

iamr0s/AndroidAppProcess

Repository files navigation

Android AppProcess

Encapsulation of Android app_process, you can use it just like Android Service.

Maven Central

How to use it

Import library

implementation 'io.github.iamr0s:AndroidAppProcess:<version>'

1. New Process

  • Default
AppProcess process = new AppProcess.Default();
process.init(context.getPackageName());
  • Root
AppProcess process = new AppProcess.Root();
process.init(context.getPackageName());

2. Use it.

  • Remote Binder Transact
AppProcess process = new AppProcess.Root();
process.init(context.getPackageName());
IPackageManager manager = android.os.ServiceManager.getService("package");
IBinder binderWrapper = process.binderWrapper(manager.asBinder());
IPackageManager managerWrapper = IPackageManager.Stub.asInterface(binderWrapper);

managerWrapper.uninstall(...) // will call it in root.
  • More

See the demo.

3. Close

You must close the AppProcess after use it.

process.close()

About

Run Android app_process just like Android Service.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published