• Editing the build prop file on android. Tips'n'Tricks from the Android arsenal. The most interesting, useful and non-standard tricks with Android

    Probably many people know that at the root of all devices android platform there is a certain folder system. This is where our system as a whole is located. Also, almost all firmware flashes this folder.
    Let's not go off topic. At the root of this folder there is a file with a self-explanatory name - build.prop. (If you think about it, the prop extension can be translated as “to prop up” and ultimately be perceived as something like: “propping up a building”)
    In general, by editing this file, you can “squeeze” everything out of your smartphone to the maximum. Most of these settings cannot be set any other way. They run into this file. Of course, to do this you need root rights and a text editor with permissions to make amendments.

    I want to warn you right away - make backups. And yes, I am not responsible for turning a smartphone into a brick or other consequences. Do everything at your own peril and risk.

    All these actions work the same on tablets running Android OS!

    Okay, let's get started.

    The underlined values ​​must be changed to achieve the result.

    ro.media.enc.jpeg.quality=100— this line is responsible for the quality of saving .jpg files in percentage. As if 100 means 100% quality. But at the same time, the size of saved images increases significantly.

    debug.sf.hw= 1 — hardware GPU — acceleration. 1—enable, 0—disable. There may be problems with displaying something. But personally, I have not yet encountered these problems.

    dalvik.vm.execution-mode=int:jit- responsible for JIT. The value jit activates it, and fast deactivates it. (JIT - Just In Time (From English “just in time”, “just in time”, etc.))

    wifi.supplicant_scan_interval=20— is responsible for the Wi-Fi search interval. The default is usually 20. The value is set in seconds. Some people advise setting it to about 180-200, to save on an already small battery. Because I don’t use Wi-Fi that much, so I left it at the default value.

    dalvik.vm.heapsize= 32 m— are responsible for allocating RAM for one application. Increasing this value will of course lead to better performance in games. But, if you exaggerate, it can cause instability of the system as a whole. I did not try to set the value higher than the available RAM. I have it set to 128, while having 512.

    ro.product.model=GT-I8150— phone model for which the system accepts the existing one. By changing this value, you can launch some applications that write something like: “Not available for your phone model,” or the like. Also, in this way you can deceive the Play Market and install applications that it complains about and says will not work.

    debug.sf.nobootanimation=1— this line is missing from many people. In general, a value of 1 turns off animation when the device boots. It makes switching on a little faster, but it doesn’t look as impressive or epic.

    ro.media.dec.jpeg.memcap=5000000— Responsible for the quality of photographs. Of course, if you have a 5 megapixel camera, it won’t shoot at 40 megapixels.
    ro.media.enc.hprof.vid.bps=5000000— responsible for video quality. In other respects, similar to the previous line.

    ro.config.hwfeature_wakeupkey=0— disable the ability to “wake up” the phone by pressing the volume keys.

    windowsmgr.max_events_per_sec=60- this line is most often initially missing. But you can add it yourself. By changing the values ​​in it, you can achieve the most smooth and flexible system.

    ro.build.display.id= Samoylov and all — all — all- this is something like a build number. Doesn't play a special role. You can view it by opening " Settings" => "About phone"«.

    ro.sf.lcd_density= 240 — screen density. It is missing on some devices, you can add it yourself.

    Changes take effect only after rebooting the device!

    P.S. These are not all the lines that exist in this file. There are an incredible number of them and they are unique on many devices.

    The lion's share system parameters Android, hidden from the user's eyes, is stored in a single file called build.prop. Properly changing the settings will help breathe a second life into the gadget: improve autonomy and performance, optimize the interface. In the article we will show how to conveniently edit build.prop, and give examples of useful tweaks, as well as those that wander from article to article on different resources, but in fact do not work.

    What does editing the build.prop file do?

    The build.prop file functions as follows: when the smartphone starts, contents are read from it, which in one way or another affects the logic of the code. operating system. Among these settings hidden from the user, there are both deeply systemic ones that are best left untouched, and those that can be painlessly changed. For example, by adding a few lines to build.prop, you can speed up the loading of the gadget, remove the delay when incoming call or enable auto-rotate display on the lock screen. We will now tell you how to do this.

    How to edit build.prop?

    All you need to make changes is an editor text files and superuser rights. You can find out how to get root access on our forum in the Android firmware section in the topic dedicated to your smartphone or tablet. To make direct changes to a file, you can use the usual text editor- to do this, you will have to independently find the file along the path /system/build.prop. But it is much more convenient to make changes using specialized program, For example, BuildProp Editor.

    Before you start experimenting, you must do backup copy file. BuildProp Editor saves a backup of the original automatically the first time you launch it. If you decide to use a regular text editor, then do not forget to make a copy manually. If something suddenly goes wrong, then you will only need to replace the “damaged” build.prop with a backup copy to return everything to its place.

    Improved performance

    Speed ​​up loading. Modern smartphones often take almost longer to boot than regular PCs. By tinkering a little with the settings in build.prop, you can easily increase the loading speed of your gadget by one and a half to two times! The following settings will help with this:

    debug.sf.nobootanimation=1

    ro.config.hw_quickpoweron=true

    After making these settings, the gadget's shutdown mode will be changed, and the boot animation of the firmware developer will also be disabled. As a result, when you boot up your smartphone, you won’t see anything on the screen for some time. You shouldn’t be afraid of this: it was thanks to disabling unnecessary animations that the test smartphone began to boot in just 30 seconds instead of the previous 50 seconds.

    Acceleration of memory work. By default Android logs many actions in special file, however, it is only necessary for developers to debug applications. Regular users this log will not be useful, and therefore it is worth disabling it by adding the line to build.prop

    logcat.live=disable

    Disabling the log will reduce the number of disk operations, which will have a positive effect on performance internal memory smartphone. True, the difference will be noticeable only on gadgets with slow types of memory: in our case, the sequential write speed increased by 2 MB/s.

    Network acceleration. This tweak increases the size of TCP buffers, which will help increase the speed of a slow Internet connection, especially when using mobile networks. Well, registering Google DNS servers in some cases allows you to reduce ping time.

    net.tcp.buffersize.default=4096,87380,256960,4096, 16384,256960

    net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960

    net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960

    net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960

    net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960

    net.rmnet0.dns1=8.8.8.8

    net.rmnet0.dns2=8.8.4.4

    net.dns1=8.8.8.8

    net.dns2=8.8.4.4

    For us, the difference turned out to be noticeable, but we should not forget that the constantly changing load of base stations has the greatest impact on speed.

    Data transfer rate with standard settings

    Data transfer speed after editing build.prop

    Increased autonomy

    Unfortunately, miracles do not happen - a twofold increase in autonomy cannot be achieved with any tweaks. But it’s quite possible to add an extra 30-60 minutes to the gadget’s operating time.

    Increase Wi-Fi scanning intervals. By default, Android scans its surroundings Wi-Fi networks every 20-90 seconds. Moreover, it does this even when Wi-Fi is turned off, but background search for networks is allowed to increase the accuracy of location determination. To expand this interval, you need to add the line to the build.prop file:

    wifi.supplicant_scan_interval=200

    Here the number 200 is the network scanning interval in seconds.

    Save battery on LineageOS. A small tweak that provides more efficient sleep mode management when using CyanogenMod or LineageOS on smartphones with Qualcomm chipsets:

    pm.sleep_mode=1

    You can find even more useful tweaks on the 4PDA forum.

    Useless tweaks that don't improve anything

    In addition to the actually working tweaks given in this article and in the forum thread, there are many that have been widely distributed on the Internet, but in fact do not have any effect on the operation of the system. A corresponding study was carried out by one of the users of the xda resource. He analyzed the source code of AOSP and CyanogenMod and found that many popular tweaks were simply not mentioned in source code Android. Among them there are a variety of records.

    Tweaks that do not save battery:

    ro.ril.disable.power.collapse

    ro.mot.eri.losalert.delay

    ro.config.hw_fast_dormancy

    ro.config.hw_power_saving

    Tweaks that do not speed up work:

    windowsmgr.max_events_per_sec

    persist.cust.tel.eons

    ro.max.fling_velocity

    ro.min.fling_velocity
    debug.performance.tuning

    video.accelerate.hw

    Other useless tweaks. They are designed to disable checking Dalvik bytecode and prohibit unloading the launcher from RAM. Once they really worked, but are completely irrelevant for modern Android versions due to changes in the internal OS architecture:

    dalvik.vm.verify-bytecode

    And a few more different tweaks that simply don’t work:

    ro.media.dec.jpeg.memcap

    ro.config.nocheckin

    profiler.force_disable_ulog

    profiler.force_disable_err_rpt

    persist.sys.shutdown.mode

    ro.kernel.checkjni

    Interestingly, while some of these entries were useful for older versions of Android, some never worked at all, being a kind of placebo. And why such a mass delusion arose in the first place is now impossible to find out. However, making such entries in build.prop will not make the smartphone work worse - all invalid entries will simply be ignored.

    Conclusion

    Even though many of the tweaks recommended on forums and various websites do not function at all, the build.prop file is still a good opportunity to improve the interface and performance of your smartphone. So get superuser rights, backup your settings and feel free to experiment!

    For many years we have been talking about the most different ways optimize, modify and tweak Android. During this time, we have accumulated a huge number of tips for all occasions, and we are ready to present you with the best of them - starting with instructions for changing the MAC address and controlling your smartphone with broken screen and ending with upgrading the YouTube client with Android automation.

    A.D.B.

    Let's start with ADB (Android Debug Bridge), a standard tool for debugging and working with Android console from a computer. To activate ADB, it is usually enough to enable it in the “Developer Options” on your smartphone and install a universal driver on your computer.

    Moving files from/to device

    One of the most convenient functions ADB is the ability to quickly move a file to your device or download it to your computer. To copy to the device, use the following command:

    $ adb push file /sdcard/

    Reverse operation:

    $ adb pull /sdcard/file file

    Taking a screenshot and recording video from the smart screen

    WITH using ADB easy to take a screenshot:

    $ adb shell screencap /sdcard/screen.png

    To pull a screenshot from the device, use the pull command from the previous example:

    $ adb pull /sdcard/screen.png screen.png

    In addition to the screenshot, you can record a screencast:

    $ adb shell screenrecord --size 1280x720 --bit-rate 6000000 --time-limit 20 --verbose /sdcard/video.mp4

    This command will start recording video with a resolution of 1280x720 (if not specified, the native screen resolution of the device will be used), with a bitrate of 6 Mbit/s, length 20 s (if not specified, then the maximum value 180 s), with logs shown in the console. The recorded video will appear on the memory card as video.mp4. You can interrupt recording by pressing Ctrl + C.

    Battery percentage

    Not all firmwares have the function of displaying battery percentage on the icon in the curtain. In this case, you can enable display using one command:

    $ adb shell content insert --uri content://settings/system --bind name:s:status_bar_show_battery_percent --bind value:i:1

    Managing a smartphone with a broken screen

    If after a fall the phone's touch does not work, minimal functionality can still be ensured via ADB, at least to make a backup. There is an input command for this:

    $ adb shell input [<ИСТОЧНИК>] <КОМАНДА> [<АРГУМЕНТЫ>…]

    You can specify trackball, joystick, touchnavigation, mouse, keyboard, gamepad, touchpad, dpad, stylus, touchscreen as the source. As a command:

    • text (Default: touchscreen)
    • keyevent [–longpress] ... (Default: keyboard)
    • tap (Default: touchscreen)
    • swipe (Default: touchscreen)
    • press (Default: trackball)
    • roll (Default: trackball)

    As you can see, we can emulate taps and swipes using the input touch and input swipe commands. For example, you can pull out the curtain with notifications like this (coordinates are counted from the left top corner):

    $ input swipe 10 10 10 1000

    And this way you can find out the screen resolution to choose your own values:

    $ dumpsys window | \sed -n "/mUnrestrictedScreen/ s/^.*) \(*\)x\(*\)/\1 \2/p"

    For Nexus 5 the resolution will be 1080x1920. In this case, to click on the “Application Menu” button of the standard Google launcher, which is located above the “Home” button, you should run the following command:

    $ input touchscreen tap 500 1775

    You can emulate pressing the power button if it fails:

    $adb shell input keyevent 82

    Well, insert text into the current field using the command

    $ adb shell input text "Required text"

    Root

    Now about root rights. With their help you can do a huge number of useful things. Let's talk about some of them.

    Blocking ads

    There are many different ad blockers for Android that do not require root rights. However, they all, including the famous AdBlock, have one big problem- they create a local VPN tunnel. This means that by activating AdBlock, firstly, you will not be able to use the VPN, and secondly, you will often encounter connection problems.

    Having root rights, you can install a more correct blocker, for example AdAway. It blocks advertising hosts at the level of the system name resolver (using /system/etc/hosts as a blacklist), so it always works absolutely correctly, does not hang in memory and does not consume the battery.

    Turn off the camera shutter sound

    If you have root rights, you can turn off the shutter sound. It is enough to install any file manager with root support, go to the /system/media/audio/ui directory and delete two files: camera_click.ogg and camera_focus.ogg .

    By the way, the level above is bootanimation.zip, which is responsible for the boot animation. You can delete it (then there will be just a black screen when loading) or change it to another one.

    Tweaks build.prop

    The file /system/build.prop stores system Android settings. This is the config of all configs, and you can do a lot of interesting things with it. It is enough to write a line at the end of the file with the name of the option and the value separated by an equal sign:

    • ro.product.model - stores the name of the device (displayed in the “About phone” menu). Sometimes it allows you to deceive Play Store and install applications intended for other devices, or enable functions that are not available to others. For example, pretend to be a Pixel 2 XL and install a new Pixel Launcher with full support Android Assistant;
    • ro.sf.lcd_density - screen pixel density, which I always set for my Nexus 5 to 420 instead of 480. This allows you to get five icons in a row in the stock launcher instead of four, plus makes the text smaller;
    • ro.telephony.call_ring.delay - with a value of 0, will remove the delay in starting music when making a call;
    • persist.audio.fluence - contains four commands responsible for the operation of noise reduction. You can play with the values ​​if you are hard to hear during a call or there is a “gurgling” sound in the video recording;
    • debug.sf.nobootanimation - value 1 removes bootanimation;
    • ro.config.hw_quickpoweron - value true increases the phone's boot speed (in theory);
    • qemu.hw.mainkeys=0 - allows you to activate the display of on-screen keys in addition to the hard ones;
    • ro.telephony.default_network - tells the system what mode it should be switched to mobile network when loading. The value is a number that can be found out like this: dial *#*#4636#*#* in the dialer and click on “Phone information”. In the “Preferred network type” menu, count from top to desired mode. Counting starts from zero. That is, for a 3G smartphone the values ​​will be as follows: WCDMA preferred (preferably 3G) is 0, GSM Only (2G only) is 1, WCDMA only (3G only) is 2 and so on. I counted to the desired point and wrote the number into the value. Now, immediately after a reboot, the network will be activated in exactly the mode that is written in build.prop.

    Looking for Wi-Fi passwords

    To remember the password from any network that has been connected at least once, or to transfer all networks from one device to another without binding Google account, you can look into the file /system/etc/wifi/wpa_supplicant.conf. Network names and passwords are in clear text.

    Continuation is available only to subscribers

    Option 1. Subscribe to Hacker to read all materials on the site

    Subscription will allow you to read ALL paid materials on the site within the specified period. We accept payment bank cards, electronic money and transfers from accounts mobile operators.

    1. Disable call timeout

    Android devices usually wait for connection confirmation before they start making calls. This setting disables the timeout and makes the phone ring as soon as you call. However, the waiting time is not that long. Anyway just add these lines to the end of the file

    build.prop.ro.telephony.call_ring.delay = 0

    ring.delay = 0

    2. Disable built-in error reporting

    Add the following lines to the end

    profiler.force_disable_err_rpt=1 profiler.force_disable_ulog=1


    3. Fix black screen problem after calling

    In case you experience a pause of a few seconds after every call, it could be a problem with your proximity sensor. Change the following lines in the build.prop file to the values ​​shown below.

    ro.lge.proximity.delay = 25 mot.proximity.delay = 25

    4. Enable automatic rotation on your lock screen

    Automatic rotation on the lock screen was present in earlier Android devices. Nose latest versions this has been disabled on smartphones, although it is still present on Android tablets. However, if for some reason you want to return it, simply add the following line to the end of your file.

    lockscreen.rot_override=true

    5. Enable auto-rotate on your home screen

    If you have a custom Launcher installed, this shouldn't be a problem for you at all. But if you are using a launcher Android installation or OEM, add the following line at the bottom of the file.

    build.prop.log.tag.launcher_force_rotate = VERBOSE

    6. Improve your Internet connection

    Most Android devices use their carrier's DNS service by default. Google also has a set of free DNS services that anyone can use. And isn't it obvious what DNS services will be better when it comes to Google and mobile operators mobile communications? You can add the following lines to your build.prop file to force your device to use more reliable services.

    DNS Google.net.dns1 = 8.8.8.8 net.dns2 = 8.8.4.4

    7. Improved scrolling

    This setting changes the maximum and minimum speed to improve scrolling animation and speed. Just add the following line to the end.

    build.propwindowsmgr.max_events_per_sec = 150 ro.min_pointer_dur = 8 ro.max.fling_velocity = 12000 ro.min.fling_velocity = 8000

    8. Improve call quality


    ro.ril.enable.amr.wideband = 1

    9. Enable or disable on-screen navigation keys

    Quite a few Android devices come with screen soft keys navigation, and many are also equipped with hardware capacitive touch buttons. For any reason, if you want to disable onscreen navigation keys, add the following line to the file.

    Build.prop.qemu.hw.mainkeys = 1

    On the other hand, if your hardware keys are acting up or for some other reason, you want to enable navigation keys software, just change the value of the above line to "0" and add it to the end of the build.

    qemu.hw.mainkeys = 0

    10. Change Screen DPI for More or Smaller Text and Icons

    Changing DPI is one of the most popular and favorite build.prop changes among modders. So much so that this standalone edit has several dedicated apps on the Play Store for those who don't want to get their hands dirty and do the work themselves. More high value DPI results in smaller UI, smaller texts, smaller icons.

    Lower DPI results in higher user interface, large texts and large icons. For less powerful devices, you may notice performance log when setting the DPI higher and improved performance with lower DPI. Also, you shouldn't play with it too much because if you set the value too high or too low, you might not be able to control your device at all. Find the following line in your build.prop file and replace XXX with the value you like.

    ro.sf.lcd_density = XXX

    Typically, standard XXX values ​​are multiples of 160. That is, 160, 320, 480, 640, etc.


    11.Improving image quality

    Most Android devices provide images with more low quality to relieve the processor of the load. This is in no way bad quality, just not the best quality your device can achieve. Although these days with more powerful processors, included in the average and even budget smartphones, in most cases it is required required power to remove it. If you think your device can handle rendering images with best quality, add the following line to the end of build.prop

    ro.media.enc.jpeg.quality = 100

    12. Increase the time between checks WiFi networks

    By default, Android searches for nearby WiFi networks every 15 seconds if your WiFi is turned on. This can be useful if you live in a large house or are at an airport where you move between multiple access points. But most of the time it is usually a battery leak. Adding the following line to the end of the build.prop file may help if you want to change the default 15 second policy.

    build.prop.ro.config.hw_quickpoweron=true

    You will notice a difference the next time you reboot your device depending on technical characteristics your equipment.


    14. Hold backlit buttons with capacitive keys while the screen is on


    ro.mot.buttonlight.timeout = 0

    15. Improved network signals

    Both the Network and the device must support Fast dormancy . Typically, when your Android device connects to the network, it goes into certain states to stay connected. If the function " Fast dormancy » is disabled, the only available states are connected or disconnected.

    In the connected state, the device must perform all of its internal functions any time there is a change in the network to maintain the connection. This of course uses a lot of resources. Fast dormancy allows the device to cycle through 5 states that use less or more power depending on the task. Don't worry, we won't go too deep into this. Just add the following lines to your build.prop.

    persist.cust.tel.eons = 1 ro.config.hw_fast_dormancy = 1

    16. Disable USB Debugging Notification


    persist.adb.notify = 0

    17. Forced 270 degree rotation in all applications.

    You may have noticed that even with auto-rotation turned on, some apps will only rotate within a predefined 180-degree range. This is especially true for some games that rotate on the opposite side of where you are holding your device. This is your only choice for rotating the device itself. Adding the following line to the end of your build.prop may help.

    windowsmgr.support_rotation_270=true

    18. Lock the launcher in memory


    Some Android devices have a very aggressive attitude towards background applications to save RAM or battery. Sometimes often on devices with enough RAM. It's called bad RAM. On some devices, when you press the home button, the launcher should load again with icons and all. Of course, this requires resources. In this case, add the following line of code to your build.prop file. This will lock the launcher into RAM, preventing it from being destroyed.

    ro.media.panorama.defres = 3264x1840 ro.media.panorama.frameres = 1280x720

    defres is for the full resolution of the panorama, consisting of all images, while frames provides the resolution of each frame of the panorama.

    20. Disable Android logger - logcat

    Reference system Android magazine provides a mechanism for collecting and viewing system debugging information. Magazines from various applications and parts of the system are collected in a series of circular buffers. But if you're not a developer, you usually don't need a log cat. Disabling it can save some disk reads/writes, thus improving performance in theory. However, there probably wouldn't be a noticeable gain.

    logcat.live=disable