blake502 / balatro-mobile-maker

Create a mobile Balatro app from your Steam version of Balatro
359 stars 27 forks source link

Failed to pack Balatro apk! #72

Open wasrosa opened 1 month ago

wasrosa commented 1 month ago

what am i supposed to do? image

blake502 commented 1 month ago

That's quite strange. A tool could be corrupted. Try to completely clear out the folder-- Have only Balatro.exe and balatro-mobile-maker.exe in the folder before you begin.

udayvir-singh commented 1 month ago

@blake502 I am having the same issue, here are the logs:

 ┌─╼[arch]╾╼[/media/games/Balatro]
 └─╼[!] ./balatro-mobile-maker
====Balatro APK Maker====
7-Zip is licensed under the GNU LGPL license. Please visit: www.7-zip.org

Would you like to automatically clean up once complete? (y/n):
n
Would you like to enable extra logging information? (y/n):
y
Would you like to build for Android? (y/n):
y
Would you like to build for iOS (experimental)? (y/n):
n
apktool.jar already exists.
uber-apk-signer.jar already exists.
Balatro-APK-Patch.zip already exists.
love-11.5-android-embed.apk already exists.
7zip.tar.xz already exists.
openjdk already exists.
Game found!
Extracting Balatro.exe...
Balatro directory already exists! Deleting Balatro directory...
Deleting "Balatro/"...
[7zzs]: 7-Zip (z) 24.03 (x64) : Copyright (c) 1999-2024 Igor Pavlov : 2024-03-23
[7zzs]:  64-bit locale=en_IN.UTF-8 Threads:8 OPEN_MAX:524288, ASM
[7zzs]: Scanning the drive for archives:
[7zzs]: 1 file, 55435486 bytes (53 MiB)
[7zzs]: Extracting archive: Balatro.exe
[7zzs]: --
[7zzs]: Path = Balatro.exe
[7zzs]: Type = zip
[7zzs]: Offset = 394752
[7zzs]: Physical Size = 55040734
[7zzs]: Everything is Ok
[7zzs]: Folders: 10
[7zzs]: Files: 197
[7zzs]: Size:       88012162
[7zzs]: Compressed: 55435486
Unpacking Love2D APK with APK Tool...
Failed to unpack Love2D APK with APK Tool!
Press any key to exit...

And here are the sha256 and md5 checksums of every single file in the folder:

 ┌─╼[arch]╾╼[/media/games/Balatro]
 └─╼[×] for f in *; do [ -f "$f" ] && sha256sum "$f"; done
4e7f0dd0a5c380847e9dbf02e64f8b5b70af252e46826e256c092a5a4186a2f2  7zip.tar.xz
bcff5aae0c3f2c650c24a8560d0eb10bfa6e285aac0bdc4c5dd3f60a402988fe  7zz
b38001aa01f6b609d1fab3361369b8bfad417a2ad51b8f4fa9b4d558b9715dc1  7zzs
7956eb04194300ce0d0a84ad18771eebc94b89fb8d1ddcce8ea4c056818646f4  apktool.jar
19c5148e2973c44467c20317ae6b88d465768b3fd5eb653a6a0a016ea801176d  appProperties
efa47e113b15b2963a193ff6b988544f58e0dab26a75b439943d55dba0f5b489  Balatro-APK-Patch.zip
0938840c7a02171e7f25f211a9055edde442c2eca8e61566039f2b835345e144  Balatro.exe
350092c751575f03b214617d75f915b49d15392eaf5fb6e0c951b82eaed7ed33  balatro-mobile-maker
d4647ead54f517e1117130502f07f94b811d9790ba33c7c1446afd5d80524316  Cover.jpg
fa1afff978325f8818ce3a559d67a58297d9154674de7fd8eb03656d93104425  dotNetFx40_Full_setup.exe
111aeddc6a6dbf64b28cb565aa12af9ee3cc0a56ce31e4da0068cf6b474c3288  dxwebsetup.exe
218f62ffd7088763fb5a17019d5a7b2047dbf4fc188f3df655b65112b90b966c  History.txt
8a704c903575c2dbbc109869d179e8213d2574885f3f429173869dd75620b39c  https.dll
4ebd1f337cc55f17f520004d6943f8d5d07f9647d329950b66bbd17cf0d6341c  license.txt
fbf3d522bcc912ea9fa647c9b1196034be507d53ea7d5f25c5f785849982dd07  License.txt
dcf71c1b54c5b5a09598ef1e6cf4852ced5e5e612de3d0f30cfdd39b5014e889  love-11.5-android-embed.apk
18025808e7a184715d75bf49f4bfe24ffd5c2acc2702836e6ef3935b60f06b30  love.dll
29e5b0b67593ebb77e0f681ca0c2dbcba9efcecee7d71591f5c91be5760c963e  lua51.dll
737d63541c206e5f88298022c48c7205b0fc72a07cf051a354a6fae2bcd88f49  luasteam.dll
a58a87086194c25e6f13318cb4b4eb63030e936a835f9740a773d9a421264cf5  mpg123.dll
2abf0aab5a3c5ae9424b64e9d19d9d6d4aebc67814d7e92e4927b9798fef2848  msvcp120.dll
ad32240bb1de55c3f5fcac8789f583a17057f9d14914c538c2a7a5ad346b341c  msvcr120.dll
b8f39714d41e009f75efb183c37100f2cbabb71784bbd243be881ac5b42d86fd  oalinst.exe
434e8eba07e81717162e08b8340b0e297aa169ea539196db6cc90903c0164109  OpenAL32.dll
b535a58db80aeb5cc0d5e85ae6cb3f621d7f269ca1b36832f1aed3842cede4f4  openjdk
9e169542af4eef40f99c5a09c5042fb8aa8f643b50d810f0f0036a2c3dcab7fc  openjdk.tar.gz
d8a5f0dc03c63f8a9123a808159056792af89115e4b465cb1d464fc78d9a4074  readme.txt
83f63cda993537e85165f396dca9668ce49baaef17d3532b24ef87fbffcc8a97  SDL2.dll
0cfe547ea82071953cf99daffa3bd11bb468eec0e400961e7e33e4dc36674ea8  steam_api64.dll
843f16eaaec7c898763c4c4b3954313d825de1b259cb983e1abc1112119d5ea5  steam_appid.txt
e1299fd6fcf4da527dd53735b56127e8ea922a321128123b9c32d619bba1d835  uber-apk-signer.jar
b6c82087a2c443db859fdbeaae7f46244d06c3f2a7f71c35e50358066253de52  vcredist_2015-2019_x64.exe
ac96016f1511ae3eb5ec9de04551146fe351b7f97858dcd67163912e2302f5d6  vcredist_2015-2019_x86.exe
b06546ddc8ca1e3d532f3f2593e88a6f49e81b66a9c2051d58508cc97b6a2023  vcredist_x64.exe
8162b2d665ca52884507ede19549e99939ce4ea4a638c537fa653539819138c8  vcredist_x86.exe
e6c41d692ebcba854dad4b1c52bb7ddd05926bad3105595d6596b8bab01c25e7  xnafx40_redist.msi
 ┌─╼[arch]╾╼[/media/games/Balatro]
 └─╼[×] for f in *; do [ -f "$f" ] && md5sum "$f"; done
