baksmali with ART support (Android 5.0) - Galaxy S 5 Developer Discussion [Developers Only]

Attached baksmali/smali is v2.0.3 with applied patch to support ART deodexing.
source of patch: https://code.google.com/p/smali/issues/detail?id=225
DISCLAMER: I don't provide any support for this application. Neither provide any guides. It's strictly for devs only.

Great job.
Thank you my friend

Thanks , My friend :good:

Does anyone know how to dump the boot.oat file so it can be deodexed as well?

tdunham said:
Does anyone know how to dump the boot.oat file so it can be deodexed as well?
Click to expand...
Click to collapse
As any other odex file:
Code:
java -jar oat2dex.jar boot.oat filename.dex
It takes about 2-3 min but works without error

_alexndr said:
As any other odex file:
Code:
java -jar oat2dex.jar boot.oat filename.dex
It takes about 2-3 min but works without error
Click to expand...
Click to collapse
Yes, that part works for me too. I use this commandline to deodex that .dex file:
Code:
Java -jar baksmali.jar -a 21 -x temp.dex -o deodex
But when I try to recompile, I only get a single, very small classes.dex and I was expecting multiple dex files for reintegration into their framework jar files.
What am I missing here for what needs to be done with the outputted dex file?

tdunham said:
Yes, that part works for me too. I use this commandline to deodex that .dex file:
Code:
Java -jar baksmali.jar -a 21 -x temp.dex -o deodex
But when I try to recompile, I only get a single, very small classes.dex and I was expecting multiple dex files for reintegration into their framework jar files.
What am I missing here for what needs to be done with the outputted dex file?
Click to expand...
Click to collapse
From what I understand, boot.oat should have the classes for at least 15 different jar files in it. Even if they're amalgamated together, that should still be a reasonably big size..

Ticklefish said:
From what I understand, boot.oat should have the classes for at least 15 different jar files in it. Even if they're amalgamated together, that should still be a reasonably big size..
Click to expand...
Click to collapse
Right, I get a single 75mb dex file from boot.oat. When dex is decompiled I get this directory structure:
android
com
dalvik
java
javax
libcore
org
sun
Now, how can we recompile back to multi dex so it is usable?

tdunham said:
[...] I was expecting multiple dex files for reintegration into their framework jar files.
What am I missing here for what needs to be done with the outputted dex file?
Click to expand...
Click to collapse
Indeed, I didn't think of that well, I just didn't need it yet
BTW
Look at this:
http://forum.xda-developers.com/galaxy-s5/general/tool-deodex-tool-android-l-t2972025

tdunham said:
Right, I get a single 75mb dex file from boot.oat. When dex is decompiled I get this directory structure:
android
com
dalvik
java
javax
libcore
org
sun
Now, how can we recompile back to multi dex so it is usable?
Click to expand...
Click to collapse
Hmm...dunno.
I can't spot an issue for this one but I would assume that JesusFreke's working on it. This is somewhat of a significant file...

_alexndr said:
Indeed, I didn't think of that well, I just didn't need it yet
BTW
Look at this:
http://forum.xda-developers.com/galaxy-s5/general/tool-deodex-tool-android-l-t2972025
Click to expand...
Click to collapse
Perfect!
This tool seems to do the trick for the boot.oat and the rest of the framework files. Now to see if I can boot with the altered framework because the system just seems to hang after replacing with the new framework folder (deleting entire framework and replacing with new one).
I may need to compare NL2 framework with ours in case some files are getting missed by the tool since we are not running that build.

I didn't need to test attached tools before because @sorg has shared with us BNL2 deodexed ROM and it works fine
Today Sammy has released G900FXXU1BNL7 (higher changelist than BNL2) so I've tried patched tools, but without success (FC)
Does anybody have any idea what I am doing wrong?
Code:
7za x SecMms_Candy.odex.xz
oat2dex SecMms_Candy.odex SecMms_Candy.dex
baksmali-art -a 21 -x SecMms_Candy.dex -o SecMms_Candy
smali-art -a 21 SecMms_Candy -o classes.dex
7za u -tzip SecMms_Candy.apk classes.dex
(bak)smali-art.bat are simply my *.bat files which calls sorg's patched jar files (java -jar [filename].jar %1 %2 %3 .... etc)
I've used oat2dex tool from HERE and of course patched @sorg's (bak)smali tools from this thread
I've tried to deodex both - BNL7 and even BNL2 version of SecMms_Candy - same result (FC) - see my logcat
Code:
I/art ( 7231): Verification error in void com.android.mms.Log.<clinit>()
I/art ( 7231): void com.android.mms.Log.<clinit>() failed to verify: copyRes1 v0<- result0 type=Undefined [0x11]
E/art ( 7231): Verification failed on class com.android.mms.Log in /system/priv-app/SecMms_Candy/SecMms_Candy.apk because: Verifier rejected class com.android.mms.Log due to bad method void com.android.mms.Log.<clinit>()

