adb (shell) virtual keyboard - G1 Android Development

Has anyone thought of writing a quick shell based virtual keyboard that would use the new virtual keyboard framework from cupcake? The idea being that if you were at a shell prompt all of your keystrokes would get sent to the new virtual keyboard interface as if you had typed them on the main G1 keyboard allowing the PC keystrokes to be forwarded to the foreground app on the screen.
I get frustrated when I am hacking on my phone and I have a shell connection setup through adb and then I click on the screen to activate an app which wants my input. Since my hands are usually better placed at this point to continue to type on the PC keyboard, I would rather not have to open the clunky G1 keyboard to type.
I was thinking that a simple shell app named 'kb' or even 'k' that could take stdin and pass it to the jvm via the new API would be ideal. Has anyone seen anything like this?
...perhaps I need to search for/get familiar with the new keyboard API docs.

already working on it, it's a little harder than it seems, but the two iof us working on it are also trying to use another program that gives us a pic of the screen while we play with the phone via the keyboard. if you know any java at all then you are more than welcome to help. the thread is in games and apps subforum and just search in there for computer app that controls phone.
edit: basically the terminal will allow one word or one character, no spaces. so to type hello world and send in a text message(which is why we are making the app) you would have to type
$adb shell
#input text hello
#input keyevent 26
#input text world
#input keyevent 66
i am pretty sure i remembered the correct mapping for the keys, but i could be wrong. i have the keys mapped in my other thread

Found your thread
OK, I found your thread. I see what you are trying to do, and I think it is more than what I am looking for. I am happy to use the G1 screen to display things (and to click on fields and what not,) but I would still like to be able to use my PC keyboard.
However, if I understand what you are saying, it looks like android already provides a minimal tool to do what I am looking for. I should be able to put together a quick little wrapper shell script that would make using this tool a lot easier and straight forward for typing. I will investigate the tool tonight and post my results here if I come up with something that helps.
We could merge our threads, but since I am looking for something slightly different than you are, I do not want to take away from your effort even if I post a tool which solves mine. After I solve my needs, I will look at your java code and see if I can help.
Thanks for the direction!
-Martin

Related

G1 Shell Commands Documentation

