How to fix any Android app dependent on Google Maps API and make maps working
-
- Christian, I absolutely agree with you that using the installer is some kind of challenging with all it's options. Maybe we should write a Windows GUI version with one big PATCH button in the middle of the screen :-)
Maybe I'll look into this one day, for now I'm just too short on time.
Changelog:
- Added add_apk_here folder for automatic apk folder scan (changed from main folder for usability)
- Automatic Java detection via registry (no more setting or editing JAVA_HOME required)
- Added logging to file capability for easy debug (patch.log in main folder)
- Using 32 bit version of all utilities for safety
- Replaced winrar with 7zip command line version (no more winrar and WINRAR_HOME required)
- Force using 32 bit openssl from tools folder (no more openssl config required)
- Simplified folder structure of the app:
ROOT
add_apk_here - folder where you drop your apk(s) for patching
patched_apk - folder where you will find patched apk(s)
tools - folder with all the tools needed grouped in a single folder - Replaced apktool.bat, signapk.bat with direct java commands for usability
- Grouped all tools and resources needed under tools folder for usability
Testers needed as always
Enjoy.02-28-14 10:40 AMLike 0 - Thanks for the feedback.
As moneytoo already pointed out, most Google Apps i.e. Google Drive or Google+ will not work correctly. But the patcher works for removing Google Maps v1/v2 and Google Play dependencies in all other Android apps. I finalized v2.5 and included an option to remove ads. Hope it works for you.
GMAPS APK PATCHER is able to remove the following dependencies from an APK-file:
- Google Maps API V1 (use if maps look weird)
- Google Maps API V2 same as above
- Google Play Services (use if app tells you, that you Need Google Play Services)
- Google Advertising (removes Google ADS Folder, may crash on some apps)
Download GMAPS APK PATCHER v2.5.1
Attachment 236527
Attachment 236528
What I am looking for is a way to actually sign in to Google Play services so Maps has all my recent destinations and Music gives me access to my songs I paid for (yeah, I know, I paid for music...)
Is there a solution for this on my Z30?02-28-14 11:15 AMLike 0 - here is version v2.7. Testers needed as always
C:\gmaps-apk-patcher-v2.7>patch
Error: The system was unable to find the specified registry key or value
Using \bin\java
The system cannot find the path specified.
Error: A Java installation was not found, you cannot continue without it
USAGE:
patch.bat
or
patch.bat apk-file.apk
Press any key to continue . . .
Windows XP / SP3
C:\Program Files\Java\jdk1.7.0_13
C:\Program Files\Java\jre702-28-14 07:03 PMLike 0 - I have problems with v2.7. Here is a transcript of my CMD window:
C:\gmaps-apk-patcher-v2.7>patch
Error: The system was unable to find the specified registry key or value
Using \bin\java
The system cannot find the path specified.
Error: A Java installation was not found, you cannot continue without it
USAGE:
patch.bat
or
patch.bat apk-file.apk
Press any key to continue . . .
Windows XP / SP3
C:\Program Files\Java\jdk1.7.0_13
C:\Program Files\Java\jre7
Weird.. I do not have access to a WinXP machine. Can you please try the following two commands in a command prompt and see what they return:
Code:REG QUERY "HKLM\Software\JavaSoft\Java Runtime Environment" /v CurrentVersion REG QUERY "HKLM\Software\JavaSoft\Java Development Kit" /v CurrentVersion
Code:HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment CurrentVersion REG_SZ 1.7 or HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Development Kit CurrentVersion REG_SZ 1.7
Code:REG QUERY "HKLM\Software\JavaSoft\Java Runtime Environment\1.7" /v JavaHome or REG QUERY "HKLM\Software\JavaSoft\Java Development Kit\1.7" /v JavaHome
03-01-14 04:21 AMLike 0 -
Here is version 2.7.1 that fixes that.
Regards.03-01-14 06:28 AMLike 0 - Ah, yes, sorry about that. Some testing code that is unnecessary was not removed.
Here is version 2.7.1 that fixes that.
Regards.
C:\gmaps-apk-patcher-v2.7.1>patch.bat
ERROR: Invalid key name.
Type "REG QUERY /?" for usage.
'chgcolor.exe' is not recognized as an internal or external command,
operable program or batch file.
'wtee' is not recognized as an internal or external command,
operable program or batch file.
BTW, i'm running this on a windows 8 64bit PC.03-01-14 08:05 AMLike 0 -
! REG.EXE VERSION 3.0
HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment
CurrentVersion REG_SZ 1.7
C:\gmaps-apk-patcher-v2.7>REG QUERY "HKLM\Software\JavaSoft\Java Development Kit" /v CurrentVersion
! REG.EXE VERSION 3.0
HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Development Kit
CurrentVersion REG_SZ 1.7
C:\gmaps-apk-patcher-v2.7>REG QUERY "HKLM\Software\JavaSoft\Java Runtime Environment\1.7" /v JavaHome
! REG.EXE VERSION 3.0
HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment\1.7
JavaHome REG_SZ C:\Program Files\Java\jre7
C:\gmaps-apk-patcher-v2.7>REG QUERY "HKLM\Software\JavaSoft\Java Development Kit\1.7" /v JavaHome
! REG.EXE VERSION 3.0
HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Development Kit\1.7
JavaHome REG_SZ C:\Program Files\Java\jdk1.7.0_1303-01-14 09:09 AMLike 0 -
Error: Invalid key name
'chgcolor.exe' is not recognized as an internal or external command,
operable program or batch file.
'wtee' is not recognized as an internal or external command,
operable program or batch file.
I resolved those errors on my Windows XP / SP3:
1. I replaced 'chgcolor.exe' with 'color' AND I used lower-case hex digits (e.g., 'color 0f') in patch.bat
2. I temporarily added 'C:\gmaps-apk-patcher-v2.7.1\tools' into the global PATH variable
After I applied the aforementioned fixes, the errors are
C:\gmaps-apk-patcher-v2.7.1>patch
Error: The system was unable to find the specified registry key or value
Using: \bin\java
The system cannot find the path specified.
Error: A Java installation was not found, you cannot continue without it
USAGE:
patch.bat
or
patch.bat apk-file.apk
Press any key to continue . . .Last edited by eywong; 03-01-14 at 11:58 AM.
03-01-14 09:19 AMLike 0 - Nice to see you back, Christian, and thanks for the update. maybe it's just me, but i keep getting this error in CMD:-
C:\gmaps-apk-patcher-v2.7.1>patch.bat
ERROR: Invalid key name.
Type "REG QUERY /?" for usage.
'chgcolor.exe' is not recognized as an internal or external command,
operable program or batch file.
'wtee' is not recognized as an internal or external command,
operable program or batch file.
BTW, i'm running this on a windows 8 64bit PC.03-01-14 12:55 PMLike 0 - C:\gmaps-apk-patcher-v2.7.1>patch
Error: Invalid key name
'chgcolor.exe' is not recognized as an internal or external command,
operable program or batch file.
'wtee' is not recognized as an internal or external command,
operable program or batch file.
I resolved those errors on my Windows XP / SP3:
1. I replaced 'chgcolor.exe' with 'color' AND I used lower-case hex digits (e.g., 'color 0f') in patch.bat
2. I temporarily added 'C:\gmaps-apk-patcher-v2.7.1\tools' into the global PATH variable
After I applied the aforementioned fixes, the errors are
C:\gmaps-apk-patcher-v2.7.1>patch
Error: The system was unable to find the specified registry key or value
Using: \bin\java
The system cannot find the path specified.
Error: A Java installation was not found, you cannot continue without it
USAGE:
patch.bat
or
patch.bat apk-file.apk
Press any key to continue . . .03-01-14 12:58 PMLike 0 - Thank very much for the feedback. Here is version v2.7.2 with improved auto detect for java x86 or x64. Give it a try. Finger crossed
\Java\jre7 was unexpected at this time.
C:\gmaps-apk-patcher-v2.7.2>03-01-14 04:09 PMLike 0 -
1. Apparently reversed x86/x64 logic for setting JAVA_HOME (WOW6432Node is not in my x86 registry)
2. A trailing space in REG QUERY (right after the version number; apparently introduced by the trailing space in "SET JAVA_VERSION=%%B")
Is: REG QUERY "HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment\1.7 " /v JavaHome
Should be: REG QUERY "HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment\1.7" /v JavaHome
After I fixed those errors in my patch.bat, patching of one .apk went as I expected on my x86. (I have no x64 environment to test my changes.)03-01-14 04:46 PMLike 0 - I'm trying to get the Pokerstars apk to work on my blackberry, it shows "setting up for the first time" and it crashes..
So i decided to check if it has some google service attached, i used the this patch (version 2.7) and it built 2 apks, i installed both on my device but the app still crashes and closes itself..
I don't know what causes that, can i have some assistance here? there's any way i can discover what is causing the shutdown?
thanks in advance03-01-14 05:32 PMLike 0 - Thanks. See here (is just the patch.bat file, as zip, with your suggestion).
Edit 03-04-2014: Got warnings when I patched OpenTable v3.4.1.203 with v.2.7.3b-bat:
[REBUILDING APK]
I: Using Apktool 2.0.0-Beta9 on com.opentable-1013341
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'oauth_key' has no default translation in C:\gmaps-apk-patcher-v2.7.3\com.opentable-1013341\res; found: de
aapt: warning: string 'oauth_secret' has no default translation in C:\gmaps-apk-patcher-v2.7.3\com.opentable-1013341\res; found: de
aapt: warning: string 'opentable_continue_as_guest' has no default translation in C:\gmaps-apk-patcher-v2.7.3\com.opentable-1013341\res; found: de
aapt: warning: string 'partner_id' has no default translation in C:\gmaps-apk-patcher-v2.7.3\com.opentable-1013341\res; found: de
I: Building apk file...
I: Copying unknown files/dir...
(Done)Last edited by eywong; 03-05-14 at 01:00 AM.
03-01-14 05:46 PMLike 0 - It works ok on my WinXP PC. Thanks for your support.
Edit 03-04-2014: Got warnings when I patched OpenTable v3.4.1.203 with v.2.7.3b-bat:
[REBUILDING APK]
I: Using Apktool 2.0.0-Beta9 on com.opentable-1013341
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'oauth_key' has no default translation in C:\gmaps-apk-patcher-v2.7.3\com.opentable-1013341\res; found: de
aapt: warning: string 'oauth_secret' has no default translation in C:\gmaps-apk-patcher-v2.7.3\com.opentable-1013341\res; found: de
aapt: warning: string 'opentable_continue_as_guest' has no default translation in C:\gmaps-apk-patcher-v2.7.3\com.opentable-1013341\res; found: de
aapt: warning: string 'partner_id' has no default translation in C:\gmaps-apk-patcher-v2.7.3\com.opentable-1013341\res; found: de
I: Building apk file...
I: Copying unknown files/dir...
(Done)03-05-14 09:34 AMLike 0 - Hi everybody, got this error messaging trying to patch Car2Go apk (with patcher v2.7.3):
PROCESSING FILE: com.car2go-118.apk
PROCESSING MODE: AUTODETECT
DECOMPILE RESOURCES: [YES]
TRY TO REMOVE ADS: [NO]
DEBUG MODE: [NO]
[DECOMPILING APK]
I: Using Apktool 2.0.0-Beta9 on com.car2go-118.apk
I: Loading resource table...
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\gzerbinati\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling...
Cleaning up unclosed ZipFile for archive C:\Users\gzerbinati\apktool\framework\1
.apk
I: Copying assets and libs...
I: Copying unknown files/dir...
I: Copying original files...
(Done)
[CHECKING FOR GOOGLE DEPENDENCIES]
Google Maps API v1 detected
|
[PATCHING API v1]
[EXTRACTING ORIGINAL RSA/DSA CERTIFICATE]
7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
Processing archive: C:\Personali\BB_APPS_BAR\gmaps-apk-patcher-v2.7.3\com.car2go
-118.apk
Extracting META-INF\CERT.RSA
Everything is Ok
Size: 668
Compressed: 3552766
(Done)
[GENERATING MD5 FINGERPRINT]
c5b0623fb6a25d88bdaf3b592387d995
(Done)
[PATCHING ANDROID MANIFEST]
(Done)
[DECOMPILING GOOGLE MAPS]
I: Using Apktool 2.0.0-Beta9 on com.google.android.maps.jar
I: Baksmaling...
I: Copying assets and libs...
I: Copying unknown files/dir...
I: Copying original files...
(Done)
[COPYING GOOGLE MAPS RESOURCES]
214 File(s) copied
(Done)
[PATCHING MD5 SIGNATURE]
(Done)
[REBUILDING APK]
I: Using Apktool 2.0.0-Beta9 on com.car2go-118
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" org.jf.util.ExceptionWithContext: Unsigned short valu
e out of range: 66302
at org.jf.dexlib2.writer.DexDataWriter.writeUshort(De xDataWriter.java:11
6)
at org.jf.dexlib2.writer.InstructionWriter.write(Inst ructionWriter.java:
312)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexW riter.java:980)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeI tems(DexWriter.java
:759)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter. java:214)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter. java:192)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:58)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:41)
at brut.androlib.Androlib.buildSourcesSmali(Androlib. java:338)
at brut.androlib.Androlib.buildSources(Androlib.java: 299)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:236)
at brut.apktool.Main.main(Main.java:88)
(Done)
[SIGNING APK]
The system cannot find the file specified.
java.io.FileNotFoundException: com.car2go-118.apk (The system cannot find the fi
le specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at com.android.signapk.SignApk.main(SignApk.java:320)
The system cannot find the file specified.
(Done)
[CLEANING UP]
(Done)
Any suggestions?
Thanks a lot
G.03-05-14 12:58 PMLike 0
- Forum
- BlackBerry 10 Phones & OS
- More for your BlackBerry 10 Phone!
How to fix any Android app dependent on Google Maps API and make maps working
Similar Threads
-
Best Leak to Run on T-Mobile Network?
By AfroZepher in forum BlackBerry 10 OSReplies: 16Last Post: 01-21-15, 07:29 AM -
Manually program BB10 device to set MDN and MSID?
By onlinespending in forum BlackBerry 10 OSReplies: 3Last Post: 10-20-13, 12:26 PM -
My Z10 updated now I can't hook up to wifi
By Tony Stashuk in forum BlackBerry Z10Replies: 5Last Post: 10-19-13, 11:44 PM -
Used sachesi and SR version still says 4181??
By sinnar in forum BlackBerry 10 OSReplies: 4Last Post: 10-19-13, 08:18 PM
LINK TO POST COPIED TO CLIPBOARD