Unable to rebuild apk with apktool kali linux










-3















hello guys failed to recompile an apk with apktool
this is the error log image:



enter image description here



I did all those commands:



apt-get install zipalign
apt-get update
apt-get upgrade
apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6


and I also already have jdk 10
but still error. Also I delete apktool and reinstalled, but same error. I don't know ho to fix.










share|improve this question
























  • I thought apktool was abandoned. I think there was a pseudo-fork and now another tool is used instead. (That was my experience back in 2012 or so. We ended up writing our own tool because there were too many problems with apktool). This is probably a better question for Reverse Engineering Stack Exchange.

    – jww
    Sep 20 '18 at 22:43
















-3















hello guys failed to recompile an apk with apktool
this is the error log image:



enter image description here



I did all those commands:



apt-get install zipalign
apt-get update
apt-get upgrade
apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6


and I also already have jdk 10
but still error. Also I delete apktool and reinstalled, but same error. I don't know ho to fix.










share|improve this question
























  • I thought apktool was abandoned. I think there was a pseudo-fork and now another tool is used instead. (That was my experience back in 2012 or so. We ended up writing our own tool because there were too many problems with apktool). This is probably a better question for Reverse Engineering Stack Exchange.

    – jww
    Sep 20 '18 at 22:43














-3












-3








-3








hello guys failed to recompile an apk with apktool
this is the error log image:



enter image description here



I did all those commands:



apt-get install zipalign
apt-get update
apt-get upgrade
apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6


and I also already have jdk 10
but still error. Also I delete apktool and reinstalled, but same error. I don't know ho to fix.










share|improve this question
















hello guys failed to recompile an apk with apktool
this is the error log image:



enter image description here



I did all those commands:



apt-get install zipalign
apt-get update
apt-get upgrade
apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6


and I also already have jdk 10
but still error. Also I delete apktool and reinstalled, but same error. I don't know ho to fix.







linux apk rebuild apktool zipalign






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 28 '18 at 4:30









Ashkan

33




33










asked Sep 20 '18 at 21:44









waleedwaleed

719




719












  • I thought apktool was abandoned. I think there was a pseudo-fork and now another tool is used instead. (That was my experience back in 2012 or so. We ended up writing our own tool because there were too many problems with apktool). This is probably a better question for Reverse Engineering Stack Exchange.

    – jww
    Sep 20 '18 at 22:43


















  • I thought apktool was abandoned. I think there was a pseudo-fork and now another tool is used instead. (That was my experience back in 2012 or so. We ended up writing our own tool because there were too many problems with apktool). This is probably a better question for Reverse Engineering Stack Exchange.

    – jww
    Sep 20 '18 at 22:43

















I thought apktool was abandoned. I think there was a pseudo-fork and now another tool is used instead. (That was my experience back in 2012 or so. We ended up writing our own tool because there were too many problems with apktool). This is probably a better question for Reverse Engineering Stack Exchange.

– jww
Sep 20 '18 at 22:43






I thought apktool was abandoned. I think there was a pseudo-fork and now another tool is used instead. (That was my experience back in 2012 or so. We ended up writing our own tool because there were too many problems with apktool). This is probably a better question for Reverse Engineering Stack Exchange.

– jww
Sep 20 '18 at 22:43













2 Answers
2






active

oldest

votes


















0














i did this command and it worked



sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev





