[Q] reconfiguring WIFI settings via terminal emulator - General Questions and Answers

Does anyone know if its possible to hack or re write the hardware code for the wifi using ADB shell or terminal emulator.
I have a droid x and it always has wifi trouble and ive tried everything possible i can do from the outside, have also re configured my router settings and sadly nothing helps so I am trying to see if its possible to do it internally by re configuring the code for it.

Related

wifi turns off in 10 secs

Today I turned on my phone's wireless and I noticed it turned off quickly. I thought it was odd so I turned it on again...same thing occurred. The third time I went into settings > wireless and network > wi-fi settings and enabled the wi-fi card from there. It shows it's scanning and then displays "unable to scan networks" along with turning off the wireless card. What the crap?!
I've rebooted the phone a couple of times - still nothing. I'm going to try removing the battery for 10-15 mins and try it again but I don't imagine that's going to fix anything. A quick google search has shown only a couple other people with a captivate are having this problem as well. I have to imagine there are more out there? Anyone have a clue. I'm really trying to avoid flashing back to stock.
Thanks in advance.
Did you go through the process of enabling Non-Market apps directly on the phone (editing settings.db) ?
If so, did you follow the chmod/chown commands?
max_warheads said:
Did you go through the process of enabling Non-Market apps directly on the phone (editing settings.db) ?
If so, did you follow the chmod/chown commands?
Click to expand...
Click to collapse
How would that affect WiFi??
If the system does not have proper write access to the file, and then a program says to the settings provider "turn on wifi", but the provider is not able to save that setting, it will later turn around and say "yeah... thats not supposed to be on." Which happens to coincide with an approximately 10 second window.
max_warheads said:
Did you go through the process of enabling Non-Market apps directly on the phone (editing settings.db) ?
If so, did you follow the chmod/chown commands?
Click to expand...
Click to collapse
Thanks for your help. However I did not edit settings.db. I've only rooted the phone. Haven't done any other manual edits to the system.
The only relevant thing I can think of that might be useful information is yesterday morning I installed wi-fi analyzer from the market on my phone. I'm 99% sure that my wi-fi was working after I installed it but then later in the day the problem started. Last night I un-installed wi-fi analyzer just to be safe.
Could this program have made some edits to Android that is causing the problem?
I found a similar problem in a google code forum from 2008. Individuals were using a G1 and had the same problem. They mentioned that it appears as if the wi-fi driver would load but then wouldn't be able to recognize the wireless card.
Hopefully some useful information to someone. Thanks again guys for taking a look.
sola fide said:
I found a similar problem in a google code forum from 2008. Individuals were using a G1 and had the same problem. They mentioned that it appears as if the wi-fi driver would load but then wouldn't be able to recognize the wireless card.
Hopefully some useful information to someone. Thanks again guys for taking a look.
Click to expand...
Click to collapse
Ran into the same issue, my issue was solved by fixing permissions as mentioned in the previous reply. How did you root your phone?
div3rg3nt said:
Ran into the same issue, my issue was solved by fixing permissions as mentioned in the previous reply. How did you root your phone?
Click to expand...
Click to collapse
Rooted the phone by using the update.zip file from the "Pimp My Captivate" thread.
How could I edit the permissions for the file to see if this remedy's the problem? I already have Terminal Emulator on my phone but I'm brand new to linux commands.
open Terminal Emulator and follow along
Code:
$ su
# cd /dbdata/databases/com.android.providers.settings/
# ls -l settings.db
You should see :
Code:
-rw-rw---- system system <snip> settings.db
max_warheads said:
open Terminal Emulator and follow along
Code:
$ su
# cd /dbdata/databases/com.android.providers.settings/
# ls -l settings.db
You should see :
Code:
-rw-rw---- system system <snip> settings.db
Click to expand...
Click to collapse
Ran the code you gave and it returned what you wrote above:
Code:
-rw-rw---- system system <snip> settings.db
I take it this means that settings.db is already set as writeable which means it's not my problem?
Yuppers... :/
Thanks for trying max.
What about the wireless config file? If this was messed up could it cause it the wireless card to act up like this? Could I simply delete this file and android would recreate it when I turned on the wireless card? Along with - where is it on the captivate?
Just a thought, my knowledge in this field is pretty low.
bumping this thread
Update: A factory reset fixed the problem. However when I restored from a Titanium backup the wireless immediately stopped working. Obviously there is something in the software/files that are corrupt causing this problem.
Anyone have any ideas of which file to attack?
BUMP
I am having this problem too. It is very annoying and I don't want to reflash the rom again. Has anyone else had this problem (and fixed it)?
americanbordercollie said:
BUMP
I am having this problem too. It is very annoying and I don't want to reflash the rom again. Has anyone else had this problem (and fixed it)?
Click to expand...
Click to collapse
ABC: Is there anything you installed before the problem happened that you think might be causing it? I'm guessing since you said "again" that this is the 2nd time or more you'll be flashing your phone if we don't find a fix.
I had to flash it with Odin because my phone bricked two weeks ago trying to enable non-market apps. I don't want to go through that process again.
I didn't install anything except the WiFinder app. It stopped working after a coworker asked me to turn on my wifi to test an app he got for his phone that turns it into a WiFi hotspot through its 3G data connection. The test was unsuccessful anyway, but that is irrelevant.
I had the problem of wifi not being able to scan for devices after 10 sec. This problem was only on my wifi at work.
I set the IP address, IP mack, gateway address and DNS servers statically and saved the config. This got me connected to the wifi at work. You could try this.
Just changed permissions on settings.db and now wifi seems to be working flawlessly without a need for static config.
americanbordercollie said:
I had to flash it with Odin because my phone bricked two weeks ago trying to enable non-market apps. I don't want to go through that process again.
I didn't install anything except the WiFinder app. It stopped working after a coworker asked me to turn on my wifi to test an app he got for his phone that turns it into a WiFi hotspot through its 3G data connection. The test was unsuccessful anyway, but that is irrelevant.
Click to expand...
Click to collapse
I'm curious if WiFinder altered a file that is causing the problem. Mine came just 30 minutes after installing Wifi Analyzer. Just hunch since both programs use the wireless card.
santblue said:
I had the problem of wifi not being able to scan for devices after 10 sec. This problem was only on my wifi at work.
I set the IP address, IP mack, gateway address and DNS servers statically and saved the config. This got me connected to the wifi at work. You could try this.
Just changed permissions on settings.db and now wifi seems to be working flawlessly without a need for static config.
Click to expand...
Click to collapse
It sounds like the same problem I had but I wasn't able to connect anywhere - At either one of my offices or at home. I tried to add in manual settings in the Android menu but it still didn't help.
I'll try messing with the settings.db file if this happens again and report back. I'm crossing my fingers that I never have this problem again but you never know. Hopefully we can get a couple of known working solutions posted on here since it sounds like there are plenty of people out there having this problem.

