Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidPathException: Illegal char <:> at index 135 #167

Open
WormChickenWizard opened this issue Jul 1, 2024 · 4 comments
Open

InvalidPathException: Illegal char <:> at index 135 #167

WormChickenWizard opened this issue Jul 1, 2024 · 4 comments

Comments

@WormChickenWizard
Copy link

Program seems to be attempting to create a path with a colon in it (besides the colon in 'e:\')

e:\Downloads>apk-mitm enbrighten_1.1.5_apkcombo.com.apk

  ╭ apk-mitm v1.3.0
  ├ apktool v2.9.3
  ╰ uber-apk-signer v1.3.0

  Using temporary directory:
  C:\Users\Worm\AppData\Local\Temp\apk-mitm-d1ed912d25981a97f615b7cb6c1fb2ad

  √ Checking prerequisities
  × Decoding APK file
    → I: Copying original files...
    Applying patches
    Encoding patched APK file
    Signing patched APK file

   Failed!  An error occurred:

I: Using Apktool 2.9.3 on enbrighten_1.1.5_apkcombo.com.apk
I: Loading resource table...
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\Worm\AppData\Local\Temp\apk-mitm-d1ed912d25981a97f615b7cb6c1fb2ad\framework\1.apk
I: Decoding values */* XMLs...
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Baksmaling classes.dex...
I: Baksmaling classes10.dex...
I: Baksmaling classes11.dex...
I: Baksmaling classes12.dex...
I: Baksmaling classes13.dex...
I: Baksmaling classes14.dex...
I: Baksmaling classes2.dex...
I: Baksmaling classes3.dex...
I: Baksmaling classes4.dex...
I: Baksmaling classes5.dex...
I: Baksmaling classes6.dex...
I: Baksmaling classes7.dex...
I: Baksmaling classes8.dex...
I: Baksmaling classes9.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <:> at index 135: C:\Users\Worm\AppData\Local\Temp\apk-mitm-d1ed912d25981a97f615b7cb6c1fb2ad\decode\original\META-INF\thing\mcHeader_com.thing.smart.v8:j2v8_thingMC.meta
        at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:204)
        at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:175)
        at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
        at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
        at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:231)
        at java.base/java.io.File.toPath(File.java:2413)
        at brut.directory.DirUtil.copyToDir(DirUtil.java:97)
        at brut.directory.DirUtil.copyToDir(DirUtil.java:72)
        at brut.directory.AbstractDirectory.copyToDir(AbstractDirectory.java:198)
        at brut.directory.DirUtil.copyToDir(DirUtil.java:88)
        at brut.directory.AbstractDirectory.copyToDir(AbstractDirectory.java:208)
        at brut.androlib.ApkDecoder.copyOriginalFiles(ApkDecoder.java:304)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:166)
        at brut.apktool.Main.cmdDecode(Main.java:217)
        at brut.apktool.Main.main(Main.java:92)

  The full logs of all commands are available here:
  C:\Users\Worm\AppData\Local\Temp\apk-mitm-d1ed912d25981a97f615b7cb6c1fb2ad\logs
@bes-internal
Copy link

maybe it's better to ignore these problems and use WLS2 for apk-mitm?

@iknek
Copy link

iknek commented Sep 18, 2024

Any updates to this issue? Also experiencing the same error with an app I'm trying to patch. Thanks!

@WormChickenWizard
Copy link
Author

maybe it's better to ignore these problems and use WLS2 for apk-mitm?

Has apk-mitm been tested on WSL2 with an APK that has a colon in the name? I know the character colon is used as a delimiter for variables such as PATH separating a list of directories. I think you'd run into the exact same error regardless of Windows or Linux.

Any updates to this issue? Also experiencing the same error with an app I'm trying to patch. Thanks!

The last commit to main was 5 months ago and I didn't see a PR to fix the issue.

@bes-internal
Copy link

Don't think about it, check it on wls2 and send an error for the Linux environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants