thewisenerd / adbkp-gui

deprecated. check https://github.com/thewisenerd/adbkp-gui/issues/1 for alternatives.
2 stars 0 forks source link

adb commands outdated #1

Open parkerlreed opened 9 years ago

parkerlreed commented 9 years ago

Most newer devices (4.1+) don't need the fancy listing the touch devices and sending specific events.

On 4.4.2 I get a nice set of options

[parker@x3720 adbkp-gui]$ adb shell input
Usage: input [<source>] <command> [<arg>...]

The sources are: 
      trackball
      joystick
      touchnavigation
      mouse
      keyboard
      gamepad
      touchpad
      dpad
      stylus
      touchscreen

The commands and default sources are:
      text <string> (Default: touchscreen)
      keyevent [--longpress] <key code number or name> ... (Default: keyboard)
      tap <x> <y> (Default: touchscreen)
      swipe <x1> <y1> <x2> <y2> [duration(ms)] (Default: touchscreen)
      press (Default: trackball)
      roll <dx> <dy> (Default: trackball)

swipe 100 100 500 500 keyevent HOME/BACK/etc

Would it be possible to have adbkp-gui implement this? I see where some of the commands are but I haven't really used qmake enough to start debugging it.

thewisenerd commented 9 years ago

Hi,

I wrote this when I accidentally broke my capacitive touch panel for my older device, HTC Pico; and it was running ICS.

It is definitely possible for adbkp-gui to implement this. I'll try updating adbkp-gui in the coming days with support for qt5 and these newer commands.

I would suggest you try BBQScreen (http://screen.bbqdroid.org/) in the meanwhile. Its a much much better alternative (though I wrote this, since I don't have a card to buy BBQScreen).

parkerlreed commented 9 years ago

Thanks. Short on funds at the moment so I'll see how well an adbkp update works. :)

The weird thing is there doesn't seem to be a lot of programs doing what this does. androidscreencast is a hit or miss and that's about the only other thing I've seen. What led me to adbkp was some searching while building my own solution in python. I've gotten about as far as sending swipe events and pulling a screenshot but have hit some roadblocks at image refreshing/adding some buttons. The original adbkp repo was down but then saw this and figured I might as well not reinvent the wheel, heh.

Thanks again.

thewisenerd commented 9 years ago

One thing for sure is that there won't be a pretty good framerate. In fact, frame rate sucks terribly at max 2 or 3 fps tbh. That's why I added a manual refresh at the moment.

An alternative is to use Android's very own screenrecord to get raw frames, but screenrecord takes its own share of cpu, and that over adb is not exactly a strong suit.

There are three was of doing this (sending frames from the phone to the computer) (as @omerjerk said, who's been working on a very very similar project here: https://github.com/omerjerk/RemoteDroid ):

  1. WebRTC
  2. encoded frames passed over the network, and then decoded at client
  3. create a flv/mp4 video on the server side on the fly (and pull it simultaneously

He's working on a web client (not functional ATM), which on completion, we can have just an app installed in the phone, and control the phone from a browser window (yes, that might be possible in the near future i s'ppose).

Also, Koushik Dutta (of clockworkmod fame) plans to work on (or might plan to work on ) "View/control your Android from your PC" according to his G+ post here (https://plus.google.com/110558071969009568835/posts/gSm52ahQb55).

After all, It's an 'idea' & Ideas aren't 'invented', just 'implemented'. It's about who implements it, and who does it 'efficiently'.

peace :v: