Skip to content

Commit

Permalink
Move start on boot to expert mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Bokhorst committed Jun 11, 2013
1 parent 475ef75 commit 0915862
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 18 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ XPrivacy will also display if an application has internet access
and if an application has Android permissions to access data in a data category
(not in the category browser, since checking permissions for all applications is quite slow).

XPrivacy also allows you to prevent starting an application at boot (when Android starts),
which not only prevents leaking data at that moment, but will also make your device start faster.

XPrivacy is accessible for each application from the Android manage apps menu.
The category browser is accessible from the application list or application drawer.

Expand All @@ -66,9 +63,9 @@ If you have any question or want to request a new feature, you can leave a messa
Screenshots
-----------

![Manage apps](https://raw.github.com/M66B/XPrivacy/master/screenshots/manage_apps.png)![App details](https://raw.github.com/M66B/XPrivacy/master/screenshots/app_details.png)
![Batch edit](https://raw.github.com/M66B/XPrivacy/master/screenshots/batch_edit_select.png)![Batch edit](https://raw.github.com/M66B/XPrivacy/master/screenshots/batch_edit_apps.png)
![Batch edit](https://raw.github.com/M66B/XPrivacy/master/screenshots/help.png)
![Manage apps](https://raw.github.com/M66B/XPrivacy/master/screenshots/xposed.png)![Manage apps](https://raw.github.com/M66B/XPrivacy/master/screenshots/manage_apps.png)
![App details](https://raw.github.com/M66B/XPrivacy/master/screenshots/app_details.png)![Batch edit](https://raw.github.com/M66B/XPrivacy/master/screenshots/batch_edit_select.png)
![Batch edit](https://raw.github.com/M66B/XPrivacy/master/screenshots/batch_edit_apps.png)![Batch edit](https://raw.github.com/M66B/XPrivacy/master/screenshots/help.png)

Data restrictions
-----------------
Expand All @@ -90,12 +87,11 @@ Currently implemented:
* Accounts (auth token)
* Read sdcard (revoke permission)
* Restriction management
* Batch edit restrictions
* Category browser
* Default restrict new apps

Planned:

* System log
* Battery info
* Application info

Expand Down
6 changes: 3 additions & 3 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<string name="app_batchedit">Browse by category</string>
<string name="menu_reportissue">Report issue</string>
<string name="msg_restricted" formatted="false">"XPrivacy: %s/%s restricted"</string>
<string name="restrict_accounts">Accounts</string>
<string name="restrict_accounts">Accounts (Google, Facebook, etc)</string>
<string name="restrict_boot">Boot (run at system start)</string>
<string name="restrict_browser">Browser (bookmarks/history)</string>
<string name="restrict_calendar">Calendar</string>
Expand All @@ -19,8 +19,8 @@
<string name="restrict_media">Media (audio, photo, video)</string>
<string name="restrict_messages">Messages (SMS, MMS)</string>
<string name="restrict_phone">Phone (ID, numbers, calls)</string>
<string name="restrict_storage">Storage (SD card)</string>
<string name="settings_restrict">Check to restrict information:</string>
<string name="restrict_storage">External storage (SD card)</string>
<string name="settings_restrict">Check to restrict data access:</string>
<string name="help_icon">Icon</string>
<string name="help_application">Application</string>
<string name="help_internet">has internet permission</string>
Expand Down
Binary file modified screenshots/app_details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/batch_edit_apps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/batch_edit_select.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/help.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/manage_apps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/xposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions src/biz/bokhorst/xprivacy/XPrivacy.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,16 @@ public void initZygote(StartupParam startupParam) throws Throwable {
"android.net.wifi.WifiInfo");

// Intent receive: calling
hook(new XActivityThread("handleReceiver", XRestriction.cBoot, new String[] { "RECEIVE_BOOT_COMPLETED" },
Intent.ACTION_BOOT_COMPLETED), "android.app.ActivityThread", false);
if (XRestriction.cExpert)
hook(new XActivityThread("handleReceiver", XRestriction.cBoot, new String[] { "RECEIVE_BOOT_COMPLETED" },
Intent.ACTION_BOOT_COMPLETED), "android.app.ActivityThread", false);
hook(new XActivityThread("handleReceiver", XRestriction.cPhone, new String[] { "PROCESS_OUTGOING_CALLS" },
Intent.ACTION_NEW_OUTGOING_CALL), "android.app.ActivityThread", false);
hook(new XActivityThread("handleReceiver", XRestriction.cPhone, new String[] { "READ_PHONE_STATE" },
TelephonyManager.ACTION_PHONE_STATE_CHANGED), "android.app.ActivityThread", false);
hook(new XActivityThread("installContentProviders", XRestriction.cBoot, new String[] {}, null),
"android.app.ActivityThread", false);
if (XRestriction.cExpert)
hook(new XActivityThread("installContentProviders", XRestriction.cBoot, new String[] {}, null),
"android.app.ActivityThread", false);

// Intent send: media
hook(new XActivity("startActivityForResult", XRestriction.cMedia, new String[] { "CAMERA" },
Expand Down
9 changes: 6 additions & 3 deletions src/biz/bokhorst/xprivacy/XRestriction.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PermissionInfo;
import android.database.Cursor;
import android.util.Log;

Expand All @@ -36,11 +35,14 @@ public class XRestriction {

public final static int cUidAndroid = 1000;

public final static boolean cExpert = false;

private static Map<String, List<String>> mRestrictions = new LinkedHashMap<String, List<String>>();

static {
mRestrictions.put(cAccounts, new ArrayList<String>());
mRestrictions.put(cBoot, new ArrayList<String>());
if (cExpert)
mRestrictions.put(cBoot, new ArrayList<String>());
mRestrictions.put(cBrowser, new ArrayList<String>());
mRestrictions.put(cCalendar, new ArrayList<String>());
mRestrictions.put(cContacts, new ArrayList<String>());
Expand All @@ -55,7 +57,8 @@ public class XRestriction {
mRestrictions.get(cAccounts).add("GET_ACCOUNTS");
mRestrictions.get(cAccounts).add("USE_CREDENTIALS");
mRestrictions.get(cAccounts).add("MANAGE_ACCOUNTS");
mRestrictions.get(cBoot).add("RECEIVE_BOOT_COMPLETED");
if (cExpert)
mRestrictions.get(cBoot).add("RECEIVE_BOOT_COMPLETED");
mRestrictions.get(cBrowser).add("READ_HISTORY_BOOKMARKS");
mRestrictions.get(cBrowser).add("GLOBAL_SEARCH");
mRestrictions.get(cCalendar).add("READ_CALENDAR");
Expand Down

0 comments on commit 0915862

Please sign in to comment.