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.
Related
alright...ive got the classes.dex file open and able to make edits but when i try to close it and recompress it it gives me errors. can someone help please.
Gtalk is [email protected]
You need to use smali from avabox by avalaunch
Sent from my HERO200 using the XDA mobile application powered by Tapatalk
danaff37 said:
You need to use smali from avabox by avalaunch
Sent from my HERO200 using the XDA mobile application powered by Tapatalk
Click to expand...
Click to collapse
ok thats how i got the classes.dex file by breaking down the apk.
then ran a command to open up the classes.dex file.
it created a file called classout which had all the folders and files inside of the classes.dex file
i made it to the change i needed to make and edited and saved.
then ran a command that should close up the classes out folder back into the classes.dex file and it gives me errors. im changing colors of text in the keyboard and used hex codes to change the color
So whats the error and what command are you using?
Are you using the batch file or typing it in in command prompt.
Not sure which one you are doing so I will post what works for me
I double clicked backsmali.bat and when done editing smali.bat.
java -jar baksmali-1.2.1.jar -x blah.apk will deodex the .apk and make an out folder for the the classes.dex.
java -jar smali-1.2.1.jar out -o classes.dex will recompile the .smali files including the ones you edited. This will make a "New" classes.dex that you can drag and drop into your .apk. This is the best way rather than using a script that may or may not work...
&RoidRage said:
Are you using the batch file or typing it in in command prompt.
Not sure which one you are doing so I will post what works for me
I double clicked backsmali.bat and when done editing smali.bat.
Click to expand...
Click to collapse
i go to command prompt and type in this in the sdk/tools folder
java -jar baksmali.jar -o classout/ classes.dex
that pulls the files out into a classout file
do my editing
then
type in
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
then comes up with these errors afterward
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Chad Barlan>cd C:\android-sdk-windows\tools
C:\android-sdk-windows\tools>java -jar baksmali.jar -o classout/ classes.dex
Unable to access jarfile baksmali.jar
C:\android-sdk-windows\tools>java -jar baksmali.jar -o classout/ classes.dex
C:\android-sdk-windows\tools\classout\com\htc\android\htcime\ezsip\KeyboardView.
smali[0,0] -0xFF1874CD cannot fit into an int
C:\android-sdk-windows\tools\classout\com\htc\android\htcime\ezsip\KeyboardView.
smali[3889,4] mismatched tree node: I_STATEMENT_FORMAT35c_METHOD expecting I_CAT
CHES
C:\android-sdk-windows\tools\classout\com\htc\android\htcime\ezsip\KeyboardView.
smali[3892,4] mismatched tree node: I_STATEMENT_FORMAT11n expecting <UP>
these r the errors i get
im changing text color
using FF1874CD
whitch is just a shade of blue in a hex code form
Lol, that's not how it works .
Color codes, typically in decompiled code are in the form of ARGB bitwise shifted hex values, not standard hex.
R bitwise shifted 16 bits to the left
G bitwise shifted 8 bits to the left
B No shift
Here is a good explanation of how to handle color values in the code:
http://board.flashkit.com/board/archive/index.php/t-657269.html
cbarlan said:
i go to command prompt and type in this in the sdk/tools folder
java -jar baksmali.jar -o classout/ classes.dex
that pulls the files out into a classout file
do my editing
then
type in
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
then comes up with these errors afterward
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Chad Barlan>cd C:\android-sdk-windows\tools
C:\android-sdk-windows\tools>java -jar baksmali.jar -o classout/ classes.dex
Unable to access jarfile baksmali.jar
C:\android-sdk-windows\tools>java -jar baksmali.jar -o classout/ classes.dex
C:\android-sdk-windows\tools\classout\com\htc\android\htcime\ezsip\KeyboardView.
smali[0,0] -0xFF1874CD cannot fit into an int
C:\android-sdk-windows\tools\classout\com\htc\android\htcime\ezsip\KeyboardView.
smali[3889,4] mismatched tree node: I_STATEMENT_FORMAT35c_METHOD expecting I_CAT
CHES
C:\android-sdk-windows\tools\classout\com\htc\android\htcime\ezsip\KeyboardView.
smali[3892,4] mismatched tree node: I_STATEMENT_FORMAT11n expecting <UP>
these r the errors i get
im changing text color
using FF1874CD
whitch is just a shade of blue in a hex code form
Click to expand...
Click to collapse
By any chance do you have the .smali files still open? By the way, you dont have to use -o classout/ when you baksmali. Baksmali creates an out folder by default. It was designed that way. When you smali, you also dont need -Xmx512M. My suggestion is go here... http://code.google.com/p/smali/ Download the latest baksmali-1.2.2.jar and smali-1.2.2.jar. This will alleviate any errors. Also, do me a favor, pastebin both your edited and non edited .smali files. I'll take a look at them.
By the way, what Js said is correct. You need to use this value for .smali Smali color = -0x100. This is the shifted hex values converted from your standard hex.
JsChiSurf said:
Lol, that's not how it works .
Color codes, typically in decompiled code are in the form of ARGB bitwise shifted hex values, not standard hex.
R bitwise shifted 16 bits to the left
G bitwise shifted 8 bits to the left
B No shift
Click to expand...
Click to collapse
yeah i just figured that out when i looked at another file that has a different color already
so i dropped the transperency
And please FOR THE LOVE OF GOD, upgrade your baksmali and smali .jars
VinceOB said:
By any chance do you have the .smali files still open? By the way, you dont have to use -o classout/ when you baksmali. Baksmali creates an out folder by default. It was designed that way. When you smali, you also dont need -Xmx512M. My suggestion is go here... http://code.google.com/p/smali/ Download the latest baksmali-1.2.2.jar and smali-1.2.2.jar. This will alleviate any errors. Also, do me a favor, pastebin both your edited and non edited .smali files. I'll take a look at them.
By the way, what Js said is correct. You need to use this value for .smali Smali color = -0xe78b33. This is the shifted hex values converted from your standard hex.
Click to expand...
Click to collapse
yeah so im an idiot and got it to work.
thanks for ur help
i had already downloaded the newer smali and baksmali files and put them in the sdk tools folder. was typing to much in the commands and also used the transperency when i was putting in the hex color i.e. FF1874CD instead of just using 1874CD which is what worked and didnt give me any errors.
cbarlan said:
yeah so im an idiot and got it to work.
thanks for ur help
i had already downloaded the newer smali and baksmali files and put them in the sdk tools folder. was typing to much in the commands and also used the transperency when i was putting in the hex color i.e. FF1874CD instead of just using 1874CD which is what worked and didnt give me any errors.
Click to expand...
Click to collapse
So did it change the color for you?
VinceOB said:
And please FOR THE LOVE OF GOD, upgrade your baksmali and smali .jars
Click to expand...
Click to collapse
i upgraded them just changed the name of them to take of the numbers lol much less typing, im lazy lol
cbarlan said:
yeah so im an idiot and got it to work.
thanks for ur help
i had already downloaded the newer smali and baksmali files and put them in the sdk tools folder. was typing to much in the commands and also used the transperency when i was putting in the hex color i.e. FF1874CD instead of just using 1874CD which is what worked and didnt give me any errors.
Click to expand...
Click to collapse
That might have "fit" into the size of the variable defined in the code, but that is not how you calculate the color code. Odds are, if it works, you are going to end up with black, regardless of the color you are trying to achieve. See my previous post.
JsChiSurf said:
That might have "fit" into the size of the variable defined in the code, but that is not how you calculate the color code. Odds are, if it works, you are going to end up with black, regardless of the color you are trying to achieve...
Click to expand...
Click to collapse
what do u mean
im using codes from this site
http://www.december.com/html/spec/colorhex.html
cbarlan said:
what do u mean
im using codes from this site
http://www.december.com/html/spec/colorhex.html
Click to expand...
Click to collapse
What happened when you booted? Did you get the color you expected?
you should use the bat files for that. i only use cmd line codes for auto sign. i find the batch files for baksmali to be perfect for me.
good luck.
Avalaunchmods said:
you should use the bat files for that. i only use cmd line codes for auto sign. i find the batch files for baksmali to be perfect for me.
good luck.
Click to expand...
Click to collapse
Here's what I was getting at with Avabox. He has batch files in there and if you put the apk's in the folder called apk run backsmali.bat. It will create a folder inside the apk folder with the decompressed apk. You can go in there and edit all the .smali files and when you are done run smali.bat. It will recompress and put it back into the apk you originally put into the folder.
Am I correct Avalaunch?
This just makes it easier as you are not having to type anything in.
&RoidRage said:
Here's what I was getting at with Avabox. He has batch files in there and if you put the apk's in the folder called apk run backsmali.bat. It will create a folder inside the apk folder with the decompressed apk. You can go in there and edit all the .smali files and when you are done run smali.bat. It will recompress and put it back into the apk you originally put into the folder.
Am I correct Avalaunch?
This just makes it easier as you are not having to type anything in.
Click to expand...
Click to collapse
tadaa. but it depends on what your doing. i use it to extract the whole apk easily into afolder. then do edits to png's so forth. but it only re creates the classes.dex so png edits wont save. i just recreate the apk. archive to zip, sign, change to apk.
and im not gonna give to much away for free butttt you can also open and edit alot of different android files by changing their extensions and placing them into a folder.
This works on JPY/JS3, and ought to work on any other i9000 ROM, with a bit of ingenuity.
Download the Home_Haptic_Editing.zip at the end of this post. Extract the files to somewhere of your choosing.
Now, look at the theme package. The file you'll need is android.policy.jar.
Open android.policy.jar inside a .zip program, such as 7-zip or WinRAR. Extract the file "classes.dex" to the same folder as baksmali.jar and smali.jar.
Open a command prompt and navigate to that folder. (Or, hold Shift and right click inside the folder and hit "Open command window here").
Enter into that command prompt the following:
Code:
java -jar baksmali.jar -o classout/ classes.dex
This will create a folder called "classout" filled with .smali files.
Delete the classes.dex file.
Replace the PhoneWindowManager.smali with the uploaded one.
Back inside the command prompt, enter the following:
Code:
java -Xmx512M -jar smali.jar classout/ -o classes.dex
This will generate a classes.dex file.
Delete the classout folder.
Using 7-zip or similar, replace the classes.dex inside the android.policy.jar.
Put the android.policy.jar back inside your theme, and you're done.
It compiled. Will test tomorrow, as I don't feel like dealing with forces closes if I ****ed up tonight.
x3nhydr4lutr1sx said:
It compiled. Will test tomorrow, as I don't feel like dealing with forces closes if I ****ed up tonight.
Click to expand...
Click to collapse
My first victim tester.
Works on JS3 and JPY.
can u explain more what should this mod does exactly ?? and ought to work on any other i9000 ROM, with a bit of ingenuity?? is that mean if i try to replace ur PhoneWindowManager.smali with mine could break my phone ???
ingvay2009 said:
can u explain more what should this mod does exactly ?? and ought to work on any other i9000 ROM, with a bit of ingenuity?? is that mean if i try to replace ur PhoneWindowManager.smali with mine could break my phone ???
Click to expand...
Click to collapse
It means that it adds haptic
feedback to the home key.
It means that if you try it on non-JPY/JS3, I don't know what will happen.
Sent from my Captivate.
Compilled, now testing... AFAIK it shouldn't **** up.
But it's android - sign for that file is now bad, so it will recompile dalvik-cache (yeah, crazy i know)
Edit: **** up DID not occured, replaced file via recovery and adb. JS3 firmware
So I take it it worked?
Yep, but feedback on home is a bit stronger than other buttons.this is weird
ive tried multiple times but the windows phone 7 theme woll not work
As always tha.ks for the guide. Think we might need to make a roll up of your guids so they are easy to find.
As far as the windows theme what is the theme built off?
Thanks for posting this info. Keep up all your great work my cappy would be bone stock if not for you
Can you point me in the direction in how to add haptic feedback for jvp or even jvq, I'm trying to port a I9000 to tmobile vibrant.
jrafael said:
Can you point me in the direction in how to add haptic feedback for jvp or even jvq, I'm trying to port a I9000 to tmobile vibrant.
Click to expand...
Click to collapse
It's the same.
Sent from my Infuse 4G
I always found it annoying when I accidentally hit the Swype button while trying to type a message and the Swype Help Dialog (Tutorial) would pop-up. I thought it was just me but others have complained about this also so I decided to mod the Swype keyboard so this wouldn't happen. However, the Swype button does have other useful functions that I didn't want to remove. This mod only disables the Tutorial pop-up. All other Swype button functions still work. I am doing this on a Linux pc. I don't use Windows but this should work similar in Windows.
Credits:
00.ante - Used his Keyboard for Example - http://forum.xda-developers.com/showthread.php?t=942392
MikeyMike01 - Inspired by his Home Haptic fix
What you will need:
1. A Swype Keyboard
2. Smali/Baksmali - http://code.google.com/p/smali/
3. APK Manager - Optional
How To Instructions (Using Smail/Baksmali, you can also use APK Manager for this):
1. Extract classes.dex from Swype.apk and place in same folder as smali.jar and baksmali.jar
2. Open Terminal, navigate to folder where you put classes.dex and run this command: java -jar baksmali.jar -o classout/ classes.dex
3. This will create a folder called "classout"
4. In the classout folder, navigate to com/swype/android/inputmethod
5. Open SwypeInputMethod.smali in text editor
6. Delete all lines of code that contain "HelpDialog" and "HELP_DIALOG", There is one line that is embedded within a method. Delete starting at .method to .endmethod.
7. There are two lines of code that have just "Help" in them. Do not delete these.
8. Save and Close SwypeInputMethod.smali
9. Delete classes.dex that you extracted
10. Run this command in terminal: java -Xmx512M -jar smali.jar classout/ -o classes.dex
11. Copy the classes.dex that is created and drop it into your swype.apk
12. Place swype.apk into your CWM install zip
13. Flash and enjoy.
Attached is an example of this mod using one of 00.ante's Swype KB's. If you don't want to go through the trouble of baksmali/smali, you can just extract the classes.dex from this and drop it into your swype kb. Should work.
I know this is an old news, but I think most of people out there or in here wondering
if they could deodex their CM7.2 or other ROM correctly. After trying every kitchen/apps
etc. to deodex, it's seems worthless. Moreover, as newbie, setting up the kitchen is so
complicated & frequently giving me a hard time. But no worries, these are the steps on
how to deodex ROM manually
NOTE:
1 THIS METHOD HAVE ALREADY DONE ONLY BY WINDOWS
2 THIS METHOD IS BASICALLY WORKS ON ANY ROM
3 BEFORE ASK ANYTHING, PLEASE UNDERSTAND THE WHOLE MAIN THREAD FIRST
Requirements:
1 The Manual-Deodexer.zip [in attachments below]
2 A working brain :silly:
3 All framework files
4 APK/JAR to deodex
5 A working PC of course
STEP A: Setup a working folder
1 Extract the Manual-Deodexer.zip
2 Create a folder named "Deodexer" [any place] in your PC [EXAMPLE: D:/Deodexer]
3 Place all of the files included in Manual-Deodexer.zip to the "Deodexer" folder
[baksmali.jar, smali.jar, java.awt.jar, busybox, dexopt-wrapper, zipalign.exe]
STEP B: Deodexing All JARs First [system/framework]
1 Place all of your framework files also in "Deodexer" folder
2 Deodexing framework files [I'll use android.policy.jar for a start]
3 Run CMD in mentioned folder [Shift + Right Click] & type:
Code:
java -Xmx1024m -jar baksmali.jar -c :core.jar:bouncycastle.jar:ext.jar:framework.jar:android.policy.jar:services.jar:core-junit.jar -x android.policy.odex
THIS WILL CREATE "out" FOLDER
4 Make sure the "out" folder is there, then in CMD, type:
Code:
java -Xmx1024m -jar smali.jar out -o classes.dex
THIS WILL CREATE "classes.dex"
5 Finally, deodex android.policy.jar:
> After the classes.dex created, directly delete both android.policy.odex & its "out" folder
> Open android.policy.jar with 7ZIP without extracting
> Drag the classes.dex in the 7ZIP window in the root folder
> Close the 7ZIP & you've deodexed android.policy.jar
[REPEAT THE SAME STEP FOR OTHER JARs 1 BY 1] [ON MY CM7.2, I GOT 19 JAR Files]
> So, basically repeat the steps for 19 times :laugh:
STEP B: Deodexing APK [system/app]
1 Place any APK you want to deodex also in "Deodexer" folder [I'll use SystemUI.apk for example]
2 Run CMD in mentioned folder [Shift + Right Click] & type:
Code:
java -Xmx1024m -jar baksmali.jar -c :am.jar:android.policy.jar:android.test.runner.jar:bmgr.jar:bouncycastle.jar:com.android.location.provider.jar:com.google.android.maps.jar:core.jar:core-junit.jar:ext.jar:framework.jar:ime.jar:input.jar:java.awt.jar:javax.obex.jar:monkey.jar:pm.jar:services.jar:sqlite-jdbc.jar:svc.jar -x SystemUI.odex
THIS WILL CREATE "out" FOLDER
3 Make sure the "out" is there & in CMD type:
Code:
java -Xmx1024m -jar smali.jar out -o classes.dex
THIS WILL CREATE "classes.dex"
4 Finally deodex SystemUI.apk:
> After the classes.dex created, directly delete both SystemUI.odex & its "out" folder
> Open SystemUI.apk with 7ZIP without extracting
> Drag the classes.dex in the 7ZIP window in the root folder
> Close the 7ZIP windows & you've deodexed SystemUI.apk
[REPEAT THE SAME STEPS ON OTHER APK YOU WANT TO DEODEX]
STEP C: Zipaplign Deodexed APK For Performances [OPTIONAL][ONLY APK]
1 In the same CMD prompt windows, type:
Code:
zipalign -v 4 "anyapk".apk zip_"anyapk".apk
2 A zip_"anyapk".apk file will be created. Delete your original deodexed "anyapk".apk
& rename zip_"anyapk".apk to the original "anyapk".apk you've deleted
3 Install it normally or push it to system/app [rw-r-r] method
NOTE:
1 TO DEODEXED Emails.apk & MobilePrint.apk YOU'LL NEED ANOTHER COPY OF "java.awt.jar"
2 IT IS DEODEX, SO BASICALLY YOU DON'T HAVE TO SIGN THE APK
ALL CREDITS GOES TO @sicopat FOR HIS WONDERFUL THREAD
To me too, why not, for making it snappy
Did I say it is a simple & quicker job??? No, it doesn't :silly:
Hit the thanks button if I helped
I am facing issues in compiling systemui.apk and systemUI.odex files. I was porting Pixel Navigation bar for AOSP ROM of @Santhosh M. There is any to combine both the files?
If i remember right i made the Pixel navbar for Santhosh M ROM. Doesn't it work anymore? If you don't like the home button just decompile the apk and go to drawable-xxhdpi-v4 and change the ic_sysbar_home icon.
Anyway in order to combine them
1. Download baksmali. Make new folder and put the baksmali.jar and SystemUI.odex there.
2. Open command prompt in the folder where baksmali is located. Type in command prompt "adb pull /system/framework/arm" to extract the required files from the phone.
3. Type "java -jar baksmali.jar deodex SystemUI.odex -l" in the command prompt and if it successful there should be an output folder called "out". Copy it and paste it to the decompiled SystemUI.apk then rename it "smali"
4. Get the required odex files from Pixel's SystemUI(tho' i would recommend you to get them from the already modified systemUI as it usually generates the same number IDs so you wont have to deal with odex file changes).
5. Paste them to smali/com/google/android/systemui(if i remember right you had to create google/android/systemui folders so no worries if they are missing)
6.Recompile
I'd advise you to use this tutorial as it is way more detailed.
Sashko98 said:
If i remember right i made the Pixel navbar for Santhosh M ROM. Doesn't it work anymore? If you don't like the home button just decompile the apk and go to drawable-xxhdpi-v4 and change the ic_sysbar_home icon.
Anyway in order to combine them
1. Download baksmali. Make new folder and put the baksmali.jar and SystemUI.odex there.
2. Open command prompt in the folder where baksmali is located. Type in command prompt "adb pull /system/framework/arm" to extract the required files from the phone.
3. Type "java -jar baksmali.jar deodex SystemUI.odex -l" in the command prompt and if it successful there should be an output folder called "out". Copy it and paste it to the decompiled SystemUI.apk then rename it "smali"
4. Get the required odex files from Pixel's SystemUI(tho' i would recommend you to get them from the already modified systemUI as it usually generates the same number IDs so you wont have to deal with odex file changes).
5. Paste them to smali/com/google/android/systemui(if i remember right you had to create google/android/systemui folders so no worries if they are missing)
6.Recompile
I'd advise you to use this tutorial as it is way more detailed.
Click to expand...
Click to collapse
Thanks! I will be trying this out today. You developed Pixel Nav bars and the thing is you made it for January build. This is April so I have seen that it doesn't works. We need to decompile the systemui.apk again and again Change the ID and other things.
I have ported pixel Navbars for LineageOS. It was easy and today, I stuck in this steps.
I just followed your tutorial and I got this error
C:\Users\Xaif\Desktop\Baksmali\framework>java -jar baksmali.jar deodex SystemUI.
odex -x
usage: java -jar baksmali.jar [options] <dex-file>
disassembles and/or dumps a dex file
-?,--help prints the help message then exits.
Specify twice for debug options
-a,--api-level <API_LEVEL> The numeric api-level of the file
being disassembled. If not
specified, it defaults to 15 (ICS).
-b,--no-debug-info don't write out debug info (.local,
.param, .line, etc.)
-c,--bootclasspath <BOOTCLASSPATH> A colon-separated list of
bootclasspath jar/oat files to use
for analysis. Add an initial colon
to specify that the jars/oats should
be appended to the default
bootclasspath instead of replacing
it
-d,--bootclasspath-dir <DIR> the base folder to look for the
bootclasspath files in. Defaults to
the current directory
-e,--dex-file <DEX_FILE> looks for dex file named DEX_FILE,
defaults to classes.dex
-f,--code-offsets add comments to the disassembly
containing the code offset for each
address
-i,--resource-id-files <FILES> the resource ID files to use, for
analysis. A colon-separated list of
prefix=file pairs. For example
R=res/values/public.xml:android.R=$A
NDROID_HOME/platforms/android-19/dat
a/res/values/public.xml
-j,--jobs <NUM_THREADS> The number of threads to use.
Defaults to the number of cores
available, up to a maximum of 6
-k,--check-package-private-access When deodexing, use the
package-private access check when
calculating vtable indexes. It
should only be needed for 4.2.0
odexes. The functionality was
reverted for 4.2.1.
-l,--use-locals output the .locals directive with
the number of non-parameter
registers, rather than the .register
directive with the total number of
register
-m,--no-accessor-comments don't output helper comments for
synthetic accessors
-n,--normalize-virtual-methods Normalize virtual method references
to the reference the base method.
-o,--output <DIR> the directory where the disassembled
files will be placed. The default is
out
-p,--no-parameter-registers use the v<n> syntax instead of the
p<n> syntax for registers mapped to
method parameters
-r,--register-info <REGISTER_INFO_TYPES> print the specificed type(s) of
register information for each
instruction. "ARGS,DEST" is the
default if no types are specified.
Valid values are:
ALL: all pre- and post-instruction
registers.
ALLPRE: all pre-instruction
registers
ALLPOST: all post-instruction
registers
ARGS: any pre-instruction registers
used as arguments to the instruction
DEST: the post-instruction
destination register, if any
MERGE: Any pre-instruction register
has been merged from more than 1
different post-instruction register
from its predecessors
FULLMERGE: For each register that
would be printed by MERGE, also show
the incoming register types that
were merged
-s,--sequential-labels create label names using a
sequential numbering scheme per
label type, rather than using the
bytecode addressQA
-t,--implicit-references Use implicit (type-less) method and
field references
-v,--version prints the version then exits
-X,--experimental enable experimental opcodes to be
disassembled, even if they aren't
necessarily supported in the Android
runtime yet
-x,--deodex deodex the given odex file. This
option is ignored if the input file
is not an odex file
Click to expand...
Click to collapse
I also tried doing like the above given command so I followed this steps:
C:\Users\Xaif\Desktop\Baksmali\framework>java -jar baksmali.jar --deodex SystemU
I.odex -l
Error occurred while loading boot class path files. Aborting.
org.jf.util.ExceptionWithContext: Cannot locate boot class path file /system/fra
mework/core.jar
at org.jf.dexlib2.analysis.ClassPath.loadClassPathEntry(ClassPath.java:2
96)
at org.jf.dexlib2.analysis.ClassPath.fromClassPath(ClassPath.java:207)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:67)
at org.jf.baksmali.main.main(main.java:305)
C:\Users\Xaif\Desktop\Baksmali\framework>
Click to expand...
Click to collapse
I have used ApkTool for Android to deodex that file and it did it successfully. Now, I am porting again