[Q] settings.db sqlite3 editing issues - Nexus 4 Q&A, Help & Troubleshooting

EDIT 2: Repushed the updated settings.db file and all seemed to be working now. I had reflashed the CM rom first (but I didn't wipe data), I'm not sure if that fixed a conflict somewhere?
Either way, it's working with data now. If anyone knows what might have been going on, I'm all ears and would love to find out, but I'll keep looking around and see what might have been up
##########
Hi all,
I smashed my screen (and digitiser), and had just turned off mobile data before I dropped my phone. I know with a combo of DeskSMS, Pebble and Airdroid etc I will be able to use most of my phone until I can get it fixed. I've had lots of issues getting the sqlite3 binary on my phone, so I decided to pull my settings.db and edit it.
adb pull /data/data/com.android.providers.settings/databases/settings.db
I then used a sqlite3 editor to edit the global table and changed the mobile_data value from "0" to "1". I pushed it back on, rebooted and mobile data was on, but all my other settings appeared to have reset to default. Bluetooth state, brightness, volume etc. This was fine for using DeskSMS, but it killed my Pebble. It's also not the behaviour I would have expected.
What did I do wrong, and/or why was the rest of the DB values ignored, or changed when I pushed them back to the phone? I'm using CM 10.2, 16GB N4 and was using adb from twrp recovery (I hadn't authorised my laptop for adb before I broke the digitser).
Thanks
EDIT: On second thoughts, I think the fact the mobile data is working is due to it actually being on as a default. This would lead me to believe that by changing mobile data to "1" I am actually corrupting the settings.db and it's loading defaults and recreating it on boot. Is there any CM documentation on the possible states that mobile_data or "preferred_network_mode" can be? I can't seem to find that field in the aosp docs.

Related

[cm7] Wifi stuck on connecting..

