'apktool under Ubuntu 18.04 - brut.directory.DirectoryException: file must be a directory

Ubuntu 18.04 install via Ubuntu Software apktool-new version 2.4.1

/snap/apktool-new/2/bin# ./apktool d /home/myhome/mytemp/test.apk

gives: Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: file must be a directory: test

Hope this helps someone:

~/mytemp$ /snap/apktool-new/2/bin/apktool d test.apk

Running terminal from your Home folder fixes the problem.



Solution 1:[1]

A workaround for the Exception issue is in the question.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Squeeto Na