[FIX] Tasker and the pattern lock - Galaxy S II Themes and Apps

One of the things that I wanted to use Tasker for was enable the pattern lock when I was away from home and then disable it at home. Unfortunately due to recent changes in the Android SDK that is no longer possible with Tasker directly.
With a bit of searching I discovered the Secure Settings plugin which can be installed to /system/app and thereby provide Tasker with the functionality. However, it seems that Secure Settings does not work on the Galaxy S2 because Samsung have their own pattern lock and method of controlling it.
I started doing a bit of digging (mainly using logcat to see what the system was doing when the pattern lock was enabled/disabled via the Location and security settings menu). I discovered that the Samsung lock system is controlled by some files in /efs and with a bit of experimentation I was able to enable/disable the pattern lock via a root shell. I contacted the author of Secure Settings who suggested I use the Locale Execute plugin to run shell commands via Tasker.
So I present here the commands I am now using on my phone and hopefully they will be of some use to others. The commands include a check that should ensure that it does not attempt to enable the pattern lock when no pattern has been set, but this has not been fully tested!
WARNING: These commands require root access and you use them at your own risk!
Make sure to install the Locale Execute plugin first and then to enable the pattern lock with a task simply add a new "Plugin/Execute" action and set the contents to:
Code:
@! if [ "`cat /efs/cryptprop_lockscreen.patterneverchosen`" = "true" ]; then echo -n true > /efs/cryptprop_lock_pattern_autolock; fi
To disable the pattern lock create an Execute action with the following contents:
Code:
@! if [ "`cat /efs/cryptprop_lockscreen.patterneverchosen`" = "true" ]; then echo -n false > /efs/cryptprop_lock_pattern_autolock; fi
These have been tested on rooted stock KE7 firmware.
Enjoy,
Dan

Sorry for sounding stupid (I probably will)
But could you make a tasker-noob-proof-tutorial?
I couldn't find where to change, if it should be active inside or outside the given area (home or not home)..
Thanks in advance

mljjlm said:
Sorry for sounding stupid (I probably will)
But could you make a tasker-noob-proof-tutorial?
I couldn't find where to change, if it should be active inside or outside the given area (home or not home)..
Thanks in advance
Click to expand...
Click to collapse
He described the command action so you can apply your own rule... Google for tasker and you'll find a lot of howto
Sent from my Galaxy SII
If you find this post usefull please press the "Thanks" button

Great!
Is there a way to toggle 2G/3G and GPS via tasker on the galaxy s2?

great thread, thank you!
could you please export your tasker profile and upload it somewhere? i'm a tasker noob

@mljjlm
I'm sorry but this is not a tutorial for Tasker, it simply provides the information necessary to configure your own profiles for toggling the pattern lock. Although the information at the end of this post may prove useful.
@bgx
No idea I'm afraid, I've not had a chance to look into those although I'm pretty sure it's not possible to switch 2G/3G or GPS in the same way that the pattern lock is toggled here.
@js931
My profile is based on location (using the "Cell Near" state) and so will not be much use for anyone else. However I basically configured the following:
Create profile called "Home".
Add a "Cell Near" state and configure for my local towers.
Add a task called "Home" and include the "Execute" action described above for disabling the pattern lock (I also turn off mobile data and turn on wifi here).
Add an exit task called "Away" which includes the "Execute" action to enable the pattern lock (I also turn on mobile data here).

In your code for disabling the pattern, should the code read 'patternneverchosen' rather than 'patterneverchosen' as you have written? I haven't tested, but the spelling seemed odd.
If it's correct, ignore me

Major_Sarcasm said:
In your code for disabling the pattern, should the code read 'patternneverchosen' rather than 'patterneverchosen' as you have written? I haven't tested, but the spelling seemed odd.
If it's correct, ignore me
Click to expand...
Click to collapse
It is actually correct (I double checked the first time I tested it out since it was an ambiguous name), it is supposed to be:
pattern-ever-chosen
which is why I check for it being true in my command since we want a pattern to have been set.
Edit:
It has actually been properly tested today, I was away from home and the pattern lock was enabled, when I got back home the pattern lock was disabled.
One thing to be aware of, when setting up the Tasker profile, is that each "Execute" command requires its own root permission, so you have to make sure that these have been allowed before it will work quietly in the background (you should be able to trigger them by testing the task).

