CWM Recovery extendedcommand - Android Software/Hacking General [Developers Only]

Does anyone know the various recovery extended commands? Specifically I would like to write a script to flash new ROMs via Tasker. I can already do backups with this script, but being able to download and flash new ROMs automatically would be awesome.
Thanks for the help!

Related

partitioning of /kernel and /recovery, where is the recovery mode image

Hi,
Backround:
My approach is to fullfil a full memory acquisition of an GSG i9000 (but thats not really relevant). The acquisition should be as forensic as possible by legal term. I approach is to apply as less changes as possible. So there is no option to turn on the device, root it and install ROM Manager or equal...
My Idea was to flash the Recovery Mode with CWM. After that I fullfil the acquisition with dd. (I could place the dd and su binaries to /sdcard/ext_sdcard and mount it with executable rights)
Problem and Approach
The bootloader of the device is not acceable, so I can't use fastboot to flash the recovery mode. Instead I have to use the Heimdall Suite over the download mode.
The Test/CrashDummy Device: is also a SGS-i9000, which had CWM 3.x allready installed. I flashed the recovery partition with an 2.5.x CMW image. However this didn't work out, v3.x was still booting when going to recovery mode. I did it many times, but it didn't help.
Then I read that the recovery mode-kernel is in the original linux/android kernel zImage. So I flashed it the kernel partition with Heimdall, which worked out for the recovery mode, but not for the Android OS itself..., was hanging on boot-bricked.
The second approach, flashing the original kernel, is the thing I would like to avoid generally.
The Question
Many users reported in forums that flashing recovery mode did it, my expirience showed the oposite. I also seed blog posts which told the /recovery is holding only the backup of the kernel partition.
What is or has to be flashed for a custom recovery mode eg CWM?
The Android kernel partition or only the recovery partition? Where is the recovery mode is actually stored?
I am really interested in the technical background, but can't find any documentation either on the official side nor in forums/wikis. Any links would be also helpful!
I looked at the PIT, is there a need to adjust the pit when the size of kernel images changes? Only the start address is relevant?
Also would be interested in the overall situation, am I missing something, logical flaws in the mentioned constelation?
Is there a way to pull the kernel image over the download mode, not only flash it? Maybe even other partitions, e.g. the whole flash?
Did somebody tried to read yourself in into the Odin protocol besides Glass Echidna, I started read the source of Heimdall. It's clean code but without documentation...
thanks in advance
ps: I spared time to search all the links of the flashimages, but I always used the official sources(HPs of the MODs) when it was possible.
EDIT: I found the link where the authors tells recovery is only a backup partition: vincent.bernat.im/en/blog/2011-android-samsung-galaxy-s.html

How to modify (add/remove) features i ClockorkMod Recovery

I was wondering if anyone can help me with this or guide me in the right direction.
I'm trying to build my own version of ClockworkMod recovery.
Mainly I want to be able to add/remove features that are available when you boot into clockwork recovery
For example: I would like to remove the "wipe data/factory reset" feature
I have been following the Cyanogen guides (downloaded my own buld environment, etc...) and have successfully built ClockworkMod recovery.img/update.zip
I have also found the folder that the recovery.img is built from, but I do not know which files are the ones that I should be modifying to add/remove features.
Any advice would be greatly appreciated.
Thank you very much

Pipo U8 RileyROM 1.3

special thanks to rrileypm at freaktab.com
Pipo updated their stock firmware for the U8 on 8/22/2013. This new ROM is based on this firmware.
It is:
Rooted
Debloated
English set as default language
Google Play Store fixes added
Init.d support added
Busybox commands added
tun.ko added for VPN support
Thanks to Tattman65 for the boot animation
Thanks to Finless for the flash tool
Thanks to Fun for the generic CWM Recovery
Thanks to Pr0xZen for the First Time User's Guide
You might notice some things are different in the ROM kit.
1. I included the Rockchip Batch Tool as an alternative for resetting you tablet into flash mode. You can also use this tool to flash the stock ROM if you need to, for some reason.
2. I also included a template for you to build your own CWM flashable ROM. There is a readme file in that folder that tells you how it's done. I would not recommend changing to a different ROM using this feature, it is just a way to re-flash this ROM without having to use PC. You can't change parameter settings through CWM.
3. The default recovery.img is stock recovery. As an option, I included the generic version of CWM Recovery...you can flash it instead of the stock recovery by just renaming the files...recovery.img to stockrecovery.img and cwmrecovery.img to recovery.img before flashing.
Enjoy!!!!!!
Download :good:

