1

I want to launch a program on my computer when a particular Android device is connected to my computer running macOS. I know this is possible because when I plug in an Android device. I'm using this answer as an example

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.example.program</string>
    <key>ProgramArguments</key>
    <array>
    <string>/path/to/program</string>
    </array>
    <key>LaunchEvents</key>
    <dict>
            <key>com.apple.iokit.matching</key>
            <dict>
                    <key>com.apple.device-attach</key>
                    <dict>
                            <key>idProduct</key>
                            <integer>1234</integer>
                            <key>idVendor</key>
                            <integer>1337</integer>
                            <key>IOProviderClass</key>
                            <string>IOUSBDevice</string>
                            <key>IOMatchLaunchStream</key>
                            <true/>
                    </dict>
            </dict>
    </dict>
</dict>
</plist>

Instead of an Apple device, I want it to launch when an Android device with a particular IMEI number is connected to my computer.

Carpetfizz
  • 8,707
  • 22
  • 85
  • 146

1 Answers1

-2

It would be possible with matching android device ids ,vendor id and further adding adb getprop command and read specific result about imei ,other things.i have no knowldege about mac but same can be done in linux with init bg script . You acn further peep into this app source https://github.com/mortenjust/androidtool-mac