Default [HOW-TO] Keep the stock Messaging app and Browser after installing PAGAPPS!

As you may or may not have found out, while the Paranoid Android GAPPS package is by far the most comprehensive GAPPS package, preinstalling all of the Google apps found in the stock image, it does remove the stock Mms.apk/Browser.apk that comes with the ROM. For example, on Cyanogenmod, which is compiled from AOSP source plus improvements, it will remove the AOSP Messaging app/AOSP Browserand put in Hangouts/Chrome.

There are two ways of getting around this- put the Browser/Mms.apk back in the ROM after PAGAPPS has finished installing, or prevent PAGAPPS from removing it altogether, which is quite useful if you switch ROMs frequently. This tutorial will cover the latter.

Method 1 (the let someone else do it method): Lucky for you, I've already modified the script. Simply open up the .zip file using your favorite zip viewer (7zip/WinRAR/etc) navigate to /META-INF/com/google/android, and delete updater-script. Then, simply click and drag the updater-script I provided that matches your PAGAPPS version (unzip and make sure to rename it updater-script!) I provide into the zip viewer window. Let it rearchive and do its thing. There ya go! The downside to this method is that I may or may not have the most current version of the script ready, as it may vary between PAGAPPS releases.

Method 2 (the DIY method): Open up the PAGAPPS file and navigate to /META-INF/com/google/android using your favorite zip viewer (7zip/WinRAR/etc). Copy the updater-script file into your desktop. Using Notepad++ (the Notepad that comes with Windows will more than likely NOT work, as there is special formatting in script files such as these) to open up the updater-script, go to line 115-119, or where it mentions the Mms.apk/Browser.apk, as the line numbers may change in future distributions of the PAGAPPS package. Change these lines to the code below:

# Keeping the stock AOSP Mms.apk because it's AWESOME
ui_print("Mms.apk is preserved!");

# Keeping the stock AOSP Browser.apk because it's AWESOME
ui_print("AOSP Browser is preserved!");
Save and close out of the editor. Next, delete updater-script out of /META-INF/com/google/android and then drag and drop your updater-script into the same location. Let it rearchive and it should be ready to flash! If it works successfully, while flashing, it should output the lines "Mms.apk is preserved!" and "AOSP Browser is preserved!".

Note, since this simply prevents PAGAPPS from deleting the AOSP apps, it will not install them. For example, if you are using a ROM that does not include AOSP Browser.apk (such as Purity), it will not be installed.

Helpful tip if you want to put the apks back in after PAGAPPS has finished installing normally- the Mms.apk is located in /system/priv-app.

Hopefully this helped somebody!
Attached Files
File Type: zip - [Click for QR Code] (1.7 KB, 13 views)