It works . Thanks !!!

It works great, however when the Lock Pattern is disabled, I still get the "slide to unlock" type of screen when waking the phone up. Any command for that?
I am running the stock SGS2 ROM (rooted obviously)
Thanks !

I am new to tasker and would like some help/advice
I want to save power a bit so want my gps to only turn on in certain cell tower locations (in order to aid more specific tasks when in those cell locations). my issue is not setting this up, it is in the fact that taskers default gps toggle settings do not work on the sgs2. Can anyone help with this, rather than me having to keep it checking gps all the time (which I have currently delayed to 10 minute checking slots).
Edit: Also not sure if it is me just being dumb, but I cannot see that plugin on that link in the OP..?

Excellent work, do you know if this will work with the original Galaxy S as well?

@julien.me
The slide to unlock keyguard is handled differently to the pattern lock, but you should be able to enable/disable it using Tasker without any hacking. I use Tasker to disable the keyguard when it is plugged in.
@Lennyuk
I mentioned in an earlier post that I have no idea how the 3G or GPS is enabled disabled, but I am fairly sure it cannot be achieved using a method like this.
@m.shafik
The original Galaxy S handles the pattern lock differently so this solution will not work, but the Secure Settings plugin may be of use.
Regards,
Dan

m.shafik said:
Excellent work, do you know if this will work with the original Galaxy S as well?
Click to expand...
Click to collapse
I used Tasker to do the same thing on my Galaxy S last night coincidentally - only in a somewhat more simplistic way as I am not as technically strong as most people here.
I have a simple Tasker profile that checks my location and if I am at home it executes an action to turn "Keyguard Off". Keyguard is under "Display" in the Action categories. Setting Keyguard to Off disables both the pattern lock and the slide lock.
My case is actually a little more complex because I want to disable the keyguard in two situations, when I am at home or when I am driving in the car. I did this by creating two profiles, the first of which checks to see if the GS is connected to my home wifi, and the second of which checks whether I am connected to my car Bluetooth. If either case is found to be true the relevant profile sets a variable. When the case become untrue (ie. I leave the house or turn the car off) the profile will clear the variable (via an exit action). I then have a third profile that simply turns off the keyguard when the variable is set.
I appreciate that there are probably cleverer and better ways to achieve the objective but I only installed Tasker last night so I am only just lifting the lid.

Hi terranim, I was using your script several days and it worked like a charm, but now I updated to 2.3.4 and it does not work anymore. Any advice ?
Sent from my GT-I9100 using Tapatalk

@hotsync100
I have not gotten around to updating my phone to 2.3.4 yet. As soon as I have I will try to figure out what is going on with my pattern lock hack.
Regards,
Dan

I'm now running Lite'ning v2.2 and the tasker fix still seems to work.
Which ROM for 2.3.4 have you upgraded to?
Dan

terranim said:
I'm now running Lite'ning v2.2 and the tasker fix still seems to work.
Which ROM for 2.3.4 have you upgraded to?
Dan
Click to expand...
Click to collapse
Stock kg1
Sent from my GT-P1000N using Tapatalk

Tried again and worked. I do not know what did I changed, may be the kernel . Thanks anyway .
Sent from my GT-I9100 using Tapatalk

I can't get it to work well on my SGS2 2.3.3 stock unrooted. I enabled admin and set Tasker to disable the keylock in a profile (when I'm at home and the wifi ssid is visible). The profile activates but I always get the lock.
And I mean the stock lock screen with the pin (not the pattern one which I read that requires rooting and the method explained in this thread)
Missing something?

Related

Terminal command to switch 3g on and off?

