Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Fixed "Building failed" #137

Merged
merged 2 commits into from
Jun 10, 2019
Merged

Fixed "Building failed" #137

merged 2 commits into from
Jun 10, 2019

Conversation

evaleries
Copy link
Contributor

I found the solution for common issue, "building failed".
This happened because there's a whitespace in command while ahmyth building an apk, signing, and decompiling.
Current problem with exec is:
java -jar apktool.jar b C:\Users\Lara Vel\AppData\Local\Programs\AhMyth\resources\app.asar.unpacked\app\Factory\Ahmyth -o C:\Users\Lara Vel\AppData\Local\Programs\AhMyth\resources\app.asar.unpacked\app\Factory\ahmyth.apk

Solution:
by giving double quotes for each folder arguments.
java -jar apktool.jar b "C:\Users\Lara Vel\AppData\Local\Programs\AhMyth\resources\app.asar.unpacked\app\Factory\Ahmyth" -o "C:\Users\Lara Vel\AppData\Local\Programs\AhMyth\resources\app.asar.unpacked\app\Factory\ahmyth.apk"

Dida and others added 2 commits April 27, 2019 16:39
If your current logged user on name has space in it, the program will never work. Because https://github.com/AhMyth/AhMyth-Android-RAT/blob/master/AhMyth-Server/app/app/assets/js/controllers/AppCtrl.js#L129
execute the command without quotes on folder argument and it will return an error.
Example.
My pc ("Lara Vel") has space on its name, so this is the folder for AhMyth basepath : C:\Users\Lara Vel\AppData\Local\Programs\AhMyth
Since my user is "Lara Vel", AhMyth would exec build command like this
`java -jar apktool.jar b C:\Users\**Lara Vel**\AppData\Local\Programs\AhMyth\resources\app.asar.unpacked\app\Factory\Ahmyth -o C:\Users\**Lara Vel**\AppData\Local\Programs\AhMyth\resources\app.asar.unpacked\app\Factory\ahmyth.apk`

SOLUTION:
For next update, @AhMyth
Simply by giving double quotes between apkFolder and its output folder. This solutions must be implemented in every exec function with directory argument.
exec('java -jar ' + CONSTANTS.apktoolJar + ' b "' + apkFolder + '" -o "' + path.join(outputPath, CONSTANTS.apkName + '"')

Co-Authored-By: ahmyth <[email protected]>
@evaleries evaleries changed the title Fixed "Building Fixed "Building failed" Apr 27, 2019
@AhMyth AhMyth merged commit 563488a into AhMyth:master Jun 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants