[Unofficial] TWRP 3.1.0-0 for Meizu M2 Note - Meizu MX

TeamWin Recovery
What's new in 3.1.0-0:
# vold decrypt on a few select HTC devices, TWRP will now attempt to use the system partition's vold and vdc binaries and libraries to decrypt the data partition (nkk71 and CaptainThrowback)
# adb backup to stream a backup directly to or from your PC, see documentation here (bigbiff)
# tweak MTP startup routines (mdmower)
# support new Android 7.x xattrs for backup and restore to fix loss of data after a restore (Dees_Troy)
# support POSIX file capabilities backup and restore to fix VoLTE on HTC devices and possibly other issues (Dees_Troy)
# better indicate to users that internal storage is not backed up (Dees_Troy)
# improve automatic determination of TW_THEME (mdmower)
# minimal getcap and setcap support (_that)
# try mounting both ext4 and f2fs during decrypt (jcadduono and Dees_Troy)
# shut off backlight with power key (mdmower)
# timeout during FDE decrypt (Dees_Troy and nkk71)
# support for FBE decrypt and backing up and restoring FBE policies (Dees_Troy)
# boot slot support (Dees_Troy)
# TWRP app install prompt during reboot (Dees_Troy) > Only for Official
# support for AB OTA zips (Dees_Troy)
# support new Android 7.x log command (Dees_Troy)
# update recovery sources to AOSP 7.1 (Dees_Troy)
# numerous bugfixes and improvements by too many people to mention
Bug.? You tell me
Link :
https://drive.google.com/file/d/0By49Zozsl43hdnB0aG43NEZJTVE/view?usp=drivesdk
# Just Flash via current your TWRP
Thanks to :
- ShevT
- Mohancm
- Jonnyxda
Source :
Twrp.me

THX

finally... we have latest TWRP .....
thanks.... !

Can I flash it via previous twrp ..??

465swa said:
Can I flash it via previous twrp ..??
Click to expand...
Click to collapse
Yes, you can.

Thanks

yui90 said:
TeamWin Recovery
What's new in 3.1.0-0:
# vold decrypt on a few select HTC devices, TWRP will now attempt to use the system partition's vold and vdc binaries and libraries to decrypt the data partition (nkk71 and CaptainThrowback)
# adb backup to stream a backup directly to or from your PC, see documentation here (bigbiff)
# tweak MTP startup routines (mdmower)
# support new Android 7.x xattrs for backup and restore to fix loss of data after a restore (Dees_Troy)
# support POSIX file capabilities backup and restore to fix VoLTE on HTC devices and possibly other issues (Dees_Troy)
# better indicate to users that internal storage is not backed up (Dees_Troy)
# improve automatic determination of TW_THEME (mdmower)
# minimal getcap and setcap support (_that)
# try mounting both ext4 and f2fs during decrypt (jcadduono and Dees_Troy)
# shut off backlight with power key (mdmower)
# timeout during FDE decrypt (Dees_Troy and nkk71)
# support for FBE decrypt and backing up and restoring FBE policies (Dees_Troy)
# boot slot support (Dees_Troy)
# TWRP app install prompt during reboot (Dees_Troy) > Only for Official
# support for AB OTA zips (Dees_Troy)
# support new Android 7.x log command (Dees_Troy)
# update recovery sources to AOSP 7.1 (Dees_Troy)
# numerous bugfixes and improvements by too many people to mention
Bug.? You tell me
Link :
https://drive.google.com/file/d/0By49Zozsl43hdnB0aG43NEZJTVE/view?usp=drivesdk
# Just Flash via current your TWRP
Thanks to :
- ShevT
- Mohancm
- Jonnyxda
Source :
Twrp.me
Click to expand...
Click to collapse
the temperature of cpu is 0. Is this a bug?

Pcti888 said:
the temperature of cpu is 0. Is this a bug?
Click to expand...
Click to collapse
Yes, if there is time I will fix.

yui90 said:
Yes, if there is time I will fix.
Click to expand...
Click to collapse
thx,,:highfive:

Your recovery is the only that worked for me please dont keep your thread dead ill be using it for sure!

Its outdated recovery use one from LOS 14.1 thread.

n0p3zz said:
Its outdated recovery use one from LOS 14.1 thread.
Click to expand...
Click to collapse
It doesnt work ,it gets stucked on wipe.

Posso instalar o twrp atraves do flashfy ?m2note 571h

Related

[v9.52] Online Nandroid / Nandroid Backup without re-booting [CWM + TWRP + 4EXT]

