[HD2 Android NAND Development] kokotas:
Intro:

---------------------

Extended TWRP is

based

on official Team Win Recovery Project, but

modified

** to address some special methods & features found on The HD2,

a device which has 3 different android loaders (cLK, MAGLDR and Haret) and various Android Rom configurations (DataOnExt, NativeSD, SD, Nand).

** If you are just looking for an unmodified TWRP for the HD2, check here.

I take no credit for this. All the creative hard work was already done!

Credits to:

agrabren, Dees_Troy, ViViDboarder, and AssassinsLament - core twrp 2 development team.

Toastcfh – for his underappreciated dedication to the community.

s0up and kevank - for their hard work on the web side of things.

shift, onicrom, netarchy, kevank, myndwire, bigbiff, dkelle4, shinzul, spiicytuna, and eyeballer - the rest of Team Win.

Amon_RA - for his great Recovery.

Koush - for his dedication to the community and ClockworkMod.

Akmzero, arif-ali, Evil_DevNull, gus6464, Jesusice, _jmz_, NxtGenCowboy, ohshaith55, Pyrostic, [R], and Rootzwiki - for all the help with devices and testing.

Team's supporters and the Android Community.

However, if you think that this extended version is full of unnecessary cr*p or that something is not working as expected anymore,

Credits to:

me

Notice:

---------------------

For me, this thread is about learning while having fun. It would be ideal if it leads to something that is really useful.

So, as you may have already understood, This Is Not a release thread. If you have the time and interest to help in any way, please do. Cause together we can make sure that this project will benefit all of us.

The attached recovery image is provided for people who can't compile it from source, but want to either help in debugging or just experiment.

Have in mind that before attaching it here, it was only tested on one HTC-HD2(Eu) powered by (black) cLK bootloader.

The performance on devices powered by MAGLDR bootloader or running the good-old WM6.X should be considered untested.

In order to exploit the full potentials of this software, Black cLK bootloader is strongly recommended!

As usual, use at your own risk. TeamWin or kokotas is not responsible for anything bad that may occur from using Extended TWRP.

ReadMe

Features:

---------------------

**************Mainline**************

* Ability to save custom recovery settings

* Touchscreen driven with real buttons and drag-to-scroll

* XML-based GUI that allows full customization of the layout – true theming!

* Settings are saved to the sdcard and persist through reboots

* Ability to choose which partitions to back up and which to restore

* Ability to choose to compress backups – now with pigz (multi-core processor support for faster compression times)

* Ability to backup large partitions (size>1.5GB) by splitting the backup archive.

* Basic file manager (copy, move, delete, and chmod any file)

* OpenRecoveryScript scripting engine

* On-screen keyboard in recovery! -- supports long press, backspace repeat, and swipe left deletes everything left of the cursor

* ADB sideload functionality from AOSP

* Pseudo-terminal emulator

* Decryption support

* Ability to set a timeout for auto-turning off the screen

* exFAT support for sdcard's 1st partition

* Manual screen rotation

**************Extended**************

* Proper detection of bootloader(cLK/MAGLDR/haret)

* Support for cLK's extra boot partitions

* Tweaked off-mode charging for cLK (device can wake up by pressing any key)

* Direct rebooting to selected boot partition for cLK bootloader

* Direct rebooting with selected kernel from NativeSD folder for MAGLDR bootloader

* Ability to communicate with cLK in order to change partitions' size if needed

* Built-in NativeSD manager(Backup - Restore - Delete - Fix Permissions - Wipe Data - Wipe Dalvik-Cache - [cLK]Kernel-Restore)

* Option to skip any NativeSD Rom during sd-ext's partition backup

* Option to adjust backup/restore process for DataOnExt method

*

* Nilfs2 support for sdcard's ext(2nd/3rd primary) partition

* NTFS support for sdcard's 1st primary partition

* Option for converting file system [ext2 - ext3 - ext4 - nilfs2] of sdcard's ext partition (without losing any data if there is enough space on the /sdcard)

* Option for adding a 3rd primary partition(mmcblk0p3 as /sdext2)

* Option to skip dalvik-cache during backup

* Ability to restore backups that were made using a CWM Recovery

* Ability to check SD Card's filesystem(s)

* Ability to run shell scripts from your SD Card (script location: /sdcard/TWRP/scripts)

* Ability to "run" recovery (AROMA based) apps with one click (app location: /sdcard/TWRP/app)

* Ability to select current theme (example of theme file location /sdcard/TWRP/theme/MyTheme/ui.zip)

* Ability to check the size of the backup to be restored

* Ability to take screenshot (screenshots location: /sdcard/TWRP/screenshots)