What's the difference between philz recovery and cwm?

Hi everyone, I've been using twrp since I first rooted my nexus 5 but using the recovery tools app I flashed philz recovery and I like it but what are the differences and are there key features I should know about?
Nexus 5, CM11, Franco kernel and Xposed framework
I listed the key features in post 1 of the philz recovery thread.
-----------------------
Sent via tapatalk.
I do NOT reply to support queries over PM. Please keep support queries to the Q&A section, so that others may benefit
TheAlliedFleet said:
Hi everyone, I've been using twrp since I first rooted my nexus 5 but using the recovery tools app I flashed philz recovery and I like it but what are the differences and are there key features I should know about?
Nexus 5, CM11, Franco kernel and Xposed framework
Click to expand...
Click to collapse
Backing up what rootSU mentioned below is the list of features in his Philz Recovery thread:
Features:
browse phone with root access using full GUI in Aroma File Manager
terminal access from recovery with root access through Aroma File Manager
Multi Zip Install menu: check multiple zip files to install in a row
Custom Install Zip Mode: set a default folder to start with + browse backward up to the root
TWRP backup and restore support, include full md5 sum support (single and multivolume, compressed and non compressed formats)
Advanced statistics during backup operations shown in color: total backup size, backup size progress, backup time, compression ratio...
optional reboot after custom backups/restores
set special nandroid settings: time zone, toggle md5 check for lightning fast backup and restore, toggle /preload backup and restore, enable nandroid compression using pigz (multi-cpu gzip compression) and choose ors backup target volume
recreate md5 sum check for your cwm backups for compatibility with stock CWM if you need to revert
you can cancel any nandroid operation with back button
create custom_rom.zip from current ROM or from a pre-existing nandroid backup (based on boot, /system and optionally /preload)
nandroid backup path now will be named with current ROM id from build.prop (ro.modversion, then ro.romversion, then ro.build.display.id)
custom backup and restore job list: backup and restore freely any partition combo
support flash modem.bin image files in addition to custom modem.img files, now support for multiple *.bin versions under dedicated folder
during custom restore, you can see the contents of the folder you want to restore from
delete custom or TWRP backups from recovery menu
full wipe before flashing new ROM: wipe user data + format /system and /preload. SD card content is not affected
full support for openrecovery script specifications include all backup and restore options
run openrecovery scripts in 2 modes: on start goomanager boot scripts + one touch menu to either directly open a default path or freely browse for scripts
define ors backup target volume from within Nandroid Settings menu
ors restore path supports stock clockworkmod path or TWRP path
poweroff, reboot to recovery and reboot to download/bootloader mode options
USB mount in recovery
adb root in recovery: just wait about a minute to activate
Overall, Philz Recovery has a lot more features then the standard touch CWMR, such as built in terminal, gui file manger, ability to flash multiple zips and many more (Which are listed above).
Basically, PhilZ is the best of both worlds (TWRP and CWM)
Hi there. I'm currently using the "official" CWM v6.0.4.5, and I do find it quite annoying that it now creates its backups under data/media/clockworkmod instead of the easily accessible .../0 sd partition. I'd love to switch to Philz if only for the theming and OTG support. It looks like it's as simple to use as your standard CWM. So I have two questions: 1) I can just flash the Philz Recovery zip using my current CWM, then just delete the Clockworkmod folder under the data/media folder since I would no longer need it? and 2) Is there an option to backup EFS like in TWRP? Because after reading some of the horror stories on these forums about restoring the EFS partition (granted on a different device), this is definitely something I don't want/need to be able to backup for fear of the possibility of messing anything up.
Thanks for taking the time to help out!
charesa39 said:
Hi there. I'm currently using the "official" CWM v6.0.4.5, and I do find it quite annoying that it now creates its backups under data/media/clockworkmod instead of the easily accessible .../0 sd partition. I'd love to switch to Philz if only for the theming and OTG support. It looks like it's as simple to use as your standard CWM. So I have two questions: 1) I can just flash the Philz Recovery zip using my current CWM, then just delete the Clockworkmod folder under the data/media folder since I would no longer need it? and 2) Is there an option to backup EFS like in TWRP? Because after reading some of the horror stories on these forums about restoring the EFS partition (granted on a different device), this is definitely something I don't want/need to be able to backup for fear of the possibility of messing anything up.
Thanks for taking the time to help out!
Click to expand...
Click to collapse
1. Yes
2. Yes but you can disable it.
BirchBarlow said:
1. Yes
2. Yes but you can disable it.
Click to expand...
Click to collapse
Great. I've always preferred CWM over TWRP for some reason, but now this gives me the best of both like you said. Thanks!

