aapt.exe....not in tools folder - Android Software/Hacking General [Developers Only]

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.

Related

How to sign a file? (Need Help)

I am looking for a run down on signing a file.
So far, I have taken other people files and just edited images from the apk moved them back and signed using Kitchen (Only way I know how)
So I am at a stand still here...
I want to add
app\Rosie.apk
and
system\com.htc.resources.apk
to a file so that I can change things a little more.
But have not had luck.
Can someone give the rest of us some steps?
Thanks.
are you on windows? if so, then use this batch script. unzip it and get to signing
how would you sign a zip on a mac?
mrchu001 said:
how would you sign a zip on a mac?
Click to expand...
Click to collapse
firstly, install java. then look inside the batch script and you'll see the basic layout for signing files from terminal.
EDIT: what it inside the script is this basic layout for signing, "java -jar signapk.jar testkey.x509.pem testkey.pk8 update.zip update_signed.zip"
replace "update.zip" with your zip file and update_signed.zip with your zip file with "signed" or something so you know it's signed appended before the .zip
darchstar said:
are you on windows? if so, then use this batch script. unzip it and get to signing
Click to expand...
Click to collapse
Yes, I am running windows. Thanks for the file! I will give it a try.
So I see the Sign.bat All I know so far, (Sorry, still new)
My folder will be laid out like this.
<update.zip>
<system>
<app>Rosie.apk</app>
<framework>com.htc.resources.apk</framework>
</system>
<update.zip>
But I dont know where to go from there?
I wonder if we counted, how many threads do you think were started here with this EXACT same question?
chaos67731 said:
Yes, I am running windows. Thanks for the file! I will give it a try.
So I see the Sign.bat All I know so far, (Sorry, still new)
My folder will be laid out like this.
<update.zip>
<system>
<app>Rosie.apk</app>
<framework>com.htc.resources.apk</framework>
</system>
<update.zip>
But I dont know where to go from there?
Click to expand...
Click to collapse
run the batch script from command prompt
darchstar said:
run the batch script from command prompt
Click to expand...
Click to collapse
I dont know how to do that or what it does.
I unziped the folder to my desktop but really dont know where to go from there.
I also dont know command prompt at all for the most part.
Only little things {cd} {*} things like that but even than its just at sight.
I looked http://forum.xda-developers.com/showthread.php?t=618874 and there does not seem to be a wiki or anything on this.
make a new folder where you'll want to zip all your files
copy the autosign.zip to this folder
unzip it.
zip up your files and update-script, name the zip update.zip and put them in this folder
run the batch script from command prompt
Code:
Sign.bat
you will now have a new zip called update_signed.zip, which is you signed update.zip
Does flipzmode's Kitchen do the same thing?
I know there is a sign part to it.
I have used it but not sure if it does the same thing.
When doing this is get an error.
It says it can not find the update script?
mrchu001 said:
how would you sign a zip on a mac?
Click to expand...
Click to collapse
Unzip this. Place the testsign.jar in the root directory of your Mac. Not the home (user) directory, but should be "Macintosh HD" or something of the sort. Then place the Android-Sign.app in /Applications. Even easier to make a shortcut to it in the dock. Whenever you want to sign a file, drag it to the Android-sign app, and it will sign it and put it in the same directory as the original, with "signed" at the end so you'll know which one is which.
For Mac there is an auto-sign program. Just put testsign.jar on the root of your computer hard drive (Macintosh HD) and it works. To sign a ROM, open the rom folder, select all the contents, right-click, and click Conpress. Rename archive.zip to whateveer you want. Drag it onto the Android Sign program and then wait for the program to close (when the dot goes away). There should be another file in the ROM folder called Archive-signed.zip. That is your signed zip.
...That's what I just posted.
ajones7279 said:
...That's what I just posted.
Click to expand...
Click to collapse
We posted it at like the same time I think he figured out how to do the actual signing, but he zipped the folder and not the contents. So... It was rom.zip>rom>contents of rom.
ajones7279 said:
Unzip this. Place the testsign.jar in the root directory of your Mac. Not the home (user) directory, but should be "Macintosh HD" or something of the sort. Then place the Android-Sign.app in /Applications. Even easier to make a shortcut to it in the dock. Whenever you want to sign a file, drag it to the Android-sign app, and it will sign it and put it in the same directory as the original, with "signed" at the end so you'll know which one is which.
Click to expand...
Click to collapse
this is great man!
many thanks!
No problem.
ok so im on windows. it says java not rec.. so im assuming i need to dl java. but would someone be able to leave a little more detailed how to on this. i figured most of it out. but idk if im spose to have the unziped auto-sign folder in my rom zip or outsided of my rom zip..
feefeeboomboom said:
ok so im on windows. it says java not rec.. so im assuming i need to dl java. but would someone be able to leave a little more detailed how to on this. i figured most of it out. but idk if im spose to have the unziped auto-sign folder in my rom zip or outsided of my rom zip..
Click to expand...
Click to collapse
You're using Stericson's autosign.bat correct?
I might be wrong but if you use Kitchen you can auto sign things and it works really good.

