Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2bc05c9b authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Merge branch '549os-q-add-splitinstall-system-service' into 'main'

Implement SplitInstallService

See merge request !1
parents 13b9aba2 4674b79a
Loading
Loading
Loading
Loading

Android.mk

0 → 100644
+1 −0
Original line number Diff line number Diff line
include $(call all-subdir-makefiles)

README.md

0 → 100644
+27 −0
Original line number Diff line number Diff line
# Split Install Service

The Split Install Service is a service run as system uid and responsible
for installing a split apk with the hidden `PackageManager.INSTALL_DONT_KILL_APP`
flag. 

## Build

To use the service, add into your project the jar built with the `mm splitinstall-lib` AOSP 
build system command.

## Usage

Then, a client can bind to it with the following:

```kotlin
val intent = Intent().apply {
    component = SplitInstall.SPLIT_INSTALL_SYSTEM_SERVICE
}
bindService(intent, serviceConnection, BIND_AUTO_CREATE)
```

Then, install a split apk:

```kotlin
service.installSplitModule("fake.package.name", "pathToSplitApk")
```

lib/Android.bp

0 → 100644
+13 −0
Original line number Diff line number Diff line
java_library_static {
    name: "splitinstall-lib",
    sdk_version: "current",
    srcs: [
    "java/**/*.java",
	"aidl/**/*.aidl",
    ],
    aidl: {
	local_include_dirs: [
	    "aidl/",
	]
    },
}
+4 −0
Original line number Diff line number Diff line
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="foundation.e.splitinstall.lib">

</manifest>
+16 −0
Original line number Diff line number Diff line
package foundation.e.splitinstall;

/**
* Interface towards the SplitInstallService.
*/
interface ISplitInstallService {

    /**
     * Method allowing an application bound to the SplitInstallService
     * to install a split module.
     * @param packageName: the package name of the application we want to install the split module
     *                     for.
     * @param modulePath: the path of the split module apk we want to install.
     */
    oneway void installSplitModule(in String packageName, in String modulePath);
}
Loading