完全不会编程非计算机专业纯小白求助大佬,关于男同向游戏龙脉的另一种姿态R安装包中catalog.bin文件的解包

关于为什么要解这个文件:

因为里面包含有游戏内所有的图片视频音频资源下载的路径,在以前unity没有更新时安装包中是catalog.json文件而不是catalog.bin文件,把catalog.json文件拖入谷歌浏览器能轻松就找到所需要下载图片or视频or音频资源的路径直接下载,后使用AssetStudio或者AssetRipper这些解包工具对其下载的文件进行解包得到目标的图片or视频文件。 但现在安装包中变成catalog.bin后我完全束手无策了,虽然能使用非常笨的方法就是直接导入手机中下载好的游戏的数据文件进行解包,但是没有抽到的角色没有办法加载到目标cg文件也就没办法解包出来。

求助了群里的大佬说能用下面链接https://github.com/nesrak1/AddressablesTools的这个工具可以解包catalog.bin文件,但是需要自己写程序,本小白完全不懂编程,这里同时附上游戏安装包下载路径https://anothereidos-r.com/zh/,下载安卓安装包apk文件改后缀zip解包按照路径\base\assets\aa即可找到catalog.bin文件。

ps

希望大家尽量不要嫌弃我的游戏哦,如果游戏界面吓到你了我表示很抱歉。

但凡不像个人机,这论坛的老哥们的热心肠有不管的?

calog解析参考求助AngelicaAsterR解包问题 - #2,来自 qingliu

提问参考:求助-最强祖师-解包问题 - #4,来自 cyb464b6

看了,点进去下载了AddressablesToolsPy工具,还是不知道怎么用捏,怎么样会冒出bin2url.bat和bin2url.py?

学点编程吧。。。
游戏下载链接都给错了给个更新日志链接看起来确实像人机。。。
样本文件也没给
看你发的感觉和我之前问的一个差不多

照葫芦画瓢的事情就看你愿不愿意学和动脑了

python腳本
bin轉json + 下載器

download.rar (7.5 MB)

Fidder解析BIN文件URL

使用Fidder解析出電腦版(StandaloneWindows64) BIN文件URL

https://api.anothereidos-r.net/download/addressable/u6/StandaloneWindows64/catalog_2.9.4.bin

猜出Android版 BIN文件URL

https://api.anothereidos-r.net/download/addressable/u6/Android/catalog_2.9.4.bin

由於兩者BIN文件內容有差異
所以下載器弄成兩個版本

StandaloneWindows64目錄和Android目錄

BIN文件轉檔成JSON文件

StandaloneWindows64目錄和Android目錄下皆一樣
將 catalog_2.9.4.bin 改名成 catalog.bin

修改自 GitHub - anosu/AddressablesToolsPy: Python copy of AddressablesTools
python腳本

運行 catalog_bin2json.bat
自動運行 catalog_bin2json.py
自動解析 catalog.bin
自動輸出 catalog.json

下載遊戲資源

運行 catalog_json2url_download.bat
自動運行 catalog_json2url_download.py
自動生成下載URL
自動開始下載遊戲資源

python腳本
讀取 catalog.json
讀取 Resources 陣列中 url
比如 https://api.anothereidos-r.net/download/addressable/u6/StandaloneWindows64/characterimagebsp_separate_assets_bsp_5019_2_d2cb085206df7e7f06856d33b0dcc344.bundle
逐行生成 catalog_url.txt
並下載url
同時下載數 : 5
同時顯示多線程下載檔案數%
比如
下載任務 1 : 目前下載檔案名稱 20%
下載任務 2 : 目前下載檔案名稱 46%
下載任務 3 : 目前下載檔案名稱 64%
下載任務 4 : 目前下載檔案名稱 3%
下載任務 5 : 目前下載檔案名稱 96%
這5個下載任務為動態刷新
不會一直新增行
已下載的文件不再次下載
api.anothereidos-r.net 為根目錄
依據網址生成子目錄

抽出AB包遊戲資源

AB包沒加密 , 為Unity 6.0版本
使用 AnimeStudio.CLI.exe (AnimeStudio 命令列介面)

AnimeStudio-net9.rar (10.0 MB)

抽出資源
將整個 api.anothereidos-r.net 目錄移動到 ASImport 目錄下
運行 AnimeStudio.CLI-1.bat
自動抽出資源 TextAsset、Texture2D、AudioClip、Video、Font類型資源
輸出目錄在 ASExport

Container Path 混亂
後面靠你自己整理了 : )

优雅点可以用

给个我屎山里的栗子

