I got as far as this:
let
pkgs = import
(
fetchTarball {
name = "22.05";
url = "https://github.com/NixOS/nixpkgs/archive/ce6aa13369b667ac2542593170993504932eb836.tar.gz";
sha256 = "0d643wp3l77hv2pmg2fi7vyxn4rwy0iyr8djcw1h5x72315ck9ik";
})
{
config.android_sdk.accept_license = true;
};
in
pkgs.androidenv.emulateApp {
name = "MobilePASS";
app = pkgs.fetchurl {
url = "https://storage.evozi.com/apk/dl/16/09/10/securecomputing.devices.android.controller_84500.apk";
sha256 = "6a0040b05e9baa1007986df57c4a4309503d289da63a22e02fbc9a4940eacb87";
};
platformVersion = "30";
package = "securecomputing.devices.android.controller";
activity = "securecomputing.devices.android.controller.App";
}
Which results in this:
$ nix-build && ./result/bin/run-test-emulator
[…]
id: 1 or "android-30"
Name: Android API 30
Type: Platform
API level: 30
Revision: 3
Info: Exception while marshalling /nix/store/rs8sbwpscgnmk4d0875mrq3hkfmkarmf-androidsdk/libexec/android-sdk/build-tools/31.0.0/package.xml. Probably the SDK is read-only
Info: Exception while marshalling /nix/store/rs8sbwpscgnmk4d0875mrq3hkfmkarmf-androidsdk/libexec/android-sdk/platform-tools/package.xml. Probably the SDK is read-only
Info: Exception while marshalling /nix/store/rs8sbwpscgnmk4d0875mrq3hkfmkarmf-androidsdk/libexec/android-sdk/platforms/android-30/package.xml. Probably the SDK is read-only
Info: Exception while marshalling /nix/store/rs8sbwpscgnmk4d0875mrq3hkfmkarmf-androidsdk/libexec/android-sdk/tools/package.xml. Probably the SDK is read-only
Error: Package path is not valid. Valid system image paths are:ository...
null
I’ve no idea what the package
and activity
values should be, if anything. I expect they are the culprits, and I basically just guessed them based on the docs and a blog post.