4ba1e3ec8e47e0b509d08f6dcc3f24d2  7zip.tar.xz
1212f405b4c8d3c24d24ac8ec767454c  7zz
1531be391240cc44d889477192f80f2c  7zzs
e28e4b4a413a252617d92b657a33c947  apktool.jar
14ace71ffce59afa7dbb423a27961e69  appProperties
b336db61dcd11cd94880289f6ee9d885  Balatro-APK-Patch.zip
954cb9b9ee671a7f7732836781c67684  Balatro.exe
f32d7971f5fcf93299963b2be1240816  balatro-mobile-maker
02ddad05b96a9852ef652896d4914526  Cover.jpg
53406e9988306cbd4537677c5336aba4  dotNetFx40_Full_setup.exe
fd6057b33e15a553ddc5d9873723ce8f  dxwebsetup.exe
1802fab5da9e0164500aba0e11d97b50  History.txt
d86732797537f128799f4753ccd39436  https.dll
02cb6faf045e43e91ec308b066bee16c  license.txt
097a07bbf95da683a483c9c362282622  License.txt
bf19b8620b5893176a5d4d9a082b0207  love-11.5-android-embed.apk
67a825a14ee72b670011722984852011  love.dll
e0e12c148ec7439f7f2d7b927e123942  lua51.dll
3a9684714ccd9f25a9a6d94de9972f8b  luasteam.dll
1063bdbb4cff2f688e77df90b1873b01  mpg123.dll
46060c35f697281bc5e7337aee3722b1  msvcp120.dll
9c861c079dd81762b6c54e37597b7712  msvcr120.dll
694f54bd227916b89fc3eb1db53f0685  oalinst.exe
750a9cd07b5a6d50cac0502bb680c4a5  OpenAL32.dll
4ffbe1491e8e99b3b7ab8a278af91957  openjdk
1449eeb7454c369ff6068ff03199d16e  openjdk.tar.gz
8074c4f1fa2553852b88a052b25acc01  readme.txt
50187e47bfde8327814096ec6e8d3913  SDL2.dll
c7ce820020b0900eb44d2a72f2ab9294  steam_api64.dll
9aba295450a6e6cb58ec0e73f6d5328c  steam_appid.txt
d1dedef51b68fc0ae1f94199ab35b894  uber-apk-signer.jar
f0248d477e74687c5619ae16498b13d4  vcredist_2015-2019_x64.exe
de34b1c517e0463602624bbc8294c08d  vcredist_2015-2019_x86.exe
630d75210b325a280c3352f879297ed5  vcredist_x64.exe
b88228d5fef4b6dc019d69d4471f23ec  vcredist_x86.exe
97c2eebb30c5a88c68c8f24f37183f1d  xnafx40_redist.msi
udayvir-singh commented 1 month ago

I am running 1.0.0n-FULL version

udayvir-singh commented 1 month ago

I have again tried patch Balatro.exe in a clean directory like you suggested, but it is still showing the same error, here are the md5sums:

 ┌─╼[arch]╾╼[/media/games/B]
 └─╼[×] for f in *; do [ -f "$f" ] && md5sum "$f"; done
4ba1e3ec8e47e0b509d08f6dcc3f24d2  7zip.tar.xz
1212f405b4c8d3c24d24ac8ec767454c  7zz
1531be391240cc44d889477192f80f2c  7zzs
e28e4b4a413a252617d92b657a33c947  apktool.jar
b336db61dcd11cd94880289f6ee9d885  Balatro-APK-Patch.zip
954cb9b9ee671a7f7732836781c67684  Balatro.exe
f32d7971f5fcf93299963b2be1240816  balatro-mobile-maker
1802fab5da9e0164500aba0e11d97b50  History.txt
097a07bbf95da683a483c9c362282622  License.txt
7a5f985a7d8ad4bedc1d1bd385f37ca0  love-11.5-android-embed.apk
4ffbe1491e8e99b3b7ab8a278af91957  openjdk
1449eeb7454c369ff6068ff03199d16e  openjdk.tar.gz
8074c4f1fa2553852b88a052b25acc01  readme.txt
d1dedef51b68fc0ae1f94199ab35b894  uber-apk-signer.jar
udayvir-singh commented 1 month ago

It doesn't seem to be a issue with Balatro.exe because it is failing to extract love-11.5-android-embed.apk

udayvir-singh commented 1 month ago

