[Nook Color General] pdonner:
dealing with location

archongtv,

I'll test the code for you if I can.

Everyone else having problems,

Couple of notes to the thread:

1. My rooted nook is now running maps with my position located on it. I edited the settings.db file to set it to "network" rather than "gps" and that seemed to do the trick. I had previously replaced the NetworkLocation.apk file posted on this thread as well as editing the file: /data/data/com.android.settings/shared_prefs/com.android.settings_preferences.xml

I never bothered replacing settings.apk. None of this worked for me to make the location pointer work on maps. Perhaps there are different problems and it helped some of you but not me. The pointer started working when I edited the settings.db file located in /data/data/com.android.providers.settings/databases/settings.db

SEE WAY BELOW FOR HOW TO EDIT THIS FILE.

2. I have a Verizon Droid running 2.2 Froyo (rooted also) and it works fine with maps. I also use a wireless (wifi) tether program (android-wifi-tether.googlecode.com - Version 2.0-pre7). When I have the NookColor configured in the settings.db to utilize "network" (or wifi) vs "gps" I am able to get the location pointer to appear on maps in my nookcolor while using the droid as a tether (and while driving my car - i.e. not near any wifi network that I can get into). In other words the droid is updating my position (I use the GPS setting and turn off the wifi on the Droid). The location pointer also updates periodically (4-5 mins - very slowly) but it does work. I suspect there is a setting somewhere that controls this update period and I will have to go look for it if no one knows where to find it or how to make this happen.

Hope this helps someone other than myself ;-)

pdonner

HOW TO EDIT THE SETTINGS.DB FILE

I will not explain how to get the file off of your NC, back onto your NC, and how to edit it (use nano or vi or something) because you can find all this stuff on the NC portal. You can glean this from some of the commands listed below anyhow. This process is done on OSX Snow Leopard.

--- pull the file "settings.db" to your computer...

mycomputer:~ me$ adb pull /data/data/com.android.providers.settings/databases/settings.db

--- enter sqlite3 (database manager) to edit the .db file...

--- you can execute .help to see a list of commands with brief explanation...

me@mycomputer:~/work_osx/_work-files$ sqlite3 settings.db

SQLite version 3.5.9

Enter ".help" for instructions

sqlite>

--- you can dump the contents of the table "secure" within settings.db...

sqlite> .dump secure

BEGIN TRANSACTION;

CREATE TABLE secure (_id INTEGER PRIMARY KEY AUTOINCREMENT,name TEXT UNIQUE ON CONFLICT REPLACE,value TEXT);

INSERT INTO "secure" VALUES(2,'bluetooth_on','0');

INSERT INTO "secure" VALUES(3,'data_roaming','1');

INSERT INTO "secure" VALUES(6,'assisted_gps_enabled','1');

INSERT INTO "secure" VALUES(7,'network_preference','1');

INSERT INTO "secure" VALUES(8,'usb_mass_storage_enabled','1');

INSERT INTO "secure" VALUES(11,'wifi_networks_available_notification_on','1');

INSERT INTO "secure" VALUES(12,'preferred_network_mode','0');

INSERT INTO "secure" VALUES(13,'cdma_cell_broadcast_sms','1');

INSERT INTO "secure" VALUES(14,'preferred_cdma_subscription','1');

INSERT INTO "secure" VALUES(16,'backup_enabled','0');

INSERT INTO "secure" VALUES(17,'backup_transport','');

INSERT INTO "secure" VALUES(18,'wifi_max_restart_supplicant_attempts','3');

INSERT INTO "secure" VALUES(28,'enabled_input_methods','com.android.inputmethod.latin/.LatinIME:com.android.inputmethod.gbltn/.LatinIME');

INSERT INTO "secure" VALUES(32,'logging_id2','*****************');

INSERT INTO "secure" VALUES(33,'logging_id','*****************');

INSERT INTO "secure" VALUES(34,'use_location','1');

INSERT INTO "secure" VALUES(60,'device_provisioned','1');

INSERT INTO "secure" VALUES(74,'location_providers_allowed','gps');

