yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] Brut.all:
Damn, now I know, why Java developers integrates all their deps into jar file ;-) I checked it and seems that you need ez_setup.py file somewhere in your python path (/usr/local/lib/python/2.6/dist-packages) and automatic installation should go smoothly. This time it's protobuf packager fault.

http://peak.telecommunity.com/dist/ez_setup.py

I will try to integrate deps into my app.

@jezzaaaa

Actually we need to change this forbid_outside_usa flag only. Rest of data changes are commented out, even choice of remote host doesn't matter.

And gzipped are directions/navi responses, not requests :-)

Whole process should be very simple:

1. Recognize type of HTTP request (I notice 5 types).

2. If it is route request, find flag and change it.

3. Proxy request to real servers and get response.

4. Respond with that response unchanged.

Unfortunately 1. and 2. are not as simple as checking some offsets, but it isn't a big problem - we could fully decode requests.
[G1 Android Development] jezzaaaa:
Thanks for the description/correction. Sorry, but I can't grok the structs in the python code. I have a perl proxy that will let me do whatever I need, but I can't decode the request. :( Perhaps I'll just sit back and let the experts do their thing.
[G1 Android Development] Brut.all:
I had to sit on it several hours to decode it ;-) And without protobufs support you have much longer way to do it.

But... you may just change C8 01 01 to C8 01 02 in request data and it should work. Requests are rather short, so it is unlikely that you accidentally change something else :-)

BTW. I've just successfully recompiled Maps.apk :-)
[G1 Android Development] jezzaaaa:
Hmmm. Always seems to be C8 01 02 for me already. Perhaps you got it back to front?

Seems that those 3 bytes are always at the end of the request payload. Shouldn't be hard to change those without false-positives.

Nice one! All the pieces are starting to fall into place.
[G1 Android Development] jezzaaaa:
Indeed it was. My substitution is:

$buf =~ s/\xc8\x01\x02/\xc8\x01\x01/ if $buf =~ /DriveAbout/;

I was wrong about "always at the end". Once I started matching anywhere in the request body, my phone started telling me where to go! Navigating! Awesome!

Now, just need to code up the proxy and we're done!
[G1 Android Development] Brut.all:
Eeee... C8 01 02 -> C8 01 01, sorry ;-)
[G1 Android Development] nurre:
Rather than going for a long living service, that may or may not be killed on low memory (yes, services on android does not mean runs 24/7, although it's close, and they will be restarted on memory free'd again), wouldn't just setting up a server that rewrites the requests, and modifying the gmaps application to point to a different host be a very simple and high performance option?
[G1 Android Development] Brut.all:
Aaaaaaa! I've hacked Maps, so it is working without any proxy!

First you need to uninstall maps from a device. Please refer to this thread: http://xdaforums.com/showthread.php?t=582656

Then install my Maps.apk and that's all! Go outside and enjoy! :-)

Reinstall will not work - you must uninstall & install.

Still you must create shortcut to navigation.

Now I'm waiting for C&D from Google ;-)

EDIT:

http://www.mediafire.com/file/lwmxtuzoden/Maps.apk
[G1 Android Development] canadiancow:
I had considered that, but then Google could just block that one host from accessing their services.

Anyway, Brut.all seems to have solved the issue without a proxy. After a few people test it, I'll update the first post in the thread.
[G1 Android Development] kittcoldfire:
Sorry I know this is a really dumb question, but so we're supposed to uninstall Maps, now you pointed at that other thread, should I install everything the way they're talking about there? Or how do I uninstall maps? And then how do I install your maps? Sorry to ask but i want to see if I can get it working (Canada)
[G1 Android Development] canadiancow:
I haven't checked out that thread, but I already had Navigation working (in the United States), and as a result of that process, my Maps app was stored in the /data/ partition, so I was able to uninstall it like any other app.

