Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

imperiusgem

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imperiusgem

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

funny george image

ImperiusGem

#####Remote-control/execute Java on Android phones via Ruby

  1. Add this gem to your project (add this to your Gemfile): gem 'imperiusgem', :git => 'git@github.com:lookout/ImperiusGem.git', :branch => 'master'
  2. Use require 'imperiusgem' in your ruby code.
  3. Connect your android device using adb
  4. Run adb forward tcp:#1337 tcp:#1337
  5. Compile ImperiusGeorge and push the .jar file to /data/local/tmp/test.jar
  6. Run adb shell uiautomator runtest test.jar -c imperiusgeorge.TestServer
  7. That's it! Try some sample code!

###Simple example

d = ImperiusGem::Device.new("http://localhost:7120")
uihelp = ImperiusGem::Thing.new(d,"imperiusgeorge.UIHelp")
uihelp.click("hello world")

###Fancy unit test example

class TestTests < Test::Unit::TestCase
  def test_something
    UiDevice.getInstance.pressHome
	`adb shell am start -n com.android.settings/.Settings`
    UIHelp.find("Sound").click if UIHelp.find("Sound").exists
    UIHelp.clickIfExactExists("Volumes")
    UIHelp.clickIfExactExists("OK")
    UiDevice.getInstance.pressHome
    @d.clean
  end

  def self.const_missing(name)
    @d = ImperiusGem::Device.new("http://localhost:7120") if !@d
    @d.setPackages(["imperiusgeorge", "com.android.uiautomator.core"])
    ImperiusGem::Thing.new(@d,name.to_s)
  end
end

FAQs

Package last updated on 20 Sep 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc