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

Commit 22048ef3 authored by Nick Pelly's avatar Nick Pelly Committed by Mike Lockwood
Browse files

Allow adb to use ANDORID_SERIAL env variable to specify the device to talk to.

Overridden by -s.
parent 1e070846
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -96,7 +96,8 @@ void help()
        " -e                            - directs command to the only running emulator.\n"
        "                                 returns an error if more than one emulator is running.\n"
        " -s <serial number>            - directs command to the USB device or emulator with\n"
        "                                 the given serial number\n"
        "                                 the given serial number. Overrides ANDROID_SERIAL\n"
        "                                 envivornment variable.\n"
        " -p <product name or path>     - simple product name like 'sooner', or\n"
        "                                 a relative/absolute path to a product\n"
        "                                 out directory like 'out/target/product/sooner'.\n"
@@ -766,6 +767,8 @@ int adb_commandline(int argc, char **argv)
    }
    // TODO: also try TARGET_PRODUCT/TARGET_DEVICE as a hint

    serial = getenv("ANDROID_SERIAL");

        /* modifiers and flags */
    while(argc > 0) {
        if(!strcmp(argv[0],"nodaemon")) {