Most of the articles in the X-Mobile section are devoted to hacks and tweaks that require obtaining root rights, modifying the firmware, or replacing it with a custom one. However, not every reader is ready to subject their smartphone to such operations, fearing that they can turn the device into a brick or lead to instability in operation. Today I will debunk these myths and show that even in the most stalemate situation, bringing a smartphone back to life is not so difficult.
Let's talk about what it really means to “turn a smartphone into a brick” and what other pitfalls can await the user on the way to changing the system and installing custom firmware. What glitches can be caught in this case and is it possible to kill a smartphone by reflashing it incorrectly? Will you lose the warranty forever or can the smartphone be returned to its previous condition? Can custom firmware really fail a smartphone owner at the most inopportune moment and are they worth it?
A fall from the fifth floor can kill a smartphone, but not flashing it. The main problem that anyone who wants to reflash a smartphone faces is that during the installation of the firmware, a failure may occur, which will lead to its inoperability, and the smartphone will actually turn into a brick.
All this is true, but only on paper. To understand why, it’s enough to understand how the process of flashing a smartphone works and what system components are used. To be able to install third-party firmware on a smartphone, you need to unlock the bootloader (not in all cases), get root and install a custom recovery console (ClockworkMod or TWRP), capable of installing firmware with any digital signature.
The recovery console is stored in a separate partition of the internal NAND memory and is in no way connected with the installed operating system. After installing a modified version of the console, it will be possible to flash custom firmware or even another OS (Firefox OS, for example). If a failure occurs during the installation of the firmware, the smartphone will not be able to boot it, but the recovery console will remain in place, and all you need to do is boot into recovery again and reinstall the firmware.
In addition, any custom recovery console contains a backup/restore function, which allows you to make a backup copy of the main firmware and restore it unchanged (with all applications, settings and data) in the event that something goes wrong. In fact, the smartphone can be returned to its original state.
You may ask: what happens if the installation of the Recovery Console itself fails? Nothing, in this case the situation will be the opposite, when the operating system itself will remain in place, and the console will be lost. To deal with it, you just need to re-flash recovery directly from Android.
Hypothetically, one can imagine a situation where both the firmware and the recovery console are killed (although this is quite difficult to do), but even in this case, the primary bootloader, flashed into the permanent memory of the smartphone, will always remain in place.
Conclusion: it is impossible to kill a smartphone by installing third-party firmware through a custom recovery console. Either the recovery or the primary bootloader will always remain in place.
Firmware is different from firmware. On the vastness of the World Wide Web you can find a huge number of Android builds for every taste and color, and most of them are really slag, which can lead to instability in the operation of the smartphone and loss of some functionality. Therefore, the first thing to remember is that you should only deal with serious custom firmware developed by large teams of experienced developers. First of all, these are CyanogenMod, Paranoid Android, AOKP, OmniROM and MIUI.
Second. There are two types of firmware: officially supported and ported by third-party developers. The same CyanogenMod, for example, has an official version for the Nexus 4 smartphone, but does not have one for the Motorola Defy. But for Defy there is an unofficial port of CyanogenMod 11 from a developer with the nickname Quarx. The difference between them is that the CyanogenMod team is responsible for the support and proper operation of the first, while the second is Quarx personally. Official firmware versions are usually fully functional, but the correct operation of the latter depends on the third-party developer.
Well, third. There are stable and development versions of the firmware. Stable versions of CyanogenMod have the index M (CyanogenMod 11.0 M7, for example). This firmware version usually does not contain bugs. Development versions (in the case of CyanogenMod these are daily nightly builds) may contain bugs and are therefore not recommended for everyday use.
Conclusion: if you install a stable official version of the “normal” firmware on your smartphone, the risk of encountering bugs is minimal. Everything else is for experimenters.
In theory, an application with root rights can do anything with the smartphone's firmware, including erasing it completely. Therefore, you need to be extremely careful with such software. The software we talk about on the pages of the magazine is completely safe and tested in our own skin. In addition, for all the time I have been using smartphones on Android (and this is starting from version 1.5), I never I haven’t encountered a situation where software with root support killed a smartphone.
Software distributed through Google Play usually fully corresponds to the stated characteristics, and if it led to a brick or left a backdoor in the depths of the smartphone, it would not last even a week in the store. In any case, here you need to follow the “trust but verify” rule and carefully read the instructions for using root applications.
What makes a smartphone vulnerable to viruses is not root rights, but the bugs used to obtain them. Rooting tools and viruses can exploit the same Android vulnerabilities to gain root privileges, so the fact that the device is rooted does not change anything. A well-written virus will not ask for permissions in the standard way, revealing its presence; instead, it will take advantage of the same vulnerability to obtain them covertly.
Moreover, having root, you get the opportunity to install the latest version of Android (in the form of custom firmware), in which these bugs are already fixed. Also, do not forget that most custom firmware allows you to disable root or create white lists of applications that can use these rights.
Software designed to obtain root does four simple things: launches an exploit that allows you to gain root rights in the system, mounts the /system partition in write mode, copies the su binary required to obtain root rights in the future to the /system/xbin directory, and installs the SuperSU or SuperUser application, which will take control whenever any application requests root privileges using su.
None of these steps can crash or kill the smartphone. The only thing that can happen is that the exploit will cause a segmentation fault and the smartphone will reboot, after which it will continue to work normally.
The guarantee is lost not from the fact of obtaining root, but due to its detection by the service center. Most devices can be unrooted using the Universal Unroot application or by reinstalling the stock firmware using the official application from the manufacturer.
There are, however, two exceptions to this rule. The first is the Knox system that comes pre-installed on new Samsung smartphones and tablets such as the Galaxy S4, S5, Note 3 and Note 10.1. Knox provides an increased level of Android security by responding to any firmware modifications and installation of third-party kernels and firmware. If the user performs these actions, the system sets a trigger that confirms the fact of the modification. The trigger is implemented in hardware (eFuse chip), so it cannot be reset to its initial position. On the other hand, it is not entirely clear whether the service center will refuse to repair the device on this basis. Second: the eFuse chip is installed on some other devices (for example, smartphones from LG), and it also allows you to accurately determine whether the smartphone has been rooted or flashed.
If we talk about custom firmware, everything is more complicated. Typically, the flashing operation requires unlocking the bootloader, and this can be done either using special exploits or using the smartphone manufacturer's web service. In any case, the unlocked bootloader will definitely indicate that the smartphone did not belong to a blonde.
On some smartphones, it is possible to lock the bootloader back, but you should learn about this separately, and also keep in mind that the newly locked bootloader will most likely receive the status Re-locked, and not Locked, as it was originally (this happens on HTC smartphones, For example). The only exceptions here are smartphones and tablets of the Nexus line, the bootloader of which can be locked and unlocked in three clicks without any dancing with a tambourine, and no one will find fault with anything.
On Linux, ADB and Fastboot can be installed separately from the Android SDK. On Ubuntu: sudo apt-get install android-tools-fastboot. On Fedora: sudo yum install android-tools.
To prevent Knox from interfering with root applications, you can disable it using the following command from the terminal: su pm disable com.sec.knox.seandroid.
Getting root and flashing a smartphone are absolutely safe operations that cannot brick the smartphone for purely technical reasons. The only exception is an attempt to hack the bootloader in order to unlock it. In this case, the eFuse chip (if the smartphone has one) may work and block the ability to turn on the smartphone.
Fortunately, today smartphone manufacturers either prefer not to block the ability to turn on a smartphone with a hacked bootloader (by setting a trigger indicating the fact of such an action, as Knox does), or implement a special web service that allows you to painlessly unlock the bootloader with loss of warranty on the smartphone. which saves users from having to risk breaking the bootloader.
So, now let's talk about what problems can arise when getting root and flashing and how to deal with them.
Unsuccessful flashing can be caused by several factors: the battery died and the firmware was only half filled; the firmware turned out to be faulty or intended for a different smartphone model. In the end, there was simply not enough space on the smartphone, which can happen when trying to install the latest version of Android on a smartphone that is three or four years old.
Outwardly, all these problems usually manifest themselves either in endless resets of the smartphone to the initial manufacturer logo, or in the so-called boot loop, when the boot animation plays on the screen for more than five to ten minutes. There may also be problems with the screen (multi-colored ripples) and a non-working touch screen, which also prevent the use of the smartphone.
In all these cases, it is enough to do one simple thing: turn off the smartphone by long pressing the power button, then turn it on while holding down the volume down button (some smartphones use a different combination), and after you get into recovery, reinstall the firmware (Install zip from sdcard - > Chooze zip from sdcard) or restore the backup (Backup and restore -> Restore). Everything is easy and simple.
This can happen after a failed installation or update of the Recovery Console. The problem is that after rebooting the smartphone and turning it on while holding down the volume down button, a black screen appears, after which the smartphone either resets or freezes.
Solving this problem is not easy, but very simple. You can install the recovery console on the vast majority of smartphones using the TWRP Manager, ROM Manager or ROM Installer applications. They themselves determine the smartphone model, download and flash the required recovery, without requiring a reboot. If you can’t restore the console with their help, just find instructions on the Internet for installing recovery on your device.
To be honest, it is difficult for me to imagine such a scenario, but, as practice confirms, it is quite real. There are two ways to get out of this situation: use fastboot to upload recovery to your smartphone, or use a tool from the manufacturer to install stock firmware. We'll look at the second method in more detail in the next section, and I'll talk about fastboot here.
Fastboot is a tool that works directly with the device’s primary bootloader and allows you to upload firmware to your smartphone, recovery, and unlock the bootloader (in Nexus devices). Fastboot support is available in many smartphones and tablets, but some manufacturers block the ability to use it. So you will have to consult the Internet about its availability.
To access fastboot, you will need drivers and the Android SDK. When they are installed, open the command line, go to the SDK installation directory, then to the platform-tools directory, turn off the smartphone, turn it on with the volume buttons pressed (both) and connect it using a USB cable to the PC. Next, you need to find the recovery image in .img format for your device and run the command:
$ fastboot flash recovery image.img
Or even force the smartphone to boot recovery without actually installing it:
$ fastboot boot image.img
In the same way you can flash official firmware update:
$ fastboot update update-file.zip
You can find a recovery suitable for your device either on the TWRP website or in the XDA-Developers and 4PDA forums.
In this section, I will talk about ways to return your smartphone to clean stock, no matter what state it is in. These instructions can be used both to unbrick your smartphone and to remove traces of rooting and flashing. Unfortunately, I can’t talk about all possible models, so I’ll focus on the four most popular flagships: Nexus 5 (I call this sample the control one), Galaxy S5, LG G2 and Sony Xperia Z2.
Restoring Nexus devices to their original state is easier than any other smartphone or tablet. In fact, it is so simple that there is not even anything to talk about. In fact, all you need to do is install the ADB/fastboot drivers (on Linux you don’t even need them), download the archive with the firmware and run the script. The whole operation looks like this step by step:
For those who are interested in what the script does, here is a list of commands:
Fastboot flash bootloader bootloader-DEVICE-NAME-VERSION.img fastboot reboot-bootloader fastboot flash radio radio-DEVICE-NAME-VERSION.img fastboot reboot-bootloader fastboot flash system system.img fastboot reboot-bootloader fastboot flash userdata userdata.img fastboot flash recovery recovery.img fastboot flash boot boot.img fastboot erase cache fastboot flash cache cache.img
With the Galaxy S5 smartphone everything is a little more complicated, but overall quite simple. This time you will need the Samsung Odin application, which will be used to flash the smartphone’s firmware. Sequencing:
As I already said, this operation will return the smartphone to its original state, but will not reset the trigger installed by the Knox system (if it was in the standard firmware). Therefore, the service center may refuse to repair.
Restoring the LG G2 to its factory state will also not cause any problems. The number of steps in this process is somewhat larger, but they themselves do not require special preparation and knowledge. So, what to do to return the G2 to factory firmware:
This is all. But keep in mind that, as in the case of Samsung, the smartphone will still have Rooted status, and this cannot be fixed.
Now about how to return the Sony Xperia Z2 smartphone to its factory state. As in the previous two cases, this will require stock firmware and the official firmware utility. You launch the utility on your PC, connect your smartphone using a USB cable and start the update process. Step by step it all looks like this:
In many smartphones, an unlocked bootloader will not allow an over-the-air update.
In 90% of cases, unlocking the bootloader will entail deleting all data from the smartphone, including the memory card.
Flashing a smartphone, and even more so gaining root access, is not at all such a scary and dangerous operation as it may seem at first glance. If you do everything correctly and do not resort to tools that unlock the smartphone’s bootloader, bypassing the manufacturer’s tools, you will not be able to brick your smartphone. Yes, in some cases you will have to tinker to get everything back in place, but what is better - to use a locked smartphone that does not allow you to do even half of the things that it is capable of, or to gain complete control over the device? In the end, reinstalling Windows on a PC doesn't scare anyone.
Brick - more than one novice user asked this question: “How to remove the device from the brick state?” But first, let's figure out what a brick is and whether you actually got a brick. If for some reason the phone or tablet does not turn on, then there may be two options: the preloader has failed or the flash memory has failed. In the case when the preloader has failed, the body is revived without problems, but when the flash memory is burned out - only the service center. In one and in the other case, the symptoms are the same, and it’s difficult to immediately distinguish what’s really going on, but it’s worth a try. So, let's look at a real example of how you can revive or remove a smartphone from its brick state.
When writing this manual, I used an MTK processor. We would like to note that brick restoration for other MTK devices is basically identical.
Well, let's get started. If you received a brick instead of a new firmware, then the archive of your downloaded firmware is damaged. To do this, download the archive with the firmware again from a trusted source, for example from NidRom. In this case, you need to pay attention to which version of the device – 8 or 4 GB of memory; we also recommend reinstalling the drivers for your gadget on your computer.
We are not responsible for any damage caused to your phone if something goes wrong.
1. Unpack the newly downloaded firmware to the root of drive C (C:\);
2. Download a new preloader from here (this preloader is only for LENOVO S820), in some cases you can do without it, but if that doesn’t work, then follow the further instructions;
3. Go to the target.bin folder in the firmware folder, now you need to replace the original preloader file in it with a new one, the one that was downloaded in step 2.
4. Now delete the checksum.ini file in the same target.bin folder
6. Check the box next to DA DL All With Check Sum;
7. Specify the path to the scanner file, and then click the Firmware Upgrade button;
8. Take your phone, or rather a brick, take out the battery from it and connect it to the computer.
9. That's it, now we wait for the end of the flashing process.
That's all, now you have a manual for restoring bricks. We look forward to new comments from you.
Stay tuned, there is still a lot of interesting things ahead.
A common problem when flashing MTK-based devices is incorrect installation of USB drivers. You are going to flash your smartphone using SP_flash_tool, connect your device to your computer, but it simply does not see your device and does not react in any way to its connection. If this is a problem, you need to check that the drivers are installed correctly. We'll cover three main installation methods.
In Windows 10, installing the MTK driver is not always required for SP_flashtool to work correctly; most often it is preinstalled there.
If automatic installation of the MTK driver via the .exe or .bat installer did not help, or there is no .exe or .bat file in the driver folder and SP_Flash_tool continues to ignore your smartphone, then try the manual method of installing the MTK driver.
SP Flash Tool- a smart and convenient tool designed for flashing devices based on MediaTek chipsets. If you decide to flash an Android smartphone or tablet with such a processor “under the hood,” then you need to first of all take care of the possibility of making a backup ROM of the device if something goes wrong. In addition to the usual reason (precautionary measures), there is another reason here: not every firmware you choose may be suitable specifically for your device. Therefore, it is worth making sure that the requirements for display characteristics, memory capacity and other parameters regulated by the new firmware are fully met. Otherwise, the software, and along with it the device, may be partially or completely inoperative. Practice shows that if the parameters match, flashing an Android smartphone using the SP Flash Tool goes smoothly, but we decided to still provide instructions for creating a backup copy.
1. Launch the flash drive, then in the "Download" tab download the scatter file (if necessary, you can borrow it from an Android device with a similar processor). Don't be alarmed if you don't see any firmware files in the folder with the scatter file - this is normal. Leave the checkbox only on the first line (PRELOADER), uncheck the rest.
2.2. Connect the turned off Android device to the PC via a USB port;
2.3. The memory test that will occur after connection will show the information you need on EMMC blocks (don’t pay attention to blocks with zero volume, only those with a size will be needed;
3.3. Based on the data obtained earlier, fill in three parameters in the window that appears.
note : On the device taken as an example, there are 4 regions, but this does not mean that there are as many of them on other gadgets. Flash memory can have 3, 2, or even one region ("USER"). In the latter case, you will not have to select a region - this option will not be available in the menu intended for entering block reading parameters. As a rule, this situation happens when working with Android devices based on chipsets from early years.
3.4. Press the "ReadBack" button, reconnect to the USB port of the turned off gadget - reading will begin;
3.5. After reading the block is completed, repeat the manipulations described in step 3 with all other regions.
This way you will get a complete copy of the flash memory of your Android device.
If you decide to use the SP Flash utility, the easiest way is to flash the firmware (modified recovery specifically for your device) and download it to your home computer, corresponding to the gadget’s MTK processor. All old drivers related to Android devices will be needed delete first. You will also need to download the version for Windows or Linux. And do not forget that the SP Flash Tool utility for MTK devices can be compatible with a 32 or 64-bit version of the PC OS - it is important to choose the correct one that matches the system installed on your home computer.
Hardware you will need:
1. Home computer Windows / Linux;
2. A working USB cord for connecting with an Android device;
3. Android smartphone or tablet computer.
SP Flash Tool can flash devices based on MT6575, MT6577, MT6577T, MT6595, MT6592, MT6582, MT6572, MT6589, MT6589T chipsets.
1.
Download the SP Flash Tool program and unpack the archive onto your computer;
2.
If you have a device with an MT6575 or MT6577 processor based on the AGOLD project, download the SP_MDT program to your computer with the ability to select components in uboot and unpack it;
3.
Download and install USB VCOM drivers;
4.
Extract the archive with the factory firmware for your Android device (the directory name for the unpacked folder with the factory firmware files should not include Cyrillic characters);
5.
Turn off your smartphone or tablet; the USB cable should not be connected to the computer;
6.
Remove the battery and then insert it back;
7.
If the drivers have not yet been installed, connect the device to the PC using a USB cable. The operating system will then find a new device, and you must point it to the folder with the USB VCOM driver for your OS version. Install the drivers and disconnect the cable from the PC.
8.
Launch SP Flash Tool;
10. Click the Download button;