If it's on the system partition, you need to remount the partition, remove the apk, and remove the dex files for the app.
[G1 Android Development] rac2030:
First of all... awesome work ;-)

I have still to test it but just awesome

Maybe you just publish a patch file that the original maps.apk can be patched so you wouldn't have to distribute the app itself
[G1 Android Development] Jubei:
Respect to brut.all

+1

EDIT: The .apk doesnt install on my 4.2.4 cyanogenmod on G1.

Jubei$ adb install Maps.apk

1197 KB/s (2184499 bytes in 1.782s)

pkg: /data/local/tmp/Maps.apk

Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
[G1 Android Development] yamanote:
As I live in Hong Kong, I would like to install the modded version of Google Maps so that navigation works. However, I will be going to NYC in a few months and would like to reinstall the original version so it works there without any limitations. Can anyone tell me whether it's possible to uninstall the original Maps app after doing this mod? Thanks.
[G1 Android Development] bjtheone:
Short version: Yes

Long version: Two options... you could just install the non-rot version along side the original version and run whichever one you want, depending on your location... or you could install the modded root version, and then uninstall it, delete it out of the packages file, and reinstall the Google version for when you go to NYC.

I have gone back and forth between the Google version and the modded one, with no issues.
[G1 Android Development] yamanote:
I thought you could only install both at the same time if you were non-rooted?
[G1 Android Development] scote:
fantastic! - working on my non-rooted n1

now got original 3.3.1 maps and hacked m4ps with nav

thanks to the devs that made this
[G1 Android Development] czm:
What steps did you follow to get it working on N1 in UK? I've tried downloading navlauncher but it just tells me no route and quits...
[G1 Android Development] scote:
download the non root apk from the link in the first post and install via adb.

nav launcher will launch that one instead of the stock maps, you will end up with two map apps in the apps menu

$ adb install -r maps3.3.1-brut-no-root-3.apk

* daemon not running. starting it now *

* daemon started successfully *

441 KB/s (2393403 bytes in 5.296s)

pkg: /data/local/tmp/maps3.3.1-brut-no-root-3.apk

Success
[G1 Android Development] czm:
Thanks scote - I've got it working now, but it appears to be a bit flaky (forced close a few times) - I will play about with it some more and see if it can really be useful versus e.g. a tomtom
[G1 Android Development] bjtheone:
Nope... Root is required for the "regular" one since you need root access to replace the stock app. The non-root one basically calls the map app by another name so the factory version and the modded version can co-exist on the same phone. However, even with root you can install the non-root version.
[G1 Android Development] yamanote:
Oh, ok, thanks.

Just wondering- I can uninstall this one by running the uninstall script in the OP and install the standard Maps from the Market to revert back to the original right?
[G1 Android Development] MrBlueEyez:
I don't get it. I follow instructions, got it working properly, and after a restart of my phone, Maps was messed up (FC on ...apps.maps). Will try again today, but i don't understand why it stopped working all of a sudden... Any ideas?

(Will post a logcat when it happens again, i'm on Cyanogens' latest and have the 10Mb ramhack with BFS)
[G1 Android Development] dark.neo29:
Same issue here and alot of people are reporting this...Guessing google made somes changes and we need to wait for an update..Was working yesterday for me
[G1 Android Development] canadiancow:
Interesting. I wonder if Brut.all is still around.
[G1 Android Development] MrBlueEyez:
Hmmm, maybe a good idea to post a logcat then, see whats happening, maybe there's a solution. Till then it's Mapdroid and Mobile Maps for me then:rolleyes:
[G1 Android Development] miowpro:
i have it working on the G1 uk

Navigator loads and and then i get a messege saying "route not found" but i can see it working the background. has google stop access to the route database in the uk or something?
[G1 Android Development] thiasB:
still working here in Germany.
[G1 Android Development] seaweeduk:
nope it still works fine here

