[Q] app decompiling/compiling tool for Windows - HTC Pico (Explorer)

Like the title says i need a decompiling/compiling ..apktool is just not working for me!

All the other tools I know of are just wrappers around apktool, if it doesn't work nothing will. Instead of trying to find something else, troubleshoot what isn't working about apktool. Does it give some error? At what point in the process? Give as much detail as you can.

SifJar said:
All the other tools I know of are just wrappers around apktool, if it doesn't work nothing will. Instead of trying to find something else, troubleshoot what isn't working about apktool. Does it give some error? At what point in the process? Give as much detail as you can.
Click to expand...
Click to collapse
I placed two apktool files in windows folder.. Installed jre... I navigate to c/windows in cmd.. And I give command apktool if you (file direcory) without quotes...
And it just says that apktool command was not recognised..! These instructions I saw in a tutorial in xda only.. Don't remember where!!

"two apktool files" - did you download these two packages: http://android-apktool.googlecode.com/files/apktool-install-windows-r04-brut1.tar.bz2 and http://android-apktool.googlecode.com/files/apktool1.5.0.tar.bz2 and then unpack both and copy all the contents of both into C:\windows? If so, the "apktool" command WILL be recognised in the command line (from anywhere, not just in C:\Windows).

Related

Help Resigning APK's and ZIP's

I've been looking for information on how to resign apks and update.zip files.
So far i've found a lot of tools for windows, the problem is that i use linux ubuntu.
I went ahead and tried JF's jar but i get this error
"Failed to load Main-Class manifest attribute from
testsign.jar"
Would like to know if anyone out there could guide me through the process or point me in the right direction as i've only found information regarding resigning under windows.
Thanks in advance,
Check whether you are running the correct version of Java.
What is the whole output of the Java back trace?
Cheesebaron said:
Check whether you are running the correct version of Java.
What is the whole output of the Java back trace?
Click to expand...
Click to collapse
I have Sun-JDK 6, openJDK and other java stuff installed... don't know if i need to remove or add anything...
This is what i've tried so far:
xxx:$ java testsign.jar Launcherr
Exception in thread "main" java.lang.NoClassDefFoundError: testsign/jar
Caused by: java.lang.ClassNotFoundException: testsign.jar
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
Could not find the main class: testsign.jar. Program will exit.
xxx:~/Desktop/testsign(2)(2)$
============================================================
xxx:~/Desktop/testsign(2)(2)$ sudo java -jar testsign.jar Launcherr
Failed to load Main-Class manifest attribute from
testsign.jar
xxx:~/Desktop/testsign(2)(2)$
try this:
java -classpath testsign.jar testsign input.zip output.zip
Deicist said:
try this:
java -classpath testsign.jar testsign input.zip output.zip
Click to expand...
Click to collapse
Worked perfectly with a zip file... heres the output =)
xxx:~/Desktop/testsign(2)(2)$ java -classpath testsign.jar testsign hero.zip
xxx:~/Desktop/testsign(2)(2)$
Now... when i have the apk extracted in a folder and modify it I assume i have to make the folder an APK file again and then try java -classpath testsign.jar testsign bla.apk... i think it might work, what i need to know is how do i make the folder an apk file... is it possible to make it a .zip file and then change the extension to .apk? will that work or I need a tool to make the apk?
EDIT1: Ok... i made a zip file from the folder, changed the extension to APK and resign... i will try to unpack an aplication and install it via ASTRO... let's see how that goes...
EDIT2: ok... edit1 method didn't work... tried installing with ASTRO didnt work, tried pushing it to the phone via adb... didn't work either... HEEEEEELP! hehe..
FIGURED IT OUT: ok... i figured it out... =) making a zip file and renaming the extension to apk and signing DOES work... i was making a mistake, while packing the zip file using archiver and the folder structure was changed... i did it manually and worked perfectly... now i know how to make apks and resign them... thanks to everybody who cooperated for the patience and support... =)
pep1t0 said:
I've been looking for information on how to resign apks and update.zip files.
So far i've found a lot of tools for windows, the problem is that i use linux ubuntu.
I went ahead and tried JF's jar but i get this error
"Failed to load Main-Class manifest attribute from
testsign.jar"
Would like to know if anyone out there could guide me through the process or point me in the right direction as i've only found information regarding resigning under windows.
Thanks in advance,
Click to expand...
Click to collapse
Hey any chance you could point me to the windows programs used to resign apk files, and do you know of any good walk throughs for resigning.
Thanks
pep1t0 said:
Worked perfectly with a zip file... heres the output =)
Click to expand...
Click to collapse
Now when you've learned how, could you make a "How to" for others?
the java testsign tool should work with windows, i think all you have to do is install the java sdk... the text line should be the same java -classpath testsign.jar testsign nameofthefile.apk/nameofthefile.zip
The zip files are... just zip files, can be made with 7zip (in windows) after you make the .zip if you want to make it an apk all you have to do is change the extension... maybe this works in cmd "copy zipedfile.zip newapkfile.apk"... if not... put it in the sdcard and do it via adb shell...
"adb shell /sdcard/nameofthezipfile.zip /sdcard/nameofthenewapk.apk"
I don't really have much time to make a tutorial and try things right now... i will try next week, in the meantime try these things... good luck...

