termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.39k stars 3.09k forks source link

[Bug]: jpackage uses too much space when building app #22389

Open Veha0001 opened 4 days ago

Veha0001 commented 4 days ago

Problem description

I use jpackage command trying to create app execute file but my phone storage is max out and because of jpackage command my phone also start lagging...

What steps will reproduce the bug?

  1. Apt install openjdk-21
  2. jpackage --input . --name appedit --main-jar app.jar --type app-image

What is the expected behavior?

"My Termux app used up almost 11GB of storage after I ran a command. I eventually canceled the command and killed the app. Afterward, I removed the output directory file created by jpackage, and my storage was freed up.

I'm not sure if this is a bug or something else, but how did running just one command fill up so much storage?

System information

Termux Variables:
TERMUX_EXEC__PROC_SELF_EXE=/data/data/com.termux/files/usr/bin/termux-info
TERMUX_VERSION=googleplay.2024.10.30
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.net stable main
Updatable packages:
All packages up to date
termux-tools version:
3.0.8
Android version:
14
Kernel build information:
Linux localhost 4.19.191+ #1 SMP PREEMPT Wed Sep 4 04:08:57 CST 2024 aarch64 Android
Device manufacturer:
OPPO
Device model:
CPH2591
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
truboxl commented 4 days ago

Without providing logs or the project you are building, I doubt we can do anything here

Veha0001 commented 3 days ago

I was just trying to make an executable file of this JAR file using jpackage for the first time on Termux. There wasn’t any log output from the command.

➜  src jpackage --type app-image -i ./ -n APKEditor \
                --main-class com.reandroid.apkeditor.Main --main-jar APKEditor-1.4.1.jar
^C%                                                              
➜  src
➜  src ls
APKEditor  APKEditor-1.4.1.jar
➜  src pwr
zsh: correct 'pwr' to 'pwd' [nyae]? n
zsh: permission denied: pwr
➜  src pwd
/data/data/com.termux/files/home/src
➜  src du -sh APKEditor
5.4G    APKEditor
➜  src du -sh APKEditor*.jar
7.0M    APKEditor-1.4.1.jar
➜  src la
total 7.0M
drwx------. 4 u0_a280 u0_a280 3.4K Nov 27 12:09 APKEditor
-rw-------. 1 u0_a280 u0_a280 7.0M Nov 27 11:41 APKEditor-1.4.1.jar
➜  src find | grep

And here is what happened in the folder:

./APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEdito/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/appAPKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/runtime/legal/jdk.naming.dns/ADDITIONAL_LICENSE_INFO                      ./APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEdito/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/appAPKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/runtime/legal/jdk.naming.dns/LICENSE                                      ./APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEdito/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/appAPKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/runtime/legal/jdk.naming.dns/ASSEMBLY_EXCEPTION                           ./APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEdito/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/appAPKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/runtime/legal/jdk.naming.rmi                                              ./APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEdito/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/appAPKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/runtime/legal/jdk.naming.rmi/ADDITIONAL_LICENSE_INFO                      ./APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEdito/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/appAPKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/runtime/legal/jdk.naming.rmi/LICENSE                                      ./APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEdito/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/appAPKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/runtime/legal/jdk.naming.rmi/ASSEMBLY_EXCEPTION                           ./APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEdito/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/appAPKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/runtime/legal/jdk.net                                                     ./APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEdito/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/appAPKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/runtime/legal/jdk.net/ADDITIONAL_LICENSE_INFO                             ./APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEdito/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/appAPKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/runtime/legal/jdk.net/LICENSE                                             ./APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEdito/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/app/APKEditor/lib/