Terminal command to switch 3g on and off? - Galaxy S I9000 Android Development

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

Related

[HOWTO] Fix FastDormancy Battery drain without a full wipe/data-reset

After updating to XWKE2, some people reported their battery life greatly improved after doing a full factory reset on the device.
After some research I found out that all you have to do is delete the following files, if they exist on your system:
/data/data/com.android.providers.telephony/databases/nwk_info.db
/system/csc/nwk_info.db
(The second file may or may not exist.)
And reboot your phone. You will notice that FastDormancy will now do short pauses between queries on your logcat (5seconds or more), instead of query non-stop like crazy.
Better yet, if you have the skills, you can figure out which values to set on those databases to make FastDormancy work or disable it on networks that Dormancy is not supported.
Since there are hundreds of different networks out there, it would be impossible for me to figure out the configuration for each one of them, so for now just delete the file and you will already get a great improvement on your battery life.
If you want to know more about the FastDormancy problem, just search on this forum. There are a few threads that already discuss it in length.
Even better, here is how to set the FastDormancy pooling to a very high value, making it save even more battery when your network does not support Dormancy:
You will need to have the file /data/data/com.android.providers.telephony/databases/nwk_info.db on it's original location, so if you deleted, recover your backup copy back in place. If you dont have one anymore, you can download the attached file.
1. make sure the file /data/data/com.android.providers.telephony/databases/nwk_info.db exists
2. make sure you have sqlite3 binary installed (most people install it anyway while rooting). It's usually located at /system/xbin/sqlite3
3. open adb shell as root and execute:
# cd /data/data/com.android.providers.telephony/databases/
# getprop gsm.operator.numeric
310410 <-- write down this number, it's your carrier number and you will need it for the following commands
# sqlite3 nwk_info.db
sqlite> delete from dormpolicy where plmn="310410"; (replace the number 310410 on all commands with the number you got from the previous command)
sqlite> delete from nwkinfo where plmn="310410";
sqlite> insert into dormpolicy values("310410","My Carrier",30,30);
sqlite> insert into nwkinfo values("310410", "My Carrier", "off", 1500, "", "");
sqlite> (hit ctrl-d to exit sqlite3)
#
Done, FastDormancy will only pop on your adb logcat once every 30 seconds. you can change the number to whatever you want, in seconds.
Quick FAQ:
Q: But I don't have the second file?
A: That's fine, most people won't have it. But the code that checks for those files also checks for that one, so just in case I decided to make sure that one is deleted if ever exists.
Q: But that file may have more important network information?!
A: IT DOESN'T. If you take the time to open the file and look at it, you will se that it doesn't have much information at all. You will see it's ONLY contents are related to Dormancy, and NOTHING else. So if you are having FastDormancy problems, they already miss the information you need about your carrier anyway. Also, if you factory reset after KE2, it already delete those files.
Q: My battery usage seams the same!?
A: The problem only appears IF wifi is turned off or in "sleep mode". If you are testing it in those conditions, you won't see anything changed. You will only notice the fix while the phone has no wifi connectivity, has 3g on and is on standby. That's when FastDormancy goes nuts.
Q: How do I disable Dormancy?
A: If you wanna mess with the database or with ro.ril.disable.fd.plmn.prefix=23402,23410,23411, you can find your current network plmn running over adb shell the command: getprop gsm.operator.numeric . It's not guaranteed that it will turn it off. But if you have any luck, post here please.
Q: Why FastDormancy is there in the first place?
A: If your network support Dormancy AND the information required is on those databases, you can get a much improved battery life by using it. But only a few have that right now. Or at least working as intended.
Will give it a try, thanks I hope it helps.
Sent from my GT-I9100 using XDA Premium App
Done. Now we'll see.
Thanks a lot !
is the "nkw_info.db" that i have to delete ?
Something tells me that those dbs have network info that might be needed perhaps? I'm assuming there have been no side effects other than removing the fast dormancy problems?
I'll give it a try 2nt .
Just in case I will copy those files to somewhere else. I am not sure if deleting is the best option.
No change on the android os cpu time, still 2 min /h as before after this fix
CandyAndy said:
Just in case I will copy those files to somewhere else. I am not sure if deleting is the best option.
Click to expand...
Click to collapse
For some reason I even didn't have the second file
CandyAndy said:
For some reason I even didn't have the second file
Click to expand...
Click to collapse
Same here, no second file for me either. Moved the first onto the sd card for now.
where is the file located?
I don't appear to have either file on my device.
How to change dormancy to off?
Sent from my GT-I9100 using XDA Premium App
So has anyone found that this has helped?
Sent from my GT-I9100 using XDA Premium App
Battery much worse. Phone now in arabic, wont boot and also has lcd juice leaking out of the earphone socket
Sent from my GT-I9100 using XDA Premium App
I only had the first file to have moved that to my sd! Only time will tell I guess!
Sent from my GT-I9100 using Tapatalk
jangomango said:
Battery much worse. Phone now in arabic, wont boot and also has lcd juice leaking out of the earphone socket
Sent from my GT-I9100 using XDA Premium App
Click to expand...
Click to collapse
Nice one
Right, I'm an idiot, you can't see anything in the data directory without a decent file browser that takes advantage of superuser permissions.
I have now removed the first file (no trace of the second one, for reals) and will see how things go.
So far today, Android OS has account for 48 minutes of CPU in 5 hours, so it'll be interesting to see if that drops off...
I'm an idiot, too.
Not moved and directly deleted that file.
Damnit.. Next time it might be helpful if you are NOT 100% sure that it helps, please don't tell to remove instead of moving file..
13 Sekunden means 13 SECONDS!
Um, unixbyte, not sure what you're showing us there?
13 seconds of use isn't *really* enough to tell whether this has made a difference...

[FIX] Tasker and the pattern lock

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?

Wifi On/Off with TASKER???

Whats the best easiest way for this?? Ive tried a few from searching on google, directs me to droidforums.com but they seem to not work that well. Plus, some people use variable set, using %HOME = 1 and all that. Others go straight to the point of wifi near - on but somehow it doesnt work right. Can anyone help me? i just need a WiFi Near really, to toggle and connect to my HOME. I use Y5 app in the market, which does it but its not always reliable, doesnt always activate it ON/OFF but its exactly what I want but with TASKER, since it seems a hell of a good app!! Thank you.
can you not set up a "in range of" style thing? Like it goes off your GPS when you are near home and it will then turn on wifi.
I don't have the app and just did a quick skim of the website... sorry if this doesn't help

[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

[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