Page 1 of 5

Possible fix for WIFI location on ICS

PostPosted: March 29th, 2012, 4:02 pm
by blueeagle69
Hey guys.

I have been looking into the reason why WIFI location doesn't work on ICS.
I worked out that it was seemingly blocked on Chinese leaked builds of ICS.
So I looked into this further, and stumbled across a thread over at XDA.

Inside framework-res.apk /res/values/strings.xml there are two lines that control WIFI location.

These are;
Code: Select all
<string name="config_networkLocationProvider">@null</string>
<string name="config_geocodeProvider">@null</string>

which is of course incorrect. It should read this;
Code: Select all
<string name="config_networkLocationProvider">com.google.android.location.NetworkLocationProvider</string>
<string name="config_geocodeProvider">com.google.android.location.GeocodeProvider</string>


But here is where my problems start.
I have managed to decompile framework-res.apk, and change the code.
But, when re-compiling I get errors.
It seems as if apktool is having difficulties with some ICS files. This file being one of them.
One version will compile, but not decompile etc.
So, can someone else have a go at de-compiling & re-compiling this apk?
As yet, I have not found a version of apktool that will re-compile this file.
For ease of use I have been using this. http://apkmultitool.com/node/16
This gives you an easy well=written batch file in windows. Just run this, and select what you want to do from the menus.
Just simply drop your apk into the correct folder.

Or of course we could try a different framework-res.apk that hasn't got these two lines of code set to NUL.
What do you think?

Re: Possible fix for WIFI location on ICS

PostPosted: March 31st, 2012, 12:08 am
by suggsy89
Found it, will check tomorrow and try it mate.

Re: Possible fix for WIFI location on ICS

PostPosted: March 31st, 2012, 12:11 am
by blueeagle69
Cheers matey. It's been driving me nuts.

Sent from my Scroll Excel/Nexus S using Tapatalk.

Re: Possible fix for WIFI location on ICS

PostPosted: March 31st, 2012, 2:53 pm
by suggsy89
Hi, i can re-compile this without errors, but when i push to system and reboot, im getting force-close errors.

http://www.box.com/s/f9b0d51615dc2df9cbc0

I highly suggest doing a backup.

Re: Possible fix for WIFI location on ICS

PostPosted: March 31st, 2012, 3:22 pm
by blueeagle69
I did read issues somewhere else concerning force close problems when its been recompiled. It seems to be issues with Apktool and ICS. Looks like we will have wait for an update. And of course, you cannot simply rename the apk to zip and extract strings.xml because the Values folder only shows up when it's been decompiled.
I may try this later once I can get near my PC.
It is annoying. A guy did this over at xda for the Kindle Fire, as this didn't have working network location either.
Will have to double check what os was on the Fire.
Thanks for trying matey :-)

Sent from my Scroll Excel/Nexus S using Tapatalk.

Re: Possible fix for WIFI location on ICS

PostPosted: March 31st, 2012, 3:57 pm
by blueeagle69
Hey Suggsy.
Stupid question. Did you sign that file?
System apps don't need to be signed. (apparently).

Re: Possible fix for WIFI location on ICS

PostPosted: March 31st, 2012, 6:44 pm
by suggsy89
I did sign it yes, dope :lol: Ill try again shortly, been out flying my Easystar II with the lads today.

Re: Possible fix for WIFI location on ICS

PostPosted: March 31st, 2012, 6:51 pm
by blueeagle69
Oh cool. I will have to look that up on Youtube.
Take your time matey. No rush.


Sent from my Scroll Excel/Nexus S using Tapatalk.

Re: Possible fix for WIFI location on ICS

PostPosted: March 31st, 2012, 7:51 pm
by suggsy89
Right, i modified the framework-res.apk and re-compiled, it does give me some error about "sources", tested and it kills my Excel, massive boot loops...

I dont know why, we need to look into this further

Re: Possible fix for WIFI location on ICS

PostPosted: March 31st, 2012, 8:13 pm
by blueeagle69
Yes mate that is weird.
I think it may be caused by apktool. But that's just going on other sources.
I will beon my pc later. I'll post the link on xda concerning the kindle fire.
And I will double check what os he was compiling for.


Sent from my Scroll Excel/Nexus S using Tapatalk.