and if my understanding of this hack is correct it would be extremely difficult for google to disable it without breaking directions totally in google maps
[G1 Android Development] bfikkert:
Still working for me. (the Netherlands) :p
[G1 Android Development] canadiancow:
You say you have it working, and then you say it doesn't work?

Are you using the Market version, or the modified version?
[G1 Android Development] suffeks:
It is still working for me.
[G1 Android Development] Brut.all:
Yep, I am :-)

It still works for me. MrBlueEyez, dark.neo29: logcat or it didn't happen ;-)
[G1 Android Development] Jonno12345:
Still working for me in the UK also ^^.
[G1 Android Development] canadiancow:
Well. I guess it was an isolated incident. I just wish I had a phone to play with :(

I wonder if the 911 issues are going to increase or decrease the prices of the Dream/Magic on Craigslist.
[G1 Android Development] Joost39:
Still working i Denmark too...
[G1 Android Development] alongusername1:
Hi

I wiped my phone a couple of days ago and reinstalled everything to get rid of some problems I had with spotify. And now when I installed maps/navi again I accidentally installed the older version (Maps3.2.1-patched-root.apk) and not the most recent maps3.3.1-brut-root-3.apk because I am blind on fridays :) Anyway, I got the same problem that you did that it says "No route found" and then you have to exit. But when I uninstalled everything and then installed the correct version it worked fine again like it always have before. So you might wanna check which version you are running :)
[G1 Android Development] FormelLMS:
Sorry, if this question is asked 1000. times...

I've got a Problem with Nexus One, installing this here.

I take your ADB commands.

last comand (uninstall) gives me an error message (Failure!)

Could someone tell me, whats wrong?
[G1 Android Development] MontAlbert:
same here mate- then tried to remove the maps stuff by myself ( rm /system/apps/Maps.apk which removed it- i pushed the root-3 apk file across naming it Maps.apk but it didnt work this way)..

***edit*** just tried it a different way- removed Maps.apk then tried to install via adb:

C:\Documents and Settings\Scott\Desktop\android-sdk\tools>adb shell

# cd /system/app

cd /system/app

# rm -r Maps.apk

rm -r Maps.apk

# exit

exit

C:\Documents and Settings\Scott\Desktop\android-sdk\tools>adb install -r E:\app\

Maps3.3.1-brut-root-3.apk

1257 KB/s (2393392 bytes in 1.859s)

pkg: /data/local/tmp/Maps3.3.1-brut-root-3.apk

Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]

anyone got this working with nexus yet?
[G1 Android Development] matthian:
After

rm /system/app/Maps.apk

you need to do a

pm uninstall com.google.android.apps.maps

Now:

db install maps3.3.1-brut-root-3.apk

And done. Did you do it this way? It works great on my Nexus.
[G1 Android Development] FormelLMS:
In which folder did you copy this maps.apk file on your computer? In androidsdk/tools, right?
[G1 Android Development] FormelLMS:
Sorry, before I read your post, I did it another way.

I've baked me a new cyanogen ROM without Maps. Now you could manually install this maps here...
[G1 Android Development] jstocker:
find: not found

Hi,

I have rooted my phone running the original ROM.

I'm in the process of removing the original google maps application but I dont have a find command on my phone. When i execute adb shell find i get 'find: not found'

I have looked in /system/bin and find isnt there.

Welcome any suggestions, I'm probably missing something stupid.

Thanks
[G1 Android Development] rac2030:
Install busybox first... most tools used in hacks like this that mention commands like find, grep, ... are from busybox binary
[G1 Android Development] arshad14:
Hi, I just rooted and flashed it with Custom MoDaCo3.1 ROM into my Telus HTC Hero. Now how do I install Google Maps Navigation and Voice into it because the MoDaCo ROM is based on 1.5. Any help would be greatly appreciated.