share|improve this answer






























    0














    this error cause mostly because your system has a problem with old version of “apktool” that you are using.



    before Starting, make sure you have fully updated and upgraded “kali” and “packages” by running the following commands:



    sudo apt update
    sudo apt full-upgrade


    also you need to have “java version +1.8”, that you can check by running “java —version” Command.
    if you haven’t installed it yet , you can download it from link down there.



    Java Website



    On These Steps We Will Install Latest Version Of Apktool Manually As The last released Version is not Available on Package Managers Like apt or apt-get.




    Step One




    you have to check the last released version of apktool by checking the link below :



    Apktool Latest Versions




    Step Two




    Compare your “apktool” version by “apktool —version” command with the latest version.



    if your apktool version is lower than the latest version then you have to download the “apktool wrapper script” and “apktool.jar” with the following links :



    Apktool Wrapper Script



    Apktool Latest Version




    Step Three




    after downloading these files , you have to change their name and permissions



    change the first file name from “apktool.txt” to “apktool” with no extension and change the second file from “apktool_SOMEVERSION.jar” to apktool.jar



    change their permissions by running “chmod +x apktool && chmod +x apktool.jar” after changing directory to the existing files. (cd path_that_these_two_files_exist)




    Step Four




    you have to check where your "apktool" is by running “whereis apktool” command.




    Step Five




    after finding the directory of your installed apktool you can remove them (apktool files) and copy your new files in their directory (your recently donwloaded files that you changed names and permissions in step three).




    Step Six




    after replacing them check your apktool version again and it should be changed now and after trying to rebuild your apk you can see that the error “unable to rebuild apk with apktool” doesn’t exist anymore.




    Last Step




    if it didn’t work , you can try removing all the existing "apktool" folder and files and running “apktool —version” so that it would say “there is no such a file or directoy in EXAMPLE_DIRECTORY” and you have to continue from Step Five.



    if you haven’t installed any version of apktool , you can try it by “ sudo apt install apktool “ and continue from Step One.




    Zipalign




    you can't install "zipalign" using sudo apt-get install zipalign command because it will install "Google Android Build Tools" instead.



    You have to install it manually by downloading it from



    Zipalign Download Link



    and install it by sudo apt install ./Your_File_name.deb Command.




    In The End




    If you still having problem with rebuilding your apk then it's probably because apktool cannot rebuild large size apk files and you can be sure by using lower apk size (<5MB).



    you can inject your payload manually and also rebuild it manually by tools like "android studio" or whatever you like.



    here is the steps for manually injecting of payload to an apk file :



    1. generate your payload

    2. you have to decompile your apk

    3. decompile your payload

    4. inject payload codes in the right place of your apk file (search for
      it)

    5. add your permissions ( if you are working on sdk version +23 , you
      have to call your permissions also)

    6. rebuild your injected folder to apk file

    7. sign your afk file

    You can Use This_Tutorial that covered these steps.



    Don't Forget to Using "Android Studio" or Another tool for rebuilding apk file.






    share|improve this answer
























      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52433758%2funable-to-rebuild-apk-with-apktool-kali-linux%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      i did this command and it worked



      sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev





      share|improve this answer



























        0














        i did this command and it worked



        sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev





        share|improve this answer

























          0












          0








          0







          i did this command and it worked



          sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev





          share|improve this answer













          i did this command and it worked



          sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 30 '18 at 1:00









          waleedwaleed

          719




          719























              0














              this error cause mostly because your system has a problem with old version of “apktool” that you are using.



              before Starting, make sure you have fully updated and upgraded “kali” and “packages” by running the following commands:



              sudo apt update
              sudo apt full-upgrade


              also you need to have “java version +1.8”, that you can check by running “java —version” Command.
              if you haven’t installed it yet , you can download it from link down there.



              Java Website



              On These Steps We Will Install Latest Version Of Apktool Manually As The last released Version is not Available on Package Managers Like apt or apt-get.




              Step One




              you have to check the last released version of apktool by checking the link below :



              Apktool Latest Versions




              Step Two




              Compare your “apktool” version by “apktool —version” command with the latest version.



              if your apktool version is lower than the latest version then you have to download the “apktool wrapper script” and “apktool.jar” with the following links :



              Apktool Wrapper Script



              Apktool Latest Version




              Step Three




              after downloading these files , you have to change their name and permissions



              change the first file name from “apktool.txt” to “apktool” with no extension and change the second file from “apktool_SOMEVERSION.jar” to apktool.jar



              change their permissions by running “chmod +x apktool && chmod +x apktool.jar” after changing directory to the existing files. (cd path_that_these_two_files_exist)




              Step Four




              you have to check where your "apktool" is by running “whereis apktool” command.




              Step Five




              after finding the directory of your installed apktool you can remove them (apktool files) and copy your new files in their directory (your recently donwloaded files that you changed names and permissions in step three).




              Step Six




              after replacing them check your apktool version again and it should be changed now and after trying to rebuild your apk you can see that the error “unable to rebuild apk with apktool” doesn’t exist anymore.




              Last Step




              if it didn’t work , you can try removing all the existing "apktool" folder and files and running “apktool —version” so that it would say “there is no such a file or directoy in EXAMPLE_DIRECTORY” and you have to continue from Step Five.



              if you haven’t installed any version of apktool , you can try it by “ sudo apt install apktool “ and continue from Step One.




              Zipalign




              you can't install "zipalign" using sudo apt-get install zipalign command because it will install "Google Android Build Tools" instead.



              You have to install it manually by downloading it from



              Zipalign Download Link



              and install it by sudo apt install ./Your_File_name.deb Command.




              In The End




              If you still having problem with rebuilding your apk then it's probably because apktool cannot rebuild large size apk files and you can be sure by using lower apk size (<5MB).



              you can inject your payload manually and also rebuild it manually by tools like "android studio" or whatever you like.



              here is the steps for manually injecting of payload to an apk file :



              1. generate your payload

              2. you have to decompile your apk

              3. decompile your payload

              4. inject payload codes in the right place of your apk file (search for
                it)

              5. add your permissions ( if you are working on sdk version +23 , you
                have to call your permissions also)

              6. rebuild your injected folder to apk file

              7. sign your afk file

              You can Use This_Tutorial that covered these steps.



              Don't Forget to Using "Android Studio" or Another tool for rebuilding apk file.






              share|improve this answer





























                0














                this error cause mostly because your system has a problem with old version of “apktool” that you are using.



                before Starting, make sure you have fully updated and upgraded “kali” and “packages” by running the following commands:



                sudo apt update
                sudo apt full-upgrade


                also you need to have “java version +1.8”, that you can check by running “java —version” Command.
                if you haven’t installed it yet , you can download it from link down there.



                Java Website



                On These Steps We Will Install Latest Version Of Apktool Manually As The last released Version is not Available on Package Managers Like apt or apt-get.




                Step One




                you have to check the last released version of apktool by checking the link below :



                Apktool Latest Versions




                Step Two




                Compare your “apktool” version by “apktool —version” command with the latest version.



                if your apktool version is lower than the latest version then you have to download the “apktool wrapper script” and “apktool.jar” with the following links :



                Apktool Wrapper Script



                Apktool Latest Version




                Step Three




                after downloading these files , you have to change their name and permissions



                change the first file name from “apktool.txt” to “apktool” with no extension and change the second file from “apktool_SOMEVERSION.jar” to apktool.jar



                change their permissions by running “chmod +x apktool && chmod +x apktool.jar” after changing directory to the existing files. (cd path_that_these_two_files_exist)




                Step Four




                you have to check where your "apktool" is by running “whereis apktool” command.




                Step Five




                after finding the directory of your installed apktool you can remove them (apktool files) and copy your new files in their directory (your recently donwloaded files that you changed names and permissions in step three).




                Step Six




                after replacing them check your apktool version again and it should be changed now and after trying to rebuild your apk you can see that the error “unable to rebuild apk with apktool” doesn’t exist anymore.




                Last Step




                if it didn’t work , you can try removing all the existing "apktool" folder and files and running “apktool —version” so that it would say “there is no such a file or directoy in EXAMPLE_DIRECTORY” and you have to continue from Step Five.



                if you haven’t installed any version of apktool , you can try it by “ sudo apt install apktool “ and continue from Step One.




                Zipalign




                you can't install "zipalign" using sudo apt-get install zipalign command because it will install "Google Android Build Tools" instead.



                You have to install it manually by downloading it from



                Zipalign Download Link



                and install it by sudo apt install ./Your_File_name.deb Command.




                In The End




                If you still having problem with rebuilding your apk then it's probably because apktool cannot rebuild large size apk files and you can be sure by using lower apk size (<5MB).



                you can inject your payload manually and also rebuild it manually by tools like "android studio" or whatever you like.



                here is the steps for manually injecting of payload to an apk file :



                1. generate your payload

                2. you have to decompile your apk

                3. decompile your payload

                4. inject payload codes in the right place of your apk file (search for
                  it)

                5. add your permissions ( if you are working on sdk version +23 , you
                  have to call your permissions also)

                6. rebuild your injected folder to apk file

                7. sign your afk file

                You can Use This_Tutorial that covered these steps.



                Don't Forget to Using "Android Studio" or Another tool for rebuilding apk file.






                share|improve this answer



























                  0












                  0








                  0







                  this error cause mostly because your system has a problem with old version of “apktool” that you are using.



                  before Starting, make sure you have fully updated and upgraded “kali” and “packages” by running the following commands:



                  sudo apt update
                  sudo apt full-upgrade


                  also you need to have “java version +1.8”, that you can check by running “java —version” Command.
                  if you haven’t installed it yet , you can download it from link down there.



                  Java Website



                  On These Steps We Will Install Latest Version Of Apktool Manually As The last released Version is not Available on Package Managers Like apt or apt-get.




                  Step One




                  you have to check the last released version of apktool by checking the link below :



                  Apktool Latest Versions




                  Step Two




                  Compare your “apktool” version by “apktool —version” command with the latest version.



                  if your apktool version is lower than the latest version then you have to download the “apktool wrapper script” and “apktool.jar” with the following links :



                  Apktool Wrapper Script



                  Apktool Latest Version




                  Step Three




                  after downloading these files , you have to change their name and permissions



                  change the first file name from “apktool.txt” to “apktool” with no extension and change the second file from “apktool_SOMEVERSION.jar” to apktool.jar



                  change their permissions by running “chmod +x apktool && chmod +x apktool.jar” after changing directory to the existing files. (cd path_that_these_two_files_exist)




                  Step Four




                  you have to check where your "apktool" is by running “whereis apktool” command.




                  Step Five




                  after finding the directory of your installed apktool you can remove them (apktool files) and copy your new files in their directory (your recently donwloaded files that you changed names and permissions in step three).




                  Step Six




                  after replacing them check your apktool version again and it should be changed now and after trying to rebuild your apk you can see that the error “unable to rebuild apk with apktool” doesn’t exist anymore.




                  Last Step




                  if it didn’t work , you can try removing all the existing "apktool" folder and files and running “apktool —version” so that it would say “there is no such a file or directoy in EXAMPLE_DIRECTORY” and you have to continue from Step Five.



                  if you haven’t installed any version of apktool , you can try it by “ sudo apt install apktool “ and continue from Step One.




                  Zipalign




                  you can't install "zipalign" using sudo apt-get install zipalign command because it will install "Google Android Build Tools" instead.



                  You have to install it manually by downloading it from



                  Zipalign Download Link



                  and install it by sudo apt install ./Your_File_name.deb Command.




                  In The End




                  If you still having problem with rebuilding your apk then it's probably because apktool cannot rebuild large size apk files and you can be sure by using lower apk size (<5MB).



                  you can inject your payload manually and also rebuild it manually by tools like "android studio" or whatever you like.



                  here is the steps for manually injecting of payload to an apk file :



                  1. generate your payload

                  2. you have to decompile your apk

                  3. decompile your payload

                  4. inject payload codes in the right place of your apk file (search for
                    it)

                  5. add your permissions ( if you are working on sdk version +23 , you
                    have to call your permissions also)

                  6. rebuild your injected folder to apk file

                  7. sign your afk file

                  You can Use This_Tutorial that covered these steps.



                  Don't Forget to Using "Android Studio" or Another tool for rebuilding apk file.






                  share|improve this answer















                  this error cause mostly because your system has a problem with old version of “apktool” that you are using.



                  before Starting, make sure you have fully updated and upgraded “kali” and “packages” by running the following commands:



                  sudo apt update
                  sudo apt full-upgrade


                  also you need to have “java version +1.8”, that you can check by running “java —version” Command.
                  if you haven’t installed it yet , you can download it from link down there.



                  Java Website



                  On These Steps We Will Install Latest Version Of Apktool Manually As The last released Version is not Available on Package Managers Like apt or apt-get.




                  Step One




                  you have to check the last released version of apktool by checking the link below :



                  Apktool Latest Versions




                  Step Two




                  Compare your “apktool” version by “apktool —version” command with the latest version.



                  if your apktool version is lower than the latest version then you have to download the “apktool wrapper script” and “apktool.jar” with the following links :



                  Apktool Wrapper Script



                  Apktool Latest Version




                  Step Three




                  after downloading these files , you have to change their name and permissions



                  change the first file name from “apktool.txt” to “apktool” with no extension and change the second file from “apktool_SOMEVERSION.jar” to apktool.jar



                  change their permissions by running “chmod +x apktool && chmod +x apktool.jar” after changing directory to the existing files. (cd path_that_these_two_files_exist)




                  Step Four




                  you have to check where your "apktool" is by running “whereis apktool” command.




                  Step Five




                  after finding the directory of your installed apktool you can remove them (apktool files) and copy your new files in their directory (your recently donwloaded files that you changed names and permissions in step three).




                  Step Six




                  after replacing them check your apktool version again and it should be changed now and after trying to rebuild your apk you can see that the error “unable to rebuild apk with apktool” doesn’t exist anymore.




                  Last Step




                  if it didn’t work , you can try removing all the existing "apktool" folder and files and running “apktool —version” so that it would say “there is no such a file or directoy in EXAMPLE_DIRECTORY” and you have to continue from Step Five.



                  if you haven’t installed any version of apktool , you can try it by “ sudo apt install apktool “ and continue from Step One.




                  Zipalign




                  you can't install "zipalign" using sudo apt-get install zipalign command because it will install "Google Android Build Tools" instead.



                  You have to install it manually by downloading it from



                  Zipalign Download Link



                  and install it by sudo apt install ./Your_File_name.deb Command.




                  In The End




                  If you still having problem with rebuilding your apk then it's probably because apktool cannot rebuild large size apk files and you can be sure by using lower apk size (<5MB).



                  you can inject your payload manually and also rebuild it manually by tools like "android studio" or whatever you like.



                  here is the steps for manually injecting of payload to an apk file :



                  1. generate your payload

                  2. you have to decompile your apk

                  3. decompile your payload

                  4. inject payload codes in the right place of your apk file (search for
                    it)

                  5. add your permissions ( if you are working on sdk version +23 , you
                    have to call your permissions also)

                  6. rebuild your injected folder to apk file

                  7. sign your afk file

                  You can Use This_Tutorial that covered these steps.



                  Don't Forget to Using "Android Studio" or Another tool for rebuilding apk file.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 12 '18 at 16:42

























                  answered Sep 27 '18 at 22:32









                  AshkanAshkan

                  33




                  33



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52433758%2funable-to-rebuild-apk-with-apktool-kali-linux%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Use pre created SQLite database for Android project in kotlin

                      Darth Vader #20

                      Ondo