yashsingh1/xdaforums huggingface dataset:
[G Tablet General] fosser2:
K, I'll try that quick

EDIT: still a no-go. Same error message. Give me one sec and I'll make sure that there is actually a /data folder on HC.

/data/misc
-bluetooth
-bluetoothd
-dhcp
-dhcpd
-keystore
-sensors
-systemkeys
-vpn
-wifi

I'm not sure if your program has the proper permissions to make a new folder in the /data/misc folder. There is not a GPS folder in there. Sorry thats all I got for now, I gotta work again :/
[G Tablet General] rajeevvp:
Check if you get something like this for /data/misc:

ls -ld /data/misc
drwxrwxr-x 12 1000 9998 1024 Jul 6 12:03 /data/misc/

Directory owner is UID 1000 (username "system") which is what system_server (the program that actually reads the /dev/ttyHS3 device) runs as. As you can see both the user "system" (UID 1000) and some GID 9998 (???) can write to that directory on my system. You should have something similar on HC for /data/misc: UID 1000 (or whatever system's UID is) and, at least, "drwx" permissions.

If the permissions aren't a problem, then remove the /system/lib/hw/gps.tegra.so* files using CWM and see if boot loop goes away.

adb shell mount /system
adb remount [I]# remount /system read-write[/I]
adb shell rm /system/lib/hw/gps.tegra.so*

Heck, it looks like I'll have to load one of the HC ROMs on my tablet after all (it actually belongs to my brother, and, while I have free access to it, I'd rather not brick the device and incur his wrath).
[G Tablet General] fosser2:
Here is what I get on HC:

drwxrwx--t 11 1000 9998 4096 Jul 5 19:33 /data/misc/

After running this command the bootloop does go away!

Haha the best thing about the G-tablet is that you can never brick it! Mine has been through hell and back and it still functions perfectly after tons of NVFLASHes and re-partitionings.
[G Tablet General] rajeevvp:
Native GPS on Honeycomb (GtabComb beta 2.1)

Screenshots of GPS working natively on Android Honeycomb (GtabComb beta 2.1).

Will post installable zip after some more tests and a few hours' sleep.
[G Tablet General] fosser2:
Dude...you're insane!!! I have no idea how you managed to pull that off, but there's gonna be a ton of happy people!!!
[G Tablet General] rajeevvp:
I've changed the gps-shim library (gps.tegra.so on GB and gps.harmony.so on HC--they're the same file; I've just named them differently to match files already present in /system/lib/hw) to only log to Android. I've disabled the creation of a separate log file because this could grow to be very large and also since you can use "adb logcat" for debugging even in severely messed-up situations.

I didn't make any other changes to the Froyo<->GB/HC compatibility library. But, I did change /system/bin/linker and /system/lib/libdl.so. I used the files from CM-7.1.0-RC1 and they work fine.

The default linker (the libdl.so files are the same on CM-7.1.0-RC1 and GtabComb-b2.1) in my Adam-derived HC ROM is slightly peculiar. It seems to have trouble loading shared libraries (eg., gps.xxx.so) which need other shared libraries (eg., libgps.so) when the program loading both of them (system_server) has a lot of files and/or shared libraries open at the same time.

The /system/bin/linker from the latest ASUS Transformer HC update (US_epad-user-8.4.4.5.zip) also works without any problems. I decided to go with the linker from CM because we have access to its source on github--in case we have to troubleshoot this issue further.

Test and report. The new installable zip files are attached to my post linked in the tutorial.
[G Tablet General] fosser2:
I just tried out the Honeycomb version on Flashback. It worked perfectly! GPS toggles when entering exiting maps and location is displayed correctly! The GPS icon shows properly at the bottom of the screen too! I also tried in a 3rd party app. that used GPS. It enabled perfectly as well. rajeevvp you amazed me with this one!

EDIT: tutorial updated!
[G Tablet General] rajeevvp:
This time around it was much easier to figure out what was wrong (although we still won't know precisely what until we can look at the source for NI Adam's HC /system/bin/linker) because I already had a lot of test programs written which helped localize the problem quickly.

BTW, the /system/bin/glgps program that is supplied with the HC ROMs is not useful on Harmony-based boards with the Linx NMEA/SiRF-outputting GPS module. I've determined that glgps is only for the BCM4751/BCM45711 GPS chips that seem to be present on nVidia's Ventana board which is the reference board for the Xoom, Transformer, etc. That Broadcom chip can also interface to a serial port, and the glgps program uses a proprietary protocol, Nokia's MEIF, I think, to talk to the chip. I saw binary packets, which weren't SiRF, being sent to /dev/ttyHS3 using the gps_fake program.