While waiting for cyanogenmod and the toggle 2g app to land from the heavens, I had this idea. So is there a command to switch the 3g to 2g and backwards?
Using this command with locale and the terminal plug-in could be handy. I just don't have the linux knowledge, so that's why I'm asking here
Sent from my GT-I9000 using Tapatalk
Could it be as simple as echo-ing a value to something in /sys or /proc? I poked around for a minute in those dirs but didn't see anything obvious.
just use switcherpro widget great app and can turn on/off 3g
I thought it would be easy, since it's just probably one value to change somewhere, but as said I'm pretty much lost with this one
All of the widgets are just shortcuts to the settings. And that's exactly why I asked if anyone knows if this is possible, I don't like it that I have to click 5 times to switch the network (have to open the lockscreen also). I just want it to be automatic, so that it would switch to 2g at nights and when I'm at home where I use my computer to surf net. Also did you really think I wasn't aware of the widgets? If not, that wasn't that much of a contribution.
If it really is as easy as just echoing a value like so many other things are, you could do a listing of all files in the suspect dirs, then make the change manually, and then compare what files have changed. That might narrow down the search. There's probably some nifty grep or other linux command to make that easy, but I'm not real sharp at that.
I tried running logcat on the phone while switching network settings and while the log reflected my actions somewhat, it wasn't helpful in identifying what really happened.
TheMasterBaron just posted a non-signed version of the toggle 2g/3g app here http://forum.xda-developers.com/showthread.php?t=739530&page=15 I tried to sign it with the "auto-sign" folder, but it won't install. (For the record, I have signed apps from update.zips succesfully before with it). Anybody know how to make it compatible, since he (TMB) says it's down to the signign http://forum.xda-developers.com/showpost.php?p=8073786&postcount=149

How do I put a VPN shortcut on my 'home' screen?

