Jul 30 | 7:20 PM |
Mark M. | has entered the room |
Jul 30 | 7:25 PM |
Mark M. | turned on guest access |
Jul 30 | 8:10 PM |
ConorH | has entered the room |
Mark M. |
hello Conor!
|
Mark M. |
how can I help you today?
|
ConorH |
Hi Mark - phew, just caught you :)
|
ConorH |
Background: I am doing some development for a SoM Android boards.
|
Mark M. |
"SoM"?
|
ConorH |
System on Module.
|
ConorH |
*Not a smartphone.
|
Mark M. |
OK
|
ConorH |
One requirement is to disable or lockdown mouse and keyboard input (via usb connection).
|
Mark M. | |
Mark M. |
I'm guessing that's you
|
ConorH |
Yes :)
|
Mark M. |
you need a higher-res avatar :-)
|
Jul 30 | 8:15 PM |
ConorH |
Do you know anything about this? I'm sure it's possible via low level Android work but i'm looking for the most practical solution. i.e. as close to the Android SDK as possible or alternatively via shell commands.
|
Jul 30 | 8:15 PM |
Mark M. |
well, it's definitely not possible at the SDK level
|
ConorH |
I need a whole new one :)
|
Mark M. |
there might be some trick to it at the shell level (adb shell or some other root-ish shell)
|
ConorH |
Do you concentrate mainly on the SDK or have you done any hacking outside of it?
|
Mark M. |
no, I'm an SDK guy
|
ConorH |
Ah ok, cool.
|
ConorH | |
Mark M. |
that being said, I'd look for Linux shell commands that might have your desired effect on, say, Ubuntu, then see if they work on Android
|
ConorH |
Ah ok cool, i'll look for those.
|
Mark M. |
I'm no expert, but that feels like it'd take out more USB stuff than just HID
|
ConorH |
Which i'm sure just disables the USB port. Unfortunately, I still need the ports to work for a USB -> Ethernet adapter.
|
Mark M. |
right
|
Mark M. |
AFAIK, for KB/mouse, Android's using fairly vanilla Linux stuff
|
ConorH |
View paste
|
ConorH |
Do you think there would be something there
|
Mark M. |
so if you could figure out how to block HID input on a Linux desktop, the same approach stands a decent chance of working on Android
|
ConorH |
Ok cool.
|
ConorH |
Thanks.
|
Mark M. |
at best, you'd be in a similar boat as with your echo 0 command -- you might be able to clog the USB port, but nothing finer-grained than that AFAIK
|
ConorH |
Ok, i'll keep that in mind - thanks.
|
Mark M. |
but, I haven't played with the USB API in the Android SDK
|
Mark M. |
hardware is my kryptonite
|
Jul 30 | 8:20 PM |
ConorH |
Ha ok :)
|
Mark M. |
the closer you get to the metal, the more likely it is that I'm all thumbs
|
ConorH |
I doubt it will offer anything useful anyway. I doubt it would allow you to block a HID device.
|
Mark M. |
you might try your question over on https://android.stackexchange.com, as it's more of an end-user question than a programming one
|
ConorH |
Sure, i'll give it a blast. Thanks.
|
ConorH |
Also, do you know if there is anything in the SDK for managing the power settings of a device. i.e. disabling screen lock etc?
|
Mark M. |
well, you can keep the screen on
|
Mark M. |
android:keepScreenOn="true"
|
Mark M. |
FLAG_KEEP_SCREEN_ON
|
Mark M. |
or a manual WakeLock
|
Mark M. |
those have the side effect of keeping the device from locking on its own accord
|
Mark M. |
though all of that is trumped by the power button
|
Mark M. |
beyond that, we don't have a lot of power control at the SDK level
|
ConorH |
I see. Well, this board doesn't really have that type of button. Power is via connect/disconnect the power jack :)
|
ConorH |
I see. Do you know much about ethernet over USB for Android devices?
|
Mark M. |
I seem to recall that it worked when I tried it once on a tablet
|
ConorH |
Ok, do you know which devices you used?
|
Mark M. |
that was a few years ago
|
Jul 30 | 8:25 PM |
Mark M. |
if I had to guess, an ASUS Transformer TF700T
|
ConorH |
That's good, support can only have gotten better, right?
|
ConorH |
*oops, I meant the USB->Ethernet device?
|
Mark M. |
yeah, I assumed that's what you meant
|
Mark M. |
the key is that I don't know how much of that support is in Android proper or might be added by device manufacturers
|
ConorH |
Ah yea, I guess that's true. Thanks.
|
Mark M. |
in the case of the Transformer, it had a keyboard dock with a real honest-to-goodness USB port
|
Mark M. |
which made it far more amenable to the USB network adapters of the time
|
ConorH |
Ah I see.
|
Mark M. |
I would *think* that Android has it natively, but since I don't think I've tried it since then, I can't rule out that it was an ASUS thing
|
ConorH |
Yea, you're probably right. I've seen reports that Android has native support in later versions but it can be very picky on the hardware devices.
|
ConorH |
Well, thanks for your help. I guess you must be off now? :)
|
Mark M. |
shortly -- if you have another quick question, go ahead
|
ConorH |
Nope, that's all for now.
|
Mark M. |
OK
|
ConorH |
Thanks for your input :)
|
ConorH |
Have a good evening.
|
Mark M. |
you are very welcome
|
Mark M. |
you too!
|
ConorH |
lol it's 01:29 here.
|
ConorH |
Goodbye.
|
Mark M. |
ah
|
Jul 30 | 8:30 PM |
Mark M. |
cheerio! :-)
|
ConorH | has left the room |
Mark M. | turned off guest access |