Wei's Memo

A programmer's log.

Ruby Script for Taking Android Screenshot

This ruby script takes screenshots of all connected android devices.

Prepare the environment:

  • Install android sdk if you have not installed it yet.
  • Set ANDROID_HOME=<path-to-android-sdk>
  • Install the package:
git clone git@github.com:leohoo/auto-screenshot-android.git
cd auto-screenshot-android
bundle install
  • Connect android devices to your machine through usb.
  • Turn on debug mode of the devices, check the “Stay awake” option.

Run the following command to take screenshots of all the devices:

ruby browse-and-capture.rb "http://24log.jp/"