Hi,
I am currently using a VPN to get into my network & Then accessing my data that way. However to get to it in Gingerbread, I have to hit menu, then settings, then wireless, then scroll down to VPN, then click on my VPN, then put my password in & hit connect.
It would help a lot to be able to just click on my VPN link on the 'home' screen. I cant figure out how to get the shortcut there.
Any suggestions?
Thanks,
Rich
I just tried and you add a shortcut to your home screen, just as you add a widget.
I dont see anything related to a VPN within the shortcut menu or widgets. Any ideas on how to do a shortcut for the VPN?
Tried anycut from the market?
Sent from an Epic in the sky.
Thanks, Anycut might do the trick, of course there is no VPN listed. Is there a way to determine what processes are running in Android? If i could find the VPN process, I could probably get it going.
I believe you can achieve this with Tasker. I know its a paid app but its an option.
As a side note, how did you manage to get tour vpn to work? Are you using ddwrt by chance? Since getting this phone I could no longer vpn over sprints network due to firewall issues. From what I found online if you ask sprint for a static IP it fixes the problem but they charge you a monthly fee. It used to work fine on my old HTC hero.
Sent from my SPH-D710 using Tapatalk
dbldown768 said:
I believe you can achieve this with Tasker. I know its a paid app but its an option.
As a side note, how did you manage to get tour vpn to work? Are you using ddwrt by chance? Since getting this phone I could no longer vpn over sprints network due to firewall issues. From what I found online if you ask sprint for a static IP it fixes the problem but they charge you a monthly fee. It used to work fine on my old HTC hero.
Sent from my SPH-D710 using Tapatalk
Click to expand...
Click to collapse
We use L2TP/IPSEC PSK at work though Sonicwall, and it works great.
I don't have a static IP on my account. Works fine from 3g or my home WiFi.
Sent from my SPH-D710 using XDA
I am using a Zyxel firewall & L2TP also. It works fine but... sprints lousy service seems to stall out, requiring me to re login to the VPN. Yesterday with 1 bar, I was logged into the VPN but there was not enough 3g to actually use any data, but enough to stay logged in for 2 hours & not get any emails.
It works fine & I suspect if i had better 3g (or verizon) it would work OK.
I was using DDWRT & OpenVPN with CM7 on my Evo 4g & it worked but I switched to a new router.
Yeah, missing emails is never good.
We don't have an Exchange server at work (not cost effective enough to make it work properly across 10 locations), so I'm able to access my email with K9 via IMAP or POP3.
It's strange that it worked with one Sprint phone, but not reliably with another. Has data service had a general decline in your area?
Sent from my SPH-D710 using XDA
You should try vpn show. You can find it in google play.
Check the "Launch VPN" app on Google Play
Sorry to revive an old thread. I was looking for this as well and found a way. Just adding if anyone searches for this sort of thing.
Add a shortcut to home screen, select settings, then look for VPN.
This works in my HTC ONE on 4.2.2
I use NFC Task Launcher on my Samsung Galaxy S4.
The following could be a little bit different depending on your phone's make and model and rom type. I did the following.
WARNING: I am not responsible for any damage made to your phone or anybody or anything else during the reading or by following the acts of this tutorial in any way possible.
Click to expand...
Click to collapse
Open up NFC Task Launcher and go through the tutorial.
- In the end you can create you own task.
- When you create a new task just click for NFC.
If you have NFC Disabled, just leave it like that and when it'll ask you if you want to enable it, press cancel. (TIP; if the top bar overlay is bugging with more information, just tap on one of the buttons after explanation to have it's focus come back to the window.)
- Name the task 'VPN' or something.
- Click on the cross (✚) in the right top corner to add an action
- Search for 'Applications & Shortcuts' and select 'Open Activity', then click next at the bottom.
- The application list will load up. Select 'Settings' as an application and the activities list will be updated.
- Choose; 'com.android.settings.Settings$VpnSettingsActivity' and select 'Add to Task' at the bottom.
- Then press the arrow to the right '→' in the top right corner.
- It will say you need to place a tag underneath it. DON'T DO THAT, AS IT WILL OVERWRITE THE TAG. (I hope you still have NFC OFF!)
- Just press the tick mark (✓)
- Now you have at least 1 task in the 'My Tasks' list.
Now, to add this to you're homescreen, do the following;
- Go to your homescreen.
- Add a widget like you would normally do. The name of the widget is 'Run Task', so look for the 'R'.
- There are 3 options there, background color (I personally like the black BG), select Icon (I've chosen the gear icon since its a setting) and select task. In 'Select Task' choose for the VPN task you've made and press 'Done'.
- Now press the task on the homescreen, and it'll open up the VPN list (at least on SGS4 it does).
- Connect to your VPN as you would normally do.
You can even write this to an NFC, but that doesn't make sense, since all it does is open the VPN settings menu, not connecting to the VPN directly.
Sidenote; This app is also handy for making other tasks, such as tweeting your at work, check in at Foursquare, send your boss an email that you're in the office and turn off the sound of your phone all in one task, just by connecting to your works wifi connection or by taping an NFC task.
Now you can easily connect to your favorite VPN easily.

[Tasker][Secure Settings][S-pen] Simulate keyguard off on Galaxy Note 2

I've been using Tasker for years and the Secure Settings app is an awesome addition to it. That being said recent changes to Android have hampered some of the options these great apps provide for us end users. One that bothered me the most is that if you use one of these apps to turn off the keyguard, any notification click (which may or may not include otherwise entering apps that have an active notification since that would clear the notification) would turn the keyguard right back on.
This is annoying and I googled some workarounds that didn't really work for me. I went digging and found a few links about getevent and sendevent for simulating input code that Android recieves when you do something. I realized that removing the S-pen always triggers the display to be unlocked (I'm not sure about pin or pattern because I don't use those). So anytime you want the effect of the keyguard being off, just setup the code for the S-pen being removed anytime the display turns on in addition to whatever variables you have setup.
In my case I wanted the keyguard to be off when I am home and connected to my WiFi. I created a profile with the context being connected to my specific SSID and made the task a variable set %HOME to 1. I made another profile With the context being variable set %HOME matches 1 and a display on event. For the task I went to plugins > secure settings > edit > run command enter the command
sendevent /dev/input/event12 5 14 1
sendevent /dev/input/event12 0 0 0​sendevent /dev/input/event12 5 14 0
sendevent /dev/input/event12 0 0 0​
I'm not sure if root is necessary, but I checked the Root checkbox. Give your command a name, save the profile and you should be good to go. Any questions about this or anything else about Tasker I would be happy to try to assist. Hope you guys enjoy.
will this work for the galaxy S3? it didn't have the S-Pen
klau1 said:
will this work for the galaxy S3? it didn't have the S-Pen
Click to expand...
Click to collapse
I'm not sure about that. I do know that sometimes different models in the same company may share code and since Tasker's Dpad up and down work for phones that don't have keyboards it's worth trying. I don't see any harm in trying it out, but since the S3 doesn't have the sensor I can't guarantee that it will work.
jadoe05 said:
I've been using Tasker for years and the Secure Settings app is an awesome addition to it. That being said recent changes to Android have hampered some of the options these great apps provide for us end users. One that bothered me the most is that if you use one of these apps to turn off the keyguard, any notification click (which may or may not include otherwise entering apps that have an active notification since that would clear the notification) would turn the keyguard right back on.
This is annoying and I googled some workarounds that didn't really work for me. I went digging and found a few links about getevent and sendevent for simulating input code that Android recieves when you do something. I realized that removing the S-pen always triggers the display to be unlocked (I'm not sure about pin or pattern because I don't use those). So anytime you want the effect of the keyguard being off, just setup the code for the S-pen being removed anytime the display turns on in addition to whatever variables you have setup.
In my case I wanted the keyguard to be off when I am home and connected to my WiFi. I created a profile with the context being connected to my specific SSID and made the task a variable set %HOME to 1. I made another profile With the context being variable set %HOME matches 1 and a display on event. For the task I went to plugins > secure settings > edit > run command enter the command
sendevent /dev/input/event12 5 14 1
sendevent /dev/input/event12 0 0 0​sendevent /dev/input/event12 5 14 0
sendevent /dev/input/event12 0 0 0​
I'm not sure if root is necessary, but I checked the Root checkbox. Give your command a name, save the profile and you should be good to go. Any questions about this or anything else about Tasker I would be happy to try to assist. Hope you guys enjoy.
Click to expand...
Click to collapse
Can you explain the command a little more? I copy / pasted, removed formatting code...and get 2 responses when running. Are there two commands there, one for S-pen in and one for out? Pretend you're explaining it to a special needs 3rd grader.
Tasker is a newer app for me, and still don't understand the variables, scenes, etc.
Thanks for any help you're willing to provide, and sharing your idea.
-- Note II, TapaTalk II--
JVogler said:
Can you explain the command a little more? I copy / pasted, removed formatting code...and get 2 responses when running. Are there two commands there, one for S-pen in and one for out? Pretend you're explaining it to a special needs 3rd grader.
Tasker is a newer app for me, and still don't understand the variables, scenes, etc.
Thanks for any help you're willing to provide, and sharing your idea.
-- Note II, TapaTalk II--
Click to expand...
Click to collapse
Yes there are two commands. Two lines to a command. The 0 0 0 parts are required kind of like telling the system that the command is complete (as best as I can explain it right now). The first two lines simulate s-pen removed. This is what we really need as it will automatically unlock the screen. I have not tested to see if the second command is necessary, but with my experience in programming I always follow the rule of thumb to set everything back to normal. The easiest way in my opinion is to use the Secure Settings app in addition to Tasker rather than just Tasker.
What other questions did you have about Tasker? Maybe I could help out.
jadoe05 said:
Yes there are two commands. Two lines to a command. The 0 0 0 parts are required kind of like telling the system that the command is complete (as best as I can explain it right now). The first two lines simulate s-pen removed. This is what we really need as it will automatically unlock the screen. I have not tested to see if the second command is necessary, but with my experience in programming I always follow the rule of thumb to set everything back to normal. The easiest way in my opinion is to use the Secure Settings app in addition to Tasker rather than just Tasker.
What other questions did you have about Tasker? Maybe I could help out.
Click to expand...
Click to collapse
TapaTalk didn't notify me of any updates in this thread...just happened to be browsing through. I never did get it working though. I'll have to go have a look at my Tasker profiles to see what part I got stuck at.
-- Note II, TapaTalk II--
JVogler said:
TapaTalk didn't notify me of any updates in this thread...just happened to be browsing through. I never did get it working though. I'll have to go have a look at my Tasker profiles to see what part I got stuck at.
-- Note II, TapaTalk II--
Click to expand...
Click to collapse
How are you trying to set it up?
Off topic, but I'm still confused on exactly what secure settings actually does on top on tasker?
Sent from my SPH-L900 using xda premium
Subiegsr said:
Off topic, but I'm still confused on exactly what secure settings actually does on top on tasker?
Sent from my SPH-L900 using xda premium
Click to expand...
Click to collapse
Secure settings is basically a plugin that can do things that Tasker either hasn't implemented yet or just can't do
jadoe05 said:
Secure settings is basically a plugin that can do things that Tasker either hasn't implemented yet or just can't do
Click to expand...
Click to collapse
I don't want to hijack your thread, but I was just wondering if you've found a way to detect the removal of the pen from within Tasker? Pent has basically stated that he can't/won't do it here: Google Groups
Back on topic, I've just been using the "PatternLock" enable/disable in Secure Settings to turn on/off the keyguard when I'm home/away. Works most of the time, but I'm using "wifi connected" to determine if I'm at home, and occasionally I lose the wifi connection at home when the phone sleeps, turning the pattern lock back on. Still it works enough to keep me happy.
bkimbel said:
I don't want to hijack your thread, but I was just wondering if you've found a way to detect the removal of the pen from within Tasker? Pent has basically stated that he can't/won't do it here: Google Groups
Back on topic, I've just been using the "PatternLock" enable/disable in Secure Settings to turn on/off the keyguard when I'm home/away. Works most of the time, but I'm using "wifi connected" to determine if I'm at home, and occasionally I lose the wifi connection at home when the phone sleeps, turning the pattern lock back on. Still it works enough to keep me happy.
Click to expand...
Click to collapse
There is an app called s-pen helper that i believe is either on XDA or on the market it is compatible with Tasker you can detect the pen that way.
jadoe05 said:
There is an app called s-pen helper that i believe is either on XDA or on the market it is compatible with Tasker you can detect the pen that way.
Click to expand...
Click to collapse
Excellent! Thank you very much, that's exactly what I was looking for!
Just a heads up. Tasker is on sale now for $1.99 right now. (I think it was originally $6.50)
Sent from my SPH-L900 using xda premium

[Q] Using Pattern Lock with VPN/Credentials

I have FoxFi and FoxFi must use a VPN/Credentials storage. This disables the pattern lock. I can re enable pattern lock by clearing credentials however than I have to go through the process of disabling it every time I use FoxFi. Is there a way to have both?
JeffATL said:
I have FoxFi and FoxFi must use a VPN/Credentials storage. This disables the pattern lock. I can re enable pattern lock by clearing credentials however than I have to go through the process of disabling it every time I use FoxFi. Is there a way to have both?
Click to expand...
Click to collapse
I'm sorry that I don't have an answer for you, but can I ask how you clear the credentials so that you can change the screen lock method? I'm using fingerprint and it works fine with Foxfi, but sometimes I like to just use swipe and I can't choose it (its greyed out). I have gone into "Trusted Credentials" and manually removed the FoxFi credential under the User setting (so that user setting is now blank), but when I try to change screen lock to swipe, its greyed out. What am I supposed to do so I can choose any of the screen unlock methods, not just the ones FoxFi allows?
I apologize for hijacking your post and you don't have to answer me if that upsets you. Thanks anyway.
FlattFoxJohnson said:
I'm sorry that I don't have an answer for you, but can I ask how you clear the credentials so that you can change the screen lock method? I'm using fingerprint and it works fine with Foxfi, but sometimes I like to just use swipe and I can't choose it (its greyed out). I have gone into "Trusted Credentials" and manually removed the FoxFi credential under the User setting (so that user setting is now blank), but when I try to change screen lock to swipe, its greyed out. What am I supposed to do so I can choose any of the screen unlock methods, not just the ones FoxFi allows?
I apologize for hijacking your post and you don't have to answer me if that upsets you. Thanks anyway.
Click to expand...
Click to collapse
Security - Clear Credentials (Removes all) works. But I have to add back credentials to use FoxFi
I was trying to work this out this morning myself. I came across a thread with "fixes" but none worked for me. Feel free to give them a try and let me know if anything works for you.
http://forum.xda-developers.com/showthread.php?t=2739469
vwpiper said:
I was trying to work this out this morning myself. I came across a thread with "fixes" but none worked for me. Feel free to give them a try and let me know if anything works for you.
http://forum.xda-developers.com/showthread.php?t=2739469
Click to expand...
Click to collapse
Thanks. This one worked for me.
e4c said:
found a fix for getting all lock screen options back.
log into google device manager: google.com/android/devicemanager
click on the lock button for your device.
enter a new pass and save.
now go to your phone and use the new pass to unlock the phone.
you should now be able to go to your lock screen settings and pick whichever lock option you need.
Click to expand...
Click to collapse
just to clarify. login to google device mgr from pc, not phone - I guess I now have to plop down $8 for the key, I thought I did already.
"log into google device manager: google.com/android/devicemanager
click on the lock button for your device.
enter a new pass and save.
now go to your phone and use the new pass to unlock the phone.
you should now be able to go to your lock screen settings and pick whichever lock option you need."
You can do this from chrome on your phone.
This worked for me!
Thanks for the help!
Running an sgs3 i747 and tried ththis to no avail. All other lock methods are still locked out.

[Guide] Enable working GPS Change no Rubber banding

This guide is for fixing a GPS Problem when attempting to use spoofing apps, in particular games that require your actual location.
For Example Pokemon GO among others, over time the original exploit to mock location was patched by certain companies when playing their games so now the only reliable way to do this is with root (for several reasons).
So Even with apps like GPS Joystick I found at times the real location was still getting acquired, I attempted to manually disable location services, using the built in features like "AGPS-Reset" still the actual GPS would lock on (obviously not as much in larger buildings) still I wanted to go outside and only mocking location be seen by the apps/games with no actual location working
I figured it out and thought I would share
First things first, You MUST be rooted. If you do not have root and own a V30 variant their are guides to convert and root.
It doesn't work without it, don't ask
For other phone models your mileage may vary (we are looking for a file "gps.conf")
Second, MAKE A BACKUP of the files that will be changed later, if you do not. Then you will most likely have to re-flash or have non-functional GPS and if you do need it you would be boned.
Third, You will need a few tools Ex. ( Terminal Emulator, Systemize [Masgik Module] , GPS Spoofing app I personally use the GPS Joystick Pokemon GO, Root file Explorer of some sort, the game of choice, and a system app or service disabler, like Titanium backup etc)
Now to the fun stuff
Make a backup of /vendor/etc/gps.conf
Install spoofing app (if equipped generate new name for GPS app and then delete the original)
After backing up gps.conf to SD or through adb, delete the original gps.conf in a root file manager then create a blank file in the same location (/vendor/etc) named gps.conf
In effect you just replaced the original with a blank copy, you could manually delete the contents as well but that's more work.
use the appropriate app disabler and disable anything with GNSS, location services, Qualcomm IZAT, Fused Location and anything else that is location service related
Open Terminal Emulator
type in "su"
grant su permissions if asked, make sure you have a # in the prompt
type in "systemize" (Gotten from magisk module download)
convert GPS spoofing app or generated app to a priv-app in the system (It cant be just /system/app)
then exit the systemize app and type "exit" a few times to close the terminal
Make sure when you do change the GPS settings in the actual android menu that you choose GPS only and that WiFi and Bluetooth settings are unchecked, obviously ensure the main GPS switch is enabled but that the rest aside from GPS only is not checked and or enabled
Then reboot your phone THIS IS A REQUIREMENT, for several reasons, it actually disables the location related services as well as the GPS via the gps.conf file and will also make your new spoofing app a priv-system app and it will appear
By now you should have location services aforementioned disabled, gps.conf blank, settings to GPS only with no other location "extras", a systemized gps spoof app. From here i disabled indirect mocking in the spoofing app, make sure System mode IS enabled AGPS-reset isn't needed and being we disabled location services manually, I suppose you could un-check that too but i left it checked
I modified the walk speed to the limits of the game I play, rebooted one more and its a safe idea to double check everything is set correctly
You DO NOT need to add the said mocking app to Developer Mock locations as it is a system app and some spoofer(s) offer that mode after making it an system app
At the end of the day you will now have a GPS Mocking app running where you can set your location and play without ever having the real location ping and rubber-banding you or otherwise messing up the whole concept of spoofing the GPS
As a disclaimer the GPS is a safety feature but some would rather not be tracked so this can technically work this way too
Some may ask well if you are just turning off GPS can't you just turn off the switch in Location Settings, that does not work as GPS technically has to be on for the spoofing app to function. Deleting gps.conf vs making a blank file causes the spoofing app to state the GPS isn't on (even if the on/off switch is toggled under the Phone Settings)
To reverse simply restore the original gps.conf to "/vendor/etc" (You did make a backup? Right)
re-enable the previously disabled location related services
reboot the phone
and if you'd like you can tick the gps and networks, WiFi, Bluetooth scanning and qualcomm IZAT option
or go with just GPS
either case this should enable the real location, I always test with a weather app
If you play Pokemon GO,Adventure Sync doesn't work (while location services disabled/frozen) I suspect because one of the "Location Services" Google Fit Depends on, however being you can walk as much as you want its a mute point, if you want Adventure sync back you have to reverse the process
Anyway this is what I have come up with, it works for me, after its tested by others, I am planning on writing a app that does this all in one shot. For now here is the manual way
Have Fun, Hope it works
If you have any questions or modifications to the post I am open to suggestions
If their is an easier way or something I missed or could Improve on, again comments are welcome
Last thing This technically violates TOS for some games and is increasingly hard to successfully pull off, so try your best to use every tool available to hide both the GPS spoofer and root from said games, don't teleport to far without waiting the proper amount of time before running the game , read up on the walking limits or how the game works if needed to fine tune everything
Just quick question. Do we still need to downgrade google play service boss? Something like 12.6.85 version.
thank u so much i was having this issue for a long time and i was planning to buy a gps jammer just so i can fix this issue , this is worked very well thank u again ^^
Thanks man you're the best!
I'm about to try this guide on my V30 with Oreo... did you ever make the app you mentioned that would do all this automatically??
teknomedic said:
I'm about to try this guide on my V30 with Oreo... did you ever make the app you mentioned that would do all this automatically??
Click to expand...
Click to collapse
No unfortunatly i got busy with life, for the time still have to do things manually
fxsuprapto said:
Just quick question. Do we still need to downgrade google play service boss? Something like 12.6.85 version.
Click to expand...
Click to collapse
I just tried a month ago and i never downgraded google services, in fact I read the newer updates to pokemon look for that, my origional instructions stated to disable fuse locations etc, now you don't need to do that just two things, well maby 3, make sure your using magisk and hide root from pokrmon go, under gps locations settings set to use gps only and change the gps.conf file as instructed, if poke gives OS incompstable warnings know that it will browse both your sd and internal card looking for files folders and even some other apps thats known to utalize root, i commented on this to another user on the last page of the thread, also someone else make another guide based on my findings, ive commented there as well, you can also look at reddit as i found at least a partial lidt of things the game looks for, being they update all the time like with anything else its a cat and mouse game, the only reason this works is because were changing a file in android that prevents the gps from working without totally disabling it, doing the latter flags in pokemon, the eevs of the game cant patch this as gps comes from android itself and not a app or utility but it would be just as easy for them to look for a 0 k (size) gps file and if thst matched well then it would be game over for this fix, luckly tho this fix isnt super popular so its stayed under their radar
Hey, Doesn't smali patcher achieve the same outcome with a shorter process?
In reguard to the smali patcher, to be honest I have no idea, ive seen several references to it sinse folks started commenting on my idea, things get developed all the time, i dont recall having that as an option when I wrote all this or id have gone for a quick fix myself, if the patcher somehow disables the gps itself then its likely it works in a similar fashion, as the heart of my fix really depends on the gos file, and of course some spoofing app and root, all id say is try and see, if the patch works and its less leg work for you then go for it, I would, i just didnt have anything else when i wrote the steps out
Great, just what i was searching for!
That is really great, i've spent today searching for a way to deactivate the gps, i have a sony xperia z3c which is used just for pokemon. I found that gps.conf file shortly after i started having a nose around the filesystem. The only think i actually tried so far was disable the location service & the fused locations, after which the GPS joystick (as a system app) seemed to stop functioning. Incidentally, my gps.conf is in > system > etc
So thanks for this info, you have saved me from a lot of messing about.
Just to update, the gps.conf was in 2 location on the xperia z3c, the top etc folder and in system/etc. so did both.
Again the gps joystick would not work after i froze the location service and the fused locations, as it turns out they both have to be present for it to work.
Despite that, it looks to be working ok.
No, a while later it did start doing it again, much less though.
Think ive sorted it now though. using an app called System2, i found the other services that are related to the location service, then froze 4 of them. I also deleted this one file that was somewhere within the in the dev folder in another folder called qmux_gps. it wouldnt let me copy it, but i did manage to delete it (wreckless i know). Since then everything is working great, for about 5 hours so far

Categories

Resources