[HELP] 'Java' is not recognized... - HTC Desire C

Hi everyone, I was trying to edit an apk file (it's the first time I try) and when I try to decompile classes.dex with dex2jar the console says "java is not recognized as an internal or external command"... I tried to set new PATH and CLASSPATH with the value as the address where's located java.exe and it still doesn't work..
Anyone can help me?
EDIT: New issue when I try do decompile a classes.dex file: "Error: Could not find or load main class com.googlecode.dex2jar.v3.Main"... I'm being mad with these errors...
Anyone can help me with this?

smoza said:
Hi everyone, I was trying to edit an apk file (it's the first time I try) and when I try to decompile classes.dex with dex2jar the console says "java is not recognized as an internal or external command"... I tried to set new PATH and CLASSPATH with the value as the address where's located java.exe and it still doesn't work..
Anyone can help me?
EDIT: New issue when I try do decompile a classes.dex file: "Error: Could not find or load main class com.googlecode.dex2jar.v3.Main"... I'm being mad with these errors...
Anyone can help me with this?
Click to expand...
Click to collapse
This is likely obvious, but do you have Java installed?
http://www.oracle.com/technetwork/java/javase/downloads/index.html

Fixed: I set the enviroment paths in the wrong way :laugh:

Related

Can anyone explain how to properly "install" colorchange.jar program?

I've read through the main thread but most of the info there assumes you have the program up and running. Which I don't. I don't know where to install the files on my computer.
staunty said:
I've read through the main thread but most of the info there assumes you have the program up and running. Which I don't. I don't know where to install the files on my computer.
Click to expand...
Click to collapse
Did you try looking here?
http://forum.xda-developers.com/showthread.php?t=535630
Binary100100 said:
Did you try looking here?
http://forum.xda-developers.com/showthread.php?t=535630
Click to expand...
Click to collapse
Yeah, I did. I ran the command at the top java -XmX512M -jar...
I get an "unable to access jarfile colorchangev3.jar" error. I think its a bit over my level of knowledge anyways.
double post
Do you extract the file to AndroidSDK\tools?
do you have the java jdk installed and included in your PATH?
Know-Fear said:
do you have the java jdk installed and included in your PATH?
Click to expand...
Click to collapse
I'm almost positive I have the jdk included in my path. I believe I did that when I setup my SDK.
I noticed that in the example, within the command you type colorchangev3.jar...I placed the colorChangev3.jar in my AndroidSDK\tools folder and I've typed out the example yet I get a "unable to access Jarfile colorChangev3.jar" error.
Did you make sure to type the file path of the jar file; ie. c:\(file path).jar
evilkorn said:
Did you make sure to type the file path of the jar file; ie. c:\(file path).jar
Click to expand...
Click to collapse
I probably did it wrong but I just added a new PATH
PATH
C:\AndroidSDK\tools\colorChangev3.jar
The previous error is gone when I type the example but now I get an unrecognized java error..."java is not recognized as an internal or external command"...

how do you open and edit classes.dex?

I can not open classes.dex for the life of me. I have tried multiple ways with different commands and such and still can not get it to open.
I have found this method to get me the farthest but still no go on opening it. every time I enter the command
java -jar baksmali.jar -o classout/ classes.dex
Click to expand...
Click to collapse
I get "Unable to access jarfile baksmaili.jar"
Thanks to anyone who is willing to help.
Download AvaboxV2 and unzip the folder. Inside there are tools for editing and such, namely the "Smali" folder which is hopefully what you are looking for.
kyouko said:
Download AvaboxV2 and unzip the folder. Inside there are tools for editing and such, namely the "Smali" folder which is hopefully what you are looking for.
Click to expand...
Click to collapse
I tried that. It will only do apks... I need to to do it to a .dex or a .jar
okay now I see the folder C:\Users\Devin\Documents\AvaboxV2\Smali\baksmali
but still I will need the command prompt and I will be in the same trouble i am in now.
Put the classes.dex file in the \smali\baksmali folder. then navigate to that folder in command prompt:
Code:
cd\
cd C:\Users\Devin\Documents\AvaboxV2\Smali\baksmali
java -jar baksmali-1.1.jar -o classout/ classes.dex
*that should create a folder called "classout" in \baksmali with the smali files*
Then make your edits to the .smali files using notepad++ or w/e
To close up the classout folder and put it back into a classes.dex enter this in cmd:
Code:
java -jar smali-1.1.jar classout -o classes.dex
Edit: fixed file name mix-up
kyouko said:
Put the classes.dex file in the \smali\baksmali folder. then navigate to that folder in command prompt:
Then make your edits to the .smali files using notepad++ or w/e
To close up the classout folder and put it back into a classes.dex enter this in cmd:
Code:
java -jar smali-1.2.1.jar classout -o classes.dex
Click to expand...
Click to collapse
dude no matter what I type cmd will NOT go to that folder. "Folder not found" or some ****.
I can NOT wait till iPhone 4 comes out android is total ****.
got it to go to teh folder in cmd but like I said i get the stupid ass unable to access jarfile baksmali.jar
When baksmali.jar is clearly in the freaking folder.
Is there not an easier way to do this?
Ooohhh shii- lol I'm a dumbass
Haha it should be baksmali-1.1.jar and smali-1.1.jar
I just edited my previous post to fix that mixup
I even pasted strait from yours.. it does not work man. I give up android is gay
Never mind thank you so much man.. I was just getting pissed off because I have been trying this for so long. Thanks for the help.
Funny thing is, you think you'll be able to mod I phone easier? Ha!
-------------------------------------
Sent via the XDA Tapatalk App
roflcopter
danaff37 said:
Funny thing is, you think you'll be able to mod I phone easier? Ha!
-------------------------------------
Sent via the XDA Tapatalk App
Click to expand...
Click to collapse
..Thumbs up
Srsly..its not difficult to mod android and its apps/framework(/resources)...at all. Only 2 real vars: setup and level of incompetence
not related->Getting a mac soon, mostly everything is windows compatible (80% of market/business/etc), mac not so much...parallel+windows 7 good idea?
kthxbai
I run a dual boot between ubuntu and windows 7 for work
Sent from my HERO200 using XDA App
Anyone have a clue why i get this error?
Smali\baksmali>java -jar framework.jar
-o classout/ classes.dex
Failed to load Main-Class manifest attribute from
framework.jar
This prog hero specific?
Thanks'
hellmonger said:
Anyone have a clue why i get this error?
Smali\baksmali>java -jar framework.jar
-o classout/ classes.dex
Failed to load Main-Class manifest attribute from
framework.jar
This prog hero specific?
Click to expand...
Click to collapse
it not hero specific > link
framework.jar doesn't have the "Main-class" header which is why you're getting that error.
it should be
Code:
java -jar baksmali.jar -o classout/ classes.dex
NOT
Code:
java -jar [COLOR="red"]framwork[/COLOR].jar -o classout/ classes.dex
java -jar is used to run the baksmali and smali.jar "applications"
can this be done in window? cygwin? I have tried to call baksmali for a classes.dex also and having no luck. any insight?
thank
thanksssssss
this app, everytime i start it, i have to press OK button (that annoying) but it work. see what can we do with it:
- i try to extract the classes.dex file, (using winrar)
- edit some code (to remove the dialog appear when it start),
- compress the code back .dex file
- put the .dex into .apk file
- install on the phone fail
can anyone give me suggestion or please do something..
khanhj said:
this app, everytime i start it, i have to press OK button (that annoying) but it work. see what can we do with it:
- i try to extract the classes.dex file, (using winrar)
- edit some code (to remove the dialog appear when it start),
- compress the code back .dex file
- put the .dex into .apk file
- install on the phone fail
can anyone give me suggestion or please do something..
Click to expand...
Click to collapse
Why you have attached a warez spy app?
Can anyone tell why I get this error?
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: bad magic value: 64 65 79 0a 30 33 36 00
at org.jf.dexlib.DexFile.<init>(DexFile.java:359)
at org.jf.baksmali.main.main(main.java:176)
Using Win7. I've always just thrown all editing files in Android/SMALI folder.
Hold Shift, Right Click "Open Command Window Here".
Then for compressing/decompressing the commands I use are.
java -jar baksmali.jar -o classout/ classes.dex
java -Xmx512M -jar smali.jar classout -o classes.dex
Haven't run into any issues yet. I noticed no one has put the "-Xmx512M" in their code.
I hope this helps.

[Q] Signing Kitchen Help

Hello im trying to make a custom rom using Doc_XXJPO_v9 rom with some apps I want but im trying to sign the dok.zip but im gettin this error when doing so >
C:\Signing Kitchen\Signing Kitchen\bin>java -jar signapk.jar
certificate.pem key.pk8 dok.zip doku.zip
'java' is not recognized as an internal or external command,
operable program or batch file.
C:\Signing Kitchen\Signing Kitchen\bin>pause
Press any key to continue . . .
I have Followed the guide properly but keep getting this error and no output zip file, All I want is a few apps in the rom Can someone help plz?
The apps Im trying to add: AOSP_email, Doc_V9_addon, Swype_JPA & XXJPO_AOSP_lockscreen
Edit: Im using Windows 7 (Duno if that makes much difference)
No one?

[Guide] How to deodex SMemo.apk

SMemo.apk is making problem when trying to deodex it.
I found the dependencies files and it works great!
Download the 2 attached files: servlet.jar and memo.jar
put these files in your framework folder
Use these files to deodex SMemo.apk -
twframework.jar
com.google.android.maps.jar
secmediarecorder.jar
memo.jar
servlet.jar
deodex your SMemo.apk
Good luck! Don't forget to hit the "Thanks" button :good:
Nice work dude!
You also need twframework.jar and com.google.android.maps.jar but those are to find in /framework.
But anyway there are still some errors:
Code:
Error while disassembling method Lcom/diotek/gdocs/util/GDocsSync$1;->run()V. Continuing.
org.jf.dexlib.Code.Analysis.ValidationException: Could not resolve the field in class Lcom/diotek/gdocs/util/GDocsSync; at offset 120
added full list of jar needed to deodex SMemo
firefds said:
added full list of jar needed to deodex SMemo
Click to expand...
Click to collapse
hm still the same
Code:
Error while disassembling method Lcom/diotek/gdocs/util/GDocsSync$1;->run()V. Continuing.
org.jf.dexlib.Code.Analysis.ValidationException: Could not resolve the field in class Lcom/diotek/gdocs/util/GDocsSync; at offset 120
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:1084)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:213)
at org.jf.baksmali.Adaptors.MethodDefinition.addAnalyzedInstructionMethodItems(MethodDefinition.java:379)
at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:132)
at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition.java:338)
at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:117)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:205)
at org.jf.baksmali.main.main(main.java:297)
opcode: iput-quick
CodeAddress: 3
Method: Lcom/diotek/gdocs/util/GDocsSync$1;->run()V
What version of smali/baksmali are u using?
Bak/smali 1.3.2
Dont forget to add the -a 15 tag
Sent from my GT-I9300 using xda premium
Hi~
Thanks for your method, I can deodex SMemo.apk, now.
Do you know how to deodex SlideShow.apk?
I got this error message as below
Code:
Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Code.Analysis.ClassPath$ClassNotFoundException: Could not find superclass Lcom/sec/android/gallery3d/app/AbstractGalleryActivity;
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadSuperclass(ClassPath.java:830)
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:683)
at org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:280)
at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:163)
at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPathFromOdex(ClassPath.java:110)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:104)
at org.jf.baksmali.main.main(main.java:293)
Error while loading class Lcom/sec/android/gallery3d/util/KeyBoardManager; from file ./system/app/SlideShow.odex
Error while loading ClassPath class Lcom/sec/android/gallery3d/util/KeyBoardManager;
Yes.. take the secGallery2.apk from the app folder and change it to .jar
Then stick it in the framework folder snd use it to deodex slideShow.apk
Dont forget to delete it before flashing!
Sent from my GT-I9300 using xda premium
mike1986. said:
hm still the same
Code:
Error while disassembling method Lcom/diotek/gdocs/util/GDocsSync$1;->run()V. Continuing.
org.jf.dexlib.Code.Analysis.ValidationException: Could not resolve the field in class Lcom/diotek/gdocs/util/GDocsSync; at offset 120
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:1084)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:213)
at org.jf.baksmali.Adaptors.MethodDefinition.addAnalyzedInstructionMethodItems(MethodDefinition.java:379)
at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:132)
at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition.java:338)
at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:117)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:205)
at org.jf.baksmali.main.main(main.java:297)
opcode: iput-quick
CodeAddress: 3
Method: Lcom/diotek/gdocs/util/GDocsSync$1;->run()V
What version of smali/baksmali are u using?
Click to expand...
Click to collapse
It's working here with the kitchen 1.9.6, thanks firefds.
firefds said:
Bak/smali 1.3.2
Dont forget to add the -a 15 tag
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
1.3.3 >^^<
http://forum.xda-developers.com/showpost.php?p=26007283&postcount=1
I have a problem... how to solve?
Code:
All ODEX files:
(1) ./system/app/SlideShow.odex
(2) ./system/app/SMemo.odex
Enter file number (0 = cancel): 2
Enter any JAR file dependencies separated by colon (Enter=none).
NOTE: To ignore errors, type 'ignore' by itself or after dependencies
./system/app/SMemo.odex > smemo.jar servlet.jar
Disassembling ./system/app/SMemo.odex ...
java -Xmx512m -jar baksmali.jar -a 15 -d system/framework -x ./system/app/SMemo.odex
Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Code.Analysis.ClassPath$ClassNotFoundException: Could not find superclass Lcom/sec/android/framework/draw/Stage;
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadSuperclass(ClassPath.java:830)
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:683)
at org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:280)
at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:163)
at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPathFromOdex(ClassPath.java:110)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:104)
at org.jf.baksmali.main.main(main.java:293)
Error while loading class Lcom/diotek/diodraw/Stage; from file ./system/app/SMemo.odex
Error while loading ClassPath class Lcom/diotek/diodraw/Stage;
Try ./system/app/SMemo.odex again (y/n)? (default: y):
roxdragon said:
I have a problem... how to solve?
Code:
All ODEX files:
(1) ./system/app/SlideShow.odex
(2) ./system/app/SMemo.odex
Enter file number (0 = cancel): 2
Enter any JAR file dependencies separated by colon (Enter=none).
NOTE: To ignore errors, type 'ignore' by itself or after dependencies
./system/app/SMemo.odex > smemo.jar servlet.jar
Disassembling ./system/app/SMemo.odex ...
java -Xmx512m -jar baksmali.jar -a 15 -d system/framework -x ./system/app/SMemo.odex
Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Code.Analysis.ClassPath$ClassNotFoundException: Could not find superclass Lcom/sec/android/framework/draw/Stage;
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadSuperclass(ClassPath.java:830)
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:683)
at org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:280)
at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:163)
at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPathFromOdex(ClassPath.java:110)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:104)
at org.jf.baksmali.main.main(main.java:293)
Error while loading class Lcom/diotek/diodraw/Stage; from file ./system/app/SMemo.odex
Error while loading ClassPath class Lcom/diotek/diodraw/Stage;
Try ./system/app/SMemo.odex again (y/n)? (default: y):
Click to expand...
Click to collapse
Put your 2 jar files on /framework and try with option "a" (deodex app folder).
Solved thank youuuuu!
I must remove files / dependences?
firefds said:
Dont forget to delete it before flashing!
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
1. Into /system/app i have SecGallery2.jar ...rename it SecGallery2.apk?
2. I need delete "servlet" and "SecGallery2.jar" into /system/framework before flashing?
Thank you!
Anyone have a working deodexed SMemo they can put up a download for? I removed my originals from the phone and the odexed ones aren't working as it just FCs every time. All other apps are working great when I restore in system/apps
ok,solve problems,thanks
all framework add,it‘s do it,thanks!
I would also like a download link if possible? this is all to much for me to do myself, im ok rooting, modding framework & system apps but i cant get my head round things like this? If anyone gets this working please send me a Private Message with the link please? Would really like this too
I pulled SMemo app & SMemo Provider apks from the DragonICS Rebirth rom & added it to my rom & I now have SMemo, also pulled Voice Recorder too :0)
Sent via my pimped out Samsung Galaxy S III using Tapatalk
I am tired and I need help...what am I doing wrong>??
the command where I need to deodex the .odex file, it NEVER makes the damn 'out' folder...
it spits out some weird help menu..
-a, --api level
-b,-- no-debug-info
this sort of ****...plz someone help me..
this is neither an error, nor is it a solution...i dont know what to Google also?
This would be amazing if it got done. Keep up the great work guys
This method is not needrd anymore.. just use baksmali/smali 1.3.3. No need for extra files
Sent from my GT-I9300 using xda premium

