From 107fba06df7626b59941d7e6a3c66754864c2f62 Mon Sep 17 00:00:00 2001 From: bonanza123 Date: Sun, 2 Aug 2015 17:40:22 +0200 Subject: [PATCH 1/7] Xposed API should only be linked --- app/build.gradle | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 13a46e2..a1986e5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -20,7 +20,6 @@ android { } dependencies { - compile fileTree(include: ['*.jar'], dir: 'libs') - compile 'com.android.support:appcompat-v7:22.1.1' - compile files('libs/XposedBridgeApi-20150213.jar') + provided fileTree(dir: 'libs', include: ['*.jar']) + compile 'com.android.support:appcompat-v7:22.1.1' } From 3de0fbab3f9d12b58adb8b498bf76f1b27516dd9 Mon Sep 17 00:00:00 2001 From: bonanza123 Date: Sun, 2 Aug 2015 18:31:06 +0200 Subject: [PATCH 2/7] added preliminary readme --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..1912d52 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# FakeGApps by thermatk + +Used in combinaton with [µg GmsCore](https://github.com/microg/android_packages_apps_GmsCore) to enable Google Cloud Messaging (GCM) and much more. + +## Installation + +* Install Xposed +** For Lollipop (5.1 and 5.1.1) from http://forum.xda-developers.com/xposed/super-alpha-posted-permission-xposed-t3072979 +** For Lollipop (5.0) from http://forum.xda-developers.com/showthread.php?t=3034811 +** For version below Lollipop using Xposed installer from http://repo.xposed.info/module/de.robv.android.xposed.installer +* Install this FakeGApps module (see 'releases') and enable it in Xposed Installer under 'Modules' +* Install FakeStore from http://own.darkcloud.ca:90/Android-Builds/ +* Install latest GmsCore build 'play-services-core-debug.apk' from http://files.brnmod.rocks/apps/GmsCore/Latest/ + +Note: to enable GCM e.g for messaging apps like Threema or Textsecure, you have to update / install the same apk once again to allow then to obtain the GCM related permissions. + +GCM can be tested using e.g. https://play.google.com/store/apps/details?id=com.firstrowria.pushnotificationtester&hl=en which is also downloadble from http://apps.evozi.com/apk-downloader/?id=com.firstrowria.pushnotificationtester \ No newline at end of file From 176b4a0b2a6c0f4516a82e12b72f34003a9878c6 Mon Sep 17 00:00:00 2001 From: bonanza123 Date: Sun, 2 Aug 2015 18:32:13 +0200 Subject: [PATCH 3/7] fixed README listing --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1912d52..e7418fe 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ Used in combinaton with [µg GmsCore](https://github.com/microg/android_packages ## Installation * Install Xposed -** For Lollipop (5.1 and 5.1.1) from http://forum.xda-developers.com/xposed/super-alpha-posted-permission-xposed-t3072979 -** For Lollipop (5.0) from http://forum.xda-developers.com/showthread.php?t=3034811 -** For version below Lollipop using Xposed installer from http://repo.xposed.info/module/de.robv.android.xposed.installer +..* For Lollipop (5.1 and 5.1.1) from http://forum.xda-developers.com/xposed/super-alpha-posted-permission-xposed-t3072979 +..* For Lollipop (5.0) from http://forum.xda-developers.com/showthread.php?t=3034811 +..* For version below Lollipop using Xposed installer from http://repo.xposed.info/module/de.robv.android.xposed.installer * Install this FakeGApps module (see 'releases') and enable it in Xposed Installer under 'Modules' * Install FakeStore from http://own.darkcloud.ca:90/Android-Builds/ * Install latest GmsCore build 'play-services-core-debug.apk' from http://files.brnmod.rocks/apps/GmsCore/Latest/ From 30d88305f769ffeb7ffe132e7f881d2a2d36926d Mon Sep 17 00:00:00 2001 From: bonanza123 Date: Sun, 2 Aug 2015 18:32:48 +0200 Subject: [PATCH 4/7] fixed README listing --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e7418fe..202cff6 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,11 @@ Used in combinaton with [µg GmsCore](https://github.com/microg/android_packages ## Installation * Install Xposed + ..* For Lollipop (5.1 and 5.1.1) from http://forum.xda-developers.com/xposed/super-alpha-posted-permission-xposed-t3072979 ..* For Lollipop (5.0) from http://forum.xda-developers.com/showthread.php?t=3034811 ..* For version below Lollipop using Xposed installer from http://repo.xposed.info/module/de.robv.android.xposed.installer + * Install this FakeGApps module (see 'releases') and enable it in Xposed Installer under 'Modules' * Install FakeStore from http://own.darkcloud.ca:90/Android-Builds/ * Install latest GmsCore build 'play-services-core-debug.apk' from http://files.brnmod.rocks/apps/GmsCore/Latest/ From 60dc254b4c24e71c2b1100345629130cc2fefb7f Mon Sep 17 00:00:00 2001 From: bonanza123 Date: Sun, 2 Aug 2015 18:33:50 +0200 Subject: [PATCH 5/7] fixed README listing --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 202cff6..eb7a5bc 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,11 @@ Used in combinaton with [µg GmsCore](https://github.com/microg/android_packages * Install Xposed -..* For Lollipop (5.1 and 5.1.1) from http://forum.xda-developers.com/xposed/super-alpha-posted-permission-xposed-t3072979 -..* For Lollipop (5.0) from http://forum.xda-developers.com/showthread.php?t=3034811 -..* For version below Lollipop using Xposed installer from http://repo.xposed.info/module/de.robv.android.xposed.installer +..+ For Lollipop (5.1 and 5.1.1) from http://forum.xda-developers.com/xposed/super-alpha-posted-permission-xposed-t3072979 + +..+ For Lollipop (5.0) from http://forum.xda-developers.com/showthread.php?t=3034811 + +..+ For version below Lollipop using Xposed installer from http://repo.xposed.info/module/de.robv.android.xposed.installer * Install this FakeGApps module (see 'releases') and enable it in Xposed Installer under 'Modules' * Install FakeStore from http://own.darkcloud.ca:90/Android-Builds/ From db9ece9edc35ab481ece10eb68cf60d70bb1aa64 Mon Sep 17 00:00:00 2001 From: bonanza123 Date: Mon, 3 Aug 2015 21:04:55 +0200 Subject: [PATCH 6/7] Catch Null-pointer --- .../android/xf/fakegapps/FakeSignatures.java | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/thermatk/android/xf/fakegapps/FakeSignatures.java b/app/src/main/java/com/thermatk/android/xf/fakegapps/FakeSignatures.java index 69c81cc..2b0e456 100644 --- a/app/src/main/java/com/thermatk/android/xf/fakegapps/FakeSignatures.java +++ b/app/src/main/java/com/thermatk/android/xf/fakegapps/FakeSignatures.java @@ -10,23 +10,26 @@ public class FakeSignatures implements IXposedHookZygoteInit { @Override public void initZygote(StartupParam startupParam) throws Throwable { - - + final Class PackageParser = XposedHelpers.findClass("android.content.pm.PackageParser", null); XposedBridge.hookAllMethods(PackageParser, "generatePackageInfo", new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { PackageInfo pi = (PackageInfo) param.getResult(); - String packageName = pi.packageName; - if (packageName.contains("com.google.android.gms") || packageName.contains("com.android.vending")) { - XposedBridge.log("faked signature"); - String sig = "308204433082032ba003020102020900c2e08746644a308d300d06092a864886f70d01010405003074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f6964301e170d3038303832313233313333345a170d3336303130373233313333345a3074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f696430820120300d06092a864886f70d01010105000382010d00308201080282010100ab562e00d83ba208ae0a966f124e29da11f2ab56d08f58e2cca91303e9b754d372f640a71b1dcb130967624e4656a7776a92193db2e5bfb724a91e77188b0e6a47a43b33d9609b77183145ccdf7b2e586674c9e1565b1f4c6a5955bff251a63dabf9c55c27222252e875e4f8154a645f897168c0b1bfc612eabf785769bb34aa7984dc7e2ea2764cae8307d8c17154d7ee5f64a51a44a602c249054157dc02cd5f5c0e55fbef8519fbe327f0b1511692c5a06f19d18385f5c4dbc2d6b93f68cc2979c70e18ab93866b3bd5db8999552a0e3b4c99df58fb918bedc182ba35e003c1b4b10dd244a8ee24fffd333872ab5221985edab0fc0d0b145b6aa192858e79020103a381d93081d6301d0603551d0e04160414c77d8cc2211756259a7fd382df6be398e4d786a53081a60603551d2304819e30819b8014c77d8cc2211756259a7fd382df6be398e4d786a5a178a4763074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f6964820900c2e08746644a308d300c0603551d13040530030101ff300d06092a864886f70d010104050003820101006dd252ceef85302c360aaace939bcff2cca904bb5d7a1661f8ae46b2994204d0ff4a68c7ed1a531ec4595a623ce60763b167297a7ae35712c407f208f0cb109429124d7b106219c084ca3eb3f9ad5fb871ef92269a8be28bf16d44c8d9a08e6cb2f005bb3fe2cb96447e868e731076ad45b33f6009ea19c161e62641aa99271dfd5228c5c587875ddb7f452758d661f6cc0cccb7352e424cc4365c523532f7325137593c4ae341f4db41edda0d0b1071a7c440f0fe9ea01cb627ca674369d084bd2fd911ff06cdbf2cfa10dc0f893ae35762919048c7efc64c7144178342f70581c9de573af55b390dd7fdb9418631895d5f759f30112687ff621410c069308a"; + if ( pi == null ) { + // XposedBridge.log("FakeGApps: Null pointer captured"); + } else { + String packageName = pi.packageName; + if (packageName.contains("com.google.android.gms") || packageName.contains("com.android.vending")) { + XposedBridge.log("FakeGApps: faked signature"); + String sig = "308204433082032ba003020102020900c2e08746644a308d300d06092a864886f70d01010405003074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f6964301e170d3038303832313233313333345a170d3336303130373233313333345a3074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f696430820120300d06092a864886f70d01010105000382010d00308201080282010100ab562e00d83ba208ae0a966f124e29da11f2ab56d08f58e2cca91303e9b754d372f640a71b1dcb130967624e4656a7776a92193db2e5bfb724a91e77188b0e6a47a43b33d9609b77183145ccdf7b2e586674c9e1565b1f4c6a5955bff251a63dabf9c55c27222252e875e4f8154a645f897168c0b1bfc612eabf785769bb34aa7984dc7e2ea2764cae8307d8c17154d7ee5f64a51a44a602c249054157dc02cd5f5c0e55fbef8519fbe327f0b1511692c5a06f19d18385f5c4dbc2d6b93f68cc2979c70e18ab93866b3bd5db8999552a0e3b4c99df58fb918bedc182ba35e003c1b4b10dd244a8ee24fffd333872ab5221985edab0fc0d0b145b6aa192858e79020103a381d93081d6301d0603551d0e04160414c77d8cc2211756259a7fd382df6be398e4d786a53081a60603551d2304819e30819b8014c77d8cc2211756259a7fd382df6be398e4d786a5a178a4763074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f6964820900c2e08746644a308d300c0603551d13040530030101ff300d06092a864886f70d010104050003820101006dd252ceef85302c360aaace939bcff2cca904bb5d7a1661f8ae46b2994204d0ff4a68c7ed1a531ec4595a623ce60763b167297a7ae35712c407f208f0cb109429124d7b106219c084ca3eb3f9ad5fb871ef92269a8be28bf16d44c8d9a08e6cb2f005bb3fe2cb96447e868e731076ad45b33f6009ea19c161e62641aa99271dfd5228c5c587875ddb7f452758d661f6cc0cccb7352e424cc4365c523532f7325137593c4ae341f4db41edda0d0b1071a7c440f0fe9ea01cb627ca674369d084bd2fd911ff06cdbf2cfa10dc0f893ae35762919048c7efc64c7144178342f70581c9de573af55b390dd7fdb9418631895d5f759f30112687ff621410c069308a"; - Signature[] signatures = new Signature[] {new Signature(sig)}; - pi.signatures = signatures; - param.setResult(pi); + Signature[] signatures = new Signature[] {new Signature(sig)}; + pi.signatures = signatures; + param.setResult(pi); - } + } + } } }); } From 4900730a9245c906ed9fbb31df7e5b99631b11ca Mon Sep 17 00:00:00 2001 From: bonanza123 Date: Mon, 3 Aug 2015 22:21:14 +0200 Subject: [PATCH 7/7] fixed markdown. Sorry --- README.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index eb7a5bc..6cbebc6 100644 --- a/README.md +++ b/README.md @@ -2,20 +2,26 @@ Used in combinaton with [µg GmsCore](https://github.com/microg/android_packages_apps_GmsCore) to enable Google Cloud Messaging (GCM) and much more. -## Installation +This tutorial describes only the installation process to get GCM working. The also avaiable Google Play Store replacement Blankstore is not discussed here. -* Install Xposed +## Installation for Android with root access and without Gapps -..+ For Lollipop (5.1 and 5.1.1) from http://forum.xda-developers.com/xposed/super-alpha-posted-permission-xposed-t3072979 +* Install Xposed + * For Lollipop (5.1 and 5.1.1) from http://forum.xda-developers.com/xposed/super-alpha-posted-permission-xposed-t3072979 -..+ For Lollipop (5.0) from http://forum.xda-developers.com/showthread.php?t=3034811 + * For Lollipop (5.0) from http://forum.xda-developers.com/showthread.php?t=3034811 -..+ For version below Lollipop using Xposed installer from http://repo.xposed.info/module/de.robv.android.xposed.installer + * For version below Lollipop using Xposed installer from http://repo.xposed.info/module/de.robv.android.xposed.installer * Install this FakeGApps module (see 'releases') and enable it in Xposed Installer under 'Modules' -* Install FakeStore from http://own.darkcloud.ca:90/Android-Builds/ +* Install FakeStore from http://own.darkcloud.ca:90/Android-Builds/ * Install latest GmsCore build 'play-services-core-debug.apk' from http://files.brnmod.rocks/apps/GmsCore/Latest/ -Note: to enable GCM e.g for messaging apps like Threema or Textsecure, you have to update / install the same apk once again to allow then to obtain the GCM related permissions. +Note: to enable GCM e.g for messaging apps like Threema or Textsecure, you have to update / install the same apk once again to allow them to obtain the GCM related permissions. + +GCM can be tested using e.g. https://play.google.com/store/apps/details?id=com.firstrowria.pushnotificationtester&hl=en which is also downloadble from http://apps.evozi.com/apk-downloader/?id=com.firstrowria.pushnotificationtester + + +## Untested ways to remove Gapps -GCM can be tested using e.g. https://play.google.com/store/apps/details?id=com.firstrowria.pushnotificationtester&hl=en which is also downloadble from http://apps.evozi.com/apk-downloader/?id=com.firstrowria.pushnotificationtester \ No newline at end of file +The procedure described [here](http://hex.ro/wp/blog/removing-gapps-from-cyanogenmod-11/) for removing Gapps from CM11 should also work for other ROMs where Gapps has been installed using a flashable zip. \ No newline at end of file