2015年12月3日星期四

Push and install APK to different on PC connected devices

There's one classical problem for multi-devices that connect onto PC when we develop Android. You cannot push or install apk by command-line when more than one on it. Fine you can use two steps to do this:

1. Find devices:
    # adb devices -list

2. Select  one or more serial-numbers in your head.

3. Run:
   #  adb -s serial-number install -r  ../asdfasdf/hello.apk

That works but only for one device.

I've packed this command in to a batch and we can do with more than one devices.

Just run:  
   # installapk --all ../asdfasdf/hello.apk 
or
  # installapk serial-number serial-number serial-number serial-number ../asdfasdf/hello.apk 


Try and fork it.

P.S There's also a program to uninstall application from devices.
The command-line to uninstall app is easy like install by instead typing path of apk by package name:

# uninstallapp --all com.helloworld
or
# uninstallapp 23445345sdf sdffsdg com.helloworld

Try



没有评论:

发表评论