yashsingh1/xdaforums huggingface dataset:
[LG Optimus 2x] tonyp:
You can't block wifi location access from google maps cause that's not the "Network Location" which you can block in PDroid - it's a distinct Google service.

"Network Location" uses cellular triangulation to get your location.

The wifi location feature compares the wifi networks names (and signal strength) in your area with a database from Google to pinpoint your location. To use it you agree to upload your wifi data to Google, too!

Just turn the wifi feature of if you don't want to use that - there are lots of privacy conerns with it anyway.

Settings - Location & security - Use wireless networks.

Once you disable that Maps can't find your location with GPS & Network Location blocked anymore. You cannot block access to it because it's a baked-in service which is constantly sending data to and from google servers.
[LG Optimus 2x] pastime1971:
thanks, tony.

that explains it.

edit: i guess that is "Network Location app" that i see in system apps ? i gotta say the name is confusing (app & menu)

edit: however, i turned off wifi & disabled mobile data. just cellular voice on. GMAP still found my location (with two blocks error) through cell tower, even though i blocked Network Location, which made me think that there is a leak in PDroid. depending on how you request Network Location, there may be a way for GMAP to go around PrivacyLocationManager. i will look into it more later (probably weekend)
[LG Optimus 2x] pastime1971:
please do.

i don't really see system UI crash. (maybe i'm blind to it.)
[LG Optimus 2x] deepflash:
will this work in Hydrogen ICS also?

I've never done somehing with compiling besides some little c code during my studies ;)
[LG Optimus 2x] pastime1971:
As long as you have the source code of the ROM ...

frameworks are not too different among ROMs.
[LG Optimus 2x] mateorod:
Just for the record, I had network location blocked when I did my initial test with gmaps.

I am thinking of trying this again with the 1.32 source code. Also, and I don't know the state of your roms, but the pics kernel for the nook just got a big update, with things like NAT filter and the like enabled. I haven't looked too closely at what Pdroid uses to block permissions, but this has enabled things like proxies and firewalls to work n my ROM. I am wondering I'd there might be a difference.

Do you know? What tools does Pdroid use in the cm7 roms? I just know that the nook color ics is still under construction, but maybe I can add some of the things that may be missing. I could dig in the code, I know, but since you already have, I thought I'd ask first.
[LG Optimus 2x] pastime1971:
i meant "Network Location Service", not "Network Location Permission".

Network Location Service can be found in Menu key > Manage apps > Running > Google Services > Services, Menu key > Manage apps > All > Network Location, and PDroid > System app > Network Location. i believe this came with gapps.zip (NetworkLocation.apk)

"Location Permission" is from "Location Manager", which i think is system service.

internet access is firewall's job, and svyat said that he won't be implementing a network traffic control. i use DroidWall, but it is about controlling outgoing traffic. also DroidWall does it by UID, which can be shared by many. For example, 10043 is shared by Google Service Framework, Google Account Manager, Network Location, Google Bookmarks Sync, Google Contacts Sync. so, we can't block it selectively.

edit: to answer your question, pdroid doesn't use any tool to control internet access. (i think, in principle, it can.)

edit: i believe that current status of pdroid framework in cm9 is same as that in cm7. temasek and tonydl confirmed that they also see google map manages to locate itself w/ location permission blocked. there are also posts in svyat's pdroid thread saying the same. i believe that the reason google map can do it is through gapps > LocationManager.apk

edit: i will test it again w/ NetworkLocation.apk blocked (this weekend) i will update the first post when i confirm.

edit: Map also runs NetworkLocationService, and it cannot be stopped. it restarts. Menu key > Manage apps > Running > Maps. it looks like google went extra miles to make sure that their maps can work no matter what... pdroid can only manage system permission. how do we deal with apps that starts its own service. we can't stop them from talking to its server and figure out our location using their wifi database.
[LG Optimus 2x] tonyp:
you're welcome.

I'm not a 100% sure here and it's hard to find further information on Google. I think they included that into another service. I doubt that it's the location service from GMaps because you don't have to use GMaps to use the wifi location feature (you actually get asked if you want to use it in the android setup wizard) - it might be included in the "Google Services".

