Coder Social home page Coder Social logo

android-event-injector's People

Contributors

radhoo avatar

Watchers

Ilya Efanov avatar

android-event-injector's Issues

STDerror is not correct give

When testing this code on a panda device, i get broken pipe errors, while in 
fact i should see this error


/system/bin/id output: su: uid 10048 not allowed to su


The problem is that the sinkProcessOutput is started too late.


change in file shell.java
  private static String _runCommand(String command, OUTPUT o) throws IOException {
    DataOutputStream os = null;
    Process process = null;
    try {
      process = Runtime.getRuntime().exec(shell);
++      InputStreamHandler sh = sinkProcessOutput(process, o);
      os = new DataOutputStream(process.getOutputStream());
--      InputStreamHandler sh = sinkProcessOutput(process, o);
      os.writeBytes(command + '\n');
....


Like this you see the first stderr output


Kind regards,

Wim

Original issue reported on code.google.com by [email protected] on 3 Oct 2013 at 11:34

Compile error on Android-19

Hi,

I just tried to compile this code under Android-19/Win7 and wanted to share how 
I achieved this. First of all, the usual update in AndroidManifest + 
project.properties to change to Android 19. Then, when trying to running 
ndk-build I would get a whole bunch of errors:

[armeabi] Cygwin         : Generating dependency file converter script
[armeabi] Compile thumb  : EventInjector <= EventInjector.c
In file included from jni/EventInjector.c:55:0:
jni/EventInjector.h:43:9: error: 'INPUT_PROP_POINTER' undeclared here (not in a 
function)
jni/EventInjector.h:44:9: error: 'INPUT_PROP_DIRECT' undeclared here (not in a 
function)
jni/EventInjector.h:45:9: error: 'INPUT_PROP_BUTTONPAD' undeclared here (not in 
a function)
...

I found that these constants aren't defined in include/linux/input.h but rather 
in include/uapi/linux/input.h. I pulled this file from my Ubuntu maschine 
(/usr/src/linux-headersXXX/include/uapi/linux but you can get here from the 
Linux Kernel as well) and put this file into jni/uapi/linux/input.h. A whole 
bunch of stuff is defined twice: in the local /uapi/linux/input.h and in 
NDK_HOME\platforms\android-19\arch-arm\usr\include\linux\input.h. I removed the 
overlapping (see attachement) in my local copy.
Secondly, the line EventInjector.h:82 wouldn't compile. I changed it to:

    LOGD("%s", szBuffer);

This enabled me to compile the whole thing using ndk-build and then install it 
normally via Eclipse on my phone.

Hope this helps anyone.


Original issue reported on code.google.com by [email protected] on 16 Jun 2014 at 3:05

Attachments:

Touch UP not working

I've Samsung Galaxy Note 10.1, Android 4.1.2

And I want to inject touch event - to a different app related activity started 
from current main activity.

And yes if I use SendTouchDownAbs - it does TouchDown and not TouchUP - at that 
given point in new app - but then device hangs for future Touch UP/DOWNs and I 
cannot touch anymore to do anything on screen.

And if I use SendTouchAbsCoord - it does TouchDown and not TouchUP - -and after 
few multiple Touches - I can touch on screen and continue with running system 
to execute toches...

So My problem is that - it does only TouchDown and not TouchUp after that..

So what are the causes and possible solutions.....

Original issue reported on code.google.com by [email protected] on 21 Jun 2014 at 5:07

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.