Greetings, as some of you may have noticed the commands from the shell on the G1 do not match up perfectly with the Linux command line. I've decided that we need some documentation on the shell commands on the G1 so that skilled and unskilled command line people can use their G1 like a pro.
I've set up a wiki that will serve this exact purpose at http://android.syntaxdeath.com/
Right now its mostly just a list of commands since I havn't had time to test them all out yet (and well half the commands just crash my phone anyway) but its a good start!
Finally, if you would like to contribute to the wiki, please follow the template that I posted at the bottom for standardization purposes (its loosely based off Man pages)
update: Running total of commands: 302
I would imagine what commands are available depends to some degree on what OS distribution you're using? Differentiating between internal (busybox) and external commands would also be useful.
/Mats
very cool..
Only trick I've found (as I haven't gotten to mess with it much), is that radiooptions 8 [somenumber] will dial [somenumber]
Craftkiller said:
Greetings, as some of you may have noticed the commands from the shell on the G1 do not match up perfectly with the Linux command line. I've decided that we need some documentation on the shell commands on the G1 so that skilled and unskilled command line people can use their G1 like a pro.
I've set up a wiki that will serve this exact purpose at http://android.syntaxdeath.com/
Right now its mostly just a list of commands since I havn't had time to test them all out yet (and well half the commands just crash my phone anyway) but its a good start!
Finally, if you would like to contribute to the wiki, please follow the template that I posted at the bottom for standardization purposes (its loosely based off Man pages)
Click to expand...
Click to collapse
would it be easier to setup the wiki info right here on XDA?
http://wiki.xda-developers.com/index.php?pagename=HTC_Dream
just might help keep the information together in one place?
I would imagine what commands are available depends to some degree on what OS distribution you're using? Differentiating between internal (busybox) and external commands would also be useful.
Click to expand...
Click to collapse
That is true, right now I am running the most recent version of JF so I based it off that... as for separating them, its a good idea, but I'd like to hold off till I finish documenting more commands b4 I try to do that stuff.
very cool..
Only trick I've found (as I haven't gotten to mess with it much), is that radiooptions 8 [somenumber] will dial [somenumber]
Click to expand...
Click to collapse
Awesome, I'll document radiooptions next
would it be easier to setup the wiki info right here on XDA?
http://wiki.xda-developers.com/index...name=HTC_Dream
just might help keep the information together in one place?
Click to expand...
Click to collapse
That could work also. I'm just a newbie to this whole site so I figured I shouldn't start touching whats already great here. I imagine it would be extremely easy to copy this stuff over to that wiki or we could just provide a link... either way, I'll let the forum demigods decide since right now it might appear as spam since so few commands are documented.
this is a great thread, i had planned on doing this but never got around to it, if i can find my printout i have many of the commands already documented. never got radio options to work, but i ran it through the adb shell, will give the onboard terminal a run through later. as most of you know the commands available can be found by typing
ls /system/bin /system/xbin /system/xbin/bb
that will tell you what commands you can use. i'll have more later when i get to my comp.
HAPPY ST. PAT'S
tubaking182 said:
this is a great thread, i had planned on doing this but never got around to it, if i can find my printout i have many of the commands already documented. never got radio options to work, but i ran it through the adb shell, will give the onboard terminal a run through later. as most of you know the commands available can be found by typing
ls /system/bin /system/xbin /system/xbin/bb
that will tell you what commands you can use. i'll have more later when i get to my comp.
HAPPY ST. PAT'S
Click to expand...
Click to collapse
Oh wow, I didn't even bother to check xbin and xbin/bb.... I'll add these commands to the list!
btw on JF using terminal emulator I was able to use radiooptions to start a call
Ok, I've added the new commands to the list bringing the total to 302 commands.... and i've only got like 6 documented so far... =(
sounds good, i am on my way over to your page to see what i can help with
edit: added several commands to the page, will add more in an hour or so
haha thank you! I was about to install ubuntu so I could do a nandroid backup on my phone b4 testing out wipe but it seems you've already done the dangerous part first! much appreciated =)
you can do a nandroid backup and flash in windows, someone here had the correct sutup for windows somewhere, but i don't know where it's at since i use ubuntu. the only reason i even tried the command was so that i could document a few things for myself, i had a piece of paper somewhere that i can't find now where i had written out all the commands and highlighted them according to danger for n00bs and also had what they did, or at least a good portion of them. wipe is dangerous for n00bs and so i will only suggest it in the most DIRE emergency cases, i had to do it cause my phone died and i was a n00b on this phone and decided that it would be easier to wipe it than try to find the correct stuff to get it back to factory settings. i discovered it works well for those having issues booting or other such. and that command is one of the many reasons to keep a copy of the latest JF rom on your SD card. going back to add a few more now
perhaps it would be a good idea to sort the commands by the directory theyre in on the wiki page.
that was actually already on my list of things to do, i will probably get it tomorrow sometime unless someone beats me to it
the $PATH var should help with catching some of the more obscure ones...
$ echo $PATH
/usr/bin:/usr/sbin:/bin:/sbin:/system/sbin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin

User definable bluetooth remote control

Hi guys,
for a few months now I am looking for a remote control for my Diamond. The best solution I found so far is the PPC Tablet Remote Control Suite, but this does not have all the features I need.
What I am looking for is a tool which allows me to define my own buttons (PPC Tablet does this) and also to create a script behind (PPC Tablet only sends key strokes). E.g. I want to have a full media center conrol app, including the control of my favorite programs, DVBViewer, Foobar2000 and the KMPlayer. Everyone of those has already several shortcuts. I can address them from PPC Tablet, but I can not start the programs. I also cannot shutdown Windows or in-/decrease the system volume if needed. This would only be possible if the tool sends a command like {volume_down} to a server processing tool, which then has a database where this command is linked to lowering the system volume (a kind of scripting language). My infrared remote has that ability, but I want to get rid of it since it only controls the DVBViewer in a correct manner.
I already heard of a tool called "Girder", but am not sure whether this is the right thing for me.
I hope I did not scare you off by this quite long text and would be very happy if someone could recommend a suitable application to me.
Regards and thanks in advance!
did you try Salling Clicker? you can create your own (java) scripts for it and a lot of scripts are shared on the salling clicker forum...
Hi,
thanks for the quick reply. Yes, I have been to the homepage, but have never installed it (I thought there may be an easier - code less - solution out there). I just dont like java very much, but I'll give it a shot.
Thanks!
check out theire forum, a lot of custom scripts are submitted and working very well! you can quite easily script yourself by starting from some other script and modifying it to your needs...
A quick update on this one:
http://forum.xda-developers.com/showthread.php?t=574593
We are trying to get as many contributors as possible at the moment, be it for beta testing or active programming.

[Q] Math Input Panel

Hi,
You probably know about the Microsoft's Math Input Panel of windows (if you don't, type it in the search on start and get amazed).
So, as a student, which I use my laptop at study alot, I use the math input panel for easy equations and math letters by handwriting and it really makes life easier instead of typing it manually in word.
So now I also got an Android device (HTC Desire HD), and I thought why wouldn't I use the fantastic touch screen of it as a pad, and instead of "Handwriting" with the mouse on the laptop, I will use a real handwriting on the mobile (with stylus or finger) and it would send it or transfer it to the PC, it could be live, like when I writing something on my mobile, it will be appeared on the laptop display immediately,
or it can be like, writing the whole equation or something, then press Send, and it will send it all to the Math Input Panel.
If the "working with an exist software [the Microsoft's Math Panel]" is too difficult to make so I wouldn't mind that the whole "Math Handwriting recognizing" will be on the mobile as a app..
So, here is my idea,
If any developer would read it and start it up, it would be great, let me know
Or if this is already exist in a sort of a way, also tell me, although I looked pretty hard for such a thing, and found nothing relevant.
Thanks for any kind of help,
Yarden,

[Q] ADB Shell Input slow compare ShareKM or MyMobiler