And, it's been a pleasure collaborating wih you too, Andrew. Thanks for starting the project.
[G Tablet General] fosser2:
It has been a pleasure working with you too rajeevvp!
[G Tablet General] lanegd01:
Thanks for all your work on this. I have watched with interest. About to try it on my T2
[G Tablet General] fosser2:
Please report back with your findings. I was really hoping someone from the Malata community would find this and attempt install of it on the T2. My guess is that it will work flawlessly on the T2 because it is so similar to the G-tab.
[G Tablet General] fosser2:
rajeevvp! I have no idea what went wrong but there now seems to be an issue... Basically I rebooted my tablet and for some reason the GPS just starts itself up. It will no longer turn off... The only way I can get it to turn off is to uncheck the box in settings that says "Use GPS satellites" When I check the box back on and enter Google maps the GPS does not initiate again (although maps does detect that the framework is there) So it does not say "please enable a location source" I have reinstalled Flashback and done a data-wipe (pretty much all the standard troubleshooting stuff); nothing seems to be working. I just really find it weird that something like this could just happen out of the blue and work fine beforehand... I'm stumped.

EDIT: Re-Installed latest version of BoS. GPS functioned like it was supposed to...I am wondering if the problem lies within the init.rc somehow. I'll have to look into it further.

EDIT2: Hmm very weird, the problem does lie within the ROM Flashback. I reinstalled that rom and does the same thing.

EDIT3: Attached is the init.rc file after your Honeycomb GPS patch has been applied. I did not see anything of your doing in it...
[G Tablet General] rajeevvp:
Nah, it's nothing to do with init.rc. Load a GB ROM (CM recommended) and see if the problem goes away. GB ROMs are stable. HC ROMs are still "experimental".

Only libgps.so can turn the GPS on and off (by writing to /sys/devices/platform/gps_control/enable). If the GPS is stuck at "on", it could mean a bug in the HC Java framework (more likely) or a bug in libgps.so (less likely). The gps.{tegra,harmony}.so is unlikely to have any bugs in it--its operation is pretty straight-forward.

Bugs in the first two, framework and libgps.so will be difficult to fix as we don't have the source for them. If it's a framework problem, we'll have to enlist herbert1's help. But, whatever the case I will need to see some log output. I was planning to remove the debug messages from the gps.*.so files, but, it looks like I'll have to leave them in, now.

You shouldn't see my commands in that init.rc--they're not needed. My update script checks to see if /dev/ttyHS3 is already mentioned in init.rc. If it is, it does nothing to that file.

The idea is that even if a user installs the zip multiple times, the zip should behave idempotently. Meaning, it should behave as if it was installed only once--it should not keep inserting the same commands again and again into /init.rc.

Read the /tmp/add-gps-perm.sh and /tmp/save-orig-files.sh scripts in {Gingerbread,Honeycomb}-GPS-fix-signed.zip.
[G Tablet General] ThatGeekGuy:
I've been away from the thread for a few weeks, looks like I came back at the perfect time. If the CM issue has been whipped, time to order parts for my tab. I'd been waiting on an implementation that would run on CM7, you guys truly rock. Donations forthcoming, thanks for sticking with this.
[G Tablet General] fosser2:
Just wondering where you are putting the log files for the GPS now. I checked "/data/misc/gps/gps-shim.log" and I could not find it there.
[G Tablet General] rajeevvp:
I'm no longer creating a separate file--it could get very large quickly. All log messages go only to the Android logging subsystem. You have to use logcat on the gTab or the alogcat app from Market to check logs now.

Since we have to fix the problem on HC Flashback, install it again and then do this:

1. Power off gTab.

2. Connect the gTab to your PC via USB and then issue this command and then just minimize the window--let it keep collecting the tablet's log:

C:\SOME\PATH> adb logcat > logcat.txt

3. Power on gTab.

This will start collecting logs right from the beginning.

When Maps causes problems, does going into Settings > Applications > All > Maps > Clear data/cache fix things for you?

And, how's the GPS doing so far in BoS?
[G Tablet General] fosser2:
The GPS is fine in BoS. It is working how it is supposed to. Flashback a5.4 is what seems to be causing the problem. I think that version a5.0 actually functions properly. Looking through the Flashback changelog, the only 2 things that I think could possibly cause this problem was either the ad-hoc supplement (probs not), or the framework changes in a5.3. I will post the logcat later today. I need some sleep right now... working 12hr. nights really sucks.

