[Security Discussion] unclefab:
It's not about API, it's about what data apps can access and what is sent over the internet, and it actually goes much further than what most people think.

Use apps like Network Log or Network Connections and give Wire Shark a try, and track which IPs apps connect to.

You'll be surprised...:eek:

On my Samsung, after I had removed all the google spyware (erggghhh, I mean google apps) and about 150 stock apps, I saw that the kernel was connecting to some google related IPs and to google's DNS, eventhough I had set the phone to use Open DNS in the resolv.conf file, and that the android system was calling home (read "at google's central office in mountain view, California") everytime I connected (note that my phone had never been linked to any google account whatsoever).

Some of the IPs could easily be blocked by using a firewall script, but for some others and for the DNS leaks I had to patch some jars in /system/framework.

One thing is that it differs from phone to phone, I've checked on a Lenovo and there is much less of such unwanted connections.

Is it embedded in the AOSP code? Maybe, I don't use AOSP or CM based roms so I can't tell, but what I can tell is that it's funny to see people screaming about Xiamoi when it's the same elsewhere.

Anyway, if one wants to protect oneself it's possible albeit a bit involved.

First is first, root.

Second, use Xprivacy and a good firewall like AF+.

Then, make a script to block inbound and outbound disturbing IPs.

So, am I good to go now?

Not yet, let's get a step further...

You need now to decompile some of your system apps and some of your jars, and track lines refering to specific websites and DNS.

- Note that if you really are privacy concerned you should uninstall as many system apps as you can (only 11 left on my phone) and replace them with third part apps that are much easier to restrict and have less privileges. Forget about google spyware (erggghhh and sorry again, I mean google apps), facebook spyware-apk, what's app etc... -

That's it?

Still not, there's more!

Xprivacy is a fantastic tool, but due to android limitations it can't restrict ids for the android system.

Have tou ever heard of android.id, build.serial, ro.boot.serialno, ro.serialno etc.? And what about the serial_no and the mac in the efs folder? And the cpu info in proc? And the serial_number in sys?

- I'll deliberately stay vague on those matters, only people that know what they are doing should mess with that kind of stuff. -

Those are ids specific to your device and of course they identify you, that's what they are meant for!

An example, have a look at the wpa_supplicant.conf localised in data/misc/wifi. You'll see that it has your serial_number which means, and experts please correct me if I am wrong, that everytime you connect on the wifi your serial_number gets sent.

You want to change it manually?

Yeah sure, edit it directly from the file. Now start you wifi and check again the serial_number, you are back to the original value.:cyclops:

I'm not sure whether, if your firewall script is well done and if Xprivacy has been well configured (read "VERY restrictively configured"), those ids leaks or not, but since I like to have more than one protection layer I've edited all of them.

Some ids are easily changed using setpropex or an init script, some are harder and require boot.img editing, but I won't explain any further since as written above only people knowing what they do should play with that stuff.

If all of the above has been done I don't think that anyone can get much data from your phone, but I'm not a security expert and I'd like to hear what you guys think.

Note 1

Trust no one.

I found that apps I had created for testing purposes were requesting my serial, my MCC and my MNC upon installation, eventhough I hadn't given them access to that data neither in the code nor in the android manifest), and then I found that nearly all apps request the same.

Does it come from the IDEs (I have tried with two different brands and it was the same) or does it come from the android OS itself?

I have risen the issue here but nobody seemed interested and nobody blessed me with any relevant answer. Was it that they thought I was unworthy of their attention, or was it that they just didn't know? Or both? Who knows but once more I tell you, TRUST NOONE!!!!

Note 2

Someone said that the NSA and other agencies don't have much interest in a regular person which is true, but they nevertheless gather as much info as they can about as many people as they can, just in case.

In the 50's it was illegal to be a communist in the USA, if cell phones had existed at that time Mac Carthy would have found his job greatly eased.

During the Bush era it was either one was with him or one was against him and was dubbed a bad american (even if one wasn't a terrorist but simply agains Bush's policies), with Guantanamo around the corner if one was suspected of too much empathy with the arab victims.

What's next?

They decide what is subversive and what isn't, and maybe one day you could be subversive because you are against capitalism, or against globalisation, or sympathetic to the people that defend their land agains US invasions and US backed puppet governments.

Or because you rooted your phone?:eek:

Keep your eyes open and stay aware guys...