_alexndr said:
I didn't need to test attached tools before because @sorg has shared with us BNL2 deodexed ROM and it works fine
Today Sammy has released G900FXXU1BNL7 (higher changelist than BNL2) so I've tried patched tools, but without success (FC)
Does anybody have any idea what I am doing wrong?
Code:
7za x SecMms_Candy.odex.xz
oat2dex SecMms_Candy.odex SecMms_Candy.dex
baksmali-art -a 21 -x SecMms_Candy.dex -o SecMms_Candy
smali-art -a 21 SecMms_Candy -o classes.dex
7za u -tzip SecMms_Candy.apk classes.dex
(bak)smali-art.bat are simply my *.bat files which calls sorg's patched jar files (java -jar [filename].jar %1 %2 %3 .... etc)
I've used oat2dex tool from HERE and of course patched @sorg's (bak)smali tools from this thread
I've tried to deodex both - BNL7 and even BNL2 version of SecMms_Candy - same result (FC) - see my logcat
Code:
I/art ( 7231): Verification error in void com.android.mms.Log.<clinit>()
I/art ( 7231): void com.android.mms.Log.<clinit>() failed to verify: copyRes1 v0<- result0 type=Undefined [0x11]
E/art ( 7231): Verification failed on class com.android.mms.Log in /system/priv-app/SecMms_Candy/SecMms_Candy.apk because: Verifier rejected class com.android.mms.Log due to bad method void com.android.mms.Log.<clinit>()
Click to expand...
Click to collapse
Try another backsmali.

svadev said:
Try another backsmali.
Click to expand...
Click to collapse
Thanks, but same errors see attachment ...
@sorg... how did you do that? Your deodexed BNL2 files seems to be the only that works...
DISCLAMER: I don't provide any support for this application. Neither provide any guides. It's strictly for devs only.
Click to expand...
Click to collapse
I know... But we are not a noobs, we need only the hint(s), no quides

