To unlock screen you can use:
adb shell input keyevent 26
adb shell input keyevent 82

Lock screen:
adb shell input keyevent 6



On Thursday, August 25, 2011 12:57:51 PM UTC+3, Shanth wrote:
>
> Thanks Hemanth,
> also do you know how to unlock the screen from adb, whitout user having to 
> tap and slide it on the screen... needed to automate some test cases.
>
> -Shanth
>
> 2011/8/25 Hemanth(ヘマント) <heman...@gmail.com <javascript:>>
>
>> You could change it in the settings database using
>>
>> Ex: to change it to one minute
>> sqlite3 /data/data/com.android.providers.settings/databases/
>> settings.db "INSERT INTO system VALUES
>> (null,'screen_off_timeout','600000');"
>>
>> or
>>
>> sqlite3 /data/data/com.android.providers.settings/databases/
>> settings.db "update system set value='600000' where
>> name='screen_off_timeout';"
>>
>>
>> But I find it kind of bad to be doing it this way (I can't think of
>> any particular reason, but it just seems hacky).
>>
>> Since the settings provider exposes SCREEN_OFF_TIMEOUT , I would feel
>> much better using that.
>>
>> http://developer.android.com/reference/android/provider/Settings.System.html#SCREEN_OFF_TIMEOUT
>>
>>
>> On Aug 24, 6:17 pm, Shanth Murthy <shanth.murth...@gmail.com> wrote:
>> > Thanks,
>> > -Shanth
>>
>> --
>> unsubscribe: android-porti...@googlegroups.com <javascript:>
>> website: http://groups.google.com/group/android-porting
>>
>
>

-- 
-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

--- 
You received this message because you are subscribed to the Google Groups 
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-porting+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to