Android counterpart to git.oxmc.me/PawletOS/profiled's Linux daemon -- independent implementation, not a port. Same .vconfig profile format and 17 payload types, but implemented against DevicePolicyManager/VpnManager/ WifiManager/WallpaperManager/KeyChain instead of a native NDK Binder daemon, since that's where AOSP actually exposes this functionality. Self-provisions as device owner at first boot (DeviceOwnerProvisioner.kt) to unlock the DevicePolicyManager-gated payload types (cert, pkcs12, passcode, proxy, screensaver lock enforcement). 16 of 17 payload types are real implementations; firewall is a documented platform dead end (no app UID gets CAP_NET_ADMIN). See README's capability matrix for the full per-payload breakdown. Reviewed against the documented @SystemApi/hidden-API surface, not compiled -- no AOSP toolchain available in this environment.
47 lines
2.2 KiB
Plaintext
47 lines
2.2 KiB
Plaintext
package os.pawlet.profiled;
|
|
|
|
// IPawletProfileService — exposed by PawletProfileService, the bound
|
|
// Service inside this app. Clients (system apps, Settings, installer UI)
|
|
// bind action os.pawlet.profiled.action.BIND and call this directly —
|
|
// same method set as the Linux daemon's D-Bus interface, so tooling that
|
|
// talks to both platforms shares one mental model.
|
|
interface IPawletProfileService {
|
|
|
|
// ── Profile lifecycle ─────────────────────────────────────────────────
|
|
|
|
// Install a profile from raw YAML bytes (unsigned) or a CMS/PKCS#7
|
|
// blob (signed). Returns the installed profile's UUID on success.
|
|
// Throws ServiceSpecificException on validation or signature failure.
|
|
String installProfile(in byte[] profileData);
|
|
|
|
// Remove an installed profile by UUID.
|
|
// Throws if the profile is MDM-locked or removal-password protected
|
|
// and no password is supplied.
|
|
void removeProfile(in String uuid, in String removalPassword);
|
|
|
|
// List all installed profile UUIDs.
|
|
String[] listProfiles();
|
|
|
|
// Return JSON-encoded metadata for a single profile.
|
|
String getProfileInfo(in String uuid);
|
|
|
|
// ── MDM state ─────────────────────────────────────────────────────────
|
|
|
|
// True if a valid MDM payload is enrolled.
|
|
boolean isDeviceManaged();
|
|
|
|
// Return the enrolled MDM server URL, or empty string if not managed.
|
|
String getMdmServerUrl();
|
|
|
|
// ── Supervised / kiosk state ──────────────────────────────────────────
|
|
|
|
// True if a kiosk or ASAM payload is active.
|
|
boolean isSupervised();
|
|
|
|
// ── Payload query helpers ─────────────────────────────────────────────
|
|
|
|
// Return JSON array of payloads of the given type across all profiles.
|
|
// e.g. getPayloadsOfType("wifi") → [{ssid:..., uuid:...}, ...]
|
|
String getPayloadsOfType(in String payloadType);
|
|
}
|