[Q]Get hardware-key-event while in background - Android Q&A, Help & Troubleshooting

Ever since I got my Droid 3 I wanted to be able to control games using the keypad, but sadly most games won't support it, so I figured, it would be cool if I could make an app that catches all the keyboard events and triggers fake MotionEvents for preset regions of the touchscreen (kindof how it's done on the iControlPad).
I believe I've found a way to fake the touches, but when searching for a way to read keyboard events when my app doesn't have the focus all lead to dead ends.
Does anybody have a clue how I could do that?

If anyone cares: I not only managed to find a way to read out all the touches and keystrokes that should go to other apps (though some android-coworker said it was impossible), but I can also filter which one of those I let through. I can even block the back- and home-buttons. And it's runnable without any running service or activity, so invisible and unkillable. I don't need most of that for my app, so I won't use what I don't need, I just stumbled across it by accident.
Every threat on this topic ended with "It's impossible to read out keystrokes destined to another app, because it would be too much of a security issue." Well, it is possible.
Sent from my XT860 using xda app-developers app

Dakkaron said:
If anyone cares: I not only managed to find a way to read out all the touches and keystrokes that should go to other apps (though some android-coworker said it was impossible), but I can also filter which one of those I let through. I can even block the back- and home-buttons. And it's runnable without any running service or activity, so invisible and unkillable. I don't need most of that for my app, so I won't use what I don't need, I just stumbled across it by accident.
Every threat on this topic ended with "It's impossible to read out keystrokes destined to another app, because it would be too much of a security issue." Well, it is possible.
Sent from my XT860 using xda app-developers app
Click to expand...
Click to collapse
I do care! I would appriciate to hear how this works, because I would need it for my ongoing development.
Besides Camara button, which is of cause easy due to the broadcast event, and the volume keys (which are more tricky, since you have to inject an own BroadcastReceiver to the AudioManager), how do you handle other keys?

Ok, it's been a while since I did this, and I had a lot of work on other projects in between so, I hope I get everything right.
To do the whole trick you need root access.
1) Get the android.permission.SYSTEM_ALERT_WINDOW permission
2) Open up a system alert window with no content. There is a setting somewhere that lets you catch all keystrokes and touches. This blocks them all from going through
3) This one is tricky. I had to analyse nonsense for days to get it right, and I fear it's still not very good. Go to /dev/input on your phone. There are files named event1, event2, ...
Each of those correspond to one input device, so one is your touchscreen, one is the keyboard and so on. What you do now is you perform the action you want to recreate on the phone (e.g. press a key) and monitor the event files through adb (there is a linux command, that I forgot, that lets you view a file in real time. Also you can copy that real time view to your harddrive by typing "adb shell [command] > record.txt").
Once you know every event that you want to recreate, you can go to the next step.
4) This is what your app has to do to let a keystroke through: The user presses a key, your app catches it. Then it changes it's mode (see 2) ) to not catch any keystrokes at all, posts the corresponding event for that key in the fitting /dev/input/eventX-file, and sets itself to catch keystrokes again.
Before the whole thing make sure, your /dev/input/eventX-file has a chmod of 666 or therelike, since you can't write into it from your app. You only need root for that, after that you don't need root. The OS resets the chmod on each reboot.
It is a hell of a lot of work. Calculate about a week or more for just that (at least that was what it took me to figure it all out). Good luck
PS: If you get your app system privileges, there is also the android.permission.INJECT_EVENTS, which allows you to inject key- and touch-events to another app using a simple function (can't remember it, but Google does). For your app to be able to get system privileges you need to copy it to /system/app, which requires root and a mounted /system. Catching the keystrokes still works the same way as above.

Dakkaron said:
Ok, it's been a while since I did this, and I had a lot of work on other projects in between so, I hope I get everything right.
To do the whole trick you need root access.
1) Get the android.permission.SYSTEM_ALERT_WINDOW permission
2) Open up a system alert window with no content. There is a setting somewhere that lets you catch all keystrokes and touches. This blocks them all from going through
3) This one is tricky. I had to analyse nonsense for days to get it right, and I fear it's still not very good. Go to /dev/input on your phone. There are files named event1, event2, ...
Each of those correspond to one input device, so one is your touchscreen, one is the keyboard and so on. What you do now is you perform the action you want to recreate on the phone (e.g. press a key) and monitor the event files through adb (there is a linux command, that I forgot, that lets you view a file in real time. Also you can copy that real time view to your harddrive by typing "adb shell [command] > record.txt").
Once you know every event that you want to recreate, you can go to the next step.
4) This is what your app has to do to let a keystroke through: The user presses a key, your app catches it. Then it changes it's mode (see 2) ) to not catch any keystrokes at all, posts the corresponding event for that key in the fitting /dev/input/eventX-file, and sets itself to catch keystrokes again.
Before the whole thing make sure, your /dev/input/eventX-file has a chmod of 666 or therelike, since you can't write into it from your app. You only need root for that, after that you don't need root. The OS resets the chmod on each reboot.
It is a hell of a lot of work. Calculate about a week or more for just that (at least that was what it took me to figure it all out). Good luck
PS: If you get your app system privileges, there is also the android.permission.INJECT_EVENTS, which allows you to inject key- and touch-events to another app using a simple function (can't remember it, but Google does). For your app to be able to get system privileges you need to copy it to /system/app, which requires root and a mounted /system. Catching the keystrokes still works the same way as above.
Click to expand...
Click to collapse
Thank you for your innovative solution
I do not understand two points:
1. How does your app will stay on top and its windows receives events, when the user opens another app, a game for example.
2. How does the background app, the game, keep running? Isn't the game onPause() when you are running your app in front?
Thanks you.

Dakkaron said:
2) Open up a system alert window with no content. There is a setting somewhere that lets you catch all keystrokes and touches. This blocks them all from going through
Click to expand...
Click to collapse
Can you please try to remember and elaborate " a setting somewhere" part?

