Skip to content

Instantly share code, notes, and snippets.

@mixflame
Created November 3, 2012 05:25
Show Gist options
  • Save mixflame/4006155 to your computer and use it in GitHub Desktop.
Save mixflame/4006155 to your computer and use it in GitHub Desktop.
Rakefile
task :boot do
puts "booting"
`emulator -avd Android_4.1 -partition-size 200 -no-audio -no-boot-anim`
end
task :off do
puts "shutdown"
`adb emu kill`
end
task :send do
puts 'sending scripts'
`rake update_scripts:restart`
end
task :subl do
`sublime_text .`
end
task :log do
exec('adb logcat')
end
task :manager do
`android`
end
task :send_text do
# black magic
text = ARGV.last
require 'socket'
ts = TCPSocket.open('localhost', 5554)
unless ts.closed?
ts.puts("sms send 4204206969 #{text}")
end
# supplementary magic
task text.to_sym do ; end
end
task :build do
# `rake install:clean start`
Rake::Task['install'].invoke('clean start')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment