[Utility][v3.5.0][11/08] Auto-Patcher (4.4)

Search This thread

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com
The Auto-Patcher 3.5.0​
(Element 113)

by pastime1971 and mateorod.
with kobik77, and Caldair

DISCONTINUED!!! (2/10/14)
Information here

I am no longer actively monitoring this thread! OpenPDroid support is no longer being maintained for Android 4.4 builds after 1/20/14. Older builds will still work for as long as you like. A little statement is on the link above.

OpenPDroid

Come see us on github or at the OpenPDroid thread.

The Auto-Patcher​

The Auto-Patcher is a smali patching utilty that can be used to port mods, framework changes, themes and more across ROMs and devices by patching files and outputting a flashable zip.

We hope that this tool can help developers get their work to a wider audience and help users easily try programs that may call for skills or time they don't have. In one command, you can have all the power and utility of the mods/programs listed below, with no specialized knowledge.


Supports
  • ClockworkMod and Aroma installers
  • Cyanogen [CM7, CM9, CM10, CM10.1, CM10.2]
  • AOKP
  • AOSP 2.3- > 4.4
  • ParanoidAndroid
  • Evervolv
  • SlimRom
  • PACman
  • ...and many others.
  • If you want your ROM supported, open an issue on the auto-patcher github with a link to the ROM's source code and a download link!

We do not support system.img, Odexed roms or Sense, TouchWiz or other OEM-skinned AOSP at this time.

Supported Platforms​
The Auto-Patcher runs on Linux and MacOSX terminals. Project contributors kobik77 and wbedard have helped us add Windows support as well.

Kobik77 has developed a stand-alone GUI for Windows called ApG. The most current version of ApG can be downloaded here.


The Available Mods

Unless there are hardcoded reasons they conflict, all of the mods below can be combined, so you could get all of the programs and tweaks in one shot. If you use other premade patches or zips, you would have to choose between them.

The Auto-Patcher is the only non-destructive way to get these enhancements, short of building your own ROM and/or applying your own changes to the code.

The name is paranthesis is the MODS for use on the command-line. See usage below if that confuses you. It isn't hard, really.

  • OpenPDroid(openpdroid): NEW!
    • Brand new open-source framework patches, designed for use with the open-source Pdroid Manager. Support for 4.1.2 and 4.2.1!!
  • PDroid (pdroid):
    • The one where we make our bones, PDroid is an advanced privacy app, one that allows you to deny system and user apps permissions they usually need to function. PDroid changes the information passed by permission requests instead of denying it like other apps. That means no FC's or misbehaving apps. PDroid allows you to set custom phone numbers or IMEIs as well. PDroid is only officially supported through GB. The Auto-Patcher makes it an option for ICS and Jellybean ROMs as well.
  • PDroid 2.0 (pd2.0):
    • CollegeDev's update of the core PDroid app and framework. There is a separate app you will need as well. You can get the app and read about PDroid2.0 and get the .apk here. This mod is only for Android 4.1.2+
  • V6 Supercharger (v6supercharger):
  • Insecure Boot.img (insecure):
    • This should work for just about every ROM, giving you true root shell access, enabling adb push of system files and adb remount commands. It can truly save your bacon if you are the type to play with system files and flashing. Some ROMs come with this feature already, so if this patch fails, it just means you already have one.
  • Secure boot.img (secure):
    • The opposite of the above. There are advantages to both, and what you want depends on what you do. I haven't seen any other way to secure a boot.img, with so many roms now having insecure by default.
  • Swap internal and external storage (external_internal):NEW!
    • This swaps your app storage from an sdcard to internal storage. This allows you to use all apps, even w/o an sdcard!
  • TabletUI (tabletUI):
    • Based on findings by barmullio, this allows users of the "Phablets" UI to switch from the stock phone or phablet layout to Tablet user interface. I personally like the tab interface because it allows me more regular access to the status bar. Lockscreen rotation has been enabled as well. Maintained by Caldair.
    http://xdaforums.com/showthread.php?t=2154075
NEW
Mods for Wifi-only Tablets.
  • 3G Dongle (3gdongle):
    • This allows users of Wifi tabs to use their 3G dongles on their tablets, allowing them to have data on the go. This is a pretty involved mod, and the development is still on-going. We would like to stress that you read up at developer trevd's thread for best practices and troubleshooting. A growing list of confirmed supported dongles can be found there as well.
  • Google Voice (voice):
    • As popularized by bongostl, this allows users to use Google Voice to make outgoing calls. It changes your framework-res to recognize that the tablet is voice capable. This allows you to recieve calls as well and has other call quality advantages over things like GrooveIP.

Usage

Designed to run on Linux, OSX and Windows (using Cygwin)

  • The Auto-Patcher has become completely open-source, and no one has gotten more out of that than our Windows users. kobik77 and wbedard have come aboard and brought Windows support to our formerly *nix-only utility.
  • Kobik has also crafted the first Auto-Patcher GUI! Here is his post with download link and features description (including auto-update from Github!) If you have any trouble with ApG check your anti-virus. Grayfoxmg1 has a post he maintains that covers any and all configuration troubleshooting advice you could need.

    attachment.php

If you use Windows and try ApG from the above link, THAT IS ALL YOU NEED TO KNOW.

The below is for OSX and Linux users.

Requirements for execution: Java (JDK), cpio, patch

Help
For usage and patch availability, place a rom.zip into this directory and try
Code:
$./auto_patcher <ROMNAME>.zip -h mods
The Auto-Patcher v2.5.0
*******************************

The available mods are
****************************************************
*  pdroid   openpdroid  voice   v6supercharger     *
*  voice    insecure    secure  external_internal  *
*  tabletUI 3gdongle    pd2.0                      *
****************************************************

To find out more about any mod, simply enter:
     ./auto_patcher -h <MODNAME>
so
Code:
$ ./auto_patcher -h openpdroid
Code:
The Auto-Patcher v2.5.0 by Mateorod and Pastime1971
*************************************************

Mod Name:    openpdroid

    A fork of the open-source PDroid and Pdroid2.0 framework.


Developer: FFU5y/wbedard/mateorod/Community
Dependancies: The PDroidManager app freely available from Google Play or http://xdaforums.com/showthread.php?t=1994860

Works on ROMs from Android 4.1.2 -> 4.2.1

    usage:     ./auto_patcher <ROM> <MODS> <ROMTYPE>
    example:   ./auto_patcher CM10.zip openpdroid cm

Use ./auto_patcher -h for the help menu

To patch a ROM
Code:
./auto_patcher <[FONT="Courier New"]ROMNAME[/FONT]>.zip <[FONT="Courier New"]MODS[/FONT]>
example:
Code:
./auto_patcher cm10-encore-fat-tire.zip pdroid,tabletUI
You can have any number of mods applied at the same time, just separate them with a comma and NO SPACES!

98% of the time, that is all you need to know!


If you would like to see some of our more advanced usage, please see the third post.

Debugging
  • There is never any need for any wiping or restoring of a backup! If you encounter any problems, simply reflash the generated restore.zip or your ROM over the install, preserving all data and settings!
  • In the Auto-Patcher directory you will see a logfile that is generated with each run of the program. Please attach the entire logfile in order to get the best support we can offer.

Current and past versions available at our download page on techerrata
Download
You can also clone from our github. See the README because there is actualy a lot extra there.

Contributors
pastime1971
mateorod
kobik77 (ApG developer/cygwin maintainer)
Caldair: TabletUI maintainer.

Maintainers
Urinophoria (just about everything!)
KickNGuitar (OSX testing)
AuSSiELaMbChOpS (PAC rom maintainer)



Thanks
eyeballer and kevank with Team Win for web hosting
Svyat
CollegeDev
JesusFreke, brut.all and iBotPeaches
FFU5y
tonyp
krylon360
inportb
chainfire (for faapt)
zeppelinrox
trevd
rathian, and TheMatrix2000 (for OSX testing)
romracer and greenblue for 4.1.2 fixes
ninno_mx

The Auto-Patcher is a fully open-source utility, and we welcome new contributors.

If you are a developer, themer or script writer who has code-level edits you walk your users through, let us know and we can get together and create a package for you. A message to developers is here, which also touches on our donation policy.
 
Last edited:

pastime1971

Senior Member
Apr 25, 2011
1,893
1,076
Plesanton, CA
PREREQUISITE patcher only works on unix environments (linux, macosx, cygwin)
1. set up linux vm or install cygwin, if you don't have a linux machine (see below)
2. install the linux packages "jdk" (and "jdk-devel" depending on linux distro) if missing "java" or "jar" (openjdk works as well as sun java jdk)
3. install the linux command "patch" if missing (see below)

HOW TO VM or Cygwin see robjective's post for vm setup, or kobik77's post for cygwin setup

HOW TO INSTALL TOOLS if you encounter "Missing patch diff tools" error, see http://xdaforums.com/showpost.php?p=26388234&postcount=422

HOW TO INSTALL JAVA JDK you do need both java (JRE) and jar (JDK) commands
on ubuntu, type sudo apt-get install openjdk-7-jre openjdk-7-jdk
on fedora, type, su -c "yum install java-1.7.0-openjdk java-1.7.0-openjdk-devel"

edit: ubuntu installation of openjdk jre corrected.
 
Last edited:

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com
Advanced Usage and Changelog​

Advanced Usage

Please be aware this is almost NEVER necessary. But it remains an option and possibly useful if we release a bad patch (hasn't happened yet...)

Code:
./auto_patcher <[FONT="Courier New"]ROMNAME[/FONT]>.zip <[FONT="Courier New"]MODTYPE[/FONT]> <[FONT="Courier New"]ROMTYPE[/FONT]> <[FONT="Courier New"]PATCHDATE[/FONT]>
The '<>' surrounding the variables is a convention that indicates you replace that section with your particular info, without the actual <> symbols.

  • ROMNAME is the literal name of the Rom.
  • MODS would be a list of offered mods (as seen in the -h menu or the OP), separated by commas and NO SPACES.
  • ROMTYPE is cm, aosp, aokp or pa
  • PATCHDATE is OPTIONAL and almost NEVER needed. The auto-patcher now can match your ROM with the best patch date automatically.

For example:
Code:
./auto_patcher cm-10-OFFICIAL-20120820.zip pdroid,v6supercharger cm 20120824

Changelog

Most Recent Changes:
Code:
# 2013.07.20. (v2.9.93) New OPD CM patches, many bugfixes
# 2013.07.20. (v2.9.935) New PA, AOKP patches. gitattribute. FIx PING for cygwin. (h/t: gcydtmkq)
# 2013.08.05. (v2.9.941) Bundle patchv2.6.1 for cygwin.
# 2013.08.07. (v3.0.0) Support for Android-4.3 (Opendproid only- CM and AOSP).

Entire Changelog:
Code:
# ChangeLog
# 2012.05.00. (v0.1)
# 2012.05.12. (v0.2)   allows user to specify a different version of patches
# 2012.05.13. (v0.3.0) force "patch -N", remove temp upon failure, generate log output
# 2012.05.13. (v0.3.1) revised the generation of updater-script (SGS2)
# 2012.05.15.          added AOSP patches
# 2012.05.15.          added crespo-aosp patches; device-specific patching if patch exists
# 2012.05.15.          remove restore.zip upon failure
# 2012.05.15. (v0.4.1) added CM7 (GB) patches
# 2012.05.18. (v0.4.2) added checking for tool commands
# 2012.05.21. (v0.4.3) apply device-specific patches only when it is specified
# 2012.05.26.            added task title to log
# 2012.05.31. (v0.4.4) CM9 patches updated, crespo-aosp added
# 2012.06.04. (v0.4.5) added checking tools and rom, added aroma installer support
#                        add patch outputs reroute
# 2012.06.15.          CM9 patches updated
# 2012.06.16. (v0.4.6) AOKP patches updated, patch versions restructured
# 2012.06.17. (v0.5.0) patcher script reorganized, removed build.prop
# 2012.06.17. (v0.6.0) auto patcher script for pdroid and v6 patches
# 2012.06.19. (v0.6.1) add patches for CM7.2 Final
# 2012.06.20. (v0.6.2) updated CM 7.2 patches
# 2012.06.23. (v0.6.3) fix symlinks
# 2012.06.26. (v0.6.4) added 0618 patches for cm7 nightlies; removed 0619 cm7.2 final
# 2012.06.27. (v0.6.5) added new CM9 patches (20120626)
# 2012.06.27. (v0.6.6) added CM7 nightly patches (20120625) (finally!)
# 2012.07.02. (v0.7.0) Redid AOSP/AOKP; add Windows support (using Cygwin). Thanks kobik77!
# 2012.07.06. (v0.7.1) updated CM9 patches (20120706)
# 2012.07.08. (v0.7.2) updated AOKP (20120707) and CM9 (20120708) pdroid patches
# 2012.07.11. (v1.0.0) reworked script works on Linux, Mac OSX, and Windows (on Cygwin); 
#                        added new ICS/JellyBean support for the new V6-Supercharger
# 2012.07.18. (v1.0.1) new CM7/CM9 Pdroid patches (20120718)
# 2012.07.23. (v1.0.2) updated CM9 patches (20120723)
# 2012.07.23. (v1.0.3) updated CM9 patches (20120724)
# 2012.08.06. (v1.5.0) updated smali/baksmali binaries to 1.33
# 2012.08.06.          Added Pdroid/V6supercharger support for CM10 Jellybean!
# 2012.08.06.          Improved PDroid stability and efficiency (Thanks CollegeDev)
# 2012.08.06. (v1.6.0) added aokp-jb patches for pdroid/v6supercharger, script update
# 2012.08.17. (v1.9.5) Added support for pdroid_addon, by CollegeDev.
#                       Added insecure boot.img mod
#                       Added support for aosp-jb (This needs testing, and may not be
#                         a wide patch due to large variation between AOSP roms.
#                        -Please report all experiences!
#                       Updated all v6supercharger patches w/new edits to ProcessList
#                       Major script overhaul in preparation for additional mods!
# 2012.08.20. (v1.9.6) Conditional support for Official cm10 and aokp-jb builds
# 2012.08.23. (v1.9.7) Final/confirmed pdroid support for Official CM10 and AOKP-JB
# 2012.09.04  (v1.9.8) Bundled cygwin-compatible tools (original was corrupt).
#                       For Cygwin, replaced h2b function with simple bash math
#                       conversion (req'd for compat w/ Cygwin tools).
# 2012.08.26. (v2.0.0) Added .apk patching
#                       Added 3G Dongle support for Nexus 7 (trevd)
#                       TabletUI support for Nexus 7 (maybe more)
#                       Google Voice support for Nexus 7
#                      mods are 3gdongle, tabletUI, voice, or nexus7suite (for all)
#                      Added provisional file copy menu to widen patching base
# 2012.09.11. (v2.0.1) Cygwin support fixes
# 2012.09.11. (v2.0.2) Bugfix for 3gdongle (all)
# 2012.09.16. (v2.1.0) Significant restructuring of core operations; added edit text file
#                       fix for "method-cap" errors in pdroid.
# 2012.09.20. (v2.1.1) Fix for Phone FC's; OSX support finalized; ContentResolver resolved
# 2012.09.28. (v2.1.2) Hotfix for failed pdroid patching. Logging improvements.
# 2012.10.07. (v2.1.5) Final pdroid support for CM7.2 Official Releases
#                       Added aosp-mod patches for pdroid patching of AOSP kangs
#                       Switched to Chainfire's (f)aapt for speed/space reasons
# 2012.10.13. (v2.1.6) New PDroid patches for aokp-jb and cm10 4.1.2
#                       Revert (f)aapt- temporary due to reported issues
# 2012.10.15. (v2.17) New (again) CM10 pdroid patches.
#                     Move files to be copied into $p/$R/$B
#                      -This required a bunch of file moving-report broken symlinks.
#                     Some error check on the old RIL delete functions (thanks bundrik)
# 2012.10.16. (v2.1.7.5) Fix FC on phone with CM10 pdroid patches
# 2012.10.19. (v2.1.9) Testing CM10 support for PDroid Extension by CollegeDev.
# 2012.10.22. (v2.2.0) aosp/aokp and cm10 support for pdroid extension by CollegeDev
#                       MAJOR reworking of patches and improved query. only 4 mod types:
#                       cm, aokp, aosp, and pa. See our OP for details.
# 2012.10.26. (v2.3.0) Final (LTS) version. Stable for now until upstream breaks any patches
#                       Thanks to KicknGuitar for the OSX testing!
# 2012.11.01. (v2.3.1) Fix for pdroid RIL deletion for older roms
#                       Better Build query logic and help messages
# 2012.11.02. (v2.3.5) Add Evervolv support for all mods- Thanks to new maintainer poncik!
#                       Fix method cap for pdroid/pd2.0 for AOKP and kangs
# 2012.11.06. (v2.4.0) Update pd2.0 patches to latest pd2.0 release- all except Evervolv
#                       add GsmService to smali.txt; improve rom probe
# 2012.11.08. (v2.4.2) Add Evervolv support for pd2.0; Device-specific scripts
#                       Will display error if using a mod on an inapplicable rom
# 2012.11.09. (v2.4.5) Error catch for random method issues, fix pd2.0 Evervolv and aosp-jb
# 2012.11.17. (v2.4.6) Fix pdroid for CM7. FINALLY!.
# 2012.11.17. (v2.4.7) Internal debugging improvements
# 2013.01.13. (v2.5.0) Added 'openpdroid' mod --Open-Source Pdroid framework
#                       BIG Improvements to help and error-catch. Try ./auto_patcher -h
# 2013.01.15. (v2.5.1) OpenPDroid support for Evervolv and ParanoidAndroid, hotfix for Mms 
# 2013.01.15. (v2.5.2) Fix for cygwin temp files (kobik), provisional telephony files added
# 2013.01.16. (v2.5.3) SlimRom support. Rearrange structure for ApG.
# 2013.01.23. (v2.5.4) Fix small bugs related to rearrange
# 2013.01.25. (v2.5.7) 4.2 TabletUI support [cm,aokp,aosp,Evervolv]
# 2013.01.28. (v2.5.8) Fix for ICS PDroid; small fixes/expansions
# 2013.02.01. (v2.6.0) OpenPdroid 1.0.1 patches (cm, aokp, aosp, evervolv and slimrom. no pa.
#                       Fixed TabletUI for Cm10.1- aosp to come. Removed most old patches.
# 2013.02.01. (v2.6.25) PA OpenPDroid 1.0.1 patches; AOSP TabletUI. removed opd all 1.0.0
# 2013.02.09. (v2.7.0) Add new AOKP, CM9, CM10,CM10.1 and PA (3.0) patches for OPD
# 2013.02.09. (v2.7.5) Add new AOKP, AOSP, CM10.1 and PA (3.0) patches for OPD (Andr. 4.2.2)
# 2013.02.17. (v2.7.9) 4.2.2 opd 4 evervolv; v6supercharger,3gdongle and all but tabletUI.
# 2013.02.20. (v2.8.0) New CM10.1 opd patches. Each BID can have own provisionals now.
# 2013.02.23. (v2.8.2) SlimRom 4.2.2 support (from karamelos), APK recompile safety net.
# 2013.03.01. (v2.8.3) PAC (.aosp-pac) 4.2.2 support (from AussieLambChops), apktool 1.5.2
# 2013.03.03. (v2.8.4) Remove settings.apk from tabUI, replace Mms.apk. Refactors.
# 2013.03.06. (v2.8.5) Bugfixes, mainly.
# 2013.03.17. (v2.8.6) Added 4.2.2 tabletUI test run for CM from Caldair.
# 2013.03.18. (v2.8.6.5) Hotfix from caldair for tabletUI, new SlimRom patches
# 2013.03.18. (v2.8.7) TabletUI support for 10 inch screens (caldair)
# 2013.03.25. (v2.8.8) Fix for Cygwin paths with spaces (from kobik77)
# 2013.04.06. (v2.9.0) Added new tabletUI patches for CM and 4.2 conflicts.
# 2013.04.10. (v2.9.1) Updated aokp openpdroid patches (0405) please report.
# 2013.04.18. (V2.9.2) Added AOSP and SlimROm TabletUI patches (credit: Caldair)
# 2013.04.18. (V2.9.3) Added missing framework2.jar opd aosp 4.1
# 2013.05.08. (v2.9.4) Updates to TabletUI (from Caldair)
# 2013.05.18. (v2.9.5) New AOKP openpdroid patches (0514)
# 2013.05.20. (v2.9.6) New CM and PAC-man (aosp) openpdroid patches.
# 2013.05.27. (v2.9.7) $INCREMENTAL patches for bugs/updates and GPS fix for opd (credits to phillipberndt)
# 2013.05.30. (v2.9.8) Improve apk handling: test fix disappearing apks. New opd: evervolv,slim
# 2013.06.18. (v2.9.83) Introduce auto-update for OSX and Linux...turn off by setting it false in .config
#                        Update PACman patches for OPD and update telephony for PA to silence errors
# 2013.06.18. (v2.9.84) Some environment trickery to speed up search/sort. Add WEBSITE for mods.
#                        Check updating. New AOKP OPD patches
# 2013.06.19. (v2.9.85) Fixes to auto-update. Added changelog.txt
# 2013.06.20. (v2.9.865) Various bugfixes, add color, obfuscate $PROVISIONALS.
# 2013.06.21. (v2.9.87) Added ALTERNATE patches feature- hopefully fixes PA telephony issues.
# 2013.06.22. (v2.9.875) New tabletUI patches, revert flawed CONFLICTS feature
# 2013.06.22. (v2.9.88) New CM opd patches
# 2013.06.28. (v2.9.89) revert baksmali changes for now (still needs work), add new PACman OPD 6/26
# 2013.07.02. (v2.9.91) Switch to SlimRom team's aapt and apktool for OSX+Windows (Need OSX builder!)
# 2013.07.07. (v2.9.92) New opd patches for Slim/PA; some fixes to tabletUi by Caldair
# 2013.07.17. (v2.9.927) Fix missing Mms (finally), support for CM Final, many bugfixes (conflicts, mod ordering, etc.)
# 2013.07.20. (v2.9.93) New OPD CM patches, many bugfixes
# 2013.07.20. (v2.9.935) New PA, AOKP patches. gitattribute. FIx PING for cygwin. (h/t: gcydtmkq)
# 2013.08.05. (v2.9.941) Bundle patchv2.6.1 for cygwin.
# 2013.08.07. (v3.0.0) Support for Android-4.3 (Opendproid only- CM and AOSP).
 
Last edited:

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com
For Developers

The Auto-Patcher is meant as a tool, one that shortens the gap between your work and users. This tool modifies the android framework- unless we specifically partner with a developer, we will leave the proprietary stuff to you.

For instance, we port the Pdroid framework, and make the smali edits for the V6. But users have to go get the app and/or script themselves.

The project is fully open-source and neither pastime1971 or I have donate buttons. We do this for the intellectual challenges it brings and because we believe in the process. At no point are we interested in getting between you and your users or donations.

Sound ok?

If you think you have a project that could benefit from an Auto-Patcher package, please let us know. We are in the midst of creating the tools that will soon allow you to easily (as in one command, easily) create your own patches and packages with basically no change in how you probably already work.

Think of the Auto-Patcher as, at worst, an alternative distribution method. As you can see from the OP, we put the developers of the work front and center. We're conscious of the fact that so many of us do this work for love and that getting recognition for your efforts can be the only reward. We take that seriously.

Feel free to post in the thread or contact us by pm or on github.


Donation Policy (for users)


We feel like if there is a mod you are especially appreciative of gaining, the best thing you can do to show your support is to donate to that mod's dev. Tell them who sent you, please!

For those users who feel like they would like to donate to the Auto-Patcher specifically, we have thought long and hard about the ethics of it and eventually decided that we were better off not personally accepting contributions. The requests for a donate link have been quite humbling, though, so thanks for the enthusiasm.

If you really, really would like to show support to the project, there is a donate link to Techerrata after you request a download. Techerrata hosts a huge number of Android projects, all free of charge. Also, Kobik77, creator of the Windows GUI ApG accepts donations. If you use ApG, you could consider him as well.

There is a reference spot in the Techerrata donate page (they tell me), so make sure you tell them who sent you!
 
Last edited:

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com

Ha. Maybe an hour after we went up, we found out that the transition to CM7.2 final had broken our patches for Gingerbread. Since those patches had worked for every iteration of CM7 in the past, it came as a suprise, to say the least.

However, that always is the way when you release software. The second you go up, no matter how much you try and test, some bug floats immediately to the surface.

It can be maddening...

However, I immediately downloaded the source and began building so as to update the patches. I had hoped to beat any prospective CM7 users, as it has been historically our least used patch. You happened to sneak in before I had a chance to upgrade the patches.

The second of the two necessary builds is something like half-way done. It will be maybe a couple of hours at most before I update the Auto-Patcher.

Thanks for trying it, the issue will be resolved shortly.

Edit: While I was writing this patime1971 chimed in, and as usual it looks like he is right. The files that failed to patch were the same as the ones that fail for cm7.2 final and threw me off.

Like pastime suggested, try some of the ICS patch sets. All CM9 and AOKP ICS roms can be patched, as well as many of the derivatives. But some of the custom roms can fail. Usually those failures will come in patching the ServerThread.
 
Last edited:

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com
Auto-Patcher20120619v061 added to OP with updated patches to support PDroid for CM7.2 Final.

As is our practice, once pastime1971 posts his arcee builds I will cross-reference them with the new patches to ensure wide coverage for the patches. But history does indicate we should be covered with this update.
 

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com
it's my ROM and it's cm7.2 stable but i change the build.prop to 4.0.4 will this interrupt your script? :D hope not

---------- Post added at 10:16 AM ---------- Previous post was at 10:06 AM ----------



this new build will work on cm7.2 stable? i'll test that and report back :D

The script automatically queries the build.prop for likely matches of ROM and DATE, but you can override those settings by explicitly choosing you options.

The v061 has some newer patches for CM7.2 final in it, but they might need some adjusting or even replacing. They work on some tests I have made, but not for a vibrant set I was sent. Which is troubling, because across builds of CM source, the patches should be fine.

Let us know how it goes, we will continue to work at updating the patch tonight.
 

homi3kh

Senior Member
Jul 3, 2010
250
259
Phnom Penh
www.facebook.com
it still gives error, my ROM is cm 7.2 final for HTC Legend

### apply framework.patch ###
1 out of 11 hunks FAILED -- saving rejects to file smali/android/app/SuggestionsAdapter.smali.rej
9 out of 38 hunks FAILED -- saving rejects to file smali/android/content/SyncStorageEngine.smali.rej
Reversed (or previously applied) patch detected! Skipping patch.
5 out of 5 hunks ignored -- saving rejects to file smali/com/android/internal/telephony/cdma/EriManager.smali.rej
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! error: failed framework.patch
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! please refer to /host/HomICS/ap/log20120620104041 for any debugging

! patching failed.
 

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com
Well, for encore and some others it was just released.

That's why the patcher wasn't ready with patches ready for it.

Here is a link to a news release.

pastime1971 just sent me his patches he made from a separate build, but it also fails to patch the CM7.2 final roms I am using for checking (vibrantmtd and encore). It seems neither of us checked out the correct branch when we built.

I will continue to look to correct this. We'll get it soon for you, though.

And for those of you NOT trying to patch 7.2, let me make sure that it is clear that the Auto-Patcher is working as advertised, we just need to add support for the newest release of Gingerbread.

We will add it soon, but everything else is working as expected!
 
  • Like
Reactions: Und3rtaker

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com
AWESOME! Will the Auto-Patcher replace the traditional PDroid-Patcher in the long run? Any official statement about this development from the real PDroid-Developer yet? ;-)

