So, I've been doing some stuff with batch that involves running decompilers, and I've come up with a small batch file called decompiler.bat that doesn't really work. I just learned batch today, and so far it seems incredibly easy, but there must be errors, because it just won't do what it's supposed to. There's one thing you should know: There are admin limitations that won't allow me to mess with files that aren't in my account directory.
Decompiling...
...classes.dex
Unable to access jarfile baksmali-1.3.2.jar
...AndroidManifest.xml
java.io.FileNotFoundException: -o (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at test.AXMLPrinter.main(AXMLPrinter.java:39)
...preferences.xml
java.io.FileNotFoundException: -o (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at test.AXMLPrinter.main(AXMLPrinter.java:39)
...create_new_world.xml
java.io.FileNotFoundException: -o (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at test.AXMLPrinter.main(AXMLPrinter.java:39)
...create_world_screen.xml
java.io.FileNotFoundException: -o (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at test.AXMLPrinter.main(AXMLPrinter.java:39)
...main.xml
java.io.FileNotFoundException: -o (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at test.AXMLPrinter.main(AXMLPrinter.java:39)
...mainmenu_options.xml
java.io.FileNotFoundException: -o (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at test.AXMLPrinter.main(AXMLPrinter.java:39)
...rename_mp_world.xml
java.io.FileNotFoundException: -o (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at test.AXMLPrinter.main(AXMLPrinter.java:39)
...bgtiled.xml
java.io.FileNotFoundException: -o (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at test.AXMLPrinter.main(AXMLPrinter.java:39)
...bnt_nw_cancel.xml
java.io.FileNotFoundException: -o (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at test.AXMLPrinter.main(AXMLPrinter.java:39)
...bnt_nw_create.xml
java.io.FileNotFoundException: -o (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at test.AXMLPrinter.main(AXMLPrinter.java:39)
...btngamemode.xml
java.io.FileNotFoundException: -o (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at test.AXMLPrinter.main(AXMLPrinter.java:39)
Completed!
Press any key to continue...
The "Decomp" folder has all the files it needs to work, and the "OutSource" remains empty. I am using Smali assembler/disassembler for the .dex file, and the AXMLPrinter2 to decompile the android xml files. I run windows XP still Any suggestions?
You can't "Learn a language in one day" and not to expect errors.
Register for CodingForums. They are awesome.
I already did a lot with the DOS CMD screen, and this is barely a language. The two are practically the same. Also, I was asking for help, not advice. I don't want to have to register to a new forum to fix one problem. Actually, that'd be more worth it than asking on the damn mc forum at this rate. This is the most the forums have rage ever. I hate it when you need help, and you get no helpful replies. I don't mean to break anyone's back by asking for some help, I mean, it's completely stupid to expect that anybody could offer the least of help with a few DOS commands. I hope I didn't offend you, but you're the first one to reply, and this has happened to me so much lately.
@echo off
path C:\Documents and Settings\kids\Desktop\PECP_alpha_v1.0.0_Android\;C:\program files\java\jre6\bin\
echo Decompiling...
echo ...classes.dex
java -jar baksmali-1.3.2.jar -o "C:\Documents and Settings\kids\Desktop\PECP_alpha_v1.0.0_Android\Output Source\ classes.dex"
It cannot find the files because you didn't enclose the space-containing file path with double quotes.
PS, save some typing and make it more readable:
@echo off
path C:\Documents and Settings\kids\Desktop\PECP_alpha_v1.0.0_Android\;C:\program files\java\jre6\bin\
c:
cd "\Documents and Settings\kids\Desktop\PECP_alpha_v1.0.0_Android\Output Source\"
echo Decompiling...
echo ...classes.dex
java -jar baksmali-1.3.2.jar -o " classes.dex"
I dunno if that space between the last \ and the classes.dex is actually in the filename or a quirk in the forum.. if the file is <space>classes then enclose in quotes, otherwise not necessary.
I hate it when you need help, and you get no helpful replies.
And I hate it when somebody posts a topic for help, can't be assed to wait more than a few hours, and then starts essentially yelling at everybody because they didn't get help.
I see it all the time, and you know what happens? Everybody perfectly capable of helping with their problem ignores them.
No doubt. People on the internet have no real incentive to help in the first place beyond their good will, so throwing a temper tantrum will not help.
PS, this is what I'd probably do with your batch file:
@echo off
setlocal
set filepath=C:\Documents and Settings\kids\Desktop\PECP_alpha_v1.0.0_Android\Output Source\
set jarpath=c:\path to the .jar files you run
echo Decompiling...
echo ...classes.dex
java -jar "%jarpath%\baksmali-1.3.2.jar" -o "%filepath%\ classes.dex"
set target=" androidmanifest.xml"
set target=%target%," preferences.xml"
set target=%target%," create_new_world.xml"
set target=%target%," create_world_screen.xml"
set target=%target%," main.xml"
set target=%target%," mainmenu_options.xml"
set target=%target%," rename_mp_world.xml"
set target=%target%," bgtiled.xml"
set target=%target%," btn_nw_cancel.xml"
set target=%target%," btn_nw_create.xml"
set target=%target%," btngamemode.xml"
for %%f in (%target%) do (
echo ...%%f
java -jar "%jarpath%\axmlprinter2.jar" -o "%filepath%\%%f"
)
When I program something, or even write a batch file, I hate seeing redundancy. Plus if you need to adjust the files later, makes it a little easier to read.
So, I've been doing some stuff with batch that involves running decompilers, and I've come up with a small batch file called decompiler.bat that doesn't really work. I just learned batch today, and so far it seems incredibly easy, but there must be errors, because it just won't do what it's supposed to. There's one thing you should know: There are admin limitations that won't allow me to mess with files that aren't in my account directory.
decompiler.bat:
And this is what I get when I run it:
The "Decomp" folder has all the files it needs to work, and the "OutSource" remains empty. I am using Smali assembler/disassembler for the .dex file, and the AXMLPrinter2 to decompile the android xml files. I run windows XP still Any suggestions?
Register for CodingForums. They are awesome.
I already did a lot with the DOS CMD screen, and this is barely a language. The two are practically the same. Also, I was asking for help, not advice.
I don't want to have to register to a new forum to fix one problem. Actually, that'd be more worth it than asking on the damn mc forum at this rate. This is the most the forums have rage ever. I hate it when you need help, and you get no helpful replies. I don't mean to break anyone's back by asking for some help, I mean, it's completely stupid to expect that anybody could offer the least of help with a few DOS commands. I hope I didn't offend you, but you're the first one to reply, and this has happened to me so much lately.Sorry for my rant.
It cannot find the files because you didn't enclose the space-containing file path with double quotes.
PS, save some typing and make it more readable:
I dunno if that space between the last \ and the classes.dex is actually in the filename or a quirk in the forum.. if the file is <space>classes then enclose in quotes, otherwise not necessary.
And I hate it when somebody posts a topic for help, can't be assed to wait more than a few hours, and then starts essentially yelling at everybody because they didn't get help.
I see it all the time, and you know what happens? Everybody perfectly capable of helping with their problem ignores them.
PS, this is what I'd probably do with your batch file:
When I program something, or even write a batch file, I hate seeing redundancy. Plus if you need to adjust the files later, makes it a little easier to read.