HI, i had no problem with Wifi. Since last time I got to the hostel and have a weak access point I have a bug with Wifi : when I activate it, it says "connecting... ". But nothing happens, it doesn't list access point around me too.
I found a way to make it work: I uncheck Wifi, check airplane mode then check wifi again. It works but I have to do it every each boot or wifi deactivation..
Is there a parameters or cache file stocking the weak ap I was trying to connect when the bug appears at first?
Thank you
Problem not solved but changer: now it work but wifi is never activated at startup.. can't force it to auto activate. Strange...
Anyone else have this problem? I just started having it, first on Phiremod 6 and now just updated to 6.3 hoping for a fix, but no dice.
I have sent back 2 nooks to BN for exchange because of this issue. I didn't know doing the airplane mode thing would temporarily fix the issue. I even did the 8 hard reset and restore and the nook would get stuck on finding wifi window - turning on wifi but nothing would happen. My nook was manualnooted 1.2. Strange?
I'm on nightly-87, Dal's 1.2GHz OC Kernel 5/23, and I'm experiencing something very similar. I went from 7.0.2 to N87 without a hitch, but I immediately started to see the WiFi icon go gray and lose it's connection. I was forced to restart WiFi as a remedy. As of today I'm getting something closer to what you're talking about; when WiFi turns on, the nook will infinity cycle through: disconnected->connecting->disconnecting->scanning. I've wiped Cache, Delvik-cache many times to no avail. Also tried re-flashing N87 and the OC Kernel, which did not work. I'm still not able to connect to my home network(netgear, WPA). But, after enabling/disabling airplane mode, I was able to connect to my LG vortex and obtain the interbuttz.
The last time I did a fresh install was around N20 something. As far as possible causes to this erratic and ethereal bug, my money is on certain update paths for both the OS and Kernel having different remnants. Example: with 87 different experimental OS installs and, to a lesser degree, the three different stable OS installs. There are technically !90 different upgrade paths. Compounded by being paralleled by kernel installs, but I believe when a kernel is updated the former is completely replaced instead of merged. I'm not calling out the Dev's, it would be nearly impossible to foresee and head-off all of the permutations of merging 87+ releases.
I'm no expert, just my two-cents. I'm not really concerned about this as a long term bug. There are fine people hard at work, and unfortunately have far more pressing issues to contend with. It's a sad reality that community driven projects, notably the nook Color, rarely reach maturity or complete/efficient hardware-software integration before the allure and newness of a product wares off.
As a consumer of .rockbox, a Linux based OS for G5.5 ipods and below, Of which I've been using for years and years. And, I would say it's just now becoming 'perfect', even with it's lack of support for many peripheral devices. I'm long term with my gadgets.
I'm rambling now.
Hope this helps to narrow down symptoms and possible causes.
It seems that my problem is a known issue of cm7 (when you click airplane it stay on forever but the checkbox remains unchecked). Try a tool from market that shown me the airplane mode and unchecked it from here. Since I didn't reboot from that test I don't know if it's solved for now.
my NC on CM7 just stopped connecting too
I turned on my NC this morning and my WiFi no longer works either.
All of my hotspots say 'not in range'.
I tried all of the tools I have to turn off 'airplane' mode (just in case it was on)
but, nothing seems to get me 'out of the mode.
What can I try next?
Wifi miraculously auto-fixed itself, and then broke itself again
fulko said:
I turned on my NC this morning and my WiFi no longer works either.
All of my hotspots say 'not in range'.
I tried all of the tools I have to turn off 'airplane' mode (just in case it was on)
but, nothing seems to get me 'out of the mode.
What can I try next?
Click to expand...
Click to collapse
While researching potential solutions... CM7 auto-fixed itself after about 15 minutes.
I didn't touch it.
All of a sudden I heard the Gmail tool beep at me with new messages and the market with a few apps updates that were available.
Now it seems to be working fine.
I spoke too soon, I just powered off and on again to see if the problem was fixed
permanently, and its not... its back to the 'not working' state.
(I hate when that happens, because I don't know what caused it, and I don't know what fixed it!)
This happened (WiFi not hearing any APs) to me a few times with nightly 87, but hasn't happened since I upgraded to n94.
fulko said:
While researching potential solutions... CM7 auto-fixed itself after about 15 minutes.
I didn't touch it.
All of a sudden I heard the Gmail tool beep at me with new messages and the market with a few apps updates that were available.
Now it seems to be working fine.
I spoke too soon, I just powered off and on again to see if the problem was fixed
permanently, and its not... its back to the 'not working' state.
(I hate when that happens, because I don't know what caused it, and I don't know what fixed it!)
Click to expand...
Click to collapse
SAME! Bump.
Same issue.....latest nightly on VG SDcard solution. Never had a problem until recently. Was runnning 7.03(flawlessly) then suddenly started experiencing the issue, flashed the latest nightly (113)...worked for a bit, rebooted and now nada..... just sits at connecting..... then goes to disconnected. Cycles every couple of minutes.....
Any suggestions on what to look at?
**** Note ; WIFI works fine when I boot to EMMC (Nook 1.2) . So I do not believe this to be a hardware problem.
I was just looking for this issue also.
I was doing great with nightlies and the OC 6/18 kernal, this morning I updated to the Nightly 114, and I received no wifi connection on booting up.
So I did all the normal things (1. turn on/off the airplane mode - No change, 2. fixed permissions - no change, 3. restarted multiple time (aft all the prior changes) - no change) Ok I thought, I will go back to my previous nights backup (Nightly 113). But I still get no wifi. The widget says trying to connect, but none of my networks are showing up within range. I run wifi analyzer and I see NO networks (normally I would see about 5 to 7 of them).
So I begin stepping back, I reinstall the Nightly 113, with No OC, and while the wifi is off on bootup, once I 'turn it on' now I see my networks.
I'm cooking with gas now, so I install the OC 6/18 - No Wifi
So I install the OC 6/13 - Still no Wifi
Both times, the Nook boots up with the wifi 'off' so I turn it on, but no connection or sensitivity.
I again reflash the Nightly 113 only and while it again boots up with wifi 'off', I am able to turn it on and it actually sees my networks.
So strange, I am stuck without my OC kernal, but as least the nook works again.
Does anyone have an idea why this is happening to people?
Thanks
onclebob said:
It seems that my problem is a known issue of cm7 (when you click airplane it stay on forever but the checkbox remains unchecked). Try a tool from market that shown me the airplane mode and unchecked it from here. Since I didn't reboot from that test I don't know if it's solved for now.
Click to expand...
Click to collapse
The issue in the OP isn't related to the one you're talking about. Try deleting one or more of your remembered wifi access points with wifi on. Let it rescan and, if it's not some other issue, it should find your access points and connect.
Suffering this same issue as well on my Nook Color. I believe the problem lies under /data, and here's why. First, I made a backup of /data, and then wiped everything:
* I restored my device to factory 1.2: Wifi works
* I flashed CM7 nightly 113: Wifi works
* I flashed dalingrin's OC'd 6/18 kernel: Wifi works
* I restored /data from my backup: Wifi is stuck at "Connecting..."
I thought it might have something to do with the settings.db file under /data/data/com.android.providers.settings/databases/, but when I deleted that file and rebooted, it made no difference with the Wifi problem.
Something under /data might have a problem with the latest CM7 builds, but I couldn't say what exactly. I'm not an expert at this stuff, so I can only share what I've observed and tried for myself.
Hi. I have the same problems with Wifi since this morning. Is there any other solution then turning on and off airplane mode? thx
Formatted /system and /cache, and wiped the Dalvick cache, then flashed only CM7 nightly 143.
The problem still exists. Wifi is stuck at "Connecting..." Has anyone found a solution to this? It's obviously something to do with a setting/file under /data, because if I format /data, Wifi works like normal. But when I restore my backed up /data, Wifi is stuck at "Connecting..."
I think I found a solution. This worked for me, so I hope it works for others.
Shortly after writing my previous post above, I decided to play around with my NookColor, to see if I could get the Wifi to work normally again. Here's what I did, which fixed the "stuck at connecting" problem for me:
1) Go to Settings > Wireless & networks > Wi-Fi settings
2) Check to enable Wi-Fi, if it's not already enabled
3) Click every wireless network in your list and choose "Forget"
4) Make sure every wireless network is forgotten
5) Check to disable Wi-Fi
6) Check to re-enable Wi-Fi
Instead of "Connecting..." I now see "Scanning" and it picks up the routers around me! I selected my router, and it connected! I am now able to browse the web, update my apps, and all seems to be working normally now!
You can also watch if airplane mode is really off using Android assistant:
https://market.android.com/details?id=com.advancedprocessmanager&feature=search_result
it helped me with this problem
flansuse said:
I think I found a solution. This worked for me, so I hope it works for others.
Shortly after writing my previous post above, I decided to play around with my NookColor, to see if I could get the Wifi to work normally again. Here's what I did, which fixed the "stuck at connecting" problem for me:
1) Go to Settings > Wireless & networks > Wi-Fi settings
2) Check to enable Wi-Fi, if it's not already enabled
3) Click every wireless network in your list and choose "Forget"
4) Make sure every wireless network is forgotten
5) Check to disable Wi-Fi
6) Check to re-enable Wi-Fi
Instead of "Connecting..." I now see "Scanning" and it picks up the routers around me! I selected my router, and it connected! I am now able to browse the web, update my apps, and all seems to be working normally now!
Click to expand...
Click to collapse
That worked for me, thanks a ton!
flansuse said:
I think I found a solution. This worked for me, so I hope it works for others.
Shortly after writing my previous post above, I decided to play around with my NookColor, to see if I could get the Wifi to work normally again. Here's what I did, which fixed the "stuck at connecting" problem for me:
1) Go to Settings > Wireless & networks > Wi-Fi settings
2) Check to enable Wi-Fi, if it's not already enabled
3) Click every wireless network in your list and choose "Forget"
4) Make sure every wireless network is forgotten
5) Check to disable Wi-Fi
6) Check to re-enable Wi-Fi
Instead of "Connecting..." I now see "Scanning" and it picks up the routers around me! I selected my router, and it connected! I am now able to browse the web, update my apps, and all seems to be working normally now!
Click to expand...
Click to collapse
Man, you really had my hopes up with this one. You're the first person I've seen say every remembered network needs to be forgotten. But I followed your steps exactly, and my NC still will not connect. It sees all wireless networks available. It knows which ones are open and which ones are secured. I can go so far as to enter the password and click Connect. It says "Obtaining IP address from...", then quickly flashes "Unsuccessful", then "Scanning...", then loops indefinitely. I even took your steps one step further and rebooted before turning WiFi back on. Still doesn't work.
This is the fourth time this has happened to me. And every time, the only way I've been able to fix it is to completely reinstall CM7. That's not a fix, that's a wrecking ball. I'm pretty desperate to find a fix because my NookColor has become a joke, almost unusable. Right when I get it to the point of enjoying it and getting it set up just the way I want it, this happens. And the damn thing is useless without WiFi.
I also installed the latest nightly build, which was from last night. Nothing.