Dex2Jar tutorial/help?

I found dex2jar that is intended to convert .dex files to human readable .class files in java. The tutorial however is not very complete and even after putting both the .apk and the dex2jar unzipped file into a folder and running the code in command prompt, all I receive is the opening of dex2jar.sh. I do not find the .jar file that should be generated in the same folder. Anybody with experience with dex2jar want to post a tutorial or some help?
1. dex2jar.sh file.apk
2. profit
I feel like an idiot right now. The sh file is for Linux computers, I am on windows, so I should have ran the batch file.
im going to bump this thread...
i am having some problems with dex2jar right now. ive been able to properly run baksmali, but for some reason im not able to run dex2jar.
im on windows 7, and ive tried saving the .zip file to a folder then unzipping with command prompt, and etc. however, this process does not unzip for me. maybe, i need to look up the unzip command lines to make sure, if im even entering the informaiton correctly. though, i assume that i could just unzip the .zip program into a folder using winace, or something. And, the dex2jar program would work the same. i might be wrong, but i manually unzipped dex2jar to a folder.
then, since my phone is rooted. I easily have access to classes.dex files. So, I put the classes.dex files in the same folders as the dex2jar files and etc.
now, i run command prompt and try to pull up all the directories to the dex2jar.bat and classes.dex files. after i have the directories set up. I run the command line of dex2jar.bat classes.dex
and usually gives me an error of
'java' not recognized on internet or/and external etce etc etc..
ive had the same error with baksmali, but i was doing something wrong, as in the file system and using the wrong command line.
i've tried moving up a few directories too the lib files, and running the dex2jar-0.0.7.8-SNAPSHOT.jar file, (or whatever it is called) in the command line with classes.dex and it gives an error, but the last line says batch (or something) is operational.
SORRY, for the lOOOOOOOnnnng run down, but i really need help.
@badmonopoly
Initially, I struggled a bit, but here's what i did to make it work (on XP)
1. Extract all the files in the zip file to a folder. You can use any extracting tool in windows.
2. Copy you .dex file to this folder.
3. Run setclasspath.bat. This should be run because this data is used in the next step.
4. Go to Windows Command prompt, change the folder path to the folder where you extracted the zip file in step 1 and run the command as follows:
dex2jar.bat classes.dex
5. Tada!! Your jar file will be ready in the same folder.
Hope this helps..
P.S.: You need to have Java installed on your Windows machine for this to work.
this is what you're looking for:
http://forum.xda-developers.com/showthread.php?t=873466
I got it all working but i have one problem probably a noob question but how do i get it back to a dex?
ok well nevermind smali and baksmali is way easier to use
jar2dex
HI I have got a serious problem and i have edited one of this but now i need to convert jar file to dex how ???? this is really serious for me plz help!!!
msri3here said:
@badmonopoly
Initially, I struggled a bit, but here's what i did to make it work (on XP)
1. Extract all the files in the zip file to a folder. You can use any extracting tool in windows.
2. Copy you .dex file to this folder.
3. Run setclasspath.bat. This should be run because this data is used in the next step.
4. Go to Windows Command prompt, change the folder path to the folder where you extracted the zip file in step 1 and run the command as follows:
dex2jar.bat classes.dex
5. Tada!! Your jar file will be ready in the same folder.
Hope this helps..
P.S.: You need to have Java installed on your Windows machine for this to work.
Click to expand...
Click to collapse
Great...........Nice Work
msri3here said:
@badmonopoly
Initially, I struggled a bit, but here's what i did to make it work (on XP)
1. Extract all the files in the zip file to a folder. You can use any extracting tool in windows.
2. Copy you .dex file to this folder.
3. Run setclasspath.bat. This should be run because this data is used in the next step.
4. Go to Windows Command prompt, change the folder path to the folder where you extracted the zip file in step 1 and run the command as follows:
dex2jar.bat classes.dex
5. Tada!! Your jar file will be ready in the same folder.
Hope this helps..
P.S.: You need to have Java installed on your Windows machine for this to work.
Click to expand...
Click to collapse
cant open the file.
file is corrupted
why??

