Iam trying to root my Xiaom mi a2 phone. But i am stuck on changing the active partition. When i enter "fastboot set_active b" it doesnt execute the command. Instead i get a list off all available commands which doesnt contain an option to change the active partition.
Now i was able to set the active partition and install the root. I got no errors and everything seemed fine but i still had no root access. I found this tutorial: guide-how-to-root-xiaomi-mi-a2-magisk and it worked for me.
Every cellular operating phone has a so called 'International Mobile Station Equipment Identity' (short IMEI) number, which is considered to be a unique identifier of every phone (although, in practice, it may not be completely unique in some networks for various reasons...). Providers of GSM networks may use this number to identify stolen cellphones and deny access to such blacklisted phones to make theft less profitable. Therefore, products and "services" to change the IMEI of most types of feature and smart phones are being offered in grey markets.
I also wrote a short BASH script which allows Linux user to quickly change the IMEI or generate a random valid one (valid in sense of: phone will accept the generated number, provider usually not). This may be useful for quickly testing the behavior of apps that rely on the IMEI as a unique, stable identifier. Here is the code:
This code has been tested on HTC M7 device on an Linux machine with adb and fastboot installed on. I do not give any warranty of functionality of this code - maybe you need to adapt some of the code to work correct under other devices as well. If you want to support a 17 digit long IMEI you can drop the luhn check digit and add two additional digits which stands for software version.
You normally use ADB when Android is running. It enables you to access system folders or tweak hidden settings, which are otherwise off-limits to users. You can copy system files to and from the device using ADB, uninstall bloatware, and there's also a sideload function that can be used to install system updates.
To get started with ADB and Fastboot, you first need to set up your phone to use the tools. If you haven't already, enable the Developer Options by going to Settings > About phone and tapping on Build number seven times.
If you're using Windows, you will also need to download drivers for your device. There's a list of links for many popular manufacturers on the Android developer website. Drivers aren't needed on Mac or Linux.
Open the Command Prompt or Terminal app. To use ADB and Fastboot, you need to change the path in the app to point to the platform-tools folder you downloaded. There are a few ways to do this:
Boot your phone into Android, then connect it to your desktop computer with a USB cable. On your computer, launch the Command Prompt (or Terminal, if you're on Mac or Linux) and change the directory to point to the platform-tools folder.
Fastboot works the same way as ADB, except you need to boot your phone into Fastboot mode instead of Android. You normally do this by holding a combination of the power and volume keys when the phone is powered off.
Obviously, the commands above are for basic guidance only. They may not all work on all devices. You should only use them if you understand what they will do and how to undo any changes that they make.
The fastboot protocol is a mechanism for communicating with bootloaders over USB or ethernet. It is designed to be very straightforward to implement, to allow it to be used across a wide range of devices and from hosts running Linux, macOS, or Windows.
b. TEXT -> the remaining 252 bytes are arbitrary. They should be displayed and then step #2 repeats. It differs from info in that no formatting is applied. The payload is printed as-is with no newline at the end. Payload is expected to be NULL terminated.
e. DATA -> the requested command is ready for the data phase. A DATA response packet will be 12 bytes long, in the form of DATA00000000 where the 8 digit hexadecimal number represents the total data size to transfer.
Where data_size is an unsigned 8-byte big-endian binary value, and data is the fastboot packet. The 8-byte length is intended to provide future-proofing even though currently fastboot packets have a 4-byte maximum length.
The host will re-transmit any packet that does not receive a response. The requirement of exactly one device response packet per host packet is how we achieve reliability and in-order delivery of packets.
For simplicity of implementation, there is no windowing of multiple unacknowledged packets in this version of the protocol. The host will continue to send the same packet until a response is received. Windowing functionality may be implemented in future versions if necessary to increase performance.
The first Query packet will only be attempted a small number of times, but subsequent packets will attempt to retransmit for at least 1 minute before giving up. This means a device may safely ignore host UDP packets for up to 1 minute during long operations, e.g. writing to flash.
Any packet may set the continuation flag to indicate that the data is incomplete. Large data such as downloading an image may require many continuation packets. The receiver should respond to a continuation packet with an empty packet to acknowledge receipt. See examples below.
The host starts with a Query packet, then an Initialization packet, after which only Fastboot packets are sent. Fastboot packets may contain data from the host for writes, or from the device for reads, but not both.
Now one could argue I should not have accessed the testing menu in the first place, but the phone was getting a bit warm at the back and I wanted to check the temperature. I had forgotten where to look exactly so I looked around a bit and once I saw "radio band" I was curious which options would appear.
After selecting "radio band" only one choice popped up "USA band". Now had I not been still a bit stressed from a phone call and been a bit too tired, I might have figured out that I should have pressed anywhere outside the button, but, PLEASE, if there is only one option, how can it be a wrong one way street?
I had to backup the phone, factory reset it, restore the data and recreate all my settings and app icon arrangements. I couldn't choose the firmware I had been happy with but had to jump to 157 (with unknown consequences). I had issues with some applications which updated to newer versions without my approval so some saved game states won't load back anymore. Luckily, I could revert to an older version of Chrome which does not ignore bookmarks placed on the homescreen (why do bugs like that not get fixed? But I digress). I had to find a workaround for my phone being unable to pair with my PC anymore and luckily I found an answer on this forum.
Fortunately, I anticipated that my app icons won't reappear at their previous positions despite the fact that I tried the phone back up and a PC companion backup, and had taken pictures of my home screens before the factory reset.
I appreciate that a testing or a service menu must be approached with caution, but even experienced technicians make mistakes from time to time. AFAIC, there should be no way (I'm sparing you the expletives here) to essentially render your phone useless with one touch of a button
2. Extract the rom file and identify the modem file namely NON-HLOS.bin (in the unlikely event of having a different filename, figure out what the .bin files contain using google search and copy and use the file that has the modem band information instead of the mentioned file)
@siddharth I just signed up to this Sony forum for only one reason. To thank you Your solution (the first one) worked even though my mobile make is different (Swipe Elite Plus).
Guys,
Follow Siddharth's guideline and you should be able to save yourself from ending up with a brick phone or having to explain to that mobile service person why we selected the USA band in the first place!
just make sure to do the following before you input those commands in the command window:
1) Make sure to install " Android ADB Interface" Driver for your mobile.
2) Make sure to install "Android Bootloader Interface" Driver (also called "Fastboot driver") for your mobile.
The "fastboot erase" commands will NOT work if you do not install the fastboot driver. In other words, if this driver is not present, the "fastboot erase modemst1/st2" commands will just keep waiting in an infinite loop. It will just say and will not proceed with deleting the modemst1 or modemst2 folders in our phone that were created when we stupidly selected the USA band
So make sure you do that. Below is a tutorial I stumbled upon, that would help you install the above 2 drivers. The tutorial is pretty long, overdrawn and the suggested software occupies a lot of space. But we can always uninstall these unwanted software (JDK and Android Studio) once we have executed the commands outlined by Siddharth and as soon our phones are back to normal.
Tutorial --> How to Set Up ADB and Fastboot with Android SDK on Windows 7 & Windows 8
-to-set-up-adb-fastboot-with-android-sdk/
Note: During the fastboot driver installation process (page 3 of the tutorial), if you are unable to get into your phone's "fastboot mode" even after pressing and holding down combinations of volume and power buttons, just make sure you have the "ADB interface driver" mentioned above all set and that the command prompt command "adb services" correctly returns your device number as described in that tutorial. Then, just key in the first command alone, which is:
adb reboot bootloader
This command sends instructions to your phone that puts it in "fastboot mode" or "bootloader mode", which is essential for:
1) Installing the fastboot driver
2) Executing the "fastboot erase modemst1/st2" commands in the command prompt window.
3a8082e126