[Q] [SOLVED] Wlan always enabled?

Hey guys,
did anyone notice, that after rooting and/or installing the google apps, the wlan is always enabled, even when you turn off the screen?
This is pretty annoying to me, because the battery usage is much higher.
With wlan disabled the kindle battery usage is pretty low. It uses near to no power while in standby but when the google apps are installed (and therefor wlan is always enable) i loose up to 10 - 20% battery over night.
Is there anything i can do about this? Is there a way to figure out what exactly keeps the wlan from shutting down?
Thx
You happen to find anything else about this? First I saw of it.
This is actually a good thing in my opinion...
Hey again,
teookie, yes i know, to one its a bug to the other a feature but i prefer the old behavior and save some battery.
And finally i found the root of my evil.
An unknown app changed the wifi sleep settings. Sadly amazon removed this option from the settings dialog so you have to change it by hand in the settings.db .
Have a look here:
http://forum.xda-developers.com/showthread.php?p=19676566#post19676566
In step 16. change the value to "0".
You can also change the value "wifi_idle_ms" (in the "secure" folder) to something lower e.g. "5000" (5 seconds), to disable wifi even faster.
Now everything works like before, the only missing thing is the app that changed it.

One weird WiFi issue - resolved

Hey, everyone! I thought I'd share my experience of a rather strange issue.
Having used several Android phones earlier, it was natural for me to restore the WiFi access points with Titanium Backup after installing CM10.1. The only problem with it was that something went wrong this time and my WiFi was draining battery much more than it should. After some testing, I found out that if WiFi had been enabled and then disabled, it would still keep a "suspend_backoff" wakelock in the kernel and therefore not put the phone in deep sleep. I thought this was a kernel issue, but after testing various kernels, this proved not to be the case. A temporary solution was to turn off WiFi and then reboot. Once having turned it on, the wakelock would always be present. Also, turning on WiFi took like 40 seconds each time, which seemed way to long.
So later, I figured I'd take a look at the contents of /data/misc/wifi. There was a file called p2p_supplicant.conf containing all the networks also included in the usual wpa_supplicant.conf. So I thought something may be wrong here and I made a backup of all the files and deleted the whole "wifi" folder so it could be regenerated by the OS after a reboot. True enough, this happened. Then I copy/pasted the network bits but not the settings from the old wpa_supplicant.conf to the new and empty one. Case solved.
It could have been caused by some WiFi fixer app that I tried earlier, but I'm not sure, since the symptoms existed even before that.
So my conclusion: When initializing, rooting and configuring a new phone, just edit the wpa_supplicant.conf manually but don't touch the parameters at the top unless you know exactly what you're doing. Paste your networks inside and push it back to /data/misc/wifi. Then set the correct permissions (0660) and ownership (system:wifi) - then reboot. Another thing, I used to include my networks in /system/etc/wifi/wpa_supplicant.conf, but it seems better to just leave that one alone, since there is trouble to be expected in case the two files have duplicate copies of the same networks.

