I notice some features missing or did not work in the patched version, and when I look at the logcat output, it seems to have something to do with firebase:
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: Failed to get FIS auth token
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: java.util.concurrent.ExecutionException: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.android.gms.tasks.Tasks.zza(com.google.android.gms:play-services-tasks@@18.4.0:5)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.android.gms.tasks.Tasks.await(com.google.android.gms:play-services-tasks@@18.4.0:9)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.messaging.GmsRpc.setDefaultAttributesToBundle(GmsRpc.java:280)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.messaging.GmsRpc.startRpc(GmsRpc.java:242)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.messaging.GmsRpc.getToken(GmsRpc.java:192)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.messaging.FirebaseMessaging.lambda$blockingGetToken$14$com-google-firebase-messaging-FirebaseMessaging(FirebaseMessaging.java:650)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.messaging.FirebaseMessaging$$ExternalSyntheticLambda14.start(D8$$SyntheticClass:0)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.messaging.RequestDeduplicator.getOrStartGetTokenRequest(RequestDeduplicator.java:67)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.messaging.FirebaseMessaging.blockingGetToken(FirebaseMessaging.java:646)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.messaging.FirebaseMessaging.lambda$getToken$7$com-google-firebase-messaging-FirebaseMessaging(FirebaseMessaging.java:420)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.messaging.FirebaseMessaging$$ExternalSyntheticLambda11.run(D8$$SyntheticClass:0)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at java.util.concurrent.FutureTask.run(FutureTask.java:264)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.9.0:2)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at java.lang.Thread.run(Thread.java:1012)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: Caused by: com.google.firebase.installations.FirebaseInstallationsException: Firebase Installations Service is unavailable. Please try again later.
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.createFirebaseInstallation(FirebaseInstallationServiceClient.java:154)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.installations.FirebaseInstallations.registerFidWithServer(FirebaseInstallations.java:533)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:387)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$3$com-google-firebase-installations-FirebaseInstallations(FirebaseInstallations.java:372)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.installations.FirebaseInstallations$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.concurrent.SequentialExecutor$1.run(SequentialExecutor.java:117)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.concurrent.SequentialExecutor$QueueWorker.workOnQueue(SequentialExecutor.java:229)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.concurrent.SequentialExecutor$QueueWorker.run(SequentialExecutor.java:174)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.concurrent.CustomThreadFactory.lambda$newThread$0$com-google-firebase-concurrent-CustomThreadFactory(CustomThreadFactory.java:47)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: at com.google.firebase.concurrent.CustomThreadFactory$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
07-15 11:33:24.133 14073 14142 E FirebaseMessaging: ... 1 more
I'm not sure what's going on here, please help me.
$ apk-mitm base.apk
╭ apk-mitm v1.3.0
├ apktool v2.9.3
╰ uber-apk-signer v1.3.0
Using temporary directory:
/tmp/apk-mitm-99518934ae356ca1b4ae3000bf360d30
✔ Checking prerequisities
✔ Decoding APK file
✔ Applying patches
✔ Encoding patched APK file
✔ Signing patched APK file
WARNING
This app seems to be using Android App Bundle which means that you
will likely run into problems installing it. That's because this app
is made out of multiple APK files and you've only got one of them.
If you want to patch an app like this with apk-mitm, you'll have to
supply it with all the APKs. You have two options for doing this:
– download a *.xapk file (for example from https://apkpure.com
– export a *.apks file (using https://github.com/Aefyr/SAI
You can then run apk-mitm again with that file to patch the bundle.
Done! Patched file: ./base-patched.apk
$ keytool -genkey -v -keystore my-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias
Enter keystore password:
Re-enter new password:
Enter the distinguished name. Provide a single dot (.) to leave a sub-component empty or press ENTER to use the default value in braces.
What is your first and last name?
[Unknown]:
What is the name of your organizational unit?
[Unknown]:
What is the name of your organization?
[Unknown]:
What is the name of your City or Locality?
[Unknown]:
What is the name of your State or Province?
[Unknown]:
What is the two-letter country code for this unit?
[Unknown]:
Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?
[no]: yes
$ apksigner sign --ks my-key.jks base-patched.apk
Keystore password for signer #1:
$ apksigner sign --ks my-key.jks split_config.arm64_v8a.apk
Keystore password for signer #1:
$ apksigner sign --ks my-key.jks split_config.xxhdpi.apk
Keystore password for signer #1:
$ adb install-multiple base-patched.apk split_config.arm64_v8a.apk split_config.xxhdpi.apk
Performing Incremental Install
Serving...
All files should be loaded. Notifying the device.
Success
Install command complete in 11376 ms
I notice some features missing or did not work in the patched version, and when I look at the logcat output, it seems to have something to do with firebase:
I'm not sure what's going on here, please help me.