Closed mukeshkabra closed 8 years ago
@jpkrause :Can you help me for this
Hello, can you share with me the exact command you are running (obfuscating any private info) as well as the output of logcat from your device when you execute that command? Also the manufacturer, model and OS version of the device you are trying this on. Thanks.
Hello @jpkrause I am running following command in S3 adb -d shell am start -n tk.elevenk.proxysetter/.MainActivity -e host 192.168.12.128 -e port 8888 -e ssid mobile-test
Mobile already connected to wifi
@mukeshkabra Is that wifi network open or is it password protected? Also, can you give me the output of running adb logcat
after you execute the proxy command?
it is password protected , and wifi is already connected to wifi
If it is password protected you should add the password to the command like so adb -d shell am start -n tk.elevenk.proxysetter/.MainActivity -e host 192.168.12.128 -e port 8888 -e ssid mobile-test -e key <password>
you can also try adding the flag -e reset-wifi true
to see if that helps
Hello @jpkrause I have tried using password and it is working fine, but is there any way to set proxy without setting password,
Unfortunately, no. With the way that proxy changes are made, it is necessary to have all the details required to connect to the access point. If the access point were open, it would not require a password.
you are awesome, man!!! @jpkrause
Not sure what I did, but thanks, @yanqian! 😄
$ adb
shell
am start
-n tk.elevenk.proxysetter/.MainActivity
-e host 192.168.0.2
-e port 8888
-e ssid Home
-e key your_password_here
-e reset-wifi true
NOT work for me
Error resetting wifi
java.lang.RuntimeException: Unable to add or update network configuration for Home
at tk.elevenk.proxysetter.ProxyChangeExecutor.connectToWifiNetwork(ProxyChangeExecutor.java:282)
at tk.elevenk.proxysetter.ProxyChangeExecutor.clearAndReconnectWifi(ProxyChangeExecutor.java:232)
at tk.elevenk.proxysetter.ProxyChangeExecutor.getAPLNetworkId(ProxyChangeExecutor.java:115)
at tk.elevenk.proxysetter.ProxyChangeExecutor.executeChange(ProxyChangeExecutor.java:95)
at tk.elevenk.proxysetter.ProxyChangeAsync.doInBackground(ProxyChangeAsync.java:62)
at tk.elevenk.proxysetter.ProxyChangeAsync.doInBackground(ProxyChangeAsync.java:33)
at android.os.AsyncTask$3.call(AsyncTask.java:394)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
{}
Error getting network ID. Given Network may not exist. Aborting.
Error: proxy not set. Try clearing the proxy setting manually first. Error Code: 4
A resource failed to call release.
Hm yeah I don't know, I haven't touched this in years. My guess is that it's a permissions thing. Try making sure the permissions are allowed on the app in the Android settings. Otherwise, I have no clue, I'm not maintaining this repo at all. You're welcome to submit a pull request with a fix if you figure it out.
Hello
I am not able to set proxy to real device, can you look this issue