Nandroid backups are usually performed in recovery mode. This means you would have to turn off your phone and reboot in recovery mode, which wastes a whole lot of time rebooting and a lot more time offline. For me, this has been a killer as I do regular nandroid backups. Having to reboot in recovery and finding missed calls, sms from my wife and friends is totally not accepatable for me. So, I set to develop an online nandroid backup tool, namely Online Nandroid, which can do nandroid backups without switching off my phone.
Today, I am releasing it to public, as it may serve good for some others too. Originally I developed Online Nandroid specifically for Xperia devices, but now I am releasing it for all android devices.
This tool, eventhough called "Online Nandroid", does not upload/save backups to any online/cloud services. Online here means that it does backup while phone is live or still running Android.
The short name onandroid is meant to be pronouced as o-nandroid or o'nandroid and NOT on-android.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Online Nandroid backups the below partitions to /sdcard/clockworkmod/backup directory.
mmcblk0_start (for Acer devices)
uboot (for MTK based devices)
boot
recovery
wimax (for Samsung devices)
appslog (for HTC and Sony (Ericsson) devices)
kernel
system
data
cache
datadata (for Samsung devices)
efs (for Samsung devices)
preload (for Samsung devices)
.cust_backup (for Huawei devices)
flexrom (for Acer devices)
custpack (for Alcatel devices)
mobile_info (for Alcatel devices)
boot (for HP Touchpad)
.android_secure
sd-ext
The date format used for folder name is the same used by CWM itself and nandroid backups created with Online Nandroid can safely be restored using CWM, TWRP and 4EXT recoveries.
Feedback (especially ideas to improve) are most welcome.
Official List of Supported Devices: http://bit.ly/OnlineNandroid-SupportedDevices
Requirements:
1. Rooted android phone
2. A terminal emulator installed on phone
3. Latest version of Busybox
4. A working CWM, TWRP or 4EXT based recovery installed
5. Some patience
Installation:
1. Download and copy zip file to SD card
2. Reboot into recovery
3. Choose install zip from SD card, select zip and flash
4. Reboot
Usage:
1. Open terminal emulator
2. Type su to obtain root
3. Type onandroid
4. Wait and watch
[HIGHLIGHT]If you are getting error mkyaffs2image not found in path, try fix tool in this post.[/HIGHLIGHT]
.
[HIGHLIGHT]If you are getting error dedupe not found in path, try dedupe tool in this post.[/HIGHLIGHT]
.
[HIGHLIGHT]If Online Nandroid is failing to find boot and recovery partitions, flash the zip file for your device from here. If your device is not on the list, post a comment there or post a reply in this thread with your device model.[/HIGHLIGHT]
[HIGHLIGHT]If you have a Motorola RAZR i and are unable to flash the provided zip files, visit this thread and get zip files specific for your device.[/HIGHLIGHT]
The behaviour of Online Nandroid can be adjusted by using command line flags, some of which are described in detail below. Each command line flag has its longer counter-part and both forms can be mixed. For a complete list of command line flags and short descriptions, you can type:
Code:
onandroid -h
OR
onandroid --help
Custom Backup Name:
* Example:
Code:
onandroid -c NAME
OR
onandroid --custom NAME
* Please be careful not to include characters not allowed in filenames.
Timezone modifier:
* Example: Use phone timezone for backup file name
Code:
onandroid -p
OR
onandroid --phone
* Example: Use UTC (default) for backup file name
Code:
onandroid -u
OR
onandroid --utc
* Note: UTC is used as default (if no timezone modifier is passed). This is to comply with CWM nandroid backups.
Backup Modes:
* Good old backup mode (default).
* Example:
Code:
onandroid -o
OR
onandroid --old
* Note: This is the most commonly known, default backup format.
* Split backup mode (CWM6+ only).
* Example:
Code:
onandroid -l
OR
onandroid --split
* Note: This is specifically useful if you have partitions which are over 2GB in size. Use this only if you have CWM 6+.
* CWM6 style incremental / dedupe backup mode.
* Example:
Code:
onandroid -i
OR
onandroid --incremental
* Garbage collect. For incremental backups (used for cleanup after deleting incremental backups).
* Example:
Code:
onandroid -gc
OR
onandroid --garbage-collect
* Advanced / Selective backup mode. For backing up only specific partitions.
* Example:
Code:
onandroid -a PARTITIONS
OR
onandroid --advanced PARTITIONS
* Partition letters / names can be found by typing onandroid -ah
* TWRP backup mode.
* Example:
Code:
onandroid -w
OR
onandroid --twrp
* By default, TWRP backup mode creates uncompressed backups. If compressed backups are required, use it like this:
Code:
onandroid -w -ce
OR
onandroid --twrp --compression-enable
* By default, TWRP backup mode generates md5sum. If md5sums are not required, use it like this:
Code:
onandroid -w -md
OR
onandroid --twrp --md5-disable
Replace Older Backups (with same name) - used with custom backup names:
* While using custom backup names, Online Nandroid will not allow an already existing backup name to be specified, by default. Trying this will return an error and halt backup. If you want to replace the older backup with a new backup, by using the same custom backup name, you can specify the below command line flag.
* Example:
Code:
onandroid -c MyBackup -r
OR
onandroid --custom MyBackup --replace
* Note: This will only work with custom backup names. This can be used to update a backup from a previous state, by way of using advanced backup mode in combination with this mode.
Change Log:
Code:
v1.0 - Initial release.
v1.1 - Bug Fix: incorrect implementation of help command.
v1.2 - Bug Fix: changed script permissions from 777 to 755
Improvement: changed elapsed display of seconds only to minutes & seconds.
v1.3 - Bug Fix: error if /sbin/sh is not present.
v2.0 - Fixed: various bugs and re-organized script.
Added: timezone modifier.
Improved: usage instructions screen.
Added: su detection.
v2.1 - Bug Fix: .android_secure partition not being backed-up correctly.
v2.2 - Bug Fix: size calculation of .android_secure partition.
v2.3 - Improvement: size calculation in .android_secure partition.
v3.0 - Bug Fix: unknown uid 0 (incorrect detection of root).
Added: sd-ext backup.
Added: battery level check.
Added: SD card check.
Improved: .android_secure backup.
Fixed: various bugs and re-organized script.
v3.1 - Bug Fix: SD card not found error on some devices.
Re-organization of script and removal of bloat code.
v3.2 - Bug Fix: Incorrect detection of root.
Added: New logging mechanism.
v3.3 - Bug Fix: Incorrect sdcard mounting.
Bug Fix: Various fixes for busybox conflicts.
Improvement: Logging mechanism.
v3.4 - Bug Fix: Empty md5sum.
Bug Fix: Size calculation of sdcard.
Bug Fix: Script exiting before sd-ext and .android_secure partitions backed-up.
v3.5 - Bug Fix: Busyboxed 'which' command.
Removed some log lines for cleaning-up.
v3.6 - Removed: mount format detection bloat due to non-busyboxed version.
v3.7 - Busyboxed "cat" commands.
Added: Battery level detection for Xperia X10.
Re-positioned root detection.
v4.0 - Added: LED and vibrate notification on backup completion.
Bug Fix: Minor bug in "tar" detection.
Bug Fix: Cannot create log file.
v4.1 - Bug Fix: Corrected size checking of .android_secure partition.
v4.2 - Added: md5sum verification.
Improved: md5sum generation.
v5.0 - Added: Backup of boot, recovery, wimax and appslog partitions.
Added: Proper sdcard detection.
Added: Detailed error logging.
Added: Cleaning-up temp mounts upon exits.
Added: LED notification for Xperia U.
Added: Version number to log.
Added: ext2/3/4 and rfs file system support.
Added: Avoid mkyaffs2image detection if device does not have a yaffs2 partition.
Added: Force remounting and unmounting.
Added: system, data, cache, datadata and .android_secure partition detection.
Improved: sd-ext detection.
Improved: sd-ext backup.
Improved: md5sum generation and validation.
Improved: sd-ext detection.
Improved: Usage instructions screen.
Improved: Battery level detection.
Improved: LED and vibrate notification.
Increased safety space from 7MB to 10MB.
Code clean-up and re-organization.
v5.1 - Bug Fix: Minor bug in sd card detection when device has internal storage and an external sd card mounted.
Bug Fix: Bug in .android_secure backup.
v5.2 - Bug Fix: SD Card detection in Jellybean devices.
Bug Fix: boot partition detection in devices with sboot partition.
Added: /efs partition backup (for Samsung devices).
Increased: Safety size from 10 to 12.
v5.3 - Added: Partition detection via part_detect_tool.
Bug Fix: boot, recovery, wimax and appslog partition backup for non-mtd devices.
Bug Fix: boot, recovery, wimax and appslog partition detection (Exact partition names).
Improvement: Busyboxed some cut and grep commands.
Removed: Some unwanted code in partition detection.
v5.4 - Bug Fix: Error logging of partition layout.
Bug Fix: sd-ext detection bug.
Improvement: Logging of required space.
v5.5 - Bug Fix: SD Card detection.
Bug Fix: sd-ext detection.
Bug Fix: sd-ext backup method.
Bug Fix: boot, recovery, wimax and appslog partition size calculation.
Bug Fix: socket ignored error by tar.
Bug Fix: /data/media included in /data partition backup.
Bug Fix: sd-ext included in /data partition backup for app2sd, link2sd, etc... setups.
Bug Fix: Eliminate /data/media while calculating used size of /data partition.
v5.6 - Bug Fix: basename error on some devices.
Bug Fix: md5sum spitting an error if .android_secure not backed-up.
Bug Fix: Fixed regression bug in sd card and sd-ext detection.
v5.7 - Bug Fix: partition detection.
Bug Fix: sd card space calculation on some devices.
Improvement: some busyboxing.
v5.75 - Bug Fix: partition detection. (bug introduced in v5.7)
v5.8 - Bug Fix: partition detection.
v5.9 - Added: /.cust_backup partition backup (for Huawei devices).
Bug Fix: Partition detection.
Bug Fix: Include sd-ext folder in data partition while skipping it's contents.
v6.00 - Added: CWM 6 style incremental backups.
Added: Garbage cleaning for incremental backups.
Added: Advanced backup / Selective backup.
Added: Long arguments for timezone.
Added: Setting alternate storage media via command line flag.
Added: Setting sd-ext path via command line flag.
Added: Battery level checking for HTC One X.
Added: Split backup mode (CWM 6+ only).
Added: Backup mode detection via .default_backup_format file (used by CWM).
Added: Advanced backup mode detection via .advanced_backup_partitions file.
Added: /flexrom and mmcblk0_start partitions backup (for Acer devices).
Added: Revamped and more useful progress indicators.
Added: Na Rnfgre Rtt.
Added: Replacing named backups with command line flag.
Added: Disabling notifications with command line flag.
Added: Setting progress indicator type with command line flags.
Added: Trapping exit/kill signals and cleaning up before exiting.
Added: Prompt whether to replace if backup name exists.
Added: BusyBox version checking.
Removed: Partition skip messages for device specific partitions.
Removed: Safety pin size adjustment.
Improved: Size calculation of /data partition if /data/media exists.
Improved: Battery level checking.
Improved: Code used for processing arguments.
Improved: .android_secure detection.
Improved: .android_secure size calculation.
Improved: Help screens.
Improved: Detection and backup of /.cust_backup partition.
Improved: Size calculation in all partitions.
Improved: SD Card detection and automatic selection of external SD Card.
Improved: Logging in log file.
Improved: Some more busyboxing.
Changed: Argument for setting timezone. (-p for phone timezone instead of -h)
Changed: Minor version numbers to 2 digits.
Re-organisation of code.
v6.01 - Bug Fix: sdcard detection in some devices using native app2sd.
v6.10 - Bug Fix: Actually fixed the bug mentioned in v6.01 changelog.
Added: HP Touchpad boot partition backup. (Partition letter p)
Bug Fix: mkyaffs2image requirement detection
BugFix: Removed disk dump of boot partition for Acer devices and HP Touchpad.
v6.11 - Bug Fix: Filesystem detection in data partition for incremental backups.
Bug Fix: wrong partition detected as sd-ext in some devices.
v6.12 - Bug Fix: filesystem detection in data partition on some devices.
v6.13 - Bug Fix: .android_secure detection when an alternate storage media is selected.
Bug Fix: Remount error in AROMA terminal.
Bug Fix: Avoid clearing log file while checking the version number only.
v6.14 - Bug Fix: Busyboxed ls command in md5 verification.
Bug Fix: Added some detailed error logging for could not change to path errors.
Bug Fix: Could not change to path errors.
v7.00 - Added: TWRP support.
Added: Specific exit codes for exits upon an error.
Added: Device details to log file.
Added: Output PID to onandroid.pid file upon each run.
Added: /preload partition backup. (Partition letter "o".)
Added: Flag to backup yaffs2 partitions as tar archives.
Added: Notice to install patch file, if boot partition was not found.
Removed: cpuid backup on Acer devices, since it freezes on some ROMs.
Removed: sd-ext not found message. Not all devices have one.
Removed: .android_secure not found message. Not all devices have one.
Improved: More elegant backup process.
Improved: Some internal variable naming.
Bug Fix: Notification disable did not work in some devices.
Bug Fix: Busyboxing of some commands.
Bug Fix: Minor bug in error logging.
v7.01 - Bug Fix: Duplicate md5sum generation while using replace mode.
Removed: A redundent code block.
v7.50 - Added: Copy log file to backup folder at the end of backup.
Added: Replace the word "date" in backup name with current date.
Added: Finally busyboxed md5sum dd and tar calls.
Added: Kill all sub-processes upon exits.
Added: Ability to backup emmc partitions for MTK based devices.
Bug Fix: Incomplete backups while using compression (default) in TWRP mode.
Bug Fix: Partition size detection of emmc partitions.
Bug Fix: Notification on some devices.
Bug Fix: sd-ext detection on some devices.
Bug Fix: Could not change to folder bug in some devices, in TWRP mode.
v7.52 - Bug Fix: Minor mistake in description of nandroid_dd function.
Bug Fix: Reverted fix in v7.50 for partition size detection of emmc partitions.
v7.53 - Bug Fix: Unknown operand bug in power level detection.
Bug Fix: Restore not working on some Android 4.2 devices.
Bug Fix: Progress percentage for split backup mode.
Bug Fix: Double backup of /data/data directory in TWRP mode.
v8.00 - Added: License to script file.
Added: Ability to specify path to busybox via command line flag.
Added: Ability to specify path to busybox via onandroid.busybox file.
Added: Partition layout detection for MediaTek (MTK) based devices without patch file.
Added: Proper sd-ext detection if sd-ext is mounted at /data.
Added: A second help screen with -h2 / --help2 .
Added: Information to log file about installed recovery.
Added: /custpack partition backup, for Alcatel devices. (Partition letter "h".)
Added: /mobile_info partition backup, for Alcatel devices. (Partition letter "i".)
Added: TWRP setting TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID support.
Added: TWRP setting TW_FORCE_CPUINFO_FOR_DEVICE_ID support.
Added: Exclude Google Music cache files.
Added: Replace the string "romname" in custom backup name, with name of ROM.
Improved: Excludes detection.
Improved: Excludes in incremental backup mode.
Added: TWRP compression using gzip (use -cg flag).
Bug Fix: Unmounting and removing temporary mounts fail at times.
Bug Fix: Progress percentage stuck during split backup on some devices.
Bug Fix: Exit code for busybox not found.
v8.10 - Added: /data/data partition backup (partition letter "j").
Added: Output which busybox is being used.
Bug Fix: TWRP default backup name to use hyphen instead of dot.
Bug Fix: Minor bug in excludes detection.
Bug Fix: Premature end of backup process.
v8.11 - Bug Fix: The infamous cat write error.
Bug Fix: Gzip compression not working on some devices.
Bug Fix: Unknown operand error with some busybox versions.
v8.12 - Bug Fix: Recovery partition backup on HTC One (Sprint).
Bug Fix: Minor bug in partition size calculation.
v8.20 - Added: Return device ID used by TWRP (-d flag).
Removed: (cp)uid from list of partitions help screen.
v8.21 - Bug Fix: boot and recovery partition backup on MTD devices.
v8.22 - Bug Fix: SD Card detection on some devices with emulated SD Card.
v9.00 - Added: Option to exclude dalvik-cache from backups (-xd flag).
Added: AmonRA, 4EXT and Safestrap recovery detection.
Added: Split TWRP backups larger than 2GB.
Added: uboot partition backup for some MTK based devices (Partition letter "k").
Added: Prevent multiple instances of script from running.
Added: -d / --device-id flag to help screen 2.
Added: Localization support via external language files.
Added: boot partition backup on Nook Color (Partition letter "n").
Added: kernel partition backup (Partition letter "g").
Changed: onandroid.log file inside backup folder to recovery.log.
Changed: Made exclusion of Google Music files from backups, optional (-xg flag).
Changed: Log function to use log applet from toolbox.
Bug Fix: Specifying partition letter h (for /custpack) brings up help screen.
Bug Fix: Partition detection on Allwinner devices.
Bug Fix: Busybox version error did not exit script.
Bug Fix: .advanced_backup_partitions file not detected at TWRP folder.
Removed: Command line flag for busybox path, as it cannot be relied upon.
Improved: Some coding style improvements.
Improved: Backup replace mode now replaces once all partitions are backed up only.
Improved: Progress indicators.
v9.10 - Added: Exclude dalvik-cache from sd-ext
Bug Fix: WRONG_ARGS displayed on help screen.
Bug Fix: Minor fixes and improvements.
v9.20 - Bug Fix: Multiple instances error with some apps.
Bug Fix: Wrong sd-ext detection on some devices.
v9.50 - Added: LED notification for Samsung Galaxy Relay 4G.
Added: Ability to manually specify device ID for TWRP (-ds flag).
Added: modem partition backup (partition letter q).
Added: TA partition backup (partition letter v).
Added: Support for Action CPUs.
Improved: Space calculation.
Improved: Merged boot partition letter for different devices.
Bug Fix: Replace mode deletes old backup if not enough space.
Bug Fix: Wrong sd-ext detection on some devices.
Bug Fix: Partition size calculation on emmc devices.
Bug Fix: Slow file listing in TWRP mode on some devices.
v9.51 - Added: Preservation of SELinux contexts.
Bug Fix: Data partition size calculated incorrectly when excluding Google Music cache.
Bug Fix: TWRP backups taking too long for file list.
v9.51 - Bug Fix: TWRP backups taking too long for file list.
Twitter: @OnlineNandroid
Source: http://bit.ly/OnlineNandroid
Issue Tracker: http://bit.ly/OnlineNandroid-issues
Older Versions: http://bit.ly/OnlineNandroid-downloads
Apps / GUIs, Tools, ROMs using Online Nandroid
Apps / GUIs:
App Backup
XDA ROM Hub
Online Nandroid Backup
Onandroid
Universal Android AIO Flasher Tool$
Droid Manager
Orange Backup
Android Tweaker
Samsung Galaxy S4 Toolkit
ZipInstaller
Other Tools:
Tasker Profile by FadeFx
Tutorial: How to Setup Online Nandroid in Script Manager / SManager
Tasker Wizard
ROMs with Online Nandroid:
RE-FLEXxx-STRYKER (for Iconia A500)
CriskeloRomV6 (for Galaxy S III)
evodevcustom5.07
X-ZOOM For Micromax A60
Galaxy MOD
WinterMod Evo
Vanilla RootBox
JellySandwich ONE
ArchiDroid
For Developers
Moved here: https://github.com/ameer1234567890/OnlineNandroid/wiki/For-Developers
I assume that it's not recommended to do other stuff on the phone while it's backing up. Wouldn't a change in /data while backing up corrupt said file?
doomed151 said:
I assume that it's not recommended to do other stuff on the phone while it's backing up. Wouldn't a change in /data while backing up corrupt said file?
Click to expand...
Click to collapse
It's always better not to be doing anything else while backup is running. Anyways, the system gets slow while backing up, so you wont be able to do a lot many. I do not think any changed data would corrupt the backup and I have even tried doing some things like texting, calling, playing music, etc while backup is running and it has never given any issues.
Very nice script, I must say
It can easily be converted to an app, the only thing is the backup part has to be done on another thread to prevent ANR errors!
See my USB OTG app (link in signature), it also uses shell commands to do its work
Hi, thanks for this. Very convenient indeed.
Now I no longer need to reboot in recovery to do a nandroid backup.
Will try restoring from the backuo created.
Thanks again. B-)
Sent from my MK16i using XDA
Version 1.2 released!
# onandroid
sh: applet not found
why? file is ok installed but command dont work
How come I keep getting this error? Stock ics xperia ray with sirkays xray kernel.
kamil004 said:
# onandroid
sh: applet not found
why? file is ok installed but command dont work
Click to expand...
Click to collapse
Try re-flashing the latest (v1.2) zip file.
*boy*racer* said:
How come I keep getting this error? Stock ics xperia ray with sirkays xray kernel.
Click to expand...
Click to collapse
You do not have CWM recovery installed, as mentioned on requirements.
ameer1234567890 said:
Try re-flashing the latest (v1.2) zip file.
Click to expand...
Click to collapse
same error, applet not found.
mayby put this file in other folder?
EDIT:
I change #!/sbin/sh > #!/system/bin/sh in onandroid file and alls work perfectly
ameer1234567890 said:
You do not have CWM recovery installed, as mentioned on requirements.
Click to expand...
Click to collapse
I have CWM built in the kernel. Is that a problem?
Sent from my Xperia Ray using xda premium
kamil004 said:
same error, applet not found.
mayby put this file in other folder?
EDIT:
I change #!/sbin/sh > #!/system/bin/sh in onandroid file and alls work perfectly
Click to expand...
Click to collapse
Good to know that it worked. I shall include a fix in the next version.
*boy*racer* said:
I have CWM built in the kernel. Is that a problem?
Click to expand...
Click to collapse
That should not be a problem at all.
Does normal nandroid backup from within CWM work?
ameer1234567890 said:
That should not be a problem at all.
Does normal nandroid backup from within CWM work?
Click to expand...
Click to collapse
Yeah it works fine from CWM itself. I will download a different version and see what happens.
EDIT: no I still get same error. Oh well, thanks anyway
Sent from my Xperia Ray using xda premium
Version 1.3 released!
*boy*racer* said:
Yeah it works fine from CWM itself. I will download a different version and see what happens.
EDIT: no I still get same error. Oh well, thanks anyway
Click to expand...
Click to collapse
What is the version of CWM? What ROM are you using?
ameer1234567890 said:
What is the version of CWM? What ROM are you using?
Click to expand...
Click to collapse
CWM - 5.0.2.7
Rom - stock ICS (4.1.A.0.562)
Kernel - stock with added CWM
Sent from my Xperia Ray using xda premium