EDIT: Attached is the logcat

EDIT2: Maps really isn't causing any problems. Like everything is working like it is supposed to aside from the GPS starting up on boot. The GPS icon still shows when it locks and everything. Maps will work after it locks. When GPS is disabled then re-enabled through settings, GPS no longer works. The framework attempts to pull data from /dev/ttyHS3 but the gps_enable file still has a "0" written to it.
[G Tablet General] rajeevvp:
Hmm. Not seeing any messages at all from the gps-shim layer in that logcat output. Is the HC GPS fix applied?
[G Tablet General] fosser2:
yes it is. I will re-apply it and repost the logcat. The GPS does turn on as soon as the tablet reaches the home screen.
[G Tablet General] rajeevvp:
Yeah, the no log output part is my screw up. I'll fix it and update the files.

Done. Reflash. Log messages can be retrieved using logcat/alogcat.
[G Tablet General] fosser2:
Here you go. I checked and the gpsshim is in there for sure.
[G Tablet General] rajeevvp:
I'm seeing something new in the logs that I haven't seen so far in all the NMEA strings that you've sent me:

D/gps-shim( 1022): nmeasave_nmea = $PSRFTXT,CHNL: 12*73
D/gps-shim( 1022): PSRFTXT,Baud rate: 9600*66
D/gps-shim( 1022): PSRFTXT,Baud rate: 9600*66
D/gps-shim( 1022): PSRFTXT,Baud rate: 9600*66
D/gps-shim( 1022): PSRFTXT,Baud rate: 9600*66
D/gps-shim( 1022): PSRFTXT,Baud rate: 9600*66
D/gps-shim( 1022): PSRFTXT,Baud rate: 9600*66

The GPS seems to output a few of these proprietary NMEA sentences before it settles down to business.

The puzzling thing is that this $PSRFTXT string is not even mentioned in the Linx GPS module specs. Maybe undocumented SiRF strings? Not sure what's going on here or how relevant this could be though--gps parsers should ignore sentences they don't understand. How sure are you that the libgps.so from NI Adam's ROM that we're currently using is for this Linx RXM-GPS-SG module?

I'll modify the gps_fake program in the evening so that it will insert itself between libgps.so and the real device, /dev/ttyHS3, and then log all data that passes between those two. This way we can see what, if anything, is being send to the device by libgps.so.

In the meantime, you can get me some more logs. The last logcat output was good but, it didn't have any timestamps in it. Get me another logcat; this time with timestamps in them.

As before, power off tablet, connect cable, run the adb command below, then power on tablet. But, don't open Maps.

C:\> adb logcat -v time > logcat.txt

Instead, open a Terminal window on the gTablet, and type this in first thing:

gtablet$ log -t fosser2 "Tablet booted"

Then before opening Maps type this in:

gtablet$ log -t fosser2 "Going to start Maps"

And, after closing maps:

gtablet$ log -t fosser2 "Exited from Maps"

You can add more running commentary as needed.

This way I can see from the logs what happened and when.
[G Tablet General] fosser2:
Well here's where I will start things off. After a bit of searching the GPS chip in the NI is "SiRF GSC3f LPx (BGA package but installed on a separate board in the Adam)." Here is a link to the datasheet. So the answer to you question is no, the chip is not the same as the NI. The chips must function in a similar way though because the libgps.so is working for both...

I will update the new logcat in just a few minutes. Here is the updated logcat. The problem was that I think it cut off. Like I typed more in but it seems to have stopped midway through google maps. I have no idea why...
[G Tablet General] rajeevvp:
That is useful info. The programming specs for that chip would be even more useful--to compare with the RXM-GPS-SG.

That libgps.so works because both chips default to outputting (mostly standard) NMEA data at 9600,8,N,1.

I've looked through that log file and in the entire 12 min period of log collection there were only 2 valid Location fixes. Any idea why this is the case?

And, I can't see any obvious problems with either libgps.so or the gps-shim layer. It looks like they're doing what's commanded by the location framework code above them. The framework starts libgps.so up very early and then starts collecting data almost immediately. That's the only oddity. Apart from that, it all looks normal.