Can I flash twrp from goomanager?

I have a 8013. I need to put in a different recovery and I like twrp. has anyone flashed it from goomanager? I see that there is one on there I just dont want to mess something up.
Already rooted.
I would search for this but I cant find a search button. Really not in the app or on the website.
Sent from my GT-N8013 using xda app-developers app
Let me see...
eggwardo said:
I have a 8013. I need to put in a different recovery and I like twrp. has anyone flashed it from goomanager? I see that there is one on there I just dont want to mess something up.
Already rooted.
I would search for this but I cant find a search button. Really not in the app or on the website.
Sent from my GT-N8013 using xda app-developers app
Click to expand...
Click to collapse
Hmm... When I read here: Goomanager so there is function for flash recovery. But if I don't get wrong, so this recovery files must be on www.goo.im server. Theoretically all ROMs, MODs and RECOVERY files lying on goo.im server
you can download to your device and flash it!
But for me and if I want to flash something, the best way is: Flashify
Here is it TOP 11:
1 - Flash boot and recovery .img without even needing to go to recovery.
2 - Flash zip files. Option to wipe cache, dalvik and data when using TWRP or Philz recovery.
3 - Download and flash CWM, Philz, TWRP, Gapps, Franco Kernel, Stock Nexus Kernel (premium), and Stock Nexus Recovery (premium).
4 - Automatic Loki Patch when needed.
5 - Full nandroid backups/restores when using TWRP or Philz recovery.
6 - Backup/Restore kernel and recovery using Sdcard or cloud (Dropbox, Box (premium) or Google Drive (premium)).
7 - Automatic cloud synchronisation of backups between devices and desktops.
8 - Keep track of recently flashed items.
9 - Flash multiple files and build your flash queue.
11 - Flash from anywhere! Do you want to flash from your favorite File Explorer or Email app? No biggie, that also works together with Flashify.
More at links above!
Have great Flashing :victory: Peter
I have an 8013 as well that I acquired used. it was pre-rooted, but the custom recovery on it didn't work for newer roms. I looked into installing TWRP and found that although the official TWRP instructions said you could install it from GooManager, when I tried to, it didn't find a recovery for the device.
I did successfully get TWRP installed quite easily using their alternate instructions, though. here's a quick breakdown, especially since their instructions are a bit vague.
1. download the .img file for the recovery from here: http ://teamw.in /project/ twrp2/110 (remove the spaces; I can't post outside links yet.)
2. in either terminal emultor or through adb shell, run the command shown below, replacing the bracketed sections with the path and filename of the .img file:
dd if=/<File path>/<filename>.img of=/dev/block/mmcblk0p6
For example, say you save it in your downloads folder on the internal sd card. The path is probably something along the lines of /storage/sdcard0/Download/openrecovery-twrp-2.7.0.0-gt-n8013.img
If you get the path or filename wrong when you runthis command, it will just tell you that it could not find the file you told it to write. if you get the second part wrong, however, you could brick your device, so make sure you double and triple check that part.
Another good check to do before running the command is to ensure that your download is not corrupt by checking the md5 checksum. To do this, make sure you copy that when you download the file and then check using a file browser that supports it. I use Explorer (by Speed Software) to check the md5. To see it, long press the file and click properties. If the one given when you downloaded it and and the one you get from the file do not match, your download likely got corrupted and you should try again until they do match. It's rare, but you don't want to flash a corrupted recovery, so do check it.
The command itself can either be run from an app like terminal emulator or over adb (android debug bridge) from your computer using the command:
adb shell <command>
I followed this basic procedure and now have a fully functioning TWRP recovery on my 8013. Best of luck to you in getting yours working. :good:

Categories

Resources