Android tablet kyros mid 7015 -connect to Adhoc aka WiFi tether

Ok eveyone Here is something that myself and adamdietrick
Worked on for a few hours. The tablet is not to great without the internet
So I been racking my brain trying to figure this out.
So what we need to do first is get a few programs from the market place
The programs you will need are:
HydTech's adhoc wifi <-----Install it onto your phone cost like $.99
This program you might want to test without it first.I seem to be able to kill
the app on my phone and still connect just fine.
WiFi Tether <-----Tested it with this one others might work not sure.
For the purpose of making it easy program on your phone the SSID as
androidtether with the key being 0123456789012
There is a way to edit this but I want to keep it simple.
Next on your Tablet you will need the to install a program called gscript.
This is a free program from the market place.
Once you have done all this the next step is to download the zip file below
Extract the zip file and mount your sdcard on your tablet.
Inside the zip there is folder called gscript place this on the sdcard.
Inside the zip there is 5 files.The adhoc.sh and normal.sh have to stay within the gscript folder.
The other 3 files are named
wpa_supplicant.conf
wpa_supplicant.conf.adhoc
wpa_supplicant.conf.normal
These need to be pushed to /data/misc/wifi
I would recommend using droid explorer and then you can just paste them into
the correct directory.
Once you have this done then open gscript and click the menu button
choose add script The first one I named adhoc and then make sure that needs su is checked. Once this is done choose load file and choose the adhoc.sh file
click on save. Now Do the same steps over but this time when choosing load file choose normal.sh then click save.
Now on the desktop press and hold choose shortcuts and goto gscripts then choose one of the ones that you saved.Repeat this but choose the other one that you created.
One thing I have noticed about this is that it's more than likely best to turn the WiFi off when switching between the 2 types of networks. When switching I also noticed that sometimes it takes a little longer for it to connect to the networks.
Hope this works for everyone.
I'm not having any luck with this fix. I am using a Windows Mobile Phone Touch Pro 2 that has WIFI router installed on it. I noticed that you are using a 13 digit key "0123456789012" where as the windows mobile phone only allows for a 10 digit key with the default of "1234567890". I modified the wpa_supplicant.conf.adhoc to have just the "1234567890" key, but when I choose the adhoc script on the tablet, the wifi (androidtether connection) says obtaining ip address, and then eventually says unable to obtain IP. Is there a way to set a static IP in the WPA supplicant, or force this connection to work? Also I notices that network type is set to auto. My phone uses WEP. I wonder if this is the problem??? Is there a way to force the network type in whe wpa_supplicant.conf.adhoc to have a network type of WEP.
Any help you can provide would be appreciated!!!
By the way, I can tether just fine from any Windows laptop to my phone, so I know the phone is not the problem.
apr24991 said:
I'm not having any luck with this fix. I am using a Windows Mobile Phone Touch Pro 2 that has WIFI router installed on it. I noticed that you are using a 13 digit key "0123456789012" where as the windows mobile phone only allows for a 10 digit key with the default of "1234567890". I modified the wpa_supplicant.conf.adhoc to have just the "1234567890" key, but when I choose the adhoc script on the tablet, the wifi (androidtether connection) says obtaining ip address, and then eventually says unable to obtain IP. Is there a way to set a static IP in the WPA supplicant, or force this connection to work? Also I notices that network type is set to auto. My phone uses WEP. I wonder if this is the problem??? Is there a way to force the network type in whe wpa_supplicant.conf.adhoc to have a network type of WEP.
Any help you can provide would be appreciated!!!
By the way, I can tether just fine from any Windows laptop to my phone, so I know the phone is not the problem.
Click to expand...
Click to collapse
Not sure how much difference it will be for a windows mobile phone compared to android so it might have issues. I had this same issue before getting the
HydTech's adhoc wifi installed on my phone not sure what it does but was told to use it. I can kill it and still get it to connect.
Hi, this directory "/data/misc/wifi/" is on your SD card right?
I tryed on my MID7015.
It kept saying: stderr: /data/misc/wifi/wpa_supplicant.conf.
adhoc: No such file or directory
clmlo said:
Hi, this directory "/data/misc/wifi/" is on your SD card right?
I tryed on my MID7015.
It kept saying: stderr: /data/misc/wifi/wpa_supplicant.conf.
adhoc: No such file or directory
Click to expand...
Click to collapse
no this is a directory on the system.
the directory that needs to be on the sdcard is the gscript.
from the cmd prompt you have to go to the sdk
example === C:\android\android-sdk-windows\tools
then type
adb push wpa_supplicant.conf /data/misc/wifi
adb push wpa_supplicant.conf.adhoc /data/misc/wifi
adb push wpa_supplicant.conf.normal /data/misc/wifi
This should fix the issue
Sorry, I am new to this.. I just got my Coby today... How do you go to command pompt? I try to just drop the file on system using the explorer to /data/ and say I don't have enough permission.
I guess I have to install that SDK?
kyros
Ok I fallowed you guide to the T but I can not see my htc hero on my tablet. My laptop sees it but not my tablet. Help me out. I placed the files in the correct dirctories but no go. My tablet is rooted with z4root temp root a my apps that need root wotk fine, but i cant get this to work. Iam on Android 2.1 on both the tablet and my hero.
You know.. I gave up! After screwing around for hours... I lost my wifi on my pad. It say can not scan for wifi...
I was so freaked out! Finally I hold the Power button and the Home Button on power up. Then hit "Reset and erase all users data". I was managed to get my WiFi back....
Screw it! I can't freaking believe they don't have Ad-Hoc on android! I didn't know until I brought this thing!
I believe Android 2.2 support it? When or will we ever going to get this??? Or someone out there can made an application for this...... it will made our life easier!!
sal1ace said:
Ok I fallowed you guide to the T but I can not see my htc hero on my tablet. My laptop sees it but not my tablet. Help me out. I placed the files in the correct dirctories but no go. My tablet is rooted with z4root temp root a my apps that need root wotk fine, but i cant get this to work. Iam on Android 2.1 on both the tablet and my hero.
Click to expand...
Click to collapse
Ok so you did install Gscript and have both the adhoc.sh and normal.sh in the gscripts folder on the sdcard correct? If so then in the program gscripts
you added the scripts into there I am guessing. If this is the case then
You can do the shortcuts like I explained or you can open the gscript program and click either adhoc or normal. Also did you try it with the hydtech adhoc.
I can not find the HydTech's adhoc wifi in the market Place. I guess without that one the tiwlan.ini is going to be missing. Am I right? I just want ot tether from my IPHONE 3Gs to the COBY KYROS. Do I need the TIWLAN.INI ?
tether
I too would like to be able to tether it with my iphone i know i should have got a droi phone but we were already stuck with an atnt contract
on my tablet i don't have the misc or misc/wifi folders in the data folder...should i create them?
stardawg said:
on my tablet i don't have the misc or misc/wifi folders in the data folder...should i create them?
Click to expand...
Click to collapse
Your using the Coby Kyros 7015
havic said:
Your using the Coby Kyros 7015
Click to expand...
Click to collapse
I'm using a witstech a81e+ with froyo 2.2 1122 version
I tried using astro, es file explorer and andExplorer all with no luck creating the folder
i used z4root to root and add superuser
i have also installed su but don't know how to use it 8^/
stardawg said:
I'm using a witstech a81e+ with froyo 2.2 1122 version
I tried using astro, es file explorer and andExplorer all with no luck creating the folder
i used z4root to root and add superuser
i have also installed su but don't know how to use it 8^/
Click to expand...
Click to collapse
Try Root Explorer. It will show folders that other apps will not.
OK...this was a great learning experience, but without payoff
I rooted my device...gave gscript lite to run as su...copied the conf, adhoc and normal files to the /system/data/misc/wifi folder using adb push commands...modified the adhoc and normal files using droid explorer...and lost ability to connect to any wireless network
deleted the wpa_supplicant.conf file using adb shell and reconfigured my wireless router
thought..hmmm...maybe if i use the .conf file droid automagically created it will all work...bump bump bum...DOH!
deleted the wpa_supplicant.conf file using adb shell and reconfigured my wireless router
BACK WHERE I STARTED WITH NO ADHOC WIFI
Anyone having an issue with Droid Explorer not seeing your tablet? I even followed the steps Droid Explorer provides in the youtube video.
Edit* I was able to copy the files using Root Explorer, but now when clicking Load File in gscript it doesn't list any .sh files.
Edit #2* Okay, I didn't put the .sh files in the gscript folder that is why they didn't show up.
Edit #3* I think I'm just an idiot, but after everything is installed and now I try to turn on wi-fi, it turns on for a split second, then turns itself off.
stardawg said:
OK...this was a great learning experience, but without payoff
I rooted my device...gave gscript lite to run as su...copied the conf, adhoc and normal files to the /system/data/misc/wifi folder using adb push commands...modified the adhoc and normal files using droid explorer...and lost ability to connect to any wireless network
deleted the wpa_supplicant.conf file using adb shell and reconfigured my wireless router
thought..hmmm...maybe if i use the .conf file droid automagically created it will all work...bump bump bum...DOH!
deleted the wpa_supplicant.conf file using adb shell and reconfigured my wireless router
BACK WHERE I STARTED WITH NO ADHOC WIFI
Click to expand...
Click to collapse
Just wanted to let everyone know I got this working with WMWifiRouter. It appears my Media Net connection on the Kaiser was configured to use a proxy server (wish I had written down what was cause now its gone). Anyway...there is a setting in WMWifiRouter to enable proxy use. Checked that guy and off I went. Now I've cleared the proxy settings in both the Media Net configuration and the WMWifiRouter. It works...but drains the battery bad Anyone know how to tether a droid 2.2 tablet to a wm6.1 Kaiser on ATT network using a usb cable or bluetooth dun?
stardawg said:
Just wanted to let everyone know I got this working with WMWifiRouter. It appears my Media Net connection on the Kaiser was configured to use a proxy server (wish I had written down what was cause now its gone). Anyway...there is a setting in WMWifiRouter to enable proxy use. Checked that guy and off I went. Now I've cleared the proxy settings in both the Media Net configuration and the WMWifiRouter. It works...but drains the battery bad Anyone know how to tether a droid 2.2 tablet to a wm6.1 Kaiser on ATT network using a usb cable or bluetooth dun?
Click to expand...
Click to collapse
I've been using WmWiFiRouter, though I have a Touch Pro 2. I can't get this working at all. If I try connecting without modifications, it won't connect to IBSS (ad-hoc) connections. If I use the scripts above, it turns Wifi on, then right back off again, or errors in scanning. What did you do differently? Are you using a Coby MID7015?
bluedeer said:
I've been using WmWiFiRouter, though I have a Touch Pro 2. I can't get this working at all. If I try connecting without modifications, it won't connect to IBSS (ad-hoc) connections. If I use the scripts above, it turns Wifi on, then right back off again, or errors in scanning. What did you do differently? Are you using a Coby MID7015?
Click to expand...
Click to collapse
I am using a Witstech A81E running Android Froyo 2.2. Sorry if I've posted in the wrong forum
But I did use the scripts attached in the zip file in the original post to get mine working. You have to make sure to change the SSID to match your WMWifiRouter SSID. For testing, use the default "WMWifiRouter". Here is what my wpa_supplicant.conf.adhoc file looks like
ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi
update_config=1
ap_scan=2
network={
ssid="WMWifiRouter"
key_mgmt=NONE
mode=1
wep_key0=1234567890
priority=20
}
Click to expand...
Click to collapse
I also had to enable using a proxy in the WMWifiRouter configuration. You have to start up the 3G -> Wifi router first. Then select Options -> Configuration -> Advanced. Then select Profiles -> DNS -> Enable Proxy and set the Enable Domain Name Resolution Proxy setting to Enable.
That's what worked for me