I'll send you a new zip file which will intercept even more GPS-related calls in the gps-shim layer. This should show us exactly when libgps was commanded to start or stop collecting data.
[G Tablet General] fosser2:
The reason that there were only 2 valid location fixes was because the logcat cut out the "fixes." I don't know why but it did not capture everything. I will re-run the logcat for you later today and see if I can't get a fix faster. About the framework starting up very early. This is what I have been saying. The GPS activates for a bit on boot. I guess I am trying to figure out why. I have noticed that after about 2 min it shuts back off and everything operates as normal.
[G Tablet General] rajeevvp:
You're right. Logcat doesn't log everything, esp. when a lot of output is continuously being sent to the logging facility.

I just blasted a 16MB file through logcat and only about 4 MB made it to the PC through my slow 1MBPS USB 1.1 connection. When you originally mentioned logcat missing data, I'd assumed that log messages toward the end of the session hadn't made it through. This, I know can often times happen.

I'm not able to reproduce the first on GtabComb beta 3.1--I may have to load Flashback to check it--but, try the attached zip file for another bug fix.

When you uncheck "Use GPS satellites" in Settings > Location & Security, the cleanup() function inside libgps.so is called, and that according to my tests, wedges it for some reason. So, I'm not calling that buggy cleanup() anymore. Now you can check and uncheck GPS to your heart's content. I've also removed a lot of unneeded log messages. This should help reduce the message drops in logcat.
[G Tablet General] fosser2:
Sorry I've taken so long to try this out. I'll get around to it on Saturday. Sorry for the wait.
[G Tablet General] gwynethgh:
On the hardware side of things...

To those contemplating doing the GPS hardware mod but haven't yet bought the parts I would suggest buying extra of the ferrite beads (L11). I either had a bad one, killed it during installation, or just plain mucked it up. I got no signal through it and when I was double checking the continuity after removal I lost it.

Also it is possible to remove the metal tab and mounting boss without removing the whole frame. Remove adjacent items like the camera and the funky aux circuit board (mounted on the amber plastic). Mask of all crevices. I used a bare hack saw blade and slowly cut the tab about 1/2 through. It then snapped off cleanly. The boss under it can be nibbled of with some pliers.

Our VOM probes were too fat to properly test the solder joints of the new hardware so we opened our sewing box, took out 2 straight pins, snipped the heads off, wrapped them to the probe tips with fine wire , secured that with shrink wrap and presto needle tipped probes.

Just some extra ideas/suggestions to use at your own risk.

Just booted up the GTab after installing the hardware and were pleased we didn't kill it. I will test the GPS later as I need the tablet to be ready for a trip soon. GPS will be nice but a plain GTab is more important right now.

Thanx to you all for this thread!

Gtab and VEGAN-Tab
[G Tablet General] gwynethgh:
Now a software question

Having installed the hardware and not killing the Gtab we want to see if the GPS hardware will get a lock. Where do we install/place the needed libgps.so?

We are running VEGAn-Tab. Thanx

Gwyneth

duh!

found it in /system/lib
[G Tablet General] fosser2:
Yep, sorry I do need to add that location to the tutorial. Also rajeevvp, I still haven't gotten around to testing that last version out yet. Sorry about the wait.
[G Tablet General] rajeevvp:
Maybe I should make a Froyo version of the flashable zip file as well...

EDIT: Done!

No hurry.
[G Tablet General] fosser2:
Quick update. I tried the newest honeycomb version gpsfix with Flashback a5.4. On boot, GPS still started up. Next I upgraded to Flashback a5.5 (newest). I first did a data wipe and everything. Then I installed GPS fix (newest). Basically it is still doing the exact same thing as before. On startup for like 2 min, the GPS will turn on randomly then shut back off. Maps turns on and off the GPS like it should. If I go into control panel and disable GPS and then re-enable it GPS will NOT turn back on (although the framework detects that it is enabled). So basically it is doing exactly what it did before. I will post a new logcat when I find more time. Sorry, life has just been really hectic lately.
[G Tablet General] rajeevvp:
Oh, rats! Looks like I'll have to load Flashback to check this out.

I'll have to replace their 1.2 kernel with a 1.1 one and then load it. I'll keep this job for the weekend, if you don't mind.
[G Tablet General] fosser2:
Totally fine with me. I've been really busy too. At the moment I am making a new logcat for you to look through. I will post it in a few minutes.

EDIT: Deleted... gps.conf seems to be tied to the startup issue...

EDIT2: On another note, unchecking GPS in settings then rechecking it still is not working properly. Once unchecked GPS is "dead" until a reboot.

