[TouchPad Development] jcsullins:
Touchpad Toolbox v41

Behold, a new version of Touchpad Toolbox

This new version brings a number of changes. Probably the biggest change is dropping the filename-based detection of ROMs/GAPPs/Recoveries. This should allow any ROM (ICS or above) to be properly detected and installed. There are, however, some limitations on which Gapps will get properly detected at this time. Since you can no longer simply rename the Gapps zip file to get around this, I am not replacing the version in the top posts with this one just yet. See the discussion below for more details on this.

With this new version, I also have 6 new recoveries. There are DataMedia versions of CWM,TWRP and Philz-CWM and Non-DataMedia versions of CWM, TWRP and Philz-CWM. You must use one these. See the discussion below for more details on why.

For the full list of changes, see the changelog below.

If you want to live on the wild side, you could just skip all this useful information and jump straight to the downloads at the bottom.

CHANGELOG

Fix integer divide truncation in calculation of minimum size of volumes. This would only come into play if you were trying to resize a volume to the minimum size allowed.

Make sure to check for unallocated space when calculating volume resizing parameters (i.e. during install). This would only come into play if someone manually unallocated space from a volume without reallocating it to another volume prior to doing an install.

Add support for the Touchpad 3G (aka Touchpad 4G) devices. There is no difference in how Touchpad Toolbox operates on these devices, however, the kernel had to be updated to properly support them. Note that the kernels for all 6 recoveries use the updated kernel (w/ 3G support) also.

Introduce a sanity check on the lvm partition size before performing "Complete Data Reset". This should catch a device that has had tpdebrick run on it with the incorrect size for the device.

Ignore lvm errors prior to "Complete Data Reset". Since all of the lvm metadata, etc. is getting rebuilt, any of these errors should be ignored. This prevented those with corrupt lvm metadata from doing a "Complete Data Reset" (one of the big use cases for it).

Introduce "Adjust Volume Sizes" to the Android Install Confirmation Menu. This will allow adjusting the automatically generated volume resizing parameters that are used for the Install.

Enforce minimum size of 264M on the media volume. The utility that does the fat filesystem resize wants to convert the filesystem from fat32 to fat16 when the size is under 264M. I don't think we want that to happen.

Introduce a "CANCELLED" status to the menu pane. So if you cancel or abort an Install, Complete Data Reset, Resize Android Volumes, etc. it will show "CANCELLED" at the bottom of the menu pane when it returns to the main menu instead of pretending you never did anything at all.

Introduce prompt for volume repair when needed. Before manipulating the volumes, checks are done to make sure there are no errors on them. Any "trivial" errors will automatically be repaired. Previously, the user would need to know how to interpret the error message given when "non-trivial" errors are encountered and know to use the "Repair Android Volumes" to attempt repair. Now, this case is detected and the user is warned and prompted to choose to attempt the "non-trivial" repair or not.

Replace filename-based ROM/GAPPS/Recovery detection with inspection detection during install process. More on this in the discussion below.

Check/confirm DataMedia removal on install. If you install a non-datamedia ROM over a datamedia ROM, the data in the "sdcard" that lives under /data/media will be erased. Previously, if this was detected (trying to do this), the install would fail (intentionally) noting that it refuses to do it. Now, a warning prompt will appear allowing you to choose to do it or not.

Add "CHGD" battery charging indicator. A "CHG" will show to the right of the battery percentage when the battery is charging. When the battery becomes fully charged, it will change to "CHGD". Note this is different than being at 100%. This means it's at 100% and the charging chip has dropped down to "trickle-charge" level (under 5mA, usually about 1mA).

Kill useless output during read-only check. There are a number of devices out there that have apparently become read-only (no writes to the eMMC (storage space)) works). As part of the Complete Data Reset, a test for this is done. This stops some useless output during that test.

Disable USB OTG host-mode detection via OTG ID pin. Several people have reported that nothing happens when they get to the point of install where it mounts the media volume onto the PC. After debugging this issue with a couple of these people, it was determined that those devices were in USB OTG host-mode. This should only happen when you have a OTG cable attached. The OTG cable has the ID pin grounded to tell the device to enter host-mode. Host-mode is what's used to connect USB storage devices, mice, keyboards, etc. (you need more than an OTG cable with the Touchpad, but that's another story). The USB functions used with TPToolbox (eg. Mount Media Volume) cannot work when in host-mode. Initially, it seemed that a couple of people just had a faulty cable. However, as more people reported the issue and some reported the same cable working OK in one Touchpad but not another, it seems that there may be more to it than a simple fault (i.e. short) in the cable. I have disabled the functions inside the kernel that detects host-mode via the OTG ID pin. This should, I hope, resolve the issue and allow Touchpad Toolbox to work properly with "possibly marginal" USB cables.

DISCUSSION

