Gameye98/DTL-X

aapt/2 self compile.

Closed this issue · 1 comments

Hi,

I wanted to use your tool to reverse engineer ads out of our sons games on his tablet (they are FULL of crappy ads!) but it seems whatever version of linux you compiled your aapt on isn't working with mine. Just running your version of aapt produces:
./assets/aapt
bash: ./assets/aapt: cannot execute binary file: Exec format error

Do you have a guide to compile and patch it? I tried running it without using your version and had problems (I think due to the version):

W: aapt: brut.common.BrutException: brut.common.BrutException: Could not extract resource: /prebuilt/linux/aapt_64 (defaulting to $PATH binary)
W: Failed to generate resource table for split ''
W: /home/user/DTL-X/base/res/values/drawables.xml:5: error: Error: String types not allowed (at 'APKTOOL_DUMMY_2' with value '').

I think these would be solved with the patched version, but including any way for sanity:
Exception in thread "main" java.io.FileNotFoundException: base/dist/base.apk (No such file or directory)
at java.base/java.io.RandomAccessFile.open0(Native Method)
at java.base/java.io.RandomAccessFile.open(RandomAccessFile.java:356)
at java.base/java.io.RandomAccessFile.(RandomAccessFile.java:273)
at java.base/java.io.RandomAccessFile.(RandomAccessFile.java:223)
at com.android.apksig.ApkSigner.sign(ApkSigner.java:190)
at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:356)
at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:85)
[+] Signing APK file... OK
Exception in thread "main" java.io.FileNotFoundException: base/dist/base.apk (No such file or directory)
at java.base/java.io.RandomAccessFile.open0(Native Method)
at java.base/java.io.RandomAccessFile.open(RandomAccessFile.java:356)
at java.base/java.io.RandomAccessFile.(RandomAccessFile.java:273)
at java.base/java.io.RandomAccessFile.(RandomAccessFile.java:223)
at com.android.apksig.ApkVerifier.verify(ApkVerifier.java:143)
at com.android.apksigner.ApkSignerTool.verify(ApkSignerTool.java:516)
at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:88)
[+] Verifying APK file... OK
Traceback (most recent call last):
File "/home/user/DTL-X/./dtlx.py", line 568, in
main()
File "/home/user/DTL-X/./dtlx.py", line 564, in main
patcher(ftarget,funcls)
File "/home/user/DTL-X/./dtlx.py", line 66, in init
os.rename(self.fout+"/dist/"+self.fnm, self.signed)
FileNotFoundError: [Errno 2] No such file or directory: 'base/dist/base.apk' -> 'base_sign.apk'

if u can use the aapt/aapt2 from your current repos on the linux and its working fine then u dont need to use the aapt & aapt2 from the assets
the assets/aapt and assets/aapt2 mean to be for android