Encapsulation of Android app_process, you can use it just like Android Service.
implementation 'io.github.iamr0s:AndroidAppProcess:<version>'
- Default
AppProcess process = new AppProcess.Default();
process.init(context.getPackageName());
- Root
AppProcess process = new AppProcess.Root();
process.init(context.getPackageName());
- 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.
You must close the AppProcess after use it.
process.close()