Jump to content



About The Author
Jeff McIntire
Jeff McIntire is an avid Android enthusiast whose first exposure to the world of Android, rooting, and customizing came in 2010 through the Samsung Captivate. Later that same year, he was introduced to the Verizon community through the Fascinate, which carried him from Eclair all the way to Ice Cream Sandwich. Having tried various ROMs, kernels and themes based on TouchWiz, he took the plunge into AOSP in May 2011 and never looked back. He now happily taps away at his Galaxy Nexus, always looking out for the latest and greatest, and helping others along the way.

TWRP gets updated to 2.4.0, big changes under the hood

The popular touch-based recovery TWRP has been updated to version 2.4.0, bringing some major under-the-hood changes and some performance improvements. Included among them are support for exFAT32 SD cards, an improved GUI while running Open Recovery Scripts, and freedom from busybox's 2 GB .tar archive size limit.

To be sure, this update is focused less on adding a huge new user-oriented feature and more on improving performance under the hood while laying the groundwork for future improvements. The full changelog, taken directly from the TWRP website, is as follows:
  • Using libtar instead of busybox's tar for better control over tar file creation and breaking the 2GB barrier that busybox imposes (thanks to bigbiff)
  • Support for exFAT formatted sdcards (also thanks to bigbiff)
  • Support for decrypting Samsung TouchWiz encrypted devices including internal and external storage (special thanks to a3955269 for figuring it out)
  • Improvements to OpenRecoveryScript including displaying a proper GUI while the script is running
  • Added wipe cache and dalvik after ADB Sideload
  • Replaced many system calls with their native C counterparts
  • Fixed bugs in file manager where it would display an empty list after moving or deleting a folder
  • Fixed AOSP recovery commands to run after decryption on encrypted devices
  • Improvements for building TWRP in CM10.1
  • Other minor bugfixes and improvements
Size matters

In order to explain some of these changes to you more fully, I interviewed RootzWiki developer and Team Win member Dees_Troy. For example, the first item in the changelog above refers to "Using libtar instead of busybox's tar for better control over tar file creation and breaking the 2GB barrier that busybox imposes." What this basically means is that TWRP will no longer be subject to the quirks and update cycles peculiar to busybox, particularly the size limit busybox imposes on .tar archives.

To go into more detail, when you make nandroid backups, they are stored as a collection of .tar files. Until now, each .tar file could be no larger than 2 GB in size, so that data partition you have with all those graphics-intensive 3D games would have to be split into several .tar archive files. The use of the libtar file manipulation API instead of busybox makes it possible to split your data partition into fewer archives, each being larger in size (though still subject to the 4 GB limit imposed by most SD cards today that use the FAT32 format.

As display resolutions improve and games become even more realistic and graphics-driven, your data partitions will inevitably become larger in the future, and TWRP aims to be ready for the challenge (an example of that groundwork I referred to earlier). Even though the capability is now there for TWRP to make archives larger than the 2 GB limit imposed by busybox, the recovery still keeps your archives 1.5 GB or smaller until libtar can be tested more extensively.

Now we're ready for that eventual day when we have single files in /data that we want to back up that are larger than 4GB.
- Dees_Troy, Team Win, on future-proofing TWRP's backup capabilities


The capability to store larger archives becomes even more important in light of last year's increase in the maximum app size that Google will host on its Play Store. While the initial download is still limited to 50 MB, the support files (game levels, graphics, etc) can be up to 2 GB each, and Google will host up to two of these per app on it servers.

Performance improvements, functionality and eye candy

In an effort to improve performance, many system calls have been replaced by their native C counterparts. To explain this one, imagine typing a command line in the Terminal Emulator on your phone - the command is parsed and executed in the system shell, but the actual function was written in C. TWRP simply bypasses the system shell and calls the function directly in many cases.

If you have a Samsung device and run a TouchWiz-based ROM, and you have used your TouchWiz-based encryption feature to encrypt your device, you can now decrypt it when needed using TWRP, since it now supports TouchWiz decryption. If you use exFAT-formatted SD cards, you will be glad to know that TWRP now supports these. If you like to build from source, you can now download source for TWRP and compile it in CM10.1.

You might notice a difference in your screen's appearance while running recovery scripts due to the proper GUI TWRP now displays while the script is running instead of the old white text on black background. Other features include the ability to wipe cache and Dalvik after ADB sideload, a fix for a bug that displays an empty list after moving or deleting a folder using TWRP's built-in file manager, and various other bugfixes.

You can see if your device is supported here, and if you already have TWRP installed on your device, you can either use flash the new recovery image manually or update it using Goo Manager.
via [TWRP]

blog comments powered by Disqus