With CM7.2 (temasek KANG) GMaps is unable to find my location when I blocked access in PDroid and disable the Wifi location service. There might be a bug in the CM9 source then?
[LG Optimus 2x] temasek:
The first few tries it was unable to find my location but I kept trying again and again and it found me. BUT..............when I move away from the centre of map, the Gmap cannot center on my location anymore.

Try it.
[LG Optimus 2x] tonyp:
I did try that of course. For about 2 minutes and GMaps still wasn't able to get my location. I just tried it again and it's still not working (which is the expected behaviour).

Did you just block access to GPS and network location in PDroid?

Or did you disable the wifi network location service like I described above, too?

Using PDroid 1.31 here (binary patcher).
[LG Optimus 2x] temasek:
Didn't disable wifi network location service. I'll try when im home.

Thanks.
[LG Optimus 2x] mateorod:
I wasn't being precise enough. I had the wifi location service disabled in the system settings, originally, before i posted. The last paragraph above is what had me wondering if Pdroid was working accurately. A number of the things I checked worked previously in CM7 and didnt seem to work in CM9. (Blocking of log data, for instance, apps like OS Monitor, Elixir and the like still were able to pull up logs. That wasn't the case in CM7, I don't think).

For me, personally, I just consider the Google data collection to be somewhat the cost of doing business with Android. I try to mitigate it where possible (PDroid, erasing GoogleAnalyticsDBs, Droidwall, so on) but I can accept that there are some leaks to Google itself. I use their services, and I know what they are about (data as the price for function).

What I would like to stop is the third party apps from doing the same. They don't provide services where I feel the trade-off is warranted. The problem is that it takes some timeand those malicious app (obviously) do not always announce their intentions. It takes some monitoring and some work with a packet sniffer or a firewall to know who is taking what. For that in-between time period, when the app is on probation while I monitor its behavior, I use PDroid to ensure that if they are stealing data, or rerouting info to ad sites, the data they get isnt actually worth anything.

I have caught multiple apps (from the market) sending info with things like notifad malware, which sends data back on a schedule to origin sites which do what they like with the results. Bloat Freezer and others have been guilty of this thievery.

What I am getting at is how do we know if PDroid (on ICS) is working correctly? I appreciate the porting efforts because it gets us that much closer, I just haven't been able to find out how well it works. Is the upshot of the Google maps discussion that it is a leak to Gmaps only, or are other permissions remaining unblocked?

Is the consensus here that the patch works for ICS and PDroid is functional? I may be missing something, I just can't tell.

Thanks for the work, for real, though.

Edit: Also, what is the problem with the smali patching? Could I just add the privacy and then create my own smali patches according to the old directions? I don't know if I understand what the process is. Sorry for being kinda confused about this. I can work with the files, but haven't been building for very long.
[LG Optimus 2x] tonyp:
^No, apperantly there is a bug with the network location blocking in ICS.

Let's wait for temaseks confirmation if PDroid does block it correctly in CM7.2 for him, too.

pastime already said that he made some kind of hack to the location blocking, maybe something went wrong here.

We can only verify that PDroid is working correctly by testing it out.

If there are any other parts where you think a block isn't working correctly with CM9 just report it here and I'll try to reproduce it with CM7. But I think pastime said that the only tricky part was the network location so let's hope it's the only flaw currently. The author of PDroid should have a testing app, maybe he could share it with us.
[LG Optimus 2x] pastime1971:
@ tonydl,

testing app is a good idea.

@ mateorod,

for smali patching, i just couldn't make it work.

as for how to verify if pdroid works or not, can we just use pdroid toast message ? i guess it may not work for the leak. for which we should modify the unsecured part (e.g. LocationManager instead of PrivacyLocationManager) to spit out every activity and see if it gets through.

we can also re-enable all the Log function in the patch to get more information.

i will try to do that this weekend. (a bit swamped at work these days)
[LG Optimus 2x] temasek:
Disable wifi network location alone, in wifi gmap cannot locate me. PDroid not touched at all.
[LG Optimus 2x] pastime1971:
well, i'm guessing AOSP ROM will ship only framework.jar.

in order to patch/add PDroid, we will need to split it into framework.jar and framework2.jar.

it is possible to do so in compiling (thanks to Ricardo).

i'm not so sure if it is easy to do so in smali patching.