May be off-topic: No connection in Emulator

Hi,
I'm posting this here because I know that at least some of you use the Android Emulator.
I am running into a problem with Emulator, where when it starts, it is showing no connection (no bars). I've run into this before, and in the past, the only thing that I've been able to do is to create a new emulator and start from scratch.
I've searched and searched for a solution, and it seems like this is a fairly common problem, but I haven't found a real solution to getting the connection in the emulator working again.
So, I was wondering: For those of you who do use the emulator, have you found a way to re-enable the connection in the emulator when it starts and doesn't have a connection?
Thanks,
Jim

WLAN MAC Spoofing

I am running CM9 on a Samsung t679 and was attempting to make changes to the actual WLAN MACID via Terminal & Busybox. I have searched the forums for commands to make the changes however all I have tried have failed to make changes.
Does anyone know how to change/spoof the actual WLAN MACID to whatever I want? I have tried ifconfig and though it seems to execute the command without error in terminal/busybox when I check to see if the change has been made it only shows the actual MACID.
A permanent solution would be preferred however, a temp solution if ok to.
Are you sure you are running as root on the command line? Do 'id'.
Also, be sure to check what your wireless access point says what your MAC is. Do not trust the local device. It may say you are using one MAC, but actually still be using your hardware MAC address.
Ok. I was relying on the device to tell if the MACID was changed, I will check test again. Seems kinda dumb that if I was successful on changing the MACID that the device would show the original vs. current MACID.