Related

(UPDATED 18-09-2010) Auto Lock (CSDEVCTRL)

Hi all,
as am now moving to a more open platform (android), i would like to return the favor of learning through this forum, how to program on win mobile by posting the code of this utility.
Its given as is, no warranties, no tricks, do not expect a well written code etc.
Based on C++, no .Net.
Hope will provide to someone, knowledge and info on this subject.
Have fun with it.
Chris
This is the link
http://rapidshare.com/files/419726318/csdevctrl.zip.html
--- Old introduction ---
Hi all,
this is mainly an auto locking program which utilizes the Windows Locking for partial locking (phone related keys are active)
or complete locking (no keys are active).
It can be considered as an add-on to other programs which provide the User Interface, an 'In Call Locker'
with some goodies as mentioned later on which may or not depend on whether the device is locked (with any program that uses
the Windows locking).
The locking can be activated at the following events:
1. After a specified period of idle time (no screen tapping or touching the keyboard).
2. After the device has waken up.
3. During a call ("In-Call Locking" Partial or Full).
Also for any of the first 2 events (idle or wake up) the program can run a specified executable/registered file together with any command line arguments that might be required.
Finally, some 'goodies':
(Stand-alone means it does not require any other option or the device to be locked)
A.(Stand-alone) it can provide some customization on the carrier name so that:
- It can fit on the screen (for example not to overwrite the Battery icon in SPB Shell).
B. (Stand-alone) Turn on Bluetooth if a call is being dialed or received. Then switch it off after
the call has ended and the headset is not connected.
Usefull if you have a bluetooth handsfree kit in your car and you do not want to keep on turning on/off
the bluetooth.
C. (Stand-alone) Flash the Backlight and or Vibrate while ringing.
At last, you can 'see' if your phone is ringing.
D. Reset the Exchange Server Policy.
Stops the frustrating setting of the password being required after connecting to the exchange server.
F. Turn off the display or/and the device itself.
It can be used as a power saver while playing music etc.
G. Set your favorite SIP (which is being reset back to the default with every soft reset).
H. HotKeys (NEW)
You can assign as sequence of keys to perform an action.
(see http://forum.xda-developers.com/showpost.php?p=3666785&postcount=702)
The parameters that are driving the behaviour of this utility are located at:
http://forum.xda-developers.com/showpost.php?p=2424492&postcount=148
The parameters can also be updated using the setup program provided (csdevctrlsetup.exe).
A flow diagram of the parameters that relate to locking, is provided in the zip file for better understanding of their use.
The debugscr.exe program has been added to help identifying the keystroke codes and coordinates. Before this program is executed
the csdevctrl must be stopped as mentioned further down.
To install it:
- Use the cab file provided.
Simply run it and it will create:
- under the 'Program Files' a directory with name CSDevCtrl'
This directory will contain:
csdevctrl.exe is the main program
csdevctrlsetup.exe is the setup program
debugscr.exe is a utility to find the coordinates and keystrokes (optional).
- Shortcuts under the 'Programs'.
- They can be installed either in the internal memory or on a storage card.
To run it:
> Run the Setup program to set the parameters and the Start Up option.
> Run the program (csdevctrl) and it will spawn at the background as another process.
The device will vibrate once to show that the program has started.
To stop it:
> Running the program second time will cause the program to exit (It will show a confirmation window which will close in 3 seconds unless you close it sooner).
To uninstall it:
> Close the process as usual (run it again or kill the process).
> Remove it from the installed programs.
> Also delete the registry key HKEY_LOCAL_MACHINE\Software\CSDevCtrl
As a note, do not rename the csdevctrl.exe as the uninstall depends on this name.
It has been compiled only for WM6.
For more information see the next link:
http://forum.xda-developers.com/showpost.php?p=2391054&postcount=142
If you wish to buy me a beer or a pitta of souvlaki for my effort, feel free to click on the link below:
https://www.paypal.com/cgi-bin/webs...ode=EUR&lc=CY&bn=PP-DonationsBF&charset=UTF-8
Cheers
Chris
Log:
29/11 - v.6.5 - Added power off after disconnect, support for 6.5 win (beta)
17/09 - v.6.18 - General Policy handling, Dump variables for debugging purposes
04/08 - v.6.16 - Added option for startup delay, Keep the backlight on while on call, lock when dimmed.
27/06 - v.6.15 - Added option to lock only if specific programs are running
20/06 - v.6.14.1 - Fixes.
no bad, i like how it uses the built in windows lock.
Thanks,
it works well with my favourite program (Spb shell) which is the reason of me developing this.
this works great on the smartphone but there is a visible window which can be closed too easily with task managers and can't be navigated away from.
any poss you could hide it rather than minimise it?
looeee
i have updated the program to be windowless as you mentioned (attachment replaced)
Hope it works for you.
Cheers
Chris
chrisstavrou said:
i have updated the program to be windowless as you mentioned (attachment replaced)
Hope it works for you.
Cheers
Chris
Click to expand...
Click to collapse
First of all, thanks for sharing!! This is a very nice app.
I've tested the 2 versions (window and windowless), and I have a suggestion if I may.
I like the idea of the program being windowless, since it becomes more appealing to the eye (I mean, it's great we don't have to see the small window minimize everytime we wake the device), but now, to be able to close the app, we must use a task manager to kill the process(e.g. sometimes we may want to test some other locking software and we need to disable it temporarily). So my suggestion would be that when we run the program once it starts, the next time we run it, it stops. Would that be possible? I think it would make your app perfect!!
Remember, it's only a suggestion.
Thanks in advance.
Its good to know that it may be of use by someone
I have updated it as you mentioned, it will exit if you run it the second time (attachment replaced).
chrisstavrou said:
Its good to know that it may be of use by someone
I have updated it as you mentioned, it will exit if you run it the second time (attachment replaced).
Click to expand...
Click to collapse
Now it's just great!!
Thank you very much for this.
What's the purpose of this app, from the description above it looks as though it does what the original lock already does, so I ask again; what's the purpose of this app?
NiteStalker said:
What's the purpose of this app, from the description above it looks as though it does what the original lock already does, so I ask again; what's the purpose of this app?
Click to expand...
Click to collapse
Automatic lock!!
Once your device light gets dimmed, or on device wake up, without having to press the lock button.
Is that clear enough for you?
Just set the time for 0 minutes, and it's locked on wake-up.
Guess the dim part is good, thanks for clearing that up. I guess my brain wasn't working, I couldn't figure out what deemed was.
now i love the app for what it does... my only suggestions or worries are... after setting that up, i no longer am able to input a password when the lock is activated... and when the program is activated, it wakes the device up from the dimmed, light, thus defeating the purposes of the backlight going off... and also draining the battery a little more... is there ayway that the program can run without waking the device?
MrGalione973 said:
and when the program is activated, it wakes the device up from the dimmed, light, thus defeating the purposes of the backlight going off...
Click to expand...
Click to collapse
I have had this happen to me sometimes as well, already in my short testing time span: when pressing the power button (once) the backlight switches off and back on!
I am also experiencing that it sometimes just does not seem to lock: when pressing the power button twice (with pause) my device only sometimes locks.
And in case you are open to another suggestion: perhaps you can minimize all windows when locking, so the lock ends up on the today screen; or make it an option somehow (command line parameter?)
Thanks for the advices i will be checking them out and come back to you
mousio said:
And in case you are open to another suggestion: perhaps you can minimize all windows when locking, so the lock ends up on the today screen; or make it an option somehow (command line parameter?)
Click to expand...
Click to collapse
Another vote for that!
TBH the only reason I still use S2U is because I can see my missed calls, appointments etc. It's a great app, don't get me wrong, just not something I need.
Your locker would be perfect for me with an option to go back to Today on locking.
Or, perhaps you could implement a simple count of missed calls, SMS, MMS, emails and appointments directly on the lock screen? Just don't let it grow too much!
works beautifully for me with the spb mobile shell 'now' screen showing me the info, thankyou very much!
Why don't you add an option of command line parameter specifying a program/link to be launched before locking? That way it would be very flexible (there are plenty of small programs around doing loads of stuff - like minimizing everything or sending a text or calling your mama - possibilities are endless)
Program has changed as per your advices:
- Leaves the device in idle state for better power management
- Run an application while trying to lock by reading a file.
I have updated the first entry of the thread with some more info and the file.
Any comments are welcome.
Enjoy
I love it. It's simple and effective. Just the way I like things. I'll keep testing it for a while and report back.
I've got another idea actually.TODAY option works really well, the only 'problem' (its not a problem,just room for improvement ) that you need to reopen all the windows you had opened before.
How about an option TODAY&BACK when the minimised windows would be reopened when unlocked? In other words-minimised when locked, back to what it had been before locking when unlocked? It would make it perfect (until next idea strikes)
Anyone tested it on WM5?

[Q] How do we protect our Android device from the CelleBrite UFED?

Someone mentioned this in another thread, but this is a topic that should have it's own separate thread.
Some of you may have already read the news: Michigan: Police Search Cell Phones During Traffic Stops
Don't assume it won't come to your town.
I can't say I plan to do anything that would warrant police suspicion, yet I don't like the idea of anyone being able to easily pull data from my device. And we know cops won't be the only ones with these devices. So I've been wondering, how can we protect our Android devices from the CelleBrite UFED?
Check out this video that shows some of the features it has, keep in mind it does much more and can even extract DELETED data.
See the company's product page here: http://www.cellebrite.com/forensic-products/ufed-physical-pro.html
This research paper talks about the CelleBrite UFED and other extraction methods. (CelleBrite UFED is talked about starting on page 9.) I doubt there's a means to prevent all of those methods given some involve long term handling of the device, but CelleBrite UFED can extract data when a device is retained by the CelleBrite UFED user for a short period of time. It looks like HTC Android type devices can only be extracted from via the (micro)USB Port and it requires USB Storage and USB Debugging turned on. The CelleBrite UFED has to gain Root Access. It can get by screen passwords and root even a device that was not yet rooted.
There's another thread where someone was requesting a ROM that would not work with the CelleBrite UFED. I'm not sure how to make a ROM or anything else that would not work with the CelleBrite UFED without limiting certain features we all may use from time to time.
Over on Slashdot, someone said they hacked their device (Nexus One) to not do USB client mode. This is another option that would limit some features many of us may use.
So, how can we protect our privacy and our data? Does it mean sacrificing some features like USB storage mode?
The biggest problem is what's missing from Android itself. Meego might be protected but not Android.
You would need an encrypted boot loader that retains root for some users.
A kernel and os files that support different users so the default user is not root like Linux and a prompt with a password for superusers not just an Allow like now for Android.
Encryption libraries that would support truecrypt encryption of both internal and external (SD card) encryption in toto not just individual files.
A true trash system that overwrites files like srm in linux and sswap for wiping the swap file after every system reboot.
Ultimately I don't see it happening. In theory if you were running Ubuntu on your phone then yes cellbrite would just crap out not knowing what to do with your phone. Same possibly with meego. But then no real app support, no navigation and driver support is crap even for ROMs using the same os let alone a different OS like true linux.
It's amazing how many don't even bother deleting thumbnails hanging around on their computers or securely wiping files on their computer. Same with swap files retaining passwords or even website cookies that have the same password as their computer.
Best thing to do, don't keep anything that could be bad on your phone. Use a cloud system or home server sync that requires a seperate login every time and keeps no local files. Or as I do, encrypt the hell out of anything you find valuable, which currently is only my complete backups...
Sent from my Xoom the way it should be, rooted and with SD card.
This is where that cheap Boost Mobile phone comes in, or any other prepay phone. Just hand the officer that one. Store your personal data on your smartphone.
chbennett said:
Best thing to do, don't keep anything that could be bad on your phone. Use a cloud system or home server sync that requires a seperate login every time and keeps no local files. Or as I do, encrypt the hell out of anything you find valuable, which currently is only my complete backups...
Sent from my Xoom the way it should be, rooted and with SD card.
Click to expand...
Click to collapse
Hello, All. This is my first post at xda-developers!
Since I'm new to Android, data security has concerned me. Climbing the learning curve of rooting and tweaking my SGH-T989, I've focused on control, security, and privacy. So far pretty good, thanks largely to members' posts at this site. Thank you very much!
Then this thread crushed me. Visions of "1984", "THX 1138", "Terminator", etc.
I considered the suggestions here. Thoughts about the OS seem right to me, but that's beyond my abilities. I did try following chbennett's advice: I enabled encryption in my backups and moved them to the internal SD.
But I don't yet know how to do the 'home server / log in on demand' scheme for contacts and calendar. I will appreciate any help with that.
Meanwhile, I looked for a way to make a 'panic button' that would let me wipe my phone immediately. What I chose was making a contact whose phone number is the USSD code for Factory data reset.
Maybe Tasker, etc. could streamline this approach; but my trials showed that, unlike MMI codes (e.g., to toggle caller ID blocking), USSD codes cannot be submitted to the OS indirectly. So swiping a contact, direct dial shortcut, etc. did not work. On my phone, all that worked was either 1. manually dialing the code, or 2. dialing the contact name, then tapping the contact.
So the routine to use this 'panic button' is:
1. launch Dialer
2. dial the contact name
3. tap the contact name in the search results
4. tap "Format USB storage" in the "Factory data reset" dialog
5. tap "Reset phone" button in the "Factory data reset" dialog.
It sounds clunky, but it's actually pretty quick. I named the panic button contact "XXX" to avoid confusability when dialing (it needs only "XX" for a unique match.)
If you can suggest improvements to this scheme, or think it is misguided, please let me know. Thanks.
Any updates on this? I'm curious as to how to guard against ufed.
I think an instant hard brick option would be better so theres nothing to recover as i dont believe the factory reset is a secure wipe
Possibly a voice activated secret phrase or keypress u could say/do super fast in a tricky situation that autoflashes a corrupt/incompatible bootloader and recovery to device after secure superwipe that should stump them for awhile
im still interested in this i disabled usb debugging on my phone but unsure if the UFED can still access anything on my ICS full encrypted passworded evo3d im assuming they could dump the data at most but i highly doubt they could access the decrypted data unless you used an insecure pass
If you have encryption enabled for your data partition, then all you need to do is to turn off your phone when you see a cop. If they take it from you, they can turn it on and hook up their device, but they will only be able to snarf the system partition, which does them no good. They'd need your password to mount the data partition.
If you look around on this forum, you can find the steps necessary to switch the lock screen back to a simple pattern lock while leaving the disk encryption enabled.
Are you sure Cellebrite and UFED or w/e can't access encrypted data partion? I know it can take an image of the phone "hard drive". They then can run password tools against image to unlock it no?
dardack said:
Are you sure Cellebrite and UFED or w/e can't access encrypted data partion? I know it can take an image of the phone "hard drive". They then can run password tools against image to unlock it no?
Click to expand...
Click to collapse
I'd like to know about this too. I am about to set up encryption on my device and I'd like to know more about what type of attacks it can beat.
Edit to add: I assume brute force attack protection is like any other type of encryption.....dependent on the strength of your password. But, assuming we all know that already, I'm still curious about this.
If the question is how to protect your device when you think someone would scan your phone, you'd have to have some sort of inclination that a scan is about to happen. I'm assuming this is many people's concern as they're considering wiping their device through a quick process. In that scenario, just turn off your device. Unless you warrant suspicion of something fairly bad, they wouldn't be confiscating your cell phone.
smokeydriver said:
...Unless you warrant suspicion of something fairly bad, they wouldn't be confiscating your cell phone.
Click to expand...
Click to collapse
We all wish all law enforcement was just and honest, but so far in world history that has not been the case. Even a pretty woman may have her phone scanned by a curious cop snooping for pics.
Sent from my HTC One using Tapatalk 2
I would still like to know if there is an answer here...
So I recently had some dealing with assisting in a Cellbrite search. We initiated and enlisted the help of law enforcement for an employee who was doing some illegal activity which is not relevant to this discussion other than the person used an iphone. Anyway, the investigator came in and wanted to know if I can enable the bypass for the automatic screen lock in 5 minutes because when it locked, it disabled the Cellbrite copy.
Now, couple things here, he was only doing what he was "allowed' to do in the local municipality, and he did say they sell a more expensive Cellbrite device which would be able to crack it. I did find it interesting that the simple corporate Activesync policy I have set up was actually having this effect. Anyway I removed the policy and it worked. Funny thing is he could have done it himself had he known anything about that kind of thing. He was presented to us as an expert but I guess that mainly covered a basic Cellbrite expertise.
So, I do think encryption would be a great answer as the partition would be hard to bust in to. Nothing is impossible but I would rather not smash my phone on the highway next time I get pulled over so I would like to know definitively that this is the right approach. This is definitely not paranoia as there are at least 3 states where it looks like it happens regularly.
Time to look at a 2600 group for stuff like this I guess. I am early in my investigation
Later

Is there one decent timer for Android?

This may be an area where the dumbphones win, but I've only been able to find one app that is just a timer--open the app, you've got a timer--and it's way too cumbersome.
When the app opens, I need to see:
A number pad.
A Next button (for moving from hh/mm/ss).
A Start button.
ETA: Also, number pad input needs to overwrite the current field, not insert.
These features have been available on every dumbphone for over a decade. Can't they be done in Android?
This isn't exactly what you are looking for, but I use it.
https://market.android.com/details?id=com.hybrid.stopwatch
It has a stopwatch, too, but remembers which mode you chose and launches in that mode.
Yeah, I tried that one and it has all the same issues as Kitchen Timer, though it's nicer to look at. Who decided an Android timer would use this cumbersome +/- interface? It's made worse by the fact that once you get a cursor in a field, it inserts rather than overwrites, and won't jump fields.
Ideally, the only actions necessary to set a timer should be open-0-0-7-3-5-start, no navigation, no clicking up and down as if we had a device with two buttons (i.e. a watch).
Yeah, I looked around for a timer too. This was the easiest to use that I found. I rarely have to change the time on it so for me I launch it and hit go. But if I was constantly changing the value, it would be annoying. Makes you want to go out and write your own!
I'm poking around in App Inventor to see what I can manage--I would be lost writing code from the ground up. I think I should at least be able to come up with something with multiple one-button presets on the starting page, and they can probably be user-programmable, but I don't think App Inventor has the commands to give focus to a numerical text-box (thereby highlighting the contents for replacement and launching the number pad) on app initialization.
If you want, take the time to send me some EXACT specifications and I'll see if I have time to whip something up; we're not talking 10 year global weather modeling here! LOL
TIA,
Roots
Rootstonian said:
If you want, take the time to send me some EXACT specifications and I'll see if I have time to whip something up; we're not talking 10 year global weather modeling here! LOL
TIA,
Roots
Click to expand...
Click to collapse
I'm actually making progress in App Inventor, but if it comes to naught, I'll PM you.
Well, it's not finished and it's not pretty, but it's a timer
So far, I can't get the box to grab focus when the app opens, but it's still quicker for entering a new value than the others on the market. The empty red bar will bring up the number pad. Hit hours, mins, or secs to start the timer with the relevant units. Start/Pause work, and if you enter, for instance, "90 + Mins" it will convert it to 1 hour 30 mins. More than two digits in the Hours box will break the UI, but it will count them down
The preset buttons and persistent notification box don't do anything yet, and it doesn't remember the last value entered if you close the app yet, but the core functionality is there.
http://dl.dropbox.com/u/7299403/TimerSAUR.apk
ETA: enabled persistent notifications and shake-to-stop.
ETA2: remembers last value entered and whether Persist was checked, made some visual tweaks and added an icon.
ETA3: re-skinned the whole thing and hid the preset buttons for now. I can add features, but I'd call it a complete app, and more functional than anything on the market, for my purposes.
ETA4: I, um, even fixed those script errors that caused FCs if you tried to start a timer with all fields empty. Details.
D'oh! As far as I can tell, the App Inventor "clock" function pauses if the device is sleeping--not exactly practical for a timer :/
Maybe I'll have another run at it tomorrow.
Maybe you can save the time that it paused, then calculate how much time has passed when it wakes up and start from there. That won't help much if your time expires while it is sleeping, though. Will App Inventor let you prevent sleeping?
Talking to App Inventor community members, I think the clock provided is just not workable for something like this. Maybe if I'm willing to build a windmill to turn a doorknob, I could figure something out, but I'd probably be better advised to start learning real code if I want to pursue the matter.
Better yet, I could take Rootstonian up on his/her offer
Yeah, it shouldn't be too difficult to build. And since you already have some of the GUI worked out, you can just pass that on.
I've built one Android app but it was a while ago so I'm very rusty. But it sounds like it can be done pretty quickly.
Jason

[Q] multi user (2 users)

I'm very confused, trying to make the leap from a PC (Windows and Linux),
where it is OBVIOUS how to distinquish one user in the household from another,
to my new B/N Nook Tablet.
Ok, so I'm now using my tablet. When I hit 'Home', my desktop shows that my logged-in email is an active app. (and so are a few others).
So, I completely power it down.
When I power it back up, I expected that my email would NOT be active.
But, it IS!
What if it was some OTHER household member who powered up the tablet?
(I do NOT want them, by default, seeing my email screen!)
Is there a solution? (Or should I just return this goofy 'tablet' to Barnes and Noble, and wait til next year to see if next-year's tablet OS works the
way most of us would want it to???)
For now, think of this tablet as a personal device such as a mobile phone. Pretty sure ICS works the same way too so it might be a long wait for you.
Ok.
Meanwhile, how do I explicitly shutdown (stop) my running apps
(e.g. my email app)?
Do I 'visit' each one, and find how each app handles stopping it?
Or, better...is there a 'task-mgr' (list) for my apps, so that I could select
them all and abort them?
You could get "advanced task killer" from the market. Not sure if it needs to be rooted or if you could just side load it.
Sent from my BNTV250 using Tapatalk
MonkeysInACan said:
You could get "advanced task killer" from the market. Not sure if it needs to be rooted or if you could just side load it.
Sent from my BNTV250 using Tapatalk
Click to expand...
Click to collapse
Hmm...I'm still a newbie to all this 'root' vs 'side-load' terminology.
Side-load just means: 'Get it first on a real PC, then plug-in the USB-cable
to the tablet, and 'move it over'?
To 'root' something seems to mean that, in Linux-terminology, I first need to
have 'root' (super-user) privs, right? (I saw a thread about how to 'root'
the device, but am unclear about DETAILS. Does it violate warranties?
(yada, yada) Also, I THINK I'm hearing that, right now, I can only use
the Barnes/Noble 'app store' and NOT to the generic Android 'app store'?
True/false?
Are you saying I might need 'root' to INSTALL the app 'adv task killer', or
to RUN 'adv task killer'? (or both?)
It sounds like you want to have some form of screen locker in place so when you power back up (or unsleep) you have to enter a code or a pattern. This prevents unauthorized access to your personal tablet.
You should be able to activate it from the settings menu.
Concerning multiple logins, the presumption is one user per device. As to 'working how "most of us" would want it to'... Most people do prefer it this way. If someone else wants their own tablet, they should get their own tablet.
>the presumption is one user per device.
This is a legacy of Android still being a phone OS. Tablet is a more social device, and safe bet is that multiuser acct handling will show up at some point. Hopefully, soon. Else, Win8 will do what Android can't.
Android still has a lot of holes it needs to fill, and I'm not talking about apps.
---------- Post added at 10:05 PM ---------- Previous post was at 09:56 PM ----------
@OP
You don't need to "close" apps in Android. The OS manages memory as needed per least-recently-used basis. Using apps such as "Task Killer" is inefficient and will shorten battery life. There've been many articles/posts written on this topic. Google to find.
What's recommended is to run something like System Panel (free app in market). Over time, it'll give you a profile of which app is eating up the most battery. Use that to remove apps that are power-hogs.
At least on my Android cell phone, hitting the Home key leaves the current application running. Hitting the "Back" key ends the application. Not sure if the NT has a "Back" function...
rmm200 said:
At least on my Android cell phone, hitting the Home key leaves the current application running. Hitting the "Back" key ends the application. Not sure if the NT has a "Back" function...
Click to expand...
Click to collapse
The NT does have a back key, but that behavior depends on how the app was designed and it not true for many apps. In fact, because of what e.mote described about Android's design for "backgrounded" apps, Google recommends that apps not be designed to close itself with the back button, menu command, etc except for special circumstances.
e.mote said:
>
[...]
@OP
You don't need to "close" apps in Android. The OS manages memory as needed per least-recently-used basis. Using apps such as "Task Killer" is inefficient and will shorten battery life. There've been many articles/posts written on this topic. Google to find.
What's recommended is to run something like System Panel (free app in market). Over time, it'll give you a profile of which app is eating up the most battery. Use that to remove apps that are power-hogs.
Click to expand...
Click to collapse
Ah, but that's the question/issue: i.e. I WANT to close this particular app (email), for
security reasons!
Are you saying that apps in Android are often NOT programmed with a
mechanism to STOP them?
By design, yes - most apps are not programmed to fully stop themselves - they remain resident in memory in case you return to that app - it reduces load times and allows content viewing sites (news readers, downloading the newest emails, periodic alerting tools, etc) to work in the background so the information is available when you want it without having to do a load at the time you bring up the app.
Any app that's paused (not the current focus) may be asked to relinquish resources by the OS in order to allow another app (with the current focus) the ability to run. This is all handled by the OS, and applications are expected to always be interruptable, thus constantly persisting their state as they are being used. This allows for something else to interrupt (such as a phone call or selection of another app, or an alert from your alarm program) with a reasonable expectation that whatever you were doing wasn't lost.
The security built into Android is the ability to require a passcode or pattern to unlock the phone when coming out of a sleep state. Failing to set that pattern or passcode is a failing of the user, not the OS.
Phones and Tablets, from the android perspective, are an extension of the person. Though I sometimes use my wife's NookColor, or she mine - it is a rare thing and any use beyond that by friends is always supervised.
Other tablet OSs may have the concept of 'logging in', but not Android.
So, I'm screwed? No way to get her email logged in?
Hmm...I HOPE I'm still missing something simple. (Otherwise, I'm
screwed, and I'll have to return this diabolical BEAST to the store.)
This unit is a gift for my wife for Xmas.
To familiarize myself with it, I setup and logged-in to my
Gmail acct.
Of course, NOW I want to:
'Log out' of my gmail, and setup the 'email app' to login to
her email (non-Gmail-based). [And, have THAT one be the
always-open email-acct, (tho I do NOT LIKE this 'feature'
of always-logged-in at all!)]
How do I do that? ('Rooting' this Nook Tablet is NOT an option, so
if that's part of your proposed "solution", forget it.)
TIA...
cookdav said:
Hmm...I HOPE I'm still missing something simple. (Otherwise, I'm
screwed, and I'll have to return this diabolical BEAST to the store.)
This unit is a gift for my wife for Xmas.
To familiarize myself with it, I setup and logged-in to my
Gmail acct.
Of course, NOW I want to:
'Log out' of my gmail, and setup the 'email app' to login to
her email (non-Gmail-based). [And, have THAT one be the
always-open email-acct, (tho I do NOT LIKE this 'feature'
of always-logged-in at all!)]
How do I do that? ('Rooting' this Nook Tablet is NOT an option, so
if that's part of your proposed "solution", forget it.)
TIA...
Click to expand...
Click to collapse
There should be an option in the Settings section to add and remove email accounts. I don't have a NT but that's pretty standard as Android devices go.
I have to say you seem to have a lot of misinformed expectations of the Android/Nook experience. Keep remembering that the software was originally developed for mobile phones, so expecting things to be done in the same way to a desktop OS is gonna cause you grief.
tomegranate said:
There should be an option in the Settings section to add and remove email accounts. I don't have a NT but that's pretty standard as Android devices go.
Click to expand...
Click to collapse
Ah...'should' is the operative word. But, I do NOT see any such option.
I have to say you seem to have a lot of misinformed expectations of the Android/Nook experience. Keep remembering that the software was originally developed for mobile phones, so expecting things to be done in the same way to a desktop OS is gonna cause you grief.
Click to expand...
Click to collapse
Hmm...I'd characterize my expectations quite differently. This is the FIRST
(and I hope LAST) implementation of an 'email reader' that was designed
with NO WAY to log out/close down. Common sense SHOULD dictate
that they'd provide a way to log-out or reset to a different email-acct,
but so far, there's NO SIGN that anyone had any common sense.
Hey, maybe the 'crime-stoppers' (aka 'big brothers'/homeland-security) folks
asked for this 'feature'. It will make it easier now...they can just say:
"Great...there's her B/N Nook Tablet! She can't have logged out, so just look
thru her emails, and see who she's been corresponding with."
Right now, my opinion of this beast is worse than the 'Hotel California':
Last thing I remember, I was
Running for the door
I had to find the passage back
To the place I was before
�relax,� said the night man,
We are programmed to receive.
You can checkout any time you like,
But you can never leave!
Hell, on a Nook, I can't even checkout!
cookdav said:
Ah...'should' is the operative word. But, I do NOT see any such option.
Hmm...I'd characterize my expectations quite differently. This is the FIRST
(and I hope LAST) implementation of an 'email reader' that was designed
with NO WAY to log out/close down. Common sense SHOULD dictate
that they'd provide a way to log-out or reset to a different email-acct,
but so far, there's NO SIGN that anyone had any common sense.
Hey, maybe the 'crime-stoppers' (aka 'big brothers'/homeland-security) folks
asked for this 'feature'. It will make it easier now...they can just say:
"Great...there's her B/N Nook Tablet! She can't have logged out, so just look
thru her emails, and see who she's been corresponding with."
Right now, my opinion of this beast is worse than the 'Hotel California':
"You can checkout any time you like, But you can never leave! "
Hell, on a Nook, I can't even checkout!
Click to expand...
Click to collapse
But you can lock the tablet.
The option is there. I don't have my NT in front of me, but there is an option to remove B&N account settings and wipe the device. That's what you want. It will remove everything that you set up.
As far as your opinion that this is the first such email program that doesn't log out...there has never been a smartphone OS email program that logs completely out, or one that allows multiple users. Android was developed for Phones. The expectation is that you will use your phone, not share it with 10 people with each of them having their own settings.
Something that you are referring to is available, but not from an Android, Blackberry or iOS device. You would have to get a Windows (not Win Mobile) tablet, which will not work as well (yet) as any of the other OS's because it was not designed specifically for the hardware it's running on.
Easy way to have what you want on this tablet: Don't set up email using the built in email program. Use the browser and don't have it remember the password.
@OP
Your expectations aren't unreasonable. It's just that Android-on-tablet is still very much a work in progress, and you along with all of us are beta testers.
Multiuser handling is just one of many issues that have arisen. In the Kindle Fire forum, there are complaints about not being able to disable one-click purchasing for when handing the KF to your kids. iOS has had the same issue, and has a partial workaround. Until Android supports multiuser, there is no good solution.
For e-mail, you can try various email clients to see if any supports discrete logins/logouts (and of course pulling mail from your webmail account).
http://google.com/search?q=email+apps+for+android
cookdav said:
Ah...'should' is the operative word. But, I do NOT see any such option.
Hmm...I'd characterize my expectations quite differently. This is the FIRST
(and I hope LAST) implementation of an 'email reader' that was designed
with NO WAY to log out/close down. Common sense SHOULD dictate
that they'd provide a way to log-out or reset to a different email-acct,
but so far, there's NO SIGN that anyone had any common sense.
Hey, maybe the 'crime-stoppers' (aka 'big brothers'/homeland-security) folks
asked for this 'feature'. It will make it easier now...they can just say:
"Great...there's her B/N Nook Tablet! She can't have logged out, so just look
thru her emails, and see who she's been corresponding with."
Right now, my opinion of this beast is worse than the 'Hotel California':
"You can checkout any time you like, But you can never leave! "
Hell, on a Nook, I can't even checkout!
Click to expand...
Click to collapse
Jesus guy, it's not an 'email reader', whatever that means, it's a mobile tablet computer, and it handles email accounts the same way as all tablet computers that use a mobile OS (ones based on Android, iOS, and presumably webOS and Blackberry too), because they're designed for personal, individual use. Smartphones don't have a way to log out of your email account in the way you're expecting, and neither does a modern tablet.
If this is the first time you've used this type of device, you need to exercise more patience before you start stamping your feet, otherwise people are gonna be unwilling to help you.
I'm 100% certain there is a way to remove your email account from the device, you just haven't found it yet. This is very likely not the fault of the device! Did you even read the user manual? http://img1.imagesbn.com/pimages/nook/tablet/mediakit/userguide_NOOKTablet_111115.pdf
Reset the unit to factory standard and put it in the box, it is an option under 'settings' and will return it to the "as-purchased state" with all data wiped.
Then decide if you're returning it or wrapping it to give to your your wife.
In the future, consider letting the person receiving the gift having the pleasure of opening a unit in pristine condition. My wife would kill me if I "pre-opened" an electronic device intended for her "to familiarize myself with it". Let that happen on the day she opens it, after she's decided she needs help. I think it's deplorable that you've cracked the seals and denied her the experience of opening something new.
If you want to 'log out', then you have to shut the device down instead of leaving it in 'sleep mode'. No power means the apps aren't running (unless you or the OS have set them up as background processes). When you turn it back on, you'll realize quickly that there is no 'select profile' or 'choose user' function because it is designed to be one device for one user.
If the user wants security to prevent other people from reading sensitive information, they should set the screen lock code in the settings menu.
-=-=-
At this point, I believe you have all the information you need:
1) Devices are intended to be single user, by design, regardless of your desire to have them be otherwise.
2) Use the built in screen lock capability if you are concerned about sensitive information being viewed.
3) You should reset the device to factory settings via the settings menu to wipe all data you've entered and return it to a nearly 'as new' state.
4) You should not be playing with your wife's new device and instead allow her to experience the setup guide and walk through the configuration of the device in the way she desires.
If there is another specific question about how things work or operate, please ask. If there are further conspiracy theories I'm sure there are better forums for that than this one.
Wow. lotta words - no Solution...
You're going to have to factory reset the device:
Settings>Device Info>Erase and Factory Reset
Once its resets, enter your wife's information.
You seem to think that phones and Pads run like Windows where you can log out as yourself and no one can see your email. Phones and pads are single user devices and will not work like Windows. Even Windows phones and pad don't operate like that.

