Compare commits

..

8 Commits

Author SHA1 Message Date
Kain344 0f3bd04cc2 FIX: fix stuck when replace lineup
Build / build (push) Successful in 4m0s
2026-04-07 20:49:45 +07:00
Kain344 2410cf9c82 UPDATE: v4
Build / build (push) Successful in 4m44s
2026-04-07 16:25:11 +07:00
Kain344 916effa20c UPDATE: Real map fix
Build / build (push) Successful in 4m18s
2026-04-04 00:10:47 +07:00
Kain344 5de6d0ac34 UPDATE: Fix bug
Build / build (push) Successful in 8m56s
2026-04-03 17:59:30 +07:00
Kain344 173d224978 UPDATE: Fix load map
Build / build (push) Successful in 3m49s
2026-04-02 01:10:56 +07:00
Kain344 fa5c630c2b UPDATE: New data
Build / build (push) Successful in 4m39s
2026-03-31 12:46:26 +07:00
Kain344 8b9b373229 init
Build / build (push) Successful in 4m13s
2026-03-23 21:33:21 +07:00
Kain344 a72b8ecec3 Initial commit 2026-03-23 14:21:46 +00:00
51 changed files with 7665 additions and 11236 deletions
+1
View File
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" /> <component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="jbr-21" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
Binary file not shown.
+18 -244
View File
@@ -1,32 +1,32 @@
{ {
"leader": 2, "leader": 0,
"lineups": { "lineups": {
"0": 1409, "0": 1415,
"1": 1407, "1": 1407,
"2": 1406, "2": 1409,
"3": 1403 "3": 1413
}, },
"position": { "position": {
"x": -4030, "x": -38,
"z": -13006, "z": 91788,
"y": 0, "y": -2052,
"rot_y": 270000 "rot_y": 0
}, },
"scene": { "scene": {
"plane_id": 10000, "plane_id": 10341,
"floor_id": 10000000, "floor_id": 10341001,
"entry_id": 100000104 "entry_id": 1034102
}, },
"player_outfit": [ "player_outfit": [
1003 1003
], ],
"char_path": { "char_path": {
"main": 8008, "main": 8010,
"march_7": 1224 "march_7": 1224
}, },
"char_enhanced": { "char_enhanced": {
"1004": 1, "1004": 1,
"1005": 0, "1005": 1,
"1006": 1, "1006": 1,
"1102": 1, "1102": 1,
"1205": 1, "1205": 1,
@@ -39,186 +39,17 @@
"challenge": { "challenge": {
"challenge_id": 0, "challenge_id": 0,
"skip_half": 0, "skip_half": 0,
"random_seed": 0,
"blessings": [], "blessings": [],
"is_in_challenge": false, "is_in_challenge": false,
"current_stage_id": 0, "current_stage_id": 30122121,
"path_resonance_id": 0, "path_resonance_id": 0,
"maze_buff": 0, "maze_buff": 0,
"first_lineup": [], "first_lineup": [],
"second_lineup": [] "second_lineup": []
}, },
"challenge_tierce": {
"challenge_id": 0,
"current_stage_id": 0,
"maze_buff": 0,
"path_resonance_id": 0,
"is_in_challenge": false,
"is_single_stage": false,
"challenge_tierce_data": {
"20245": {
"stage_1": {
"blessing": 3031361,
"cycle_count": 0,
"battle_status": 1,
"DeadCount": 0,
"score": 40000,
"lineup": [
1407,
1413,
1415,
1409
]
},
"stage_2": {
"blessing": 3031361,
"cycle_count": 0,
"battle_status": 1,
"DeadCount": 0,
"score": 40000,
"lineup": [
1310,
1225,
1321,
1222
]
},
"stage_3": {
"blessing": 3031362,
"cycle_count": 0,
"battle_status": 1,
"DeadCount": 0,
"score": 40000,
"lineup": [
1506,
1502,
1501,
1217
]
}
},
"30185": {
"stage_1": {
"blessing": 3111090,
"cycle_count": 0,
"battle_status": 1,
"DeadCount": 0,
"score": 3932,
"lineup": [
1501,
1502,
1414,
1506
]
},
"stage_2": {
"blessing": 3111085,
"cycle_count": 0,
"battle_status": 1,
"DeadCount": 0,
"score": 3913,
"lineup": [
1310,
1225,
1303,
1321
]
},
"stage_3": {
"blessing": 3111071,
"cycle_count": 0,
"battle_status": 1,
"DeadCount": 0,
"score": 4000,
"lineup": [
1415,
1413,
1407,
1409
]
}
},
"5213": {
"stage_1": {
"blessing": 0,
"cycle_count": 0,
"battle_status": 1,
"DeadCount": 0,
"score": 0,
"lineup": [
1407,
1413,
1415,
1409
]
},
"stage_2": {
"blessing": 0,
"cycle_count": 1,
"battle_status": 1,
"DeadCount": 0,
"score": 0,
"lineup": [
1310,
1321,
1225,
1222
]
},
"stage_3": {
"blessing": 0,
"cycle_count": 0,
"battle_status": 1,
"DeadCount": 0,
"score": 0,
"lineup": [
1506,
1502,
1501,
1414
]
}
},
"5313": {
"stage_1": {
"blessing": 0,
"cycle_count": 0,
"battle_status": 3,
"DeadCount": 0,
"score": 0,
"lineup": [
1510,
8001,
1004,
1414
]
},
"stage_2": {
"blessing": 0,
"cycle_count": 0,
"battle_status": 0,
"DeadCount": 0,
"score": 0,
"lineup": [
1302
]
},
"stage_3": {
"blessing": 0,
"cycle_count": 0,
"battle_status": 0,
"DeadCount": 0,
"score": 0,
"lineup": [
1321
]
}
}
}
},
"challenge_peak": { "challenge_peak": {
"current_mode": "Knight", "current_mode": "Boss",
"group_id": 8, "group_id": 6,
"is_in_challenge_peak": false, "is_in_challenge_peak": false,
"challenge_peak_data": { "challenge_peak_data": {
"1": { "1": {
@@ -478,60 +309,6 @@
} }
] ]
} }
},
"7": {
"checkmate_data": {
"challenge_id": 704,
"blessing": 3033061,
"lineup": [
1505,
1502,
1414,
1410
],
"stage_id": 30507021,
"is_hard_mode": false
},
"knight_data": {
"current_challenge_id": 703,
"details_data": [
{
"lineup": [
1414
],
"stage_id": 30507011,
"challenge_id": 701
},
{
"lineup": [
1501
],
"stage_id": 30507012,
"challenge_id": 702
},
{
"lineup": [
1507,
1222
],
"stage_id": 30507013,
"challenge_id": 703
}
]
}
},
"8": {
"checkmate_data": {
"challenge_id": 0,
"blessing": 0,
"lineup": null,
"stage_id": 0,
"is_hard_mode": false
},
"knight_data": {
"current_challenge_id": 0,
"details_data": null
}
} }
} }
}, },
@@ -551,8 +328,7 @@
}, },
"cycle_count": 1, "cycle_count": 1,
"stage_id": 30118121, "stage_id": 30118121,
"mode": false, "mode": false
"custom_lineup": []
}, },
"profile_data": { "profile_data": {
"cur_chat_bubble_id": 220009, "cur_chat_bubble_id": 220009,
@@ -575,9 +351,7 @@
}, },
"skin_data": { "skin_data": {
"1001": 1100101, "1001": 1100101,
"1310": 1131001, "1310": 1131001
"1407": 1140701,
"1415": 1141501
}, },
"extra_setting": { "extra_setting": {
"censorship": false, "censorship": false,
File diff suppressed because it is too large Load Diff
+147 -147
View File
@@ -1,170 +1,170 @@
{ {
"CNBETAAndroid4.3.51": { "CNBETAAndroid4.1.51": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15261247_f6e6db2125cf_369da465b36faf", "asset_bundle_url": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14372365_fa78e03ad599_36972b4e3bb553",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15235885_6091fd15561a_83828f542dc1f3", "asset_bundle_url_b": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14352532_e3dee8767e70_9fd758f12171f5",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15265964_c2fbb1eb05fc_f2238199ee2b6e", "ex_resource_url": "https://autopatchcn.bhsr.com/design_data/BetaLive/output_14394020_12e3f0c6a002_07566508dd1394",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15242148_d40f856defc0_599b68a0adf7bd", "lua_url": "https://autopatchcn.bhsr.com/lua/BetaLive/output_14358961_e055a63b3c34_b199a0234548b5",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15265964_799df4f0ecef_5a94550ba64cff" "ifix_url": "https://autopatchcn.bhsr.com/ifix/BetaLive/output_14374543_04d971175704_ab00cb3f54bb00"
}, },
"CNBETAAndroid4.3.52": { "CNBETAAndroid4.1.52": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15305566_fea016d35145_54bbf8ab4009f5", "asset_bundle_url": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14420305_7a74f0e95f84_edf69bcd963b3a",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15305566_fea016d35145_54bbf8ab4009f5", "asset_bundle_url_b": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14420305_7a74f0e95f84_edf69bcd963b3a",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15318724_a7af31327e74_b3328eb95329b2", "ex_resource_url": "https://autopatchcn.bhsr.com/design_data/BetaLive/output_14427120_6f7bdcd832cf_5c861411529529",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15305751_09783637ccc4_d16f9c81138ab3", "lua_url": "https://autopatchcn.bhsr.com/lua/BetaLive/output_14426018_808f7828fdd4_646eb1de0d5580",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15265964_799df4f0ecef_5a94550ba64cff" "ifix_url": "https://autopatchcn.bhsr.com/ifix/BetaLive/output_14460274_5ed5ff5977db_299d2e7b72efe8"
}, },
"CNBETAAndroid4.3.53": { "CNBETAAndroid4.1.53": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15378434_99bffafdeff7_5d97713dcef07f", "asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_14511152_92f232b7216a_602de31e31b1a4",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15378434_99bffafdeff7_5d97713dcef07f", "asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_14511152_92f232b7216a_602de31e31b1a4",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15385668_07011a79dadf_1111728953724e", "ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_14536466_eef3376243be_0b6e5633eb67ac",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15378559_7514340ac82f_70dad6c56b8bc7", "lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_14527836_2bed15e185c1_05d2c57e28ff4e",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15384138_4e4be8cf97ac_1e3fcfa0a93bef"
},
"CNBETAAndroid4.3.54": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15440751_fb99372e1e48_fd11e486274779",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15440751_fb99372e1e48_fd11e486274779",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15458669_4c52952d593d_b0ff025e410c5b",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15440843_4201511c48d0_34717e44c82e30",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4" "ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4"
}, },
"CNBETAWin4.3.51": { "CNBETAAndroid4.1.54": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15261247_f6e6db2125cf_369da465b36faf", "asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_14608970_b10116831d46_f4a480ee801414",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15235885_6091fd15561a_83828f542dc1f3", "asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_14608970_b10116831d46_f4a480ee801414",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15265964_c2fbb1eb05fc_f2238199ee2b6e", "ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_14611439_56f651a0b674_84a023d793fd76",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15242148_d40f856defc0_599b68a0adf7bd", "lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_14609090_1218af71d445_3d7b85e94ad21f",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15265964_799df4f0ecef_5a94550ba64cff"
},
"CNBETAWin4.3.52": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15305566_fea016d35145_54bbf8ab4009f5",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15305566_fea016d35145_54bbf8ab4009f5",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15318724_a7af31327e74_b3328eb95329b2",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15305751_09783637ccc4_d16f9c81138ab3",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15265964_799df4f0ecef_5a94550ba64cff"
},
"CNBETAWin4.3.53": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15378434_99bffafdeff7_5d97713dcef07f",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15378434_99bffafdeff7_5d97713dcef07f",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15385668_07011a79dadf_1111728953724e",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15378559_7514340ac82f_70dad6c56b8bc7",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15384138_4e4be8cf97ac_1e3fcfa0a93bef"
},
"CNBETAWin4.3.54": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15440751_fb99372e1e48_fd11e486274779",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15440751_fb99372e1e48_fd11e486274779",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15458669_4c52952d593d_b0ff025e410c5b",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15440843_4201511c48d0_34717e44c82e30",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4" "ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4"
}, },
"CNBETAiOS4.3.51": { "CNBETAWin4.1.51": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15261247_f6e6db2125cf_369da465b36faf", "asset_bundle_url": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14372365_fa78e03ad599_36972b4e3bb553",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15235885_6091fd15561a_83828f542dc1f3", "asset_bundle_url_b": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14352532_e3dee8767e70_9fd758f12171f5",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15265964_c2fbb1eb05fc_f2238199ee2b6e", "ex_resource_url": "https://autopatchcn.bhsr.com/design_data/BetaLive/output_14394020_12e3f0c6a002_07566508dd1394",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15242148_d40f856defc0_599b68a0adf7bd", "lua_url": "https://autopatchcn.bhsr.com/lua/BetaLive/output_14358961_e055a63b3c34_b199a0234548b5",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15265964_799df4f0ecef_5a94550ba64cff" "ifix_url": "https://autopatchcn.bhsr.com/ifix/BetaLive/output_14374543_04d971175704_ab00cb3f54bb00"
}, },
"CNBETAiOS4.3.52": { "CNBETAWin4.1.52": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15305566_fea016d35145_54bbf8ab4009f5", "asset_bundle_url": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14420305_7a74f0e95f84_edf69bcd963b3a",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15305566_fea016d35145_54bbf8ab4009f5", "asset_bundle_url_b": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14420305_7a74f0e95f84_edf69bcd963b3a",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15318724_a7af31327e74_b3328eb95329b2", "ex_resource_url": "https://autopatchcn.bhsr.com/design_data/BetaLive/output_14427120_6f7bdcd832cf_5c861411529529",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15305751_09783637ccc4_d16f9c81138ab3", "lua_url": "https://autopatchcn.bhsr.com/lua/BetaLive/output_14426018_808f7828fdd4_646eb1de0d5580",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15265964_799df4f0ecef_5a94550ba64cff" "ifix_url": "https://autopatchcn.bhsr.com/ifix/BetaLive/output_14460274_5ed5ff5977db_299d2e7b72efe8"
}, },
"CNBETAiOS4.3.53": { "CNBETAWin4.1.53": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15378434_99bffafdeff7_5d97713dcef07f", "asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_14511152_92f232b7216a_602de31e31b1a4",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15378434_99bffafdeff7_5d97713dcef07f", "asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_14511152_92f232b7216a_602de31e31b1a4",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15385668_07011a79dadf_1111728953724e", "ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_14536466_eef3376243be_0b6e5633eb67ac",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15378559_7514340ac82f_70dad6c56b8bc7", "lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_14527836_2bed15e185c1_05d2c57e28ff4e",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15384138_4e4be8cf97ac_1e3fcfa0a93bef"
},
"CNBETAiOS4.3.54": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15440751_fb99372e1e48_fd11e486274779",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15440751_fb99372e1e48_fd11e486274779",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15458669_4c52952d593d_b0ff025e410c5b",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15440843_4201511c48d0_34717e44c82e30",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4" "ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4"
}, },
"OSBETAAndroid4.3.51": { "CNBETAWin4.1.54": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15261247_f6e6db2125cf_369da465b36faf", "asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_14608970_b10116831d46_f4a480ee801414",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15235885_6091fd15561a_83828f542dc1f3", "asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_14608970_b10116831d46_f4a480ee801414",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15265964_c2fbb1eb05fc_f2238199ee2b6e", "ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_14611439_56f651a0b674_84a023d793fd76",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15242148_d40f856defc0_599b68a0adf7bd", "lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_14609090_1218af71d445_3d7b85e94ad21f",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15265964_799df4f0ecef_5a94550ba64cff"
},
"OSBETAAndroid4.3.52": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15305566_fea016d35145_54bbf8ab4009f5",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15305566_fea016d35145_54bbf8ab4009f5",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15318724_a7af31327e74_b3328eb95329b2",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15305751_09783637ccc4_d16f9c81138ab3",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15265964_799df4f0ecef_5a94550ba64cff"
},
"OSBETAAndroid4.3.53": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15378434_99bffafdeff7_5d97713dcef07f",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15378434_99bffafdeff7_5d97713dcef07f",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15385668_07011a79dadf_1111728953724e",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15378559_7514340ac82f_70dad6c56b8bc7",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15384138_4e4be8cf97ac_1e3fcfa0a93bef"
},
"OSBETAAndroid4.3.54": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15440751_fb99372e1e48_fd11e486274779",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15440751_fb99372e1e48_fd11e486274779",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15458669_4c52952d593d_b0ff025e410c5b",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15440843_4201511c48d0_34717e44c82e30",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4" "ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4"
}, },
"OSBETAWin4.3.51": { "CNBETAiOS4.1.51": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15261247_f6e6db2125cf_369da465b36faf", "asset_bundle_url": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14372365_fa78e03ad599_36972b4e3bb553",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15235885_6091fd15561a_83828f542dc1f3", "asset_bundle_url_b": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14352532_e3dee8767e70_9fd758f12171f5",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15265964_c2fbb1eb05fc_f2238199ee2b6e", "ex_resource_url": "https://autopatchcn.bhsr.com/design_data/BetaLive/output_14394020_12e3f0c6a002_07566508dd1394",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15242148_d40f856defc0_599b68a0adf7bd", "lua_url": "https://autopatchcn.bhsr.com/lua/BetaLive/output_14358961_e055a63b3c34_b199a0234548b5",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15265964_799df4f0ecef_5a94550ba64cff" "ifix_url": "https://autopatchcn.bhsr.com/ifix/BetaLive/output_14374543_04d971175704_ab00cb3f54bb00"
}, },
"OSBETAWin4.3.52": { "CNBETAiOS4.1.52": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15305566_fea016d35145_54bbf8ab4009f5", "asset_bundle_url": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14420305_7a74f0e95f84_edf69bcd963b3a",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15305566_fea016d35145_54bbf8ab4009f5", "asset_bundle_url_b": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14420305_7a74f0e95f84_edf69bcd963b3a",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15318724_a7af31327e74_b3328eb95329b2", "ex_resource_url": "https://autopatchcn.bhsr.com/design_data/BetaLive/output_14427120_6f7bdcd832cf_5c861411529529",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15305751_09783637ccc4_d16f9c81138ab3", "lua_url": "https://autopatchcn.bhsr.com/lua/BetaLive/output_14426018_808f7828fdd4_646eb1de0d5580",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15265964_799df4f0ecef_5a94550ba64cff" "ifix_url": "https://autopatchcn.bhsr.com/ifix/BetaLive/output_14460274_5ed5ff5977db_299d2e7b72efe8"
}, },
"OSBETAWin4.3.53": { "CNBETAiOS4.1.53": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15378434_99bffafdeff7_5d97713dcef07f", "asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_14511152_92f232b7216a_602de31e31b1a4",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15378434_99bffafdeff7_5d97713dcef07f", "asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_14511152_92f232b7216a_602de31e31b1a4",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15385668_07011a79dadf_1111728953724e", "ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_14536466_eef3376243be_0b6e5633eb67ac",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15378559_7514340ac82f_70dad6c56b8bc7", "lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_14527836_2bed15e185c1_05d2c57e28ff4e",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15384138_4e4be8cf97ac_1e3fcfa0a93bef"
},
"OSBETAWin4.3.54": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15440751_fb99372e1e48_fd11e486274779",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15440751_fb99372e1e48_fd11e486274779",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15458669_4c52952d593d_b0ff025e410c5b",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15440843_4201511c48d0_34717e44c82e30",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4" "ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4"
}, },
"OSBETAiOS4.3.51": { "CNBETAiOS4.1.54": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15261247_f6e6db2125cf_369da465b36faf", "asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_14608970_b10116831d46_f4a480ee801414",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15235885_6091fd15561a_83828f542dc1f3", "asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_14608970_b10116831d46_f4a480ee801414",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15265964_c2fbb1eb05fc_f2238199ee2b6e", "ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_14611439_56f651a0b674_84a023d793fd76",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15242148_d40f856defc0_599b68a0adf7bd", "lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_14609090_1218af71d445_3d7b85e94ad21f",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15265964_799df4f0ecef_5a94550ba64cff" "ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4"
}, },
"OSBETAiOS4.3.52": { "OSBETAAndroid4.1.51": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15305566_fea016d35145_54bbf8ab4009f5", "asset_bundle_url": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14372365_fa78e03ad599_36972b4e3bb553",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15305566_fea016d35145_54bbf8ab4009f5", "asset_bundle_url_b": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14352532_e3dee8767e70_9fd758f12171f5",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15318724_a7af31327e74_b3328eb95329b2", "ex_resource_url": "https://autopatchcn.bhsr.com/design_data/BetaLive/output_14394020_12e3f0c6a002_07566508dd1394",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15305751_09783637ccc4_d16f9c81138ab3", "lua_url": "https://autopatchcn.bhsr.com/lua/BetaLive/output_14358961_e055a63b3c34_b199a0234548b5",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15265964_799df4f0ecef_5a94550ba64cff" "ifix_url": "https://autopatchcn.bhsr.com/ifix/BetaLive/output_14374543_04d971175704_ab00cb3f54bb00"
}, },
"OSBETAiOS4.3.53": { "OSBETAAndroid4.1.52": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15378434_99bffafdeff7_5d97713dcef07f", "asset_bundle_url": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14420305_7a74f0e95f84_edf69bcd963b3a",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15378434_99bffafdeff7_5d97713dcef07f", "asset_bundle_url_b": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14420305_7a74f0e95f84_edf69bcd963b3a",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15385668_07011a79dadf_1111728953724e", "ex_resource_url": "https://autopatchcn.bhsr.com/design_data/BetaLive/output_14427120_6f7bdcd832cf_5c861411529529",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15378559_7514340ac82f_70dad6c56b8bc7", "lua_url": "https://autopatchcn.bhsr.com/lua/BetaLive/output_14426018_808f7828fdd4_646eb1de0d5580",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_15384138_4e4be8cf97ac_1e3fcfa0a93bef" "ifix_url": "https://autopatchcn.bhsr.com/ifix/BetaLive/output_14460274_5ed5ff5977db_299d2e7b72efe8"
}, },
"OSBETAiOS4.3.54": { "OSBETAAndroid4.1.53": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_15440751_fb99372e1e48_fd11e486274779", "asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_14511152_92f232b7216a_602de31e31b1a4",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_15440751_fb99372e1e48_fd11e486274779", "asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_14511152_92f232b7216a_602de31e31b1a4",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_15458669_4c52952d593d_b0ff025e410c5b", "ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_14536466_eef3376243be_0b6e5633eb67ac",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_15440843_4201511c48d0_34717e44c82e30", "lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_14527836_2bed15e185c1_05d2c57e28ff4e",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4"
},
"OSBETAAndroid4.1.54": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_14608970_b10116831d46_f4a480ee801414",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_14608970_b10116831d46_f4a480ee801414",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_14611439_56f651a0b674_84a023d793fd76",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_14609090_1218af71d445_3d7b85e94ad21f",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4"
},
"OSBETAWin4.1.51": {
"asset_bundle_url": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14372365_fa78e03ad599_36972b4e3bb553",
"asset_bundle_url_b": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14352532_e3dee8767e70_9fd758f12171f5",
"ex_resource_url": "https://autopatchcn.bhsr.com/design_data/BetaLive/output_14394020_12e3f0c6a002_07566508dd1394",
"lua_url": "https://autopatchcn.bhsr.com/lua/BetaLive/output_14358961_e055a63b3c34_b199a0234548b5",
"ifix_url": "https://autopatchcn.bhsr.com/ifix/BetaLive/output_14374543_04d971175704_ab00cb3f54bb00"
},
"OSBETAWin4.1.52": {
"asset_bundle_url": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14420305_7a74f0e95f84_edf69bcd963b3a",
"asset_bundle_url_b": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14420305_7a74f0e95f84_edf69bcd963b3a",
"ex_resource_url": "https://autopatchcn.bhsr.com/design_data/BetaLive/output_14427120_6f7bdcd832cf_5c861411529529",
"lua_url": "https://autopatchcn.bhsr.com/lua/BetaLive/output_14426018_808f7828fdd4_646eb1de0d5580",
"ifix_url": "https://autopatchcn.bhsr.com/ifix/BetaLive/output_14460274_5ed5ff5977db_299d2e7b72efe8"
},
"OSBETAWin4.1.53": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_14511152_92f232b7216a_602de31e31b1a4",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_14511152_92f232b7216a_602de31e31b1a4",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_14536466_eef3376243be_0b6e5633eb67ac",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_14527836_2bed15e185c1_05d2c57e28ff4e",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4"
},
"OSBETAWin4.1.54": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_14608970_b10116831d46_f4a480ee801414",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_14608970_b10116831d46_f4a480ee801414",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_14611439_56f651a0b674_84a023d793fd76",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_14609090_1218af71d445_3d7b85e94ad21f",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4"
},
"OSBETAiOS4.1.51": {
"asset_bundle_url": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14372365_fa78e03ad599_36972b4e3bb553",
"asset_bundle_url_b": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14352532_e3dee8767e70_9fd758f12171f5",
"ex_resource_url": "https://autopatchcn.bhsr.com/design_data/BetaLive/output_14394020_12e3f0c6a002_07566508dd1394",
"lua_url": "https://autopatchcn.bhsr.com/lua/BetaLive/output_14358961_e055a63b3c34_b199a0234548b5",
"ifix_url": "https://autopatchcn.bhsr.com/ifix/BetaLive/output_14374543_04d971175704_ab00cb3f54bb00"
},
"OSBETAiOS4.1.52": {
"asset_bundle_url": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14420305_7a74f0e95f84_edf69bcd963b3a",
"asset_bundle_url_b": "https://autopatchcn.bhsr.com/asb/BetaLive/output_14420305_7a74f0e95f84_edf69bcd963b3a",
"ex_resource_url": "https://autopatchcn.bhsr.com/design_data/BetaLive/output_14427120_6f7bdcd832cf_5c861411529529",
"lua_url": "https://autopatchcn.bhsr.com/lua/BetaLive/output_14426018_808f7828fdd4_646eb1de0d5580",
"ifix_url": "https://autopatchcn.bhsr.com/ifix/BetaLive/output_14460274_5ed5ff5977db_299d2e7b72efe8"
},
"OSBETAiOS4.1.53": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_14511152_92f232b7216a_602de31e31b1a4",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_14511152_92f232b7216a_602de31e31b1a4",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_14536466_eef3376243be_0b6e5633eb67ac",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_14527836_2bed15e185c1_05d2c57e28ff4e",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4"
},
"OSBETAiOS4.1.54": {
"asset_bundle_url": "https://autopatchos.starrails.com/asb/BetaLive/output_14608970_b10116831d46_f4a480ee801414",
"asset_bundle_url_b": "https://autopatchos.starrails.com/asb/BetaLive/output_14608970_b10116831d46_f4a480ee801414",
"ex_resource_url": "https://autopatchos.starrails.com/design_data/BetaLive/output_14611439_56f651a0b674_84a023d793fd76",
"lua_url": "https://autopatchos.starrails.com/lua/BetaLive/output_14609090_1218af71d445_3d7b85e94ad21f",
"ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4" "ifix_url": "https://autopatchos.starrails.com/ifix/BetaLive/output_0_40d2ce0253_6d871f8bca6eb4"
} }
} }
@@ -1,12 +1,11 @@
package com.example.firefly_go_android package com.example.firefly_go_android
import android.app.Activity import android.app.Activity
import android.content.Context import android.os.Environment
import android.util.Log import android.util.Log
import libandroid.Libandroid import libandroid.Libandroid
import java.io.File import java.io.File
import java.io.FileOutputStream import java.io.FileOutputStream
import java.util.zip.ZipFile
object FireflyModMenu { object FireflyModMenu {
@@ -15,277 +14,53 @@ object FireflyModMenu {
@JvmStatic @JvmStatic
fun init(activity: Activity) { fun init(activity: Activity) {
val modPackageName = "com.kain344.firefly_go_android" val appDataPath = File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), "FireflyGo").absolutePath
Log.d("FireflyMod", "Initializing FireflyModMenu for module: $modPackageName")
val appDataPath = File(activity.getExternalFilesDir(null), "FireflyGo").absolutePath
val dataDir = File("$appDataPath/data") val dataDir = File("$appDataPath/data")
if (!dataDir.exists()) dataDir.mkdirs() if (!dataDir.exists()) dataDir.mkdirs()
val sharedPrefs = activity.getSharedPreferences("FireflyModPrefs", Context.MODE_PRIVATE)
val apkPath = getModuleApkPath(FireflyModMenu::class.java.classLoader)
val currentUpdateTime = if (apkPath != null) {
try {
val lastModified = File(apkPath).lastModified()
Log.d("FireflyMod", "Module APK path: $apkPath, Last modified: $lastModified")
lastModified
} catch (e: Exception) {
Log.e("FireflyMod", "Lỗi khi lấy last modified của APK: ${e.message}")
0L
}
} else {
// Fallback to PackageManager if APK path could not be resolved
try {
val packageInfo = activity.packageManager.getPackageInfo(modPackageName, 0)
Log.d("FireflyMod", "Module package found. Last update: ${packageInfo.lastUpdateTime}")
packageInfo.lastUpdateTime
} catch (e: Exception) {
Log.e("FireflyMod", "Module package $modPackageName not found: ${e.message}")
0L
}
}
val lastUpdateTime = sharedPrefs.getLong("last_update_time", 0L)
val shouldOverride = currentUpdateTime != 0L && currentUpdateTime != lastUpdateTime
if (shouldOverride) {
Log.d("FireflyMod", "Module version changed (old: $lastUpdateTime, new: $currentUpdateTime). Forcing asset override.")
}
if (!isServerStarted) { if (!isServerStarted) {
Log.d("FireflyMod", "Starting Server thread...") Log.d("FireflyMod", "Start Server")
isServerStarted = true isServerStarted = true
Thread { Thread {
try { try {
val isCopyDone = if (apkPath != null) { val isCopyDone = copyRawFiles(dataDir)
copyRawFilesFromApk(apkPath, dataDir, shouldOverride)
} else {
// Fallback to createPackageContext
val modContext = try {
activity.createPackageContext(modPackageName, Context.CONTEXT_INCLUDE_CODE or Context.CONTEXT_IGNORE_SECURITY)
} catch (e: Exception) {
Log.e("FireflyMod", "Không thể tạo mod context cho $modPackageName: ${e.message}")
null
}
if (modContext != null) {
copyRawFiles(modContext, dataDir, shouldOverride)
} else {
false
}
}
if (isCopyDone) { if (isCopyDone) {
if (shouldOverride) {
sharedPrefs.edit().putLong("last_update_time", currentUpdateTime).apply()
}
Libandroid.setPathDataLocal(appDataPath) Libandroid.setPathDataLocal(appDataPath)
Libandroid.setServerRunning(true) Libandroid.setServerRunning(true)
Log.d("FireflyMod", "Server started successfully.")
} else { } else {
Log.e("FireflyMod", "Lỗi khi copy assets, server không được khởi chạy.")
isServerStarted = false isServerStarted = false
} }
} catch (e: Exception) { } catch (e: Exception) {
Log.e("FireflyMod", "Error in server thread: ${e.message}", e)
isServerStarted = false isServerStarted = false
} }
}.start() }.start()
} }
} }
private fun getModuleApkPath(classLoader: ClassLoader?): String? { private fun copyRawFiles(targetDir: File): Boolean {
var cl = classLoader
while (cl != null) {
Log.d("FireflyMod", "Checking ClassLoader: ${cl.javaClass.name}")
// 1. Try parsing toString() first (reflection-free, safe from hidden API checks)
val pathFromToString = getModuleApkPathFromToString(cl)
if (pathFromToString != null) {
Log.d("FireflyMod", "Found APK path via ClassLoader toString(): $pathFromToString")
return pathFromToString
}
// 2. Try reflection on this class loader
val pathFromReflection = getModuleApkPathViaReflection(cl)
if (pathFromReflection != null) {
Log.d("FireflyMod", "Found APK path via reflection: $pathFromReflection")
return pathFromReflection
}
cl = cl.parent
}
Log.w("FireflyMod", "Could not find module APK path in ClassLoader hierarchy.")
return null
}
private fun getModuleApkPathFromToString(classLoader: ClassLoader): String? {
val clString = classLoader.toString()
val regexes = listOf(
Regex("""zip file "([^"]+)""""),
Regex("""zip file '([^']+)'"""),
Regex("""\[([^\]]+\.(apk|zip))\]"""),
Regex("""file:([^:\s]+\.(apk|zip))""")
)
var fallbackPath: String? = null
for (regex in regexes) {
val matches = regex.findAll(clString)
for (match in matches) {
if (match.groupValues.size > 1) {
val path = match.groupValues[1]
val file = File(path)
if (file.exists() && file.isFile) {
if (path.contains("com.kain344.firefly_go_android") && path.endsWith(".apk")) {
return path
}
if (path.endsWith(".apk") && fallbackPath == null) {
fallbackPath = path
}
}
}
}
}
// General path match for any absolute path ending with .apk or .zip
val pathRegex = Regex("""(/[^:\s"']+\.(apk|zip))""")
val pathMatches = pathRegex.findAll(clString)
for (match in pathMatches) {
val path = match.groupValues[1]
val file = File(path)
if (file.exists() && file.isFile) {
if (path.contains("com.kain344.firefly_go_android") && path.endsWith(".apk")) {
return path
}
if (path.endsWith(".apk") && fallbackPath == null) {
fallbackPath = path
}
}
}
return fallbackPath
}
private fun getModuleApkPathViaReflection(classLoader: ClassLoader): String? {
try {
val baseDexClassLoaderClass = Class.forName("dalvik.system.BaseDexClassLoader")
if (!baseDexClassLoaderClass.isInstance(classLoader)) return null
val pathListField = baseDexClassLoaderClass.getDeclaredField("pathList")
pathListField.isAccessible = true
val pathList = pathListField.get(classLoader) ?: return null
val dexElementsField = pathList.javaClass.getDeclaredField("dexElements")
dexElementsField.isAccessible = true
val dexElements = dexElementsField.get(pathList) as? Array<*> ?: return null
var fallbackApkPath: String? = null
for (element in dexElements) {
if (element == null) continue
val elementClass = element.javaClass
val fileField = try {
elementClass.getDeclaredField("file")
} catch (e: NoSuchFieldException) {
try {
elementClass.getDeclaredField("path")
} catch (ex: NoSuchFieldException) {
null
}
}
if (fileField != null) {
fileField.isAccessible = true
val file = fileField.get(element) as? File
if (file != null && file.exists() && file.isFile) {
val path = file.absolutePath
if (path.contains("com.kain344.firefly_go_android") && path.endsWith(".apk")) {
return path
}
if (path.endsWith(".apk") && fallbackApkPath == null) {
fallbackApkPath = path
}
}
}
}
return fallbackApkPath
} catch (e: Exception) {
Log.d("FireflyMod", "Reflection failed on ClassLoader ${classLoader.javaClass.name}: ${e.message}")
}
return null
}
private fun copyRawFilesFromApk(apkPath: String, targetDir: File, override: Boolean = false): Boolean {
val files = listOf( val files = listOf(
"data-in-game.json" to "data-in-game.json", "assets/data-in-game.json" to "data-in-game.json",
"freesr-data.json" to "freesr-data.json", "assets/freesr-data.json" to "freesr-data.json",
"version.json" to "version.json" "assets/version.json" to "version.json"
) )
return try { return try {
ZipFile(apkPath).use { zip -> for ((assetPath, name) in files) {
for ((assetFile, outName) in files) { val outFile = File(targetDir, name)
val outFile = File(targetDir, outName) if (!outFile.exists()) {
if (outFile.exists() && !override) { val inputStream =
Log.d("FireflyMod", "Bỏ qua $outName (đã tồn tại)") FireflyModMenu::class.java.classLoader?.getResourceAsStream(assetPath)
continue ?: return false
}
val entryName = "assets/$assetFile" inputStream.use { input ->
val entry = zip.getEntry(entryName)
if (entry == null) {
Log.e("FireflyMod", "Không tìm thấy entry $entryName trong APK")
return false
}
zip.getInputStream(entry).use { input ->
FileOutputStream(outFile).use { output -> FileOutputStream(outFile).use { output ->
input.copyTo(output) input.copyTo(output)
output.fd.sync() output.fd.sync()
} }
} }
Log.d("FireflyMod", "Đã copy $assetFile từ APK thành công (override=$override)")
} }
} }
true true
} catch (e: Exception) { } catch (e: Exception) {
Log.e("FireflyMod", "Lỗi khi copy file từ APK: ${e.message}", e)
false
}
}
private fun copyRawFiles(context: Context, targetDir: File, override: Boolean = false): Boolean {
val files = listOf(
"data-in-game.json" to "data-in-game.json",
"freesr-data.json" to "freesr-data.json",
"version.json" to "version.json"
)
return try {
// Kiểm tra danh sách assets có sẵn để debug
val availableAssets = context.assets.list("")?.toList() ?: emptyList()
Log.d("FireflyMod", "Assets có sẵn trong module: $availableAssets")
for ((assetFile, outName) in files) {
val outFile = File(targetDir, outName)
if (outFile.exists() && !override) {
Log.d("FireflyMod", "Bỏ qua $outName (đã tồn tại)")
continue
}
if (!availableAssets.contains(assetFile)) {
Log.w("FireflyMod", "Cảnh báo: Không tìm thấy $assetFile trong danh sách assets của module!")
}
context.assets.open(assetFile).use { input ->
FileOutputStream(outFile).use { output ->
input.copyTo(output)
output.fd.sync()
}
}
Log.d("FireflyMod", "Đã copy $assetFile thành công (override=$override)")
}
true
} catch (e: Exception) {
Log.e("FireflyMod", "Lỗi khi copy file từ assets của ${context.packageName}: ${e.message}", e)
false false
} }
} }
@@ -11,11 +11,8 @@ import libandroid.Libandroid
class MainHook : IXposedHookLoadPackage { class MainHook : IXposedHookLoadPackage {
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
val pkg = lpparam.packageName // Chỉ chạy trong package của game
if (!pkg.startsWith("com.miHoYo.hkrpg") && if (lpparam.packageName != "com.miHoYo.hkrpgcb") return
!pkg.startsWith("com.HoYoverse.hkrpg") &&
!pkg.startsWith("com.HoYoverse.Cyrene")
) return
XposedHelpers.findAndHookMethod( XposedHelpers.findAndHookMethod(
Activity::class.java.name, Activity::class.java.name,
+1 -1
View File
@@ -1,3 +1,3 @@
# Changelog # Changelog
## - UPDATE: Support 4.3.5X ## - UPDATE: Support 4.1.5X
+3 -2
View File
@@ -1,4 +1,5 @@
{ {
"tag": "4.3.4-01", "tag": "4.1.4-02",
"title": "PreBuild Version 4.3.54 - 01" "title": "PreBuild Version 4.1.54 - 02"
} }