can we split a single jar into two jar files in smali/baksmali ?
[LG Optimus 2x] mateorod:
We would, at least, have to carry the resources in the patcher. Patch creates files where they don't exist, so in theory I think we could do it. The entire process would take a bunch of size. When we get a patched aosp I think I could make it work.

Or not.lol
[LG Optimus 2x] pastime1971:
compiled CM10 with PDroid, for maguro, http://www.mediafire.com/?yj1yfxo6yqkbyds

since CM10 is in its early development, i am not sure if it actually works or not.
[LG Optimus 2x] pastime1971:
can anyone help me ?

this is a part of build/core/Makefile

i would like to do the commented task in this makefile, but i am not too familiar with mk syntax.

unique_product_copy_files_destinations :=
$(foreach cf,$(PRODUCT_COPY_FILES), \
$(eval _src := $(call word-colon,1,$(cf))) \
$(eval _dest := $(call word-colon,2,$(cf))) \
$(if $(filter $(unique_product_copy_files_destinations),$(_dest)), \
$(info PRODUCT_COPY_FILES $(cf) ignored.), \
$(eval _fulldest := $(call append-path,$(PRODUCT_OUT),$(_dest))) \
$(if $(filter %.xml,$(_dest)),\
$(eval $(call copy-xml-file-checked,$(_src),$(_fulldest))),\
$(eval $(call copy-one-file,$(_src),$(_fulldest)))) \

[B][COLOR="Red"]# if $_dest starts with obj/lib/ then touch obj/SHARED_LIBRARY/$(LIB_HEADER)_intermediate/export_includes[/COLOR][/B]

$(eval ALL_DEFAULT_INSTALLED_MODULES += $(_fulldest)) \
$(eval unique_product_copy_files_destinations += $(_dest))))
unique_product_copy_files_destinations :=
[LG Optimus 2x] Netuser:
Anyway to make Pdroid work with Paranoid Cm9 Rom by tony ?

thanks :)
[LG Optimus 2x] mateorod:
I finally got a server set up in my house and have backed up all my projects. The SDK is downloading right on the new 64 workstation right now, so I should be able to help compile and test this thing on grouper tomorrow.

The makefiles are ruby huh? I'll send it to inportb. If he isn't overwhelmed at work, he can probably help.

I ported PA for nook, and until they open source or consent to ,making us a patched build, we're stuck. Request a patched build in their thread, maybe. I know tony has.
[LG Optimus 2x] tonyp:
I did but doubt they will do it. They're working hard on the JB builds. They would have to make a v1.5 proid patched build while they're working somewhere between 1.9 and 2.0.
[LG Optimus 2x] mateorod:
I am running to get pick up my son, so I haven't even looked at this carefully yet, but my pal inportb took a look at this for us. Here is his recommendation.

I hope this is helpful. His stuff always is for me.

Pastime, have you updated the build patches since you last sent them to me? I am going to look at getting it to compile for grouper tonight.
[LG Optimus 2x] pastime1971:
last time meaning this morning ?

edit: oh, crap. i didn't pm you this morning, did i ?
[LG Optimus 2x] mateorod:
Oh, ok. I'll update the patcher. I think I am going to go ahead and put us up on techerrata tonight or tomorrow morning. I was waiting for JB to an extent, but now that you are updating the patches, the two step process is a little ridiculous.

They set us up with mateorod as our base folder. I am going to put a pastime1971 folder inside of that with the patcher in the pastime1971 directory.

We should at one point discuss what the vision is for the web host; do we want an update.zip repo or whatever. Although once we get JB done, I am going to get this going on-device. I am pretty sure that grouper has the power for it, considering that I could do the V6 patch on my Nook already, which is just about exactly half the power.

But as far as my earlier message, I meant the actual BUILD patches. You had sent them to me, but I know you've been working on them, so I was seeing if I had the most recent version.

My AOSP build environment is up, and I have a grouper build running on my device right now. So I can try and get the build patches to compile, I can test the build, and I can try and see if we can split the framework.jars for AOSP or not.
[LG Optimus 2x] pastime1971:
oh, i see. try this one, http://www.mediafire.com/?le9vnzdp9zo4ad0

as far as i can tell, it builds AOSP JB for maguro.

splitframework.diff is taken from CM10 to split some of frameowork.jar into framework2.jar

java.diff is to update framework dependence for apps (also from CM10)
[LG Optimus 2x] mateorod:
Yeah, I recognize that patch. I have grouper building now. We'll know sometime in the morning if it accomplishes what we need it to.

The CM10 for the nook is always in flux, but I will try and test CM on either the Nook or grouper over the next couple days.

I have Botbrew basil somewhat running on the grouper as well. It will need some coaxing, but if I can get it configured correctly, we should be able to start trying the process onboard soon as well.
[LG Optimus 2x] kobik77:
I totally lost you guys :silly:
[LG Optimus 2x] pastime1971:
@ mateo,

yeah, that is the risk of blind building. i need to get my hands on maguro somehow...

i am trying to get cm10 going on p990, which is quite difficult w/o ricardo's help. (he is not working on p990 any more.)

p990 needs lots of workaround to run CM10 at the moment. once i get it going, i can do more debugging.

as usual, build.diff, libcore.diff, and framework.diff are pretty much identical for AOSP and CM10.

you should be able to use those on CM10. (may need a few change, but nothing serious.)
[LG Optimus 2x] mateorod:
Okay. we have a pretty stable cm10. I'll build it tonight sometime and see from there. Will you link the java.diff commit please? Found it.

Edit; Here is another way someone has split the files. with jarjar tool of some sort (?);

edit2: I think I fixed the problem with the above build. I am making a clobber now, will report back this afternoon when it completes.

Edit3 (16 hours later); Nope. I thought I had found the solution, and it compiles fine, but the same problem on the log. I have seen a bunch of people with this exact same problem trying to do the exact same thing and they mostly seem to have it solved. I added a mk file change, and then removed it to no effect.

We are missing a patch or minor edit, that seems clear. I can find it.

And I have JDK and smali working on my Nexus 7...
[LG Optimus 2x] mateorod:
I have put out a pm to my device maintainer. Hopefully he can track down what CM is doing, becuase I can't tell what we're missing.

Have you built CM10 yet? I have been trying, but I am messing it up somehow. I have the tree, but am getting a "no match cm_grouper" message.

It then finds and syncs from the CM device repo but then reports

** Don't have a product spec for: 'cm_grouper'
** Do you have the right repo manifest?

I have done breakfast and roomservice.py. I added the kernel and device source to a local_manifest. I even unpacked the proprietary blobs.

I am missing most of the scripts I am used to using, such as extract-files and setup-makefiles.

I must be syncing from the wrong place. Do you know what's up?
[LG Optimus 2x] pastime1971:
@ mateo,

it's been a few day since i tried to build JB, but repo sync was working fine for me.

CM10 compiles fine, but i don't get any graphic working (probably due to issues with tegra proprietary libraries)

so, i haven't been able to debug pdroid on JB yet.

will try to find a time, but am really swamped at work... :<

edit: i just did JB repo sync, and it looks ok to me.
[LG Optimus 2x] mateorod:
Okay. I am just going to delete and resync. I have built ICS maybe 200+ times and AOSP JB a dozen, so I know it is something weird or dumb.

I might just build the kernel separately and see if that helps.

I'll figure it out. There are several cm10 builds up in the device forum that are basis ally fully formed since we have the aosp tree in full.

Good luck at work.
[LG Optimus 2x] mateorod:
There is another screen here if you want to see the file list.
[LG Optimus 2x] pastime1971:
awesome.

i recognize storage/sdcard0 !

you are running patcher on tablet, aren't you ?
[LG Optimus 2x] mateorod:
Well, I performed all the actions of the patcher on my tablet, anyway.

The autopatcher script didn't run due to a weird syntax error

127|u0_a38@android:/storage/sdcard0/C # cd ap
u0_a38@android:/storage/sdcard0/C/ap # sh auto_patcher cm.zip -h
auto_patcher: 86: auto_patcher: Syntax error: "(" unexpected (expecting "fi")
2|u0_a38@android:/storage/sdcard0/C/ap #

But that's just details.

That was framework.jar, by far the most demanding operation, resource wise. With no mods or overclock, smaling took almost 5 minutes. But there may be some ways to speed that up. Applying the V6 would be basically trivial.

Cool, huh?

Update: You wanna see why I had to wait for a machine with higher specs? Check this five minute recompile of framework.jar out. Over clocked to 1500, which had no noticeable effects on the time it took. Check out the load and especially the temp increase. Almost 20 centigrade!
[LG Optimus 2x] pastime1971:
awesome, mateo.

