[Q] how to get apktool working on android ? - General Questions and Answers

How do I get apktool working on android ? Where do I download latest working version ? I had apktool working but now I flashed custom rom and I installed it again and it won't work. It won't install framework and doesn't decompile the whole app

code.google.com/p/android-apktool/
Yes, it wont decompile whole app successfully sometimes, so it's better to edit the smali code which can be wholly decompiled successfully.
Hope this can help you

henry0504 said:
code.google.com/p/android-apktool/
Yes, it wont decompile whole app successfully sometimes, so it's better to edit the smali code which can be wholly decompiled successfully.
Hope this can help you
Click to expand...
Click to collapse
it's not decompiling any apps all the way.
I don't know what to download from there.
I tried both from here.
http://pan.baidu.com/s/1qWyPYVE
When I try recomepile it won't do it

I think the files in your link is not apktool...
Apktool is a jar file for decompiling and recompiling apks.
Use with cmd, example:
apktool.jar d filetobedecompile.apk
apktool.jar if frameworktobeinstall.apk
apktool.jar b filetoberecompile
It's definitely not an apk so far, so you should go to the official page on google code and download the official jar file.
Hope this can help you. Hit thanks!

henry0504 said:
I think the files in your link is not apktool...
Apktool is a jar file for decompiling and recompiling apks.
Use with cmd, example:
apktool.jar d filetobedecompile.apk
apktool.jar if frameworktobeinstall.apk
apktool.jar b filetoberecompile
It's definitely not an apk so far, so you should go to the official page on google code and download the official jar file.
Hope this can help you. Hit thanks!
Click to expand...
Click to collapse
Are those commands I can use in terminal emulator ? Does it change a jar file to apk or let me run jar files ? I don't know how to get terminal emulator working. I tried a java app that says it can run java files but the app wouldn't run. @henry0504

forum.xda-developers.com/showthread.php?t=1989533

I don't have a computer @henry0504

That's the first time I heard somebody didn't own a computer....
I am shocked that I heard it in xda…
You should own one bro

henry0504 said:
That's the first time I heard somebody didn't own a computer....
I am shocked that I heard it in xda…
You should own one bro
Click to expand...
Click to collapse
Do you know any other way ? I tried different apps that are suppose to run Java apps and they close when I try running the app or I couldn't get it to run the java app.

ryan012 said:
Do you know any other way ? I tried different apps that are suppose to run Java apps and they close when I try running the app or I couldn't get it to run the java app.
Click to expand...
Click to collapse
I don't get what you really mean, but you can try JBED for running java file on Android.
But I strongly recommend you to use computer to decompile apks. If you don't have one, you can't decompile apks and use apktool.

henry0504 said:
I don't get what you really mean, but you can try JBED for running java file on Android.
But I strongly recommend you to use computer to decompile apks. If you don't have one, you can't decompile apks and use apktool.
Click to expand...
Click to collapse
any way to run the java app. I tried that app, it won't run.

To decompile app on android you can try ninja morph
Sent from my Xperia Live with Walkman using XDA Premium 4 mobile app

android yoyash said:
To decompile app on android you can try ninja morph
Sent from my Xperia Live with Walkman using XDA Premium 4 mobile app
Click to expand...
Click to collapse
That app isn't bad. I like zarchiver, app better

Related

[Q] how to install java files on android? .jar to .apk converter?

hi...
i used to use some java softwares on my last cell.. and i want them on my new android phone.. i searched in market bt cudn't get those... so is der anyway i can install .jar files? or any software that converts .jar files in .apk file??
Try this
http://www.netmite.com/android/srv/1.6/getapk.php
you can convert JAR to APK
Our spicas comes with a built in apk, it is a Java VM, and it let you load java from the SD card I think. You should get that apk.
Zoldborso said:
Our spicas comes with a built in apk, it is a Java VM, and it let you load java from the SD card I think. You should get that apk.
Click to expand...
Click to collapse
i didnt get wht u talking abt...
i am using samsung galaxy 3.. i5801..
android 2.1
Netmite works. I used snaptu on my milestone thanks to netmite...
Sent from my Milestone using XDA App

[DEV] apkTools - Optimize/Edit/Pack/Sign

