iBotPeaches / Apktool

A tool for reverse engineering Android apk files
https://apktool.org/
Apache License 2.0
19.79k stars 3.56k forks source link

Compiling Error - 206 Filename is too long #1545

Closed df32 closed 7 years ago

df32 commented 7 years ago

Information

  1. Apktool v2.2.3
  2. Windows 10 x64
  3. blhx_v1.3.0_bili_673946.apk from the offical website of this game

It seems the apk has too many files to compile, resulting in the parameter too long.

Stacktrace/Logcat

        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:493)
        at brut.androlib.Androlib.buildResources(Androlib.java:427)
        at brut.androlib.Androlib.build(Androlib.java:326)
        at brut.androlib.Androlib.build(Androlib.java:264)
        at brut.apktool.Main.cmdBuild(Main.java:231)
        at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec: [C:\Temp\brut_util_Jar_5210031651277190829.tmp, p, --forced-package-id, 127, --min-sdk-version, 9, --target-sdk-version, 21, --version-code, 602, --version-name, 1.3.0, --no-version-vectors, -F, C:\Temp\APKTOOL8948532041926833785.tmp, -0, arsc, -0, txt, -0, csv, -0, assets/AssetBundles/airstrike, -0, assets/AssetBundles/ammo, -0, assets/AssetBundles/attricon, -0, assets/AssetBundles/breakouticon, -0, assets/AssetBundles/bulletall, -0, assets/AssetBundles/channel, -0, assets/AssetBundles/dependencies, -0, assets/AssetBundles/energy, -0, assets/AssetBundles/equiptype, -0, assets/AssetBundles/openbox, -0, assets/AssetBundles/scripts, -0, assets/AssetBundles/shader, -0, assets/AssetBundles/shipframe, -0, assets/AssetBundles/shipstatus, -0, assets/AssetBundles/shiptype, -0, assets/AssetBundles/skillframe, -0, assets/AssetBundles/weaponframes, -0, assets/AssetBundles/activitybanner/exchangecode_bg, -0, assets/AssetBundles/activitybanner/linshi, -0, assets/AssetBundles/activitybanner/temp, -0, assets/AssetBundles/activitybanner/temp3, -0,
blalalala.................
ne\res, -M, F:\\com.bilibili.azurlane\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:97)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:435)
        ... 6 more
Caused by: java.io.IOException: Cannot run program "C:\Temp\brut_util_Jar_5210031651277190829.tmp": CreateProcess error=206, The filename or extension is too long.
        at java.lang.ProcessBuilder.start(Unknown Source)
        at brut.util.OS.exec(OS.java:90)
        ... 7 more
Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long.
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(Unknown Source)
        at java.lang.ProcessImpl.start(Unknown Source)
        ... 9 more

Steps to Reproduce

  1. apktool decode -o com.bilibili.azurlane "E:\blhx_v1.3.0_bili_673946.apk"
  2. apktool b com.bilibili.azurlane

APK

https://pkg.biligame.com/blhx/blhx_v1.3.0_bili_673946.apk

iBotPeaches commented 7 years ago

Thanks for the report, but this is a duplicate of #1272. If you need a work around, I recommend using a unix/mac platform as their limits are substantially higher than Windows.