Skip to content

Commit

Permalink
Add android wakelock command to turn the screen on
Browse files Browse the repository at this point in the history
  • Loading branch information
timwr committed Mar 28, 2017
1 parent 09214bb commit a659364
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -701,6 +701,7 @@ def cmd_wakelock(*args)
wakelock_opts = Rex::Parser::Arguments.new(
'-h' => [ false, 'Help Banner' ],
'-r' => [ false, 'Release wakelock' ],
'-w' => [ false, 'Turn screen on' ],
'-f' => [ true, 'Advanced Wakelock flags (e.g 268435456)' ],
)

Expand All @@ -713,6 +714,9 @@ def cmd_wakelock(*args)
return
when '-r'
flags = 0
when '-w'
client.android.wakelock(0)
flags = 268435482
when '-f'
flags = val.to_i
end
Expand Down

0 comments on commit a659364

Please sign in to comment.