[Verizon Galaxy S 5 Android Development] smokerbond:
Developed out of this project:

https://xdaforums.com/verizon-galaxy-s5/development/rd-cid-11-6-0-security-patches-5-0-5-1-t3522355

--------------------------------------------

If you are running OptimalROM 15-5 (latest version) or any previous variants or ROMs based on pre PB1 images you are vulnerable to stagefright!

You may be wondering why you are vulnerable because Verizon rolled out stagefright patches when OG5 was released, which is what OptimalROM is based on. Unfortunately stagefright had further developments found later on, so another patch was later applied in PB1 (possibly OK3, I have not done checks on OK3), so any OG5 ROM is vulnerable to these new findings!

You can verify this is true on your device by using Zimperium's SF detector.

https://play.google.com/store/apps/d...frightdetector

--------------------------------------------

I am not an experienced android developer. I am only a poweruser, so I am not familiar enough to provide you with flashable zips. Perhaps a developer can assist with this!

Instead you can follow this guide to achieve a stagefright vulnerability free device.

Pre-Updating

This is where you get the patched files.

Since I am not a known developer on XDA, I will provide the steps I did that you can skip by downloading the .zip I provide. All of the files in the zip come directly from a stock PB1 install.

Skip this section if you just want to apply my zip without jumping ROMs to acquire the files yourself.

0. If you choose to do this, use SafeStrap and make a backup of all your partitions, that way when you finish you can easily restore to your OptimalROM with your configuration and data

1. Wipe everything (except extSD) and flash the PB1 ROM with Odin https://www.androidfilehost.com/?fid=24438995911970571

2. Root following the traditional OK3/PB1 root guide https://xdaforums.com/verizon-galaxy-s5/general/root-method-og5-ok3-t3290370

2.5 (Optionally use SuperSUme to remove kingroot and install SuperSU) - I did this on my run

3. Update BusyBox through GooglePlay store. Install BusyBox. (needed to properly install SafeStrap)

4. Reinstall SafeStrap (do it now so you can easily recover)

5. Download some sort of filemanager that has root access and can mount system as read/write. I used Root Explorer (full version)

6. Grant root to filemanager and navigate to /system/lib

7. Select libutils.so, and every stagefright file. You will have selected a total of 34 files if done correctly.

-- Note: In Root Explorer I used search for "libutils" to find libutils, and searched "stagef" to find the other 33 files.

8. Copy these 34 files to a new folder on your extSD

9. Load SafeStrap, wipe everything (except extSD!) and restore your backup you took before you started this.

You just got all the patched files and need to only apply them to your current OptimalROM installation!

Here is the zip if you choose to skip the above steps!

https://www.androidfilehost.com/?fid=385035244224409960

Mirror:

http://www.filedropper.com/optimalrom-stagefright-securitypatch-pb1-based

Name: optimalROM-stagefright-securitypatch-PB1-based.zip

Size: 2807757 bytes (2 MB)

SHA1: CE3D6109C6EDD03352AF4E4DA03C64B5620938B2

Patching Vulns

This is where you apply the patched files.

1. Use your read/write root access capable filemanager and select ONLY libutils.so

2. Use Copy and paste the file to /system/lib

-- Confirm the overwrite request (and for some filemanager, confirm mount as read&write)

IT will FREEZE. Leave it alone!!!!

The screen will become unresponsive, but eventually it will reboot by itself.

Once this happens, you may appear to hang on the Samsung bootlogo. DO NOT touch!

The startup takes up to 6 minutes.

Once your system finishes starting, you may get a message saying "SYSTEM is not responding, KILL or WAIT or REPORT" Choose WAIT, it should work as usual.

3. Open Stagefright Detector. Verify that one of your vulnerabilities is gone (and replaced with a new name for the same CV).

4. Open your filemanager again. This time copy the other 33 files from your extSD and confirm all replacements in /system/lib

--Your system will not freeze this time. Once it completes, continue.

5. Reboot

6. Open Stagefright Detector

-- Hooray, no vulnerabilities!

Enjoy OptimalROM 15-5 with protection against stagefright!

Hopefully in the future flashable zips will make this easier once I learn how that works.