This is a program my friend and me created to improve our programming skill
and to make decompiling dex files a breeze.
How to use?
1) Start DexManager.exe
2) Place classes.dex in same folder as program and hit decompile
3) Edit files in the new folder "out"
4) Hit recompile, after recompile is complete it will be in the root directory, named "classes.dex".
Done!
Download and screenshot in attachments
Change log
Beta5
Added:
-Higher heap values to support larger files (512MB heap)
-optimised code a little
-Progress bar does not mis-lead values
Release 1
Added:
Added kernel flasher (fastboot)
Now has clear temp (Clears all temp files program created)
Requirements:
-5mb of System memory (FREE MEMORY)
-Internet connection for the updates.
To come:
Customizable config
You will now be able to receive the update via the program.
you will receive a notifacation when an update is avliable.
Thank you very much, plus easy to use, well
I shall update this later. Updater and more configurable for those that dont have PATH for Java installed.
-Scriptr
Thanks bro. I will give it a try.
Please report any bugs you encounter to me or Slethen,
thanks.
Update 407 (beta 5.1)
-Reads a config, customizable.
-Easier GUI
I'm open for features that could be added
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Thread Index:
Post 1 - Information. PLEASE READ!
Post 2 - Usage and porting info.
Post 3 - Features status. To request features use the tab at the top of the thread.
Post 4 - Ported themes and links.
Click to expand...
Click to collapse
When posting I only ask of 3 simple requirements.
1) Please search or read first. If the question has been asked/answered i will not reply.
2) Post any log extracts and pictures within the "hide" tags to keep the thread clutter free.
3) Do not quote posts in full. If you have to, use the hide tags
What is CMX?
This is a batch script that runs on Windows to port CM11 themes to work with XTheme/HKTheme engine.
Unless porting png's solely, this is designed to take most of the leg work out of porting themes across, so expect some errors when working with the xml's. It is difficult to encompass all the different CM11 themes and quirks they bring with them without downloading and testing each and every theme available.
Ive tried to make the script as unobtrusive and self sufficient as possible with minimal user input in automatic mode.
If you include xml's, some manual labour may be necessary depending on the theme so expect to get your hands dirty. From the themes I've tested with xml's included, 50% have ported straight through and 50% have failed and required some extra attention.
When the script runs through the asset configuring phase (png's/xml's) it will open up a window for each package folder one at a time. One folder must finish processing before the other begins.
Requirements:
Java development kit (jdk) -Link. Installed and in your environment path -Link
CM11 theme to port Take your pick.
The ability to solve apktool log errors. I will help, but I will not spoonfeed!!.
Time Taken:
Setting up 10 minutes (inc. Java install)
Porting (depending on theme)
png's only- 2 minutes.
Difficulty- 2/10. Common error- 9 patch faults.
inc. xml's- 5 minutes.
Difficulty- Dependant on theme. Common error- xml faults.
Basically my script will work as follows when ran and "Automatic" is selected:
Set up required folders.
Automatically detect the apk in "CMThemeIn" folder and set it as the project or prompt the user to insert an apk.
Decompile set theme.
Create all the redirection.xml's required.
Cycle through the
Code:
assetsoverlays*InsertPackageNameHere*resdrawable
folders, and move them to the corresponding folder in the XTheme folder.
Gather xmls from res "drawable" and values" and insert appropriate redirections for that package name.
Ask the user to input a package name in AndroidManifest.xml.
Ask the user to input a theme, app, author and original themer name in strings.xml.
Compile, sign, zipalign and then place the output in "XThemeFinished" folder" ready for installing.
Currently the ports are best served with AOSP but there is an option to add redirections for TouchWiz and Semc (JellyBean 4.2 framework-res.apk).
The script offers you the option to include xml's or not.
Depending on the android version you are using certain xml's may not work or cause conflicts resulting in SOD's, force closes and bootloops.
To recover from a bootloop read the FAQ below.
Currently I wont be porting boot animations and fonts. Although I may add an option to port boot animations etc to a flashable zip.
Finally, the ported themes will NEVER look like the CM counterpart due to the Xposed limitation of themeing "styles.xml". This is not a restriction of the CMX tool, theme .apk or the theme engine
To find out more about the structure and for a better understanding go here and read more:
http://forum.xda-developers.com/showthread.php?t=2334637
Click to expand...
Click to collapse
FAQ
Q). It says Java not found, how do I add the Java path?
A). Check "What is CMX?" for a guide.
Q). The script fails in auto, what's wrong?
A). Read the log.txt and assets,txt in tools and look for any errors, if you cannot understand them then post your log either as a .txt file or as a snippet wrapped in hide tags as shown above.
Q). Whats the difference between CM10 and CM11 themes?
A). All the drawable resources for CM11 themes now reside in "assetsoverlays" and not "resdrawables" as they previously did. Also they no longer use redirection xml's.
Due to this change, XTheme and HKTheme engines do not support CM11 themes...until now.
Q). Why doesn't the theme look like the CM11 counterpart?
A). This is due to styles.xml not being supported and xml restrictions if not included.
Q). I've got a bootloop, how can I fix it?
A). Go and follow the instructions here: http://tinyurl.com/nm4eups
Q). Why does it take longer when porting than it used to?
A). I have muted the opening of seperate windows. Each folder in the CM11Themeassets directory is processed one at a time to prevent errors. This must be done correctly or this will have detrimental effects to the xml's being created and
cause compiling errors.
Q). What are the duties of the folders?
A).
"tools": Contains all the resources needed to help porting.
"CMThemeIn": This is the folder you place your desired CM theme to be ported.
"CMThemeOut": When apktool decompiles the apk from "CMThemeIn", this is the source/reference for porting.
"XTheme": Contains the resources from "CMThemeOut" that have been configured and modified to be X/HKTheme compatible.
"XThemeFinished: This folder is used to store the newly created, X/HKTheme compatible apk.
Q). How do I remove "ON" and "OFF" from the switches?
A). See this post: Link.
Q). I get "invalid resource directory name" in the error log, how do I fix it?
A). Something has broken the script process and caused the creation of unnecessary folders. Goto "XThemeXThemeBase.apkres" and remove the folders detailed in the log.
Example: "XThemeXThemeBase.apkresdrawable-SomeRandomName" delete "SomeRandomName" folder
Click to expand...
Click to collapse
Credits:
@brut.all, @iBotPeaches and @JesusFreke for apktool and smali/baksmali respectively.
@nhnt11 for his xml generator.jar.
@existz and @xIC-MACIx for letting me test on their themes.
@rovo89, @ruqqq and @hdbk1986 for Xposed, Xtheme and HKTheme respectively.
@pierx for TouchWiz 4.2 framework-res redirections.
All the beta-testers.
Click to expand...
Click to collapse
XDA:DevDB Information
CMX, Tool/Utility for all devices (see above for details)
Contributors
dully79
Version Information
Status: Beta
Current Beta Version: v3
Beta Release Date: 2014-09-15
Created 2014-08-29
Last Updated 2014-09-27
Using the script and porting.
Instuctions:
Download the zip.
Downloads can be found in the "Download" tab above.
Or if your browsing via mobile you can use this mirror: CMX beta v3
Unzip the "CMX" folder to a directory containing no spaces or rename the folder.
Any spaces within the containing folder will result in the jar files not being able to run.
BAD= C:/Users/My name/desktop/CMX beta T1000
GOOD= C:/Users/My_name/desktop/CMX_beta_T1000
I've also included Jarsigner.exe in the download. Move it to your "Java\bin" folder if you do not have it installed, otherwise you can delete it.
Start ".RunMe.bat".
Your now presented with 2 main options with regards to porting.
Automatic.
Manual.
I've covered automatic above in "What is CMX" so i'll explain manual.
Basically all the options in the manual menu (other than options 0 and 1) are what the automatic mode cycles through in the same order. This can be useful if you receive any errors and want to carry on from where automatic failed.
The options are self explanatory but I'll give basic details:
Choose apk. Can be used to override the automatic built in selection. Useful if you have a number of apks in the "CMThemeIn" folder, although it is recommended to just keep one apk to prevent possible bugs.
Decompile apk. Decompiles the chosen apk for assets extraction.
Create main redirections.xml. Creates the main redirection xml containing all the package redirections.THIS MUST RUN BEFORE 4+5.
Configure CM11 xml's. Configures and ports CM11 xml's to work with X/HKTheme.
Configure CM11 png's.Create package (app) redirections.xml's and copies all the images to the appropriate folders in XThemeBase.apk inc. theme icon and wallpaper.
Set package and strings.xml name. Asks the user to declare the new package name in AndroidManifest.xml. Ideally use the same as the theme but with an "X" prefixing. e.g "com.mac.theme.gem" becomes "Xcom.mac.theme.gem". Also asks the user to to set the new app, theme, porter and original author name.
Compile. Compiles XThemeBase.apk into the ported theme apk.
Sign and zipalign. Signs and zipaligns the newly compiled apk ready for installation. The key used is market compatible generated by me.
Return to main menu. Returns to the initial screen.
When porting a theme try to name it so it is easy to differentiate from the original.
Example.
Original package and app name:
com.mac.theme.gem
Gem Flat
Ported with png's only:
X.com.mac.theme.gem
X Gem Flat
Ported with xml's:
X.com.mac.theme.gem.inc
X Gem Flat inc
How to port the custom launcher icons?
To use the new custom icon porter option, you will find it under option 2 (Manual) and 9. Two pre-requisites must be met:
You must have decompiled the apk in CMThemeIn prior to choosing this option.
Set the AndroidManifest name or strings. If you have not, or closed the tool since porting the main theme, you can define them using option 2 (Manual) and 6.
If the theme you are porting doesnt support a certain density, you can use this jar tool to create them:
https://github.com/redwarp/9-Patch-Resizer/releases
ONLY CREATE DENSITIES LOWER THAN THE INPUT!.
Porting themes? Then read this:
If you are going to port a theme and share it, you MUST obtain permission from it's creator/author.
Not only is this good community manners it is XDA forum rules.:highfive:
XDA Rules
12. Using the work of others.
If you are developing something that is based on the work of another Member, you MUST first seek their permission and you must give credit to the member whose work you used. If a dispute occurs about who developed / created a piece of work, first try to settle the matter by private message and NOT in open forum. If this fails, you may then contact a Moderator and provide clear evidence that the work was created by you.
Click to expand...
Click to collapse
Feature status and changelog
Feature status:
Auto porting of xml's- xml's need the correct redirection prefix adding to the resource direction inside the file. This can be done manually if required (NOT RECOMMENDED). Complete.
Redirections for OEM ROM's e.g. TouchWiz, Semc etc. Complete.
Porting of app themed icons- This is something i will add in to port to a separate apk. Complete.
Porting of boot animations, fonts, ringtones etc. Possibly to a flashable zip.
styles.xml- Broken inside Xposed.
Changelog:
29/08/14
First beta release.
31/08/14 beta v1.1
Lots of code cleaning and bug fixes inc. message suppressing.
The script now searches for installed framework-res.apk, if none is found it will install the provided apk automatically.
If you input a CMTheme.apk that isnt a true CM11 Theme (doesn't use assets\overlays) you will receive a warning in the console and the decompiled folder will be removed.
"tools" folder contains:
framework-res.apk from CM11 for Mako.
aapt from android sdk build tools 4.4#
My updated version of the XTheme sample.apk A.K.A XThemeBase.apk
15/09/14 beta v3
Added xml porting support.
Updated XThemeBase.apk to include drawable and xml folder.
Lot's of code cleaning and bug fixes.
Removed opening of multiple windows. This results in a longer but cleaner process.
Added Jarsigner.exe to download.
Some other stuff.
23/09/14 beta v4
Removed jarsigner.
Removed framework-res.apk to reduce zip size (added to CMX folder in post #4 if required).
Added framework-res.apk redirections (4.2 Jelly Bean) for Sony and Samsung (thanks @pierx) devices.
Added the ability to port custom icons and wallpaper.If supported by the ported theme to a standalone Apex/Nova theme.apk. Manual option 9.
Fixed bug where invalid resource directories where created in XTheme.
Cleaned and re-wrote some code inc. an extra log for xml and png porting. This can be found in tools\ called assets.txt
24/09/14 beta v4.1
Added custom AndroidManifest and strings.xml to icon.apk porter. Uses values defined for main theme port. Can be redefined by selecting option 2 (Manual) and 6.
Ported CM11 Themes
The themes are split into 2 categories:
Drawables port.
Full port.
The reason for being split is because devices on older android versions (<4.3) might bootloop if using a fully ported 4.4 theme with a conflicting xml.
To cancel any bootloops you can disable Xposed via the flashable zip provided in rovo's Xposed thread, or by using adb shell delete in recovery. See faq above.
Layout:
[Supoorted densities] Name of theme- Created by author
Original thread- Link
Density key:
H=hdpi. X=xhdpi. XX=xxhdpi
Drawables only themes:
[X~XXHDPI] Gem Flat free v2.6.1- Created by @xIC-MACIx
Original thread-http://tinyurl.com/o3ofx5h
---------------------------------------------------------------------------------------
[XXHDPI] Android L-Mint v1.7- Created by @existz
Original thread-http://tinyurl.com/p2ulk26
Full port themes:
[X~XXHDPI] Gem Flat free v2.6.1- Created by @xIC-MACIx
Original thread-http://tinyurl.com/o3ofx5h
---------------------------------------------------------------------------------------
[XXHDPI] Android L-Mint v1.7- Created by @existz
Original thread-http://tinyurl.com/p2ulk26
---------------------------------------------------------------------------------------
[XXHDPI] Flats free v4/6 @rayford85
Original thread-http://tinyurl.com/mxf5jgb BEWARE.There is a bug when opening settings !
PLEASE NOTE: These ports are intended as a preview to what the tool can do. I will not be maintaining them or fixing bugs.
Downloads:
Click the Icon or the link.
Everything CMX related inside.
http://tinyurl.com/lv7cpqx
If you want to post ported themes in this thread then feel free and i will link to your post from here.
Please obtain the authors permission to port and distribute.
Many thanks to the authors of the themes for allowing me to port them.
If you download their theme you should go to the link above and thank them.:good:
First!!!!!!!.. Is it possible to make this an app for android? That would be great
Juansegovia20 said:
First!!!!!!!.. Is it possible to make this an app for android? That would be great
Click to expand...
Click to collapse
You win a prize for premature jubilation.
It probably is possible. If the script was converted from batch to .sh to run on your device, you could package it into an apk... But I won't be doing it. Creating this took me long enough. Plus I don't have the skills.
Ideally there would be an update to X/HKTheme or a new module developed. In the mean time this is the next best option.
dully79 said:
You win a prize for premature jubilation.
It probably is possible. If the script was converted from batch to .sh to run on your device, you could package it into an apk... But I won't be doing it. Creating this took me long enough. Plus I don't have the skills.
Ideally there would be an update to X/HKTheme or a new module developed. In the mean time this is the next best option.
Click to expand...
Click to collapse
I was just asking about the app because some of us don't have the knowledge do do all of this... but thanks, i hope someone here will accept requests to port the themes
Juansegovia20 said:
I was just asking about the app because some of us don't have the knowledge do do all of this... but thanks, i hope sometime here will accept requests to port the themes
Click to expand...
Click to collapse
There is no knowledge required.
All you need is:
Java installed on your Windows system.
A CM11 theme of your choice placed in "CMThemeIn"
Run the script, select option 1 (Automatic) and follow the prompts (4 of).
Install the resulting signed file in "XThemeFinished".
It takes 2 minutes literally. Everything is automated to make it as noob friendly as possible.:good:
If you have Windows give it a try and you'll be surprised how easy it is.
dully79 said:
There is no knowledge required.
All you need is:
Java installed on your Windows system.
A CM11 theme of your choice placed in "CMThemeIn"
Run the script, select option 1 (Automatic) and follow the prompts (4 of).
Install the resulting signed file in "XThemeFinished".
It takes 2 minutes literally. Everything is automated to make it as noob friendly as possible.:good:
If you have Windows give it a try and you'll be surprised how easy it is.
Click to expand...
Click to collapse
Awesome, thanks, i tried yesterday but i was confused, with this new instruction things look way easier,lol, I'll report back if i successfully managed to port a theme, thank you Sir!!
dully79 said:
and follow the prompts (4 of)
Click to expand...
Click to collapse
can u please explain this ?
theme is loaded and recognized, then i select 1 for automatic, then ?
i cannot seem to get anything as a result in the XTheme folder
eurochild said:
can u please explain this ?
theme is loaded and recognized, then i select 1 for automatic, then ?
i cannot seem to get anything as a result in the XTheme folder
Click to expand...
Click to collapse
There are only 4 prompts contained in the automatic option
Set AndroidManifest.xml "package name".
Set strings.xml "app name".
Set strings.xml "theme name".
Set strings.xml "copyright name". This is the original author.
What does the log say?
dully79 said:
There are only 4 prompts contained in the automatic option
Set AndroidManifest.xml "package name".
Set strings.xml "app name".
Set strings.xml "theme name".
Set strings.xml "copyright name". This is the original author.
What does the log say?
Click to expand...
Click to collapse
i dont get these prompts when on automatic mode
log
--------------------------------------------------------------------------
|30-Aug-14 -- 16:33:48.84|
--------------------------------------------------------------------------
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) Client VM (build 24.65-b04, mixed mode, sharing)
Error: Unable to access jarfile C:\Users\admin\Desktop\CMX-
The system cannot find the path specified.
Error: Unable to access jarfile C:\Users\admin\Desktop\CMX-
Error: Unable to access jarfile C:\Users\admin\Desktop\CMX-
eurochild said:
i dont get these prompts when on automatic mode
log
--------------------------------------------------------------------------
|30-Aug-14 -- 16:33:48.84|
--------------------------------------------------------------------------
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) Client VM (build 24.65-b04, mixed mode, sharing)
Error: Unable to access jarfile C:\Users\admin\Desktop\CMX-
The system cannot find the path specified.
Error: Unable to access jarfile C:\Users\admin\Desktop\CMX-
Error: Unable to access jarfile C:\Users\admin\Desktop\CMX-
Click to expand...
Click to collapse
Its not accessing apktool in the "tools" folder.
Try removing the "-" from CMX- and try again.
Can u create an app to Port themes?
READ!
IVIanuu said:
Can u create an app to Port themes?
Click to expand...
Click to collapse
Seriously?!
The thread only has 11 posts and 2 of them are regarding your question.
Please read or search before posting.
http://forum.xda-developers.com/announcement.php?f=1507:
1. Search before posting.
Use one of our search functions before posting or creating a new thread. Whether you have a question or just something new to share, it's very likely that someone has already asked that question or shared that news.
Click to expand...
Click to collapse
Juansegovia20 said:
First!!!!!!!.. Is it possible to make this an app for android? That would be great
Click to expand...
Click to collapse
dully79 said:
You win a prize for premature jubilation.
It probably is possible. If the script was converted from batch to .sh to run on your device, you could package it into an apk... But I won't be doing it. Creating this took me long enough. Plus I don't have the skills.
Ideally there would be an update to X/HKTheme or a new module developed. In the mean time this is the next best option.
Click to expand...
Click to collapse
post #14 @dully79 i'm on my mission right now
Thanks
dully79 said:
Its not accessing apktool in the "tools" folder.
Try removing the "-" from CMX- and try again.
Click to expand...
Click to collapse
same issue here even after removing the "-"
Rename the folder from "CMX- Betav1" to "CMX", the space will be throwing it out.
Everything works great.
Nicely done
Regards
everything goes well up until signing, zipaligning and recompilation.
Log:
Code:
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Panna\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 15, -F, C:\Users\Panna\AppData\Local\Temp\APKTOOL5025674521367376442.tmp, -0, arsc, -I, C:\Users\Panna\apktool\framework\1.apk, -S, D:\dRO\CMX\XTheme\XThemeBase.apk\res, -M, D:\dRO\CMX\XTheme\XThemeBase.apk\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 15, -F, C:\Users\Panna\AppData\Local\Temp\APKTOOL5025674521367376442.tmp, -0, arsc, -I, C:\Users\Panna\apktool\framework\1.apk, -S, D:\dRO\CMX\XTheme\XThemeBase.apk\res, -M, D:\dRO\CMX\XTheme\XThemeBase.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 15, -F, C:\Users\Panna\AppData\Local\Temp\APKTOOL5025674521367376442.tmp, -0, arsc, -I, C:\Users\Panna\apktool\framework\1.apk, -S, D:\dRO\CMX\XTheme\XThemeBase.apk\res, -M, D:\dRO\CMX\XTheme\XThemeBase.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at brut.util.OS.exec(OS.java:84)
... 7 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 11 more
Introduction
You probably know already that starting from Android 5.x (Lollipop) compiled roms (aosp,cm,stock) are not compressed anymore the way they used to be on previous android versions. On previous versions all content inside /system folder that has to be extracted within our device was either uncompressed (simple /system folder inside our flashable zip) or compressed in a system.img file, which it is a ext4 compressed file; both of these, anyway, were readable and we could see all system files (app,framework, etc).
The problem comes in >=5.0 versions, this method is not used anymore. Why? Because roms started to be always larger, so it is necessary to compress them even more.
Note : Introduction was taken from here : https://forum.xda-developers.com/an.../how-to-conver-lollipop-dat-files-to-t2978952 by @xpirt so thanks to him
So in order to save myself and others who most port Custom & Stock Roms, i decided to use some part of my time to write this script for easy work done.
What this script does :
It basically Unpack and Repack system.new.dat alongside with file_context.bin convertion which is seen in android 7.0/7.1
ITS USAGE:
NOTE
First Clone the repo.
Make sure that Android_System_Extraction_and_Repack_Tool is located at Desktop
Run "Xtrakt" from it's location in terminal
Copy "file_contexts.bin" from your Rom to "file_context_zone" folder
Use "f" from menu to convert "file_contexts.bin" to text readable "file_contexts"
Copy : system.new.dat, system.transfer.list & file_contexts to "convert-dat" folder.
Use "i" from menu to unpack, which the output will be name as "rom_system" for modifications of apks & files.
Use "y" from menu to repack, which the complete new "system.new.dat", "system.patch.dat" & "system.transfer.list" will be located at "Finish-new.dat" folder
Done !
EXAMPLE:
Again , Make sure that Android_System_Extraction_and_Repack_Tool is located at Desktop
In your terminal, type the following to start the script:
Code:
git clone https://github.com/iykequame/Android_System_Extraction_and_Repack_Tool.git
mv android_system_extraction_and_repack_tool ~/Desktop/
cd ~/Desktop/android_system_extraction_and_repack_tool/
./Xtrakt
OR
Code:
Double-click the Xtrakt file and choose "Run in Terminal" if your OS supports it.
##ALERT!!!##
sudo is requested in the script.
How To Get It {Tool]
Clone from one of the below ;
From GITHUB :
Code:
git clone https://github.com/iykequame/Android_System_Extractrion_and_Repack_Tool.git
From BITBUCKET :
Code:
git clone https://[email protected]/zac6ix/android_system_extraction_and_repack_tool.git
Or
Download zip
AFH
GIT-RELEASE
Sources :
Android_System_Extraction_and_Repack_Tool
GITHUB
BITBUCKET
Threads :
sdat2img 1.0 - img2sdat 1.2
For file_context.bin conversion by: Pom Kritsada @ MTK THAI Developers.
Credit to :
@xpirt
@SuperR.
-all xda threads which helped
-Android Matrix Development - here
-Nana Yaa for her time.
hi, your tool sounds good but it seems it doesnt work.
i press f and nothing happen ..
Use "f" from menu to convert **"file_contexts.bin"** to text readable **"file_contexts"**
Blackball said:
hi, your tool sounds good but it seems it doesnt work.
i press f and nothing happen ..
Use "f" from menu to convert **"file_contexts.bin"** to text readable **"file_contexts"**
Click to expand...
Click to collapse
Sorry for the Late reply !
Directories linking has been fix .
You can go ahead and try again
Thanks for sharing!
Don't work
When i press i ..Don't work.say file missing.but i already put all file..Please help meView attachment 4249470
Doesn't do anything with file_context.bin, doesn't even check if file is there.
oreo supported???
I am getting this error on repacking:-
Code:
WARNING! WARNING!! WARNING!!!
Please Check & Trace Where Errors.
There Is NO rom_system found
file_contexts -->> Missing !
Android SDK -->> not detected !
Please help.
Black_J said:
I am getting this error on repacking:-
Code:
WARNING! WARNING!! WARNING!!!
Please Check & Trace Where Errors.
There Is NO rom_system found
file_contexts -->> Missing !
Android SDK -->> not detected !
Please help.
Click to expand...
Click to collapse
I see that this thread is not supported.
Anyways, I observed that the tool works for file_contexts.bin but not for other options.
So , I followed the other link in the thread for individual commands and was successful.
Works perfectly on Android Pie! Have to do some tweaks, PM me if anyone wants to make this work for Android Pie.
Hi all folks,
I just want to introduce apk.sh (https://github.com/ax/apk.sh).
It is a Bash script that makes reverse engineering Android apps easier, automating some repetitive tasks like pulling, decoding, rebuilding and patching an APK.
Features​apk.sh basically uses apktool to disassemble, decode and rebuild resources and some bash to automate the frida gadget injection process. It also supports app bundles/split APKs.
Patching APKs to load frida-gadget.so on start.
Support for app bundles/split APKs.
Disassembling resources to nearly original form with apktool.
Rebuilding decoded resources back to binary APK/JAR with apktool.
Code signing the apk with apksigner.
Multiple arch support (arm, arm64, x86, x86_64).
No rooted Android device needed.
Getting Started​Pulling an APK from a device is simple as running
Code:
./apk.sh pull <package_name>
Decoding an APK is simple as running
Code:
./apk.sh decode <apk_name>
Rebuilding an APK is simple as running
Code:
./apk.sh build <apk_dir>
apk.sh pull​
Code:
apk.sh pull
pulls an APK from a device. It also supports app bundles/split APKs combining split APKs in a single APK file.
apk.sh patch​
Code:
apk.sh patch
patch an APK to load frida-gadget.so on start.
frida-gadget.so is a Frida's shared library meant to be loaded by programs to be instrumented (when the Injected mode of operation isn’t suitable). By simply loading the library it will allow you to interact with it using existing Frida-based tools like frida-trace. It also supports a fully autonomous approach where it can run scripts off the filesystem without any outside communication.
Patching an APK is simple as running
Code:
./apk.sh patch <apk_name> --arch arm
.
You can calso specify a Frida gadget configuration in a json
Code:
./apk.sh patch <apk_name> --arch arm --gadget-conf <config.json>
More info at: https://github.com/ax/apk.sh
Enjoy.
Added the ability to pull APK file from devices.
Added support for app bundles/split APKs.
v0.9.7 is OUT!
Added support for multidex APKs.
Bugfix.
v0.9.8 is OUT!
Updated to apktool v2.7.0.
Some refactoring.
Are you planning to implement anything to help with proguard?
MidasGlove said:
Are you planning to implement anything to help with proguard?
Click to expand...
Click to collapse
Where are you stuck?
tryin said:
Where are you stuck?
Click to expand...
Click to collapse
Well, I'm stuck with reversing an APK protected with ProGuard so I wondered if you know any tools you can add regarding that in the future.
MidasGlove said:
Well, I'm stuck with reversing an APK protected with ProGuard so I wondered if you know any tools you can add regarding that in the future.
Click to expand...
Click to collapse
I recommend you a new tool:
https://github.com/REAndroid/APKEditor
v1.0.3 is OUT!
Added support for APK renaming.
Bugfix.
v.1.0.4 is OUT!
Added `--net` to add a permissing network security config when building.
Added `--safe` to not decode resources when decoding (i.e. apktool -r).
Added `--no-dis` to not disassemble dex when decoding (i.e. apktool -s).
Bugfixing
Refactoring