I'm creating an apps which type from laptop keyboard to android apps using VB.net 2010. I'm calling this code on KeyPress event
Shell("cmd.exe /c adb shell input text " & e.KeyChar, AppWinStyle.Hide)
This method seems to has latency about 500ms for each keystroke. Comparing to apps like ShareKM or MyMobiler which their result seems instant. Event I collect the use input with timer and send by a long string, the result still not as smooth as those two apps.
So my question:
1) Does ShareKM or MyMobiler use ADB or different method?
2) If use ADB, whats the trick?
Coisox said:
I'm creating an apps which type from laptop keyboard to android apps using VB.net 2010. I'm calling this code on KeyPress event
Shell("cmd.exe /c adb shell input text " & e.KeyChar, AppWinStyle.Hide)
This method seems to has latency about 500ms for each keystroke. Comparing to apps like ShareKM or MyMobiler which their result seems instant. Event I collect the use input with timer and send by a long string, the result still not as smooth as those two apps.
So my question:
1) Does ShareKM or MyMobiler use ADB or different method?
2) If use ADB, whats the trick?
Click to expand...
Click to collapse
It appears that ShareKM has been abandoned by it's developer, and it has a hard coded date that makes the app useless after last Sunday. I am trying to reverse engineer the app so we can take out the date limit for those of us who find the app very usefull. If you want to join the project and help us decompile the code that would be great, and the perk for you would be being able to see how shareKM works.
http://forum.xda-developers.com/showthread.php?t=2176712&page=13
vdefender said:
It appears that ShareKM has been abandoned by it's developer, and it has a hard coded date that makes the app useless after last Sunday. I am trying to reverse engineer the app so we can take out the date limit for those of us who find the app very usefull. If you want to join the project and help us decompile the code that would be great, and the perk for you would be being able to see how shareKM works.
http://forum.xda-developers.com/showthread.php?t=2176712&page=13
Click to expand...
Click to collapse
Yes, I do love ShareKM so much until its "beta expired" a few days back then I switch to MyMobiler. Though I would like to join u, honestly, I'm very noobs in this. My knowledge on android limited to 4 days workshop on PhoneGap + native hello world. So I don't believe I can contribute anything.
I did try to decompile ShareKM using "VPZ APK Studio.Net 4.0", and I'm not sure how successful it was, but looking at those massive codes, I can't tell the head and tail.

I have an issue. I do not know if my code modification or my device is to blame.

Info:
my device is rooted (fully) and my phone consist of Supersu, Nethunter terminal, bcmon, Reaver.
(below are the codes i modified for my device)
The history
when I first started running reaver i would receive many errors; [...not found] [...can't enable] [...can't change permissions (appearently you can't change permissions within sdcard folder... anyways, moving on.)]
[...no internet connection found]
my point is after looking at the custom scripts I had installed (with notepad++) i noticed that the actual scripts were the big issue. so I started changing things one by one in-order to not mess-up everything. yeah sure, I made some errors that made things last longer- way longer than normal. Nevertheless, at some point I actually started making things better and slowly started knocking down those errors!! until i hit the 'test' button and sure enough
"Cannot link executable... libfake_driver.so is 32 instead of 64.... only PIE are supported."
Truth Be Told
as you might can tell from the kind of question I'm asking, I am not an expert.
And I understand these kind of questions comes with others looking at the questioner as annoying- and with the thought of 'these beginners just want everyone to give answers instead of learning themselves...' It's NOT COMPLETELY wrong, since now days a comment like such is ... pretty much true-
So i'll say this: Not Every One Is The Same.
I am a programmer. my programming is mostly within game design/ game development so if more coding is needed to solve my issue at hand, then let me know and please (at the lease) point me in the right direction.
if I need to google something, please clarify what to search. For I am just one person, so it is possible I haven't thought of something to type in- however, that does not mean I haven't type MANY searches in already.
The Question
Am I able to use Rfa and bcmon on nexus 5x, and if so, then what is needed to get my phone operating (the app(s)) correctly? This is the complete error i am receiving in RfA.
CANNOT LINK EXECUTABLE: "/system/app/bcmon/assets/libs/libfake_driver.so" is 32-bit instead of 64-bit page record for 0x7f98e8c010 was not found (block_size=64)
error: only position independent executables (PIE) are supported.
My Done Work
with the rfa settings you can choose to use custom scripts the following shows the scripts i used and it's placement.
these scripts i had to modify to get the device's errors fixed ( not all though )
Activation Script:
#!/bin/bash
svc wifi disable
LD_LIBRARY_PATH=/sdcard/bcmon/assets/libs
LD_PRELOAD=/data/sdcard/bcmon/assets/libs/libfake_driver.so sh
cd /sdcard/bcmon/assets/tools
./enable_bcmon
echo “rfasuccess”
exit
Warm-up Script
#!/bin/bash
LD_LIBRARY_PATH=/sdcard/bcmon/assets/libs
LD_PRELOAD=/sdcard/bcmon/assets/libslibfake_driver.so sh
cd /sdcard/bcmon/assets/tools
Stop Script
#!/bin/bash
svc wifi enable
echo “rfasuccess”
Will you care to help me?

Categories

Resources