[DEV]How to compile TWRP touch recovery

All of TWRP 3.x source is public. You can compile it on your own. This guide isn't going to be a step-by-step, word-for-word type of guide. If you're not familiar with basic Linux commands and/or building in AOSP then you probably won't be able to do this.
You can currently use Omni 6.0, Omni 7.1, Omni 8.1, Omni 9.0, CM 13.0, CM 14.1, CM 15.1, LineageOS 16.0 source code. Omni 9.0 is recommended for now unless your device has a super partition.
If you are using CM/LineageOS, you'll need to place TWRP in the LineageOS/bootable/recovery-twrp folder and set RECOVERY_VARIANT := twrp in your BoardConfig.mk file. TWRP source code can be found here:
https://github.com/TeamWin/android_bootable_recovery (NOTE: The location for the latest TWRP source code has changed!)
Select the newest branch available. This step is not necessary with Omni because Omni already includes TWRP source by default, however, if you are using an older version of Omni, you will probably want to pull from the latest branch (the latest branch will compile successfully in older build trees)
If you are only interested in building TWRP, you may want to try working with a smaller tree. You can try using this manifest. It should work in most cases but there may be some situations where you will need more repos in your tree than this manifest provides:
https://github.com/minimal-manifest-twrp
*BEFORE YOU COMPILE*
Note: If you add or change any flags, you will need to make clean or make clobber before recompiling or your flag changes will not be picked up.
Now that you have the source code, you'll need to set or change a few build flags for your device(s). Find the BoardConfig.mk for your device. The BoardConfig.mk is in your devices/manufacturer/codename folder (e.g. devices/lge/hammerhead/BoardConfig.mk).
Your board config will need to include architecture and platform settings. Usually these are already included if you're using device configs that someone else created, but if you created your own, you may need to add them. Without them, recovery may seg fault during startup and you'll just see the teamwin curtain flash on the screen over and over.
We usually put all of our flags at the bottom of the BoardConfig.mk under a heading of #twrp For all devices you'll need to tell TWRP what theme to use. This TW_THEME flag replaces the older DEVICE_RESOLUTION flag. TWRP now uses scaling to stretch any theme to fit the screen resolution. There are currently 5 settings which are: portrait_hdpi, portrait_mdpi, landscape_hdpi, landscape_mdpi, and watch_mdpi. For portrait, you should probably select the hdpi theme for resolutions of 720x1280 and higher. For landscape devices, use the hdpi theme for 1280x720 or higher.
TW_THEME := portrait_hdpi
Note that themes do not rotate 90 degrees and there currently is no option to rotate a theme. If you find that the touchscreen is rotated relative to the screen, then you can use some flags (discussed later in this guide) to rotate the touch input to match the screen's orientation.
In addition to the resolution, we have the following build flags:
RECOVERY_SDCARD_ON_DATA := true -- this enables proper handling of /data/media on devices that have this folder for storage (most Honeycomb and devices that originally shipped with ICS like Galaxy Nexus) This flag is not required for these types of devices though. If you do not define this flag and also do not include any references to /sdcard, /internal_sd, /internal_sdcard, or /emmc in your fstab, then we will automatically assume that the device is using emulated storage.
BOARD_HAS_NO_REAL_SDCARD := true -- disables things like sdcard partitioning and may save you some space if TWRP isn't fitting in your recovery patition
TW_NO_BATT_PERCENT := true -- disables the display of the battery percentage for devices that don't support it properly
TW_CUSTOM_POWER_BUTTON := 107 -- custom maps the power button for the lockscreen
TW_NO_REBOOT_BOOTLOADER := true -- removes the reboot bootloader button from the reboot menu
TW_NO_REBOOT_RECOVERY := true -- removes the reboot recovery button from the reboot menu
RECOVERY_TOUCHSCREEN_SWAP_XY := true -- swaps the mapping of touches between the X and Y axis
RECOVERY_TOUCHSCREEN_FLIP_Y := true -- flips y axis touchscreen values
RECOVERY_TOUCHSCREEN_FLIP_X := true -- flips x axis touchscreen values
TWRP_EVENT_LOGGING := true -- enables touch event logging to help debug touchscreen issues (don't leave this on for a release - it will fill up your logfile very quickly)
BOARD_HAS_FLIPPED_SCREEN := true -- flips the screen upside down for screens that were mounted upside-down
There are other build flags which you can locate by scanning the Android.mk files in the recovery source. Most of the other build flags are not often used and thus I won't document them all here.
*RECOVERY.FSTAB*
TWRP 2.5 and higher supports some new recovery.fstab features that you can use to extend TWRP's backup/restore capabilities. You do not have to add fstab flags as most partitions are handled automatically.
Note that TWRP only supports v2 fstabs in version 3.2.0 and higher. You will still need to use the "old" format of fstab for older TWRP (example of that format is below), and even TWRP 3.2.0 still supports the v1 format in addition to the v2 format. To maximize TWRP's compatibility with your build tree, you can create a twrp.fstab and use PRODUCT_COPY_FILES to place the file in /etc/twrp.fstab When TWRP boots, if it finds a twrp.fstab in the ramdisk it will rename /etc/recovery.fstab to /etc/recovery.fstab.bak and then rename /etc/twrp.fstab to /etc/recovery.fstab. Effectively this will "replace" the fstab 2 file that your device files are providing with the TWRP fstab allowing you to maintain compatibility within your device files and with other recoveries.
Code:
PRODUCT_COPY_FILES += device/lge/hammerhead/twrp.fstab:recovery/root/etc/twrp.fstab
The fstab in TWRP can contain some "flags" for each partition listed in the fstab.
Here's a sample TWRP fstab for the Galaxy S4 that we will use for reference:
Code:
/boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot
/system ext4 /dev/block/platform/msm_sdcc.1/by-name/system
/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata length=-16384
/cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache
/recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery
/efs ext4 /dev/block/platform/msm_sdcc.1/by-name/efs flags=display="EFS";backup=1
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable
/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=display="USB-OTG";storage;wipeingui;removable
/preload ext4 /dev/block/platform/msm_sdcc.1/by-name/hidden flags=display="Preload";wipeingui;backup=1
/modem ext4 /dev/block/platform/msm_sdcc.1/by-name/apnhlos
/mdm emmc /dev/block/platform/msm_sdcc.1/by-name/mdm
Flags are added to the end of the partition listing in the fstab separated by white space (spaces or tabs are fine). The flags affect only that partition but not any of the others. Flags are separated by semicolons. If your display name is going to have a space, you must surround the display name with quotes.
Code:
/external_sd vfat /dev/block/mmcblk1p1 flags=display="Micro SDcard";storage;wipeingui;removable
The flags for this partition give it a display name of "Micro SDcard" which is displayed to the user. wipeingui makes this partition available for wiping in the advanced wipe menu. The removable flag indicates that sometimes this partition may not be present preventing mounting errors from being displayed during startup. Here is a full list of flags:
removable -- indicates that the partition may not be present preventing mounting errors from being displayed during boot
storage -- indicates that the partition can be used as storage which makes the partition available as storage for backup, restore, zip installs, etc.
settingsstorage -- only one partition should be set as settings storage, this partition is used as the location for storing TWRP's settings file
canbewiped -- indicates that the partition can be wiped by the back-end system, but may not be listed in the GUI for wiping by the user
userrmrf -- overrides the normal format type of wiping and only allows the partition to be wiped using the rm -rf command
backup= -- must be succeeded by the equals sign, so backup=1 or backup=0, 1 indicates that the partition can be listed in the backup/restore list while 0 ensures that this partition will not show up in the backup list.
wipeingui -- makes the partition show up in the GUI to allow the user to select it for wiping in the advanced wipe menu
wipeduringfactoryreset -- the partition will be wiped during a factory reset
ignoreblkid -- blkid is used to determine what file system is in use by TWRP, this flag will cause TWRP to skip/ignore the results of blkid and use the file system specified in the fstab only
retainlayoutversion -- causes TWRP to retain the .layoutversion file in /data on devices like Sony Xperia S which sort of uses /data/media but still has a separate /sdcard partition
symlink= -- causes TWRP to run an additional mount command when mounting the partition, generally used with /data/media to create /sdcard
display= -- sets a display name for the partition for listing in the GUI
storagename= -- sets a storage name for the partition for listing in the GUI storage list
backupname= -- sets a backup name for the partition for listing in the GUI backup/restore list
length= -- usually used to reserve empty space at the end of the /data partition for storing the decryption key when Android's full device encryption is present, not setting this may lead to the inability to encrypt the device
canencryptbackup= -- 1 or 0 to enable/disable, makes TWRP encrypt the backup of this partition if the user chooses encryption (only applies to tar backups, not images)
userdataencryptbackup= -- 1 or 0 to enable/disable, makes TWRP encrypt only the userdata portion of this partition, certain subfuldes like /data/app would not be encrypted to save time
subpartitionof= -- must be succeeded by the equals sign and the path of the partition it is a subpartition of. A subpartition is treated as "part" of the main partition so for instance, TWRP automatically makes /datadata a subpartition of /data. This means that /datadata will not show up in the GUI listings, but /datadata would be wiped, backed up, restored, mounted, and unmounted anytime those operations are performed on /data. A good example of the use of subpartitions is the 3x efs partitions on the LG Optimus G:
Code:
/efs1 emmc /dev/block/mmcblk0p12 flags=backup=1;display=EFS
/efs2 emmc /dev/block/mmcblk0p13 flags=backup=1;subpartitionof=/efs1
/efs3 emmc /dev/block/mmcblk0p14 flags=backup=1;subpartitionof=/efs1
This lumps all 3 partitions into a single "EFS" entry in the TWRP GUI allowing all three to be backed up and restored together under a single entry.
As of TWRP 3.2.0, TWRP now supports a version 2 fstab like those that have been found in Android devices for years. Yes, I know we're really slow to adopt this one, but I also saw no major advantage to v2 and the v2 fstab was being used in regular Android as well as recovery and I didn't want full ROM builds crashing or doing other weird things because of TWRP flags being present in the fstab. Version 2 fstab support is automatic. You don’t need to add any build flags. The regular version 1 fstab format is also still valid and it’s possible to use both v1 and v2 types in the same fstab. TWRP 3.2.0 also supports using wildcards via the asterisk in v1 format which can be useful for USB OTG and micro SD cards with multiple partitions. Note also that v2 fstab formats haven’t been extensively tested so developers should test their v2 fstabs before shipping to users (you should always be testing anyway!).
This is a v1 fstab line with a wildcard intended for a USB OTG drive. All partitions should show up in the list of available storage devices when the user plugs in a drive:
Code:
/usb-otg vfat /dev/block/sda* flags=removable;storage;display=USB-OTG
This line is straight from the v2 fstab for the same device and also should work. In this case the kernel will notify us that new devices have been added or removed via uevents:
Code:
/devices/soc.0/f9200000.ssusb/f9200000.dwc3/xhci-hcd.0.auto/usb* auto auto defaults voldmanaged=usb:auto
In addition to the v2 fstab, you can include /etc/twrp.flags which uses the v1 fstab format. The twrp.flags file can be used to supplement the v2 fstab with TWRP flags, additional partitions not included in the v2 fstab, and to override settings in the v2 fstab. For example, I have a Huawei device with the following stock v2 fstab present as /etc/recovery.fstab
Code:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait,verify
/dev/block/bootdevice/by-name/cust /cust ext4 ro,barrier=1 wait,verify
/devices/hi_mci.1/mmc_host/mmc1/* auto auto defaults voldmanaged=sdcard:auto,noemulatedsd
/devices/hisi-usb-otg/usb1/* auto auto defaults voldmanaged=usbotg:auto
/dev/block/bootdevice/by-name/userdata /data f2fs nosuid,nodev,noatime,discard,inline_data,inline_xattr wait,forceencrypt=footer,check
/dev/block/bootdevice/by-name/cache /cache ext4 rw,nosuid,nodev,noatime,data=ordered wait,check
/dev/block/bootdevice/by-name/splash2 /splash2 ext4 rw,nosuid,nodev,noatime,data=ordered,context=u:object_r:splash2_data_file:s0 wait,check
/dev/block/bootdevice/by-name/secure_storage /sec_storage ext4 rw,nosuid,nodev,noatime,discard,auto_da_alloc,mblk_io_submit,data=journal,context=u:object_r:teecd_data_file:s0 wait,check
In addition I have also included this in /etc/twrp.flags:
Code:
/boot emmc /dev/block/platform/hi_mci.0/by-name/boot
/recovery emmc /dev/block/platform/hi_mci.0/by-name/recovery flags=backup=1
/cust ext4 /dev/block/platform/hi_mci.0/by-name/cust flags=display="Cust";backup=1
/misc emmc /dev/block/platform/hi_mci.0/by-name/misc
/oeminfo emmc /dev/block/platform/hi_mci.0/by-name/oeminfo flags=display="OEMinfo";backup=1
/data f2fs /dev/block/dm-0
/system_image emmc /dev/block/platform/hi_mci.0/by-name/system
The first 2 lines in twrp.flags adds the boot and recovery partitions which were not present at all in the v2 fstab. The /cust line in the twrp.flags file is added to tell TWRP to allow users to back up the cust partition and to give it a slightly better display name. The /misc partition is also only present in the twrp.flags file. Much like the /cust partition, the /oeminfo partition is in the twrp.flags file to tell TWRP to allow users to back it up and give a display name. The /data line is needed because this Huawei device, like many Huawei devices, is encrypted but the encryption uses some special Huawei binaries and is encrypted with some sort of default password that the user cannot change. We use the Huawei binaries to decrypt the device automatically in recovery. The /data line here tells TWRP to use /dev/block/dm-0 instead of /dev/block/bootdevice/by-name/userdata which is required for proper mounting, etc. Lastly we have the /system_image line so that TWRP will add a system image option for backup and restore.
As we add more new devices, we’ll add more example device trees to https://github.com/TeamWin/ which should help you find more ways to use this new fstab support. Please note that using the v2 fstab format at this point is completely optional, so feel free to continue using v1 if that is what is more comfortable or if you have trouble with the v2 format support.
If you have questions, feel free to stop by #twrp on Freenode. If you post here I may not see it for a while as I have lots of threads out there and there's no way for me to keep track of them all. If you successfully port TWRP to a new device, please let us know! We love to hear success stories!
If you have code changes that you'd like to submit, please submit them through the Omni Gerrit server. Guide is here.
Once you get Omni or CM sync'ed and your TWRP flags set, you should do a source ./build/envsetup.sh We usually lunch for the device in question, so something like "lunch omni_hammerhead-eng".
After you lunch successfully for your device this is the command used for most devices:
Code:
make clean && make -j# recoveryimage
Replace the # with the core count +1, so if you have a dual core it's -j3 and a quad core becomes -j5, etc. If you're dealing with a "typical" Samsung device, then you'll need to
Code:
make -j# bootimage
Most Samsung devices have the recovery included as an extra ramdisk in the boot image instead of a separate recovery partition as found on most other devices.
Old guide here: http://forum.xda-developers.com/showpost.php?p=65482905&postcount=1471
So, now, hopefully you've compiled TWRP for your device and gotten it working. Now, you'd like to know how to get TWRP officially supported for your device so that it can be installed automatically with the TWRP app. In order for us to add "official support" for your device we'll need the following:
1) Device configuration files to compile TWRP from source for your device. This means that you cannot have repacked a recovery.img by hand to get it working. We need to be able to compile it from source so that we can easily release future updates.
2) We'll build a copy of TWRP and send it to you for validation. Once you've validated that we can build a working image for your device, we'll add it to the official TWRP app.
Note that we won't take credit for your port. You'll still get to post it on XDA to collect all the credit that goes with releasing something new for your device along with having your name listed on our website as the maintainer for the device. Also note that it's not always possible to provide automated installs for all devices.
You can now boot TWRP in an emulator. If you're trying to help develop TWRP, this can be a huge help as you don't have to risk your device and you can do everything directly on your computer.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Download this set of device configuration files.
Compile a recoveryimage using those device files. In the Android SDK, click on Tools -> Manage AVDs. Click New. Set it up as the following:
AVD Name: TWRP
Device: Galaxy Nexus
Target: ICS or newer though anything will probably work here
CPU: ARM (armeabi-v7a)
Check the box for hardware keyboard (your computer's keyboard will work in TWRP)
Up to you if you want to have the skin with controls present
Front Camera: None
Back Camera: None
RAM: 1024 VM Heap: 64
Internal Storage: 200
SD Card: Size: 500 MiB
Then click OK.
Once you have your AVD and your recoveryimage, you can boot TWRP in the emulator by browsing to your android-sdk/tools folder and run this command:
./emulator -avd TWRP -ramdisk CMFOLDER/out/target/product/twrp/ramdisk-recovery.img
Note that ADB doesn't work right away. About 10 to 15 seconds after TWRP finishes booting, ADB will come online. We start ADB via init.rc so even if TWRP fails to boot due to some kind of code error that you may have made, ADB should still work. Enjoy!
TWRP and A/B devices:
From a TWRP standpoint, A/B devices aren't a whole lot different from regular devices, but developers seem to be shy about working on these devices. I'm going to try to shed some light on this subject and hopefully this will serve as a guide for porting TWRP to A/B devices.
Firstly, let's understand what is an A/B device and how it's different. A/B devices have duplicates of many partitions on the device. An A/B device has 2x system partitions, 2x boot partitions, 2x vendor partitions, 2x modem / firmware partitions, etc. Only one slot is in use at a time. During early boot, the first stages of the bootloader read some small amount of data called the BCB or Bootloader Control Block and decide whether to boot the A partitions or the B partitions. When an OTA update is available, the data from the active slot is copied from the inactive slot and patched / updated. For example, if you're currently on slot A, your device would download the update and copy the existing system partition from slot A and patch / update it with the new updates into slot B. Once the copying and updating is complete, the BCB is updated and the device reboots using slot B. Next time an update is available, the system partition in slot B is copied to slot A and updated, the BCB gets updated, and we reboot to slot A. When viewing partitions on the device, you'll see something like this:
Code:
/dev/block/bootdevice/by-name/boot_a
/dev/block/bootdevice/by-name/boot_b
/dev/block/bootdevice/by-name/system_a
/dev/block/bootdevice/by-name/system_b
/dev/block/bootdevice/by-name/userdata
/dev/block/bootdevice/by-name/vendor_a
/dev/block/bootdevice/by-name/vendor_b
Note the dual boot, system and vendor partitions in the list above, but only one userdata partition.
While there is technically no requirement that I am aware of, all A/B devices shipped thus far have no separate recovery partition. Instead, the boot image contains the recovery in its ramdisk. The important thing is knowing that the boot image now also contains the recovery. For completeness, the system partition is a full root file system. During boot, if the kernel is told to boot to recovery, it will extract the ramdisk in the boot partition. If the kernel is not told by the bootloader to boot to recovery, then the kernel will mount the appropriate system partition (A or B) because the system partition is a full root file system. This means that the system partition on these devices is mounted to / instead of to /system and the system partition contains all of the files that would have normally been in the boot image ramdisk and a /system subfolder.
From a TWRP standpoint, there are 3 things that you have to do for an A/B device. First, you need to set
Code:
AB_OTA_UPDATER := true
in your BoardConfig.mk. Secondly, for any partition that has an A/B option, you need to add
Code:
flags=slotselect
in your fstab so something like this:
Code:
/boot emmc /dev/block/bootdevice/by-name/boot flags=slotselect
/system ext4 /dev/block/bootdevice/by-name/system flags=slotselect
/system_image emmc /dev/block/bootdevice/by-name/system flags=slotselect
/vendor ext4 /dev/block/bootdevice/by-name/vendor flags=slotselect;display="Vendor";backup=1
/vendor_image emmc /dev/block/bootdevice/by-name/vendor flags=slotselect
Lastly, once you get into TWRP, you will probably want to make sure that bootctl hal-info responds correctly with no errors. Usually the bootctl binary requires a proprietary library or even a couple of services to work correctly. If bootctl does not work correctly, then you will not be able to switch slots within TWRP correctly either.
In addition to setting
Code:
AB_OTA_UPDATER := true
you may also want to set:
Code:
BOARD_USES_RECOVERY_AS_BOOT := true
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
If you set
Code:
BOARD_USES_RECOVERY_AS_BOOT := true
then make recoveryimage will no longer work and instead you will have to make bootimage. I don't recommend setting either of these flags for TWRP-only build trees. These flags will probably be required for developers building full ROMs for A/B devices.
Installing / Flashing TWRP on A/B devices:
Since all known A/B devices do not have a separate recovery partition, you will eventually have to flash TWRP to the boot partition. On the Pixel 1 and 2, we use fastboot boot to temporarily boot TWRP without flashing TWRP. We are then supplying a zip to allow users to flash TWRP to both slots. You can download one of these zips from our website and update the zip as needed to support your devices. Eventually we will add tools to TWRP to allow users to flash recoveries on these devices without needing to use zips.
Recently, I worked on the Razer Phone. The Razer Phone unfortunately does not support fastboot boot. Instead, users have to determine their currently active boot slot using
Code:
adb shell getprop ro.boot.slot_suffix
then use
Code:
fastboot --set-active=_a
to switch slots to the inactive slot. From here, the user can
Code:
fastboot flash boot twrp.img && fastboot reboot
to get into TWRP. Once in TWRP they can then go to the reboot page and change back to their originally active slot, make a backup, then install TWRP. Using the inactive slot allows users to get a good, unmodified backup of their device before installing TWRP.
Hopefully this helps!
Debugging with gdb in TWRP guide can be found here!
Beep boop zee doop
I know I've PM'ed you but I would like to ask you again. What should I do after compiling the TWRP recovery binary? What files have to be copied and where? I'm trying to integrate it with an ICS kernel.
Dees_Troy said:
Once you get CM sync'ed, I suggest that you go ahead and compile a build of ClockworkMod (ClockworkMod source is included in the CM repos). We usually lunch for the device in question, so something like "lunch full_tenderloin-eng".
After you lunch successfully for your device this is the command used for most devices:
Code:
make clean && make -j# recoveryimage
Click to expand...
Click to collapse
I don't get this part. What is lunch supposed to be? is it supposed to be a individual command for a device or can I do "lunch full_tenderloin-eng" for all devices? Because I am building for a device that doesn't run Android natively (at least out of-the-box) so cyanogenmod doesn't support it on any way...
Also, can I use this for resistive screens? Just to make sure.
Thanks for the guide, I have been looking for this for a long time
thanks for the guide, well structured and not so complicated
i have only a question: i'm trying to build it for galaxy 5, the problem is that the resolution is 320x240, so can you tip me on modify the sources? (i've done this some days ago, but images were too large)
manuel100 said:
thanks for the guide, well structured and not so complicated
i have only a question: i'm trying to build it for galaxy 5, the problem is that the resolution is 320x240, so can you tip me on modify the sources? (i've done this some days ago, but images were too large)
Click to expand...
Click to collapse
Set the device resolution to 320x240...I'm pretty sure they have support for that resolution...and if they don't then you can copy one of there's except resize it all to 320x240
Edit-they only have 320x480 https://github.com/TeamWin/Team-Win-Recovery-Project/
My question: I built twrp from source a while ago using smasher's Samsung inject twrp zip...that worked fine for a while...but recently we switched to mtd format so that inject twrp zip doesn't work...neither does the inhect twrp button within twrp anymore...I've seen that the galaxy s has the same problem as well...just wondering if you know of a work around...
Sent from my SGH-I997 using Tapatalk 2
mg2195 said:
Set the device resolution to 320x240...I'm pretty sure they have support for that resolution...and if they don't then you can copy one of there's except resize it all to 320x240
Edit-they only have 320x480 https://github.com/TeamWin/Team-Win-Recovery-Project/
My question: I built twrp from source a while ago using smasher's Samsung inject twrp zip...that worked fine for a while...but recently we switched to mtd format so that inject twrp zip doesn't work...neither does the inhect twrp button within twrp anymore...I've seen that the galaxy s has the same problem as well...just wondering if you know of a work around...
Sent from my SGH-I997 using Tapatalk 2
Click to expand...
Click to collapse
thanks for respond, however i've tried resizing images to 320x240 but i don't know what should be the size of bottoms, because they are alway out-of-screen
what is smasher's Samsung inject twrp zip? but i think that the recovery doesn't work because you have to built it with mtd support (for ex. on madteam they are trying to build a mtd kernel, but for install that testing rom they built a special cwm with mtd support)
manuel100 said:
thanks for respond, however i've tried resizing images to 320x240 but i don't know what should be the size of bottoms, because they are alway out-of-screen
what is smasher's Samsung inject twrp zip? but i think that the recovery doesn't work because you have to built it with mtd support (for ex. on madteam they are trying to build a mtd kernel, but for install that testing rom they built a special cwm with mtd support)
Click to expand...
Click to collapse
Smashers inject twrp zip is a tool for Samsung devices that let's you get the recovery without flashing the whole kernel. You basically put the ramdisk-recovery.img in the zip and then flash. During the flash process it pulls the boot.img, replaces the current ramdisk-recovery.img with the new one that contains twrp. It then deletes the old boot.img and flashes the new one...not affecting the actual kernel...
The recovery itself has mtd support...I can use it if I flash the whole boot.img, but I don't want to release the recovery within a whole kernel...because then I have to keep it up to date with both twrp and kernel sources, not to mention the different kernels available for my device....I can't make a recovery for each kernel...don't have the time for that...that's where the inject came in handy....the user could use any kernel he wanted while still using twrp
Recovery logs say it fails to find the ramdisk inside the boot.img and then in parenthesis something about may not be using gzip compression...which it is....
Sent from my SGH-I997 using Tapatalk 2
---------- Post added at 07:21 AM ---------- Previous post was at 07:19 AM ----------
Deestroy did this same tutorial on rootzwiki...if you look at the second post you'll see info about the smasher inject twrp I was referring to...http://rootzwiki.com/index.php?/topic/23903-How-to-Compile-TWRP-from-Source
Sent from my SGH-I997 using Tapatalk 2
mfsr98 said:
I don't get this part. What is lunch supposed to be? is it supposed to be a individual command for a device or can I do "lunch full_tenderloin-eng" for all devices? Because I am building for a device that doesn't run Android natively (at least out of-the-box) so cyanogenmod doesn't support it on any way...
Also, can I use this for resistive screens? Just to make sure.
Thanks for the guide, I have been looking for this for a long time
Click to expand...
Click to collapse
can I get help here please?
mfsr98 said:
can I get help here please?
Click to expand...
Click to collapse
Its a single command...it opens up the menu for devices...just type lunch into the terminal and hit enter...you'll see what I mean. You will probably have to add your device to the menu by creating a vendorsetup.sh in your device repo if it doesn't already exist....
Sent from my SGH-I997 using Tapatalk 2
Thank you for the quick answer. Yes, I already have vendorsetup.sh on the boot.img. Sorry for the noob question
What about for android beginners???
Devarishi said:
What about for android beginners???
Click to expand...
Click to collapse
There's only so much that you can dumb it down and simplify it. There's lots of other guides out there for getting started. Compiling a recovery is not a super simple task that anyone and everyone can do and there's plenty of potential pitfalls including the possibility of bricking your device. If none or very little of this guide makes sense, then you might see if a developer for your device is interested in working on it instead.
how would you compile this for a device without an official cm9 build?
azoller1 said:
how would you compile this for a device without an official cm9 build?
Click to expand...
Click to collapse
Well, you don't need official cm9 if you can find any working device tree for you phone you are good to go.. For lg spectrum 4g, this could be useful.
Hey guys I'm trying to compile this for my phone the problem I'm running into is I need the root.ts I've searched and it doesn't come up with anything any help would be appreciated thanks
Sent from my SAMSUNG-SGH-I577 using xda premium
I have a mtk6577 device which is not in de device tree of CM9.
I can compile CWM for my device with CM9. Because I was only making recovery, there was no need for setting up boardconfig.
In this guide there is a part starting with TARGET_RECOVERY_INITRC which is not there in my boardconfig.
Also is stated:
"Your board config also needs to include architecture and platform settings. Usually these are already included if you're using device configs that someone else created, but if you created your own, you may need to add them. Without them, recovery will often seg fault during startup and you'll just see the teamwin curtain flash on the screen over and over."
Does this mean that I cannot build TWRP without it, even I can build CWM ?
gls9 said:
I have a mtk6577 device which is not in de device tree of CM9.
I can compile CWM for my device with CM9. Because I was only making recovery, there was no need for setting up boardconfig.
In this guide there is a part starting with TARGET_RECOVERY_INITRC which is not there in my boardconfig.
Also is stated:
"Your board config also needs to include architecture and platform settings. Usually these are already included if you're using device configs that someone else created, but if you created your own, you may need to add them. Without them, recovery will often seg fault during startup and you'll just see the teamwin curtain flash on the screen over and over."
Does this mean that I cannot build TWRP without it, even I can build CWM ?
Click to expand...
Click to collapse
Look for another mtk6577 device that has CM & copy the arch flags from it.

[RECOVERY] Carliv Touch Recovery v5.7 and v6.6

DISCLAIMER:
Rooting your phone and using custom Recoveries and ROMS have risks and may result in bricking your device, and has nothing to do with Google or the device manufacturers. In case of any mishap I am not responsible if you brick/ruin your phone in any way.
Basic computer skills are required and minimal knowledges about phones and phones utilities too.
Make sure that whatever you do, you are doing it at your own responsibility.
Carliv Touch Recovery​
- version 5.7.2 is for Lollipop (cm 12.1, aicp lp or resurrection remix lp) and version 6.6 is for Marshmallow (cm 13, aicp-mm or resurrection remix mm).
The version starting number is related to android version.
This is a CWM based recovery and I did put up some work to update it to lollipop (cm 12.1) and marshmallow (cm-13) after official cwm development stopped at kitkat. It works with LOLLIPOP and MARSHMALLOW kernels and it builds with cm 12.1, aicp lp or resurrection remix lp (version 5.7) and with cm 13, aicp-mm or resurrection remix mm (version 6.5).
This is for those who want a lighter and simpler recovery or they just liked CWM before. It's not as good or complex as twrp, but it will do the job just fine.
For gui I ported PhilZ Recovery full touch module.
Because the vold in cm 12.1 and 13 doesn't support cwm anymore I had to use the old fstab1 type for functionality, although for building reason a valid recovery.fstab should be provided in device tree. In the third post there are some building hints to make it clear for those who want to try building it.
Features:
- EXT4 and F2FS support (for f2fs use the BoardConfig flag).
- full touch menu ported by me from PhilZ touch Recovery. The old Napstar-xda touch module was good but it's quite old and to update that was too much work. Actually There is a version 4 with that touch module, all working, but the touch doesn't work with some input drivers and I had to give up on it for the new and improved version from PhilZ.
- all cwm functionalities are up and working (adb, sideload, backup, restore, install, mass storage...). There is no mtp and if your phone doesn't have an external sdcard you can't connect it to PC while is in recovery mode. But there is usb-otg support, of course if your phone was shipped with that.
- added new menu for backup and restore advanced, to use it for backing or restoring only a specific partition and I also ported from PhilZ the multizip flashing function.
- in Carliv menu there is now a new section for flashing boot and recovery images. It is a feature that I needed during many recovery builds testing. I wanted an easier way to flash other image without booting to android and using an app like RashR. You can browse your storage locations for any image and after choose you will have to select on wich partition should that be flashed. I added multiple confirmations check to avoid flashing on wrong partition. This feature works only with boot and recovery images. I won't add other partitions to this because for other things there are multiple backup restore functions.
- for MTK phones (if the flag is used in Boardconfig) there is a new menu to backup and restore some important partitions like uboot, nvram an secro because they are involved in restoring a lost IMEI, and also the logo partition which may often get broken by bad ported ROMs.
- besides these all my old specific menus (aroma, rainbow...) are still in place.
- added support for dencrypting and mounting data partition using the builtin minivold from cyanogenmod with vdc commands (the ideea came from this post of Lekensteyn). Tested and working well with text ar hex passwords, and maybe will work with pin too but I don't think it will work with pattern .
- added support for dencrypting and mounting adopted storage in marshmallow. The solution is based on this article of nelenkov.
- there is no included root solution. I choose to do it this way because there is no universal root solution now and someone may end up messing things with a non-working root option. You can flash a zip installer from Chainfire's SuperSu or other solution that may work for your phone.
All screenshots are made with my old tool from here (still working well).
CREDITS:
The biggest thanks go to AP756 and DerTeufel1980, two friends from Germany, who sent me a new phone each, with lollipop OS and that helped me a lot to do this.
- Phil3759 for the touch code and many other things from his recovery;
- TWRP developers. I learned a lot from their work;
- Clockworkmod Team starting with Koushik Dutta and ending with all developers that made the CWM recovery what it was;
- Cyanogenmod Developers;
- Nikolay Elenkov;
In next post there are some links for built recoveries. I'll add more soon as I get a valid link (on a reliable webhost) from people who build it for other phones.
I worked alone on this, there is no team here, not because I don't want to , but probably because there was no one interested in this, and so there may be some unspotted bugs. If you find any please do tell me to help on fixing it.
XDA:DevDB Information
Carliv Touch Recovery, Tool/Utility for all devices (see above for details)
Contributors
carliv
Version Information
Status: Stable
Current Stable Version: 5.7.3 & 6.6.1
Stable Release Date: 2016-07-19
Created 2016-05-30
Last Updated 2016-07-19
Changelog and working builds
CHANGELOG 19-07-2016:
- fix backup for old mtk phones.
Lollipop
1. Jiayu S3+
2. Zopo Speed 7+
3. Zopo Speed 7
4. Mlais Mx Base
5. Alcatel Pop C2/C3
6. ZTE Blade L3 / Digicel DL910
7. Nous NS5511
Marshmallow
1. Zopo Speed 7+
2. Zopo Speed 7+ with adopted storage
3. Zopo Speed 7
4. Zopo Speed 7 with adopted storage
* NOTE: sadly the kernel source for zopo marshmallow isn't published so these two don't have touch in recovery, but you can use them as in CWM with phone buttons.
[*] QCOMM devices:
1. Huawei Honor 5x (kiwi)
2. Samsung Galaxy A5 (SM-A500FU)
Building Guide
To build you need a local repo of cm-12.1 or cm-13 and a proper device tree. To see how a buildable device tree looks check this one from my github.
It builds out of the box with aicp lp-5.1 and aicp mm-6.0 too, but like in cm you need a proper device tree.
Some things to be considered:
For BoardConfig:
- the most common thing in all BoardConfig I saw (you need this to use power button to select if you use physical buttons in some situations)
Code:
- BOARD_HAS_NO_SELECT_BUTTON
- for the graphical interface
Code:
- TARGET_RECOVERY_PIXEL_FORMAT
- for mass storage if your phone has an external sdcard, to connect it to PC (this one can be specified in fstab too) - and it has to be without any quotes or slashes
Code:
- TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/mt_usb/musb-hdrc.0.auto/gadget/lun%d/file
- for LCD backlight lights - and it has to be without any quotes or slashes
Code:
- TARGET_RECOVERY_LCD_BACKLIGHT_PATH := /sys/class/leds/lcd-backlight/brightness
- for vibrator feature - and it has to be without any quotes or slashes
Code:
- VIBRATOR_TIMEOUT_FILE := /sys/devices/virtual/timed_output/vibrator/enable
- with link to a valid recovery.fstab version 2 (it may work without it but it is better to be here)
Code:
- TARGET_RECOVERY_FSTAB
- for a better readability adapted to your screen (check the minui folder for more fonts)
Code:
- BOARD_USE_CUSTOM_RECOVERY_FONT
Carliv Touch Recovery specific flags:
- if you have the recovery on recovery-carliv folder under bootable directory in cm-12.1 source use this next flag.
Code:
- RECOVERY_VARIANT := carliv
NOTE: in cm 13, and other android 6 sources too, you can't build with this flag out of the box and so you have some things to do - the easy one is to rename recovery folder in [recovery-stock] and to place my recovery next to that with the name [recovery]. Other option is to open Android.mk from /sytem/core/healthd and find line 58 where you need to replace [LOCAL_C_INCLUDES := bootable/recovery] with [LOCAL_C_INCLUDES := $(call project-path-for,recovery)].
- with your phone resolution like this width x height
Code:
- DEVICE_RESOLUTION := 720x1280
- if you want to use it with encrypted phone (it work with a non encrypted phone too but it will be smaller if you don't need decrypting function)
Code:
- BOARD_INCLUDE_CRYPTO := true
- if your phone is MTK powered you need this for the MTK menu (it is not mandatory though with the mtk phones shipped with lollipop or marshmallow)
Code:
- BOARD_HAS_MTK_CPU := true
- for touch menu, if your phone has an input driver with PROTOCOL_TYPE_B (synaptic is an example, or many samsung devices); if you have access to, check your kernel input driver for something like this [#define PROTOCOL_TYPE_B] - google it if you want to know more about this
Code:
- BOARD_USE_PROTOCOL_TYPE_B := true
- to block an input device use
Code:
- TOUCH_INPUT_BLACKLIST := "devicename"
- if you use Adopted Storage
Code:
- BOARD_USE_ADOPTED_STORAGE := true
For system.prop from device tree:
Code:
#
# system.prop for mx
#
ro.ctr.crypto.passwd="64656661756c745f70617373776f7264"
ro.ctr.forbid_format=/frp,/persistent,/lk,/uboot,/logo,/metadata,/nvdata,/nvram,/secro
ro.ctr.forbid_mount=/frp,/persistent,/lk,/uboot,/logo,/metadata,/nvdata,/nvram,/secro
ro.ctr.touch_accuracy=7
- to use decrypt data specify here your password (ro.ctr.crypto.passwd); I forgot to mention that if the phone uses encryption, the recovery will start with few seconds delay, because of the decrypting and mounting data process. If the message will tell you that couldn't be decrypted it is possible that your password was wrong or it uses an unsuported type of password. To be sure just restart the recovery from Power menu and if you still get the same message then you need to check your provided password from system.prop or to find a different solution (other recovery like twrp). If you want to decrypt your phone for good you need to format data and data media from Mount/Storage menu but you will loose your data (settings, preferences).
- ro.ctr.forbid_format and ro.ctr.forbid_mount are for partitions from fstab that you don't want to be shown in Mount/ Storage menu with mount and format option (coma separated, no spaces and with leading slash), like in my example above.
- ro.ctr.touch_accuracy to improve the touch handling (bigger lcd_density = bigger accuracy); the initial value is 7, just like in PhilZ Recovery, and I reccomend you to try different numbers to see what is right for you, but don't go over 19.
All these system.prop lines are not mandatory.
Carliv Touch Recovery uses a fstab version 1 named [ctr.fstab] and you have to create a folder recovery in your device tree, in that recovery folder create a new folder named root, in root folder another folder named etc and in that one place the ctr.fstab. Like this:
Code:
recovery/root/etc/ctr.fstab
That will be enough since the compiler will add it in recovery ramdisk and the recovery module will find it in etc folder.
Code:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# mount point fstype device [device2] fs_options [fs_options2] lun
/boot emmc /dev/block/platform/mtk-msdc.0/by-name/boot
/cache ext4 /dev/block/platform/mtk-msdc.0/by-name/cache
/recovery emmc /dev/block/platform/mtk-msdc.0/by-name/recovery
/system ext4 /dev/block/platform/mtk-msdc.0/by-name/system fs_options=rw
/data ext4 /dev/block/platform/mtk-msdc.0/by-name/userdata fs_options=rw
/internal_sd datamedia /dev/null
/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 lun=sys/class/android_usb/android0/f_mass_storage/lun/file
Important here is how you define internal storage which is data media
Code:
/internal_sd [COLOR="Red"]datamedia[/COLOR] [COLOR="Magenta"]/dev/null[/COLOR]
You can see It's used the old way with "datamedia" fstype and /dev/null device.
Important thing: if you have only internal storage define it as
Code:
/sdcard datamedia /dev/null
If you have also an external sdcard, use either way:
Code:
/internal_sd datamedia /dev/null
/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
or
Code:
/sdcard datamedia /dev/null
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
If you are using the adopted storage feature for external sd card, define this
Code:
/data_sd ext4 /dev/block/mmcblk1p2 fs_options=adopted
and remove or comment out the line for external sd card.
You can see the internal storage can be sdcard or internal_sd and external sdcard can be sdcard or external_sd, but internal storage can't be external_sd or external sdcard internal_sd.
If your phone has OTG support you can use that too defining it like this
Code:
/usb-otg vfat /dev/block/sda1 /dev/block/sda
or this
Code:
/usbdisk vfat /dev/block/sda1 /dev/block/sda
-check with your phone booted up in Android and a OTG USB mounted to see in [/sys/class/block] or [dev/block] how to set device for this (the dev/block/sdx part).
The recovery has fat32, exfat and ntfs support builtin (also f2fs for file system). You can define your usb-otg and/or external sdcard as "auto" instead of "vfat" and it will work with any of these formats. I tested a portable HDD self powered and it works (120 GB) as usb-otg. Anyway that is available only for zip and image flashing. Maybe I'll make it to work for backup and restore too.
@carliv is back!!! Thanks a lot for this.
Should I port or should I build?
kirito9 said:
@carliv is back!!! Thanks a lot for this.
Should I port or should I build?
Click to expand...
Click to collapse
You should build it of course. I won't make porting recoveries anymore.
Actually wait for a day or two because I'm working on some improvements and I'll push them to github soon.
Also I have a working version for cm13 too. That also need some more tests before release.
carliv said:
You should build it of course. I won't make porting recoveries anymore.
Actually wait for a day or two because I'm working on some improvements and I'll push them to github soon.
Also I have a working version for cm13 too. That also need some more tests before release.
Click to expand...
Click to collapse
I will wait for cm13 support
Anyway this recovery support arm64?
Sure. Look at the phones already supported
Gesendet von meinem HERO1 mit Tapatalk
carliv said:
You should build it of course. I won't make porting recoveries anymore.
Actually wait for a day or two because I'm working on some improvements and I'll push them to github soon.
Also I have a working version for cm13 too. That also need some more tests before release.
Click to expand...
Click to collapse
Goood xD. No more complaints from users who "brick" their devices and blame you :laugh:
All things are mostly done.
Just a little heads up: Added usb-otg support for install zip menu - should work with ntfs, fat, exfat and fat32 usb flash drives (I tested only with fat32). Other improvements too for both versions (lollipop and marshmallow).
I'll push the source tomorrow.
Attached a screenshot of the recovery for marshmallow (cm13).
Thanks to Master [emoji322]
Sent from my Lenovo A7010a48 using XDA-Developers mobile app
Thread updated with instruction and links for the new version for cm-13 and the version for lollipop is upgraded to 5.2.
If some of you build a working recovery and want to share here the link, just post a replay and I'll add it in post #2.
If you have a buildable device tree public on github and want a recovery built for it ask here and maybe I or someone else will do it in some free time.
@carliv do you interested to build this recovery for kenzo (redmi note 3 pro) ?
here's kernel source for it: https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/kenzo-l-oss
exodius48 said:
@carliv do you interested to build this recovery for kenzo (redmi note 3 pro) ?
here's kernel source for it: https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/kenzo-l-oss
Click to expand...
Click to collapse
The kernel alone is useful only if builds out of the box, but you still need a proper device tree to build, even with a prebuilt kernel. For building a recovery or a ROM that is what you need. I can't build a recovery only with that. Maybe someone else have the phone and manage to create the device tree and it will build the recovery.
Cheers
Look forward to Flash system Image In Carliv Menu
Thank You
Finally CTR for LP & MM! Amazing @carliv, I love this recovery.
Update to version 5.3 for lollipop and 6.2 for marshmallow
CHANGELOG 12-06-2016:
- activated working support for ntfs, exfat and f2fs;
- rewritten the flash image menu for better functionality and more protection to avoid mistakes;
- change the local busybox libs and modules names to avoid conflicting with existing external folder;
- some other small fixes and improvements (you can check the github commits).
@carliv
Hi, I have a device tree that I used for TWRP https://github.com/kirito96/device_Alcatel_4032 recovery and I would like to know if this is enough for building CTR or do I need a "complete" device tree? Thanks.
kirito9 said:
@carliv
Hi, I have a device tree that I used for TWRP https://github.com/kirito96/device_Alcatel_4032 recovery and I would like to know if this is enough for building CTR or do I need a "complete" device tree? Thanks.
Click to expand...
Click to collapse
Not really complete like in building ROMs, but you have to do some changes:
- convert it to cm building or, better and easier for you since it's for omni, to aicp.
- then you need to add in boardconfig partitions sizes (twrp doesn't need that because it checks the size from dumchar_info or partinfo).
- add that recovery/root/etc folder with ctr.fstab in it.
- add specific flags in boardconfig, but if your device has a small recovery partition let the crypto flag out (don't use it at all) and you will gain almost 2 Mb.
- add resolution and desired font if you want to not use the default which is for 540x960 dpi.
and that's it ...
Take a look at my mlais device tree (link in OP)-sorry, in post #3 to see these things - I have a branch for aicp too.
And I see your device use mtk header. You can check in my github for the lenovo p780 device tree where I implemented the mkbootimg part from my kitchen.
Cheers!
PS: if you can send me your phone dumchar_info file and a stock boot image I'll try to convert your device folder to use it as an example for other people about how to do it.
@carliv
Thanks for informing me, but for now I think I'll opt for a device tree that you made and I'll use that as a base for other devices that I'll work on in the future.
I've attached the dumchar_info.txt file below along with the stock boot.img. Funny thing is, I have 2 stock boot.img. I have for which my phone came with (4.2.2) and an AOSP upgrade with 3.10.xx kernel (5.1.1). I uploaded both because this recovery is for LP right? Which should be 3.10.xx kernel. In any case, I'll use what you made as a base. Thanks again.
carliv said:
CHANGELOG 12-06-2016:
- activated working support for ntfs, exfat and f2fs;
- rewritten the flash image menu for better functionality and more protection to avoid mistakes;
- change the local busybox libs and modules names to avoid conflicting with existing external folder;
- some other small fixes and improvements (you can check the github commits).
[/B]
Click to expand...
Click to collapse
You did it!!! :victory:
Good thing I was checking up on you or I might of missed it.
Thanks carliv I realize this project must of been a huge effort on your part and I for one am very grateful :highfive:

TWRP 3.1.0.0 Released for redmi note 3 sd

TWRP 3.1.0-0 Released
Mar 10, 2017
TWRP 3.1.0-0 is out now for all currently supported devices.
What's new in 3.1.0-0:
vold decrypt on a few select HTC devices, TWRP will now attempt to use the system partition's vold and vdc binaries and libraries to decrypt the data partition (nkk71 and CaptainThrowback)
adb backup to stream a backup directly to or from your PC, see documentation here: https://github.com/omnirom/androidbootablerecovery/commit/ce8f83c48d200106ff61ad530c863b15c16949d9 (bigbiff)
tweak MTP startup routines (mdmower)
support new Android 7.x xattrs for backup and restore to fix loss of data after a restore (Dees_Troy)
support POSIX file capabilities backup and restore to fix VoLTE on HTC devices and possibly other issues (Dees_Troy)
better indicate to users that internal storage is not backed up (Dees_Troy)
improve automatic determination of TW_THEME (mdmower)
minimal getcap and setcap support (_that)
try mounting both ext4 and f2fs during decrypt (jcadduono and Dees_Troy)
shut off backlight with power key (mdmower)
timeout during FDE decrypt (Dees_Troy and nkk71)
support for FBE decrypt and backing up and restoring FBE policies (Dees_Troy)
boot slot support (Dees_Troy)
TWRP app install prompt during reboot (Dees_Troy)
support for AB OTA zips (Dees_Troy)
support new Android 7.x log command (Dees_Troy)
update recovery sources to AOSP 7.1 (Dees_Troy)
numerous bugfixes and improvements by too many people to mention
Want to get notifications when we release new versions of TWRP? Install the TWRP app and select your device!
We need your help! The bulk of TWRP work is done by a handful of people on a volunteer basis. We have pushed most of our device files to our github and we have a gerrit instance. If you have the ability, please help us maintain our official devices and/or add your device to our official device list. Thanks in advance!
You can track the progress of builds here
Head over to the devices page to find install instructions and download links.
Note :- downloaded links should be added by developer mr.Parth Bhatia (TheStrix). Because it is his right.(if he permits and confirms it is safe to flash on our device I can post the liNks.)

[UNOFFICIAL][RECOVERY][Rolex/Riva] OrangeFox Recovery Project [12/06/22] [R11.1_1][FDE+FBE]

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
OrangeFox 11.1(1) UNOFFICIAL
———————————————————————
Based on: TWRP 3.6.2 (Android 11) | Author: iusmac | Kernel: 4.9.309​
Summary:
Code:
Decrypt any Android and any encryption method (FDE or FBE) + Original features
*** DISCLAIMER ***
Code:
Your warranty is now void.
We're not responsible for bricked devices, dead SD cards,
thermonuclear war, or you getting fired because the alarm app failed. Please
do some research if you have any concerns about features included in this recovery
before flashing it! YOU are choosing to make these modifications, and if
you point the finger at us for messing up your device, we will laugh at you.
Installation:
Spoiler
Using recovery:
Spoiler
1. Download the OrangeFox .zip file to your device
2. Boot into to an existing recovery
3. Install OrangeFox .zip file
4. The recovery should reboot automatically into OrangeFox
5. Enjoy!
Using Fastboot:
Spoiler
1. Download the OrangeFox .zip archive to your device and .img image to your PC
2. Connect your device to PC and enter into Fastboot Mode
3. Flash .img using the following commands:
Code:
fastboot erase recovery
fastboot flash {put-here-orangefox-recovery-file-name}.img
fastboot boot {put-here-orangefox-recovery-file-name}.img
4. After the last command your device should boot into OrangeFox
5. Install OrangeFox .zip archive
6. The recovery should reboot automatically
7. Enjoy!
Stock Features:
Spoiler
* Supports Treble and non-Treble ROMs
* Updated with latest TWRP commits
* Built-in support for installing init.d functionality
* Built-in support for installing Magisk
* Password protection
* Torch and LED
* Support for custom ROMs
* Better language support
* Optimized versions of community scripts
* Fox theme engine allows to set: custom scheme/theme (black, dark, etc)
* Gesture navigation
* Backup OrangeFox settings to internal storage or SD card
* And many more!
New Features (added by author):
Spoiler
Spoiler: 1. FBE Encryption Toggler (FBE = File-Based Encryption)
Spoiler: How to Enable/Disable FBE Encryption
* Make sure that the "Enable FBE" button has changed to "Disable FBE" (or vice versa if disabling)
How it works:
Formatting is needed to erase all traces of full disk encryption (FDE) + we need a completely new file system (recovery will take care of this). Immediately after that, the recovery switches encryption type to FBE in the ROM's vendor.
Spoiler: What is this? What is it for?
Some definition:
Android 7.0 and higher supports file-based encryption (FBE). File-based encryption allows different files to be encrypted with different keys that can be unlocked independently.
https://source.android…/encryption/file-based
Click to expand...
Click to collapse
What does FBE encryption look like?
Spoiler
1. The contents and names of files/folders are encrypted using random characters:
2. Upon system startup, the device is absolutely usable and does not require to enter a password. FBE decryption is bound to Lock Screen and occurs at the time of unlocking using PIN/Password/Pattern.
At the time of writing this post, 100% of our devices use Full Disk Encryption (FDE). Traditionally, FDE encryption is enabled inside ROM's settings, and personally, I did not encounter problems with this type of encryption before Android 10. Unfortunately, on new Androids FDE is very unstable. Moreover, in Android 13 (T) it will be possible to encrypt only using FBE method because FDE method is officially deprecated and will be completely removed.
Android T (AOSP experimental) removes support for full-disk encryption entirely.
https://source.android…y/encryption/full-disk
Click to expand...
Click to collapse
Some FDE issues on Android 10+:
1. The device hangs on boot logo (requires formatting of /data to fix).
2. The device may boot up successfully and be detected as encrypted, but most of the installed applications and settings disappear forever.
3. The device boots correctly but is not detected as encrypted.
Having tried a bunch of ROMs, I have never encountered the problems above and have always been able to successfully encrypt the device with FBE method. Therefore, if you are interested in encryption, accustom yourself to encrypt immediately after ROM flashing, since everything is quite handy
Warning: decryption on Android 12+ and workaround | FIXED in OrangeFox R11.1(4)
Spoiler
FIXED in OrangeFox R11.1(4)
Unfortunately, all ROM's on Android 12+ for our device can successfully be encrypted/decrypted using FBE method, but decryption in recovery is problematic. This is an Android bug, which doesn't expose the decryption keys used by the recovery. Indeed, this is a recovery problem; Android 12 stores decryption keys elsewhere, so recovery can't find them. OrangeFox / TWRP devs are already in the process of adapting to the changes of Android 12. As soon as new recovery is ready I'll build a new release and everything will work. Fortunately, I found out that passwordless decryption works.
Temporary workaround:
1. Reboot to ROM
2. Remove the Lock Screen protection (PIN/Password/Pattern)
3. Reboot to recovery, the data will be automatically decrypted
4. When you're done, reboot to system and enable Lock Screen protection again
Note: you'll need to do this until the ROMs fix the decryption keys related issue.
If you don't remove the Lock Screen protection, then instead of the data you will get:
Spoiler: 2. GUI implementation for USB Storage Exporter by 0xCAFEBABE
This is a GUI implementation of usb-stor-export.sh script for geeks.
For the folks, I implemented a way to export entire eMMC memory. How to use this:
1. Disconnect from PC if connected
2. Go to Mount and swipe the slider
3. Connect the device to the PC
4. Your PC should detect a 16/32GB device, as if you connected an external hard drive
Now, all partitions are at your disposal. You can resize them to add to /data , or make an image of the entire eMMC memory (highly recommend) or backup a specific system partition and restore even on another device. Backup using recovery will not do this to you.
(!) DO EVERYTHING AT YOUR OWN RISK! I AM NOT RESPONSIBLE FOR YOUR ACTIONS ON SYSTEM PARTITIONS!
(!) EVEN IF YOU HAVEN'T TOUCHED ANYTHING, ALWAYS UNMOUNT THE DISK FROM THE OS AND ONLY THEN TAP "Unexport".
Spoiler: 3. eMMC Lifetime Used indicator
It displays life time estimation for your eMMC memory. The percentage means how many reserved blocks have been consumed.
The status can be:
- Undefined = The kernel driver cannot detect eMMC memory state
- Normal = Your eMMC memory is fine
- Warning = Your eMMC memory consumed about 80% of reserved blocks
- Urgent = Your eMMC memory consumed almost 100% of reserved blocks
- Reserved = Your eMMC memory consumed all 100% of reserved blocks and will put itself in read-only mode very soon
For geeks: tap on it to print all HEX values to the console.
Spoiler: 4. Enter to Fastboot Mode inside recovery
This is a hidden feature of OrangeFox itself that I've simply exposed. Unfortunately, important commands like fastboot boot exit with an error, because we are still in recovery and things are kind of busy ... But for something not used/static, like flashing partitions, it's working.
Spoiler: 5. fastboot binary
Now, using OrangeFox's embedded Terminal you can do everything you normally did using a PC.
* If you made a male-to-male USB using an USB-OTG cable, then plug the USB-OTG into the device that will send commands.
Illustration: Xiaomi helps Asus
Spoiler: 6. Dark/Light Theme Toggler accessible from anywhere
This is to make sure your eyes feel comfortable
7. Ability to reboot into Fastboot Mode
8. Binaries: nano, tar, sed and xz utils
9. Support mounting of NTFS drives via OTG
10. Handy aliases (l, ll, la, lo) for `ls` command
11. Colorful support for prompt string (PS1) and for `ls/grep/egrep/fgrep` commands when using ADB/AromaFM
12. VIM - Vi IMproved Editor
13. UI rendering at 60 FPS
14. Support Python
15. Semi-transparent Lock Screen background as in stock TWRP
16. Saving screenshots in /tmp/screenshots if /sdcard is not mounted
Miscellaneous:
Spoiler
Spoiler: Error 7. Failed to unmount: /system. No such volume.
Sometimes got this error when flashing old ROM's of Android 9 and lower. To fix it:
1. Open .zip archive and search for file:
Code:
META-INF/com/google/android/updater-script
2. Open it and remove parts where /system is mounted:
Code:
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "backup", "/system");
unmount("/system");
also this one
Code:
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "restore", "/system");
unmount("/system");
3. Save it and repack .zip archive
Spoiler: Red/Blue lines after flashing
Can be fixed by installing a more recent Firmware.
For rolex | For riva
* Firmware for riva is also available on Android 8, so experiment. The Firmware V10.1.1.0.NCKMIFI (Android 7.1) works 100%.
Changelog:
Spoiler
-- OrangeFox 11.1(5) --
* Synced with latest OrangeFox R11.1 sources (September 2022)
* Correct FBEToggler button position in some circumstances
* Handle FBE encryption toggling on Android 13+
* Added fastboot support when rebooting to fastboot from OS
* Moved nano editor to ZIP to save space in ramdisk
* Revert back to /sdcard1 path for Micro SDCard mounting
* Disabled APEX
* Removed logcat binaries to free space in ramdisk
* Updated ueventd from Android 11
* Fixed mke2fs issues when wiping
Thanks to @wisanggeni aka Ervan Kurnia for collaborating
* Updated kernel to 4.9.326-2.2-iusmac
* Updated Magisk to v25.2
-- OrangeFox 11.1(4) --
* Synced with latest R11.1 sources based on TWRP 3.6.2 (Android 12.1)
* Fixed ABX format conversion on Android 12 ROMs
* Moved not vital dependencies to /persist partition after flashing recovery using .zip archive
* Added a 'missing dependencies' pop-up at start-up with an invite to flash recovery using .zip archive
* Added full FBE decryption support for Android 12 ROMs
* Removed extra languages (Chinese, Spanish, Hungarian) to free space in ramdisk
* Added to the console an invite to downgrade the recovery for those who use FBE encryption and Android 11 or lower
-- OrangeFox 11.1(3) --
* Upgraded built-in Magisk to v25.1
* Fixed some bugs
* Added to the console an invite to update the recovery for those who use FBE encryption and Android 12 or higher
-- OrangeFox 11.1(2) --
* Replaced 'Percent' with % for eMMC Lifetime Used value
* Added 'Back' button to FBE Encryption Toggler page
* Added synchronization of the fstab encryption flag with the /data encryption type
* Added battery temperature next to CPU temperature
* Enabled OTA by default
-- OrangeFox 11.1(1) --
* Synced with latest R11.1 sources based on TWRP 3.6.2 (Android 11)
* Upgraded Linux kernel to 4.9.309 (from Android 12)
* Upgraded built-in Magisk to v25
* Added nano, tar, sed, xz utils binaries
* Fixed Full Disk Decryption (FDE) on Android 12+
* Added File Based Encryption (FBE) support
* Added NTFS support for OTG devices
* Added handy aliases (l, ll, la, lo) for `ls` command
* Added colorful support for prompt string (PS1) and for `ls/grep/egrep/fgrep` commands when using ADB/AromaFM
* Fixed nano non starting on OrangeFox's embedded Terminal due to missing terminal info
* Added prebuilt VIM - Vi IMproved Editor v8.2.1643
* Added FBE Encryption Toggler to Partition Manager page
* Enabled reboot to 'Fastboot' item unconditionally
* Labeled /dsp partition as 'DSP'
* Moved MicroSD card mount point from /sdcard1 to /external_sd
* Added GUI implementation for USB Storage Exporter by 0xCAFEBABE to Mount page
* Added eMMC Lifetime Used indicator to Partition Manager page
* Add entering to Fastboot mode page to Main menu
* Added fastboot v29.0.6
* Increased UI rendering to 60 FPS
* Added Python v3.10.4
* Added Dark/Light Mode Toggler
* Made the lockscreen background semi-transparent as in stock TWRP
* Added support for saving screenshots in `/tmp/screenshots` if `/sdcard` is not mounted
* Removed Splash changing (it requires ramdisk repacking in recovery.img which exceeds bootloader limit)
Spoiler: (Important) Which OrangeFox version you should choose
CaseR11.1(3) or olderR11.1(4) or newerLatest versionMy ROM is not encryptedXI have an encrypted MIUIXMy ROM was encrypted using ROM's settingsXMy ROM is Android 11 (or lower) and it's encrypted with FBE methodXMy ROM is Android 12 (or higher) and it's encrypted with FBE methodX
Download latest OrangeFox release | Find all OrangeFox releases​
OrangeFox 11.1(2) Update​
Code:
* Replaced 'Percent' with % for eMMC Lifetime Used value
* Added 'Back' button to FBE Encryption Toggler page
* Added synchronization of the fstab encryption flag with the /data encryption type
* Added battery temperature next to CPU temperature
* Enabled OTA by default
Download latest OrangeFox release | Find all OrangeFox releases​
OrangeFox 11.1(3) + OrangeFox 11.1(4) Update
Spoiler: (Important) Which OrangeFox version you should choose
CaseR11.1(3) or olderR11.1(4) or newerLatest versionMy ROM is not encryptedXI have an encrypted MIUIXMy ROM was encrypted using ROM's settingsXMy ROM is Android 11 (or lower) and it's encrypted with FBE methodXMy ROM is Android 12 (or higher) and it's encrypted with FBE methodX
Code:
-- OrangeFox 11.1(4) --
* Synced with latest R11.1 sources based on TWRP 3.6.2 (Android 12.1)
* Fixed ABX format conversion on Android 12 ROMs
* Moved not vital dependencies to /persist partition after flashing recovery using .zip archive
* Added a 'missing dependencies' pop-up at start-up with an invite to flash recovery using .zip archive
* Added full FBE decryption support for Android 12 ROMs
* Removed extra languages (Chinese, Spanish, Hungarian) to free space in ramdisk
* Added to the console an invite to downgrade the recovery for those who use FBE encryption and Android 11 or lower
-- OrangeFox 11.1(3) --
* Upgraded built-in Magisk to v25.1
* Fixed some bugs
* Added to the console an invite to update the recovery for those who use FBE encryption and Android 12 or higher
Download latest OrangeFox release | Find all OrangeFox releases​
mtp mode not working in v11.1.4 in rolex
Hello, I have problem with booting recovery. After installing and booting into it that is happens
Max1mus said:
Hello, I have problem with booting recovery. After installing and booting into it that is happens
Click to expand...
Click to collapse
Solved this problem with installing via fastboot miui with android 7 onboard.
Max1mus said:
Solved this problem with installing via fastboot miui with android 7 onboard.
Click to expand...
Click to collapse
read the post better...
https://imgur.com/nuaM3DW
OrangeFox 11.1(5) Update​
Code:
* Synced with latest OrangeFox R11.1 sources (September 2022)
* Correct FBEToggler button position in some circumstances
* Handle FBE encryption toggling on Android 13+
* Added fastboot support when rebooting to fastboot from OS
* Moved nano editor to ZIP to save space in ramdisk
* Revert back to /sdcard1 path for Micro SDCard mounting
* Disabled APEX
* Removed logcat binaries to free space in ramdisk
* Updated ueventd from Android 11
* Fixed mke2fs issues when wiping
Thanks to @wisanggeni aka Ervan Kurnia for collaborating
* Updated kernel to 4.9.326-2.2-iusmac
* Updated Magisk to v25.2
Download latest OrangeFox release | Find all OrangeFox releases​
THE BEST RECOVERY FOR RIVA
#RECOMMENDED #1
Hello, does OrangeFox Recovery use Android 7.1 or 8.1?
liaotingwei said:
Hello, does OrangeFox Recovery use Android 7.1 or 8.1?
Click to expand...
Click to collapse
You need latest nougat firmware to run it.

Categories

Resources