def yjautounpackwin(overwrite):
    global LIMIT_BY_HOURS, PROCESS_LIMIT_HOURS
    now = time.time()
    import os
    import fnmatch
    from UnityPy import AssetsManager
    import re

    # prefab 路径匹配规则(基于 container)
    container_patternsfor = [
        "assets/resources/versionshare/baseassets/uiprefabs/simpleprefab/img_prefabs/*/*.prefab",
        "assets/resources/honly/baseassets/uiprefabs/simpleprefab/img_hcg_dynamic/*.prefab",
        "assets/resources/honly/baseassets/uiprefabs/simpleprefab/img_cg_dynamic/*.prefab"
    ]

    def container_matches(path: str):
        for pattern in container_patternsfor:
            if fnmatch.fnmatch(path, pattern):
                return True
        return False

    def sanitize_filename(name: str):
        return "".join(c if c.isalnum() or c in " -_." and c not in '<>:"/\\|?*' else "_" for c in name)

    def process_file(file_path, output_base):
        env = AssetsManager()
        try:
            env.load_file(file_path)
        except Exception as e:
            print(f"[×] 加载失败: {file_path},错误: {e}")
            return

        container_path = None
        for obj in env.objects:
            try:
                container_path = obj.assets_file.container.container[0][0]
                break
            except Exception:
                continue

        if not container_path:
            print(f"[×] 无 container: {file_path}")
            return

        if not container_matches(container_path):
            return

        relative_dir = container_path.replace("\\", "/")
        prefab_base = os.path.splitext(relative_dir)[0]  # 去掉 .prefab
        output_dir = os.path.join(output_base, prefab_base)

        os.makedirs(output_dir, exist_ok=True)

        for obj in env.objects:
            if obj.type.name not in ("Texture2D", "TextAsset"):
                continue

            name = obj.peek_name()
            if not name:
                continue

            if obj.type.name == "Texture2D":
                name += ".png"
                out_path = os.path.join(output_dir, sanitize_filename(name))
                if os.path.exists(out_path) and not overwrite:
                    #print(f"[跳过] 已存在: {out_path}")
                    continue
                try:
                    data = obj.read()
                    img = getattr(data, "image", None)
                    if img:
                        img.save(out_path)
                        print(f"[*] 导出图像: {out_path}")
                    else:
                        print(f"[×] 无图像数据: {out_path}")
                except Exception as e:
                    print(f"[×] 导出失败 {name}: {e}")


            elif obj.type.name == "TextAsset":

                out_path = os.path.join(output_dir, sanitize_filename(name))

                if os.path.exists(out_path) and not overwrite:
                  #  print(f"[跳过] 已存在: {out_path}")

                    continue

                try:

                    data = obj.read()

                    has_skeleton = 0

                    content = (
                            getattr(data, "script", None)
                            or getattr(data, "bytes", None)
                            or getattr(data, "text", None)
                            or getattr(data, "data", None)
                            or getattr(data, "raw_data", None)
                            or getattr(data, "m_Script", None)
                    )
                    if isinstance(content, str):
                        has_skeleton = '"skeleton":' in content

                    if has_skeleton and (not out_path.endswith('.json')):

                        out_path = f'{out_path}.json'

                        if os.path.exists(out_path) and not overwrite:  # and not overwrite:

                            # print(f"[跳过] 已存在: {out_path}")

                            continue

                    with open(out_path, "wb") as f:

                        f.write(data.m_Script.encode("utf-8", "surrogateescape"))

                    print(f"[*] 导出: {out_path}")


                except Exception as e:

                    print(f"[×] TextAsset 导出失败: {e}")

    # 主程序入口
    input_folder = os.path.join(os.getcwd(), r"resdownload\樱境物语PC\decode")
    output_folder = os.path.join(os.getcwd(),  r"autounpack\樱境物语PC")
    prefixes = (
        "assets_resources_honly_baseassets_uiprefabs_simpleprefab_img_",
        "assets_resources_versionshare_baseassets_uiprefabs_simpleprefab_img_prefabs_elementaltar_",
        "assets_resources_versionshare_baseassets_uiprefabs_simpleprefab_img_prefabs_mirror_card_"
    )

    for root, _, files in os.walk(input_folder):
        for file in files:
            if any(p in file for p in prefixes):
                full_path = os.path.join(root, file)
                if LIMIT_BY_HOURS:
                    mtime = os.path.getmtime(full_path)
                    if now - mtime > PROCESS_LIMIT_HOURS * 3600:
                        continue
                process_file(full_path, output_folder)

大佬我试了好几次,这个download.rar文件里一双击执行命令文件bat就闪退什么原因?

直接运行py是这样

代表你的python需要冬天進補
缺補品 : )

import AddressablesTools
ModuleNotFoundError: No module named ‘AddressablesTools’

缺少的補品叫 AddressablesTools

補一下就好 pip install AddressablesTools

一樣的情況
補一下就好 pip install requests

安裝一次就好 : )
缺什麼補什麼
No module named ‘AddressablesTools’
No module named ‘requests’
No module named ‘模組名稱’

C:\Windows\System32\cmd.exe 複製一份到python腳本目錄下
這是我自己的習慣 : )

將python腳本 (*.py) 和 cmd.exe放在同一個目錄下
運行 cmd.exe
CMD命令 : python catalog_bin2json.py
CMD命令 : python catalog_json2url_download.py

給網友使用python腳本的話
我會弄成bat批次檔 : )
直接運行bat批次檔
自動運行python腳本
不用cmd.exe
不用手動keyin cmd命令

安裝與反安裝CMD命令 (有時候模組會裝錯需要反安裝命令)
CMD命令 : pip install 模組名稱
CMD命令 : pip uninstall 模組名稱

非常感谢大佬的耐心解答,大佬我按照你说的两个模组下载好了,下载命令catalog_json2url_download.bat可以正常运行了,但是转换catalog.bin变成catalog.json和catalog_url.txt的命令还是有问题,我后来检查两个模组确实是显示已经下载好了。

问题已解决,重装模组即可,最后谢谢大佬的热心指点。