Giter Site home page Giter Site logo

clipper's Introduction

Clipper

Simple app to interact with Android system clipboard service via adb shell one liners.

Installation

Download the application apk and manually install application on your android device.

Usage

Assuming you have already installed the app, connect to your emulator or phone using adb shell. First start the service. You can do this either by opening the application or using the following commands on ADB shell $ adb shell # am startservice ca.zgrs.clipper/.ClipboardService

Once service is started you can invoke clipper service by broadcasting intents. The intent's Action can be either "get" or "set". When setting the clipboard value, pass your string as an Extra parameter.

  • Supported actions
    1. get: print the value in clipboard into logs (TODO: print the value on standard output)
    2. set: sets the clipboard content to the string passed via extra parameter "text"
  • Supported extras
    1. text: The text that you want to be copied in the clipboard

Usage example using broadcast intent:

# am broadcast -a clipper.set -e text "this can be pasted now"
# am broadcast -a clipper.get

Now enhanced to allow populating clipboard from a file. Usage example:

# adb push clipboard_content_file.txt /sdcard/clipboard_content_file.txt
# adb shell am broadcast -a clipper.setfile -e filepath \'/sdcard/clipboard_content_file.txt\'

Building

Build using maven

  1. update pom.xml and set ANDROID_HOME in enviroment.
  2. build: mvn package
  3. deploy: mvn android:deploy

clipper's People

Watchers

 avatar  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.