[Q] How to trouble shoot BOOT CLASS PATH Error during Deodexing?

I tried to deodex my Xperia SP .284 Stock ROM using xUltimate 2.4
First of all Norton Antivirus wont let me do it. It deleted the file opt_apk.exe saying it is Malware. Is it safe? any one with problem with this file?
However with Norton disabled, i pulled apps and framework but xUltimate shows BOOTCLASS PATH Error
Starting ApplicationsProvider.odex
*****************************************
* Deodexing... *
Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Code.Analysis.ClassPath$ClassNotFoundException: Could not find int
erface Lcom/android/internal/widget/multiwaveview/GlowPadView$OnTriggerListener;
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadAllImplementedInterfaces(ClassPath.java:865)
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:690)
at org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:280)
at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:163)
at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPath(ClassPath.java:131)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:111)
at org.jf.baksmali.main.main(main.java:293)
Error while loading class Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods; from file .\origi_frame\android.policy.zip
Error while loading ClassPath class Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;
Press any key to continue . . .
Please help
shubham.12 said:
I tried to deodex my Xperia SP .284 Stock ROM using xUltimate 2.4
First of all Norton Antivirus wont let me do it. It deleted the file opt_apk.exe saying it is Malware. Is it safe? any one with problem with this file?
However with Norton disabled, i pulled apps and framework but xUltimate shows BOOTCLASS PATH Error
Starting ApplicationsProvider.odex
*****************************************
* Deodexing... *
Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Code.Analysis.ClassPath$ClassNotFoundException: Could not find int
erface Lcom/android/internal/widget/multiwaveview/GlowPadView$OnTriggerListener;
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadAllImplementedInterfaces(ClassPath.java:865)
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:690)
at org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:280)
at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:163)
at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPath(ClassPath.java:131)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:111)
at org.jf.baksmali.main.main(main.java:293)
Error while loading class Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods; from file .\origi_frame\android.policy.zip
Error while loading ClassPath class Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;
Press any key to continue . . .
Please help
Click to expand...
Click to collapse
Download or install xUltimate again and disable the anti virus before you run it. Don't worry about viruses from Android relates tools.
The reason you get that error is because of the file you deleted. That file is the one which packs the .dex file into the apk file. Hence why the process is called deodexing.
Good luck. :good:
gadgetroid said:
Download or install xUltimate again and disable the anti virus before you run it. Don't worry about viruses from Android relates tools.
The reason you get that error is because of the file you deleted. That file is the one which packs the .dex file into the apk file. Hence why the process is called deodexing.
Good luck. :good:
Click to expand...
Click to collapse
already done bro!
i disbled antivirus re extracted xUltimate still no luck.
shubham.12 said:
already done bro!
i disbled antivirus re extracted xUltimate still no luck.
Click to expand...
Click to collapse
Hi,
If you still haven't managed to sort out that problem, then please give my tool a try - http://forum.xda-developers.com/showthread.php?t=2213235
This error occurs when the framework files are not present and baksmali.jar tries to deodex the apk.
abcdjdj said:
Hi,
If you still haven't managed to sort out that problem, then please give my tool a try - http://forum.xda-developers.com/showthread.php?t=2213235
This error occurs when the framework files are not present and baksmali.jar tries to deodex the apk.
Click to expand...
Click to collapse
ok well i might give your tool a try sometime. thanks already for it
Will you be able to tell me how to include framework files?
shubham.12 said:
ok well i might give your tool a try sometime. thanks already for it
Will you be able to tell me how to include framework files?
Click to expand...
Click to collapse
Well I tried deodexing with xUltimate but I couldn't get it to work. Sorry
I tried copying all framework files to the jar folder, ori_framework too but no luck.

Categories

Resources