There are the logs when you try to extract:

 ┌─╼[arch]╾╼[/media/games/B]
 └─╼[!] java -jar apktool.jar d love-11.5-android-embed.apk
I: Using Apktool 2.9.3 on love-11.5-android-embed.apk
Exception in thread "main" brut.androlib.exceptions.AndrolibException: brut.directory.DirectoryException: java.util.zip.ZipException: zip END header not found
        at brut.androlib.apk.ApkInfo.hasResources(ApkInfo.java:88)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
        at brut.apktool.Main.cmdDecode(Main.java:217)
        at brut.apktool.Main.main(Main.java:92)
Caused by: brut.directory.DirectoryException: java.util.zip.ZipException: zip END header not found
        at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:55)
        at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:38)
        at brut.directory.ExtFile.getDirectory(ExtFile.java:49)
        at brut.androlib.apk.ApkInfo.hasResources(ApkInfo.java:86)
        ... 3 more
Caused by: java.util.zip.ZipException: zip END header not found
        at java.base/java.util.zip.ZipFile$Source.findEND(Unknown Source)
        at java.base/java.util.zip.ZipFile$Source.initCEN(Unknown Source)
        at java.base/java.util.zip.ZipFile$Source.<init>(Unknown Source)
        at java.base/java.util.zip.ZipFile$Source.get(Unknown Source)
        at java.base/java.util.zip.ZipFile$CleanableResource.<init>(Unknown Source)
        at java.base/java.util.zip.ZipFile.<init>(Unknown Source)
        at java.base/java.util.zip.ZipFile.<init>(Unknown Source)
        at java.base/java.util.zip.ZipFile.<init>(Unknown Source)
        at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:53)
        ... 6 more
udayvir-singh commented 1 month ago

@blake502 I just tried running balatro-mobile-maker.exe in windows and it worked without any issues. This is a linux specific issue.

blake502 commented 1 month ago

@udayvir-singh I created a new issue for you since yours is dissimilar to this one. Different error, different platform. I've moved your comments over there. I'll remove your comments here so I can work with @wasrosa here.

https://github.com/blake502/balatro-mobile-maker/issues/75

udayvir-singh commented 1 month ago

@blake502 Thanks, I didn't notice it was a different error in the logs. Because this issue was posted just 2 hours after I got the error, I thought it was the same issue.

patrickkkim commented 1 month ago

Also having the same issue. Using Windows 11 and building for Android. It didn't fix even if I put the files in a separate folder.

Loading globals.lua file...
Successfully applied patch...
Loading game.lua file...
Successfully applied patch...
Packing Balatro folder...
[7za]: 7-Zip (a) 24.04 (x64) : Copyright (c) 1999-2024 Igor Pavlov : 2024-04-05
[7za]: Scanning the drive:
[7za]: 10 folders, 196 files, 88025718 bytes (84 MiB)
[7za]: Creating archive: balatro.zip
[7za]: Add new data to archive: 10 folders, 196 files, 88025718 bytes (84 MiB)
[7za]: Files read from disk: 196
[7za]: Archive size: 55046771 bytes (53 MiB)
[7za]: Everything is Ok
Moving archive...
Repacking APK...
[java]: I: Using Apktool 2.9.3
[java]: I: Copying balatro-apk classes.dex file...
[java]: I: Checking whether resources has changed...
[java]: I: Building resources...
Failed to pack Balatro apk!
Deleting temporary files...
Deleting "love-11.5-android-embed.apk"...
Deleting "Balatro-APK-Patch.zip"...
Deleting "apktool.jar"...
Deleting "uber-apk-signer.jar"...
Deleting "7za.exe"...
Deleting "openjdk.zip"...
Deleting "balatro.zip"...
Deleting "jdk-21.0.3+9/"...
Deleting "Balatro-APK-Patch/"...
Deleting "Balatro/"...
Deleting "balatro-apk/"...
Press any key to exit...
pgp00 commented 3 weeks ago

Same question. May I know how to solve it?