A simple toolkit inspired by some others, primary goal is to provide a seamless solution for reliable apk editing/optimizing.
This tool uses aapt rather than 7zip for packing. That provides much better reliability and assurance of conformance to Android file standards, as the cost of slightly larger files.
Contains:
- 7zip
- roptipng
- aapt
- apktool
- zipalign
- signapk
I've also made sure all the libraries/binaries are up to date.
Reserved Post?
Does this work on a mac? Not at home to download it.
Sent from my PC36100 using XDA App
david279 said:
Does this work on a mac? Not at home to download it.
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
Windows only, sorry.
I can look and see about porting to Mac/Linux though, to my knowledge I should be able to get binaries/source for each exe used.
Cool thanks....
Sent from my PC36100 using XDA App
Appreciate the kit will thank you when I get near my laptop.
Swyped From Eva Running Myn's RLS4!
40 downloads and no feedback?
Anyways, I'd like to encourage everyone to use ddms from the android sdk to check your boot errors when optimizing.
It helps alot, any apk related errors should always be addressed even if they seemingly work flawless.
I like that you have compiled all these things together. Shouldn't there also be a draw9patch.bat also for those who have to fix the things that noobs did? It is getting better these days but there are still those out there trying to take the easy way out.
I'm also on a mac. I'll probably run it within VirtualBox
good stuff... im happy someone put together a package for everyone.
btw... which versions u using here?
i can check... but i think more people would like to know.
aamikam said:
btw... which versions u using here?
i can check... but i think more people would like to know.
Click to expand...
Click to collapse
7za - 9.20
roptipng - 0.6.3
aapt & zipalign - SDK v8
apktool - 1.3.2
signapk - NA
thanks! i'll be putting this through its paces sometime after weekend
i'll report back with any issues.
Can AndroidManifest.xml be edited with this?
epakrat75 said:
Can AndroidManifest.xml be edited with this?
Click to expand...
Click to collapse
I think so, but I'm not sure.
Optimize/Edit/Pack/Sign
Click to expand...
Click to collapse
I think Apps have to be signed in the AndroidManifest.xml...
Sent from my HTC Desire using XDA App
I like your concept. Good work. I'm only experiencing 1 issue though...
When unpacking Motonav.apk, everything seems to be unpacked, but when looking at the files, they're wrongfully created.
Instead of creating the file data.gro for instance, it creates a folder data_gro. Which therefore can't be recognized by GROConverter.
Am I doing something wrong?
epakrat75 said:
Can AndroidManifest.xml be edited with this?
Click to expand...
Click to collapse
its using apktool so if its set to decompile then you would edit the decompiled manifest with something like notebook ++
this would be greeeeaaaat for a mac.
Awesome tool... Would love for this to be able to handle draw9patch! Might there be an update to include that?
For some weird reason im getting errors. saying java isnt a command
This is great, thanks....

[Q][ICS][V28]SystemUI.apk decompile

Hi.
I have tried many times decompile this apk with many versions of apktools but without success. Every tool "speak" something about wrong framework version. How can i decompile this apk without errors?
Sent from my LG-P920 using xda premium
krija said:
Hi.
I have tried many times decompile this apk with many versions of apktools but without success. Every tool "speak" something about wrong framework version. How can i decompile this apk without errors?
Sent from my LG-P920 using xda premium
Click to expand...
Click to collapse
Windows : C:\Users\Your-User-Name\apktool\framework
Linux: Extract to /home/apktool/framework
Also if you use framework-res / lge-res from the rom with the SystemUI.apk you want to edit you can use
Code:
apktool if framework-res.apk
to generate frameworks. Do not forget to Copy META-INF + AndroidManifest.xml from Original apk to the edited one without them PackageManagerService will Reject the apk:good:
Thanks defcomg
edit
properly decompiled with your framework files, thanks again.
Sent from my LG-P920 using xda premium

Apk Tool App for Android