When you do an "Install Android" and copy the files over to be installed, a number of things need to be determined before the install can proceed. Obviously, you need to know which file is the ROM, which is the Recovery and which is the GAPPs. To know how to size the volumes, you also need to know if the ROM is DataMedia or Non-DataMedia. Since one of the goals of Touchpad Toolbox is to prevent errors before they happen as much as possible, you also want to know if the version of GAPPs is appropriate for the version of Android being installed and that the version of recovery (DataMedia vs Non-DataMedia) is appropriate for the ROM being installed. [NOTE: There is actually a few more things that needs to be determined, but I'm trying to not over-complicate this discussion.]

With the initial release of Touchpad Toolbox, I used filename patterns to determine the information mentioned above. I had a better system in mind (or at least most of it) but it would take some time to test and implement. Also, there was a great demand (IMO) for a much simplier and more reliable way to install KitKat ROMs than what was available. I was able to support all KitKat ROMs that were available at the time (except for some "test" releases) plus a couple "legacy" ROMs using the filename patterns. So I went ahead and released it that way, and started working on the "real" system.

I had a good idea how to detect and determine all the information I needed for the ROM files by looking at various files (build.prop and fstab's) within the zip (or within the ramdisk that's inside the boot image inside the zip). After putting everything together, I tested a wide range of ROMs. It worked as expected and everything was detected properly on all ROMs I tested.

The Recovery file is a special case. Since the Recovery is so integral to how installs are done with Touchpad Toolbox, I only want to support those that have been tested with it. This does not mean these are "custom" recoveries. The only thing that I'd consider "custom" about them is the addition of an extra string when they print the version so that you can identify the particular build that you are running (i.e. "jcsullins-datamedia-20140317"). Even though they are not "custom", there are some specific requirements. Mainly, they need to support mounting and installing from the "sdcard" that lives on the "media" volume and not have any issues with file corruption on that filesystem. People may remember that I started releasing recoveries a couple months prior to releasing Touchpad Toolbox. I did this since the existing (DataMedia) recoveries did not meet the requirements. So, since I only want to support recoveries that are confirmed to work properly with Touchpad Toolbox, I can forego any complicated detection and simply include a special configuration file (tptoolbox.cfg) inside the recovery zip that contains the needed information about that recovery.

At first, I wasn't sure how to deal with the GAPPs files. However, after taking a look at the GAPPs files that I had, I noticed that they all (except for those prior to ICS) had a special file called g.prop inside them. This file contained the information I needed (the version of Android that that particular GAPPs file was intended).

So I was able to detect all the information I needed without relying on filenames or filename patterns. I put everything together and did many tests with everything from ICS to KitKat. It worked great.

After working on a few other things, I decided to go ahead and button everything up and prepare for release. I tested with one of the recently released ROMs (that had been released since doing all the previous testing). It didn't detect the GAPPs. I checked and this GAPPs did not have the g.prop like all the others. I didn't find anything else similar inside the GAPPs zip that could be used.

So I guess I didn't go far and wide enough with my initial testing. I tested the GAPPs available from goo.im/gapps, teamandroid.com/gapps and paranoidandroid.co/gapps and they all (ICS+) had the g.prop and were detected properly. However, the gapps from XDA user "BaNkS" (google "banks gapps") did not.

I have some plans on how to deal with the GAPPs detection issue, but I can't delay this release any more.

I'd like feedback on which other GAPPs packages I should test.

Touchpad Toolbox Downloads

Touchpad Toolbox (v41 2014-08-10) via mediafire:

http://www.mediafire.com/download/55izw8odbj4xnbs/TPToolbox-2014-08-10-v41.zip

Touchpad Toolbox (v41 2014-08-10) via androidfilehost:

http://www.androidfilehost.com/?fid=23610159112654011

DataMedia Recoveries Downloads

Philz-CWM (DM 2014-06-12) via mediafire:

http://www.mediafire.com/download/vvldbc3380y4pl1/update-PhilZ_CWM-jcs-dm-tenderloin-20140612.zip

Philz-CWM (DM 2014-06-12) via androidfilehost:

http://www.androidfilehost.com/?fid=23610159112654007

TWRP (DM 2014-06-12) via mediafire:

http://www.mediafire.com/download/2c2cssc6f2e5miy/update-TWRP-jcs-dm-tenderloin-20140612.zip

TWRP (DM 2014-06-12) via androidfilehost:

http://www.androidfilehost.com/?fid=23610159112654006

CWM (DM 2014-06-12) via mediafire:

http://www.mediafire.com/download/2ccyd7dcd62ybmn/update-CWM-jcs-dm-tenderloin-20140612.zip

CWM (DM 2014-06-12) via androidfilehost:

http://www.androidfilehost.com/?fid=23610159112654009

Non-DataMedia Recoveries Downloads

Philz-CWM (NODM 2014-06-14) via mediafire:

http://www.mediafire.com/download/eb602915di0gcuc/update-PhilZ_CWM-jcs-nodm-tenderloin-20140614.zip

Philz-CWM (NODM 2014-06-14) via androidfilehost:

http://www.androidfilehost.com/?fid=23610159112654008

TWRP (NODM 2014-06-14) via mediafire:

http://www.mediafire.com/download/h6k3925gee94lp3/update-TWRP-jcs-nodm-tenderloin-20140614.zip

TWRP (NODM 2014-06-14) via androidfilehost:

http://www.androidfilehost.com/?fid=23610159112654005

CWM (NODM 2014-06-14) via mediafire:

http://www.mediafire.com/download/5ljpi7e74a38120/update-CWM-jcs-nodm-tenderloin-20140614.zip

CWM (NODM 2014-06-14) via androidfilehost:

http://www.androidfilehost.com/?fid=23610159112654010

EDIT: 2014-08-22 13:21 CDT -- Corrected link for: "CWM (DM 2014-06-12) via androidfilehost"