Svyat has said that he is getting pretty close to being done with an ICS version of his patcher. I know he had some things going on that were making the release come out later than he wanted.

My involvement in this started when I visited pastime1971's thread where he had personally ported PDroid to ICS with some build patches. Together we were able to make the PDroid-Patcher, in a manner we soon realized could be used to port all types of mods, themes and code edits. The Auto-Patcher has all the function of the PDroid-Patcher but is expandable, you know?

It probably won't necessarily replace the PDroid-Patcher, just because some people are only looking to get PDroid working on ICS, and nothing more.

The Auto-Patcher is more of a porting method, one that happens to include PDroid as an example.

But I think both of our involvement in the project came about as a result of our admiration of PDroid, and a simple wish to use it on our ICS devices.

I know that I personally am excited to see what Svyat comes out with once he releases his patcher.

But in the meantime, I am real happy with the results of using both patchers we made. Through some fairly intensive testing, we are confident that PDroid works just as it should on ICS through these efforts. Which is of course what we wanted all along :).
 

pierx

Senior Member
Dec 3, 2011
461
1,044
Awesome!, thanks Mateorod and Pastime1971 for this noob proof script. Now Pdroid can be easily integrated to CM9,..
 
  • Like
Reactions: mateorod

SecUpwN

Senior Member
Jun 12, 2012
2,086
645
DEUTSCHLAND!
secupwn.github.io
I'm currently using Virtuous Shooter 3.0.5 and have already talket to pastime about his patcher not working on this ROM. He meant that porting it would be a huge effort without the source code, will this auto patcher work on above ROM now? Finding another ROM that fully supports 3D and camera of the HTC EVO 3D is rather hard these days...
 

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com
Anything pastime1971 might have told you about the pdroidpatcher will still hold true here. This has essentially the same function, simply generalized and with some script tightening and optimization.

We are only able to make our existing patches because of the existence of source code.

This Auto-Patcher is meant as way to port mods to end-users who don't want to or cannot build their own ROMs. It's chief feature is that we have devised a way to patch in framework level function AFTER the ROM has been built.

Just about anything can be patched at build time, and once that happens, we can use the result to port it to similar ROMs. But without that first build, it is hard to port to some of the more esoteric ROMs.

Some things, like the services.jar for the V6 Supercharger, are basically universally portable with just one patch. It just depends on the function of the changes and their breadth.