I was recently looking for system ui smali mods and I came across this apk tool app and I thought I would share it, I think it works good so far but your working with a smaller screen other wise its really nice
Download: ApkTool v4.7.apk
Update fix for Lollipop Roms :ApkToolUpdate.zip
Instructions :
After you install the apk be sure to go to your Framework apks and hit import framework before you do anything
Also Copy system apks to SD card or you with get decompile errors
If you have problems with decompiling system apps on Lollipop flash update zip that has updated jars
You shouldn't have any problems with kit kat though I believe so no need to flash update.zip
Flash via FlashFire
And Finally Enjoy
davidhacks said:
I was recently looking for system ui smali mods and I came across this apk tool app and I thought I would share it, I think it works good so far but your working with a smaller screen other wise its really nice
Download: ApkTool v4.7.apk
Click to expand...
Click to collapse
I'm not familiar with decompiling apks but for the xml files wich program do you use?
Sent from my SM-G900V using XDA Free mobile app
killa408shark said:
I'm not familiar with decompiling apks but for the xml files wich program do you use?
Sent from my SM-G900V using XDA Free mobile app
Click to expand...
Click to collapse
I would normally use the computer Verison of apk tool and then use note pad ++ for looking at the xml files
killa408shark said:
I'm not familiar with decompiling apks but for the xml files wich program do you use?
Sent from my SM-G900V using XDA Free mobile app
Click to expand...
Click to collapse
At some point I will decompile the app and update the baksmali and so on to the lollipop Verison
PHP:
killa408shark said:
I'm not familiar with decompiling apks but for the xml files wich program do you use?
Sent from my SM-G900V using XDA Free mobile app
Click to expand...
Click to collapse
Try Axel on the playstore. You can view and edit.
Documentation on this app is hard to find
Documentation on this app is hard to find, did you write this? From what I can gather it turns your active rom into a rom package for redistribution? I'm assuming that's what they mean by create rom? Who wrote this gem? Amazing app

Need help decompile APK file for reverse engineering