Nexus 7 stuck at turning on wifi

Hi, yesterday I had my nexus 7 charging, when I checked after a couple of hours, I noticed it was fully charged, but the wifi icon was white and "empty" instead of blue and "full", so I went to disable the wifi and enable it again, but it got stucked at "turning on wifi".
Mine is on 4.2.1 and it's rooted, but with the google factory rom, and clockwork recovery. I reset the nexus, same issue, so I reset the nexus again and went to the bootloader and wiped the cache, got the same, so I did a factory reset and got to the setup screen, chose the language and it goes to select wifi and it's still stuck at turning wifi on, and I can pass that screen, is there a way to fix it? is my wifi radio toasted? I need help and I searched on the forums for something like this and I could not find anything, any help will be appreciated.
anyone? I need help with this.
Sounds more like a hardware problem than a software problem, although on a different device (android phone) I could get similar symptoms to appear after fooling around with certain WiFi tether apps. At least one difference between that case and this one though, was that I was able to always clear the problem up with a reboot.
You might be able to get more insight by looking at "dmesg" output or possibly a dumpstate report.
Turn WiFi off, reboot, capture dmesg output, turn WiFi on (fails), capture dmesg output again. (Point of the first capture is only to get approximate starting time of the WiFi fail time - the dmesg timestamps are in seconds since boot, not UTC or local TZ)
good luck

Anyone else with i9505G having this particular Bluetooth issue?

Folks whose devices fit the criteria of what I have (see attached screenshot of my "About Phone" screen), please read on. I say this only so I can figure out what is common between us to be having the following Bluetooth issue:
1) Bluetooth toggle switch is OFF.
2) You slide the switch to "on". The phone sits there for approximately 10-15 seconds, but Bluetooth doesn't come on at any point, eventually the toggle switch in settings slides back to OFF.
3) There is no setting/method in the device that will turn Bluetooth on.
From when I received the phone from Google Play store, the only thing I have done to it is root it following this method.
Clearly, something with the rooting process did this (I am also having one other issue, but that one is less annoying than this Bluetooth one). But everything in my phone points to me still having the stock ROM but just having root access.
If I can just see the common thread between my phone and others having the same issue, maybe I can figure it out.
I don't want to flash my ROM or start from scratch for the fear of making matters worst for myself; the device appears to be working fine otherwise.
If I am completely unable to fix this, my only hope is that the eventual release of 4.4 KitKat would fix it on its own (and probably break my root at that point, haha).
After searching high and low for an answer to this, I ended up doing a factory reset (Menu-->Settings-->Backup & Reset-->Factory Data Reset) and that resolved the issue (while wiping my phone).
Thanks to the Android OS, I let my phone charge overnight while on WiFi and by the morning all the apps were reinstalled and updated, including the OS itself. My Kernal/Baseband/Build versions are all back to the ones I had when I got the phone from the Google Store, so that's comforting.
Now, I just have to find the absolute least intrusive way to root my phone without any ROMs or system-level updates that could screw up stuff like Bluetooth or USB Connectivity for me.

Categories

Resources