HI!
I have few queries regarding the Android recovery system, and the class RecoverySystem.
1. As per my understanding the recovery system which is supposed to work from the recovery partition, does not necessarily be a android OS, but can be even plain embedded linux with bassic RFS and a workhorse application like the bootable/Recovery in the source. Even the recovery application can be different from the one in the bootable/recovery folder in SDK source.
Please let me know if this understanding of mine is correct?
I need to implement such recovery mechanism for a MMC based non mobile device. Any poiters on that?
2. Why is that the boot-loader (Hboot in phones) is doing the actual job of installing the system update , bootimage update and the hboot update? Cant the recovery system itself untar and install the "SYSTEM" update in it's respective partition and the "BOOTIMAGE" update in its respective partition from the user space application "recovery".
2. The class RecoverySystem is used to interact with the recovery system running in RECOVERY partition. Can somebody point me to some example uses the RecoverySystem class?
regards
-Nitin
Related
I have a few questions about Archos' devices, in particular those belonging to the Generation 8 family. Here they are:
How is the partition table setup on the device and is the partition table signature checked? How are the partitions logically laid out?
When the SDE is installed and run, boot1 locks up boot0, itself and the recovery partition to prevent them from being modified. I would imagine that this type of setup would require keeping the partition table from being modified, thereby preventing dual boot. Can dual boot be achieved using the SDE without any extra modifications?
Are some of the partitions on Archos devices contained in compressed images and then loaded into the RAM in a manner similar to the way Damn Small Linux boots?
Is the recovery partition a minimal OS setup that exists to perform recovery operations or is it in fact copied in it entirety to the primary partition when recovery mode is entered?
I have realized/learned some things Linux that I hadn't noticed before such as the fact that folders like /home and /boot have their own partitions and that /boot may contain more than one kernel and that bootloaders like GRUB are actually represented in the filesystem. I don't if these are real partitions or logical partitions so I might have to do some relearning.
I'm bumping this thread.
Master Melab said:
I have a few questions about Archos' devices, in particular those belonging to the Generation 8 family. Here they are:
How is the partition table setup on the device and is the partition table signature checked? How are the partitions logically laid out?
When the SDE is installed and run, boot1 locks up boot0, itself and the recovery partition to prevent them from being modified. I would imagine that this type of setup would require keeping the partition table from being modified, thereby preventing dual boot. Can dual boot be achieved using the SDE without any extra modifications?
Are some of the partitions on Archos devices contained in compressed images and then loaded into the RAM in a manner similar to the way Damn Small Linux boots?
Is the recovery partition a minimal OS setup that exists to perform recovery operations or is it in fact copied in it entirety to the primary partition when recovery mode is entered?
I have realized/learned some things Linux that I hadn't noticed before such as the fact that folders like /home and /boot have their own partitions and that /boot may contain more than one kernel and that bootloaders like GRUB are actually represented in the filesystem. I don't if these are real partitions or logical partitions so I might have to do some relearning.
Click to expand...
Click to collapse
Partition tables are not locked. Devices are populated as normal in kernel. Partitions can be edited and the device repopulated with partprobe as normal.
The bootloader/recovery is held on a partition on mmcblk0, they are signed using a public/device encryption key, that has been broken. When the system is booted it mounts the recovery image and performs requested functions. The AOS firmware format is also encrypted, but has not been broken. The stock firmware is held on mmcblk0 as well, in an 256bit device key encrypted SquashFS(which has also been broken). It is mounted with a chroot as R/O at stock boot.
Dual boot can be achieved in multiple ways, easiest of which is installing the openAOS multiboot menu. A current limitation is that all OSes must use the same kernel, until we can get kexec working correctly(or other more dangerous solutions).
P.S. Folder's like /boot and /home can be many different things. Folders, partitions, images, symlinks, etc. The advantage of linux/debian is that everything is represented in the file system. Even sending commands to devices or modifying driver settings is done by "modifying files". For example, to flip the touchscreen's input on my A101, you write the letter "N" to a "file" called /sys/module/hid_hanvon/parameters/rotate180.
This is actually an interface to the driver for the touchscreen, not an actual file, so sending the letter N to "rotate180" tells the driver to flip the input coming from that device(hid_hanvon = the touchscreen).
If you tell me what you're trying to achieve, I can give you more details. If you are just trying to learn, you should come to the openaos IRC channel. Lot's of years of experience in there.
I didn't think bootloaders were stored on partitions. On PCs, the first stage bootloader is stored outside of any partition on the MBR.
Master Melab said:
I didn't think bootloaders were stored on partitions. On PCs, the first stage bootloader is stored outside of any partition on the MBR.
Click to expand...
Click to collapse
That's flashed on eMMC2. I was talking about the recovery bootloader. Basically, the bios is off limits, and the recovery bootloader allows updates, SDE flashing, etc. without risking bricking, as I'm sure you know.
So boot0, the root of all control on the device, is not stored in a partition, like the first stage bootloader on a PC while boot1 (or whatever special bootloader that exists for recovery purposes) is stored on its respective partition like a second stage bootloader on a PC?
I'm bumping this thread. Please explain further. What do you mean when you say "BIOS" and is boot1 the recovery bootloadr?
Master Melab said:
I'm bumping this thread. Please explain further. What do you mean when you say "BIOS" and is boot1 the recovery bootloadr?
Click to expand...
Click to collapse
Another bump.
I also want to know the partition layout of gen8 devices after installing SDE and UrukDroid.
I already installed SDE and when I plug the device to my computer I see 3 partitions:
/dev/sdb1 76295 469632 12586808+ 83 Linux
/dev/sdb2 1 30518 976563 83 Linux
/dev/sdb3 30518 76295 1464844+ 83 Linux
sdb1 - 13GB, doesn't contain a /system, but here's the menu.lst
sdb2 - 1GB, contains a /system (but i think it's not the stock android installation) ...maybe UrukDroid?
sdb3 - 1.5GB, contains a /system, but has only a few files, etc is missing for example
So is the stock android partition invisible?
I am bumping this thread.
Maybe this thread could be usefull for you : http://forum.xda-developers.com/showthread.php?t=1199450
Hello guys.
I know there's no way to make CWM work with encrypted memory and SD and also there's no way to decrypt.
So, any other encryption solution that allows backups?
Using android's encryption feature, what to do in case of problems?
Any way to recover?
What happens if the system bricks and a recovery is needed?
What happens flashing a non disruptive update? Is a wipe needed?
Thank you so much!
Flashing to an encrypted ICS gs2/i9100
ultradj83 said:
Hello guys.
I know there's no way to make CWM work with encrypted memory and SD and also there's no way to decrypt.
So, any other encryption solution that allows backups?
Using android's encryption feature, what to do in case of problems?
Any way to recover?
What happens if the system bricks and a recovery is needed?
What happens flashing a non disruptive update? Is a wipe needed?
Thank you so much!
Click to expand...
Click to collapse
There are two options I've found that will work for flashing encrypted ICS, one is TWRP, which you would use instead of CWM, which would allow you to enter your password & flash what ever ROM you wanted like you were working with an unencrypted phone. But it's not (yet?) available for gs2/i9100.
The other option (original post here ) outlines how to do this from the command line of a computer with the Android SDK installed. I've spelled it out to include Android SDK installation since I didn't have that installed already when I had to do this.
Download, Install & configure Android SDK
Run SDK Manager
install "Android SDK Platform-tools"
Add <whatever>/android-sdk/platform-tools/ to path
in a command prompt / terminal window type "abd" to Check that your path includes the correct folders in the SDK (I had to do this manually on Win7)
On Phone
Reboot phone into Recovery mode
in CWM format cache partition
from your PC use adb to mount /sdcard as tmpfs:
Code:
adb shell mount -t tmpfs none /sdcard
put your ROM on the (fake) sdcard
Code:
adb push <your rom> /sdcard
Use the recovery to flesh the ROM as usual
Once you reboot the device will ask for you password as normal then finish the app installation/configuration after reboot. I was able to do this upgrading from CM9.0.0 RC1 to CM9.1. All data was preserved. Phone seems to be behaving itself but I only did this an hour ago so still too soon to tell.
Props to orcruin for sharing this. :highfive:
Ed
Hi,
I need to recover deleted sms messages (from a Samsung Galaxy SIII I9300) and there is no backup of the mmssms.db database.
It's for a customer and I would like avoiding to root and to alter the operating system.
This mean that I would be very happy if the procedure could be as much "read only" as possible.
I'm however aware that I will have to write something to the phone, and I plan using the recovery partition for this.
After reading this much interesting thread http://android.stackexchange.com/questions/28296/full-backup-of-non-rooted-devices
my main hope is based on flashing ClockWorkMod (CWM) or TWRP to the recovery partition with Odin (or maybe Heimdall).
This seems a priori possible without root access. (see http://forum.xda-developers.com/showthread.php?t=2313072)
Afterwards, I would like to clone the whole DATA partition, in order to not only get the current "mmssms.db" file, but to also possibly find older versions of it through file carving.
The adb shell seems being a feature of CWM (source: http://forum.xda-developers.com/wiki/ClockworkMod_Recovery) but I'm not sure whether the adb shell resides on the recovery partition or on another one and if root privilege is required to apply commands like push or pull to exchange files between partitions and the sdcard.
Furthermore, I'm not sure if I could run commands like "dd" from recovery partition.
Something like having Busybox commands available also when starting the phone on the recovery partition.
Else, saving a Nandroid backup to the sdcard seems possible, but this sounds saving a directory structure and appears to me being not equal as cloning a partition (at low level). Hence, it would not be possible to carve dereferenced files from the Nandroid backup. Correct ?
TWRP also sounds interesting, as being able to backup only specific partitions like the "DATA" one.
But the fact that its navigation is based on the touch screen appears me being unsafe if the touch screen had to dysfunction in a later time.
I'm familiar to Linux but a newbie in Android-based smartphones.
Thank you very much for your help.
Hey everybody!!! I was just wondering to myself, is it possible that someone out there will make an android recovery which will work just like the actual operating system?
I mean that when you would boot into recovery - you will see a homescreen with apps you can tap on and open - just like android.
Soooooo is it possible? And if it is - is there anyone out ther willing to do it? Because it will be awesome!!!!!!!!!!! ( i know it's like dual boot, but it's cooler!!!!)
because the partition of recovery is too small, we can't put full features os like android into recovery partition
Sent from my Redmi 2 using Tapatalk
Maybe with root rights you can change that partition? I'm nearly 100% sure it's possible
The recovery is already a separate operating system. However it's not Android - as other users have pointed out, there is no space for a second Android system on a normal device.
Most devices have two boot images that each contain a Linux kernel and a ramdisk image - one boot image for Android, one for the recovery. The bulk of the Android OS is on a separate /system partition. Recovery runs fully from the ramdisk.
If you have a storage device (like a microSD card) with additional free space, then it is possible to create separate /system and /data partitions there for a second independent OS. You could use the recovery boot image to boot that OS, but you may still need a recovery, so you'd need to add some code in your secondary boot image to switch between recovery and your secondary OS.
So... is it possible? Yes. Will I do it? No.
Thanks for the answer and clarification!!!
And if you could help me a bit more: do you know of some kind of dual - boot development project which has already been started for the gs5? I have a micro sd card and am flabberghasted by the idea of two OSs on one device. Thanks!!!
You can try this http://forum.xda-developers.com/showthread.php?t=2447534
Thanks!
Hello everyone!
I'm starting a new research on an embedded device, I'm pretty new in iot hacking, so I'm lacking a lot of basic knowledge.
The device I'm working on runs on an ARM soc and uses an Android based operating system, booting with an U-boot bootloader.
I was able to get an adb root shell, which gave me access to everything on the device, and proceeded to dumping the whole emmc raw image (the one in /dev/block/mmc...).
I'm now trying to boot that same image on a tinkerboard, so I can get a better view at the internals of the device and to be able to debug it properly, which I can't do on the original device without damaging it beyond repair.
For this I want to grab one of the tinkerboard's android images offered on the website, which is basically a raw image which you can flash onto an ssd card an use it to boot the tinkerboard, and modify the partitions I need (system, boot, userdata, etc).
However, I don't know how to extract each one of the partitions from this raw image. I was thinking about doing something manual with binwalk and dd, but there must be a better way.
So my question is: Is there a tool I can use to extract and then rebuild each android partition from a raw emmc image dump?
Thanks a lot!
apok