Hello everyone,
I want to decompile this file for reverse engineering. I tried using apktool. However, it was impossible. If I try to decompile it... following error occurs. It is used for the Android Head Unit. Is there anything I am missing?
FILE : Launcher.apk
I: Using Apktool 2.4.1 on Launcher.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: java.util.zip.ZipException: invalid CEN header (encrypted entry)
at brut.androlib.ApkDecoder.hasResources(ApkDecoder.java:315)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:103)
at brut.apktool.Main.cmdDecode(Main.java:170)
at brut.apktool.Main.main(Main.java:76)
Caused by: brut.directory.DirectoryException: java.util.zip.ZipException: invalid CEN header (encrypted entry)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:55)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:38)
at brut.directory.ExtFile.getDirectory(ExtFile.java:52)
at brut.androlib.ApkDecoder.hasResources(ApkDecoder.java:313)
... 3 more
Caused by: java.util.zip.ZipException: invalid CEN header (encrypted entry)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:53)
... 6 more
Click to expand...
Click to collapse
Best regards,
KIM
gloriashield said:
Hello everyone,
I want to decompile this file for reverse engineering. I tried using apktool. However, it was impossible. If I try to decompile it... following error occurs. It is used for the Android Head Unit. Is there anything I am missing?
FILE : Launcher.apk
Best regards,
KIM
Click to expand...
Click to collapse
Hi,
I'll try to decompile it on my side, did you find any framework-res.apk apk or an equivalent you can install on apktool ? (That's my first time with android auto so idk how the system works)
gloriashield said:
Hello everyone,
I want to decompile this file for reverse engineering. I tried using apktool. However, it was impossible. If I try to decompile it... following error occurs. It is used for the Android Head Unit. Is there anything I am missing?
FILE : Launcher.apk
Best regards,
KIM
Click to expand...
Click to collapse
As far as I know, Apktool hasn't been updated in a while. You might need to find a different tool or method.
Sent from my SM-S767VL using Tapatalk
gloriashield said:
Hello everyone,
I want to decompile this file for reverse engineering. I tried using apktool. However, it was impossible. If I try to decompile it... following error occurs. It is used for the Android Head Unit. Is there anything I am missing?
...
KIM
Click to expand...
Click to collapse
Droidriven said:
As far as I know, Apktool hasn't been updated in s while. You might need to find a different tool or model.
Click to expand...
Click to collapse
Yup, I can confirm. I tried to decompile it with apktool, but same errors.
If you really need to decompile it, you can use JEB Decompiler. I've used it when apktool failed and it was successful. I used it only for the trial time, but you can install it and use your free trial to decompile this apk.
https://www.pnfsoftware.com/
Hi friends,
@Raiz, @Droidriven
My reply is late. I'm very very very sorry. COVID-19's got me out of my mind. There was a confirmed case in my company. Everything's all right now.
Hi,
I'll try to decompile it on my side, did you find any framework-res.apk apk or an equivalent you can install on apktool ? (That's my first time with android auto so idk how the system works)
Click to expand...
Click to collapse
Thank you for your interest. There's no framework-res.apk. I tried decompile in the usual way. I'm guessing this APK file needs a password for decompile. However, using the password-finding program did not produce any results.
As far as I know, Apktool hasn't been updated in a while. You might need to find a different tool or method.
Click to expand...
Click to collapse
Thank you for your good idea. Aren't most of them apktool-based programs? Do you know any programs? Please recommend something.
Yup, I can confirm. I tried to decompile it with apktool, but same errors.
If you really need to decompile it, you can use JEB Decompiler. I've used it when apktool failed and it was successful. I used it only for the trial time, but you can install it and use your free trial to decompile this apk.
Click to expand...
Click to collapse
Thank you! You're my hero. I'll go back home and test it out! I didn't know there was an alternative like this.
Thank you everyone! Have a nice day!
KIM
gloriashield said:
Hi friends,
...
Thank you! You're my hero. I'll go back home and test it out! I didn't know there was an alternative like this.
Thank you everyone! Have a nice day!
KIM
Click to expand...
Click to collapse
You're welcome, and an apk doesn't need a password to be decrypted, it need to be decompiled only. Buy if the tools aren't up to date with the lastest compiling and decompiling methods, you'll get errors like this one.
Enjoy your APK
Raiz said:
You're welcome, and an apk doesn't need a password to be decrypted, it need to be decompiled only. Buy if the tools aren't up to date with the lastest compiling and decompiling methods, you'll get errors like this one.
Enjoy your APK
Click to expand...
Click to collapse
Thank you for your advice! :good:
I tried to decompile it using the JEB decompiler. I was able to see the source code successfully and found the code I wanted to find. But I don't know how to re-compile with APK. Do you know the JEB decompiler manual? I couldn't find it. Please help me.
Best regards,
KIM
gloriashield said:
Thank you for your advice! :good:
I tried to decompile it using the JEB decompiler. I was able to see the source code successfully and found the code I wanted to find. But I don't know how to re-compile with APK. Do you know the JEB decompiler manual? I couldn't find it. Please help me.
Best regards,
KIM
Click to expand...
Click to collapse
Here you can find more info : https://www.pnfsoftware.com/jeb/manual/
(Check the hamburger menu on your left, there are multiple categories)
What I do it decompile with JEB and Recompile with apktool, but maybe they added the recompile feature. If you don't find a solution, use apktool and hopefully it'll work just fine.
Raiz said:
Here you can find more info : https://www.pnfsoftware.com/jeb/manual/
(Check the hamburger menu on your left, there are multiple categories)
What I do it decompile with JEB and Recompile with apktool, but maybe they added the recompile feature. If you don't find a solution, use apktool and hopefully it'll work just fine.
Click to expand...
Click to collapse
gloriashield said:
Thank you for your advice! :good:
I tried to decompile it using the JEB decompiler. I was able to see the source code successfully and found the code I wanted to find. But I don't know how to re-compile with APK. Do you know the JEB decompiler manual? I couldn't find it. Please help me.
Best regards,
KIM
Click to expand...
Click to collapse
You could also probably use Linux with some terminal commands to recompile the apk.
Sent from my SM-S767VL using Tapatalk
Droidriven said:
You could also probably use Linux with some terminal commands to recompile the apk.
Click to expand...
Click to collapse
Hi,
Thx for sharing that, I didn't about it and I think it will come handy sometimes for me. Do you have any links, commands,... ?
Raiz said:
Hi,
Thx for sharing that, I didn't about it and I think it will come handy sometimes for me. Do you have any links, commands,... ?
Click to expand...
Click to collapse
No, I don't know them specifically, but I'm pretty sure I've seen it discussed before. Just do a search for:
"How to decompile/recompile apk files using Linux"
I'm sure it will find something, if I'm correct.
Sent from my SM-S767VL using Tapatalk
Droidriven said:
No, I don't know them specifically, but I'm pretty sure I've seen it discussed before. Just do a search for:
"How to decompile/recompile apk files using Linux"
I'm sure it will find something, if I'm correct.
Sent from my SM-S767VL using Tapatalk
Click to expand...
Click to collapse
Thanks to friends,
I was able to see the source code when I used JEB. The problem is.. it couldn't extract all of the resources(maybe). Looks like structure is different, it is questionable whether the APK file can be recreated. (And, I was able to see the code even using classyshark. But, it is not decompiler.)
I used about 20 programs, but most of them failed.

Categories

Resources