INSERT INTO "secure" VALUES(174,'install_non_market_apps','1');

INSERT INTO "secure" VALUES(191,'mock_location','0');

INSERT INTO "secure" VALUES(206,'wifi_on','1');

INSERT INTO "secure" VALUES(207,'default_input_method','com.android.inputmethod.latin/.LatinIME');

INSERT INTO "secure" VALUES(208,'adb_enabled','1');

INSERT INTO "secure" VALUES(209,'android_id','**************');

INSERT INTO "secure" VALUES(210,'checkin_kmsg_time','**************');

CREATE INDEX secureIndex1 ON secure (name);

COMMIT;

--- you are looking for this line...

INSERT INTO "secure" VALUES(74,'location_providers_allowed','gps');

--- you want to change "gps" to "network"...

sqlite> update secure set value="network" where name="location_providers_allowed";

sqlite> .dump secure

BEGIN TRANSACTION;

CREATE TABLE secure (_id INTEGER PRIMARY KEY AUTOINCREMENT,name TEXT UNIQUE ON CONFLICT REPLACE,value TEXT);

INSERT INTO "secure" VALUES(2,'bluetooth_on','0');

INSERT INTO "secure" VALUES(3,'data_roaming','1');

INSERT INTO "secure" VALUES(6,'assisted_gps_enabled','1');

INSERT INTO "secure" VALUES(7,'network_preference','1');

INSERT INTO "secure" VALUES(8,'usb_mass_storage_enabled','1');

INSERT INTO "secure" VALUES(11,'wifi_networks_available_notification_on','1');

INSERT INTO "secure" VALUES(12,'preferred_network_mode','0');

INSERT INTO "secure" VALUES(13,'cdma_cell_broadcast_sms','1');

INSERT INTO "secure" VALUES(14,'preferred_cdma_subscription','1');

INSERT INTO "secure" VALUES(16,'backup_enabled','0');

INSERT INTO "secure" VALUES(17,'backup_transport','');

INSERT INTO "secure" VALUES(18,'wifi_max_restart_supplicant_attempts','3');

INSERT INTO "secure" VALUES(28,'enabled_input_methods','com.android.inputmethod.latin/.LatinIME:com.android.inputmethod.gbltn/.LatinIME');

INSERT INTO "secure" VALUES(32,'logging_id2','*****************');

INSERT INTO "secure" VALUES(33,'logging_id','*****************');

INSERT INTO "secure" VALUES(34,'use_location','1');

INSERT INTO "secure" VALUES(60,'device_provisioned','1');

INSERT INTO "secure" VALUES(74,'location_providers_allowed','network');

INSERT INTO "secure" VALUES(174,'install_non_market_apps','1');

INSERT INTO "secure" VALUES(191,'mock_location','0');

INSERT INTO "secure" VALUES(206,'wifi_on','1');

INSERT INTO "secure" VALUES(207,'default_input_method','com.android.inputmethod.latin/.LatinIME');

INSERT INTO "secure" VALUES(208,'adb_enabled','1');

INSERT INTO "secure" VALUES(209,'android_id','**************');

INSERT INTO "secure" VALUES(210,'checkin_kmsg_time','**************');

CREATE INDEX secureIndex1 ON secure (name);

COMMIT;

.quit

OK I'LL BE NICE...

mycomputer:~ me$ adb pull /data/data/com.android.providers.settings/databases/settings.db ./settings.db.OLD

2555 KB/s (40960 bytes in 0.015s)

mycomputer:~ me$ ls -l settings.*

-rw-r--r-- 1 me staff 40960 Jan 11 00:42 settings.db <<-- NEW EDITED

-rw-r--r-- 1 me staff 40960 Jan 11 00:47 settings.db.OLD <<-- OLD SAVED

mycomputer:~ me$ adb push ./settings.db /data/data/com.android.providers.settings/databases/settings.db

3063 KB/s (40960 bytes in 0.013s)

mycomputer:~ me$ adb shell mount -o remount,ro /dev/block/mmcblk0p5 /system

mycomputer:~ me$