Disabling root console or redefining shortcuts in Android x86 emulator

722 views
Skip to first unread message

sgusc

unread,
Mar 1, 2011, 11:52:39 AM3/1/11
to Android-x86
This may not even be an issue specific to the x86 port of Android, but
I'm looking for a way to either remap or eliminate the shortcut key
combinations in the Android emulator. For instance, by default "Alt-
F1" will launch the root console in the emulator. If I wanted to
disable this functionality completely or assign a different key
combination to launching the root console, is there any way to do
that? I don't mind making low level changes and rebuilding the kernel
if necessary. Thanks for any help!

Chih-Wei Huang

unread,
Mar 1, 2011, 8:21:05 PM3/1/11
to andro...@googlegroups.com
This is not an android(-x86) feature,
but a normal feature of linux kernel,
(i.e., virtual terminal)
Yes, you can disable it by rebuilding
the kernel.

2011/3/2 sgusc <usc....@gmail.com>:

--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Brent Nash

unread,
Mar 2, 2011, 3:03:30 PM3/2/11
to andro...@googlegroups.com
Good to know.  Thanks!

Just out of curiosity, does anyone happen to have a guess where in the kernel the key combination "Alt-F1" is bound to displaying the root console?


--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-x86...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-x86?hl=en.


Dan.

unread,
Mar 2, 2011, 7:44:16 PM3/2/11
to Android-x86
May be off base, but I thought that was controlled in one of the init
scripts traditionally under the etc directory. If you only spawn one
TTY, I think you only get one terminal for X to attach to. My Linux
skills are 15 years rusted though.

On Mar 2, 2:03 pm, Brent Nash <usc.cs...@gmail.com> wrote:
> Just out of curiosity, does anyone happen to have a guess where in the
> kernel the key combination "Alt-F1" is bound to displaying the root console?

-Dan <11011011>

Ikem Krueger

unread,
Mar 10, 2011, 7:58:31 PM3/10/11
to andro...@googlegroups.com
>> 2011/2/3, Brent Nash <usc....@gmail.com>:

>> where in the kernel [is] the key combination "Alt-F1"
>> bound to [to] displaying the root console?

> 2011/3/3, Dan <dkbr...@gmail.com>:

> I thought that was controlled in one of the init scripts

> traditionally under the /etc directory.

> If you only spawn one TTY, I think you only get one
> terminal for X to attach to.

I know it's Android, but maybe this will help you nevertheless:

http://kmandla.wordpress.com/projects/set-up-ubuntu-for-speed/

Set up Ubuntu for speed

Reduce tty count

sudo rm /etc/event.d/tty[3-6]

leaves you with only two terminal windows - tty1 and tty2

--
LXDE is looking for a new maintainer of LXPanel. So if you are a developer,
get in contact with us. :)

Ikem Krueger

unread,
Mar 10, 2011, 8:01:05 PM3/10/11
to andro...@googlegroups.com
>> 2011/2/3, Brent Nash <usc....@gmail.com>:

>> where in the kernel [is] the key combination "Alt-F1"

>> bound to [to] displaying the root console?

> 2011/3/3, Dan <dkbr...@gmail.com>:

> I thought that was controlled in one of the init scripts

> traditionally under the /etc directory.

> If you only spawn one TTY, I think you only get one
> terminal for X to attach to.

I know it's Android, but maybe this will help you nevertheless:

> http://kmandla.wordpress.com/projects/set-up-ubuntu-for-speed/

> [This] leaves you with only two terminal windows - tty1 and tty2

> sudo rm /etc/event.d/tty[3-6]

Ikem Krueger

unread,
Mar 10, 2011, 8:06:56 PM3/10/11
to andro...@googlegroups.com
>> 2011/2/3, Brent Nash <usc....@gmail.com>:

>> where in the kernel [is] the key combination "Alt-F1"

>> bound to [for] displaying the root console?

> 2011/3/3, Dan <dkbr...@gmail.com>:

> I thought that was controlled in one of the init scripts
> traditionally under the /etc directory.

I know this is for Ubuntu, but maybe it applies here too:

Edgardo Gho

unread,
Jan 13, 2015, 11:03:52 AM1/13/15
to andro...@googlegroups.com, usc....@gmail.com
I know this is an old topic, but I was looking to do this too.
I tried messing with the kernel but I ended up using ioctl on tty0.
Using this command:
ioctl /dev/tty0 0x560B
Sends the VT_SWITCHLOCK to the current terminal (assuming its the graphical one). So ALT+Fx is disabled after that command. You can re-enable switching with:
ioctl /dev/tty0 0x560C

If you want this to be executed each time you boot, just add it to the init.
I created a bootanim case on init.sh, and hooked init.x86.rc this way:
on property:init.svc.bootanim=stopped
        exec /system/bin/logwrapper /system/bin/sh /system/etc/init.sh animdone

and animdone is 
animdone)
settings put secure install_non_market_apps 1
settings put global stay_on_while_plugged_in 1
ioctl /dev/tty0 0x560B
Reply all
Reply to author
Forward
0 new messages