I understand 'Canadiancow' is on Rogers so he's either using the HTC Magic, Dream or Hero. Please help!
[G1 Android Development] MrBlueEyez:
I reinstalled the hijacked maps from brut after updating CM. Will do a reboot to see if the problem arises again...
[G1 Android Development] canadiancow:
You need a 1.6+ ROM. 1.5 won't work.
[G1 Android Development] Zappletoo:
Any chance of seeing this adapted to the latest Maps version, with multitouch ?

See http://xdaforums.com/showthread.php?t=627582
[G1 Android Development] Brut.all:
Wow, is it a community hack or feature from 3.4 version of GM? I will look into it.
[G1 Android Development] awicks:
It is a new version of GM
[G1 Android Development] thiasB:
A feature, delivered with N1 update yesterday. Runs at least on 2.1 AOSP ROMs. Don't know if it will work on builds based on older android revisions (2.0 or/and 1.6). Could someone check that, because I'm on JACs xROM 2.1 already.
[G1 Android Development] yukkio:
It works on 1.6 but without navigation :(
[G1 Android Development] Brut.all:
http://ul.to/308xt6/maps3.4.0-brut3-MT.apk

This version requires Eclair's MT framework, so it won't work on these 1.6 ROMs, which don't have it backported (CM has). For that reason there are no non-rooters version too.
[G1 Android Development] thiasB:
Hi Brut. Thank you for patching this again! Works on my xROM v1.1.1 (ASOP 2.1 based) on Magic/MT3G.
[G1 Android Development] Vispen74:
no directions available

Since updating Nexus One to latest official rom today and Nav Launcher to 2.1.3, navigation no longer works.

It´s just saying "no directions available" whatever I do. :confused:
[G1 Android Development] thiasB:
The ROM update might overwrite the modded maps.apk. Reinstall.
[G1 Android Development] zemigl:
Yep thank you Brutt.all very helpful outside US :)

Works great on OpenEclair :)
[G1 Android Development] Zappletoo:
Thanks a lot for this ! :)
[G1 Android Development] Vispen74:
Aha, true! The new version is v.3.4.0. I´ll wait for a patched release of this version then.

Thank´s!
[G1 Android Development] Brut.all:
Then look just 2 posts above your first post ;-)
[G1 Android Development] 3Shirts:
Look up :)

There is already a nice patched MT non-US version of maps right here in this thread http://uploaded.to/file/308xt6/maps3.4.0-brut3-MT.apk

Brut, you are a total legend
[G1 Android Development] Vispen74:
Haha, COMPLETELY missed it! Ooops!

Thank´s again!
[G1 Android Development] Vispen74:
Brut 3.4.0 didn´t work, I guess it requires root :(

Maybe a 3.4.0 non-root will come?! :rolleyes:

Just find this a few posts back "This version requires Eclair's MT framework, so it won't work on these 1.6 ROMs, which don't have it backported (CM has). For that reason there are no non-rooters version too."

I don´t know what it means, but it does not give any hope for a non-root version :(
[G1 Android Development] Brut.all:
Hah, months stayed on my G1 let me believe, that Eclair is reachable only through unofficial ROMs, so Eclair = root. I've just forgotten about Droid and N1 non-rooters, sorry! ;-D

Ok, give me some time :-)
[G1 Android Development] Vispen74:
Brut.all, you are the best!
[G1 Android Development] Brut.all:
Ok, here it is:

http://ul.to/dxl2is/maps3.4.0-brut3-nonroot.apk

Let me know if it works for you :-)
[G1 Android Development] canadiancow:
Not sure what to do about Nav Launcher now.

I don't want to make it require 2.1, but I'd like to have it link to 3.4.0. I might have to make it detect OS version and download the appropriate apk, but it's so hard to test without a device :(
[G1 Android Development] thiasB:
Whats the problem? Nav Launcher works fine with Ecalir 2.1 just as well as it did with Donut. Anybody tested the 3.4GMN with Donut ROMS already? Is it just missing MT or don't work at all?
[G1 Android Development] k3vink3vin:
it works here on a manually updated stock nexus in hong kong, altogether with nav launcher too. thank you so much for the update!

