zefieOS EFI Recovery System (Ares8) (Baytrail) - Miscellaneous Android Development

This is a developer level tool, aimed at advanced users
(see next post for releases)
My Ares8 allows you to boot from EFI by holding Home while powering on. This is good because fastboot blocks flashing the partition table and some partitions.
So I have created this mini OS (zefieOS) using Buildroot and a custom kernel I have been hacking together for the Ares8.
This system allows you to completely wipe and repartition your eMMC, restoring partition table and factory image.
A system like this will allow you to take greater risks with your tablet, especially useful for development.
If you wipe your eMMC to install Windows or Linux, you can easily restore to Android (if you have an Ares8, or use the upcoming backup feature).
It should be easy for developers to port to other boards by swapping out the kernel.
Buildroot custom files and configs are available on my GitHub. (may be needed for porting due to keymap overrides to navigate menus)
You can also check the "Projects" section on the GitHub to see what I am planning.
Video:
(QEMU Demo, but tested on my Ares8)
Features:
Restore compressed disk images (xz, bz2, gz)
Restore raw disk images
Restore TWRP raw eMMC images
Restore TWRP ext4 partititons, compressed and/or split
Secure Erase (Discard) entire eMMC and repartition
Copy log to USB
Entire OS is run from RAM Disk.
Shell access (keyboard required)
Dialog GUI navigable from device with keymap overrides
Restore without touching partition table
Multiple backup support
Source code available, easy to rebuild
Future:
To keep up on future plans, check out the "Projects" section on the GitHub
Disclaimer:
I have tested this on, and have successfully restored my Ares8 Gen2 (manufactured August 2016). However while this tool is being released on the assumption that it will work on all Ares8 devices, I will not be held responsible for any damage caused by this tool. This tool, in its current developer alpha state, is not meant to replace TWRP. It is meant to restore your tablet if it is otherwise useless to you, such as being in DnX mode (which means your ESP partition is corrupt or missing). Running this tool needlessly may cause damage, and this is solely your responsibility.

Releases can be found here:
https://archive.midnightchannel.net/zefie/linux/intel_baytrail_soc/zefieOS/
I am linking to a folder because I have decided to release zefieOS and the restore packs separately for easy updating.
To use, download the latest uploaded version of zefieOS, then download the Ares8 Gen2 restore pack.
More information can be found on the top of the page linked.
For now, I would not recommend this unless your tablet is in need of a FULL recovery (aka you are getting the DnX mode error), or if you are a developer interested in porting this to your device.
Developers should know the modular design of zefieOS is intended for easy porting to another device. This means you will not have to update your files 99% of the time when I release updates.
Eventually this will be a more user-friendly tool, but I wanted to release this functioning alpha release for those who may need to recover their Ares8 tablets.
I have successfully restored my Ares8 from DnX mode to a full working system using this tool.
I will continue to work on and improve zefieOS in my spare time.
Developers looking to port this to their devices should respond in this thread and I will help as much as I can.
Eventually there will be both a user guide as well as a developer guide.

Related

If u want to start with android dev.

