manadream / AndroidProxySetter

An android app that sets the proxy settings for a wifi access point by using adb
GNU General Public License v3.0
477 stars 96 forks source link

Unable to accept SSID with spaces #5

Closed zerrandrew21 closed 8 years ago

zerrandrew21 commented 9 years ago

I was using your tool today to setup a proxy for a Fire TV. Everything seems to work up until the point of registering the SSID. It seems that if there are spaces in the SSID the program does not correctly register the SSID. We've used single quotes as well as double quotes with nothing working as long as there is a space involved.

manadream commented 9 years ago

Thanks for reporting this. I'll take a look and get a fix in for you as soon as possible.

manadream commented 9 years ago

@zerrandrew21 So the problem I encountered with using an SSID that has a space in it is that the intent passing mechanism of adb will not pass in a space unless it is properly formatted. To correctly pass an SSID with a space using the command line on bash (OSX or Linux) you need to espace the space AND surround it with quotations like so: adb shell am start -n tk.elevenk.proxysetter/.MainActivity -e host 192.168.56.1 -e port 8080 -e ssid "Public\ Wifi" -e reset-wifi true

What is the command and shell that you are using to execute this? Can you post your adb logs from when you execute this command?

zerrandrew21 commented 9 years ago

I'd love to post logs if I could but unfortunately dealing with proprietary information. Logs would probably get me fired, heh. I can tell you though that we used the correct commands. We just didn't escape the spaces. We ended up renaming the network to utilize it so I'll have to set up a test network at home to test it out. If I run into any problems there I'll be sure to get you everything needed. On 23 Jun 2015 14:14, "John" notifications@github.com wrote:

@zerrandrew21 https://github.com/zerrandrew21 So the problem I encountered with using an SSID that has a space in it is that the intent passing mechanism of adb will not pass in a space unless it is properly formatted. To correctly pass an SSID with a space using the command line on bash (OSX or Linux) you need to espace the space AND surround it with quotations like so: adb shell am start -n tk.elevenk.proxysetter/.MainActivity -e host 192.168.56.1 -e port 8080 -e ssid "Public\ Wifi" -e reset-wifi true

What is the command and shell that you are using to execute this? Can you post your adb logs from when you execute this command?

— Reply to this email directly or view it on GitHub https://github.com/jpkrause/AndroidProxySetter/issues/5#issuecomment-114629418 .

manadream commented 9 years ago

Of course, I understand. To filter out all messages except for the ones made by this tool you can run adb logcat -s ProxySetterApp I have a feeling it may have been problematic because of the lack of escaped spaces, but I may be wrong. I'll leave this open until we determine the problem.

manadream commented 8 years ago

@zerrandrew21 is this still a problem for you?

manadream commented 8 years ago

Closing as expected behavior since spaces need to be escaped on the command line