btw multi-touch doesnt work during navigation, is this normal?
[G1 Android Development] stefanero313:
Would this work on espresso rom aswell? I am running the king version 1.3 here :)

Another request would be to maybe update teh 1st post of this thread with the new version, so some new guys dont have to search thruw 104 pages :)
[G1 Android Development] GlenH:
Hey this new multi-touch version (maps3.4.0-brut3-MT.apk) looks great, but I can't seem to install it on my (rooted) nexus 1.

When I try to install (copied apk to sd and then install via a file manager) the phone asks me if I want to replace a system app. When I click 'yes', it starts to install but then says 'install failed'.

Anyone have any idea how I can install this new version of maps?

EDIT: solved - use the instructions at the start of this thread! Oddly, the reason I didn't try that first was that when I installed the previous (non-multi touch) version those instructions didn't work. Must be something to do with the change of ROM (cyanogen to new ERE27 update) in the meantime.
[G1 Android Development] eldis:
Works ok on a stock Motorola Milestone 2.0.
[G1 Android Development] elzee:
x2 Many thanks Brutt.all
[G1 Android Development] 5m00v3r:
Hi from Germany

all works great like ever thanks a lot!!!

I´m on CM 4.2.14.1
[G1 Android Development] maarten82:
Darn, thats once again a brilliant piece of art. Works like a charm on my G1 running OpenEclair 1.1.1! Keep up the good work!
[G1 Android Development] MrBlueEyez:
Brut, maybe an idea to update opening post with new version? Gonna try it now on my CM latest, had no problems anymore with last version :-)
[G1 Android Development] chicofiebru:
Works like a charm in my SuperD Rom 1.8, Thanxs again man, we are nothing without u
[G1 Android Development] canadiancow:
Nav Launcher works fine, but Brut.all mentioned a framework requirement for Google Maps 3.4.0.

Brut.all, what exactly is the requirement to run 3.4.0?
[G1 Android Development] Brut.all:
I don't know exactly, but if you'll try to run GM3.4.0 on clean 1.6 (I did it on emulator) you'll get "Could not find method android.view.MotionEvent.getPointerCount" exception. I've checked it and indeed there is no such method in /system/framework/framework.jar file pulled from emulator, but is in file from CM device.

You could base Nav Launcher on existence of this method - it won't be reliable, but better that than nothing.
[G1 Android Development] canadiancow:
Thanks. I'll take a look at that later.
[G1 Android Development] OS299:
Thx it works on my Milestone in Germany perfectly.

But I found the old problem "Unknown street" on top, is it not possible to fix that?
[G1 Android Development] seaweeduk:
nope read the thread
[G1 Android Development] alongusername1:
Just tried to install the latest version but when I tried to delete the old maps I got this errormsg. Never happened before, what may be causing this??

adb shell find /system /data -name \*google\*maps.apk\* -o -name Maps.apk -delete
find: unrecognized: -delete
BusyBox v1.15.3android (2010-01-29 01:54:08 EST) multi-call binary

Usage: find [PATH...] [EXPRESSION]

Search for files. The default PATH is the current directory,
default EXPRESSION is '-print'
[G1 Android Development] maarten82:
Use the code without the -delete option and just remove the files found by hand (rm).
[G1 Android Development] alongusername1:
Ehm... What would that commandline look like? :o

And still, why do I get this error now? I even tried to delete the whole SDK and download a new copy, but no difference..
[G1 Android Development] Brut.all:
It isn't related to SDK, but to ROM, that you have installed.

Try:

adb shell
$ find /system /data -name \*google\*maps.apk\* -o -name Maps.apk | xargs rm
[G1 Android Development] alongusername1:
Oh, I'm using the latest CM 4.2.14.1 on my Magic 32A