Xml read error

Well, not Sure if the past should be here, I think so.
*I was tinkering with a rom (Ledro id for desire), and wanted to take a look at the xml, in such framework-res.apk, but that open from the pc, I get: hexadecimal value 0x03 is an invalid character (with xml notepad). I still open it but it is unintelligible.
What are apk's trying to open with java (do not know if I have what it takes to open them) and that makes me: failed to load main-class manifest attribute ....
I just want to tweak a little, have if I learn slowly.
Sorry for my english I am from spain
Sent from my HTC Desire using XDA App
XML files in apks are compiled to binary form, so you can't open them directly. You have to use some decoding tool: apktool (in my signature), Apk Manager (a wrapper around apktool) or AXMLPrinter2 (older and less powerful tool: can't rebuild XML and only partial info is decoded).
And no, you can't run apk files using Java on your PC.
Brut.all said:
XML files in apks are compiled to binary form, so you can't open them directly. You have to use some decoding tool: apktool (in my signature), Apk Manager (a wrapper around apktool) or AXMLPrinter2 (older and less powerful tool: can't rebuild XML and only partial info is decoded).
And no, you can't run apk files using Java on your PC.
Click to expand...
Click to collapse
Thanks, I will try
Edit: lol I dont know how I can install apktol in Windows...
I unpack the files into c:/ and now?
dany_danay said:
Thanks, I will try
Edit: lol I dont know how I can install apktol in Windows...
I unpack the files into c:/ and now?
Click to expand...
Click to collapse
So How can do this?
dany_danay said:
I unpack the files into c:/ and now?
Click to expand...
Click to collapse
You don't read carefully:
http://code.google.com/p/android-apktool/
Unpack both to your Windows directory
Click to expand...
Click to collapse

aapt.exe....not in tools folder

I am trying to get myself set up to dig more into stuff...and need to put the aapt into my command path. (I think I understand that...)
BUT...I have no aapt.exe in my tools folder.
...I have SDK and Eclipse. They work well enough to get me through tutorials.
Anyone run into this and did something get messed up? Reading googles site they talk like it should just be there. I have: abd.exe, adbwinapi.dll, etc...there is no file before that.
wrong tools folder i guess. i'll leave this here though. the aapt.exe is in the platform/android-#/tools folder (where # is the version you decide to choose..I used 8)
sigh.

Editing APK files