Read this :-
I don't take any credit I Googled everything. I do take credit of modifying some stuff in word. The idea came from here. I may have took some of his work. SO credit him and Pirateghost for the information about Android.
ADB → Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device..
Android →Unveiled on 5 November 2007, Android is a mobile operating system running on the Linux kernel developed by Google.
ASOP → Android Open Source Project
Apps2SD → Move applications from the internal NAND memory on the device to a removable SD Card.
Bloatware → Software bloat is a process whereby successive versions of apps include an increasing proportion of unnecessary features that are not used by end users, or generally use more system resources than necessary, while offering little or no benefit to its users. Like all the crap that comes from At&t
Brick → When used in reference to consumer electronics, "brick" describes a device that cannot function in any capacity (such as a device with damaged firmware). This usage derives from the fact that some electronic devices (and their detachable power supplies) are vaguely brick-shaped, and so those which do not function are useful only as actual bricks. The term can also be used as a verb. For example, "I bricked my phone when I tried to modify its firmware."[
Hard Brick → When your phone does not turn on at all. When you can’t get in to CWR/CWM Or Stock recovery. You are basically screwed.
Soft Brick → When your phone bootloops. When you can get into CWR/CWM. When You can use jigtag to get into download mode.
Busybox → BusyBox provides several stripped-down Unix tools in a single executable. It runs in a variety of POSIX environments such as Linux, Android, FreeBSD and others, such as proprietary kernels, although many of the tools it provides are designed to work with interfaces provided by the Linux kernel. It was specifically created for embedded operating systems with very limited resources. Platforms counterparts, but they are pretty close and useful nonetheless.
CWR OR CWM ClockworkMod Recovery →A custom recovery for Android phones and tablets that allows you to perform several advanced recovery, restoration, installation and maintenance operations on your Android device that aren’t possible with the stock recovery.
DEODEX → Apk files have respective odexes that devs use to supposedly save space. Deodexing means you convert it back to a .dex file and put it back inside the apk. This allows you to easily replace file (not having to worry about odexes), but the main point was to deodex services.jar so that you can change all text to different colors (such as the clock color to white) and to deodex services.jar, you need to deodex everything.
Flashing → The process of applying a firmware image (or ROM) to a device. It generally entails a very specific order of steps. Failing to complete any one of these steps properly may result in bricking the device.
Firmware → is a term often used to denote the fixed, usually rather small, programs and/or data structures that internally control various electronic devices. Programs stored in the ROM, EPROM, or flash memory that usually control various internal electronic devices (Hard Drives, Keyboards, Displays, etc). Firmware is typically 'fixed' software that is not updated in consumer devices, however it is often updated (or 'flashed') by advanced users to fix bugs or add features to the device. Flashing firmware designed for one device onto a different device, or not following a specific procedure while flashing will often render the device unusable.
Kernel → is the main component of most computer operating systems; it is a bridge between applications and the actual data processing done at the hardware level. The kernel's responsibilities include managing the system's resources (the communication between hardware and software components
Radio → The cellular radio on the device which needs control software called firmware to control it.
ROM → Read Only Memory. In the context of an Android device, ROM is the internal flash memory where the core operating system resides. It can also refer to a specific version firmware that can be applied to a device through a process usually referred to as flashing. An improperly flashed ROM can often brick the device, rendering it unusable.
Superuser→ A program, which gives unlimited access privileges to perform any or all operations on the operating system.
ODIN → Odin is the Samsung software used to update Samsung phones. It does not work with any other devices other than official Samsung phones.
OTA or FOTA → (F)OTA stands for (Firmware) Over The Air and is the process by which required updates and enhancements to your phone's basic operating system can be sent to you through the cellular network. The Galaxy S II software update will be sent via FOTA and is available through Samsung Kies mini.0
ODEX → In Android file system, applications come in packages with the extension .apk. These application packages, or APKs contain certain .odex files whose supposed function is to save space. These ‘odex’ files are actually collections of parts of an application that are optimized before booting. Doing so speeds up the boot process, as it preloads part of an application. On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution.
SDK → Software Development Kit.
Logcat → A debugging tool built into Android devices that displays system logs as they occur. See Logcat.
NANDroid → A set of tools that will enable anyone who has root on their Android device to make FULL system backups, in case something goes wrong or you want to try out that new experimental ROM/theme. NANDroid will backup (and restore) /system, /data, /cache, and /boot partitions.
Recovery Mode → A special environment that you can boot into for troubleshooting and upgrading purposes.
Kang → The process of creating a code based of someone else's code or reapplying code that someone else created into your own code (e.g. git cherry-pick)
Rooting → is a process that allows users of mobile phones and other devices running the Android operating system to attain privileged control (known as "root access") within Android's Linux subsystem with the goal of overcoming limitations that carriers and manufacturers put on some devices.

[WIP]What you need to know before rooting&installing custom roms

HI EVERYBODY,I WILL DISCUSS HERE ABOUT DEELOPMENT OF OUR DEVICE A110Q.WE ALL KNOW THAT OUR DEVICE HAS AWESOME HARDWARE SPECIFICATION,I AM MENTIONING SOME IMPORTANT ONES -​
Chipset - Mediatek MT6589
CPU - Quad-core 1.2 GHz Cortex-A7
GPU - PowerVR SGX544
RAM - 1GB
SCREEN - 480 x 854 pixels, 5.0 inches (~196 ppi pixel density)
CAMERA - 8MP REAR,2MP FRONT
CURRENT ANDROID VERSION - ANDROID 4.2.1
PLEASE DO NOT POST QUESTIONS IN THIS THREAS AS THIS POST IS WIP. PLEASE DO NOT POST COMMENTS IN THIS THREAD.IF YOU WANT TO MAKE A THREAD CONTRIBUTION ,POST LINKS TO INFORMATION OR INFORMATIVE POST PLEASE.​
IF U FINDING DIFFICULTIES IN UNDERSTANDING SOME TERMS THEN SEE AT BOTTOM OF POST FOR ABBREVIATIONS LIST.
FIRST STEP IN DEVELOPMENT OF DEVICE IS "ROOTING".IT MEANS GRANTING ROOT ACESS PERMISSIONS TO CERTAIN APPS
AND MODIFY PROTECTED STORAGE.
CONSEQUENCES - AFTER ROOTING YOUR DEVICE,YOUR WARRANTY WILL BE VOID.THERE ARE SOME WAY TO RETURN BACK TO
WARRANTY.
FOR ROOTING & UNROOTING A110Q-
http://forum.xda-developers.com/mic...l/micromax-a110q-canvas-plus-rooting-t2323893
SECOND STEP COMES IS INSTALLING CLOCKWORKMODE RECOVERY.THIS MEANS REPLACING CURRENT STOCK RECOVEY AND
MODIFYING IT BY INSTALLING CUSTOM ONE.THIS STEP CAN BE DONE AFTER ROOTING DEVICE OR VIA SP FLASH TOOL BUT WE HAVE CURRENTLY GUIDE FOR VIA ROOT AND SOME APPS ONLY.WE HAVE TWO RECOVEY-ClockWorkMod v5.5.0.4 Recovery & Philz Touch Recovery
HERE IS GUIDE FOR INSTALLING CUSTOM RECOVERY--
ClockWorkMod v6.0.0.4 Recovery-Stable & suggested
ClockWorkMod v6.0.4.8 Recovery-Having Backup Bug.
ClockWorkMod v5.5.0.4 Recovery-Stable
Philz Touch Recovery-Lots Of Bugs
THE NEXT THING IS INSTALLING CUSTOM ROMS.THIS MEANS REPLACING YOUR CURRENT ANDROID PROVIDED BY COMPANY BY A CUSTOM ONE DEVELOPED BY OUR DEVELOPERS OR PORTED FROM OTHER DEVICES.
BEFORE INSTALLING ANY CUSTOM ROMS,YOU ARE ADVISED TO TAKE NANDROID BACKUP YOUR CURRENT ROM.IT MEANS TAKING BACKUP OF FULL ROM INCLUDING APP,DATA,CONTACTS,CALL LOGS EVERYTHING.THIS WILL HELP WHEN YOU MESSED UP.
HERE IS LINK-
http://forum.xda-developers.com/micromax-canvas-2/help/how-to-nandroid-backup-t2645983
TO INSTALL CUSTOM ROMS YOU WILL HAVE TO FOLLOW THIS GUIDE-
http://forum.xda-developers.com/micromax-canvas-2/help/how-to-install-custom-roms-t2645977
IF YOU HAVE INSTALLED CUSTOM ROMS AND NEED TO GO TO SERVICE CENTER THEN YOU CAN EASILY FLASH STOCK ROM FROM
HERE(SP FLASH TOOL,THIS METHOD WILL DELEAT EVERYTHING AND BRING YOUR PHONE TO NEW STATE)--
http://forum.xda-developers.com/mic...ide-how-to-unbrick-micromax-canvas-2-t2492344
THIS IS SAME AS UNBRICKING.
OR THIS (THIS IS STOCK ROM FLASHABLE VIA CWM RECOVERY,IF YOU USED THIS METHOD AND YOU NEED TO VISIT SERVICE CENTER UNDER WARRENTY THEN YOU MUST UNROOT YOU DEVICE ALSO AS IT WILL NOT UNROOT)--
http://d-h.st/mZO (BY TEAM DARKDROID.)
DOWNLOAD THIS ZIP AND PLACE INTO SD AND FLASH AS OTHER CUSTOM ROMS.
IF YOUR DEVICE IS SOFT BRICKED THEN USE THIS LINK TO UNBRICK-
http://forum.xda-developers.com/mic...ide-how-to-unbrick-micromax-canvas-2-t2492344
NOW HERE IS A OPTIONAL AND SUGGESTED THING TO DO,IF YOU DO THIS YOU CAN ENJOY BETTER CUSTOM ROMS:-SYSTEM PARTITION INCREASE GUIDE FOR INCREASING SYSTEM PARTITION SO THAT LARGE SIZE BETTER ROM CAN BE INSTALLED.Earlier we were using too old method to increase partition and that was dangerous too as it Corrupts the IMEI
of device but fortunatly i developed a way to increase system partition by CWM without losing IMEI and anything.So no worry now.Go HERE
HERE IS LINK FOR INCREASING SYSTEM PARTITION By SP TOOLS BUT IT WILL CORRUPT YOUR IMEI SO USE ONLY CWM ONE:-
http://forum.xda-developers.com/micromax-canvas-2/general/increase-partition-a110q-canvas-2-t2568182
HERE IS LINK FOR PERMANENT IMEI RECOVERY SOLUTION IF YOU ARE TOO LATE-
http://forum.xda-developers.com/micromax-canvas-2/help/permanent-imei-solution-t2662403
YOU CAN TWEAK YOUR PHONE BY VARIOUS METHODS TO INCREASE PERFORMANCE,STABILITY.FOR TWEAKING YOUR ANDROID HERE SOME GUIDES--
INCREASE RAM BY SWAP MEMORY-
http://forum.xda-developers.com/mic.../mod-increase-extra-ram-canvas-a110q-t2589488
INCREASE APP STORAGE OF DEVICE-
http://forum.xda-developers.com/showthread.php?p=49081376
IF YOU FORGOTTEN YOU LOCK PIN OR SOFT BRICKED YOUR DEVICE THEN USE MY MMX A-I-O TOOL TO MAKE YOUR LIFE EASY:-HERE
ALL ROMS & MODS FOR A110Q​
IF YOU ARE A NOOB AND DO NOT KNOW ANYTHING ABOUT THESE,POST YOUR QUERIES ON THIS LINK-
http://forum.xda-developers.com/micromax-canvas-2/help/noob-freindly-post-t2645972
COMMON ABBREVIATIONS.BY@Deadly
XDA RELATED ACRONYMS
DEV: Developer
ERD: Elite Recognized Developer
FM/FSM: Forum Moderator/Forum Specific Moderator
RC: Recognized Contributor
RD: Recognized Developer
RT: Recognized Themer
SM: Senior Moderator
GENERAL
AFAIK: As Far As I Know
ATM - At the moment
BTDT - Been there done that
CRACK: The password / product key / license key illegally used for unauthorized usage are known as a crack of the software . Also please read the warning posted at warez meaning below. The same applies to cracks
ETA - Estimated time of arrival.. Note: Asking ETA in dev section is a big NO NO..!!
FTFY: Fixed that for you
FTW - For the win
FWIW: For what it's worth
FYI: For Your Information
IBTL/IB4L - In before the lock / In Before Lock
IDK: I Dont Know (Thats what it means and i am not saying i dont know about IDK!!)
IIRC - If I recall / remember correctly
IRC - Internet Relay Chat
LOL - Laugh out loud
NEWBIE: Someone who is new to this field/ forum and wants to learn how to do it rather than say "NOT WORKING! FIX IT!".
NOOB: Someone who is new and doesn't want to learn "HOW" its done, just want to "USE" the end product. So, please guys dont be a noob, be a newbie!
OP: Short for Original Poster, or the person who originally started the thread.
OT - Off Topic
PM: Short for Private Message. Allows users of XDA to send and receive non-public messages. Accessed from USER CP.
P.S: stands for Post Script. It is used when u wrote a message on a postcard and u forgot to mention an important information.*
ROFL - Roll on floor laughing
RTL: Right To Left support (In Some languages you have to start reading from right and end towards left side.. as against to usual method of reading from left to right)
SMH: Shake my head
STH: Something
TBH: To Be Honest
TIA: Thanks In Advance
THREAD: An individual issue page on the forum. This thing you're reading is a thread.
TLDR: Too long to read
TM: stands for Trademark.
USER CP: Short for User Control Panel. This button near the top of the XDA page allows users to update their avatar, personal information, and signature. PMs and subscribed threads can also be checked in this location.
WARES/WAREZ: Warez refers primarily to copyrighted works distributed without fees or royalties, and may be traded, in general violation of copyright law. To make it simple, it is any app/software which has to be paid to use them, but are used without paying any money.. PLEASE NOTE: THIS IS NOT TOLERATED AT XDA. SO PLEASE DONT POST WARES ANYWHERE ON XDA FORUMS. YOU WILL GET BANS/INFRACTIONS IF YOU DO SO!
ANDROID DEVICE RELATED:
ADB: Android Debug Bridge, a utility to run on a PC to allow connection to and control of an Android device. Part of the Android Software Development Kit (SDK), it allows for ROOT-level access to the Android device from a computer.
AOSP: Short for Android Open Source Project. The open-sourced code from which individuals can build new distributions of Android.
APK: An Android executable file, similar to the .exe file in Windows. Most programs will install with a .apk file.
Apps2SD:A method of storing applications and cache on the device's microSD card.
Bloatware: Software or 'apps' that you don't need, but come preinstalled to a device's /system partition, meaning that you cannot remove them unless the device has been rooted
Boot Animation: Boot animation is a term for a graphical representation of the boot process of the operating system. After you switch on / reboot phone you see this.
BOOTLOADER: There are two of these; the primary and secondary bootloaders. These programs tell the Android device how to start up, and are critical to its functionality.
Bootloop: When your system recycles over and over without entering the main OS.
BRICK/(HARD BRICK): An Android device that is completely non-responsive, i.e. nothing lights up, the screen does nothing, no combination of button presses cause any reaction. Can only be restored by JTAG or warranty service.
BUILD.PROP: A plain text file which contains environmental variables for the system to use during operation. Can be hacked to fake a different model for increased functionality, among many other operations. It is also used to make tweaks to boost speed/performance, etc.
BUSYBOX: An application that contains many standard Unix tools.
BUTTON COMBO/THREE BUTTON COMBO: The act of pressing several buttons at the same time to produce a desired result (e.g. press and hold volume up+home button+power button for 10 seconds will reboot into the RECOVERY menu at any movement when phone is on or Press and hold volume down+power button+home button to get into ODIN mode/DOWNLOAD mode).
Cache:A component that transparently stores data so that future requests for that data can be served faster.
CM: Short for CyanogenMod. CyanogenMod is an Android build built from the Android Open Source Project, and its builds are usable on multiple different Android Devices.
CPU: It stands for Central Processing Unit and handles all the complex mathematical formulas necessary to do everyday things like surfing the Internet.
CSC - File with Carrier Customizations
Custom bin counter: A line of code in several Samsung Galaxy devices' bootloaders that counts the number of times a user uses ODIN to flash ROMS/KERNELS to the device. Commonly used to detect software modification. This is called custom bin down in ODIN mode and it should be 0 to claim warranty. Can be reset with GALAXY TOOLBOX APP by Doky73
Custom: Independent developers who like to customize their devices beyond the standard options provided often tend to release the fruits of their labor for the rest to enjoy, in form of custom ROMs.
CWM: Short for ClockWorkMod Recovery Menu. This is a program that allows you to install custom ROMS/KERNELS as well as do many other customizations. Often referred to as the "RECOVERY MENU"/"CWM"
DALVIK CACHE: The collection of program information stored for use by the DALVIK program. This can be cleared from the RECOVERY menu to resolve issues with the Android OS.
DALVIK: The Android operating system's memory management tool. This program handles which other programs are running and assigns memory to them
DEODEXED: Removing the .odex files from an APK file. The .odex files contain a list of dependencies for the associated file, and if something changes, the .odex (and similarly, the associated file) not longer function correctly.
DMESG: dmesg (for "display message") is a command on some Unix-like operating systems that prints the message buffer of the kernel..
DOWNLOAD MODE: Read Button combo to know about this.
EFS: The directory /efs on the Android device's internal storage. Contains files with the Android device's IMEI, wireless devices MAC addresses, product code, and other information..
EMMC: Short for Embedded MultiMediaCard. A chip architecture consisting of an embedded storage solution with MMC interface, flash memory and controller, all in a small ball grid array package.
EXT4: A journaling file system (e.g. NTFS, FAT32 are file systems) often used by Linux distributions. Can be used with Android.
EXTERNAL SD: A micro SD card that has been inserted in the micro SD slot in the Android device. Can be removed.
FACTORY RESET: This will remove all user customizations in the Android OS, returning it to a factory state. Note: This will not wipe the Internal SD card. It will just make it as a phone just bought from the store state.
FC/FORCE CLOSE: When a program on the Android device becomes unstable/gets an error, the DALVIK program will force it to terminate to prevent further system instability which appears as a Force Close message usually in phone.
FLASHING: The act of writing code to the Android device. ROMs, MODEMs, KERNELs, and BOOTLOADERs can all be flashed. Independent from, and having nothing to do with, Adobe's Flash product.
FREEZE: Specific to LINK2SD/TITANIUM BACKUP. Using these 2 apps, the user changes a program into a non-functional, but still installed, state. Useful for identifying problem and FCs.
gapps - Google Applications, like GMail, Calendar, Maps, G+, etc
GB - Gingerbread, AKA Android OS 2.3.X
GOVERNOR: A program that interacts with the device hardware to increase or decrease the processor's clock speed (e.g. at low usage, it will set the processor speed to 400 MHz, but as usage increases, it would scale up to 1000 MHz).
HSUPA/HSDPA: Short for High Speed (Up/Down) Packet Access. This is 3G+, and is the Android device's internet speed level between 3G and 4G.
ICS: Short for Ice Cream Sandwich, the Android OS version 4.0.x.
IMEI: Short for International Mobile Equipment Identity. A unique number to identify GSM, WCDMA, and iDEN phones. Used by GSM networks to identify valid devices.
INTERNAL SD: The internal storage memory of the Android device. Not a physical SD card that can be removed.
JB: Short for Jelly Bean, the Android OS version 4.1.x.
JIG: A piece of hardware that makes a physical connection between pins of the USB slot to force the Android device into DOWNLOAD mode.
JTAG: A process of connecting directly to the main board of the Android device to rewrite corrupted BOOTLOADERS.
KERNEL: The kernel is a program that constitutes the central core of a computer operating system. It has complete control over everything that occurs in the system.
LAST_KMESG: last_kmsg is a dump of the printk statements from the kernel before the operating system itself crashed.
LAUNCHER: A program that launches programs in Android. Examples are Touchwiz (Samsung), HOLO Launcher, Launcher Pro, ADW Launcher, and Go Launcher EX.
LCD Density: Pixel density is a measurement of the resolution of devices in various contexts; typically computer displays, image scanners, and digital camera image sensors.
LOGCAT: A command to view messages in one of the system logs. See Android logger.
LTE: Stands for Long Term Evolution. It is based on the GSM/EDGE and UMTS/HSPA network technologies, increasing the capacity and speed using a different radio interface together with core network improvements.
MAI77 method: Its only known here. So dont say this out of SGY forum. This is a method to flash kernel through CWM using Kernel flasher tool made by MAI77. Its basically you have kernel flasher tool and boot.img file in SDCARD root and you select kernel flasher tool in CWM and it will install boot.img file which is the kernel you selected.
MD5 CHECKSUM: A 32-digit (128-bit) hash number generated by a cryptographic program to ensure that a downloaded file matches the original file. The original file is run through the MD5 generator program, which creates the 32-bit number. This number is checked against the md5 number created with the file the end user receives to ensure file integrity.
MIUI: A Chinese built-from-source ROM. Short for "Mobile Internet User Interface". Also can refer to the MIUI music player, which has been included in other ROMs.
Mod: The act of modifying a piece of hardware or software or anything else for that matter, to perform a function not originally conceived or intended by the designer.
MODEM: The software that interfaces with the phone's radio hardware to connect to cell phone towers.
NANDROID BACKUP: A complete system image backup of the Android device except for the MODEM and KERNEL. Can be accessed from CWM.
ODEX: A file that is associated with an APK file, containing a list of the dependencies for the program. See also DEODEXED.
ODIN: A Samsung proprietary program that allows the Android device to be flashed back to stock or with custom software.
OVERCLOCKING/OC: Setting the processor's clock speed to run faster than its default setting, i.e. 1248 MHz (1.2 GHz) vs 832 MHz (Default)
OTA - Over-the-Air (usually used as "OTA update" for firmware updates that can be installed directly via 3G/4G/Wi-Fi without the need of an PC)
PIT FILE: Short for Partition Information Table file. One of the possible file types used while flashing with ODIN or HEIMDALL.
Port: To Take a rom or app from one phone and program it to work on a different one.
Ram: (Random Access Memory) A group of memory chips, typically of the dynamic RAM (DRAM) type, which function as the computer's primary workspace.
RECOVERY: The menu that allows a user to do many low-level operations on the Android Device. This menu can either be the stock Samsung menu, or the CLOCKWORKMOD RECOVERY MENU (CWM). See also CWM.
RFS: A Samsung-proprietary file system (e.g. NTFS, FAT32 are file systems) used on some Android devices. Stands for Robust File System.
RIL - Radio Interface Layer
ROM: The collection of programs, themes, and settings that create the general look-and-feel of your Android device. This is what most users will initially be wanting to change. Or custom ROM firmware file, Can also refer to a Read-only memory.
ROOT: Changing the permission level of the Android system to its most powerful level, the root user, allowing full access to the file system. More like Administrator permission in Windows OS.
SGY /SGYD /SGYP /SGYPD : Samsung Galaxy Y / Samsung Galaxy Y Duos / Samsung Galaxy Y Pro/ Samsung Galaxy Y Pro Duos
Sideloading: It means installing applications without using the official Android Market.
SOFT BRICK: A device that is not functioning correctly, but still shows some signs of operation. See also BRICK.
STOCK: The Android software version that comes installed on new devices, prior to sale to the user. Can also be used to refer to the Android software issued from Samsung or the carrier.
Superuser/SU: On many computer operating systems, the superuser is a special user account used for system administration. Depending on the operating system, the actual name of this account might be: root, administrator or supervisor.
TETHER: Connecting the Android device to a computer via a wired or wireless connection to allow the transfer of data through the Android device's internet connection. Commonly used to provide internet access to a laptop or desktop computer when other methods are not desired or available.
THEME: A collection of images, backgrounds, colors, font types, and other visual items to change the Android device's look and feel. Separate from LAUNCHER, and is usually FLASHed in CWM.
TWRP2 - an alternate recovery mode for your phone
UNDERVOLTING/UV: Setting the voltage levels drawn by the Android device to a lower level to reduce overall battery usage.
Updater Script: When Android devices install updates via CWM/recovery mode they have to perform a wide range of functions on files and permissions. The scripting language is called Edify and is defined primarily in the bootable/recovery/{edify,edifyscripting,updater} directories of the Android source-code tree.
WCDMA: Short for Wideband Code Division Multiple Access. An air interface standard in 3G mobile communications networks that allows higher speeds and more users.
ZIPALIGNED: An archive alignment tool that provides important optimization to APK files. The purpose is to ensure that all uncompressed data starts with a particular alignment relative to the start of the file. Reduces RAM consumption.
ALL THE LINKS,MATERIALS OR THREAD I AM REFERRING IN THIS POST OWN THE CREDIT AND THEIR OP.
I AM ONLY HELPING YOU TO UNDERSTAND AND FIND ALL THINGS EASILY.
NO RIGHTS RESERVED BY ME.
All Available Roms
ROMS-​
Stock Romwith flashing unbricking guide.
Stock Rom V3 SP tool (use same V1 method for flashing)
Pre-Rooted Stock Rom
Lewo Rom
MIUI RoM
SGalaxy V1 V2
Baidu Rom
Xperia-Fusion FINAL
Color Os
Xtrme rom
Lewa os 5
Kitkat Themed ROM
BEAST STOCK ROM
MiVo ROM
Note3 Rom
Project Doge Rom
X'Os
CyanogenMod 10.2
Pure Xperia Rom
CyanogenMod 11
MODS
MODS-​
INCREASE EXTRA RAM
SYSTEM PARTITION INCREASE
INCREASE APP STORAGE OF DEVICE
Flashable Fonts Via CWM
Helpful Videos
Micromax Canvas 2 plus IMEI Permanent Fixing Solution
How to Increase System Partition Of Micromax Canvas 2 plus.
Rooting + Installing CWM in Micromax Canvas 2 plus.
How to revert to the Stock Rom from increased system partition
reServed
You might wanna check this guide out http://forum.xda-developers.com/micr...k-rom-t2714611
Nyc post helpful
Sent from my A110Q using XDA Premium 4 mobile app
---------- Post added at 05:18 PM ---------- Previous post was at 04:54 PM ----------
Yes
Sent from my A110Q using XDA Premium 4 mobile app
your r awesome bro...
Where is the link of stock recovery?
Sent from my Micromax A110Q using XDA Premium 4 mobile app
Paras1259 said:
Where is the link of stock recovery?
Sent from my Micromax A110Q using XDA Premium 4 mobile app
Click to expand...
Click to collapse
You dont need the link :| you can just disable custom recovery
Front camera
A small mistake in the specifications, our phones has a 2mp front camera not 5 other than that it's a very useful thread good job
Very Useful posts
@digyvijaykumar123 : Can you please help me on this threadhttp://forum.xda-developers.com/micromax-canvas-2/help/camera-proximity-sensors-micromax-a110q-t2962167. All i need is to disable only the Proximity Sensor so that the screen wont go black whenever i try to make a call
sandeep37 said:
Very Useful posts
Click to expand...
Click to collapse
[email protected]� said:
A small mistake in the specifications, our phones has a 2mp front camera not 5 other than that it's a very useful thread good job
Click to expand...
Click to collapse
Thanks for pointing,corrected now.
How can I increase my phone memory

Question Many questions from a total Android newbie

Hi,
Although I passed my 40 I just bought my first smartphone a few week ago. It’s a Doogee S96Pro. As somebody who like to understand how it works, I already learn a few thing on the Android ecosystem.
I’ve been able to activate the developer mode and to use adb to uninstall some apps. I also managed to boot in fastboot mode to unlock the phone.
My first attempt at flashing was a fail, the phone was rebooting in a loop, indicating "Red state". I guess I should have never "fastboot flash boot/recovery foo.img" if "fastboot boot foo.img" didn’t work? What’s your opinion on this?
The Doogee support sent me a link to the files for my phone. In fact someone on this forum has had already posted it. The two archives are named :
S9S88A7.DGE.DOOGEE.EEA.HB.HJ.AYYDVFAZ.1130.V3.02.zip
S9S88A7.DGE.DOOGEE.HB.HJ.AYYDVFAZ.1203.V3.04.zip
To make the phone boot again I flashed the boot partition with the boot.img file I found in the second archive. If I understood what I read, the file with "EEA" in it’s name is the "European version" while the other one is the "Global version".
Although I flashed with the boot.img that was in S9S88A7.DGE.DOOGEE.HB.HJ.AYYDVFAZ.1203.V3.04.zip, if I go to the update info (About the phone > Update), I can see the string S9S88A7.DGE.DOOGEE.EEA.HB.HJ.AYYDVFAZ.0128.V3.03_20210128-1612. I don’t understand why this difference (v3.03 vs. v3.04).
Then I used the Magisk Manager to patch this boot.img file and flash it again. I now have root access on the phone which is nice.
Now the questions!
When booting the phone says: “Orange state, your phone’s unlocked”, then it boots normally. What’s the implication of this? I’m not sure but I think I tried to lock it again (fastboot flashing lock) but the message remains. Does it sound possible to you? I should check again this point…
In the Magisk Manager I also tried the "SafetyNet" check, which is refused. Is it OK? What does it imply? Why would I need to pass this SafetyNet test for?
I’m not sure I understood how the recovery thing works… I understand it’s another partition than "boot", and I know I can boot on it using the boot menu (pressing volume up when turning on the phone). What I don’t know is if it starts a recovering of the system automatically when booting on this partition (then erasing all data on the phone), or not.
Let’s say I flash the boot.img on the recovery partition (fastboot flash recovery boot.img). If I do a normal boot it should boot as usual, but if I boot on recovery it would boot on a virgin system. Am I right? Let says I configure nothing and reboot again, a normal boot this time. I then should get back to my usual, already configured system, as the "boot" partition hasn’t been modified. Is this also right?
Before doing anymore tests I would like to be able to backup an image with the phone already configured, with data and root access and applications. One (or maybe two or three?) file I can keep on my computer, and in case I break the boot on the phone, I could just fastboot flash boot my_custom_image.img to recover my phone configured. Oy maybe also flashing a "userdata" partition? Would I need some other partition? Is it more complicated than that?
It seems I have to identify the right partition(s) and carefully use dd to dump the partition to an image file… Before trying to do so I’d like to have some advice, hence this post!
Also. I read about a software called TWPR. Should I use it, and why ? I understand it’s a system aimed to be flashed on the recovery partition, is it right? What’s its use?
Finally I read about LineageOS which is the ultimate customization for the phone, it’s a “pure” Android, which is totally opensource (but it has to uses a lot of proprietary blob for devices AFAIK). I don’t think I’ll get there anyway. If I’m not mistaken it’s hard to do, especially with new phones nobody has ran LineageOS on, and there is something like no probability all the devices would work anyway.
Have a nice day.
there's no implication when you see "Orange state, your phone’s unlocked” unless you didn't the one who did it that means your device is tampered ..
also on SafetyNet is broad topic you can learn what it is here https://www.didgeridoohan.com/magisk/MagiskHideSafetyNet also
"Why would I need to pass this SafetyNet test for?" there are multiple reason such as you can't install banking apps,netflix, ...etc nor download them via playstore
moving on it is not recommend to backup userdata partition since it just contain all contains evidence of user activity. It contains call and SMS records, contacts, user-installed apps, app data, settings, and so-on-and-so-forth. In most newer phones, it also is likely to contain photos and videos and other user-generated files unless an external SD card is present. Also it would be impossible to restore userdata partition since android is encrypting it with unique key every time you set up your device https://source.android.com/security/encryption/full-disk
this prevent rooted application crawling on other application data such as paypal just stealing your login info and money
TWRP is like recovery mode but more feature packed (you can backup partition with it not available on stock recovery)
also experience is the best teacher you must experience failure to improve
ineedroot69 said:
Also it would be impossible to restore userdata partition since android is encrypting it with unique key every time you set up your device https://source.android.com/security/encryption/full-disk
this prevent rooted application crawling on other application data such as paypal just stealing your login info and money
Click to expand...
Click to collapse
With a simple ADB command you can decrypt Android partitions:
Code:
adb shell "recovery --set_encrypted_filesystem=on|off" <- enables / diasables encrypted fs
Hi,
Many thx for your answers.
also experience is the best teacher you must experience failure to improve
Click to expand...
Click to collapse
I can confirm that. I accidentally uninstalled the stock launcher with ADB. I’ve been able to install another launcher (I think I’ll keep on Nova Launcher). I tested a few (Launcher<3 and KISS Launcher), although they work fine none of them support switching between running apps. It’s a little bit annoying but I have another way to stop running apps (with App Manager). I guess the only way to get this functionality back is to flash again the boot partition with the Magisk patched image I already used, and to re-configure all the phone again (this is good to learn and luckily I don’t have important data in the phone yet).
Also it would be impossible to restore userdata partition since android is encrypting it with unique key every time you set up your device https://source.android.com/security/encryption/full-disk
Click to expand...
Click to collapse
Couldn’t be possible to dump both boot and userdata partitions and then flash them back both “at once”. The key for encrypting/decrypting the user data being contains in the boot (system ?) partition?
I realize Android has a bunch of security configuration you rarely find on a Linux server. Also the hardware is full of devices which require close-source firmware to operate. This is definitively not a good platform for hacking, like most PC are or a Rasberry Pi is . And I bet Windows and Apple phones are evermore closed…
About encrypting, I have a file called "googlekey/kb_0000000000.bin", which is the same in two archives the support sent me
$ md5sum S9S88A7.DGE.DOOGEE.*/googlekey/kb*
ead8a1d0f11e5f12bdda0f7a22935c2b S9S88A7.DGE.DOOGEE.EEA.HB.HJ.AYYDVFAZ.1130.V3.02/googlekey/kb_0000000000.bin
ead8a1d0f11e5f12bdda0f7a22935c2b S9S88A7.DGE.DOOGEE.HB.HJ.AYYDVFAZ.1203.V3.04/googlekey/kb_0000000000.bin
Click to expand...
Click to collapse
This file is not “per device” knowing every S96Pro users get the same archives. What’s its purpose?
I wonder the same for many files in this archive but I won’t bother you, I’ll make some search.
The one thing I’d like to understand is why the archive is labelled "1203.V3.04" and the system on my phone (after I flashed the boot partition with (a Magisk patched made from) the boot.img in this archive says : "0128.V3.03_20210128". Could it be related to the Magisk patching? (I didn’t check what I had with the stock boot.img). Or I have been downgraded by Google during install?
With a simple ADB command you can decrypt Android partitions:
Click to expand...
Click to collapse
Thx for this. What does it imply to do so? Will the Android system run with this unencrypted data partition? Is there a way to encrypt it again? (With ADB or directly in the phone?)
I’ve seen there are dozens of partitions on a running Android. So far this is what I understood (is this correct?) : There are three important partitions : boot, recovery and userdata. "boot" et "recovery" are the only ones the device can boot on (except booting from an image in fastboot mode using "fastboot boot boot.img"?). Are they some other important partitions this is important to be aware of?
Having a bootable "boot" and a bootable "recovery" partitions, it should be possible to install two different Android OS? I guess this is not possible and the "recovery" partition is dedicated to recovering (ie: reinstall the system) but I don’t understand how and why exactly. The encrypting thing maybe? The system must have a userdata partition and this one can’t be shared between to system…
I think I should buy an older Android smartphone to make all that kind of test, especially knowing I don’t have any other phone I can use for everyday use… Do you have some advice on brands and models which are more friendly with customization of the system?
Apart of ADB and fastboot, what are the other important tools to know about?
For Android development (I mean development of apps for Android), does everyone use an emulator? What’s the best option for such an emulator on Linux?
Have a nice day.
Marotte said:
For Android development (I mean development of apps for Android), does everyone use an emulator? What’s the best option for such an emulator on Linux?
Click to expand...
Click to collapse
My recommendation is GenyMotion for Linux. This emulator requires VirtualBox for Linux gets installed before.
Install GenyMotion
How To Install GenyMotion (Android Emulator) On Linux | 2DayGeek
2daygeek.com Linux Tips, Tricks & News today :- How to Install GenyMotion (Android Emulator) on Ubuntu, Debian, Linux Mint, openSUSE, Arch Linux, Fedora, CentOS, RHEL, Mageia, Manjaro
www.2daygeek.com
DL VirtualBox
Linux_Downloads – Oracle VM VirtualBox
www.virtualbox.org
Marotte said:
Having a bootable "boot" and a bootable "recovery" partitions, it should be possible to install two different Android OS? I guess this is not possible and the "recovery" partition is dedicated to recovering (ie: reinstall the system) but I don’t understand how and why exactly. The encrypting thing maybe?
Click to expand...
Click to collapse
Partitions /boot & /recovery explained:
/boot
This is the partition that enables the phone to boot, as the name suggests. It includes the kernel and the ramdisk. Without this partition, the device will simply not be able to boot.
/recovery
The recovery partition can be considered as an alternative boot partition that lets you boot the device into a recovery console for performing advanced recovery and maintenance operations on it.
That's what you can do from within the recovery console:
Reboot system now
Install ZIP from SD-card
Install ZIP from Sideload
Wipe data / factory reset
Wipe cache partition
Backup and restore
Hi,
Many thx for your answers.
also experience is the best teacher you must experience failure to improve
Click to expand...
Click to collapse
I can confirm that. I accidentally uninstalled the stock launcher with ADB. I’ve been able to install another launcher (I think I’ll keep on Nova Launcher). I tested a few (Launcher<3 and KISS Launcher), although they work fine none of them support switching between running apps. It’s a little bit annoying but I have another way to stop running apps (with App Manager). I guess the only way to get this functionality back is to flash again the boot partition with the Magisk patched image I already used, and to re-configure all the phone again (this is good to learn and luckily I don’t have important data in the phone yet).
Also it would be impossible to restore userdata partition since android is encrypting it with unique key every time you set up your device https://source.android.com/security/encryption/full-disk
Click to expand...
Click to collapse
Couldn’t be possible to dump both boot and userdata partitions and then flash them back both “at once”. The key for encrypting/decrypting the user data being contains in the boot (system ?) partition?
I realize Android has a bunch of security configuration you rarely find on a Linux server. Also the hardware is full of devices which require close-source firmware to operate. This is definitively not a good platform for hacking, like most PC are or a Rasberry Pi is . And I bet Windows and Apple phones are evermore closed…
About encrypting, I have a file called "googlekey/kb_0000000000.bin", which is the same in two archives the support sent me
$ md5sum S9S88A7.DGE.DOOGEE.*/googlekey/kb*
ead8a1d0f11e5f12bdda0f7a22935c2b S9S88A7.DGE.DOOGEE.EEA.HB.HJ.AYYDVFAZ.1130.V3.02/googlekey/kb_0000000000.bin
ead8a1d0f11e5f12bdda0f7a22935c2b S9S88A7.DGE.DOOGEE.HB.HJ.AYYDVFAZ.1203.V3.04/googlekey/kb_0000000000.bin
Click to expand...
Click to collapse
This file is not “per device” knowing every S96Pro users get the same archives. What’s its purpose?
I wonder the same for many files in this archive but I won’t bother you, I’ll make some search.
The one thing I’d like to understand is why the archive is labelled "1203.V3.04" and the system on my phone (after I flashed the boot partition with (a Magisk patched made from) the boot.img in this archive says : "0128.V3.03_20210128". Could it be related to the Magisk patching? (I didn’t check what I had with the stock boot.img). Or I have been downgraded by Google during install?
With a simple ADB command you can decrypt Android partitions:
Click to expand...
Click to collapse
Thx for this. What does it imply to do so? Will the Android system run with this unencrypted data partition? Is there a way to encrypt it again? (With ADB or directly in the phone?)
I’ve seen there are dozens of partitions on a running Android. So far this is what I understood (is this correct?) : There are three important partitions : boot, recovery and userdata. "boot" et "recovery" are the only ones the device can boot on (except booting from an image in fastboot mode using "fastboot boot boot.img"?). Are they some other important partitions this is important to be aware of?
Having a bootable "boot" and a bootable "recovery" partitions, it should be possible to install two different Android OS? I guess this is not possible and the "recovery" partition is dedicated to recovering (ie: reinstall the system) but I don’t understand how and why exactly. The encrypting thing maybe? The system must have a userdata partition and this one can’t be shared between to system…
I think I should buy an older Android smartphone to make all that kind of test, especially knowing I don’t have any other phone I can use for everyday use… Do you have some advice on brands and models which are more friendly with customization of the system?
Apart of ADB and fastboot, what are the other important tools to know about?
For Android development (I mean development of apps for Android), does everyone use an emulator? What’s the best option for such an emulator on Linux?
Have a nice day.
Have a nice day.
jwoegerbauer said:
My recommendation is GenyMotion for Linux. This emulator requires VirtualBox for Linux gets installed before.
Install GenyMotion
How To Install GenyMotion (Android Emulator) On Linux | 2DayGeek
2daygeek.com Linux Tips, Tricks & News today :- How to Install GenyMotion (Android Emulator) on Ubuntu, Debian, Linux Mint, openSUSE, Arch Linux, Fedora, CentOS, RHEL, Mageia, Manjaro
www.2daygeek.com
DL VirtualBox
Linux_Downloads – Oracle VM VirtualBox
www.virtualbox.org
Click to expand...
Click to collapse
I went for the official Android Studio from Google. I guess it’s the best for a complete newbie like me. I’ve been able to start a virtual phone with it.

[PX5][Android 10] Patched recovery

This is the Android 10 recovery image by HCT (version 10.3.1) patched to skip signature checking on .zip files
Tested on MTCE_LM (Eunavi). Use at your own risk
It can be flashed from a root shell (either adb or via terminal emulator) by performing the following steps
1. upload recovery via adb
Code:
adb push hct_recovery_patched.img /sdcard/
2. flash recovery
Code:
# backup current recovery
dd if=/dev/block/by-name/recovery of=/sdcard/recovery_backup.img
# write new recovery
dd if=/sdcard/hct_recovery_patched.img of=/dev/block/by-name/recovery
NOTE: If you do not disable the "flash_recovery" service in /init.rc, AND you have a stock kernel, recovery will be restored to the original version after rebooting.
There are 3 ways to avoid this:
- Flash magisk (or a modified kernel) while in recovery. The patch will then fail to apply and recovery won't be overwritten
- Disable "flash_recovery" by doing "adb remount" and editing /init.rc (comment out the following)
Code:
service flash_recovery /system/bin/install-recovery.sh
class main
oneshot
- Neuter the service by either:
- removing /system/bin/install-recovery.sh​- replacing /system/bin/install-recovery.sh with a dummy script​- removing /system/recovery-from-boot.p​
Woo-hoo, after hundreds of rubbish posts in the MTCD forums, we have a real development post!
Great work and thanks for sharing this, these forums need more like you.
Thanks for the kind comment!
I have to admit that it was frustrating to see the lack of information sharing on this forum, and the pervasive pay-per-use model.
I spent a lot of time just getting Android 10 installed (starting from Android 9), and i had to bring the head unit to my desk as working in the car was rather hard and all i achieved was a brick.
I unfortunately had to bring it back in the car now (can't sit on my desk forever) but, now that i figured out how to make bootable recoveries, i was wondering how hard it could be to have TWRP or at least a hassle-free recovery to install Android 10 from Android 9.
As a first step, this recovery makes it possible to install Magisk or other zip files without doing it manually within adb.
Cheers!
Your work is really good!
Thanks a lot for it.
Now you can also modify ROM's without signatur errors when installing.
Wouldn't it be good if we had an app like the ModInstaller ?
So a one click installation of the recovery without shell or adb.
I have now built an app.
And now need help.
Namely, in the app is the recovery and the script.
Unfortunately, the flash process is not started.
It always comes only the first message from the script.
The app is open source and the script and the recovery are in res/raw.
In the attach you will find the finished app and pictures.
If someone has a solution, he can write me or make a pull request on Github.
Source code:
GitHub - jamal2362/RK33XX-Custom-Recovery-Installer: Application for flashing custom recovery on Rockchip Android Head-Units.
Application for flashing custom recovery on Rockchip Android Head-Units. - GitHub - jamal2362/RK33XX-Custom-Recovery-Installer: Application for flashing custom recovery on Rockchip Android Head-Units.
github.com
The script:
RK33XX-Custom-Recovery-Installer/script at master · jamal2362/RK33XX-Custom-Recovery-Installer
Application for flashing custom recovery on Rockchip Android Head-Units. - RK33XX-Custom-Recovery-Installer/script at master · jamal2362/RK33XX-Custom-Recovery-Installer
github.com
First of all, congrats for the work!
DISCLAIMER:
I don't own ModInstaller, i have never bought a copy of it and i don't intend to do so.
Analysis is purely done from Youtube videos, open source code analysis and existing and openly available binary images.
I was working to figure out how to make a FLOSS alternative to ModInstaller.
The issues i found in all my attempts are the following:
- A6 recovery is the only one that can boot from SD Card (which can then be used to flash A9 -> A10 with the 2SD trick)
- (it took me a long time to pull these information together and unbrick my unit)​- The A6 recovery is unable to directly flash A10 RKAF/RKFW images (sdupdate.img) due to the code being too old
- a failure will be observed while writing super.img. This happens because the device needs to be repartitioned, and the A6 recovery is not doing it correctly​- A9 recovery is buggy. Booting it with no system installed will result in a black screen.
- it will only boot succesfully after being written by the A6 flash tool, which writes the "misc" partition with the recovery commands to run (the "hint" i get from this is that the misc partition is important)​- A10 recovery can't be loaded by the A6 recovery. I always got a black screen after flash. Is it a flash issue? is it an issue with the recovery itself? hard to know
Theory: maybe the recovery could be written over the kernel partition? ("boot")
This way, the recovery will always run after being flashed instead of requiring an explicit "enter recovery" trigger (buttons, misc partition, etc.)
Besides these experiments, in parallel, i did some bug fixing to this repository: https://github.com/liftoff-sr/rockchip-tool/commits/master (i'm "smx-smx")
That allows me to unpack nad repack "sdupdate.img" , "reduced recovery images" and "full IMG files".
With those tools. i tried to swap "recovery.img" in the A6 image, but i always got the black screen upon booting from SD.
Either A9/A10 breaks sdboot or the bootloader crashes before it gets there.
Since this also happens when being flashed, this could either be a bug in the flashing program or a bug in the boot stack (which fails to run recovery perhaps due to a dirty state of the internal flash). It's hard to know for sure without having a UART connection with the board.
BUT, we have an alternative, in the form of the recovery built-in ISP flash tool.
This is the code that reads "sdupdate.img" from the SD Card and flashes it
After reading the recovery source code, i realised that this code can only be triggered correctly when booting from the SD card.
It detects this state by reading /proc/cmdline and probing for specific values (https://github.com/rockchip-android...6f72b7d3123dab27135ac41d55029/sdboot.cpp#L206)
This means the bootloader can (and will) pass those arguments under specific conditions (https://github.com/rockchip-linux/u...c873f178c/arch/arm/mach-rockchip/board.c#L358)
If you check here https://github.com/rockchip-linux/u...3f178c/arch/arm/mach-rockchip/boot_mode.c#L47 you can see the magic word that needs to be written to the "misc" partition in order to trigger that code.
Note that, besides the well known "sdboot", "usbboot" is also possible.
I'm not sure if the ROM can physically boot from USB, but the bootloader and recovery do support (according to code) passing the flag to enable flashing from USB.
So, recapping, there are these ways we can try:
a - try to overwrite "boot" with "recovery" (but it might not work due to the partitioning layout, e.g. jumping from A6 -> A10)
- note: uboot might also need to be written when doing this.
b - making a modified "sdupdate.img" that flashes recovery on top of boot, and all the other core partitions like "misc", "uboot", "trust", "vbmeta"
c - writing "misc" from android in order to triggers the "rkfwupdate" mode
d - taking a dump of the first portion of the flash in various states (A6, A8, A9, A10), and having a "dd" that writes it back to the beginning of the flash (i suspect this is how ModInstaller does it)
Considering cases "b" and "c" depend on a recovery that can write them correctly (and the A6 one is buggy), this leaves us with "a" and "d"
Considering that ModInstaller does it in one shot, and doesn't seem to matter about the partitioning layout, i believe "d" might be the most viable option...
Using the "rockchip-tool" repository i linked from github, the partition table can be dumped from any .img file
You can observe "Image/parameter.txt" from the extracted firmware
This is the partition table from A6's recovery:
[email protected](uboot)
[email protected](trust)
[email protected](misc)
[email protected](resource)
[email protected](kernel)
[email protected](dtb)
[email protected](dtbo)
[email protected](vbmeta)
[email protected](boot)
[email protected](recovery)
[email protected](backup)
[email protected](security)
[email protected](cache)
[email protected](system)
[email protected](metadata)
[email protected](vendor)
[email protected](oem)
[email protected](frp)
[email protected](userdata)
And this is the partition table from A9's recovery
[email protected](uboot)
[email protected](trust)
[email protected](misc)
[email protected](resource)
[email protected](kernel)
[email protected](dtb)
[email protected](dtbo)
[email protected](vbmeta)
[email protected](boot)
[email protected](recovery)
[email protected](backup)
[email protected](security)
[email protected](cache)
[email protected](system)
[email protected](metadata)
[email protected](vendor)
[email protected](oem)
[email protected](frp)
[email protected](userdata)
Notice how uboot, trust, misc, resource, kernel, dtb, and others live in the same space. (2000, 4000, 6000, 8000, 10000, ...)
What we could do is create a raw blob that spans that address range, and "dd" it directly to /dev/mmcblk0 at the right offset.
So i would focus on converting recovery images to raw blobs, with recovery-as-kernel so it boots straight away on the first try.
Bump a real thread.
Is it possible to convert it to a file installed by SDDiskTool?
marchnz said:
Bump a real thread.
Click to expand...
Click to collapse
I created a flashing tool to flash recovery within Android, using Rockchip's own code: https://forum.xda-developers.com/t/...chip-firmware-flash-tool-for-android.4458299/
blala said:
I created a flashing tool to flash recovery within Android, using Rockchip's own code: https://forum.xda-developers.com/t/...chip-firmware-flash-tool-for-android.4458299/
Click to expand...
Click to collapse
This file hct_recovery.patched.img does not appear to be installed via rkupdate
sadaghiani said:
Is it possible to convert it to a file installed by SDDiskTool?
Click to expand...
Click to collapse
It needs to be converted, yes
I'll take a look this afternoon
blala said:
It needs to be converted, yes
I'll take a look this afternoon
Click to expand...
Click to collapse
Is it possible to create a boot image that includes moded recovery & magisk and moded kernel ?
If by image you mean firmware image then yes, it can be done with https://github.com/liftoff-sr/rockchip-tool
But what i would recommend is the modded recovery only, with the magisk .zip to use in Recovery
Otherwise you risk flashing a kernel that doesn't match with kernel modules or is otherwise not fully compatible with the installed system
blala said:
If by image you mean firmware image then yes, it can be done with https://github.com/liftoff-sr/rockchip-tool
But what i would recommend is the modded recovery only, with the magisk .zip to use in Recovery
Otherwise you risk flashing a kernel that doesn't match with kernel modules or is otherwise not fully compatible with the installed system
Click to expand...
Click to collapse
boot.img file included recovery+magisk+kernel
Flashing a boot.img (Kernel, for example) in an Android mobile phone via adb shell
Flashing a boot.img (Kernel, for example) in an Android mobile phone via adb shell - script.sh
gist.github.com
MTCD has separate boot and recovery partitions.
Perhaps you can adapt both recovery/kernel to be in the same image but the bootloader won't know about that (and will always boot from "recovery" partition)

Mobile/Android devices architecture

I'm having trouble understanding the architecture of mobile (and Android) devices. I compare it a lot to the design of PCs, laptops, etc, which I know quite well.
Here's my understanding on how PCs work when booting:
​The hardware has firmware stored in ROM (Read Only Memory). Actually, Flash memory is used nowadays, on which the stored content can of course be changed, unlike real ROM memories in the old days. Because the firmware is hardware-specific and its operation is very critical, its content is rarely updated or otherwise changed. Installing new firmware is called flashing. Firmware in a PC is most commonly BIOS or UEFI, the task of which is (briefly) to first run the POST tests, provide some interfaces and finally start the software in the mass storage. By mass storage, I mean memory separate from the firmware's Flash memory, which can also be Flash memory, such as an SSD disk, or a more traditional hard disk.​The BIOS (i.e. firmware) in the specified order (which first is the internal NVMe SSD or the external USB hard disk?) tries to load the software into the RAM memory for execution from mass storage MBR (Master Boot Record) part . Master boot record is a physical defined area in mass storage. Bootloader software is stored on this MBR part.​​When the bootloader (located on the MBR part) is loaded into RAM and run, it knows the contents of the end of the disk and starts the kernel from there.​​The kernel starts (in Linux) the init process, nowadays often Systemd, which starts the rest of the software.​--------------------
What kind of memories and storages are most commonly found in Android devices? One main memory (i.e. RAM)? One Flash memory for firmware (i.e ROM)? Another separate flash drive that acts as mass storage? Possibly SD card and USB stick as external mass storage?
What is firmware on Android devices?
What is the bootloader in (located in MBR part) on Android?
Linux is the kernel used by Android, which is started by the bootloader? After that, Android continues to boot, how?
A pile of terms, which I have ambiguities:
Bootloader; What's it like on Android? It is often characterized as hardware specific. So is it the case that the bootloader in Android is firmware? So in Android, the firmware runs the tasks of the PC world BIOS and bootloader (located in the MBR part), and then starts the Android located on the mass storage?
Recovery; What is this technically?
Android ROM; I can't understand this. As far as I know, Android is an operating system located mass storage, not Read-Only-Memory firmware.
Rooting; On a PC, we are used to the fact that the owner of the device has root rights. Is it just that the manufacturers have decided to set the default root password to some generated random string, and by default, the user only has access to the basic user account?
After the above has been answered, I would like someone to explain to me (separately) technically, starting from the hardware level (where and how), how do Android devices booting and work? Links to additional information are also welcome. hank you very much! If anyone can answer my questions, thank you very much!
Your questions should put you to shame.
Start reading yourself, building up your knowledge as you read.
Anyway, welcome to the forum. After a year of reading, you will laugh at your post.
ze7zez said:
Your questions should put you to shame.
Start reading yourself, building up your knowledge as you read.
Anyway, welcome to the forum. After a year of reading, you will laugh at your post.
Click to expand...
Click to collapse
I know my questions are stupid, but I'm impasse. It seems that there is much less information about designing for mobile devices than PCs. Could you link some articles on this? As the last article I read this, but it didn't help much, because I compare too much what I learned on PCs.
There are no stupid questions, there are only stupid answers.
Start with the basics based on information from google:
Architecture overview | Android Open Source Project
source.android.com
ze7zez said:
There are no stupid questions, there are only stupid answers.
Start with the basics based on information from google:
Architecture overview | Android Open Source Project
source.android.com
Click to expand...
Click to collapse
That is useful, but there is a reason why I asked about mobile/Android device design/architecture. Android itself is as far as I know (if I'm not mistaken) just an operating system, like the desktop operating systems Windows and Ubuntu, but mobile/Android devices are very different from PCs in terms of hardware and firmware. For example: https://www.quora.com/Is-there-anything-like-BIOS-in-mobiles-How-do-they-boot
How long is a huge ball of string?
No simple answer...
This is for those who are new to Android development and basically have NO understanding about the partition structure. I will give a high-level introductory explanation. PC GNU/Linux users: please note this is completely different from x86 (PC Linux) partition table. You will not come across partitions denoted as sda1, sda2, sdb1, sdb2, and so on. Instead, it will be structured as follows:
/boot
This is the partition that has all the data that is necessary for the phone to boot. It includes the kernel and the RAMDISK (these are the only components of the operating system that are stored in this partition. The remaining are stored in /System). Without this partition, the device will simply not be able to boot. Wiping this partition from recovery should only be done if absolutely required and once done, the device must NOT be rebooted before installing a new one, which can be done by installing a ROM that includes a /boot partition.
/system
This partition basically contains the entire operating system, except the kernel and the RAMDISK (as mentioned in /boot explanation). 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, but you will still be able to boot into the /recovery partition to install a new ROM.
/recovery
The recovery partition can be considered as an alternative boot partition that lets you boot the device into a recovery console for performing advanced recovery and maintenance operations on it. Think of this like a proprietary recovery partition that PC companies put on prebuilt PCs. When you flash a custom recovery such as TWRP or CWM, you are overwriting this partition.
/data
Also called userdata, the data partition contains the user’s data – this is where your contacts, messages, settings and apps that you have installed go. Wiping this partition essentially performs a factory reset on your device, restoring it to the way it was when you first booted it, or the way it was after the last official or custom ROM installation. When you perform a wipe data/factory reset from recovery, it is this partition that you are wiping.
/cache
This is the partition where Android stores frequently accessed data and app components. Wiping the cache doesn’t effect your personal data but simply gets rid of the existing data there, which gets automatically rebuilt as you continue using the device.
/misc
This partition contains miscellaneous system settings in form of on/off switches. These settings may include CID (Carrier or Region ID), USB configuration and certain hardware settings etc. This is an important partition and if it is corrupt or missing, several of the device’s features will will not function normally.
/sdcard
This is not a partition on the internal memory of the device but rather the SD card. In terms of usage, this is your storage space to store your media, documents, downloads, pictures, videos, ROMs etc. on it. It is like the equivalent of the ' Users/[Username] ' folder in Windows and ' /home/~ ' folder in x86 Linux. Wiping it is perfectly safe as long as you backup all the data you require from it, to your computer first. Though several user-installed apps save their data and settings on the SD card and wiping this partition will make you lose all that data.
On devices with both an internal and an external SD card – devices like the Samsung Galaxy S and several tablets – the /sdcard partition is always used to refer to the internal SD card. For the external SD card – if present – an alternative partition is used, which differs from device to device. In case of Samsung Galaxy S series devices, it is /sdcard/sd while in many other devices, it is /sdcard2. Unlike /sdcard, no system or app data whatsoever is stored automatically on this external SD card and everything present on it has been added there by the user. You can safely wipe it after backing up any data from it that you need to save.
/sd-ext
This is not a standard Android partition, but has become popular in the custom ROM scene. It is basically an additional partition on your SD card that acts as the /data partition when used with certain ROMs that have special features called APP2SD+ or data2ext enabled. It is especially useful on devices with little internal memory allotted to the /data partition. Thus, users who want to install more programs than the internal memory allows can make this partition and use it with a custom ROM that supports this feature, to get additional storage for installing their apps. Wiping this partition is essentially the same as wiping the /data partition – you lose your contacts, SMS, market apps and settings.
/Boot (Is NOT viewable in Android)
/Recovery (Is NOT viewable in Android)
/Data (Userdata) (Is viewable in Android)
/Cache (Is viewable in Android)
/System (Is viewable in Android)
/Misc (Is NOT viewable in Android)
Ram
https://developer.android.com/topic/performance/memory-management
Understanding Firmware naming:
N986USQU1ATGM
N=Note
986U or F etc, the model of device
SQ, FX etc = CPU and model specific
U,S,E = Update, Security, Engineering, respectively
1,2,3,4,5 etc = bootloader revision (This is important! You cannot go to a previous revision)
A,B,C,D = Android version
T, U = Year (T=2020, U=2021 etc)
A,B,C etc = month (January A - December L)
1 - 9 and then A - Z =build compilation. This basically means how many builds there are in a month. They start at 1 and go to Z
So N986USQU1ATGM would be
N968-U-SQ-U-1-A-T-G-M
N968U (Note 20 Ultra Carrier version), SQ (Snapdragon), U (Update), 1 (Bootloader version), A (Build 10), T (2020), G (July), M (22nd build)
How to enter Download Mode:
Turn off the device.
Connect USB cable to your PC (Leave it disconnected from the phone)
Press and hold down the Volume Up and Volume Down buttons. While they are still pressed, plug in the USB cable into your phone.
The phone will go into download mode press volume up. In Odin you will see that phone is added.
Dirty Flash:
I would only do this if you are having to manually update to the newer firmware and would not do it if you are coming/going to U/U1 or from beta firmware or if you are on an old firmware. I'd also highly recommend doing a back up prior to the doing this
Load these into Odin
BL
AP
CP
HOME_CSC
Do NOT flash CSC or USERDATA, either of these WILL wipe your device
This is a "dirty flash" and these can sometimes cause issues. Keep in mind if things start going sideways and stuff starts not working right, your first step to a solution will be to wipe the device.
Tips on flashing U1 Firmware:
You will have to wipe, can NOT dirty Flash going between U and U1 firmware
Use the patched ODIN linked in post #2 or #3, Odin3_v3.13.3b (They are exactly the same)
Have an active US Carrier SIM installed to get carrier features
If you get your CSC Stuck on XAA/XAA/(Insert your carrier here), and can not get Carrier options back.
PIT files
https://ihax.io/samsung-pit-files-explained
plus_rlus said:
I know my questions are stupid, but I'm impasse. It seems that there is much less information about designing for mobile devices than PCs. Could you link some articles on this? As the last article I read this, but it didn't help much, because I compare too much what I learned on PCs.
Click to expand...
Click to collapse
The are no stupid questions.
Questions are asked when we do not understand something and want to learn.
There is nothing wrong or negative about asking questions.
Questions are a part of how we learn.
Cheers.
plus_rlus said:
<SNIP>
What kind of memories and storages are most commonly found in Android devices? One main memory (i.e. RAM)? One Flash memory for firmware (i.e ROM)? Another separate flash drive that acts as mass storage? Possibly SD card and USB stick as external mass storage?
What is firmware on Android devices?
What is the bootloader in (located in MBR part) on Android?
Linux is the kernel used by Android, which is started by the bootloader? After that, Android continues to boot, how?
A pile of terms, which I have ambiguities:
Bootloader; What's it like on Android? It is often characterized as hardware specific. So is it the case that the bootloader in Android is firmware? So in Android, the firmware runs the tasks of the PC world BIOS and bootloader (located in the MBR part), and then starts the Android located on the mass storage?
Recovery; What is this technically?
Android ROM; I can't understand this. As far as I know, Android is an operating system located mass storage, not Read-Only-Memory firmware.
Rooting; On a PC, we are used to the fact that the owner of the device has root rights. Is it just that the manufacturers have decided to set the default root password to some generated random string, and by default, the user only has access to the basic user account?
After the above has been answered, I would like someone to explain to me (separately) technically, starting from the hardware level (where and how), how do Android devices booting and work? Links to additional information are also welcome. hank you very much! If anyone can answer my questions, thank you very much!
Click to expand...
Click to collapse
Firmware is the hardware specific drivers, library files and other resources that are supplied by the manufacture(s) and are chipset specific.
The firmware is proprietary and normally closed source. Basically the parts that make the hardware work.
The bootloader is what actually boots the device.
This is supplied by the device manufacture(s) and is device specific.
It is separate from the system.​
Recovery is a mini Android environment.
- Factory (Stock) recoveries are restricted to the user but have unrestricted (root) access to the device.
- Custom recoveries (TWRP, OrangeFox, ..) allow the user unrestricted (root) access to the device.
Android ROM (rom) is the actual system (OS) and normally you would include the version that you are running.
Stock roms - Google 12L, AOSP xx, OOS 12, MIUI xx, ColorOS xx, ...
Custom roms - Lineage 19.1, crDroid 12.1, AospExtended 12.1, ...
In computer terms it would be..
Windows 7, Linux (Fedora 34), MacOS Monterey.​I am not sure what the current versions of MIUI and ColorOS are, hence the xx.​
Once the bootloader boots the device, a few things can happen.
- The system boot image (system kernel) takes over and boots the device into system (rom).
- The recovery boot image (recovery kernel) takes over and boots the device into recovery (mini Android environment).
- If system fails to boot, device reboots into recovery (Recovery Party) if recovery can boot.
- If no boot image takes over, you will stay in the bootloader, reboot into some special mode or just a good old fashion boot-loop.
There have been a lot of changes to Android though the years..
Each device, manufacture, Android version.. can be different from another.
The most common bootloader is (or supports) fastboot but, this is manufacture and device specific.
Not to be confused with fastboot_d (new story that started with Android 10/11?).​This has also changed though the years, some manufacture use their own variation of bootloader.
HTC had H-BOOT, Samsung does their own thing along with some other manufactures.
Rooting....
By default the substitute (switch) user su command is removed from Android.
This is what most refer to as superuser since it defaults to root user if you do not specify a substitute user.​
This has been a long and changing story in the Android world also.
Old but, well worth the read.
How-To SU - [chainfire.eu] - Link
The current most popular used root solution is Magisk.
It is a little more than just su. ​Magisk - [GitHub] - Link
---
It might be easier if you see an actual partition table.
Nexus 7 16 Gig WiFi - [PastBin] - Link
Might as well make it an ... interesting one.
In this example, userdata only has 1.2 Gigs since the rest is used by other partitions.
userdata is mounted as /sdcard.​
Save for boot, cache, system, misc, recovery and userdata.
The other partitions would be considered firmware.
When the device boots, the partitions get mounted to /dev/block.
Hope it helps more than confuse.
Cheers.

Categories

Resources