# 星落解包方法

**URL:** <https://live2dhub.com/t/topic/3380>\
**Category:** 讨论\
**Created:** [2024 年7 月 22 日 07:01 UTC](https://live2dhub.com/t/topic/3380 "2024-07-22T07:01:41Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

作者： ![AXiX\_Official](https://live2dhub.com/user_avatar/live2dhub.com/axix_official/32/1844_2.png) [@AXiX\_Official](https://live2dhub.com/u/AXiX_Official)\
发布日期： [2024 年7 月 22 日 07:01 UTC](https://live2dhub.com/t/topic/3380/1 "2024-07-22T07:01:41Z")

</div>

你说得对，但是《星落》是一款探险队沿途对抗大魔王的半即时战术养成RPG。这一次，是成为希望与勇气的探险团璀璨故事！  
星落今天开放了预下载，很快啊很快，我啪的一下就下载下来  
先丢进010Editor一看

 ![image](https://live2dhub.com/uploads/default/original/2X/a/a1797280892e1b91fc7b20bfaa8c45ab852f12d4.png)  
一眼顶真，鉴定为FakeHeader加上UnityCN加密  
我们都知道Raz佬版本的assetstudio支持FakeHeader，也支持UnityCN，但是他们都在同一个选项里，不能同时启用，只能先手动去除fakeheader  
不过这里还好似乎都是固定的32 offset，脚本跑一下很快啊很快  
但是raz佬的版本已经archive了，最新的release里没有星落的key  
 ![image](https://live2dhub.com/uploads/default/original/2X/6/6d675f7f1be44fd6b4e861c222524650748a009b.png)  
所以得手动在这个界面加上Elpis：79756E67756968616F77616E31323334然后选择这个key

或者试试我维护的版本[GitHub - AXiX-official/Studio: Modded AssetStudio with new features · GitHub](https://github.com/AXiX-official/Studio)  
和raz的方法不一样，特殊游戏的适配并不是在Options-\>Specify Game里选择，因为这需要在代码中写死逻辑而且每次添加新的类型都要更新程序。

 ![image](https://live2dhub.com/uploads/default/original/2X/4/4d7df4d966ff638542c5b9a0373ced918f57977b.png)  
在菜单栏选择最后的Lua，先点击Enable Lua Scripts启用lua脚本，然后点击Load Lua Template加载特定游戏的解密脚本，比如星落的是Elpis.lua，然后直接把ab文件正常打开就行  
（对于复杂加密的支持可能得在c#侧添加额外的接口，简单的解密逻辑倒是还算好写）

---

<div class="post-metadata">

作者： ![AXiX\_Official](https://live2dhub.com/user_avatar/live2dhub.com/axix_official/32/1844_2.png) [@AXiX\_Official](https://live2dhub.com/u/AXiX_Official)\
发布日期： [2024 年7 月 22 日 12:26 UTC](https://live2dhub.com/t/topic/3380/3 "2024-07-22T12:26:12Z")

</div>

看了一下，安装包有一个assets\PlayerAssets\playerassets.assets文件，1.34G，是很多个ab包首尾相连，playerassets.json中有每个文件的起始位置和hash key，我等下写个导出脚本

---

<div class="post-metadata">

作者： ![AXiX\_Official](https://live2dhub.com/user_avatar/live2dhub.com/axix_official/32/1844_2.png) [@AXiX\_Official](https://live2dhub.com/u/AXiX_Official)\
发布日期： [2024 年7 月 22 日 12:46 UTC](https://live2dhub.com/t/topic/3380/4 "2024-07-22T12:46:24Z")

</div>

```python
import os
import sys
import json

def extract(file_obj, offset, output_path, name):
    file_obj.seek(offset + 32)
    size = int.from_bytes(file_obj.read(8), byteorder="big")
    file_obj.seek(offset)
    data = file_obj.read(size)
    with open(os.path.join(output_path, name), "wb") as f:
        f.write(data)

if __name__ == " __main__":
    if len(sys.argv) != 4:
        print("Usage: python extract.py <asset_path> <json_path> <output_path>")
        sys.exit(1)
    asset_path = sys.argv[1]
    json_path = sys.argv[2]
    output_path = sys.argv[3]
    with open(asset_path, "rb") as asset_file:
        with open(json_path, "r") as f:
            jsonData = f.read()
        data = json.loads(jsonData)["data"]
        if not os.path.exists(output_path):
            os.makedirs(output_path)
        for item in data:
            key, offset = item["key"], item["offset"]
            if offset != 0:
                extract(asset_file, offset, output_path, key)

```

---

<div class="post-metadata">

作者： ![AXiX\_Official](https://live2dhub.com/user_avatar/live2dhub.com/axix_official/32/1844_2.png) [@AXiX\_Official](https://live2dhub.com/u/AXiX_Official)\
发布日期： [2024 年7 月 22 日 12:48 UTC](https://live2dhub.com/t/topic/3380/5 "2024-07-22T12:48:53Z")

</div>

音频导出的话你可以用AssetStudio读取然后Fiter Type选AudioClip，或者用py脚本配合UnityPy逐个文件检查有没有AudioClip

---

<div class="post-metadata">

作者： ![fateli](https://live2dhub.com/letter_avatar_proxy/v4/letter/f/b9e5f3/32.png) [@fateli](https://live2dhub.com/u/fateli)\
发布日期： [2024 年7 月 23 日 04:19 UTC](https://live2dhub.com/t/topic/3380/6 "2024-07-23T04:19:07Z")

</div>

问问使用UnityCN加密的游戏导出修改图片后怎么再封回包内并能被游戏正常识别？

---

<div class="post-metadata">

作者： ![AXiX\_Official](https://live2dhub.com/user_avatar/live2dhub.com/axix_official/32/1844_2.png) [@AXiX\_Official](https://live2dhub.com/u/AXiX_Official)\
发布日期： [2024 年7 月 23 日 07:04 UTC](https://live2dhub.com/t/topic/3380/7 "2024-07-23T07:04:43Z")

</div>

你可以用这个修改过的[UABEA](https://github.com/AXiX-official/UABEAhttps://github.com/AXiX-official/UABEA)，可以读取UnityCN加密的文件，然后导出非加密文件。  
按我过去的经验使用UnityCN加密的游戏是可以正常读取非加密文件的。  
不过因为星落还用了fakeheader所以你得先去掉头上32字节，修改完再加回去。

---

<div class="post-metadata">

作者： ![fateli](https://live2dhub.com/letter_avatar_proxy/v4/letter/f/b9e5f3/32.png) [@fateli](https://live2dhub.com/u/fateli)\
发布日期： [2024 年7 月 23 日 08:13 UTC](https://live2dhub.com/t/topic/3380/8 "2024-07-23T08:13:32Z")

</div>

好的，谢谢大佬解答

---

<div class="post-metadata">

作者： ![AXiX\_Official](https://live2dhub.com/user_avatar/live2dhub.com/axix_official/32/1844_2.png) [@AXiX\_Official](https://live2dhub.com/u/AXiX_Official)\
发布日期： [2024 年7 月 23 日 08:25 UTC](https://live2dhub.com/t/topic/3380/9 "2024-07-23T08:25:43Z")

</div>

![image](https://live2dhub.com/uploads/default/original/2X/1/1ca7a2eb78c9208cdc839d9b6f3d39e2032a497e.jpeg)  
谢谢你，新手池第二个十连

---

<div class="post-metadata">

作者： ![AXiX\_Official](https://live2dhub.com/user_avatar/live2dhub.com/axix_official/32/1844_2.png) [@AXiX\_Official](https://live2dhub.com/u/AXiX_Official)\
发布日期： [2024 年7 月 23 日 08:26 UTC](https://live2dhub.com/t/topic/3380/10 "2024-07-23T08:26:44Z")

</div>

不过就像前面提到的，有1.34G的文件是在安装包那个大文件里的，那部分对应的文件做魔改就很难替换回去

---

<div class="post-metadata">

作者： ![leo369258](https://live2dhub.com/letter_avatar_proxy/v4/letter/l/d9b06d/32.png) [@leo369258](https://live2dhub.com/u/leo369258)\
发布日期： [2024 年9 月 24 日 10:07 UTC](https://live2dhub.com/t/topic/3380/11 "2024-09-24T10:07:02Z")

</div>

大佬，请教一下剑与远征：启程怎么解包？我是一个萌新。。。。

---

<div class="post-metadata">

作者： ![Ling](https://live2dhub.com/user_avatar/live2dhub.com/ling/32/5870_2.png) [@Ling](https://live2dhub.com/u/Ling)\
发布日期： [2024 年9 月 24 日 17:29 UTC](https://live2dhub.com/t/topic/3380/12 "2024-09-24T17:29:09Z")

</div>

有人开贴问过，善用搜索

---

<div class="post-metadata">

作者： ![leo369258](https://live2dhub.com/letter_avatar_proxy/v4/letter/l/d9b06d/32.png) [@leo369258](https://live2dhub.com/u/leo369258)\
发布日期： [2024 年9 月 25 日 06:10 UTC](https://live2dhub.com/t/topic/3380/13 "2024-09-25T06:10:23Z")

</div>

我自己已经搞定了，谢谢

---

<div class="post-metadata">

作者： ![eythen0707](https://live2dhub.com/letter_avatar_proxy/v4/letter/e/b5ac83/32.png) [@eythen0707](https://live2dhub.com/u/eythen0707)\
发布日期： [2024 年11 月 10 日 16:12 UTC](https://live2dhub.com/t/topic/3380/14 "2024-11-10T16:12:48Z")

</div>

大佬，咋知道key是多少的？

---

<div class="post-metadata">

作者： ![akima](https://live2dhub.com/letter_avatar_proxy/v4/letter/a/90ced4/32.png) [@akima](https://live2dhub.com/u/akima)\
发布日期： [2026 年6 月 30 日 12:21 UTC](https://live2dhub.com/t/topic/3380/16 "2026-06-30T12:21:40Z")

</div>

大佬，请问一下，您现在还能解包出来吗，我想请您帮我解包一下，想要整套素材自己收藏用，有偿的大佬，价格好商量

---

<div class="post-metadata">

作者： ![bwf358](https://live2dhub.com/letter_avatar_proxy/v4/letter/b/eada6e/32.png) [@bwf358](https://live2dhub.com/u/bwf358)\
发布日期： [2026 年6 月 30 日 14:12 UTC](https://live2dhub.com/t/topic/3380/17 "2026-06-30T14:12:50Z")

</div>

头一回见解密方法贴出来还要花钱解的，解密没有改，而且游戏也还没关那么急干嘛。自己稍微动下手的事。对所有ab包去假文件头，然后用assetstudio指定游戏选unitycn，key选一下星落的完事。都有点忍不住想发流汗黄豆了。刚刚测试了没变加密，直接照着大佬说的处理即可。

 ![image](https://live2dhub.com/uploads/default/original/2X/b/ba0b43ada35785870757457d8e5fef12d248f6dd.png)

 ![image](https://live2dhub.com/uploads/default/original/2X/e/eb2650e22d14387b3197c7ca9013f4a040d27c9d.png)

 ![image](https://live2dhub.com/uploads/default/original/2X/0/01f2b6c20c11765a673f434e73ee14d009791126.jpeg)
