Cuttlefish安卓模拟器最新DEB包下载获取脚本

admin 2025-12-29 01:08:18 网络安全文章 来源:ZONE.CI 全球网 0 阅读模式

文章总结: Cuttlefish安卓模拟器现已支持在线安装,作者编写了Python脚本自动抓取最新DEB包下载链接,避免了自行编译的麻烦。文章提供了完整的脚本代码、执行效果及安装运行步骤,包括安装依赖包、下载安卓系统镜像及启动命令,并提及可在开发板上使用PCIE显卡进行GPU加速,适合逆向分析环境搭建。 综合评分: 90 文章分类: 安全工具,移动安全,逆向分析


cover_image

Cuttlefish安卓模拟器最新DEB包下载获取脚本

原创

非虫

软件安全与逆向分析

2025年12月27日 14:32 湖北

cuttlefish现在更新支持在线安装了。不用费劳什子劲自己编译了。为了方便直接取deb下载地址,我弄了给脚本,直接执行取最新版本的DEB安装包下载链接。注意执行需要科学上网。

#!/usr/bin/env python3import sysimport urllib.requestimport reBASE_URL = "https://us-apt.pkg.dev/projects/android-cuttlefish-artifacts"DIST = "android-cuttlefish"ARCH = "arm64"   # 可改成 amd64def http_get(url: str) -> str:    req = urllib.request.Request(        url,        headers={            "User-Agent": "apt/2.6 (python)",        },    )    with urllib.request.urlopen(req, timeout=30) as resp:        data = resp.read()    # 强制按 bytes → text,去掉 CR    return data.decode("utf-8", errors="replace").replace("\r", "")def main():    # 1. Fetch InRelease    inrelease_url = f"{BASE_URL}/dists/{DIST}/InRelease"    print("[*] Fetch InRelease")    inrelease = http_get(inrelease_url)    # 2. Parse Packages path    print("[*] Parse Packages path from InRelease")    pkg_path = None    for line in inrelease.splitlines():        if re.search(rf"\bmain/binary-{ARCH}/Packages$", line):            pkg_path = line.split()[-1]            break    if not pkg_path:        print(f"[-] Packages path for arch={ARCH} not found", file=sys.stderr)        print("[!] Available paths:")        for line in inrelease.splitlines():            if "binary-" in line and line.endswith("/Packages"):                print("   ", line.strip())        sys.exit(1)    print(f"    -> {pkg_path}")    # 3. Fetch Packages    packages_url = f"{BASE_URL}/dists/{DIST}/{pkg_path}"    print("[*] Fetch Packages")    packages = http_get(packages_url)    # 4. Parse deb URLs    print("[*] Extract deb URLs")    found = False    for line in packages.splitlines():        if line.startswith("Filename:"):            path = line.split(":", 1)[1].strip()            url = f"{BASE_URL}/{path}"            print(url)            found = True    if not found:        print("[-] No deb entries found", file=sys.stderr)        sys.exit(2)if __name__ == "__main__":    main()

执行后效果如下:

m4:~ m4$ python3 ./fuck-cuttlefish.py[*] Fetch InRelease[*] Parse Packages path from InRelease    -> main/binary-arm64/Packages[*] Fetch Packages[*] Extract deb URLshttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-base_1.25.0_arm64_7c53850c376c7b68aaaf870a434f78de.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-base_1.26.0_arm64_e8b8f77e290564c19b89839afa74efe2.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-base_1.27.0_arm64_58e8b598a0b54d8410b1b352fd23d02b.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-base_1.28.0_arm64_004fd75ea3d99fb8420e1ceaad039426.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-base_1.29.0_arm64_e76a31eb19b59c507572d0f5294f8f19.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-base_1.30.0_arm64_f0b569769994b6b1d087d0ecc3dc49e8.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-base_1.31.0_arm64_8a2cd1058108c0826c9be0ec37f2a595.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-base_1.32.0_arm64_dadff9e4167c7bd604e54b8a74f5d839.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-base_1.34.0_arm64_3fc1f884f9634739b5e40dd70a10ae92.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-base_1.35.0_arm64_69a841693fef997bfb70941497bac0fc.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-base_1.37.0_arm64_e2f2a25b373dbdbbd1c0c19f8122c094.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-integration-gigabyte-arm64_1.34.0_arm64_0694519b53269ec33d739d5bf4c588b5.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-integration-gigabyte-arm64_1.35.0_arm64_d667908acb6b2a1507cd128f0fbd5724.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-integration-gigabyte-arm64_1.37.0_arm64_7d73c728151a8167446329594d9700dd.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-orchestration_1.25.0_arm64_b026c1ae954c27514bde48b385b629a2.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-orchestration_1.26.0_arm64_2d8524adbe0fbcef77397ff47e90ab4a.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-orchestration_1.27.0_arm64_cb165b2dd0ac0c11afef336b739367f5.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-orchestration_1.28.0_arm64_6cb52a0850c60bbf1ecab7ecf3838498.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-orchestration_1.29.0_arm64_a87687b7d36847445b99f6b3515ecf76.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-orchestration_1.30.0_arm64_840e16f1029b12d25a15d8fb6dc25074.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-orchestration_1.31.0_arm64_85955140ad80cdb9bdbe24015cf79301.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-orchestration_1.32.0_arm64_3585ac40d3f86df000f7f8bfe91743b3.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-orchestration_1.34.0_arm64_9e5f64eab31b498a5377fa9909af43e7.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-orchestration_1.35.0_arm64_7a34935c74a3729bf3d1e3b248d1ee3e.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-orchestration_1.37.0_arm64_9556f97a49d951bd6ae0dc07c4aff19d.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-user_1.25.0_arm64_e3ccc1ad26d027bd69701f1a791b725b.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-user_1.26.0_arm64_ceea50e7a5535a34a5c316cce6ba97ea.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-user_1.27.0_arm64_ba4ea511942a3a3b7cad2645b2c2288e.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-user_1.28.0_arm64_a4c3698066db0488ec5b83f95bbb8288.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-user_1.29.0_arm64_0cdd6467409f7d28ca36734beba9f59f.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-user_1.30.0_arm64_6a33175ee6efa0652c433645d2d3392c.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-user_1.31.0_arm64_a829654c6ca614fba4c2fc9dbb8d5f4e.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-user_1.32.0_arm64_918a40e7bd035d307bb08e71f09ae481.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-user_1.34.0_arm64_c4572e107be5fb2392f499cadcb71bf1.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-user_1.35.0_arm64_1b3bafe2e92a86be8bc535bce6e4c732.debhttps://us-apt.pkg.dev/projects/android-cuttlefish-artifacts/pool/android-cuttlefish/cuttlefish-user_1.37.0_arm64_a6a4a03e008dde1b5c510b9a76316949.debm4:~ m4$

安装的话,弄最新版本的base与user安装重启完事。

sudo apt install cuttlefish-base cuttlefish-user -ysudo usermod -aG kvm,cvdnetwork,render $USERsudo reboot

然后执行下面的命令在线下载最新的安卓系统。

mkdir -p cf14cd cf14cvd fetch --default_build=aosp-android14-gsi/aosp_cf_arm64_phone-userdebug

接下来,就是执行运行让它跑起来了。

HOME=$PWD bin/launch_cvd

最后,爱折腾的朋友可以在开发板上外插PCIE显卡,试下GPU加速跑安卓模拟器,它的系统模拟程度比AVD要更完备。真的香了。


免责声明:

本文所载程序、技术方法仅面向合法合规的安全研究与教学场景,旨在提升网络安全防护能力,具有明确的技术研究属性。

任何单位或个人未经授权,将本文内容用于攻击、破坏等非法用途的,由此引发的全部法律责任、民事赔偿及连带责任,均由行为人独立承担,本站不承担任何连带责任。

本站内容均为技术交流与知识分享目的发布,若存在版权侵权或其他异议,请通过邮件联系处理,具体联系方式可点击页面上方的联系我

本文转载自:软件安全与逆向分析 非虫《Cuttlefish安卓模拟器最新DEB包下载获取脚本》

评论:0   参与:  0