Hi i have read a few posts about editing apk files but most are only about editing the image files. i need to edit the classes.dex file inside the apk i have done this but when i try and install the apk it doesnt work is this possible to do? thanks
this is not to do anything illegal it is simply to make an android app i use equal to the iphone equivalent (there are less servers for the android app) so i basically want to change the url from the apk to the iphone url)
Cheers
morgs640 said:
Hi i have read a few posts about editing apk files but most are only about editing the image files. i need to edit the classes.dex file inside the apk i have done this but when i try and install the apk it doesnt work is this possible to do? thanks
this is not to do anything illegal it is simply to make an android app i use equal to the iphone equivalent (there are less servers for the android app) so i basically want to change the url from the apk to the iphone url)
Cheers
Click to expand...
Click to collapse
Tried signing the file after modding it?
Sent from my GT-S5360 using xda premium
Hi thanks for your reply, yes i have and it still doesnt work unfortunately
Use apktool to extract the APK, you'll get .smali files instead of classes.dex (this is the decompiled version). Edit these files appropriately, then repack the APK with apktool and sign it. Should work.
Does apktool require command line? if so it is too complicated for me
Yes, it does. If command line is too difficult, it's probably unlikely you'll be able to get this working I'm afraid. You could try this: http://forum.xda-developers.com/showthread.php?t=1619473
It's an IDE for editing APKs, might help. But honestly, the command line part is the easy bit
Just never had any luck with any command line stuff for android never works for me and i hate all the extra crap you have to install to use it. Thanks anyway ill see how i go.
morgs640 said:
Just never had any luck with any command line stuff for android never works for me and i hate all the extra crap you have to install to use it. Thanks anyway ill see how i go.
Click to expand...
Click to collapse
If you wanna do basic stuff wid apktool then its a reaaly easy tool.. The commands are really very small!
Apktool d xxxx.apk for decompile
Apktool b xxxx for compiling n ur done!
Even the complex ones arent difficult! Only the installing of apktool takes time and its the hardest thing in the whole procedure
Sent from my GT-S5360 using XDA
in theory apktool is faily simple. but if you compile for android 4.0 better prepare yourself for huge headaches and a couple of white hairs as this thing wont work. i know two solutions, one consists of a really stupid juggling with two versions, one old which you can barely find, and one new, decompile with the old one, compile with the new one. some guy made a mod though and it finally ends the trouble, but i haven't seen it officially pronounced, which made it so damn hard to find it, hidden in some internet forums. another problem was that aapt needs to be present in the same directory, error codes will just spew out a bunch of gibbersish and you will never know whats wrong so all thats left is trying. but once you got it working it is as easy as pie.
molesarecoming said:
some guy made a mod though and it finally ends the trouble, but i haven't seen it officially pronounced, which made it so damn hard to find it, hidden in some internet forums. but once you got it working it is as easy as pie.
Click to expand...
Click to collapse
You mean this: http://forum.xda-developers.com/showthread.php?t=1551236 ? (It was about two threads below this one at the time I posted this )
nice! i made myself little batch files for this. i just go "apkd skype" to decompile skype.apk and apkb skype for building it, zipping it, signing it. didnt even know theres a guy out there now.
SifJar said:
Yes, it does. If command line is too difficult, it's probably unlikely you'll be able to get this working I'm afraid. You could try this: http://forum.xda-developers.com/showthread.php?t=1619473
It's an IDE for editing APKs, might help. But honestly, the command line part is the easy bit
Click to expand...
Click to collapse
This program worked perfectly thank you so much

Need help modifying an APK

Hello! Sorry if this is the wrong place to post this I just registered to the forum!
To keep it short I am a frequent player of the game 'Idle Heroes' and I got the idea to take the APK, modify it (for private use of course) and give me resources in the game so I can try out different heroes etc etc.
So I read up on the APKtool and all that but I am having some trouble, I can't find the framework I need.. I am just getting errors when trying to decompile and I can't find any framwork in my phone or online to download..
Any help is appreciated! Thanks!
If it's any help I have a Galaxy S9 (not rooted)
For apk tool you need to write it in the following format in command prompt... (assuming you are using apk tool 2.2.4)
Java –jar apktool_2.2.4.jar d C:\<path to apk file>
But this would give you stuff like the android manifest. If you want the raw source code itself, you would need to use something such as dex2jar. Format is below.
d2j-dex2jar.bat C:\<path to apk file>
mohhaxs said:
For apk tool you need to write it in the following format in command prompt... (assuming you are using apk tool 2.2.4)
Java –jar apktool_2.2.4.jar d C:\<path to apk file>
But this would give you stuff like the android manifest. If you want the raw source code itself, you would need to use something such as dex2jar. Format is below.
d2j-dex2jar.bat C:\<path to apk file>
Click to expand...
Click to collapse
Thanks for your reply! Unfortunately I'm still struggling.. As you said it's the source code I am after. If you haven't played the game I'll try to explain what I am after.
Every day you get daily missions you can do, I'd like to simply change the rewards from let's say 1 summoning scroll to 1000 so that each day I can get 1000 scrolls, and I also want to change the other rewards to give me a couple of thousand gems instead of the 20 I get each day, that will give me enough to get the heroes I am after!
Would you care to help me a little more specifically on how to achieve this? Right now I have put the .apk in "C:\android\apktool" along with the apktool itself (apktool.jar).
But I don't have a .bat file, what kind of .bat file do I want to create? Also I don't have any other folders or such. And yes I have the newest version of Apktool!
No matter what I write in CMD it gives me an error, I don't have any framework files etc and I don't know where to get them.. I did also use the code you gave me (java -jar etc etc) but it also gave me errors .. If you'd like me to try something else and/or post the errors here I'd gladly do so!
Sorry for being such a noob but I have never done anything like this before, I recently started learning C++ but it's mainly simple games (for PC) in UE4 and stuff like that, but nothing for mobile.
Thanks a lot for your time!

Categories

Resources