type
Post
status
Published
date
Jul 2, 2021
slug
summary
tags
category
icon
password
Firebase.Analytics导致的卡住问题
1.首先找到
FirebaseAnalytics => public static Void LogEvent(String name,Parameter[] parameters) GameAnalytics ===> public static Void NewProgressionEvent(GAProgressionStatus progressionStatus, String progression01) GA_Wrapper ===> public static Void AddErrorEvent(GAErrorSeverity severity, String message, System.Collections.Generic.IDictionary<System.String,System.Object> fields, Boolean mergeFields) GA_Debug ===> public static Void HandleLog(String logString, String stackTrace, LogType type) MaxSdkCallbacks ===> public Void ForwardEvent(String eventPropsStr)
等等类,hook打印出日志,以便于确认问题发生的位置
定位到错误代码的位置后直接修改指令 B 直接跳过这段Firebase相关的代码
{ v12 = a1; if ( !unk_2D26BD2 ) { sub_54EF58(&Firebase_Analytics_FirebaseAnalytics_TypeInfo); sub_54EF58(&GameplayController_TypeInfo); sub_54EF58(&Firebase_Analytics_Parameter___TypeInfo); sub_54EF58(&Firebase_Analytics_Parameter_TypeInfo); unk_2D26BD2 = 1; } v13 = *(v12 + 8); a6 = Save_LevelSaveData__GetLevel(0); v14 = (System_Int32__ToString)(&a6, 0); v15 = 2; if ( !v13 ) v15 = 3; GameAnalyticsSDK_GameAnalytics__NewProgressionEvent(v15, v14, 0); if ( !*(Firebase_Analytics_FirebaseAnalytics_TypeInfo + 116) ) il2cpp_runtime_class_init(); v16 = Firebase_Analytics_FirebaseAnalytics__get_EventLevelEnd(0); v17 = il2cpp_array_new_specific(Firebase_Analytics_Parameter___TypeInfo, 1); v18 = Firebase_Analytics_FirebaseAnalytics__get_ParameterLevel(0); v19 = Save_LevelSaveData__GetLevel(0); v20 = sub_54F070(Firebase_Analytics_Parameter_TypeInfo); if ( !v20 ) (sub_54F078)(); v21 = Firebase_Analytics_Parameter___ctor_8785552(v20, v18, v19, v19 >> 31); if ( v17 ) { if ( !v20 ) goto LABEL_15; } else { sub_54F078(v21); if ( !v20 ) goto LABEL_15; } if ( !sub_54F060(v20, *(*v17 + 32)) ) { v22 = sub_54F098(); sub_54F044(v22, 0); } LABEL_15: if ( !v17[3] ) sub_54F07C(); v17[4] = v20; sub_54EEFC(v17 + 4, v20); Firebase_Analytics_FirebaseAnalytics__LogEvent(v16, v17, 0); v23 = *(v12 + 8); if ( *(v12 + 8) ) { v24 = *(v12 + 12); if ( !v24 ) v23 = sub_54F078(v23); v25 = *(v24 + 16); if ( !v25 ) sub_54F078(v23); LevelController__IncreaseLevel(v25, 0, 0); } v26 = *(v12 + 16); if ( v26 ) v26 = (*(v26 + 12))(*(v26 + 32), *(v26 + 20)); v27 = *(v12 + 12); if ( !v27 ) sub_54F078(v26); v28 = *(v27 + 20); if ( v28 ) (*(v28 + 12))(*(v28 + 32), *(v12 + 8), *(v28 + 20)); if ( *(v12 + 20) ) { v29 = **(GameplayController_TypeInfo + 92); if ( v29 ) (*(v29 + 12))(*(v29 + 32), *(v29 + 20)); } v30 = 1; if ( !*(v12 + 8) ) v30 = 3; HapticManager__Haptic(v30); v31 = *(v12 + 8); if ( *(v12 + 8) ) { v32 = *(v12 + 12); if ( !v32 ) v31 = sub_54F078(v31); v33 = *(v32 + 64); if ( !v33 ) sub_54F078(v31); v31 = AudioController__RequestAudio(v33, 4, 0); } return a12(v31); }
变换为
{ v12 = a1; if ( !unk_2D26BD2 ) { sub_54EF58(&Firebase_Analytics_FirebaseAnalytics_TypeInfo); sub_54EF58(&GameplayController_TypeInfo); sub_54EF58(&Firebase_Analytics_Parameter___TypeInfo); sub_54EF58(&Firebase_Analytics_Parameter_TypeInfo); unk_2D26BD2 = 1; } v13 = *(v12 + 8); a6 = Save_LevelSaveData__GetLevel(0); v14 = (System_Int32__ToString)(&a6, 0); v15 = 2; // B pass this part of code ... Firebase_Analytics_FirebaseAnalytics__LogEvent(v16, v17, 0); v23 = *(v12 + 8); if ( *(v12 + 8) ) { v24 = *(v12 + 12); if ( !v24 ) v23 = sub_54F078(v23); v25 = *(v24 + 16); if ( !v25 ) sub_54F078(v23); LevelController__IncreaseLevel(v25, 0, 0); } v26 = *(v12 + 16); if ( v26 ) v26 = (*(v26 + 12))(*(v26 + 32), *(v26 + 20)); v27 = *(v12 + 12); if ( !v27 ) sub_54F078(v26); v28 = *(v27 + 20); if ( v28 ) (*(v28 + 12))(*(v28 + 32), *(v12 + 8), *(v28 + 20)); if ( *(v12 + 20) ) { v29 = **(GameplayController_TypeInfo + 92); if ( v29 ) (*(v29 + 12))(*(v29 + 32), *(v29 + 20)); } v30 = 1; if ( !*(v12 + 8) ) v30 = 3; HapticManager__Haptic(v30); v31 = *(v12 + 8); if ( *(v12 + 8) ) { v32 = *(v12 + 12); if ( !v32 ) v31 = sub_54F078(v31); v33 = *(v32 + 64); if ( !v33 ) sub_54F078(v31); v31 = AudioController__RequestAudio(v33, 4, 0); } return a12(v31); }
 
 
 
 
 
关于firebase卡住的问题还有可能是
 
// 0x7a40cc | APIManager (0xe637fb20) ===> public static Boolean get_IsConnected() manager->registerNop(0x7a40cc,HOOK_RET_NOP_1); // 0x84b67c | public Boolean get_IsInterstitialAdAvailable() // manager->registerNop(0x84b67c,HOOK_RET_NOP_1); // 0x7c4d84 | PersistentInterne.(0x969079f0,0x90b53228) ===> private Void IPChecker() manager->registerNop(0x7c4d84,HOOK_RET_NOP_1); /** * 2023-04-18 22:09:56.967 31097-31170 Unity com.Mahjong_Club_Test E InitializationException: Firebase modules failed to initialize: dynamic_links (missing dependency), messaging (missing dependency) at Firebase.FirebaseApp.CreateAndTrack (Firebase.FirebaseApp+CreateDelegate createDelegate, Firebase.FirebaseApp existingProxy) [0x00000] in <00000000000000000000000000000000>:0 at Firebase.Messaging.FirebaseMessaging+Listener..ctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.Messaging.FirebaseMessaging+Listener.Create () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.Messaging.FirebaseMessaging..cctor () [0x00000] in <00000000000000000000000000000000>:0 at MahjongClub.Managers.FirebaseManager.EnablePushNotifications () [0x00000] in <00000000000000000000000000000000>:0 at MahjongClub.Managers.LoadingSceneManager+<C_LoadGameData>d__28.MoveNext () [0x00000] in <00000000000000000000000000000000>:0 at MEC.Timing.Update () [0x00000] in <00000000000000000000000000000000>:0 Rethrow as TypeInitializationException: The type initial */ // 0x86153c | FirebaseManager @ 0x96cc8f80 | public Void EnablePushNotifications() manager->registerNop(0x86153c,HOOK_RET_NOP_1); // private static DependencyStatus CheckDependenciesInternal() 0x97F390 manager->registerHook(0x97F390, HOOK_SELF, *[](void *arg0, void *arg1, void *arg2, void *arg3, void *arg4) -> void * { void* ret = HookManager::srcCall(0x97F390, arg0, arg1, arg2, arg3, arg4); LOGD("called CheckDependenciesInternal %d",ret); return (void*)1; }); // IAPManager public Boolean get_IsInitialized() RP: 0x671ef0 manager->registerHook(0x671ef0, HOOK_SELF, *[](void *arg0, void *arg1, void *arg2, void *arg3, void *arg4) -> void * { return (void*)1; });
 
 
 
 
 
 
 
 
 
Generative Pre-trained TransformerImage Generation