Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I recently asked about the availability of calendars with limited sandbox permissions, since I felt that most of them ask for access that is too wide, and hence are not as secure as I'd like. I also explored in that question what options were available to sync only to local computers, and to definitively prevent the device from syncing private data (calendar, contacts, todos) to Google. I plan to do my own backups locally.

Side note: not syncing private data with Google is a little trickier than a new user would expect. This is because a Google account is required to use the marketplace, and once the phone has that account, it cannot be removed without a factory reset (at least in version 2.2). The sync to it can be disabled, but if one accidentally turns it on - easily done momentarily, in my view - contacts and calendar are likely to whoosh to the cloud in short order.

One of course has to balance security requirements with usability, and my favourite calendars thus far (Business Calendar, aCalendar) do not offer their own private calendar repositories (they just work with any calendar sync provider). Ergo, they are equally at risk of accidental cloud synching as the stock Calendar application.

So, I am wondering if rooting the device and installing a firewall would be the way to go? I was originally of the view that I could grant application permissions to Market/Play to contact Google, but not Calendar. However I see in the DroidWall FAQ, if one wishes to continue using the market after installing the firewall:

Enable the following applications:

  • "Market";
  • "Media Storage, DRM Protected Content Storage, Download Manager" and
  • "Calendar Sync Adapter, Google Services Framework, Contacts Sync Adapter"

It seems odd that, to use the market one needs to grant permissions to the latter, but would be entirely in keeping with Google's policy of making it hard to avoid their services. Any root owners here have thoughts as to whether it is possible? I'm hoping I can filter+block on calendar.google.com etc whilst permitting play.google.com - or similar.

(I suppose the easiest answer to this Q is "try it!", but I'm looking for expertise before I risk rooting my phone).

share|improve this question
add comment

1 Answer

To firewall, you need a root, as it modifies the iptables and filters the network stack. The iptables comes with Droidwall which is btw, an excellent tool and a must have if your ROM is rooted :)

Edit: Just checked mine, in theory its possible to create a script to modify the iptables to block the domain calendar.google.com whilst allowing play.google.com to pass through. Droidwall's set of rules are a bit too generic though, but you can most certainly set the custom script by hitting menu from within Droidwall itself and use it to suit your custom needs :)

The IP address for calendar.google.com is 173.194.33.37. and for play.google.com is 173.194.33.37. Sure they are the same, but you need to find out what port is the calendar using, same for play.

# Block all connections in the TCP port nn for calendar!
$IPTABLES -A "droidwall" -p TCP --destination "173.194.33.37" --destination-port nn -j "droidwall-reject"

Linky here that explains how to do add custom script.

share|improve this answer
    
Ah, splendid. I'm a programmer, though quite unfamiliar with iptables - but I should think it's not beyond my wit to figure it out. Is there a danger if I put a bad rule in that I freeze the device and make it unsalvageable? :o –  halfer Jun 24 '12 at 14:12
    
@halfer no, what will happen is iptables will not work properly, you will not freeze the handset as a result of bad rule! :) –  t0mm13b Jun 24 '12 at 14:15
    
NOTE this rule is the top of my head and may not work, maybe might need to tweaked a bit.. :) –  t0mm13b Jun 24 '12 at 14:17
    
Great, and thanks for the example rule. I'll have to do some digging to see what ports are used (and I expect I can use DroidWall's logging feature for this - just block everything by default, and start opening things up so basic services work again). Interesting weekend project :-) –  halfer Jun 24 '12 at 14:22
    
@halfer have fun with it :) and yes you can log with Droidwall :) –  t0mm13b Jun 24 '12 at 14:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.