Add a flashable ZIP for deblobbing firmware

This commit is contained in:
Tad 2017-11-11 05:42:40 -05:00
parent fc857876dc
commit 1c5878b8cc
4 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,8 @@
ui_print("DivestOS Firmware Deblobber");
unmount("/firmware");
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/modem", "/firmware", "");
package_extract_dir("scripts", "/tmp/scripts");
run_program("/sbin/sh", "/tmp/scripts/firmware_deblobber.sh");
unmount("/firmware");
ui_print("Deblobbed!");
set_progress(1.000000);

View File

@ -0,0 +1,15 @@
#!/sbin/sh
rm -f /firmware/image/playread.b00
rm -f /firmware/image/playread.b01
rm -f /firmware/image/playread.b02
rm -f /firmware/image/playread.b03
rm -f /firmware/image/playread.mdt
echo "Removed Microsoft PlayReady DRM firmware"
rm -f /firmware/image/widevine.b00
rm -f /firmware/image/widevine.b01
rm -f /firmware/image/widevine.b02
rm -f /firmware/image/widevine.b03
rm -f /firmware/image/widevine.mdt
echo "Removed Google Widevine DRM firmware"

View File

@ -0,0 +1,6 @@
This is a simple flashable zip used to remove firmware from the /firmware and /vendor partitions.
This is necessary in order to remove untrusted proprietary code and to increase security.
See https://bits-please.blogspot.com/2016/05/qsee-privilege-escalation-vulnerability.html for an exploit (CVE-2015-6639) that uses the Widevine firmware.
To sign the zip
./build/tools/releasetools/sign_zip.py -k ../../Signing_Keys/releasekey deblob-firmware.zip deblob-firmware-signed.zip