Google recently released new vector cartography for their mobile maps. I'm curious if anyone here has any insight into the wire format they use for transmission? I've experimented with a few formats over the years, including bencode, bson, variants of WKT and WKB, and gzipped, limited-precision geojson which I've found to be the best trade-off in comprehensibility and file size. I'd love to know what Google decided on, but I don't have an Android device to test with.
-
You might revisit the release link above. this is from the website. "Update (12:47pm PST): Tweaked the description of the difference between image maps zoom levels."– Brad NesomCommented Dec 22, 2010 at 5:28
-
If you get the Android SDK, you can run a simulator that might help in your quest. However, the SDK license may prohibit such activity (read through it first), and the simulator might have problems running Maps (it's slow!!)– mwalkerCommented Dec 22, 2010 at 17:02
-
I did manage to get a couple HTTP responses from a TCP dump. Not a lot of sense in there, my binary unpacking skills are pretty soft.– Michal MigurskiCommented Dec 23, 2010 at 1:20
-
@MichalMigurski: Do you have any progress for this research?– giserCommented Mar 22, 2014 at 10:00
3 Answers
I couldn't make any sort of sense of the file once I saved to disk and I think Adam is on the right track with the decompiling idea.
I was able to decompile and poke around. Trying to sort through hundreds(maybe thousands) of classes named 'a','b','c' was too much for me, but I think the answer is in there for someone who knows their away around. I definitely prefer just using the app!
If you are inclined to unpack the dex
file out of the apk
file and convert it to a jar, you can open it with a java decompiler. This may or may not be legal depending on the software license or the country in which you live--although I couldn't find anything specifically about my app on my droid. Maybe it's legal text in using the android OS (in which case, I'll have to come back and delete part of this answer).
Not having actually looked, I'd guess something encoded using Protocol Buffers. Probably KML-ish, if I were to guess further.
-
1I was surprised to see a lot of POST requests instead of simple, dumb GETs. Can't figure out what's in them, they're all mystery application/binary blobs. Commented Dec 28, 2010 at 9:27
-
Does 'file' have anything to say about them if you save them to disk? Commented Dec 29, 2010 at 5:29
Probably the best way to get help with this question is to borrow and android device, choose a relatively sparse (mapping) area that the android device hasn't shown before, connect to the local wireless network, and use a sniffer to capture the network traffic as you view that area on the android device.
Post the image of the area you chose, and its coordinates so one can check out the surrounding area if needed, and post the network trace.
Those that have time to dissect it will have a better chance of giving you useful information if you hand them a good chunk of data as above.
Note that the mapping data is proprietary, and it's quite possible that they are encrypting it. If nothing else, encrypting it gives their users some sense of privacy since they would know that only google has their location information, and that it couldn't easily be found just by sniffing the network traffic.
If it is encrypted, it might be easier to start by disassembling or decompiling the Google Map Application.
-
1Here are three separate response blobs that I have seen, all recorded in the area around (44.990738, -93.270514): mike.teczno.com/img/gmaps-vector/unknown-response-1.bin, mike.teczno.com/img/gmaps-vector/unknown-response-2.bin, and mike.teczno.com/img/gmaps-vector/unknown-response-3.bin Commented Jan 5, 2011 at 19:19