The Following User Says Thank You to juiceme For This Useful Post: | ||
![]() |
2012-08-31
, 20:52
|
Community Council |
Posts: 4,920 |
Thanked: 12,867 times |
Joined on May 2012
@ Southerrn Finland
|
#2
|
![]() |
2012-08-31
, 21:10
|
|
Posts: 640 |
Thanked: 435 times |
Joined on Oct 2011
@ rajvoSa BA
|
#3
|
Aarrgh, now I suddenly realised the unpleasant truth...
The darn box is not yet running X at preinit stage, right?
So, propably qt is out of scope here, then.
Does anybody have any good suggestions on how to handle it?
Are there any libraries that handle raw input and output like on the device console? If not, do I need to read raw position events off some device or somerhing like that?
![]() |
2012-08-31
, 21:54
|
Posts: 1,225 |
Thanked: 1,905 times |
Joined on Feb 2011
@ Quezon City, Philippines
|
#4
|
![]() |
2012-08-31
, 22:24
|
Community Council |
Posts: 4,920 |
Thanked: 12,867 times |
Joined on May 2012
@ Southerrn Finland
|
#5
|
The Following User Says Thank You to juiceme For This Useful Post: | ||
![]() |
2012-08-31
, 23:01
|
|
Posts: 640 |
Thanked: 435 times |
Joined on Oct 2011
@ rajvoSa BA
|
#6
|
![]() |
2012-09-02
, 14:30
|
Community Council |
Posts: 4,920 |
Thanked: 12,867 times |
Joined on May 2012
@ Southerrn Finland
|
#7
|
struct input_event ievent; int fd, xaxis, yaxis, flag=0, ret; if ((fdev = open("/dev/input/event3", O_RDONLY)) < 0) { perror("cannot open input device"); return -1; } while(1) { if((ret = read(fdev ,&ev ,sizeof(ievent))) < sizeof(ievent)) { printf("\nreceived only %d bytes on read", ret); return -1; } if(ievent.type == EV_ABS && ievent.code == ABS_X) { xaxis = ievent.value; } if(ievent.type == EV_ABS && ievent.code == ABS_Y) { yaxis = ievent.value; flag = 1; } if(flag) { flag = 0; printf("\ntouch = %d, %d", xaxis, yaxis); } }
![]() |
2012-09-02
, 22:19
|
Community Council |
Posts: 4,920 |
Thanked: 12,867 times |
Joined on May 2012
@ Southerrn Finland
|
#8
|
int fdev, ret; struct input_event ievent; if ((fdev = open("/dev/input/event6", O_RDWR)) < 0) { perror("cannot open output device"); return -1; } ievent.type = EV_FF; ievent.code = 30; ievent.value = 1; if((ret = write(fdev, &ievent ,sizeof(ievent))) < sizeof(ievent)) { printf("\nsent only %d bytes on write"); return -1; }
![]() |
2012-09-03
, 04:16
|
|
Posts: 6,436 |
Thanked: 12,699 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#9
|
![]() |
2012-09-03
, 08:40
|
Community Council |
Posts: 4,920 |
Thanked: 12,867 times |
Joined on May 2012
@ Southerrn Finland
|
#10
|
4. you can turn your code into evtap and vibra command-line tools. it will be very handy for peoples. and write main code in another app, then just use evkey evtap and vibra tools (and show_png of corse) then need. also (maybe?) some tool for writing text in portait orientation? (landscape text with T2S is good, but i prefer portait)
The Following User Says Thank You to juiceme For This Useful Post: | ||
I am now experimenting on encrypting the whole home directory on N9, to counter the relaxed security of the device caused by running in open mode. When I am in open mode I want same (or better) security as in closed mode, but on my own terms! I want to protect my own data, not to be protected from the system
I have managed to install encfs on the device, and am planning to set up home directory encryption. However, the challenge is to get the passphrase from user in preinit phase, when device is running in sinle user mode.
I am planning on mounting the encfs home just before OS selection (as I am runing nitdroid dual boot) so that both meego and android partitions can be encrypted.
The input that can easily be obtained from user at that phase is just keypresses; volume keys and power key. What I would like to do is build an utility that presents the user a virtual keypad for passphrase entry. However, I am unsure how to do it?
Is there a way of building for example a qt application that has all the needed component libraries linked statically to it, so that there is no need for external dependencies and it can be run stand-alone from the preinit script?
I thought of building some extra functionality to it, in addition of just passphrase entry via virtual keyboard; For example, it could show device owner contact information when incorrect passphrase is typed so that changes of getting lost device back would increase.