{"action":"created","issue":{"url":"https://api.github.com/repos/iBotPeaches/Apktool/issues/1216","repository_url":"https://api.github.com/repos/iBotPeaches/Apktool","labels_url":"https://api.github.com/repos/iBotPeaches/Apktool/issues/1216/labels{/name}","comments_url":"https://api.github.com/repos/iBotPeaches/Apktool/issues/1216/comments","events_url":"https://api.github.com/repos/iBotPeaches/Apktool/issues/1216/events","html_url":"https://github.com/iBotPeaches/Apktool/issues/1216","id":146016818,"number":1216,"title":"apktool 2.1.0 recompiling errors","user":{"login":"hxrofo","id":17935737,"avatar_url":"https://avatars.githubusercontent.com/u/17935737?v=3","gravatar_id":"","url":"https://api.github.com/users/hxrofo","html_url":"https://github.com/hxrofo","followers_url":"https://api.github.com/users/hxrofo/followers","following_url":"https://api.github.com/users/hxrofo/following{/other_user}","gists_url":"https://api.github.com/users/hxrofo/gists{/gist_id}","starred_url":"https://api.github.com/users/hxrofo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hxrofo/subscriptions","organizations_url":"https://api.github.com/users/hxrofo/orgs","repos_url":"https://api.github.com/users/hxrofo/repos","events_url":"https://api.github.com/users/hxrofo/events{/privacy}","received_events_url":"https://api.github.com/users/hxrofo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-05T15:01:29Z","updated_at":"2016-04-05T17:06:43Z","closed_at":null,"body":"### Information\r\n1. **Apktool Version: 2.1.0\r\n2. **Operating System: Kali Linux\r\n3. **APK From: Play store (facebook app)\r\nLink: https://play.google.com/store/apps/details?id=com.facebook.katana&hl=en\r\nP.S: tried different apps from google play, same errors\r\n\r\n### Stacktrace/Logcat\r\nroot@kali:~/apktool# java -jar apktool.jar b -o test.apk facebook\r\nI: Using Apktool 2.1.0\r\nI: Checking whether sources has changed...\r\nI: Checking whether resources has changed...\r\nI: Building resources...\r\nW: /tmp/brut_util_Jar_3296692393869994056.tmp: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory\r\nException in thread \"main\" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 127): [/tmp/brut_util_Jar_3296692393869994056.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 23, --version-code, 18971686, --version-name, 58.0.0.28.70, -F, /tmp/APKTOOL8749237186933601936.tmp, -0, FBSIG, -0, xzs, -0, arsc, -I, /root/apktool/framework/1.apk, -S, /root/apktool/facebook/res, -M, /root/apktool/facebook/AndroidManifest.xml]\r\n\tat brut.androlib.Androlib.buildResourcesFull(Androlib.java:433)\r\n\tat brut.androlib.Androlib.buildResources(Androlib.java:371)\r\n\tat brut.androlib.Androlib.build(Androlib.java:281)\r\n\tat brut.androlib.Androlib.build(Androlib.java:254)\r\n\tat brut.apktool.Main.cmdBuild(Main.java:224)\r\n\tat brut.apktool.Main.main(Main.java:84)\r\nCaused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 127): [/tmp/brut_util_Jar_3296692393869994056.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 23, --version-code, 18971686, --version-name, 58.0.0.28.70, -F, /tmp/APKTOOL8749237186933601936.tmp, -0, FBSIG, -0, xzs, -0, arsc, -I, /root/apktool/framework/1.apk, -S, /root/apktool/facebook/res, -M, /root/apktool/facebook/AndroidManifest.xml]\r\n\tat brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:433)\r\n\tat brut.androlib.Androlib.buildResourcesFull(Androlib.java:419)\r\n\t... 5 more\r\nCaused by: brut.common.BrutException: could not exec (exit code = 127): [/tmp/brut_util_Jar_3296692393869994056.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 23, --version-code, 18971686, --version-name, 58.0.0.28.70, -F, /tmp/APKTOOL8749237186933601936.tmp, -0, FBSIG, -0, xzs, -0, arsc, -I, /root/apktool/framework/1.apk, -S, /root/apktool/facebook/res, -M, /root/apktool/facebook/AndroidManifest.xml]\r\n\tat brut.util.OS.exec(OS.java:95)\r\n\tat brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:427)\r\n\t... 6 more\r\n```\r\n### Steps to Reproduce\r\n1) cd /root/apktool/\r\nfiles in the folder:\r\napktool.jar\r\naapt\r\nfacebook.apk\r\nvirus.apk\r\nsign.jar\r\n2) chmod +x apktool.jar\r\nchmod +x aapt\r\n3) decompiling facebook.apk and virus.apk\r\njava -jar apktool.jar d facebook.apk\r\njava -jar apktool.jar d virus.apk\r\n===> NO ERRORS, LOOKS GOOD\r\n4) copied the necessary files from virus to facebook/smali/com/ and edited AndroidManifest.xml of facebook\r\n===> no problem\r\n5) Re-compiling facebook:\r\njava -jar apktool.jar b -o facebook2.apk facebook\r\n===> ERRORS AS SEEN IN THE LOG ABOVE\r\nP.S: tried older versions of apktool.jar\r\n       tried more than 2 aapt\r\n       tried the default apktool installed in kali linux, with android-sdk installed\r\n\r\njava -version\r\njava version \"1.7.0_91\"\r\nOpenJDK Runtime Environment (IcedTea 2.6.3) (7u91-2.6.3-1)\r\nOpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)\r\n\r\njava path variable set correctly, no problem.\r\n### Questions to ask before submission\r\n1. Have you tried `apktool d`, `apktool b` without changing anything?\r\n  ===> YES I DID, decompiled facebook.apk and tried recompiling it AS IT IS, but got the same errors\r\n2. Are you using the latest apktool version?\r\n===> YES I AM. \r\nhttps://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.1.0.jar\r\n\r\nThanks for helping me out"},"comment":{"url":"https://api.github.com/repos/iBotPeaches/Apktool/issues/comments/205898917","html_url":"https://github.com/iBotPeaches/Apktool/issues/1216#issuecomment-205898917","issue_url":"https://api.github.com/repos/iBotPeaches/Apktool/issues/1216","id":205898917,"user":{"login":"BurgerZ","id":1331650,"avatar_url":"https://avatars.githubusercontent.com/u/1331650?v=3","gravatar_id":"","url":"https://api.github.com/users/BurgerZ","html_url":"https://github.com/BurgerZ","followers_url":"https://api.github.com/users/BurgerZ/followers","following_url":"https://api.github.com/users/BurgerZ/following{/other_user}","gists_url":"https://api.github.com/users/BurgerZ/gists{/gist_id}","starred_url":"https://api.github.com/users/BurgerZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BurgerZ/subscriptions","organizations_url":"https://api.github.com/users/BurgerZ/orgs","repos_url":"https://api.github.com/users/BurgerZ/repos","events_url":"https://api.github.com/users/BurgerZ/events{/privacy}","received_events_url":"https://api.github.com/users/BurgerZ/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T17:06:43Z","updated_at":"2016-04-05T17:06:43Z","body":"@hxrofo Installing such packages like gcc-multilib is not good idea as it will also install a lot of useless dependencies, a lot."}}