emou.ru

How to enable the on-screen buttons if the physical ones no longer work. A Tale of Three Buttons. Column Evgeny Zobnin Method number two. Screen keys

When I once again got a smartphone with hard navigation keys, without the possibility of configuring them at all or activating the Nexus-style on-screen keys, I decided that something had to be done about it. After a couple of hours of digging into the innards of Android, I turned off the annoying backlight, swapped the back and browse keys, and then turned on the on-screen buttons and found peace.

Intro

I’ll make a reservation right away: I’m a big fan of the idea of ​​​​on-screen navigation keys. All these houses, arrows and squares drawn right at the bottom of the screen. Yes, they take up some space there (which, however, is not really necessary in most cases), yes, they may spoil the appearance of applications, but damn it, they are dynamic.

On-screen navigation buttons rotate with the screen, disappear when not needed, change color, and seamlessly integrate into the home screen interface. If we discard the very idea of ​​​​the uselessness of the existence of three buttons at once (after all, Apple people get by with one and do not feel disadvantaged) and rather convenient navigation systems like PIE or the “MIUI navigation bubble”, then the on-screen buttons are the best thing that has been invented before so far.

So. For some reason, my wonderful, wonderful idea that there is nothing better than on-screen buttons is not shared by many smartphone manufacturers. And not only do they not share, but they do not share in a completely monstrous way, forcing you to use a smartphone with touch buttons (AAA!), Equipped with dynamic backlight (AAA-2!) And a Back button on the right side of the screen (AAA-3: decisive blow ).

The situation is unacceptable to the extreme, and given that the good firmware developer did not provide any settings for activating the on-screen keys and settings for controlling the touch buttons, I had to do it on my own. There were two options for further action:

  • bring the touch buttons to the desired state, namely turn off the backlight and move the "Back" key to the left side (even if it looks like a "square", it's even more interesting);
  • disable the touch buttons completely and activate the on-screen buttons.

I do not like third-party tools, so the decision to do everything by hand came by itself.

Method number one. Setting up touch buttons

First, let's try to turn off the backlight of the buttons. For this we need root, a terminal emulator and a directory /sys at the root of the file system. It's that combination. We are dealing with the Linux kernel, and in systems based on it, all important information about the hardware, as well as the toggle switches that control it, are usually located in the sysfs file system connected to the directory /sys.

Actually, sysfs is not even a file system, more precisely, it is a file system, but it operates with so-called synthetic files. But they are not stored on the disk, this is a kind of interface for communicating with drivers: I read the file - I got data about the piece of iron, I wrote it down - I changed some setting. And for writing, you just need root rights.

So, we get root, run a terminal emulator (or better). And we write the following:

# su # cd /sys

# find -name \*button\* ./leds/button-backlight

Bingo! This is a catalog /sys/class/leds/button-backlight. Let's jump into it and see what's inside:

# cd /sys/class/leds/button-backlight # ls brightness device max_brightness power subsystem trigger uevent

I put my Nokia 3310 on that file brightness is the current button brightness, and max_brightness- maximum. Let's check the guess by writing the value 100 to the first file (well, like 100%, although what scale it is is unknown):

# echo 100 > brightness

Great, the buttons are on and are not even going to go out.

The moment of truth - we write the value 0 to the max_brightness file:

# echo 0 > max_brightness

The buttons went out, forever, like the light bulb in my porch last night.

But just like a light bulb, they can light up again if you reboot. That is, the command is valid only in the current session. Fortunately, this is not a problem, we will put our command in a script on a memory stick:

# mkdir /sdcard/boot # echo "echo 0 > /sys/class/leds/button-backlight/max_brightness" > /sdcard/boot

And we, in turn, put it into autoload using . We launch the application, select the first three checkboxes, use the Select folder option to select the boot directory on the memory card.


Half the task is done, it remains to swap the “Back” and “Browse” buttons. To do this, you need to change the layout of the buttons. In Android, it lies in several directory files /system/usr/keylayout/. There are quite a few of them, but if we discard files like Vendor_2378_Product_100a.kl And qwerty.kl(they store the layouts of full-fledged Qwerty keyboards that Android supports out of the box), then five pieces will remain at most.

One of them is exactly what we need. Smartphones often use the file ft5x06_ts.kl, specific to the FT5x06 touchscreen controller (the buttons are touch-sensitive, right?), but in my case it turned out to be the file Vendor_2378_Product_100a.kl.

If you open this file, you can see the three lines you are looking for:

Key 158 BACK VIRTUAL key 139 MENU VIRTUAL key 102 HOME VIRTUAL

It remains only to swap the numbers 158 and 139 in places (any file manager with support for root rights is suitable for this). After the reboot, the new layout will take effect.

Method number two. Screen keys

It's even easier here. Android has a special debug variable qemu.hw.mainkeys, which allows you to control the visibility of the on-screen navigation keys. If it has a value of 0, the keys will be shown on the screen, 1 has the opposite effect.

We write the variable with the desired value to the file /system/build.prop, and that is all:

# su # mount -o remount,rw /system # cp /system/build.prop /system/build.prop.bak # echo qemu.hw.mainkeys=0 > /system/build.prop

conclusions

These are the criminal steps sometimes you have to take to make your smartphone a little more convenient. As for me, I settled on the third option: "turned off" the buttons plus installed LMT Launcher. It seems to me that this is the most convenient way to manage.

Everything always breaks unexpectedly. Dropping a phone on a tiled floor is an unfortunate accident; drowning it in a bathtub is a commonplace that is more common than it seems at first. The statistics of calls to service centers contain many complaints about accidents from the series “it fell and crashed” even more often than drownings. At the same time, you should not expect that the very first fall will take away the touch substrate or even the screen itself - in most cases, the consequences of unfortunate accidents do not look so destructive. Among other things, this is the sudden inoperability of the physical back, home and menu buttons. If this trouble happened to your phone, and there is no money for repairs yet - do not worry. There is a relatively simple solution to this common problem. Now we will teach you how to enable the on-screen buttons on your smartphone if the physical ones no longer work.

For everything to work out, you need to get Root rights. Administrator access to the depths of system files is sometimes difficult to get. But with the advent of applications that get the necessary access for you, you no longer need to read multi-page instructions. Just install the Kingo Root program on your computer and connect your phone. The only thing that needs to be done while the program is being installed is in the phone settings, the "security" section, enable "USB Debugging". That's all. By pressing the big Root button in the interface Kingo Root, activate administrator rights.

Step two looks a little more complicated. You will need to download the Root Explorer program from Google Play (or a little ... alternative sources). Install it on your smartphone. Run this application, find the System directory, and in it - build.prop. If such a file is not visible in the system directory, it does not matter. In the upper corner of the program there is an ellipsis - tap on it to open a submenu. In the program settings, check the "Show hidden files" item. The loss will show up immediately.

In the left corner root explorer there is one more item we need - r / w. Touch it once and confirm your choice. This action activates the ability to edit system files. Now touch build.prop and hold your finger on it. The top menu will change and from the drop-down list (in the same ellipsis) you will find the sub-item “open in a text editor”.

Scroll to the very bottom of the open file - all these long lists of settings are not needed yet. At the very bottom, add the line qemu.hw.mainkeys=0. Save the file and restart your phone.

Done, three on-screen buttons appeared at the very bottom of the screen - similar to what you can see on the screen of any tablet. And after repairing the physical buttons, it’s quite possible to hide the virtual ones back by replacing the line qemu.hw.mainkeys=0 with qemu.hw.mainkeys=1 and restarting the device again.

A lightweight utility that simplifies the work with the device quite well.


Introduction:

Which button does each user use the most in a day? It's either the Home button or the Back button. The application called was created in order to expand the functionality of the Back button by attaching the ability to control gestures to it, which will automate some other system functions. It should be understood that the familiar Back button will remain in the same place, and the application adds its own, which, at the same time, does not take up much space.



Functional:


You don't need to be rooted to use the app, but instead you need to enable the service for the app in the "Accessibility" section. The functionality of the application turned out to be quite simple, but the fact that it works and at the same time does not interfere with the usual work with the device deserves some praise. On the home screen, there are 3 types of actions that you can perform with the button: hold, swipe up, and swipe down. For each of the actions, you can choose one of 5 actions:
1. No action.
2. Home
3. Recently launched apps
4. Notifications
5. Hide button
Gestures are performed as follows: put your finger on the button, and then swipe up or down, while the rim of a certain color will appear on the button itself. Naturally, if you just click on the button, it will work in the same way as the system Back button.


Results:


In the settings, you can turn off the application, as well as remove notifications, which allows you to hide or show the button. To summarize: it is quite capable of making the use of the device much easier and more convenient, especially if you get used to such actions. Happy using!



Loading...