* Configurable haptic feedback

* Configurable system tweaks (cpu gov, cpu freq, i/o sched, drop_caches)

Source:

---------------------

Extended-Team-Win-Recovery-Project

Looks:

---------------------

Screenshots

Compatible themes:

TWRP's Default Style Blue Theme for v2.5.0.5

Dark_Avenger's Holo Dark Theme for v2.6.3.0

Download:

---------------------

HD2_EXTENDED_TWRP_2.6.3.4.zip

md5: 5af088d200a00e0a3efb27860a5168c6

Info: You need to have a recovery partition at least 9 MB to fit the img

HD2_EXTENDED_SD_TWRP_2.6.3.4.zip

Info: Extract to the root of your SD Card

Frequent issues:

---------------------

If you report an issue without a log and/or without details, that's not very helpful in tracking down that issue, so, eventually, don't expect any assistance cause I am not a medium.

If you get a "status 2" error when installing a recovery-update-package(zip) that used to work with your old recovery, change the update-binary inside the zip file with a newer one (API 3).

DON'T FORGET to check the syntax in the updater-script and verify that format() and mount() commands have the correct amount of arguments, otherwise you'll end up having other errors like "status 7".

i.e. if you use the update-binary included in the attached file below, format takes 2: format("MTD", "boot").

If you occasionally can't boot into recovery, try increasing the size of its partition >= 10MB.

Installation:

---------------------

[Basic stuff before installing]

Make sure you have adb and fastboot working (required files here). Please don't ask here questions about this - a simple web search will be enough to help you.

Make sure that the size of the 'recovery' partition is enough for the image to fit.

Make sure the name of the recovery *.img file is the one you use in the commands or in flash.cfg

[Flashing occasions]

[cLK/MAGLDR]

Flashing the zip file from existing Recovery

Download zip file to your computer and copy to /sdcard.

Reboot phone into recovery.

Select to install the zip file from your /sdcard.

Reboot Phone into recovery as normal.

[cLK/MAGLDR]

Flashing the *.img file while booted in Android or in Recovery

Download the recovery file to your computer.

If it is a zip file, extract the *.img.

(Win) Open the folder you have the recovery, do a [Shift+RightClick] and select "Open command window here".

(Lnx) Open the folder you have the recovery, RigthClick and select "Open in Terminal".

Execute the commands:

adb push recovery.img /sdcard/recovery.img
adb shell erase_image recovery
adb shell flash_image recovery /sdcard/recovery.img

Reboot Phone into recovery as normal.

[cLK]

Flashing the *.img file while in fastboot mode(cLK menu)

Download the recovery file to your computer.

If it is a zip file, extract the *.img.

(Win) Open the folder you have the recovery, do a [Shift+RightClick] and select "Open command window here".

(Lnx) Open the folder you have the recovery, RigthClick and select "Open in Terminal".

Reboot phone into cLK menu (fastboot mode).

If needed, change the size of the 'recovery' partition on the fly (under SETTINGS/RESIZE PARTITIONS).

Execute the commands:

fastboot erase recovery
fastboot flash recovery recovery.img
fastboot oem boot-recovery

[MAGLDR]

Flashing the *.img file while in USB Flasher mode(using DAF.exe)

[B][COLOR="Red"]WARNING!!![/COLOR] This way of flashing will erase your current Rom on NAND too!
You will probably want to do this
[COLOR="Red"]ONLY IF[/COLOR] you need to increase the size of the 'recovery' partition![/B]

Download the recovery file to your computer.

If it is a zip file, extract the *.img.

Open the folder you have the recovery and place DAF.exe and flash.cfg in that same folder.

Edit flash.cfg according to required recovery partition size:

Make sure the .img file has the name that flash.cfg specifies!!

i.e. If the *.img file is named recovery.img and min-required-size = 8MB then the flash.cfg could be:

misc ya 1M
[U]recovery rrecov|ro|nospr 8M recovery.img[/U]
boot yboot|ro 5M
system ya 150M
cache ya 2M
userdata ya|asize|hr allsize

Check out the info about flash.cfg.

Connect the device to the computer via usb, enter MAGLDR and select USB Flasher option.

Right click on DAF.exe and select Run as Administrator.

Click [NEXT] when asked and wait to finish.

Post-Installation:

---------------------

Make sure you delete /sdcard/TWRP/.twrps.

If you're using a theme, update your theme file or temporarily switch to the default theme.

A big Thank-You for supporting/testing the ExtendedTWRP to:

---------------------

Dark_Avenger

NYLimited

DarrenNewsgroup

Nixda99

MarkAtHome

Robbie P