View Single Post
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#782
Originally Posted by mr_jrt View Post
Just a thought...would it be possible to get backup menu to only fire up when a certain key is held down? Like perhaps, 'b'?

I tend to leave my phone with the keyboard out and if it reboots, it's more likely I'll want the desktop than backupmenu.
Yes. But this requires modifying either bootmenu.sh OR /sbin/preinit.

bootmenu.sh should be safer to modify, albeit it might be more complicated. /sbin/preinit has the relevant code down on line 351 (I think. My /sbin/preinit is already modified to include a full shell at boot, so I have to subtract the number of lines I added from the total).

Basically, where /sbin/preinit checks if the keyboard is open, you can use a program (evkey I think will do it, but it's not preinstalled by default on the N900... though it might be included with the bootmenu package, and I don't know how to use it) to put another if-then-else check inside that one, so if-keyboard-open>if-B-key-pressed>run bootmenu.sh would be the basic logic of it...

Alternatively, you can modify /bootmenu.sh to wrap the entire script in an if-then statement - if B-key pressed, then (original bootmenu script contents); else nothing.

Both are changes that should be doable on-device if you know what you're doing.
 

The Following 2 Users Say Thank You to Mentalist Traceur For This Useful Post: