Skip to content
This repository has been archived by the owner on Apr 20, 2022. It is now read-only.

Commit

Permalink
zip uninstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed May 19, 2018
1 parent 7148dff commit 17dc9b2
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This is based on [an excellent Stack Exchange answer by REJH](https://android.st
adb push disable-direct-share.xml /data/system/ifw/
```

### Uninstall
Uninstall with:

```
$ adb shell ls /data/system/ifw/
Expand All @@ -33,4 +33,5 @@ $ adb shell rm /data/system/ifw/disable-direct-share.xml
## Install with TWRP

1. Download [disable-direct-share-v1.zip](https://github.com/stefansundin/android-disable-direct-share/releases/download/v1/disable-direct-share-v1.zip).
1. Download [disable-direct-share-v1-uninstall.zip](https://github.com/stefansundin/android-disable-direct-share/releases/download/v1/disable-direct-share-v1-uninstall.zip) so that you can easily uninstall it at a later time.
1. Reboot into TWRP and flash the zip file. Do not use zip signature verification.
26 changes: 26 additions & 0 deletions uninstall/META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/sbin/sh

OUTFD=/proc/self/fd/$2
ZIP=$3

ui_print() {
echo "ui_print $1" > "$OUTFD";
echo "ui_print" > "$OUTFD";
}
set_progress() { echo "set_progress $1" > "$OUTFD"; }

set_progress 0.01;
ui_print " ";
ui_print "Disable Direct Share Script (Uninstaller)";
ui_print "by Stefan Sundin";
ui_print "https://github.com/stefansundin/android-disable-direct-share";
ui_print " ";
ui_print "Deleting /data/system/ifw/disable-direct-share.xml";

mount /data;
rm /data/system/ifw/disable-direct-share.xml;
umount /data;

ui_print "Done!";
ui_print " ";
set_progress 1.0;
1 change: 1 addition & 0 deletions uninstall/META-INF/com/google/android/updater-script
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Dummy file; update-binary is a shell script.
1 change: 1 addition & 0 deletions zip.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/bash -ex
zip -r disable-direct-share-v1.zip META-INF disable-direct-share.xml
(cd uninstall && zip -r ../disable-direct-share-v1-uninstall.zip META-INF)

0 comments on commit 17dc9b2

Please sign in to comment.