kefir500 / apk-icon-editor

APK editor to easily change APK icons, name and version.
https://qwertycube.com/apk-icon-editor/
GNU General Public License v3.0
153 stars 46 forks source link

Smali sources unpack error in v2.0.0 #70

Closed measaura closed 6 years ago

measaura commented 6 years ago

I got "APKTool Error" when opening any APK files. Below are the log:

apk-icon-editor.log

kefir500 commented 6 years ago

@measaura Are you using a custom (user-defined) temporary path? Try manually creating the /Users/measaura/Downloads/ADAlocate_temp/apk-icon-editor/ directory or use the default system temporary path (simply reset the APK Icon Editor settings). Tell me if it works after: probably there is a bug when APK Icon Editor is using non-standard system temporary path on macOS.

measaura commented 6 years ago

Previous version is working fine. Only after I update to 2.0.0, it happened. Let me try resetting it and revert.

kefir500 commented 6 years ago

Try manually creating the specified directory first. If it doesn't work, reset the settings.

measaura commented 6 years ago

Manually creating the folder didn't solve the problem. Resetting to default settings solved it. I realised that the layout and menu also changed after the reset.

Thanks for the solutions.

kefir500 commented 6 years ago

@measaura I'm glad the advice worked, however this is definitely an APK Icon Editor bug :) I will investigate this issue and try to fix it in the next release. So, do I understand correctly, you did set the custom temporary directory in APK Icon Editor?

measaura commented 6 years ago

Gorishnyak,

I confirm, yes, I DID create the custom temporary directory manually in the APK Icon Editor as suggested but did not solve the issue.

Dinas Suhadi Putra

Sent from my iPhone

On 17 May 2018, at 20:22, Alexander Gorishnyak notifications@github.com wrote:

@measaura I'm glad the advice worked, however this is definitely an APK Icon Editor bug :) I will investigate this issue and try to fix it in the next release. So, do I understand correctly, you did set the custom temporary directory in APK Icon Editor?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Ibuprophen commented 6 years ago

@measaura, though I don't have any issues myself, a friend of mine did have a similar/same issue.

We got the new software version working by simply uninstalling the former version, restarted the PC and installing the latest version.

I hope this helps out! Please let me know. :-)

~Ibuprophen

kefir500 commented 6 years ago

@ibuprophen1,

It was confirmed by @measaura that the issue was solved by resetting settings (Settings —> Reset Settings). However, this is a temporary hack/fix :)

Apktool stores its framework in a temporary directory specified in APK Icon Editor (which defaults to the system temporary path, however can be changed in Settings —> Repacking menu). When the framework cannot be found for some reason, Apktool generates the Input file was not found or was not readable. error (which can be found in the attached log). Now I'm trying to find out this reason.

You said that your friend had the same issue, so here are some questions if you don't mind, in order to narrow down the bug tracking:

Ibuprophen commented 6 years ago

I can't honestly state that it was exact but, it looks pretty close.

My friend has a Windows 10 Pro x86 PC (Though he knows that I'm not a fan of Win10... LOL!) and called me on the Land Line regarding his issue.

It seemed to me that he had done about the same that I could think of off hand and YES he had used a Custom Directory (I don't customize anything unless I need to myself).

Also, he did attempt a reset and it... Sorta... didn't work. After looking through some areas (to include the Registry Entries) and we couldn't come to a specific conclusion but, had narrowed it down to some type of (very minor) "Permissions" issue within the User Directory.

I just suggested to (and he had done) uninstall, reboot and reinstall then see if the problem still existed...

He called me back and had stated that the reinstallation had done the trick and he was good to go (a happy camper).

to be honest @kefir500... Both my friend and I are very Technically Inclined (not a "Jedi Master" like you! LMAO!) and we didn't think much about it being an underlying issue and figured that it was a more of an Isolated Incident for some.

When I had saw this Github Issue submitted, I just thought about the other day and provided what I could.

~Ibuprophen

kefir500 commented 6 years ago

Important

For future readers:

Please, before applying the aforementioned solution (resetting the configuration) share your log file (Help —> Logs —> Open Log Directory) and a config file located at the following paths:

ngasoft commented 6 years ago

I have this error on Windows 10. Every time recompile classes.dex is checked, it happens. I guess something goes wrong here. Reset setting clears this check, hence clears the error; unfortunately, I want it checked.

kefir500 commented 6 years ago

@ngasoft Seems that this is a different issue related to extracting APK smali code. Could you please repeat the steps until you get this error and provide the log file (Help —> Logs —> Open Log Directory)?

ngasoft commented 6 years ago

Yes, it is the same error message that you mentioned before:

[17:47:57.968] Updater: v2.0.0

[17:48:01.744] Unpacking "C:\Users\xyz\Downloads\abc.apk" 
[17:48:01.744] Output directory: "C:/Users/xyz/Downloads/apk-icon-editor_2.0.0/data/temp/apk-icon-editor/" 
[17:48:02.003] "Input file () was not found or was not readable.
" 
[17:48:02.004] Error (): Apktool Error 
[18:03:29.660] Exiting...
kefir500 commented 6 years ago

@ngasoft Yep, you're right, that's the reason of the bug. Thanks for finding it :) Should I mention you as ngasoft in APK Icon Editor "About" section or you prefer a different name?

Fixed in daa0cfe. The fix will be present in APK Icon Editor v2.1.0.