APKEditor icon indicating copy to clipboard operation
APKEditor copied to clipboard

Temp working directories

Open ApkRE opened this issue 2 years ago • 10 comments

APKEditor creates temp random named temp directory (tmp_xxxxxxxx) on every use and my dev directory is full of these which I have to keep deleting Can you add an option to choose the temp working directory or automatically delete the working directory after use?

Many thanks for a great tool

ApkRE avatar Feb 03 '24 06:02 ApkRE

Did you find .apk files inside those tmp directory ? Which OS are you using ?

REAndroid avatar Feb 12 '24 11:02 REAndroid

I'm using Windows No files in them, just empty directories. 1 created each time I "merge" regardless of the output directory

ApkRE avatar Feb 12 '24 18:02 ApkRE

I don't have windows machine, confirm 1.3.7 solves this issue

REAndroid avatar Apr 07 '24 10:04 REAndroid

Still the same with 1.3.7 While merging directory tmp_1836e20c is created and apks extracted there apks deleted once done, directory remains Running again creates tmp_1836e20c_1

ApkRE avatar Apr 08 '24 16:04 ApkRE

I updated to log the reason why directory not being deleted. Build your own or download from Artifacts. Please test and let us know your results

REAndroid avatar Apr 11 '24 16:04 REAndroid

I downloaded from your Artifacts link and tried again and it's still the same... :(

ApkRE avatar Apr 12 '24 18:04 ApkRE

I was hopping you come back with logs

REAndroid avatar Apr 16 '24 14:04 REAndroid

Sorry here's an example log...

00.000 I: [MERGE] Merging ...
   Input: 1.xapk
 Output: 1_merged.apk
 ----------------------------
00.028 I: [MERGE] Extracting to: tmp_565db641
00.107 I: [MERGE] Searching apk files ...
00.111 I: [MERGE] Found apk files: 2
00.217 I: [MERGE] Found modules: 2
00.357 I: [MERGE] Merging string pools ...
00.391 I: [MERGE] Merged string pools=1, style=0, strings=7956
00.438 I: [MERGE] Merging: [*PackageName*]
00.441 I: [MERGE] Added [*PackageName*] classes.dex -> classes.dex
00.441 I: [MERGE] Added [*PackageName*] classes2.dex -> classes2.dex
00.441 I: [MERGE] Added [*PackageName*] classes3.dex -> classes3.dex
00.441 I: [MERGE] Merging resource table: *PackageName*
00.675 I: [MERGE] Merging: config.armeabi_v7a
00.728 I: [MERGE] Sanitizing manifest ...
00.732 I: [MERGE] Removed-attribute : extractNativeLibs
00.733 I: [MERGE] Removed-attribute : isSplitRequired
00.734 I: [MERGE] Removed-element : <meta-data> name="com.android.vending.splits.required"
00.735 I: [MERGE] Removed-element : <meta-data> name="com.android.stamp.source"
00.736 I: [MERGE] Removed-element : <meta-data> name="com.android.stamp.type"
00.739 I: [MERGE] Removed-table-entry : res/xml/splits0.xml
00.739 I: [MERGE] Removed-element : <meta-data> name="com.android.vending.splits"
00.740 I: [MERGE] Removed-element : <meta-data> name="com.android.vending.derived.apk.id"
00.781 I: [MERGE] Removed unused table strings = 1
Package: *PackageName*
  Removed unused spec strings = 1
Table size changed = 1108088, 1108136
00.785 I: [MERGE] Writing apk ...
00.798 I: [MERGE] Buffering compress changed files ...
01.217 I: [MERGE] Writing files: 1736
01.453 I: [MERGE] Writing signature block ...
01.475 I: [MERGE] Directory exists: C:\xapk\tmp_565db641
01.476 I: [MERGE] files.length = 2tmp_565db641\*PackageName*.apk
tmp_565db641\config.armeabi_v7a.apk
01.478 I: [MERGE] Directory exists: C:\xapk\tmp_565db641
01.479 I: [MERGE] files.length = 2tmp_565db641\*PackageName*.apk
tmp_565db641\config.armeabi_v7a.apk
01.480 I: [MERGE] Saved to: 1_merged.apk

ApkRE avatar Apr 16 '24 16:04 ApkRE

Thank you, i assumed you censored *PackageName* and not real value.

01.479 I: [MERGE] files.length = 2tmp_565db641\*PackageName*.apk
tmp_565db641\config.armeabi_v7a.apk

Supper odd for me! this two files were deleted even twice, I have to debug this myself on windows

REAndroid avatar Apr 16 '24 17:04 REAndroid

Yes I censored the package name, no problem with the name, same problem with all files... Thanks :)

ApkRE avatar Apr 16 '24 17:04 ApkRE