[Q] sshd quit working on rooted Skyrocket

I have a rooted Skyrocket. About a year ago I used a QuickSSHd to ssh into my phone from my local wifi network. I haven't used the application in a while and somewhere in that time ATT did some sort of software update that made the windows less Apple-like but not much else. That may or may not have something to do with the fact that if I try to ssh in now the request just times out. I can get a shell through the usb cable using adb (or a terminal program), confirm that I still have root, and see the sshd process with ps | grep dropbear. I also know that something is trying to connect because if I don't launch the sshd and try to ssh in I just get "connection refused" and nmap -p 22 doesn't show anything open but after sshd is running the port shows as "22/tcp filtered SSH" but the ssh request just sits there until it times out. I've tried running dropbear manually through adb, an updated QuickSSHd, and another very nice looking Android application called "DropBear SSH Server" with the same results. I've also tried changing ports. I even make an /etc/shells file because that showed up on some really old how-to document.
When trying to ssh to the Skyrocket from a laptop Wireshark shows the requests going out repeatedly but no replies from the Skyrocket. Shark running on the Skyrocket shows nothing (although other wifi traffic does show up). As a diagnostic I tried sshing from the Skyrocket to my laptop over wifi and wireshark on the laptop shows traffic both ways but they never close the deal. It's as if something is intercepting any incoming ssh traffic on the Skyrocket.
For what it's worth I can ssh from the skyrocket to localhost or its own wifi IP address in an adb shell. It seems like some sort of firewall issue. Any ideas? Do I need a new busybox (whatever that is)? I really don't want to flash any major OS modifications, I just want to be able to ssh in and then start on the real project (trying to talk to an rtl-sdr dongle...)
Thanks!
Dave
c'mon guys, 169 reads and no ideas? Is this something weird with just my phone or are they all this way and everyone's given up?

Categories

Resources