EDIT3: Crap, I guess I lied about the first edit. It worked for a bit, but for some reason it started doing the same thing again... grrrr.
[G Tablet General] fosser2:
Alright, sorry it took me so long to post this. Below you will find the updated logcat.txt that is fully complete with everything that you previously asked for. I'm pretty sure that it is a full logcat and nothing was cut out. To do this logcat, I sat outside so I would get a lock extremely fast. I also had gps.conf edited properly to obtain the fastest fix using the program FasterFix from the Android Market. I'm pretty sure that GPS is still starting up on initial boot, but because I was sitting outside I didn't even see it start up. Basically what I have noticed with the GPS automatically starting on startup is that if the GPS locks right away it will turn back off quickly. If it does not lock it will continue to scan for satellites until it times out (I have no idea the "time-out time.") I am wondering if maybe this is programmed into Honeycomb to do this. Like if Google programmed it into the software so that after startup the GPS would only have to do a "warm" start if used again in the same session. (it was just a guess :p) Then again, maybe it is just a glitch. Also note that in the logcat I went through the GPS on/off bug in the settings. That should be towards the end of the logcat. Rajeevvp, I hope that this information can help you somewhat. Thanks again for all your help.

-Andrew

PS: I was wondering why you are using a 1.1 kernel for HC. Why can't you just use the 1.2 kernel?
[G Tablet General] rajeevvp:
I just looked at the log files and... you're using an old version of the Honeycomb GPS fix zip file. Get the latest test version from this post, then try that test again. Don't forget to logcat.
[G Tablet General] rajeevvp:
Because that would mean installing a 1.2 bootloader for no good reason.

I don't think gps.conf matters much for native GPSes like ours. That file is mostly useful for AGPS implementations-- as on phones.
[G Tablet General] fosser2:
Hmm, that's weird. I'll re-post when I can find a bit more time.
[G Tablet General] rajeevvp:
I can't make out anything unusual in that logcat--everything looks pretty normal. The GPS is started only because something is using it:

07-21 06:00:22.179 I/ActivityManager( 1024): Start proc com.google.android.apps.maps:NetworkLocationService for service com.google.android.apps.maps/com.google.android.location.internal.server.NetworkLocationService: pid=2318 uid=10024 gids={3003, 1015}
...
07-21 06:00:22.848 D/NlpVersionInfo( 2318): com.google.android.location not found
07-21 06:00:23.258 D/CountryDetectorService( 1024): The first listener is added

I'm going to call this something specific to Flashback (or whatever it was derived from).
[G Tablet General] fosser2:
Hmm, thats weird. Maybe I'll try sending a PM to the maker of Flashback.
[G Tablet General] sharshas:
I Have old Megallan Roadmate 700 which I'm not using any more, any chance that I can use the GPS module from GPS in GTablet? just exploring the possibility...
[G Tablet General] fosser2:
You would have to find a hardware breakdown of the device. Most likely you could get it to work, but since the pinouts on the chips would probably be different you would have the same problem John did and the GPS would not fit into the tablet.
[G Tablet General] BuckeyBall:
Hi there guys, MrGuy from TabletRoms again.

So - it turns out the GB/HC interface was the same huh? That's great news for us :) Since us Adam users never had a decent libgps.so even for froyo, I've gone ahead and written a GPS library for the Adam to use without the wrapper. Considering how similar the Gtab and Adam are, you could no doubt use almost the same module to get a native library for your device too (Perhaps it needs just a different tty port define?).

It's up to you whether you use it or not, but I thought if you wanted to customize things a bit - It'd give you a great start point!

Source code is at GitHub.
[G Tablet General] fosser2:
My guess is that the port is the same. I mean we did use the libgps.so file from the Adam to get ours working. Thats the funny thing, the Adam libgps.so file has actually worked very well on the G-Tablet. I was kind of wondering why Adam users were complaining about it...
[G Tablet General] BuckeyBall:
That's odd. Maybe you're using a libgps from a newer NI version that worked? As far as I can remember the libgps.so never actually 'locked' on the GPS signals. It always said it saw x satellites and occasionally returned a position - but never indicated that it ever had a locked signal. This means things like Google Navigation never worked.

Edit: Here's an example I found on youtube:

[YOUTUBE]OTAJzmeXmLQ[/YOUTUBE]
[G Tablet General] fosser2:
MrGuy, one last question for now. What is the difference between your HC gps for Adamcomb and rajeevvp's? I understand that you made the libgps.so file but was there any other difference?