Documentation
¶
Overview ¶
Monitor installed packages by polling the PackageManager.
Uses IPackageManager via the "package" service to list all installed packages and detect changes by comparing against a previous snapshot. This demonstrates how to build a package monitoring tool using the binder interface, since real-time broadcast receivers require a full Android app context.
Build:
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o build/package_monitor ./examples/package_monitor/ adb push build/package_monitor /data/local/tmp/ && adb shell /data/local/tmp/package_monitor
Click to show internal directories.
Click to hide internal directories.