[Q]Enabling the GPS automatically and WIFI testing functions - Android Software/Hacking General [Developers Only]

Hi all,
1.
I have created an application to test my GPS module on my device.
It works well thus far. However, I wonder if there is any possibility can enable
the GPS module without manually.
Here is the scenario, when i execute the application installed on my android
phone, if my GPS is disabled, a dialog will pop up to request the user to enable
the GPS module. Then the screen will turn into the GPS setting option, the user
needs to enable the GPS module manually.
Is there any possibility to enable the GPS module automatically when I execute
my aps on android? I was trying to google it but all reply is this behavior
involves the security issue so that there is other way to do it.
2.
I have an application which can help me test the wifi connectivity.
Again, it works well.
However,is it possible to transfer a file or send data using something like netperf? It is valuable to test this as Tx can use more power and I want to make sure it is functioning well.
Any reply is highly expected.
Thanks all

Can someone please guide me a direction to go?
Any reply will be very appreciated.

Related

disable wifi windows mobile 6.5? Any ideas please

Hi everyone,
I'm new to this forum, and was wondering if anyone can help me out. I have an Acer S200 but figured that perhaps this could relate to any windows mobile 6.5 device. Basically due to restrictions at work, we need to disable internet access from our work mobile devices!
I have read various posts that state that this can be achieved by disabling wifi access by altering the registry keys, however none of the methods that i have come accross seem to apply to my Acer S200 mobile 6.5.
Sorry to be a pain, but does anyone know how i can do this?
Thanks in advance everyone.
alan
Like it has to be unable to turn on, or off? Does the default winmo comm manager not work? If not, just try a third party one, theres plenty out there
Hi cmstackar
thanks for the reply. Yes thats right, there should not be an ability to toggle it on or off - just for the wifi to be disabled for the user. I understand that changing registry keys is only a temporary solution since hard resetting would put things back to normal, but even that's okay for the time being.
Any ideas anyone?
What third party software did you particularly have in mind?
What about your internet access from the phone network? Surely that would be the issue, not wifi which you can't use to connect to the internet unless you're near a internet accessible wireless network which you have the network key to access...
hi xaccers,
the phone doesn't have a data connection plan with it, so it would be too expensive to use for internet access i imagine.
but, likewise then, is there a way to disable both of these (wifi, data connection)?
I know this is such a strange request, but appreciate any pointers from forum members.
Thanks
If would be easy if you could cook your own ROM, but if the user is willing to do a hard reset, there is nothing you could do to a factory ROM to prevent it from coming back after a hard reset.
hi trueg
that is true. However, I am a complete newby to cooking ROMS etc, and also if the user did hard reset the device, it would need to be taken back to technical department to have software reinstalled, etc. So the temporary changes could be reintroduced again.
So, given the above, do you you know how to temporary disable wifi/data connection? I have read others state that this can be achieved by altering registry keys - but the ones that are referred to are not present on my acer.
any expert willing to depart a little advice my way?
So your Acer phone has a wifi thats always on? I never encountered such a device but nonetheless if your wifi network at work is secured then your phone won't be able to connect to the wifi router hence won't get any internet connection.
hiya,
The users can use the devices in public wifi areas. But also, now that i've been trying to do this for ages, i really would just like to know how to fiddle with the registry keys. its kind of bugging me that I haven't managed to figure this out...
will I really need to learn how to cook my own ROM? (I'm not sure I want to take the risk :S)
I'm sure there is a really easy way to disable wifi/data connection (even if temporarily upon hard resetting) that the more experience members can help with... Please
thanks for all the input so far guys.
alan
OK, so you want to prevent users from accessing the Wireless Manager, or do you want WiFi to not work?
How smart are the users that you are dealing with?
You can easily hide the Wireless Manager from the Control Panel and you could possibly overwrite wrlsmgr.exe with a dummy file, but preventing access to the Wireless Manager would mean they couldn't put the phone in aeroplane mode.
There should be several ways to change the registry to prevent WiFi from working at all.
I like to use FdcSoft Task Manager v3.1 to edit my registry.
Hi Alan, You can try cooking a ROM..it's not so difficult unlock your device go to XDA WIki find your phone then check step by step the procedure, connect Acer to the PC download the ROM you think is better for you, copy it to desktop, then to your device. That's it
Thanks trueg,
you say there should be several ways of changing the registry to prevent wifi from working at all. Would you be kind enough to let me know how? sorry - complete newbie here.
francomur99: thanks for pointing that out buddie. I'll look into that too...
OK, well do you have the following key in your device?
HKLM\System\State\Hardware
WiFi = dword:00000001
Changing this to 0 removes the WiFi option from the default Windows Wireless Manager.
Does your device use the default Wireless Manager or do you have a 3rd party Manager?
Update: Hmm, that only works until you soft reset and if you have a separate WiFi manager, it can still turn it on. Well I can make you an application that will set this back to 0 after every soft reset and you can hide any WiFi managers from the control panel, but they will still exist in the \Windows directory.
The best way may be to create invalid entires for the WiFi driver. Do you have this entry in your registry?
HKLM\Software\Drivers\WLAN
AdapterName = ....
OK, well do you have the following key in your device?
HKLM\System\State\Hardware
WiFi = dword:00000001
Changing this to 0 removes the WiFi option from the default Windows Wireless Manager.
Does your device use the default Wireless Manager or do you have a 3rd party Manager?
Update: Hmm, that only works until you soft reset and if you have a separate WiFi manager, it can still turn it on. Well I can make you an application that will set this back to 0 after every soft reset and you can hide any WiFi managers from the control panel, but they will still exist in the \Windows directory.
The best way may be to create invalid entires for the WiFi driver. Do you have this entry in your registry?
HKLM\Software\Drivers\WLAN
AdapterName = ....
Hi Trueg,
Thanks for the tip. Yes, you're advice has removed the WLAN display from the comm manager. However, I do not have the HKLM\Software\Drivers|WLAN entry.
Infact, under HKLM\Software, there is no Driver folder. There is a HKLM\Driver folder however this doesn't contain a WLAN subdirectory.
Any ideas?
Schaps Advanced Config allows you to edit the com manager. You could easily remove the wifi toggle from there, but it would still be fairly easy to work around if you wanted to turn the wifi on. Maybe someone else could tell you how to remove it from the settings menu.
Sorry alan303487, what is your status with this?
hi trueg
I haven't been able to move forward with this since the post on 16th April 2010 11:01.
i.e. the wifi connectino from the comm manager isn't showing, but I can still connect via windows menus.
would still appreciate any advice - so far, it seems that cooking my own ROM is the only other method thats been suggested.
still would appreciate your help trueg. Any ideas?
thanks mate.
OK, well how would you like to proceed? Would you like to try and hide all of the options that will allow WiFi to be turned back on, or disable WiFi permanently?
Also, what do you have listed under HKEY_LOCAL_MACHINE\Comm\?
Example: the WiFi driver on my HTC Touch Pro is
[HKEY_LOCAL_MACHINE\Comm\TNETW1251]
hi trueg,
thanks for helping..
well, either of the options would do - depends on the complexity of the method involved.
regarding what listed under HKEY_LOCAL_MACHINE\Comm\
there are many subfolders - below is a selection.
AFD
Application Download
AxyncMac
AsyncMac1
BCMSD
BCMSD1
BTCEPAN..
....
connection sharing
..
connMfr
CXPort
..
Devices
...
Wifi
Thanks for your help.
Alan
hi trueg
any ideas? any leads?
thanks buddy
alan

GPS - Location Problem

Hello Guys,
I would like your help with an issue that i have with my LG G2!
I have updated to version 4.4.2 android version without problems (no root phone).
The problem that i face has to do with GPS. Generally, i have location settings off in order not to consume battery etc.
When i want to use my Navigation Software i enable location services but the phone need restart in order to work!
Even if i have enable the location the phone don't recognize the GPS as turned on and need to be restarted. The it works normally.
Can anyone help me how i can solve this problem?
Have i to put always on location services? In the past i didn't have this problem. Is this a hardware problem?
Thanks a lot,

How to permanently turn on wifi and location so that nobody can turn it off?

My purpose is to make sure that if someone steals my phone, they can't turn off both wifi and location accessibility. So that I can find it and trace the phone. Because you know, a lot of techies and apps tell us that you can find your phone if it is connected to the internet and its location is turned on. Now, all needed to do on the part of the thief is to turn off the wifi and location. Is there any way we can turn on wifi and location in android secretly and only the owner of the phone has the access to turn them off? My phone is Samsung Galaxy Note 2. Thank you so much in advance.
Hmm, since the android os is very much similar to the linux os, I'd make a script that enables wifi even when you switch it off. Ie: You switch off wifi, the script switches it back on. Now, the key thing here is that android is similar to linux, and that means we can run sh scripts, right? But the only issue I see is that we will have to somewhat make the script run in the background all the time, or make an "if" statement that says "if wifi is off, switch it back on" or something similar, but I can't do that. Instead, I will be guiding you to make the .sh script.
First of all, get the idea of how the wifi works, what files it uses and what stages happen when you connect to a wifi, which you can check out here.
Then, based on that, start scripting the .sh file. Guides on how to do this, can be checked out by a quick google.
Alternative: Ask someone on stackoverflow or something similar to do it for ya hehe
Try to use some tasker like MacroDroid and setup trigger to disable wifi and action to enable wifi, same with GPS... And disable tasker notification from notification bar.
dns43 said:
Try to use some tasker like MacroDroid and setup trigger to disable wifi and action to enable wifi, same with GPS... And disable tasker notification from notification bar.
Click to expand...
Click to collapse
Thank you so much, seems simple to implement....
Hizzur's Answer
i don't know. sorry!

Automatic Hotspot

Has anyone been able to get any program to automatically enable hotspot (for example, when bluetooth connects turn on hotspot)? I used to use Tasker on my Note 7 (without root and with Secure Settings), but now Tasker fails to enable hotspot on my S8+
Every program I've tried in the Play Store fails to enable hotspot...it is like Samsung has done something that to keep programs such as Tasker and Automate from working...
It fails because the US branded versions of the phone changed the normal way to enable the hotspot function in order to perform additional entitlement checks with some US carriers before enabling the hotspot. This is why Tasker and other programs fail.
On the unlocked, unbranded version of the S8+ (which doesn't run the carrier software and doesn't run those checks), it works fine.
The same goes to the pixel, only there it depends on the SIM you insert into the phone. If you insert a VZW or ATT SIM, the Tasker process will fail. If you use a T-Mobile SIM in the pixel, it will work because T-Mobile doesn't run those entitlement checks.
When I used an international SIM in the Pixel, it also worked.
I hope this helps.
This is the error I get with tasker, is this what you see?
Ugh...I figured it was something to do with that. That's like knowing cancer is the cause of that pain in your gut...good to know what it is, still sux.
I have been able to get Tasker and AutoInput to activate the hotspot fairly reliably when I connect to bluetooth. It actually works very well, even with the screen off. Guess it'll do.
Care to explain what you are doing there? Is autoinput disabling mobile data, enabling hotspot then re-enabling mobile data?
Auto Enable Hotspot with Tasker on S-8
I got the automatic hotspot worked out using Tasker and AutoInput. I tried several ways that were hit or miss. I finally figured it out and can now activate my Hotspot reliably when my phone connects to bluetooth.
If anyone is interested, here is the export. You will need AutoInput from the Play store, and Tasker. Root is not necessary. It is probably a pretty clumsy way of doing it, but it works.
Simply copy the Hotspot Enable XML file to your Tasker Configs folder. Then Tasker>>3-dot menu>>Data>>Restore>>browse to file
Thanks I'll try this. I always used tasker before but obviously w/o Autoinput.
Dave
No dice for me. Aside from autoinput and tasker did you have to install anything else? I did enable the autoinput accessibility service. I've included screenshots of what I get when I try to run the task and also when I click on any one line of the task. When I click to install what it says to it says it is just takes me to auto input in playstore which is already installed. Is there somewhere else I need to enable this auto input plugin?
It also seems I had to install secure settings which I did to no avail.
Thanks much
Dave
TT_Vert said:
No dice for me. Aside from autoinput and tasker did you have to install anything else? I did enable the autoinput accessibility service. I've included screenshots of what I get when I try to run the task and also when I click on any one line of the task. When I click to install what it says to it says it is just takes me to auto input in playstore which is already installed. Is there somewhere else I need to enable this auto input plugin?
It also seems I had to install secure settings which I did to no avail.
Thanks much
Dave
Click to expand...
Click to collapse
Sorry Dave, I haven't been back on.
It looks like you need to install "Secure Settings" from the play store. It is an add-on to Tasker. It should work after that.
So yes, you need Tasker, Secure Settings, and AutoInput. You could honestly probably do without the first command in Tasker (the one that needs Secure Settings...it only turns the screen on).
I tried again removing that first line and every single action if I click on it I get the error in the picture below. I try to manually run it in tasker it just sits at the first task. How did you create this exactly?
Btw, if I click to install it just brings me to autoinput I the play store which says it's installed.
Any help pinetreehater?
Well i ended up having my phone die and got a new one from samsung. Same issue I had w/ the other one. There has to be some other step involved that I'm missing here.
Any luck yet?
Sort of working
I downloaded and paid for AutoInput. The script is mostly working. But it stops at the Hotspot setting screen and never seems to turn it on.
Any ideas?
Apologies for necroposting, but I thought this might help future people. The only issue I can think is that you need to make sure you've activated Autoinput's trial period OR purchased the full version, do that and the supplied script works perfectly.
so I'm using the s9, figured the process would be close enough. first Trigonous' fix worked for me mostly, except I still have to unlock my phone before it finishes turning on hotspot. Also, for any totally novice users coming in to try to do this, I had a fun time at first locating the Tasker Configs file, if you create a back up in tasker it will create the file for you so you can copy the .xml to the proper place.
Most important part of this post, to me at least, is there a way to get it to by pass my unlock and just do it or do I have to pull out my phone still and unlock it for it to finish the task?
snaggle2thtiger said:
Most important part of this post, to me at least, is there a way to get it to by pass my unlock and just do it or do I have to pull out my phone still and unlock it for it to finish the task?
Click to expand...
Click to collapse
I'm no expert, but why not set your cars Bluetooth as a trusted device, therefore unlocking your phone when connected, then maybe a brief delay after connection allow it to continue?
Thank you
pinetreehater said:
I got the automatic hotspot worked out using Tasker and AutoInput. I tried several ways that were hit or miss. I finally figured it out and can now activate my Hotspot reliably when my phone connects to bluetooth.
If anyone is interested, here is the export. You will need AutoInput from the Play store, and Tasker. Root is not necessary. It is probably a pretty clumsy way of doing it, but it works.
Simply copy the Hotspot Enable XML file to your Tasker Configs folder. Then Tasker>>3-dot menu>>Data>>Restore>>browse to file
Click to expand...
Click to collapse
Thanks man, saved me some time, it works perfectly. I installed AutoInput and was moving in the same direction.

automatically activate wifi?

Hello
i use an app to automatically activate wifi when my screen is on and i'm home and to disable wifi when my screen is off it worked fine on my old phone and even on my oneplus 6t with android 10. but on my x50 pro it does not work automatically each time a popup asks me manually: the application requires authorization: activate or deactivate wifi: authorize or refuse.
how to delete this request and make it automatic (my phone is root)
I don't have a solution but i have the same problem.
My only 2 cents is that it seems to be mainly linked to the chinese ROM being very "harsh" in blocking everything. Any similar issues i had were solved by using the EU ROM, even with all the other implications of that right now.
i have the eu room and it's the same thing
I was gonna use Tasker to do a similar thing. But that also has that.
There is an option in Developer Options called "Disable Permission Monitoring". Automatic switching of wifi/bluetooth works with this option
Warinator said:
There is an option in Developer Options called "Disable Permission Monitoring". Automatic switching of wifi/bluetooth works with this option
Click to expand...
Click to collapse
that's the solution! thanks
I was wondering what that option was about (it doesn't disable permissions entirely, if someone thought that, i wondered ). Good catch!

Categories

Resources