yeah, sure, arm architecture is too powerful, but it's a start !

i wonder if baksmali/smali can utilize SMP.
[LG Optimus 2x] tonyp:
Patching on the device, that's really sweet.

How's the temperature when you leave it at the stock 800Mhz?
[LG Optimus 2x] mateorod:
A) Oh yeah, it's sweet. I have been trying to get here since Early March. It took this long because...

B) This is on grouper, not Nook Color. I had successfully decompiled the services.jar with the Nook, but recompiling it was a crapshoot. The memory had to be severly limited in order to accomplish that.

The grouper runs at 1.3 stock, so this is not as huge of an overclock as it would appear. I ran it with no OC last night and the case did get warm. The first proof-of-concept post was with stock settings. The above post with the temp was done with the overclock.

Let me here point out that while the temperature increase is very real, the temperature you are reading on that screenshot is inaccurate. I don't know what is up with the reading in System Tuner, but I guarantee that the device did not go up to 150 degrees F. Battery monitor had it at 98, which is hot, but no where near the hottest I've seen. The nook would get to 103 on the charger easy.

The main problem is time. Services and core is relatively quick, but the above readout is for framework.jar, an absolute monster. It took almost 5 minutes. I am thinking about whether or not to see if I can't mount system and have all this run in recovery through a shell, when there are less demands on the resources. A reboot is absolutely necessary anyway. We are relying on several scripts just to get the tools working, so I am going to have to consult with pastime and others about that.

But I do think it is an important step. My guess is that grouper will end up being the baseline for most phones/tablets going forward. We are already at a stage where the marketers want us to give up our laptops. I just don't feel like we should have to send users to their computers to mod their phones.

But it is stil pretty slow. When it gets wedded to a GUI (which could shake it's way out in any number of ways) a progress bar would be a great help...

Yeah, I don't know. It would be a thing to look into, for sure. I know that the Linux kernels all are smp kernels. It may not be default in the android flavor, but as they finish the move to the Linux/Android monolith, it will be there. And if it works, I would have to believe that the kernel devs are adding it.

But who knows, there isn't a bunch of stuff being done on device that would really even qualify. It look slike Linaro has this on their action list as of January...worth thinking about.
[LG Optimus 2x] tonyp:
Thanks for the detailed reply.

Had to google "grouper" hehe.

That's on my purchase list as well.

As soon as I will get one here in Europe I'll change my Gmail signature to "Sent from my grouper" to show some nerdyness :D

@pastime: Did you consider to get that instead of maguro? I'm a little jealous to you US people..

If this is something which isn't needed within the next 2 month you could hit me up then for an android app.
[LG Optimus 2x] mateorod:
Cool...this has been a kind of cool project, lots of people contributing. I just kind of wandered into pastime's thread myself...

Anyway, I may have a CM10 for grouper compiling now.

It seems like cdesai, who has been commiting to android_<device>, purposefullly leaves out the cm.mk file to stop users from compiling their own, among a couple other totally irritating small adjustments. The only reason I figured this out was because I found out it had been done for an ICS device he maintained.

Things ike PRODUCT_RESTRICT_VENDOR_FILES being left off the full_<device>.mk and a couple other things.

The reason this was so frustrating was that I had to keep trying to figure out why it wasn't working without realizing it had been deliberatly sabotaged. Or at least, booby-trapped for noobs like me.

Anyway, maybe not, maybe this is SOP. But it was a pain and something new to me. Over at the nook forums fat-tire is walking people through their own CM10 builds. Although I guess he did ask people not to distribute zips. In the Nook forum you can trust people. The nexus 7 forum is a mess right now.

I guess they just don't want to have 20 identical builds of CM10 with their own threads and donate buttons lol.

Looks like it is building though. I will try the patches if it boots. I stole a bit of the config from the Nook cm.mk, so it is possible I will have to try and create that file again.

It would probably have been an avoidable hassle if I was willing to go to IRC. I have a hard time with that, for some reason.
[LG Optimus 2x] tonyp:
Hmm... pastime has found a couple "tweaks" like this which broke builds for the 2x as well.

Changes that didn't go through gerrit but only appeared on github.

I don't really like that approach of CM - although I can understand their frustration of users taking and compiling their work and releasing it as their own.