Kernel watchdog reseting unbranded commercial android tablet/not graceful.

Sorry if this is in the wrong location, if it is please let me know where to move it.
So the story goes I found an Amiibo Kiosk at my apartment dumpster. It was originally designed to run a single app meant to be interacted with by customers and a settings app meant to be accessed by a technician and nothing more. Using adb I managed to get into the /actual/ android settings menu instead of the custom "CSR" one that you can access by pushing some buttons on the back and perform a factory reset. If you need more information I documented everything I did here: https://forum.xda-developers.com/android/help/commercial-grade-android-tablet-issues-t3594279 the post is at the very bottom.
It's a giant 18.5 inch 720p commercial tablet from DUCO meant to be mounted in customer-service kiosks: (product page) http://www.ducotech.com/product/18-5-android-based-720p-hi-def-lcd-media-player/
I sideloaded arrow launcher, aosp keyboard, google chrome, and a stripped-down youtube front-end so it can be used as an actual tablet. Unfortunately Google Play services in not supported on this device (although I could probably spoof it as an officially supported device to make it work, but I want to fix my biggest problem first.)
My problem is that after a pretty consistent amount of time it unceremoniously black-screens with a pop from the speakers, then starts back up. I logcatted it and it shows nothing but wlan polls and ram cleanup before it shuts down, however I'll include it anyway since I'm sure that'll be the first thing anybody asks for.
My best guess is that there is some kernel watchdog resetting it since it's not being tickled by DUCO's CSR app that is normally installed when the system is sitting on a salesfloor.
Is there any way to check for this and/or disable it?
Additional info:
Running Android 4.1.1
Sun4i architecture
I attempted to install Busybox, but the tablet resets itself before Busybox can finish installation.
Logcat is here since the logcat.txt is a few kb too big to upload.
How did you get PowerShell to accept the line code. It errors everytime I type the codes you are recommending

Categories

Resources