Code Monkey home page Code Monkey logo

tuioforandroid's Introduction

TUIO for Android-x86

A (working) attempt to add native TUIO input support to the Android platform.


This is fully working!



Instructions: 
This application will run a TUIO client on your Android device, and translate that into Android touch events which it injects into the OS.
Given the nature of this service, it must be given system privileges, which normal applications cannot get.  
The solution is to compile the application and sign it with the system keys.  This is not normally possible unless you built it yourself.
However, the following APK can be installed once your custom build (in that case, it will have blank system keys):

 * https://github.com/rjmarsan/TuioForAndroid/blob/master/androidx86/froyo/TuioSign/TUIOService-Signed.apk
 * 'adb install TUIOService-Signed.apk' will install it for you
 * open up the application 'TUIO Service' and enable the service
 * check if data is getting entered by opening up the test program
   * If not, make sure you have forwarded UDP port 3333 to your Android VM, or whatever

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
However, be warned:
    A) This is a work in progress, it may not be fully functional all the time
    B) This RUNS WITH SYSTEM PRIVILEGES, AND TAKES ARBITRARY DATA FROM THE NETWORK TO CONTROL YOUR SYSTEM
       (You need to trust your network.)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



Building:
    Prereqs:
        Eclipse (or ant, but I don't know how to help you there)
        A custom build of Android-X86 (instructions on their website)
        A device to run it on, VirtualBox, VMWare, KQemu, etc...
    Make sure you forwarded ports (if on a VM):
        Forward TCP port 5556 to enable ADB to work
        Forward UDP port 3333 to enable TUIO to work
    If on a VM: Run 'adb connect localhost:PORT' where PORT=5556, or whatever you chose
    Else:  'adb connect <device ip>:PORT'
    Open up TUIOService in Eclipse, or whatever, if you don't know how to import an Android project, google it.
    Running it normally may be a little useless, as it requests to run as system uid, which Android will reject unless signed
        However, commenting out that line in AndroidManifest.xml will allow it to run, but crash if it injects events outside your application
    Right click the project, go down to Android Tools and select Export Unsigned Application Package...
    Export it to androidx86/froyo/TuioSign/TUIOService.apk  (or where ever if you want, it's just a suggestion)
    Enter the androidx86/froyo/TuioSign/ directory and run ./notes.sh (signs your application package and writes it to TuioService-Signed.apk)
    'adb uninstall com.sigmusic.tacchi.tuio' to remove the application
    'adb install TuioService-Signed.apk' to install the new version





quick tips:
to get the emulator to listen to your port 3333:
    telnet localhost 5554
    redir add udp:3333:3333


see http://stackoverflow.com/questions/3635101/how-to-sign-android-app-with-system-signature to sign app for system

tuioforandroid's People

Contributors

rjmarsan avatar

Watchers

 avatar  avatar

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.