Dear All,

I found the solution to my problem.

In fact the problem was,
when you boot up Android under GEM5, after a while it goes to a
kind of sleep mode.

In this mode, you see the Android screen (in your VNC client)
you can move the big circle, and you can click
(and you see the big circle is resembling the click operation)

However, nothing happens! you don't receive any response from the Android
side.

Solution, is to wake up the android.
I do this, by sending a key stroke to the android.
(Like the one that you do with every other mobile phone when they go to sleep)

I do this using the adb command:

first get into m5term shell:
m5term 127.0.0.1 3456

then inside m5term, issue the adb command :
adb shell input keyevent 66

here I have decided to send the "Enter" key press to the device.
But I think other key presses will work as well.
(for a complete list of key events,
stackoverflow.com/questions/7789826/)

Hope this saves some one's time in future (Actually took me near 5 days :P )

------------------------------

Message: 4
Date: Thu, 09 May 2013 08:51:48 -0600
From: Mohammad Sadegh Sadri <mamsad...@googoolia.com>
To: gem5-users@gem5.org
Subject: [gem5-users] How to do a simple mouse click in Android
        running under GEM5?
Message-ID: <20130509085148.15205gvxvsqch...@mail.googoolia.com>
Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes";
        format="flowed"


Dear all,

Actually this is a very simple question.

I have searched through the mailing list but I have not found any
suitable solution.

The point is, running benchmarks in Android is automated through the
init.rc file and then
the rcS scripts which get copied to the device at boot time.

I understand the entire procedure completely and I have done it myself
successfully.

However, this doesn't in any way mean that you don't need to have
interaction with the benchmark program when you want to run it. In
most of the cases you have to be able to at least
push a button.

Considering the fact that, even, gem5.fast, with simplest options, is
very slow on a very good server machine, I was after more reliable
solutions to do "Mouse Click" task.

Here what I found:

1- on android emulators they use shortcuts for these kinds of tasks
F2 is click , shift+F2 is right click
On gem5 I tried to see if it works, no success.

2- you can use the "adb sendevent" to send touch events
to the android device.
moreover, you can use "adb input" to send key strocks and text to
the android system.
I tried both, no success!
In fact, what I see, in terms of mouse/keyboard events going to
android (using adb getevent) are strange.
Do we have two pointers or one? What is the big circle shown in
the vnc screen? then what is the small dot? I have noticed that
the events which go to the android are actually related to the small
dot, not the big circle.

I am looking for ideas, to do the task : "push a button in Android".

May be I am missing some thing, a shortcut, or a m5term application which
I can run to solve this problem.
currently, I am ran completely out of ideas!

I will really appreciate your ideas and help.

Regards




------------------------------

_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

End of gem5-users Digest, Vol 82, Issue 17
******************************************




_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to