PDroid has a BUNCH of changes to the framework of the ROM. Without some sort of map to where those changes need applying, the Auto-Patcher is basically operating blind.
 

SecUpwN

Senior Member
Jun 12, 2012
2,086
645
DEUTSCHLAND!
secupwn.github.io
Thanks for clarifiying this, mateorod. I might have to switch my ROM then. Shouldn't be a problem though. Will it work on KingCobra3D-ICS? Does anybody know? This ROM sounds waay too good to be true.. :p Edit: The Auto-Patcher fails in generic mode on above mentioned ROM. Would you PLEASE add support for it?
 
Last edited:

mithrial

Senior Member
Sep 22, 2010
94
29
Motorola Moto G100 / Edge S
I get bootloop after flashing the created update.zip:

Output of auto_patcher:
Code:
ubuntu1% ./auto_patcher cm-7.2.0.1-bravo.zip pdroid cm7 20120619
### verify tools ###
### verify ROM ###
### unzip patch tools ###
### unzip patch patches ###
### unzip rom ###
 inflated: system/framework/core.jar
 inflated: system/framework/framework.jar
 inflated: system/framework/services.jar
### create updater script ###
 inflated: META-INF/com/google/android/update-binary
 inflated: META-INF/com/google/android/updater-script
### using Clockworkmod installer ###
### create restore.zip ###
### decompile framework.jar ###
... extract preloaded-classes ...
### decompile core.jar ###
### decompile services.jar ###
### patch pdroid/cm7/20120619 ###
### apply framework.patch ###
### apply core.patch ###
### apply services.patch ###
./auto_patcher: line 261: patches/pdroid/cm7/20120619/services.patch: No such file or directory
cat: services.jar.log: No such file or directory
grep: services.jar.log: No such file or directory
### rebuild framework.jar ###
### rebuild core.jar ###
### rebuild services.jar ###
### create updater.zip ###
### finished ###
flash update.zip to install the modified
flash restore.zip to restore the original
 