Just to be clear - I put framework contents in same folder as I am working in, so "-d" option was not necessary (tried with original and with @sorg's framework).
But maybe the key is to use "-c" option and add additional dependencies, but which...?

Related

[Q] Editing ContactsProvider.apk, weird error, should I generate .odex file?

I used apktool to add arrays.xml file to ContactsProvider.apk and enable Facebook native sync option. All is explained here:
Code:
java -jar apktool.jar d ContactsProvider.apk
Then I've added arrays.xml to /res/values folder builded tha .apk again:
Code:
java -jar apktool.jar b ContactsProvider ContactsProvider.apk
However replacing the original ContactsProvider.apk file gives me a weird error message about gapp process that crashes. I'm on JB 4.1.2 stock. Is this because the old .odex file? If yes, how can I regenerate it?
Hi, I have exactly the same problem. Did you solved it?
Sorry if this is an old topic but... I also have the same problem.
Not solved yet... :crying:

[HOW TO] MOD Files with APKTool

APKTool.zip (with Signed Files & Tools) has these files inside...
_____________________________________________________
! SGS3 (TMobile) Signed Files - framework-res (4.1.1)
! SGS3 (TMobile) Signed Files - SystemUI (4.1.1)
! Instructions + Info.txt
! Tool - 7-Zip v9.20 installer.exe
! Tool - Notepad++ 6.2.3 installer.exe
aapt.exe (from Android SDK Files {adt-bundle-windows-x86\sdk\platform-tools}) Android SDK
apktool.jar (APKTool v1.5.1 - Newest Release 12-28-2012) APKTool
*** Works on Windows x86 32 bit (NOT Tested on 64 bit)
Must have installed on Windows
__________________________
Java {I use Java Runtime Environment 1.7.0.10} Java 32bit
Notepad++ {Editing tool}
7-Zip (or WinRAR)
! Instructions + Info on Post #2
Download : APKTool.zip
Other Similar Helpful Links (that relate)...
Link #1- [How To] Use and install APKtool (v6ser)
Link #2- [How To} Setup use APKtool (RMarkwald)
Update: I check on this thread only once a week to answer questions. So be patient.
! Instructions + Info
NOTES
__________________________________________________________________
*** to "ADD Back SIGNED Files", open up newly created .apk with 7-Zip (or WinRAR) and add in (META-INF folder + AndroidManifest.xml)
.apk NEED'S to be SIGNED, .jar DOESN'T
Doesn't matter which set is used, as long as they are a MATCHING SET. (META-INF folder + AndroidManifest.xml)
APKTOOL LINES Explained
__________________________________________________________________
LINE apktool if framework-res.apk (Creates this file... C:\Documents and Settings\{your username}\apktool\framework\1.apk)
-that created "1.apk" file has "resources.arsc" inside.
-It's only Needed to run 1st time to register file with APKTool
LINE apktool d {file name} (De-Compiles to {file named folder -".apk" or +".out"})
LINE apktool b {folder name} (Compiles to {folder name}\dist)
Instructions : How to Use Apktool
__________________________________________________________________
1. Extract the "APKTool.zip" file to C:\ so that it looks this C:\APKTool
2. Extract "framework-res.apk" from your ROM's "system\framework" folder & put file into C:\APKTool
3. Copy any file(s) to edit to your C:\APKTool folder {xxx.apk, xxx.jar}
4. In Windows, get to your CMD box (in WinXP - Start Menu - Run - CMD)
CD:\apktool
apktool if framework-res.apk
{Example #1 - Editing framework-res.apk}
________________________________________
apktool d framework-res.apk
...{edit file(s) with Notepad++}
apktool b framework-res
...{add back SIGNED Files}
{Example #2 - Editing SystemUI.apk}
___________________________________
apktool d systemui.apk
...{edit file(s) with Notepad++}
apktool b systemui
...{add back SIGNED Files}
{Example #3 - Editing android.policy.jar}
_________________________________________
apktool d android.policy.jar
...{edit file(s) with Notepad++}
apktool b android.policy.jar.out
{Example #4 - Editing services.jar}
___________________________________
apktool d services.jar
...{edit file(s) with Notepad++}
apktool b services.jar.out
5. Finished !
I created this thread, as to not clutter up a ROM that I posted. Now I can help others who use it here!
ktmdave7 said:
APKTool.zip (with Signed Files & Tools) has these files inside...
_____________________________________________________
! SGS3 (TMobile) Signed Files - framework-res (4.1.1)
! SGS3 (TMobile) Signed Files - SystemUI (4.1.1)
! Instructions + Info.txt
! Tool - 7-Zip v9.20 installer.exe
! Tool - Notepad++ 6.2.3 installer.exe
aapt.exe (from Android SDK Files {adt-bundle-windows-x86\sdk\platform-tools}) Android SDK
apktool.jar (APKTool v1.5.1 - Newest Release 12-28-2012) APKTool
*** Works on Windows x86 32 bit (NOT Tested on 64 bit)
Must have installed on Windows
__________________________
Java {I use Java Runtime Environment 1.7.0.10} Java 32bit
Notepad++ {Editing tool}
7-Zip (or WinRAR)
! Instructions + Info on Post #2
Download : APKTool.zip
Other Similar Helpful Links (that relate)...
Link #1- [How To] Use and install APKtool (v6ser)
Link #2- [How To} Setup use APKtool (RMarkwald)
Click to expand...
Click to collapse
Thanks for this. Maybe people will stop demanding so much and start to experiment and learn themselves....
Thanks, I've been having trouble using apkmanager and needed to get a good setup with apktools for editing framework. I'll give this a go and a very special thanks for the instructions!
Noellenchris
Ok, for me I have to type apktool.jar d framework-res.apk and then I edited \values\arrays.xml and when I type apktool.jar b framework-res it created a build/apk folder but it is empty... Any ideas? I was trying jovy's tethering mod. I also ran aptool.jar if framework-res.apk first and verified the user folder was created with a file called 1.apk. Probably a noob question and I apologize in advance.
I have also previously reinstalled JRE for both normal and x64 versions plus ensured they are added to my path environment. I also added a JAVA_HOME entry and added the path in the values to my JRE path. Hmmm....that's about it I guess for now.
Thanks
dude thanks so much.
i needed someone to hold my hand through this. ill try it once im off work.
when I use this tool on (Windows XP 32bit), I get "Build" folder, when it tries to Compile (and it can be empty, if it tried to compile and got interrupted, or possibly a error)
I usually delete these 2 folders (build + dist)... (if they are there) right before a Re-compile.
\build = project folder of Re-compiling.
\dist = project Newly created .apk (or .jar) file goes.
Working with APKTool is easy... but you learn the most by using a lot and testing it yourself. I try many different methods and recheck the file if did 1 way, then I try another way and see if any thing is changed by another method (lots of comparing and confidence builds this way) Something that is tuff to explain in Text and in Instructions, but eventually, you have confidence in file comparisons and makes sense then.
*** Sometimes I see different Text words, that seam like could be error (but to me Error text, is when the CMD box filles with much extra TEXT and you can tell it messed up... NOT just 1 text line of code)
noellenchris said:
Ok, for me I have to type apktool.jar d framework-res.apk and then I edited \values\arrays.xml and when I type apktool.jar b framework-res it created a build/apk folder but it is empty... Any ideas? I was trying jovy's tethering mod. I also ran aptool.jar if framework-res.apk first and verified the user folder was created with a file called 1.apk. Probably a noob question and I apologize in advance.
I have also previously reinstalled JRE for both normal and x64 versions plus ensured they are added to my path environment. I also added a JAVA_HOME entry and added the path in the values to my JRE path. Hmmm....that's about it I guess for now.
Thanks
Click to expand...
Click to collapse
Found my issue, my edit on the arrays.xml was bad, I kept forgetting to add a /> at the end of the edit. duh. Glad it didn't compile and I ended up with some crazy errors on my phone... Lesson learned.
Noellenchris
I cant delete files from folder-apktool after decompile, compile, give permission but dont cant delete.I on win 8.How delete
very useful. Thanks!

[MOD][TUTORIAL] Customize NavigationBar height

Hello,
In this tutorial I´ll show you how to change the height of your NavBar.
This Tutorial works for any Rom!
Requirements
Text-Editor, e.g. Notepad++
WinRar/WinZip/Bandzip
Apktool (Download)
installed Java (Download)
JDK (Download)
root on your Nexus 4
a FileManager like ES File Explorer or Root Explorer
your framework-res.apk
some Cmd experience (just a little)
.. and some time/nerves
.. let´s go
Before getting started, make a Nandroid Backup (if you get Bootoop etc)!
The decompliling:
First you need to create a new folder like "C:\apktool". Download Apktool and extract the files to C:\apktool
copy your framework-res.apk to C:\apktool
open Cmd
navigate to your apktool (with "cd C:\apktool")
type in: java -jar apktool.jar if framework-res.apk [enter] (...installation of your framework)
type in: java -jar apktool.jar d framework-res.apk [enter]
finished!
Now you should have a new folder named framework-res. That´s your decompiled framework-res.apk.
The customizing of your NavBar height:
Navigate to /res/values
open dimens.xml in your Text-Editor
search the 3 lines which include navigation_bar_height, navigation_bar_height_landscape, und navigation_bar_width
type in your desired dpi number (for default it´s 48dpi)
CAUTION: At width, you should calculate the numeral proportion of the height to the width.
If you got that, save!
The (Re-)compiling:
Cmd (if you have not left it open, you must navigate again to C:\apktool
type in: java -jar apktool.jar b framework-res [enter]
The newly compiled framework-res.apk is located in C:\apktool\framework-res\dist
CAUTION: Copy the META-INF folder and the AndroidManifest.xml from your old framework-res.apk to your newly compiled one! Otherwise you´ll get Bootloop.
Now copy your framework-res.apk with a file manager to /system/framework. After that reboot immediately!
Finished! Have fun with your smaller/higher NavBar.
If there are some question, ask in this thread, I´ll help you as good as possible. Please don´t write me PM´s with support requests.
The "small-print":
Neither XDA-Developers.com, nor me are responible for any damages on your device!
I'm pretty sure this is the same for changing your Navigation Bar white or any color you want?
But instead I think its the navbar.xml that you need to edit correct?
Sent from my Nexus 4 using xda app-developers app
Right. But maybe it's in SysUI.apk, I don't know right now.
~ via Nexus
Flextrick said:
Hello,
In this tutorial I´ll show you how to change the height of your NavBar.
This Tutorial works for any Rom!
Requirements
Text-Editor, e.g. Notepad++
WinRar/WinZip/Bandzip
Apktool (Download)
installed Java (Download)
JDK (Download)
root on your Nexus 4
a FileManager like ES File Explorer or Root Explorer
your framework-res.apk
some Cmd experience (just a little)
.. and some time/nerves
.. let´s go
Before getting started, make a Nandroid Backup (if you get Bootoop etc)!
The decompliling:
First you need to create a new folder like "C:\apktool". Download Apktool and extract the files to C:\apktool
copy your framework-res.apk to C:\apktool
open Cmd
navigate to your apktool (with "cd C:\apktool")
type in: java -jar apktool.jar if framework-res.apk [enter] (...installation of your framework)
type in: java -jar apktool.jar d framework-res.apk [enter]
finished!
Now you should have a new folder named framework-res. That´s your decompiled framework-res.apk.
The customizing of your NavBar height:
Navigate to /res/values
open dimens.xml in your Text-Editor
search the 3 lines which include navigation_bar_height, navigation_bar_height_landscape, und navigation_bar_width
type in your desired dpi number (for default it´s 48dpi)
CAUTION: At width, you should calculate the numeral proportion of the height to the width.
If you got that, save!
The (Re-)compiling:
Cmd (if you have not left it open, you must navigate again to C:\apktool
type in: java -jar apktool.jar b framework-res [enter]
The newly compiled framework-res.apk is located in C:\apktool\framework-res\dist
CAUTION: Copy the META-INF folder and the AndroidManifest.xml from your old framework-res.apk to your newly compiled one! Otherwise you´ll get Bootloop.
Now copy your framework-res.apk with a file manager to /system/framework. After that reboot immediately!
Finished! Have fun with your smaller/higher NavBar.
If there are some question, ask in this thread, I´ll help you as good as possible. Please don´t write me PM´s with support requests.
The "small-print":
Neither XDA-Developers.com, nor me are responible for any damages on your device!
Click to expand...
Click to collapse
Thanks dude!
"CAUTION: At width, you should calculate the numeral proportion of the height to the width."
What's the scale? I set 36dpi both on height and landsape_hight, what's the width should I do? And I want the background of navigation to more smaller...
First of all, please delete fullquote Second: Proportion is like 48:42=36:x (x is width, just calculate). And third: Which background do you mean?
~ via Nexus
Hello,
if somebody is interested: I built a graphical Apktool for easier modding. Check it out: http://forum.xda-developers.com/showthread.php?t=2326604
~ via Nexus
I am attempting this but its not working.
I have apktool, java, and JDK installed.
When I run the commands I get this...
Code:
c:\apktool>java -jar apktool.jar if framework-res.apk
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x01080294 drawable/ic_ab_back_holo_dark, config=-xhdpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165
)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
5)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:39)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource
s.java:384)
at brut.androlib.Androlib.installFramework(Androlib.java:365)
at brut.apktool.Main.cmdInstallFramework(Main.java:193)
at brut.apktool.Main.main(Main.java:69)
c:\apktool>java -jar apktool.jar d framework-res.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x01080294 drawable/ic_ab_back_holo_dark, config=-xhdpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165
)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
5)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
ources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
a:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav
a:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
c:\apktool>
Any help would be great.
Or if someone wants to set my dpi to 24 that would be great as well. 24/24/24
framework-res.apk
Hello, I see. Maybe you should try this one here: http://forum.xda-developers.com/showthread.php?t=1755243
I created an AndroidApktool, which makes it easier to mod your files: http://forum.xda-developers.com/showthread.php?t=2326604
It helps you in this Tutorial much, too.
How do you move the old META-INF folder and AndroidManifest.xml into the new apk after it's already compiled?
With WinRar or 7zip etc.
I followed every step and I end up with same as paperecho, empty framework-res folder.
Do you get the same error as he?
Is it possible to set the alignment of the softkeys to the left side (especially for the Nexus 7/10)?
Thanks in advance
Sent from my Nexus 4 using xda premium
It's possible for sure, but I don't know how. Ive got no experience with tablets, sorry.
I'm also finished with empty folder framework-res..
Maybe you guys should download the newest apktool version and replace it with the one in my folder. I think this should solve your problem
Does anyone know what values they use to make the softkeys stay vertical when the phone is in landscape mode? I'm trying to do that with my tablets. Thanks
Works Great Nexus 4 and Nexus 10 Kitkat
In Android L, it didn't work in type in "java -jar apktool.jar if framework-res.apk" & "java -jar apktool.jar d framework-res.apk"...

[SHARE] Latest ApkTool

Hello everyone.
I want to share to you all latest ApkTool in a zip
Download : here
What's inside?
- Apktool v 2.0.0b9 > Source : https://code.google.com/p/android-apktool/
- BakSmali & Smali v2.0.3 > Source : https://code.google.com/p/smali/downloads/list
- SignApk from CM Signer
REQUIREMENTS :
- BRAIN
- Running Windows
- Java V7 here
How to use?
1. Open Command Prompt in the tool
2. List of Command:
> Install framework
Code:
apktool if framework-res.apk
> Decompile apk
Code:
apktool d name_of_apk.apk
or
Code:
apktool d -f name_of_apk.apk
> Compile apk
Code:
apktool b folder_of_apk
> Sign apk
Code:
signapk name_of_apk.apk name_of_apk_signed.apk
> Baksmali
Code:
java -jar baksmali-2.0.3.jar -o classout/ classes.dex
or
Drag and Drop classes.dex from file.jar to Quick-Baksmali
> Smali
Code:
java -Xmx512M -jar smali-2.0.3.jar classout/ -o new-classes.dex
or
Drag and Drop classout to Quick-Smali
​
K_TECH said:
Hello everyone.
I want to share to you all latest ApkTool in a zip
Download : here
What's inside?
- Apktool v 2.0.0b9 > Source : https://code.google.com/p/android-apktool/
- BakSmali & Smali v2.0.3 > Source : https://code.google.com/p/smali/downloads/list
- SignApk from CM Signer
REQUIREMENTS :
- BRAIN
- Running Windows
- Java V7 here
How to use?
1. Open Command Prompt in the tool
2. List of Command:
> Install framework
Code:
apktool if framework-res.apk
> Decompile apk
Code:
apktool d name_of_apk.apk
or
Code:
apktool d -f name_of_apk.apk
> Compile apk
Code:
apktool b folder_of_apk
> Sign apk
Code:
signapk name_of_apk.apk name_of_apk_signed.apk
> Baksmali
Code:
java -jar baksmali-2.0.3.jar -o classout/ classes.dex
or
Drag and Drop classes.dex from file.jar to Quick-Baksmali
> Smali
Code:
java -Xmx512M -jar smali-2.0.3.jar classout/ -o new-classes.dex
or
Drag and Drop classout to Quick-Smali
​
Click to expand...
Click to collapse
PERTAMAX
Waiting K_TECH TOOL .....
K_TECH said:
Hello everyone.
I want to share to you all latest ApkTool in a zip
Download : here
What's inside?
- Apktool v 2.0.0b9 > Source : https://code.google.com/p/android-apktool/
- BakSmali & Smali v2.0.3 > Source : https://code.google.com/p/smali/downloads/list
- SignApk from CM Signer
REQUIREMENTS :
- BRAIN
- Running Windows
- Java V7 here
How to use?
1. Open Command Prompt in the tool
2. List of Command:
> Install framework
Code:
apktool if framework-res.apk
> Decompile apk
Code:
apktool d name_of_apk.apk
or
Code:
apktool d -f name_of_apk.apk
> Compile apk
Code:
apktool b folder_of_apk
> Sign apk
Code:
signapk name_of_apk.apk name_of_apk_signed.apk
> Baksmali
Code:
java -jar baksmali-2.0.3.jar -o classout/ classes.dex
or
Drag and Drop classes.dex from file.jar to Quick-Baksmali
> Smali
Code:
java -Xmx512M -jar smali-2.0.3.jar classout/ -o new-classes.dex
or
Drag and Drop classout to Quick-Smali
​
Click to expand...
Click to collapse
Is this your work bro? I'd been using this one since i started modifying .apk files Advanced ApkTool v2.0.0 for Windows. It's very easy to use
dec0der said:
Is this your work bro? I'd been using this one since i started modifying .apk files Advanced ApkTool v2.0.0 for Windows. It's very easy to use
Click to expand...
Click to collapse
Yep, this is my work
K_TECH said:
Yep, this is my work
Click to expand...
Click to collapse
Ok, well done! I'll try it sometimes :good:
can you tell how can I use this jar file because there no place where you can put your apk to decompile. or can you create the tool to decompile apk like previous apk tool.
faizan.rupani said:
can you tell how can I use this jar file because there no place where you can put your apk to decompile. or can you create the tool to decompile apk like previous apk tool.
Click to expand...
Click to collapse
Just take classes.dex inside file.jar... then drag & drop in Quick-Baksmali
Thanks Om :good: I try this one tool
nice work sir

[Tool] Samloader (SamFirm / Frija replacement)

Hello,
I recently wanted to download some firmware for my Samsung device, but I realized that there is no 100% open source program to do so. In fact, all the tools that claim to do so require a library that is packed by Themida (so it is difficult to check what this might be doing), in order to authenticate to the server. This is a native DLL, meaning that it is only compatible with Windows x86. Additionally, many of these tools are actually using stolen decompiled code from SamFirm, which, apart from being possibly illegal, means they would be difficult to maintain and run slowly.
So, I decided to reverse engineer Smart Switch to figure out exactly how the download is taking place, and wrote a cross-platform tool that does this without using the Windows DLL that the other tools have, making it compatible with Linux and MacOS. I also realized that the newer versions are actually using a new version of the authentication algorithm, meaning possibly at some point the old tools might stop working as Samsung drops support for it.
You can find it at:
Code:
https://github.com/nlscc/samloader
To install, go to the downloaded repository and run:
Code:
pip3 install .
See the README or look at the code for usage. You might want to know that my old github account, nm111, was unfortunately deleted, and I lost access to my old XDA account. You can see the verified email is the same however.
Feel free to use the algorithms I figured out in your own code, so long as you don't use it in proprietary programs. It is licensed under GNU GPLv3 or later.
This works for all phones, not just S10+, but I couldn't find a better forum and this is where Frija posted.
Thank you. This is pretty cool. I downloaded it now and will check it out later tonight.
Can you please do the same thing for the emergency recovery option.
Will you update your tool if it still working in the future?
This is going to be super useful for me (ATM I'm using SamFirm with wine/proton and my setup breaks often, and GUI gets in my way) since I need to download many firmwares for my reverse-engineering, so thanks!
Late for this great find, thanks to the xda article, really needed a solution outside Windows.
PS, what are the chances for spoofing a request, i.e, trying to fetch only the latest OTA from a certain CSC?
@nn000 Glad this made the front page. I have used this for a little wile now and it works great
@phhusson
This will work on windows if you use the WSL and install Ubuntu. You could probably get this working under Cygwin too.
Great work mate. Helps to gather various download. Unfortunately enough Samshung does not allow older firmware via server fetching..
Hi, thanks for this great tool as samfirm and frija are slow to download firmwares. I am trying to download firmware for galaxy watch. I can only search the firmware version but when trying to download it there is error:
filename = root.find("./FUSBody/Put/BINARY_NAME/Data").text
AttributeError: 'NoneType' object has no attribute 'text'
is there any way to modify this tool to download watch firmware too?
You are genius! Thanks for this tool. Can't wait to try this :good:
nn000 said:
Feel free to use the algorithms I figured out in your own code, so long as you don't use it in proprietary programs. It is licensed under GNU GPLv3 or later.
This works for all phones, not just S10+, but I couldn't find a better forum and this is where Frija posted.
Click to expand...
Click to collapse
Brilliant work!
Thank you very much for developing this tool and removing our dependency on Windows for such basic functionality as checking for and downloading firmware updates. Thank you also for having the foresight and generosity to publish this under the GPL.
This tool will receive a huge amount of use on my machines.
Thanks in advance, I don't know how to download the program, they would be so kind to give me a link. Thank you very much
I tried installing with the command found in the readme file
Code:
pip3 install git+https://github.com/nlscc/samloader.git
But when I type
Code:
$ samloader --help
It says "samloader: command not found"
Beautiful. Thanks for this tool!
4929york said:
I tried installing with the command found in the readme file
Code:
pip3 install git+https://github.com/nlscc/samloader.git
But when I type
Code:
$ samloader --help
It says "samloader: command not found"
Click to expand...
Click to collapse
install python first, before try
rikipy said:
install python first, before try
Click to expand...
Click to collapse
Python was installed.
How to set download location(out) in the command line
samloader download [firmware version] [phone model] [region] [out]
I tried to put \Download but it's not in the folder.
I installed python39 and git on Win10 but sill get errors
Code:
pip3 install git+https://github.com/nlscc/samloader.git
Collecting git+https://github.com/nlscc/samloader.git
Cloning https://github.com/nlscc/samloader.git to c:\users\danie\appdata\local\temp\pip-req-build-s8l3kwc6
Collecting clint
Using cached clint-0.5.1.tar.gz (29 kB)
Collecting pycryptodomex
Using cached pycryptodomex-3.9.8.tar.gz (15.6 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\danie\\AppData\\Local\\Temp\\pip-install-vvk574_e\\pycryptodomex\\setup.py'"'"'; __file__='"'"'C:\\Users\\danie\\AppData\\Local\\Temp\\pip-install-vvk574_e\\pycryptodomex\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\danie\AppData\Local\Temp\pip-pip-egg-info-3i7fsfut'
cwd: C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\
Complete output (20 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\setup.py", line 457, in <module>
set_compiler_options(package_root, ext_modules)
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\compiler_opt.py", line 341, in set_compiler_options
clang = compiler_is_clang()
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\compiler_opt.py", line 251, in compiler_is_clang
return test_compilation(source, msg="clang")
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\compiler_opt.py", line 82, in test_compilation
objects = compiler.compile([fname], extra_postargs=extra_cc_options)
File "c:\program files\python39\lib\distutils\_msvccompiler.py", line 323, in compile
self.initialize()
File "c:\program files\python39\lib\distutils\_msvccompiler.py", line 220, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\program files\python39\lib\site-packages\setuptools\msvc.py", line 314, in msvc14_get_vc_env
return _msvc14_get_vc_env(plat_spec)
File "c:\program files\python39\lib\site-packages\setuptools\msvc.py", line 268, in _msvc14_get_vc_env
raise distutils.errors.DistutilsPlatformError(
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
Testing support for clang
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Viper780 said:
I installed python39 and git on Win10 but sill get errors
Code:
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
Click to expand...
Click to collapse
The problem is right there in front of you: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
It's pretty annoying when there are requirements and you find out about them afterwards.
Would be good to write them to the install instructions
- python3
- git
- Buildtools for MS C++
Thanks for this, it works well! Cheers..
:highfive:
Example:
Install
Code:
pip3 install git+https://github.com/nlscc/samloader.git
Check update
Code:
samloader -m SM-G975F -r NZC checkupdate
Download
Code:
samloader -m SM-G975F -r NZC download -v G975FXXS9DTI8/G975FOXM9DTI8/G975FXXS9DTI8/G975FXXS9DTI8 -O /home/hinxnz/Downloads
Decrypt
Code:
samloader -m SM-G975F -r NZC decrypt -v G975FXXS9DTI8/G975FOXM9DTI8/G975FXXS9DTI8/G975FXXS9DTI8 -V 4 -i SM-G975F_1_20200921075534_uii8oafhih_fac.zip.enc4 -o SM-G975F_1_20200921075534_uii8oafhih_fac.zip
---------- Post added at 10:52 PM ---------- Previous post was at 10:41 PM ----------
Viper780 said:
I installed python39 and git on Win10 but sill get errors
Code:
pip3 install git+https://github.com/nlscc/samloader.git
Collecting git+https://github.com/nlscc/samloader.git
Cloning https://github.com/nlscc/samloader.git to c:\users\danie\appdata\local\temp\pip-req-build-s8l3kwc6
Collecting clint
Using cached clint-0.5.1.tar.gz (29 kB)
Collecting pycryptodomex
Using cached pycryptodomex-3.9.8.tar.gz (15.6 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\danie\\AppData\\Local\\Temp\\pip-install-vvk574_e\\pycryptodomex\\setup.py'"'"'; __file__='"'"'C:\\Users\\danie\\AppData\\Local\\Temp\\pip-install-vvk574_e\\pycryptodomex\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\danie\AppData\Local\Temp\pip-pip-egg-info-3i7fsfut'
cwd: C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\
Complete output (20 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\setup.py", line 457, in <module>
set_compiler_options(package_root, ext_modules)
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\compiler_opt.py", line 341, in set_compiler_options
clang = compiler_is_clang()
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\compiler_opt.py", line 251, in compiler_is_clang
return test_compilation(source, msg="clang")
File "C:\Users\danie\AppData\Local\Temp\pip-install-vvk574_e\pycryptodomex\compiler_opt.py", line 82, in test_compilation
objects = compiler.compile([fname], extra_postargs=extra_cc_options)
File "c:\program files\python39\lib\distutils\_msvccompiler.py", line 323, in compile
self.initialize()
File "c:\program files\python39\lib\distutils\_msvccompiler.py", line 220, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\program files\python39\lib\site-packages\setuptools\msvc.py", line 314, in msvc14_get_vc_env
return _msvc14_get_vc_env(plat_spec)
File "c:\program files\python39\lib\site-packages\setuptools\msvc.py", line 268, in _msvc14_get_vc_env
raise distutils.errors.DistutilsPlatformError(
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
Testing support for clang
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Click to expand...
Click to collapse
Now install linux

Categories

Resources