10-13-16 12:08 PM
733 123 ...
tools
  1. moneytoo's Avatar
    Update - There's a automated script by christian-georgescu

    Original post bellow:

    It is possible to make maps work inside various Android apps. For Google Account dependent apps, see my other thread: http://forums.crackberry.com/bb10-an...t-apps-866259/
    To fix such app you have to do:

    How to find what Google Maps API version apk uses?
    1. Decompile app APK using apktool
    2. Check manifest - does it contain text "com.google.android.maps.v2.API_KEY"? If yes, application uses API v2 otherwise it uses API v1.


    Patch app which uses API v1
    1. Decompile app APK using apktool
    2. Fix or remove Google Maps library dependency in manifest (this one is already known workaround) - the easiest way is to remove line with <uses-library android:name="com.google.android.maps" /> completely
    3. Download gapps from goo.im either for Android 2.3.3 (for OS 10.1) or Android 4.2.2 (for OS 10.2)
    4. Extract framework from /system/framework/com.google.android.maps.jar
    5. Decompile the maps jar using apktool as well
    6. Move decompiled maps smali code to your decompiled app
    7. Extract RSA key from the original APK (inside META-INF)
    8. Convert the key (openssl.exe pkcs7 -inform DER -in *.RSA -print_certs -out cert)
    9. Get MD5 fingerprint (openssl.exe x509 -noout -in cert -fingerprint -md5), remove colons, to lowercase (SHA1 might be necessary for API v2)
    10. Find method setAndroidSignature() (for Android 4.2.2 it's in file DataRequestDispatcher.smali, see post #28 for details)
    11. Current fingerprint is in parameter p1 and it's getting encoded into protobuf. Create new string (const-string v2) with the found fingerprint and use that when invoke-static instead.
    12. Compile it back, sign (jarsigner), convert, deploy, enjoy

    See post #36 for detailed instructions thanks to ATV_Hightower.

    How to deal with API v2
    1. Decompile your app using apktool.
    2. In file GooglePlayServicesUtil.smali find method isGooglePlayServicesAvailable() and replace the whole content of the method with just:
      Code:
          .locals 1
          .param p0, "context"    # Landroid/content/Context;
      
          .prologue
          const/4 v0, 0x0
      	
          return v0
      or (depending on versions you use), the second line might look like:
      Code:
          .parameter "context"
      The method name may be obfuscated - in that case it's the method containing string "com.android.vending".
    3. Change API v2 key to valid value (one you have registered, see https://developers.google.com/maps/d...ing_an_api_key) - otherwise tiles won't load.
    4. Pack your app, sign, convert, and deploy.
    5. Convert and deploy Google Play Services (aka GMS/GMSCore, latest apk is usually required!). com.google.android.gms must be install for maps to work!


    Update (2014/01/28): Here's current version of Google Play Services with few patched verifications: Google Play services 4.1.32 (978161-36) patched.apk

    WIP: I'm going to check if there's any easy way of reusing the authors fingerprint.

    If you only embed framework code into app, it will work but won't load any tiles (app mBank, uses API v1)
    How to fix any Android app dependent on Google Maps API and make maps working-vrvvo3.png

    With correct fingerprint you have it all working (app Pubtran, uses API v1)
    How to fix any Android app dependent on Google Maps API and make maps working-2eobi3l.png

    Another example (app Meteor, also uses API v1)
    How to fix any Android app dependent on Google Maps API and make maps working-img_00000018.png

    Simple test application using API v2.
    How to fix any Android app dependent on Google Maps API and make maps working-img_00000022.png

    lyft also uses API v2.
    How to fix any Android app dependent on Google Maps API and make maps working-img_00000024.png
    Last edited by moneytoo; 01-27-14 at 05:03 PM.
    10-19-13 08:19 PM
  2. coolhand297's Avatar
    This looks very promising, now let's see if goodereader or one of the other sites steps up to the plate and offers these conversions as this is totally out of my league.

    Posted via CB10
    Dude_9 and Dunmanway Emar like this.
    10-19-13 08:35 PM
  3. coolhand297's Avatar
    Now all we need to do is bypass BB's no blue tooth for Android apps.

    Posted via CB10
    1magine likes this.
    10-19-13 08:39 PM
  4. zocster's Avatar
    Thanks for the share op

    Sent from my Z10 using Tapatalk
    10-19-13 08:41 PM
  5. anon3700711's Avatar
    Hey OP, will you take app modification requests to remove gmaps or convert it?

    Posted via CB from my BlackBerry Z30
    Ken Myer likes this.
    10-19-13 11:29 PM
  6. moneytoo's Avatar
    I can't promise anything but since I'm definitely going to fix some apps for myself let me know what apps you'd like to fix. Then either me or someone else might fix it. The whole process can be automated so a tool is also possible.

    Posted via CB10
    keenwerkz likes this.
    10-20-13 02:27 AM
  7. stabstabdie's Avatar
    Oh that's all you have to do??
    Lol
    Just kidding. Thanks. Too technical for me.
    10-20-13 05:59 AM
  8. stabstabdie's Avatar
    Now all we need to do is bypass BB's no blue tooth for Android apps.

    Posted via CB10
    Don't forget about nfc.

    There are way better nfc apps for Android than what is currently available.
    10-20-13 06:00 AM
  9. coolhand297's Avatar
    Well here are the first 2 requests, lexus entune and navy Federal credit Union

    Let me know.

    Posted via CB10
    10-20-13 09:33 AM
  10. coolhand297's Avatar
    I have both apk files if needed

    Posted via CB10
    10-20-13 09:34 AM
  11. noelito4three's Avatar
    Whoa. My not working banking app need this


    Posted via CB10
    10-20-13 10:55 AM
  12. coolhand297's Avatar
    I almost forgot Trulia for Agents, I have this apk as well.

    Posted via CB10
    10-20-13 11:01 AM
  13. lcohen999's Avatar
    Starbucks all, please!

    Posted via CB10
    macaroon9 likes this.
    10-20-13 11:11 AM
  14. kratzer999's Avatar
    Would need more specific info on how to get this done.

    I've done the removing gmaps method. So if you can explain a bit more simple I would appreciate.

    Posted via CB10
    10-20-13 06:46 PM
  15. AnimalPak200's Avatar
    I can't promise anything but since I'm definitely going to fix some apps for myself let me know what apps you'd like to fix. Then either me or someone else might fix it. The whole process can be automated so a tool is also possible.

    Posted via CB10
    Perhaps you can collaborate with Sacha and build a module for Sachesi... donations would be earned!
    10-20-13 06:56 PM
  16. ad19's Avatar
    Please try Glympse if possible.
    10-20-13 07:31 PM
  17. mapaulo's Avatar
    Perhaps you can collaborate with Sacha and build a module for Sachesi... donations would be earned!
    if someone can do this to the tinder app for me that would be awesome, i can't seem to get the gmap removal to work
    ladyintensity likes this.
    10-20-13 08:24 PM
  18. rgarza8's Avatar
    Moneytoo, can you look at the ESPN FFL app and see why it wont work and if you can come up with a fix for that?
    10-20-13 08:28 PM
  19. Guyzer's Avatar
    you seem like a smart dood. if you can please make it so google maps can allow me to sign in. i need to see my stared locations. i have many other uses for google services framework if you can get it working.
    10-20-13 11:50 PM
  20. moneytoo's Avatar
    While the described solution works a lot of apps require Google Play Services. Somehow it worked for me for example in the latest official Geocaching app but I need to find more refined solution so please bear with me.
    tabl likes this.
    10-21-13 12:13 AM
  21. kratzer999's Avatar
    K. Waiting.

    Hope you can make a video tutorial too

    Posted via CB10
    10-21-13 01:06 AM
  22. anon3700711's Avatar
    I can't promise anything but since I'm definitely going to fix some apps for myself let me know what apps you'd like to fix. Then either me or someone else might fix it. The whole process can be automated so a tool is also possible.

    Posted via CB10
    My banking application
    au.com.nab.mobile
    Only problem is it uses friggin Google Maps so I get error -9
    mjdimer likes this.
    10-21-13 02:06 AM
  23. bluetroll's Avatar
    yeah. i've managed to disable the google maps api, but i would love to be able use it if possible.

    i would love a video tutorial.

    edit:

    I attempted this and got to step 6. I assume I'm just supposed to copy and paste the folders into the matching folders in my unpacked apk folders?

    I've also made it to step 7, I've renamed the original .apk to .zip and unzipped the file. I've found the .RSA file.

    Not sure what to do after... help would be great. how to install openssl?
    Last edited by bluetroll; 10-21-13 at 10:55 AM.
    10-21-13 09:50 AM
  24. ATV_Hightower's Avatar
    I havent tried it yet, but does it "just" fix the google maps problem or could the google account problem be fixed thisway? I`m asking because I waiting since the first day with my Z10 to play Ingress..
    Anyway, it is great that you share your knowledge!
    10-21-13 11:03 AM
  25. jmcmanus26's Avatar
    Can you post an example of how you added the signature in DataRequestDispatcher.smali setAndroidSignature()? This is where I am stuck I can't get my apk to recompile.
    10-22-13 07:23 PM
733 123 ...

Similar Threads

  1. Best Leak to Run on T-Mobile Network?
    By AfroZepher in forum BB10 Leaked/Beta OS
    Replies: 16
    Last Post: 01-21-15, 07:29 AM
  2. Manually program BB10 device to set MDN and MSID?
    By onlinespending in forum BlackBerry 10 OS
    Replies: 3
    Last Post: 10-20-13, 12:26 PM
  3. My Z10 updated now I can't hook up to wifi
    By Tony Stashuk in forum BlackBerry Z10
    Replies: 5
    Last Post: 10-19-13, 11:44 PM
  4. Used sachesi and SR version still says 4181??
    By sinnar in forum BlackBerry 10 OS
    Replies: 4
    Last Post: 10-19-13, 08:18 PM
LINK TO POST COPIED TO CLIPBOARD