Need help with editing APKs using various tools URGENT!!!

So, I've got a lot to say and will try to be as thorough as possible. I will answer questions if needed to know certain issues of mine better. I'm sure I'll probably forget a couple things but will say what's going on to the best of my ability.
I'd like to say I am in a real bind and my folders are a complete mess with WAY too many tools and I don't think I need them all. But these are tools that were suggested to me or in a link containing several more tools. I am no longer going to edit APK files or do anything else till my issues are resolved and I've been given the best suggested tools that are CURRENT (please no outdated stuff). I can provide links to most of the tools or suggestions that were given to me if needed. I've bookmarked every link.
I don't know who is going to see and read this but really do hope someone can work with me on fixing up my issues I'm having with all this. Also, if this thread has responses from whomever, could you also tell me where each folders should go and what needs to have its' own folder?
Here is my current set-up:
2 folders on C:\ directory (contains: android-sdk-windows and Android folders and separate)
In android-sdk-windows\platform-tools folder it contains:
lib (folder)
llvm-rs-cc.exe
source.properties
aapt.eve
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
aidl.exe
dexdump.exe
dx.bat
NOTICE.txt
finishedpngs (folder)
framework (folder)
SystemAppsOriginal (folder containing my original /system/app APKs from Droid 2)
projects (folder containing nothing yet but placing specific APK(s) here)
eclipse (folder)
Eclipse Workspace (folder belonging to eclipse program)
SDK (folder containing another SDK just like android-sdk-windows, don't know why I have this now)
NotePad ++ (folder)
Update Modifier (folder)
PNG Gauntlet (folder)
XMLEditing (folder when I get to editing XMLs I'll place it here for work)
xUltimate Draw9Patch (folder)
xUltimate Theme Optimizer x64 (folder)
xUltimate (folder)
xUltimate Color Converter (folder)
APK Manager (folder)
These are all on my laptop on the c:\android-sdk-windows\platform-tools folder. The reason I put them all in there is because some of them are requiring adb.exe and those 2 DLL files to be able to function on but it's not working like that. So, what I did was copy adb.exe, AdbWinApi.dll, and AdbWinUsbApi.dll into the APK Manager and Update Modifier folders so the Script.bat would work. Now I don't know if that was a good idea or not. It worked on making them operate but I'm getting errors in the APK Manager when I need to compile stuff, or adb push back to phone. It's not working correctly.
In Android folder:
PSPad (folder containing the program to read and supposedly edit XMLs)
RSDLite (goes with SBF)
SBF (contains the zip to restore my Droid 2 back to stock)
The rest are misc. stuff that's just screenshots and stuff not associated with my issues
Only success I have been able to do was run Command Prompt and do adb pull and adb push which runs through the adb.exe in the android-sdk-windows\platform-tools folder.
I had to boot into recovery via Clockwork bootstrap, unmount system and then do the adb push on one of my APK when I was finished editing just PNG image files. No .9.png image files. I hear you need APK Manager to take care of issues with that due to boundaries and chunks being lost or messed up.
I have tried several different methods. Only success was finally doing adb pull and adb push through android-sdk-windows tool but that took me ALL weekend. I'm not talking 3 or 4 hours. I'm talking from 9am to noon, lunch break, then till 3am in the morning and then repeat on Sunday morning till 2am. I DO NOT want to go through that again yet I'm still trying to sort through all this mess and eliminate tools and such and get the right things and MAKE them work according to how they are suppose to function.
I don't know if all those extra tools are suppose to be in the platform-tools or not. I don't know what else to do here. Like I said, I went through several methods but most are applied to what the dev has like for G1's and other phones. My phone is the Motorola Droid 2 A955 build.
I was able to successfully push Music.apk back to the phone and see the changes I made. I was happy. All I did was just change the colors in the PNG image files. I really want to do more than this. Even to .9.png image files, XMLs, smali and baksmali and all that and eventually get onto creating my own theme.
Also, I do have the latest version of Java. I have entered my environment variables. Check here to see what I did:
Under System variables:
Variable Name: adb
Variable Value: c:\android-sdk-windows\platform-tools
Variable Name: Path
Variable Value: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\QuickTime\QTSystem\;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Java\jre6\bin;
My laptop build: Dell Inspiron 1525 with Windows Vista 32 bit x86
I have 3 threads at the DroidForums site but I had to edit this thread because I can't post outside links till I've posted more than 8 times. I've been a member here for a couple months, just haven't really posted much. I do more reading and researching here on the XDA forum rather than posting, which is what I've been doing for the last 3 days. If you need links to see my more thorough issues then I can provide links by PMing you with them.
Bottom line: All I'm asking is someone who knows my issues to work with me getting this mess sorted out and placing the folders in right places, getting adb to work with multiple scripts that rely on the adb.exe and those 2 dll's, and pointing me to the right direction so I can get out of the woods finally.
Sorry this is long but people understand more when things are laid out more thoroughly, which lacks in a lot of these threads explaining instructions and resolving issues.
Please close this thread. I will be working on my own since I have solved most of these issues on my own and there is no response to this thread in helping.

[Q] Rar on android.

Hi:
I've recently started to develop my own comic reader. The problem I've come up with is cbr files, which are esentially rar files. Now I know there are comic readers out there (all of them, I think) that support cbr files. So there is a way of doing this, I just can't find how.
In the rarlabs official page (search google rar addons and it's the first page) there are several options. I would like to know if I download the commandline arm unrar how I could install it on Android (I have a motorola Xoom, it would be for Honeycomb), assuming that is correct.
If this is not an option is there a command line unrar application that I could call from my own? and How would the code be (to call an external application, that is)?
If the above is not possible, what is the way to get to unrar something in android?
The only real option I've seen would be to use junrar (hosted on github)
But it seems complicated and I'm not sure it works very well as I've seen a lot of conflicting reports.
Thanks for any help!
Try http://www.all-freeware.com/results/rar/for/android to unpack rar on Android.
Success,
Senax
Hi:
I'm not exactly sure what you wanted me to try. There is nothing in that page that would allow me to uncompress a rar file on android. Only a bunch of unrar utitilities and some android things but they are not related, that is, there is nothing that says unrar that also works on android.
thanks anyway.
Unrar
great app available here: androidzoom (dot) com/android_applications/tools/unrar_dhpu.html
Cheers,
Romuloxiii
Hi:
It's seems that I didn't make myself clear.
I want to develop an android application that needs to unrar files. Is there a way to call the unrar application from my own code?
If so, can you tell me how?
Otherwise, I appreciate the effort, but I can't use that.
Thank you very much!
You can bring the unrar binary along in the /asset of your app,
on first launch copy it to your apps /file directory, chmod +x it, and use exec("sh") to unrar the files from shell.
oh, I see. I think I get the the idea but I don't understand all the instructions.
What did you mean by importing thebinary on my asset?
If I do the step above why do I need to copy the binary on first launch?
Don't I need root privileges too chmod it? And how do I do it from my source code?
And finally where can I find the command line use of the application? Or is it the same as the Linux version?
I know there are a lot of questions, but please keep in mind that I'm very new at doing this.
Thanks for all the help!
You need to put it as asset to bring it along.
You need to copy it because asset files are not directly accessable.
You don't need root to chmod the file in your own directory.
You do it by using a shell from your code i.e. Process.exec("sh")
And finally you want to program the app not me,
so don't be lazy and invest some time.
Google google google google...
If there are still questions left after that, you may ask again .
Ok, I'll try it and get back to you!
Thanks!
Sorry for my lazyness, but I've been Googling for a good half hour without finding a simple 'unrar' binary executable compiled to run from terminal on rooted ARMx32 device. I don't want bloated GUI APK's or libraries for development implementation, but just the plain command line interface executable. Anyone, please? It's a pity they haven't baked it into Busybox as an applet, IMO.

[Q] app decompiling/compiling tool for Windows

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).

Categories

Resources