When I tried your code I got this errormsg instead :S

# $ find /system /data -name \*google\*maps.apk\* -o -name Maps.apk | xargs rm
$ find /system /data -name \*google\*maps.apk\* -o -name Maps.apk | xargs rm
$: not found
BusyBox v1.15.3android (2010-01-29 01:54:08 EST) multi-call binary

Usage: rm [OPTIONS] FILE...

Remove (unlink) the FILE(s). Use '--' to
indicate that all following arguments are non-options.

Options:
-i Always prompt before removing
-f Never prompt
-r,-R Remove directories recursively
[G1 Android Development] canadiancow:
Try

find /system /data -name \*google\*maps.apk\* -o -name Maps.apk

And then manually delete each file.
[G1 Android Development] maarten82:
Did i just hear an echo in here? ;)

Its not that hard if you understand what you're doing really..... The 'find: unrecognized: -delete' part tells you all you need to know but if you dont understand here's a step by step walk-through (you're lucky i just reflashed a new ROM with the same issues):

After the remount just copy/past the find command minus the -delete

>adb shell
#mount -o remount,rw /system
#find /system /data -name \*google\*maps.apk\* -o -name Maps.apk
/the/printed/dir/whateverthefilenameis.apk or .dex

Because we left out the -delete part nothing really happens here, the find command just prints everything it found a match

So now we actually have to delete the result files by hand

>rm /the/printed/dir/whateverthefilenameis.apk or .dex

Do so for every file, and from there on just follow the steps in the OP;

#pm uninstall com.google.android.apps.maps

And after a Success type exit to leave the shell and just install the new map thing;

>adb install -r maps3.4.0-brut3-MT.apk
1040 KB/s (2719843 bytes in 2.553s)
pkg: /data/local/tmp/maps3.4.0-brut3-MT.apk
Success

And after that just give it an 'adb reboot' for good measure....
[G1 Android Development] :No-Frost::
A new version of Google Maps is available in the market...

Waiting for the modified version of it =D...
[G1 Android Development] Brut.all:
Is it different than that dumped from N1 (which is modded already)?
[G1 Android Development] canadiancow:
Well someone obviously didn't understand your statement. I'm a little hesitant about dumbing this stuff down. If you don't know how to find and delete files, you probably shouldn't be doing it, but might as well try to help people :p
[G1 Android Development] MontAlbert:
one i downloaded and installed from market today was version 3413....

uploading a version for you now- i will pm you a link...

removed all versions manually and just tried to install the 3.4.0 version on my nexus one- i got the error:

C:\Documents and Settings\Scott\Desktop\android-sdk\tools>adb install -r E:\app\
maps3.4.0-brut3-MT.apk
1287 KB/s (2719843 bytes in 2.062s)
pkg: /data/local/tmp/maps3.4.0-brut3-MT.apk
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]

did i do something wrong? all the stuff above removed ok first- i checked....

should i have rebooted after uninstalling all maps stuff before installing? tried with a reboot- nothing- tried transferring app to sdcard and installing using astro but still nothing....
[G1 Android Development] JDMJOSH:
I cant uninstall the old maps using adb on my rooted N1. It keeps saying "failure" when I execute the command. I thought Nav Launcher was supposed to automatically do this for you??. I cant install the new version alongside the old either as it wants to overwrite it. Any help???
[G1 Android Development] Brut.all:
Hahah.... canadiancow, do Nav Launcher has feature of uninstalling modded maps? If no it's like I said:

I think it's better to let users install it in userspace, rather than in system :-)
[G1 Android Development] The Spirit:
i tried to uninstall the maps applicaiton from my non rooted nexus one, but i couldn´t do it.

so i installed the version from the market. when i start the app, it allways tells me, that ther is no info for my destination (i live in germany). any ideas how to solve this?

thanks
[G1 Android Development] Brut.all:
Everything is in first post.