Top Liked Posts

  • There are no posts matching your filters.
  • 242
    The Auto-Patcher 3.5.0​
    (Element 113)

    by pastime1971 and mateorod.
    with kobik77, and Caldair

    DISCONTINUED!!! (2/10/14)
    Information here

    I am no longer actively monitoring this thread! OpenPDroid support is no longer being maintained for Android 4.4 builds after 1/20/14. Older builds will still work for as long as you like. A little statement is on the link above.

    OpenPDroid

    Come see us on github or at the OpenPDroid thread.

    The Auto-Patcher​

    The Auto-Patcher is a smali patching utilty that can be used to port mods, framework changes, themes and more across ROMs and devices by patching files and outputting a flashable zip.

    We hope that this tool can help developers get their work to a wider audience and help users easily try programs that may call for skills or time they don't have. In one command, you can have all the power and utility of the mods/programs listed below, with no specialized knowledge.


    Supports
    • ClockworkMod and Aroma installers
    • Cyanogen [CM7, CM9, CM10, CM10.1, CM10.2]
    • AOKP
    • AOSP 2.3- > 4.4
    • ParanoidAndroid
    • Evervolv
    • SlimRom
    • PACman
    • ...and many others.
    • If you want your ROM supported, open an issue on the auto-patcher github with a link to the ROM's source code and a download link!

    We do not support system.img, Odexed roms or Sense, TouchWiz or other OEM-skinned AOSP at this time.

    Supported Platforms​
    The Auto-Patcher runs on Linux and MacOSX terminals. Project contributors kobik77 and wbedard have helped us add Windows support as well.

    Kobik77 has developed a stand-alone GUI for Windows called ApG. The most current version of ApG can be downloaded here.


    The Available Mods

    Unless there are hardcoded reasons they conflict, all of the mods below can be combined, so you could get all of the programs and tweaks in one shot. If you use other premade patches or zips, you would have to choose between them.

    The Auto-Patcher is the only non-destructive way to get these enhancements, short of building your own ROM and/or applying your own changes to the code.

    The name is paranthesis is the MODS for use on the command-line. See usage below if that confuses you. It isn't hard, really.

    • OpenPDroid(openpdroid): NEW!
      • Brand new open-source framework patches, designed for use with the open-source Pdroid Manager. Support for 4.1.2 and 4.2.1!!
    • PDroid (pdroid):
      • The one where we make our bones, PDroid is an advanced privacy app, one that allows you to deny system and user apps permissions they usually need to function. PDroid changes the information passed by permission requests instead of denying it like other apps. That means no FC's or misbehaving apps. PDroid allows you to set custom phone numbers or IMEIs as well. PDroid is only officially supported through GB. The Auto-Patcher makes it an option for ICS and Jellybean ROMs as well.
    • PDroid 2.0 (pd2.0):
      • CollegeDev's update of the core PDroid app and framework. There is a separate app you will need as well. You can get the app and read about PDroid2.0 and get the .apk here. This mod is only for Android 4.1.2+
    • V6 Supercharger (v6supercharger):
    • Insecure Boot.img (insecure):
      • This should work for just about every ROM, giving you true root shell access, enabling adb push of system files and adb remount commands. It can truly save your bacon if you are the type to play with system files and flashing. Some ROMs come with this feature already, so if this patch fails, it just means you already have one.
    • Secure boot.img (secure):
      • The opposite of the above. There are advantages to both, and what you want depends on what you do. I haven't seen any other way to secure a boot.img, with so many roms now having insecure by default.
    • Swap internal and external storage (external_internal):NEW!
      • This swaps your app storage from an sdcard to internal storage. This allows you to use all apps, even w/o an sdcard!
    • TabletUI (tabletUI):
      • Based on findings by barmullio, this allows users of the "Phablets" UI to switch from the stock phone or phablet layout to Tablet user interface. I personally like the tab interface because it allows me more regular access to the status bar. Lockscreen rotation has been enabled as well. Maintained by Caldair.
      http://xdaforums.com/showthread.php?t=2154075
    NEW
    Mods for Wifi-only Tablets.
    • 3G Dongle (3gdongle):
      • This allows users of Wifi tabs to use their 3G dongles on their tablets, allowing them to have data on the go. This is a pretty involved mod, and the development is still on-going. We would like to stress that you read up at developer trevd's thread for best practices and troubleshooting. A growing list of confirmed supported dongles can be found there as well.
    • Google Voice (voice):
      • As popularized by bongostl, this allows users to use Google Voice to make outgoing calls. It changes your framework-res to recognize that the tablet is voice capable. This allows you to recieve calls as well and has other call quality advantages over things like GrooveIP.

    Usage

    Designed to run on Linux, OSX and Windows (using Cygwin)


    If you use Windows and try ApG from the above link, THAT IS ALL YOU NEED TO KNOW.

    The below is for OSX and Linux users.

    Requirements for execution: Java (JDK), cpio, patch

    Help
    For usage and patch availability, place a rom.zip into this directory and try
    Code:
    $./auto_patcher <ROMNAME>.zip -h mods
    The Auto-Patcher v2.5.0
    *******************************
    
    The available mods are
    ****************************************************
    *  pdroid   openpdroid  voice   v6supercharger     *
    *  voice    insecure    secure  external_internal  *
    *  tabletUI 3gdongle    pd2.0                      *
    ****************************************************
    
    To find out more about any mod, simply enter:
         ./auto_patcher -h <MODNAME>
    so
    Code:
    $ ./auto_patcher -h openpdroid
    Code:
    The Auto-Patcher v2.5.0 by Mateorod and Pastime1971
    *************************************************
    
    Mod Name:    openpdroid
    
        A fork of the open-source PDroid and Pdroid2.0 framework.
    
    
    Developer: FFU5y/wbedard/mateorod/Community
    Dependancies: The PDroidManager app freely available from Google Play or http://xdaforums.com/showthread.php?t=1994860
    
    Works on ROMs from Android 4.1.2 -> 4.2.1
    
        usage:     ./auto_patcher <ROM> <MODS> <ROMTYPE>
        example:   ./auto_patcher CM10.zip openpdroid cm
    
    Use ./auto_patcher -h for the help menu

    To patch a ROM
    Code:
    ./auto_patcher <[FONT="Courier New"]ROMNAME[/FONT]>.zip <[FONT="Courier New"]MODS[/FONT]>
    example:
    Code:
    ./auto_patcher cm10-encore-fat-tire.zip pdroid,tabletUI
    You can have any number of mods applied at the same time, just separate them with a comma and NO SPACES!

    98% of the time, that is all you need to know!


    If you would like to see some of our more advanced usage, please see the third post.

    Debugging
    • There is never any need for any wiping or restoring of a backup! If you encounter any problems, simply reflash the generated restore.zip or your ROM over the install, preserving all data and settings!
    • In the Auto-Patcher directory you will see a logfile that is generated with each run of the program. Please attach the entire logfile in order to get the best support we can offer.

    Current and past versions available at our download page on techerrata
    Download
    You can also clone from our github. See the README because there is actualy a lot extra there.

    Contributors
    pastime1971
    mateorod
    kobik77 (ApG developer/cygwin maintainer)
    Caldair: TabletUI maintainer.

    Maintainers
    Urinophoria (just about everything!)
    KickNGuitar (OSX testing)
    AuSSiELaMbChOpS (PAC rom maintainer)



    Thanks
    eyeballer and kevank with Team Win for web hosting
    Svyat
    CollegeDev
    JesusFreke, brut.all and iBotPeaches
    FFU5y
    tonyp
    krylon360
    inportb
    chainfire (for faapt)
    zeppelinrox
    trevd
    rathian, and TheMatrix2000 (for OSX testing)
    romracer and greenblue for 4.1.2 fixes
    ninno_mx

    The Auto-Patcher is a fully open-source utility, and we welcome new contributors.

    If you are a developer, themer or script writer who has code-level edits you walk your users through, let us know and we can get together and create a package for you. A message to developers is here, which also touches on our donation policy.
    206
    New ApG is up
    Windows users just got promoted :D
    Run autopatcher in just two clicks on every PC running Windows without any prerequisites

    Download
    Version 2.6.0.1
    http://d-h.st/users/kobik/?fld_id=5247#files

    Features
    • Run Autopatcher on any PC running Windows without any prerequisites
    • Sync Autopatcher directly from GitHub so you'll always be up-to-date with the great work of mateorod and pastime1971
    • Automatic download and install Java and Cygwin so no manual installation or configuration is needed
    • Automatic and manual updates of all installed packages
    • CLI is gone, GUI is here
    • Drag and drop ROM file onto the ApG window and let it do the rest for you
    • Fast and simple

    New Features
    • Option to upload log files of failed patches attempts to codepad.org (Just drop the link you've got in this thread i.e. http://codepad.org/rpjNJ1z4)
    • Manual patching option (Run Cygwin environment with the necessary configuration for patching)
    • Autopatcher full change log

    Important
    Do not run ApG under Windows directories such as C:\, C:\Windows, C:\Program FIles\* and so on.
    Some ever reported errors while running ApG from their desktop.
    In case you're having any download errors (ApG or its packages) please verify your antivirus is disabled and you're not running from the above folders.
    If ApG still fails to download packages or sync with GitHub, try running it as an admin.

    Screenshots
    attachment.php



    Changlog
    2.6.0.1
    • Prompts whenever a new ApG version is out
    • Disable update and manual patching buttons during update to eliminate weird issues that might be caused because of this
    2.6.0.0
    • Been asked to add proxy support for downloading from GitHub, so this is an experimental version of this (I'll add a support also for Dev-Host if I'll be asked)
      A new parameter called HTTP_PROXY is now added to ApG.ini file, so you can put your proxy details in there
    2.5.7.9
    • Fixed not displaying the latest autopatcher changelog
    2.5.7.8
    • Can't even remember...
    2.5.7.7
    • GitHub sync fixes and error handling
    • GUI Rearrangment
    2.5.7.5
    • Hide irrelevant ROM types (Will be effective on autopatcher next update)
    • Maintenance Mode (Should be available when GitHub clone fails)
    • More cleanups and bug fixes
    ...
    2.5.7.2
    • Fix packages downloading issues (again!)
    • Fix changelog view
    • More cleanups and bug fixes
    ...
    ...
    2.1.2
    • Fix packages downloading issues
    • Some more other fixes
    2.1.0
    • Add patch mod to the generated zip file names
    2.0.0
    • Followed new autopatcher patches structure
    • Bumped version to 2.0.0.0 to match autopatcher's
    1.5.0.0
    • Fix patch tools permissions before tarballing it
    1.4.0.0
    • Make changelog reading from auto_patcher file a little more robust
    1.3.0.0
    • Update and restore zip files are now named as %ROM_NAME%-update,zip and %ROM_NAME%-restore,zip and are moved to the rom's directory
    1.2.0.0
    • Full autopatcher changelog in the GUI
    1.0.1.0
    • Verify patch_patches.tgz existence and try to create it
    1.0.0.9
    • Move update.zip and restore.zip to the ROM's path on successful patching
    • Minor bug fixes
    1.0.0.8
    • Script.log file moved to ApG root dir and its now called ApG.log
    • Submit latest log file instead ot the latest failed one
    1.0.0.7
    • Fix a bug when start button doesn't get enabled
    1.0.0.6
    • Fix auto-response method for the interactive parts of auto_patcher
    1.0.0.4
    • Option to upload log files of failed patches attempts to codepad.org (Just drop the link you've got in this thread i.e. http://codepad.org/rpjNJ1z4)
    • Manual patching option (Run Cygwin environment with the necessary configuration for patching)
    • Autopatcher version indication (It's also a link to GitHub)
    44
    PREREQUISITE patcher only works on unix environments (linux, macosx, cygwin)
    1. set up linux vm or install cygwin, if you don't have a linux machine (see below)
    2. install the linux packages "jdk" (and "jdk-devel" depending on linux distro) if missing "java" or "jar" (openjdk works as well as sun java jdk)
    3. install the linux command "patch" if missing (see below)

    HOW TO VM or Cygwin see robjective's post for vm setup, or kobik77's post for cygwin setup

    HOW TO INSTALL TOOLS if you encounter "Missing patch diff tools" error, see http://xdaforums.com/showpost.php?p=26388234&postcount=422

    HOW TO INSTALL JAVA JDK you do need both java (JRE) and jar (JDK) commands
    on ubuntu, type sudo apt-get install openjdk-7-jre openjdk-7-jdk
    on fedora, type, su -c "yum install java-1.7.0-openjdk java-1.7.0-openjdk-devel"

    edit: ubuntu installation of openjdk jre corrected.
    31
    How to patch under Windows
    Why?
    • No need for Linux machine or VM
    • Setup in just a few minutes
    • Quick and clean way
    • You're a Linux hater/phobic! :p

    How?
    • Install Cygwin
      When selecting packages to install make sure you select the following packages under utils:
      patch: utility for modifying/upgrading files
      cpio: A backup and archiving utility

      attachment.php

      attachment.php

    • Install JDK
    • Add JDK binaries path to your Windows PATH variable. For example for version 1.7.0_05 it would contain the following path
      Code:
      C:\Program Files\Java\jdk1.7.0_05\bin
      Read below how to edit PATH variable
    • Download and extract autopatcher 2012070270 or later
    • Run Cygwin Terminal
    • cd /cygdrive/path_to_autopatcher. i.e. for e:\downloads\ap
      Code:
      cd /cygdrive/e/downloads/ap/
    • Run
      Code:
      ./auto_patcher ROM.ZIP MODS [ROMTYPE] [PATCHDATE]
    • Copy both generated files update.zip and restore.zip to your phone's sdcard
    • Install update.zip from recovery


    How to edit PATH variable
    Windows 7
    • Select Computer from the Start menu
    • Choose System Properties from the context menu
    • Click Advanced system settings > Advanced tab
    • Click on Environment Variables, under System Variables, find PATH, and click on it.
    • In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
    • Reopen Cygwin Terminal window, and run your java code.

    Windows XP
    • Start -> Control Panel -> System -> Advanced
    • Click on Environment Variables, under System Variables, find PATH, and click on it.
    • In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
    • Close the window.
    • Reopen Cygwin Terminal window, and run your java code.

    Windows Vista
    • Right click My Computer icon
    • Choose Properties from the context menu
    • Click Advanced tab (Advanced system settings link in Vista)
    • In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
    • Reopen Cygwin Terminal window, and run your java code.
    30
    Advanced Usage and Changelog​

    Advanced Usage

    Please be aware this is almost NEVER necessary. But it remains an option and possibly useful if we release a bad patch (hasn't happened yet...)

    Code:
    ./auto_patcher <[FONT="Courier New"]ROMNAME[/FONT]>.zip <[FONT="Courier New"]MODTYPE[/FONT]> <[FONT="Courier New"]ROMTYPE[/FONT]> <[FONT="Courier New"]PATCHDATE[/FONT]>
    The '<>' surrounding the variables is a convention that indicates you replace that section with your particular info, without the actual <> symbols.

    • ROMNAME is the literal name of the Rom.
    • MODS would be a list of offered mods (as seen in the -h menu or the OP), separated by commas and NO SPACES.
    • ROMTYPE is cm, aosp, aokp or pa
    • PATCHDATE is OPTIONAL and almost NEVER needed. The auto-patcher now can match your ROM with the best patch date automatically.

    For example:
    Code:
    ./auto_patcher cm-10-OFFICIAL-20120820.zip pdroid,v6supercharger cm 20120824

    Changelog

    Most Recent Changes:
    Code:
    # 2013.07.20. (v2.9.93) New OPD CM patches, many bugfixes
    # 2013.07.20. (v2.9.935) New PA, AOKP patches. gitattribute. FIx PING for cygwin. (h/t: gcydtmkq)
    # 2013.08.05. (v2.9.941) Bundle patchv2.6.1 for cygwin.
    # 2013.08.07. (v3.0.0) Support for Android-4.3 (Opendproid only- CM and AOSP).

    Entire Changelog:
    Code:
    # ChangeLog
    # 2012.05.00. (v0.1)
    # 2012.05.12. (v0.2)   allows user to specify a different version of patches
    # 2012.05.13. (v0.3.0) force "patch -N", remove temp upon failure, generate log output
    # 2012.05.13. (v0.3.1) revised the generation of updater-script (SGS2)
    # 2012.05.15.          added AOSP patches
    # 2012.05.15.          added crespo-aosp patches; device-specific patching if patch exists
    # 2012.05.15.          remove restore.zip upon failure
    # 2012.05.15. (v0.4.1) added CM7 (GB) patches
    # 2012.05.18. (v0.4.2) added checking for tool commands
    # 2012.05.21. (v0.4.3) apply device-specific patches only when it is specified
    # 2012.05.26.            added task title to log
    # 2012.05.31. (v0.4.4) CM9 patches updated, crespo-aosp added
    # 2012.06.04. (v0.4.5) added checking tools and rom, added aroma installer support
    #                        add patch outputs reroute
    # 2012.06.15.          CM9 patches updated
    # 2012.06.16. (v0.4.6) AOKP patches updated, patch versions restructured
    # 2012.06.17. (v0.5.0) patcher script reorganized, removed build.prop
    # 2012.06.17. (v0.6.0) auto patcher script for pdroid and v6 patches
    # 2012.06.19. (v0.6.1) add patches for CM7.2 Final
    # 2012.06.20. (v0.6.2) updated CM 7.2 patches
    # 2012.06.23. (v0.6.3) fix symlinks
    # 2012.06.26. (v0.6.4) added 0618 patches for cm7 nightlies; removed 0619 cm7.2 final
    # 2012.06.27. (v0.6.5) added new CM9 patches (20120626)
    # 2012.06.27. (v0.6.6) added CM7 nightly patches (20120625) (finally!)
    # 2012.07.02. (v0.7.0) Redid AOSP/AOKP; add Windows support (using Cygwin). Thanks kobik77!
    # 2012.07.06. (v0.7.1) updated CM9 patches (20120706)
    # 2012.07.08. (v0.7.2) updated AOKP (20120707) and CM9 (20120708) pdroid patches
    # 2012.07.11. (v1.0.0) reworked script works on Linux, Mac OSX, and Windows (on Cygwin); 
    #                        added new ICS/JellyBean support for the new V6-Supercharger
    # 2012.07.18. (v1.0.1) new CM7/CM9 Pdroid patches (20120718)
    # 2012.07.23. (v1.0.2) updated CM9 patches (20120723)
    # 2012.07.23. (v1.0.3) updated CM9 patches (20120724)
    # 2012.08.06. (v1.5.0) updated smali/baksmali binaries to 1.33
    # 2012.08.06.          Added Pdroid/V6supercharger support for CM10 Jellybean!
    # 2012.08.06.          Improved PDroid stability and efficiency (Thanks CollegeDev)
    # 2012.08.06. (v1.6.0) added aokp-jb patches for pdroid/v6supercharger, script update
    # 2012.08.17. (v1.9.5) Added support for pdroid_addon, by CollegeDev.
    #                       Added insecure boot.img mod
    #                       Added support for aosp-jb (This needs testing, and may not be
    #                         a wide patch due to large variation between AOSP roms.
    #                        -Please report all experiences!
    #                       Updated all v6supercharger patches w/new edits to ProcessList
    #                       Major script overhaul in preparation for additional mods!
    # 2012.08.20. (v1.9.6) Conditional support for Official cm10 and aokp-jb builds
    # 2012.08.23. (v1.9.7) Final/confirmed pdroid support for Official CM10 and AOKP-JB
    # 2012.09.04  (v1.9.8) Bundled cygwin-compatible tools (original was corrupt).
    #                       For Cygwin, replaced h2b function with simple bash math
    #                       conversion (req'd for compat w/ Cygwin tools).
    # 2012.08.26. (v2.0.0) Added .apk patching
    #                       Added 3G Dongle support for Nexus 7 (trevd)
    #                       TabletUI support for Nexus 7 (maybe more)
    #                       Google Voice support for Nexus 7
    #                      mods are 3gdongle, tabletUI, voice, or nexus7suite (for all)
    #                      Added provisional file copy menu to widen patching base
    # 2012.09.11. (v2.0.1) Cygwin support fixes
    # 2012.09.11. (v2.0.2) Bugfix for 3gdongle (all)
    # 2012.09.16. (v2.1.0) Significant restructuring of core operations; added edit text file
    #                       fix for "method-cap" errors in pdroid.
    # 2012.09.20. (v2.1.1) Fix for Phone FC's; OSX support finalized; ContentResolver resolved
    # 2012.09.28. (v2.1.2) Hotfix for failed pdroid patching. Logging improvements.
    # 2012.10.07. (v2.1.5) Final pdroid support for CM7.2 Official Releases
    #                       Added aosp-mod patches for pdroid patching of AOSP kangs
    #                       Switched to Chainfire's (f)aapt for speed/space reasons
    # 2012.10.13. (v2.1.6) New PDroid patches for aokp-jb and cm10 4.1.2
    #                       Revert (f)aapt- temporary due to reported issues
    # 2012.10.15. (v2.17) New (again) CM10 pdroid patches.
    #                     Move files to be copied into $p/$R/$B
    #                      -This required a bunch of file moving-report broken symlinks.
    #                     Some error check on the old RIL delete functions (thanks bundrik)
    # 2012.10.16. (v2.1.7.5) Fix FC on phone with CM10 pdroid patches
    # 2012.10.19. (v2.1.9) Testing CM10 support for PDroid Extension by CollegeDev.
    # 2012.10.22. (v2.2.0) aosp/aokp and cm10 support for pdroid extension by CollegeDev
    #                       MAJOR reworking of patches and improved query. only 4 mod types:
    #                       cm, aokp, aosp, and pa. See our OP for details.
    # 2012.10.26. (v2.3.0) Final (LTS) version. Stable for now until upstream breaks any patches
    #                       Thanks to KicknGuitar for the OSX testing!
    # 2012.11.01. (v2.3.1) Fix for pdroid RIL deletion for older roms
    #                       Better Build query logic and help messages
    # 2012.11.02. (v2.3.5) Add Evervolv support for all mods- Thanks to new maintainer poncik!
    #                       Fix method cap for pdroid/pd2.0 for AOKP and kangs
    # 2012.11.06. (v2.4.0) Update pd2.0 patches to latest pd2.0 release- all except Evervolv
    #                       add GsmService to smali.txt; improve rom probe
    # 2012.11.08. (v2.4.2) Add Evervolv support for pd2.0; Device-specific scripts
    #                       Will display error if using a mod on an inapplicable rom
    # 2012.11.09. (v2.4.5) Error catch for random method issues, fix pd2.0 Evervolv and aosp-jb
    # 2012.11.17. (v2.4.6) Fix pdroid for CM7. FINALLY!.
    # 2012.11.17. (v2.4.7) Internal debugging improvements
    # 2013.01.13. (v2.5.0) Added 'openpdroid' mod --Open-Source Pdroid framework
    #                       BIG Improvements to help and error-catch. Try ./auto_patcher -h
    # 2013.01.15. (v2.5.1) OpenPDroid support for Evervolv and ParanoidAndroid, hotfix for Mms 
    # 2013.01.15. (v2.5.2) Fix for cygwin temp files (kobik), provisional telephony files added
    # 2013.01.16. (v2.5.3) SlimRom support. Rearrange structure for ApG.
    # 2013.01.23. (v2.5.4) Fix small bugs related to rearrange
    # 2013.01.25. (v2.5.7) 4.2 TabletUI support [cm,aokp,aosp,Evervolv]
    # 2013.01.28. (v2.5.8) Fix for ICS PDroid; small fixes/expansions
    # 2013.02.01. (v2.6.0) OpenPdroid 1.0.1 patches (cm, aokp, aosp, evervolv and slimrom. no pa.
    #                       Fixed TabletUI for Cm10.1- aosp to come. Removed most old patches.
    # 2013.02.01. (v2.6.25) PA OpenPDroid 1.0.1 patches; AOSP TabletUI. removed opd all 1.0.0
    # 2013.02.09. (v2.7.0) Add new AOKP, CM9, CM10,CM10.1 and PA (3.0) patches for OPD
    # 2013.02.09. (v2.7.5) Add new AOKP, AOSP, CM10.1 and PA (3.0) patches for OPD (Andr. 4.2.2)
    # 2013.02.17. (v2.7.9) 4.2.2 opd 4 evervolv; v6supercharger,3gdongle and all but tabletUI.
    # 2013.02.20. (v2.8.0) New CM10.1 opd patches. Each BID can have own provisionals now.
    # 2013.02.23. (v2.8.2) SlimRom 4.2.2 support (from karamelos), APK recompile safety net.
    # 2013.03.01. (v2.8.3) PAC (.aosp-pac) 4.2.2 support (from AussieLambChops), apktool 1.5.2
    # 2013.03.03. (v2.8.4) Remove settings.apk from tabUI, replace Mms.apk. Refactors.
    # 2013.03.06. (v2.8.5) Bugfixes, mainly.
    # 2013.03.17. (v2.8.6) Added 4.2.2 tabletUI test run for CM from Caldair.
    # 2013.03.18. (v2.8.6.5) Hotfix from caldair for tabletUI, new SlimRom patches
    # 2013.03.18. (v2.8.7) TabletUI support for 10 inch screens (caldair)
    # 2013.03.25. (v2.8.8) Fix for Cygwin paths with spaces (from kobik77)
    # 2013.04.06. (v2.9.0) Added new tabletUI patches for CM and 4.2 conflicts.
    # 2013.04.10. (v2.9.1) Updated aokp openpdroid patches (0405) please report.
    # 2013.04.18. (V2.9.2) Added AOSP and SlimROm TabletUI patches (credit: Caldair)
    # 2013.04.18. (V2.9.3) Added missing framework2.jar opd aosp 4.1
    # 2013.05.08. (v2.9.4) Updates to TabletUI (from Caldair)
    # 2013.05.18. (v2.9.5) New AOKP openpdroid patches (0514)
    # 2013.05.20. (v2.9.6) New CM and PAC-man (aosp) openpdroid patches.
    # 2013.05.27. (v2.9.7) $INCREMENTAL patches for bugs/updates and GPS fix for opd (credits to phillipberndt)
    # 2013.05.30. (v2.9.8) Improve apk handling: test fix disappearing apks. New opd: evervolv,slim
    # 2013.06.18. (v2.9.83) Introduce auto-update for OSX and Linux...turn off by setting it false in .config
    #                        Update PACman patches for OPD and update telephony for PA to silence errors
    # 2013.06.18. (v2.9.84) Some environment trickery to speed up search/sort. Add WEBSITE for mods.
    #                        Check updating. New AOKP OPD patches
    # 2013.06.19. (v2.9.85) Fixes to auto-update. Added changelog.txt
    # 2013.06.20. (v2.9.865) Various bugfixes, add color, obfuscate $PROVISIONALS.
    # 2013.06.21. (v2.9.87) Added ALTERNATE patches feature- hopefully fixes PA telephony issues.
    # 2013.06.22. (v2.9.875) New tabletUI patches, revert flawed CONFLICTS feature
    # 2013.06.22. (v2.9.88) New CM opd patches
    # 2013.06.28. (v2.9.89) revert baksmali changes for now (still needs work), add new PACman OPD 6/26
    # 2013.07.02. (v2.9.91) Switch to SlimRom team's aapt and apktool for OSX+Windows (Need OSX builder!)
    # 2013.07.07. (v2.9.92) New opd patches for Slim/PA; some fixes to tabletUi by Caldair
    # 2013.07.17. (v2.9.927) Fix missing Mms (finally), support for CM Final, many bugfixes (conflicts, mod ordering, etc.)
    # 2013.07.20. (v2.9.93) New OPD CM patches, many bugfixes
    # 2013.07.20. (v2.9.935) New PA, AOKP patches. gitattribute. FIx PING for cygwin. (h/t: gcydtmkq)
    # 2013.08.05. (v2.9.941) Bundle patchv2.6.1 for cygwin.
    # 2013.08.07. (v3.0.0) Support for Android-4.3 (Opendproid only- CM and AOSP).