Android System Recovery Utility V1.3.37
Partitions
This includes the Android user interface as well as all the system applications that come pre-installed on the device. Wiping this partition will remove Android from the device without rendering it unbootable, and you will still be able to put the phone into recovery or bootloader mode to install a new ROM.
Android devices include several partitions that serve different functions in theboot process. To support A/Bupdates, the device will need one slot per partition forboot, system, vendor, andradio.
- boot: The
bootpartition contains a kernelimage and a RAM disk combined viamkbootimg. In order to flash thekernel directly without flashing a new boot partition, a virtual partition canbe used:- kernel: The virtual
kernelpartitionoverwrites only the kernel (zImage, zImage-dtb, Image.gz-dtb) by writing the newimage over the old one. To do this, it determines the start location of theexisting kernel image in eMMC and copies to that location, keeping in mind thatthe new kernel image may be larger than the existing one. The bootloader caneither make space by moving any data following it or abandoning the operationwith an error. If the development kernel supplied is incompatible, you may needto update the dtb partition if present, or vendor or system partition withassociated kernel modules. - ramdisk: The virtual
ramdiskpartitionoverwrites only the RAM disk by writing the new image over the old one. To dothis, it determines the start location of the existingramdisk.imgin eMMC and copies to that location, keeping in mind that the new RAM disk maybebe larger than the existing one. The bootloader can either make space by movingany data following it or abandon the operation with an error.
- kernel: The virtual
- system: The
systempartition mainly containsthe Android framework. - recovery: The
recoverypartition stores therecovery image, booted during the OTA process. If the device supports A/B updates,recovery can be a RAM disk contained in the boot image rather than a separateimage. - cache: The
cachepartition stores temporarydata and is optional if a device uses A/B updates. The cache partition doesn'tneed to be writable from the bootloader, only erasable. The size depends on thedevice type and the availability of space on userdata. Currently 50MB-100MBshould be ok. - misc: The
miscpartition is used by recoveryand is 4KB or larger. - userdata: The
userdatapartition containsuser-installed applications and data, including customization data. - metadata: The
metadatapartition is used whendevice is encrypted and is 16MB or larger. - vendor: The
vendorpartition contains anybinary that is not distributable to the Android Open Source Project (AOSP). Ifthere is no proprietary information, this partition may be omitted. - radio: The
radiopartition contains the radioimage. This partition is only necessary for devices that include a radio thathave radio-specific software in a dedicated partition. - tos: The
tospartition stores the binary imageof the Trusty OS and is only used if the device includes Trusty.
Flow
Here is how the bootloader operates:
- The bootloader gets loaded first.
- The bootloader initializes memory.
- If A/Bupdates are used, determine the current slot to boot.
- Determine whether recovery mode should be booted instead as described in Supportingupdates.
- The bootloader loads the image, which contains the kernel and RAM disk (andin Treble even more).
- The bootloader starts loading the kernel into memory as a self-executablecompressed binary.
- The kernel decompresses itself and starts executing into memory.
- From there on, older devices load
initfrom the RAM disk andnewer devices load it from the/systempartition. - From
/system,initlaunches and starts mountingall the other partitions, such as/vendor,/oem, and/odm, and then starts executing code to start the device
Images
The bootloader relies upon these images.
Kernel images
Kernel images are created in a standard Linux format, such as zImage, Image, orImage.gz. Kernel images can be flashed independently, combined with RAM diskimages, and flashed to the boot partition or booted from memory. When creatingkernel images, concatenated device-tree binaries are recommended over using aseparate partition for the device tree. When using multiple Device Tree Blobs(DTBs) for different board revisions, concatenate multiple DTBs in descendingorder of board revision.
RAM disk images
RAM disks should contain a root file system suitable for mounting as a rootfs.RAM disk images are combined with kernel images using mkbootfs and then flashedinto the boot partition.
Boot images
Boot images should contain a kernel and RAM disk combined using an unmodifiedmkbootimg.
The mkbootimg implementation can be found at: system/core/mkbootimg
The bootloader reads the bootimg.hheader file generated by mkbootimg and updates the kernel header to contain thecorrect location and size of the RAM disk in flash, base address of the kernel,command line parameters, and more. The bootloader then appends the command linespecified in the boot image to the end of the bootloader-generated commandline.
File system images (system,userdata, recovery)
YAFFS2 image format
If using raw NAND storage, these images must be YAFFS2, generated by an unmodified mkyaffs2image, as found in the Android Open Source Project (AOSP) at external/yaffs2/yaffs2/utils. They have the format:
The bootloader is responsible for consuming these images and relocating theyaffs extra data into the appropriate location in the out-of-band area for thegiven nand hardware. If software ECC is required, the bootloader should alsodo that computation at this time.
Sparse image format
The sparse image format should be supported. It is described in the document'ext4 compressed images' and in system/core/libsparse/sparse_format.h;it is implemented in: system/core/libsparse/sparse_read.cpp
If using a block-based storage device, ext4 or f2fs should be supported. Toquickly transfer and flash large, empty ext4 file systems (userdata), store theimage in a sparse format that contains information about which areas of the filesystem can be left unwritten. The file format is written by themke2fs utility that is also used to create the images the fileformat is read and flashed by the bootloader. See the sections below forattributes:
File format
- All fields are unsigned little-endian
- The file contains a file header, followed by a series of chunks
- The file header, chunk header, and chunk data are all multiples of 4 byteslong
Header
- 32-bit magic: 0xed26ff3a
- 16-bit major version (0x1) - reject images with higher major versions
- 16-bit minor version (0x0) - allow images with higher minor versions
- 16-bit file header size in bytes (28 in v1.0)
- 16-bit chunk header size in bytes (12 in v1.0)
- 32-bit block size in bytes, must be multiple of 4
- 32-bit total blocks in output file
- 32-bit total chunks in input file
32-bit CRC32 checksum of original data, counting 'don't care' as 0 Standard802.3 polynomial, use a public domain table implementation
Chunk
- 16-bit chunk type:
- 0xCAC1 raw
- 0xCAC2 fill
- 0xCAC3 don't care
- 16 bits reserved (write as 0, ignore on read)
- 32-bit chunk size in blocks in output image
- 32-bit total size in bytes of chunk input file including chunk header anddata
Data
- for raw, raw data, size in blocks * block size in bytes
- for fill, 4 bytes of fill data
Implementing the writer
The mke2fs utility already knows what areas of the image needto be written, and will encode 'don't care' chunks between them. Another tool,img2simg, will convert regular (non-sparse) images to sparseimages. Regular images have no information about 'don't care' areas; the best aconversion can do is look for blocks of repeated data to reduce the resultingimage size.
Implementing the reader
Readers should reject images with unknown major versions and should accept imageswith unknown minor versions. Readers may reject images with chunk sizes they donot support.
Once the major version is validated, the reader should ignore chunks with unknowntype fields. It should skip over the chunk in the file using the 'chunk size infile' and skip 'chunk size in blocks' blocks on the output.
Invalid inconsistent license key solidworks software. A Cyclic Redundancy Check - 802.3 CRC32 - should be calculated for the data thatwill be written to disk. Any area that is not written (don't care, or a skippedchunk), should be counted as 0s in the CRC. The total number of blocks writtenor skipped should be compared against the 'total blocks' field in the header.The tool simg2img will convert the sparse image format to astandard image, which will lose the sparse information.
If your android phone or tablet is getting stuck in the Android system recovery <3e> screen and it refuses to power on properly, then you have came to the right place. This post describes why this happen, how to fix android system recovery 3e and the best way to restore lost data.
About Android System Recovery
Android system recovery is a feature on android devices that allows you reboot system, apply update from ADB, apply update from external storage, wipe data/factory reset, wipe cache partition and apply update from cache. Commonly, you can boot into the Android system recovery screen by powering off your device, then simultaneously press and hold specific key combination (Volume Up key, Home key, and the Power key) on your android device.
Stuck in Android System Recovery? How to Fix?
Sometimes, the android device stuck on Android system recovery screen and it just doesn’t work for unknown reasons. One of the most common causes is that one (or more) of the buttons used to access android system recovery is defective, is being pressed down, or is malfunctioning. To get out of android system recovery, the first thing you should do is checking if the physical buttons are responding properly, especially the volume buttons.
– Press down on your keys a few times and loosen them up if they are stuck or press in, so that the keys will be in a proper position.
– Try to power the device on once you have pressed down on the keys for a bit. See if it will boot-up.
– Power the device off and then back on to make sure its booting up properly now.
– If you failed in above steps, try to remove the battery, wait a couple of minutes, then put the battery back in to see if it will work.
Note: Once your device is able to power on, immediately back up your data, just in case unnecessary data loss.
Still not Working?
If the device stuck at system recovery randomly for no particular reason, it is more likely to be a hardware issue. Double check for physical and liquid damage as well. Besides, to rule out the slight possibility of this issue being software related you can consider tapping the “wipe data/factory reset” option on the recovery screen to reset your device. But you should note that all existing user data from your android device will be removed. If all options mentioned above can do nothing with it, then you will most likely need to look into your repair or replacement.
Data Lost During the Process?
It is risky to directly “wipe data/factory reset” your android device without any available backups. If by any chance that you lost any important data during the process of getting out of android system recovery, Jihosoft Android data recovery program can help you. With it, files including contacts, messages, call logs, videos, musics, documents and more on your Android device can be retrieved in a few clicks.
If you still don’t know how to get out of android system recovery and recover data after factory reset, feel free to contact us through email support@jihosoft.com. We are always here to help.