1. dustmalik's Avatar
    Thanks Cobalt, your patched Lyft works very well.
    Please don't say that I'm asking for too much. I was thinking if it's possible for you to update your script to be able to patch Lyft and apps with similar behavior. Thanks man. I really appreciate your hard work.

    Posted via CB10 using my Gorgeous Z10
    01-27-14 10:08 AM
  2. Sally Mack's Avatar
    Is there anything on the device we need to do?

    Posted via CB10
    Just install the patched apk that cobalt's script generates .
    01-27-14 11:39 AM
  3. moneytoo's Avatar
    Here's latest Google Play services 4.1.32 (978161-36) patched.apk with two verifications checks removed fixing some FC's (at least in apps I'm using).
    01-27-14 05:06 PM
  4. Cobalt232's Avatar
    Here's latest Google Play services 4.1.32 (978161-36) patched.apk with two verifications checks removed fixing some FC's (at least in apps I'm using).
    Welcome back moneytoo! Can you share the details where you patched the file?
    01-27-14 05:22 PM
  5. moneytoo's Avatar
    Except the already described check for packages/vending etc I removed the content of method where enforceCallingOrSelfPermission() is called (h.enforceCallingOrSelfPermission("com.google.andro id.providers.gsf.permission.READ_GSERVICES", "attempting to read gservices without permission");). With one of my apps I use (basically only one app) all the stack traces go through this method.
    01-27-14 05:35 PM
  6. Cobalt232's Avatar
    Here's latest Google Play services 4.1.32 (978161-36) patched.apk with two verifications checks removed fixing some FC's (at least in apps I'm using).
    This crashes immediately after installation on my Q10 with 10.2.1.1925 (SW 537). Any ideas?
    01-27-14 05:40 PM
  7. moneytoo's Avatar
    Yeah, it throws one FC but other than that it's ok for me
    01-27-14 05:44 PM
  8. Cobalt232's Avatar
    For me, it crashes constantly. Not the one fist usual crash we know. The Settings won't open at all. Did you change something with the signature? I decompiled and resigned the file, because it would not let me install with the 'test test' signature.

    Maybe this crashlog from my BBRY Logger provides more Details.
    01-27-14 05:50 PM
  9. ad19's Avatar
    Would someone be able to modify the latest Glympse apk? On 10.2.1 the direct install results in the app crashing every time when you try to return to the home screen after viewing the map.

    Link to the latest apk:

    https://www.mediafire.com/?fv25lqvscrbla83
    So I used the latest script and I've had no luck. When I was using the older Glympse bar file that was patched, it appears that the app is using Google Maps. However, using the newest version and running it through the script, it appears it is using openstreetmaps and will crash when returning to the home screen after viewing the map. If someone has some free time, could someone take a look at this app? It would be much appreciated.
    01-27-14 06:21 PM
  10. flacrack's Avatar
    Posting here as this is the closest thread on apktool use and no one picked up on the thread "Apktool Help." Any advice is welcome!
    I am trying to decompile a couple apk files to see if I can patch them to work with my BB10 Z10. I think I am having path issues and need some help. I run 64 bit Windows but am using the 32 bit Java SDK. I've reviewed the Forums, but there isn't anything I could find that addressed this. Let me know if it was already posted elsewhere.

    Paths
    C:\windows
    C:\apktoolkit with aapt.exe, apktool.bat, apktool.jar and the selected apk files, in this case com.medscape.android-12.apk
    C:\Program Files (x86)\java\jdk1.7�_51

    I have also put the apktool files in the jdk1.7_51 folder, to no avail.
    Running: apktool d com.medscape.android-12.apk gives this error:
    “java is not an internal or external command, operable program or batch command”

    In my Command line, I run from both the c:\apktoolkit directory and from the ..jdk1.7_51 folder.

    The bat file reads:
    @echo off
    java -jar "%~dp0\apktool.jar" %1 %2 %3 %4 %5 %6 %7 %8 %9

    Anyone know how to set this up properly? Thanks.
    01-27-14 08:14 PM
  11. TheHedonist's Avatar
    The idea is that you download the patcher and patch it yourself. But well, it's Sunday and weather is bad over here in Switzerland. So here you go:

    Download patched Best Parking
    I think everyone should take just 10 minutes to read Cobalt's instructions and do it yourself. It is NOT such a rocket science to just run those scripts.
    Thank you Cobalt! I didn't realize how easy it was, and I had just spent a couple of hours a few weeks ago generating GUIDs trying to get Snap to work, and thought this would be another ordeal. Thanks again.
    01-27-14 08:35 PM
  12. Sally Mack's Avatar
    Thank you Cobalt! I didn't realize how easy it was, and I had just spent a couple of hours a few weeks ago generating GUIDs trying to get Snap to work, and thought this would be another ordeal. Thanks again.
    Unrelated, but snap generates the GUID for you... no need to generate your own, just log in!
    01-27-14 09:13 PM
  13. Sally Mack's Avatar
    So I used the latest script and I've had no luck. When I was using the older Glympse bar file that was patched, it appears that the app is using Google Maps. However, using the newest version and running it through the script, it appears it is using openstreetmaps and will crash when returning to the home screen after viewing the map. If someone has some free time, could someone take a look at this app? It would be much appreciated.
    Another case of the script detecting the v2 method, without taking into account the fact the app is calling the v1 method (hence the openstreetmaps). I think default behaviour should be "If 'uses-library:... maps' in androidmanifest.xml file then patch using v1 method" (then check for v2... don't think there's any harm in double patching). In any case, I've updated the glympse thread with a working apk.
    http://forums.crackberry.com/bb10-an...r-file-866672/
    damien kupuku likes this.
    01-27-14 09:35 PM
  14. Cobalt232's Avatar
    Another case of the script detecting the v2 method, without taking into account the fact the app is calling the v1 method (hence the openstreetmaps). I think default behaviour should be "If 'uses-library:... maps' in androidmanifest.xml file then patch using v1 method" (then check for v2... don't think there's any harm in double patching). In any case, I've updated the glympse thread with a working apk.
    http://forums.crackberry.com/bb10-an...r-file-866672/
    I could fix that in the patcher by adding a separate option. If I get it right, we must patch V1 and V2, but remove all Maps entries in Androidmanifest.xml? Correct?
    01-28-14 05:37 AM
  15. Sally Mack's Avatar
    Correct. Assuming your v2 method injects the "maps_api_key" entry back in with an api key.
    01-28-14 05:54 AM
  16. Cobalt232's Avatar
    I just found a severe bug in the script.

    The script searches for the file GooglePlayServiceUtil.smali and if it finds it, it will remove the method "isGooglePlayServicesAvailable"

    If the filename is obfuscated, i.e. f.smali, the script will try to find f.smali and the then search it for an obfucated method as "a(Landroid/content/ContextI

    The problem that I found is that in some rare cases the file's name is GooglePlayServicesutil.smali but the method inside is obfuscated. This situation is not detected by the script.

    I'll fix this, together with a special method for Glympse
    01-28-14 10:22 AM
  17. Cobalt232's Avatar
    New Version 2.4 available. Need some betatesters!

    Changelog:
    • Fixed a bug where obfuscated methods in GooglePlayServicesUtil.smali would not be detected
    • Added feature to patch MAPS_API V1 and Google Play together (removes all MAPS entries in AndroidManifest)

    This version should be able to patch Glympse and Lyft.
    Last edited by Cobalt232; 01-28-14 at 03:27 PM.
    01-28-14 03:04 PM
  18. Sally Mack's Avatar
    New Version 2.4 available. Need some betatesters!

    Changelog:
    • Fixed a bug where obfuscated methods in GooglePlayServicesUtil.smali would not be detected
    • Added feature to patch MAPS_API V1 and Google Play together (removes all MAPS entries in AndroidManifest)

    This version should be able to patch Glympse and Lyft.
    Good stuff. Will put this through its paces tonight .
    01-28-14 04:01 PM
  19. Sally Mack's Avatar
    New Version 2.4 available. Need some betatesters!

    Changelog:
    • Fixed a bug where obfuscated methods in GooglePlayServicesUtil.smali would not be detected
    • Added feature to patch MAPS_API V1 and Google Play together (removes all MAPS entries in AndroidManifest)

    This version should be able to patch Glympse and Lyft.
    Some results, with original (unpatched) apk's so you can test if need be. I'll also try to patch these all manually and post the working ones so you can see the differences.

    Glympse https://app.box.com/s/duiq52bkdkeo582ezztx working version for comparison:https://app.box.com/s/6p76hp58qbzel88x3skt
    Patches v1 + v2, however I get the openstreetmaps view, and it crashes frequently

    TransitApp https://app.box.com/s/u4uceb05il2jb54ypakz
    Patches v2, asks for google play services (I've got this to work in the past via manual patching)

    Uber https://app.box.com/s/96bh88wwbhvy7kh4hn8y
    v1+v2 and surprisingly works!

    Hailo https://app.box.com/s/d5vdndyhw82pcxzyevsx working version for comparison:https://app.box.com/s/5buk6cfhlzwheea69dfy
    v1+v2 and doesn't show any map

    GreenP Toronto https://app.box.com/s/pjljlzymmpjcdet8aw1o working version for comparison: https://app.box.com/s/0ufkv5gh7mzwjlbjzsid
    v1 (patched it since this was giving me problems even though its v1 api) and doesn't show any map

    Football Italia https://app.box.com/s/vpi0iukxr34uu4jkyyi6
    google play services and doesn't compile (not sure there's much we can do about that though) - also tried decompiling resources

    Home Depot Canada https://app.box.com/s/gvm3tmimpxw9piba9js2
    google play services and doesnt compile - also tried decompiling resources

    Tripadvisor https://app.box.com/s/4zr8fjaiua9ldtsk59in
    doesn't decompile in step 1
    Last edited by Sally Mack; 01-28-14 at 11:44 PM.
    01-28-14 11:15 PM
  20. Cobalt232's Avatar
    That's helpfull. I'll look into the working files to find the difference. Some Problems may occure because of v2 Key being removed with special treatment patch.

    As I'm on 1925, I cant really test If the Patches work with older versions. Will Post again later.

    Posted via CB10
    01-29-14 12:42 AM
  21. Sally Mack's Avatar
    That's helpfull. I'll look into the working files to find the difference. Some Problems may occure because of v2 Key being removed with special treatment patch.

    As I'm on 1925, I cant really test If the Patches work with older versions. Will Post again later.

    Posted via CB10
    All this testing was done on. 1925
    01-29-14 12:53 AM
  22. Cobalt232's Avatar
    Uhh ohh :-)
    01-29-14 01:19 AM
  23. xtremez's Avatar
    Ok, here is a small How-To of the way I did id.


    First: you need a bunch of tools:

    • apkTool Link (I used the windows version)
    • gapps Link (I used Android 4.2.2. Version)
    • openSSL Link
    • SignAPK Link (Password: SanketN8 ) -> Credits go to YouTube User Sanket Naik


    Second:
    • unpack apktool
    • move the app you want to convert in the apkTool folder (let's call "app.apk")
    • open cmd in apkTool folder (shift + rightclick)
    • enter
      Code:
      apktool d app.apk app
    • a new folder is created with the name of your app
    • ​go into this folder and open "AndroidManifest.xml" with editor
    • delete line
      Code:
      <uses-libraryandroid:name=�com.google.android.maps�/>
    • save & exit


    Third:

    • unpack com.google.android.maps.jar from gapps-jb-20130812-signed.zip /system/framework
    • move it in your apkTool folder
    • open cmd in apkTool folder
    • enter
      Code:
      apktool d com.google.android.maps.jar
    • a new com.google.android.maps -folder is created
    • copy and paste the "smali" folder from com.google.android.maps into your app folder


    Fourth:

    • install openssl
    • open app.apk with 7zip or winrar, go to folder META-INF and extract "Cert.RSA" into your openssl bin folder (C:\OpenSSL-Win32\bin)
    • open cmd in c:\OpenSSL-Win32\bin folder
    • enter
      Code:
      openssl.exe pkcs7 -inform DER -in *.RSA -print_certs -out cert
    • enter
      Code:
      openssl.exe x509 -noout -in cert -fingerprint -md5
    • copy the MD5 fingerprint
    • go to you apkTool\app\smali\android_maps_conflict_avoidance\ com\google\googlenav\datarequest folder, open DataRequestDispatcher.smali with editor
    • find the method setAndroidSignature()
    • Code:
       .method public setAndroidSignature(Ljava/lang/String;)V
    • modify as followed:

    Code:
        .locals 3
        .parameter "signature"
    
        .prologue
        .line 1332
        iget-object v0, p0, Landroid_maps_conflict_avoidance/com/google/googlenav/datarequest/DataRequestDispatcher;->properties:Landroid_maps_conflict_avoidance/com/google/common/io/protocol/ProtoBuf;
    
        const/16 v1, 0x12
    
        const-string v2, "2878691fb70c1076bf76b803e15d904a"       <-- this is were you place your MD5 Hash without colons, lower case!
        
        invoke-virtual {v0, v1, v2}, Landroid_maps_conflict_avoidance/com/google/common/io/protocol/ProtoBuf;->setString(ILjava/lang/String;)V
    
        .line 1334
        return-void 
    .end method
    • save and exit
    • go back to your main apkTool folder, open CMD and enter:
      Code:
      apktool b App App2.apk


    • App2.apk is created


    sixth:

    • unzip signAPK files into new folder
    • move App2.apk into the same folder
    • add a batch file, SignAPK.bat with the following code:
      Code:
      java -jar signapk.jar certificate.pem key.pk8  %1 %~n1-signed.apk
    • place app2.apk on SignApp.bat and app2_signed.apk is created.
    • You can now convert app2_signed.apk to a bar file and install it on your device
    Can't seem to get pass the second step can't seem to create a folder, it keeps giving me an error.

    Any ideas anyone?
    01-29-14 02:07 AM
  24. Cobalt232's Avatar
    What is the error you get?

    Posted via CB10
    01-29-14 03:59 AM
  25. Cobalt232's Avatar
    New Version 2.4A which should fix some problems.

    Glymps
    Sucessfully patched with Autodetect

    TransitApp
    Sucessfully patched with Autodetect

    Hailo
    Sucessfully patched with Autodetect

    Toronto
    Sucessfully patched with Autodetect

    Football Italia
    Successfully patched with Autodetect (Decompile Resources = NO)

    Home Depot Canada
    Can't be patched because API V2 key can't be writen in AndroidManifest (recompile error)

    Tripadvisor
    Needs further investigation
    Sally Mack likes this.
    01-29-14 09:56 AM
733 ... 1415161718 ...

Similar Threads

  1. Best Leak to Run on T-Mobile Network?
    By AfroZepher in forum BlackBerry 10 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