Virtuous Ten Studio is a tool used to modify android apks and jars. Unlike apktool, VTS is a GUI based tool which makes editing easier. It has advanced features which makes ROM modding easier. It is an ultimate tool for ROM developers and themers.
Features of Virtuous Ten Studio:
- Decompile apk, jar
- Recompile apk, jar
- Edit smali, xml
- Syntax highlighting
- Error checking
- Easy navigation
- Jump to references directly from editor
- Preview of images, colors and strings directly in the editor. No need to open any other file to see references.
- Search files containing a particular text
Check more features here.
- VTS (Official | Mega.nz | Userscloud)
- JDK (Download)
- Apktool (Guide)
- Smali & Baksmali (Download)
- Windows OS
Step 1: Install Java Development Kit (JDK), apktool and Virtuous Ten Studio (VTS) in Windows OS.
Make sure Java has been configured properly. To check, open command prompt and run command:
After copying apktool.bat and apktool.jar to C:\Windows folder open command prompt and run command:
Step 2: Copy latest apktool.jar file to C:\Program Files (x86)\Virtuous Ten Studio\External\ApkTool
Step 3: Download and copy latest smali and baksmali to C:\Program Files (x86)\Virtuous Ten Studio\External\Smali folder
Step 4: Open VTS -> File -> Open Settings -> External tools -> Java and set the java.exe path. Click Ok button to save and exit VTS Settings.
Step 5: Install framework-res.apk, mediatek-res.apk (for mediatek phones) and SystemUI.apk using below steps:
a. Open VTS -> File -> Open Settings -> External tools -> ApkTool and click Add single framework
b. Write phone’s model no. or any unique word in tag and click OK
c. If you’ve framework files saved in PC then use Local file tab to load frameworks or if you want to import files directly from your phone using ADB connection then use Remote file tab. Here I’m loading files from PC using Local file tab.
To load files from PC click browse button (…) in Local file tab
d. Select framework-res.apk of same ROM whose apk you’re going to edit and click Open
e. Click Import button to install framework-res.apk
f. Repeat same process to install mediatek-res.apk and SystemUI.apk using same tag.
g. After installing all framework successfully click OK button to save and exit Settings.
Step 1: In VTS, go to File -> New Project and import apk file which you want to decompile. Make sure framework-res.apk, mediatek-res.apk and SystemUI.apk has been installed for this ROM as described in above steps.
Step 2: After importing apk file you’ll see Create new project window. In Project tab select Project-Type as Apk-Project and enter Solution Name same as Project Name. Also change Location path if you want to save decompiled apk in different folder or keep it default. Any old file with same name in the location folder will be overwritten by new file. After entering details click Next button.
Step 3: In Configurations tab, select Advanced editing if you want to edit both xml and smali or select Basic theming to edit only xml file. Check Description for details on different options. Click Next button to proceed.
Step 4: In FrameworkTag, select tag which you used to install framework-res.apk, mediatek-res.apk and SystemUI.apk in VTS settings.
In ApkToolType, select UseNewest to use latest apktool which we have copied in vts installation folder. Or select older version if older apktool works better for your ROM.
In APILevel, select the API of your ROM. While writing this post VTS doesn’t support Lollipop API 21 or newer but it may work with latest apktool and smali by selecting API 20 or 4.4 Kitkat. I’m decompiling Lollipop 5.0 apk using 4.4 Kitkat API.
In SmaliType, select UseNewest or compatible smali version.
In SignType, select KeepOldSignature for system files. If you are editing any non-system apk only then select TestKeys.
In TransferMethod, select Push for system files or Install for non-system files. It will push apk to your phone via ADB after recompiling.
In PushPath, enter the path of apk. For example: Path of Settings.apk in Kitkat and older versions is /system/priv-app/ and path of Settings.apk in Lollipop and newer versions is /system/priv-app/Settings.
Click Finish button to start decompiling.
You can see all decompiled files in the Solution Explorer window. You can also see decompilation status in the Tasks window.
Editing xml and smali:
In the Solutions Explorer window find and double click the xml or smali file which you want to edit. The xml files are located in res folder and smali files are located in smali folder. If you want to edit Settings text or icon then open res/xml/settings_header.xml in Kitkat or older versions and res/xml/dashboard_categories.xml & res/xml/dashboard_categories_pk.xml in Lollipop and newer versions.
Move mouse cursor over @drawable to see icon/image preview directly in editor without opening drawable folder. You can see Wi-Fi icon in below screenshot which is shown by hovering @drawable/ic_settings_wireless. You can see any image directly in editor.
Move mouse cursor over @string to see string value. You can see Wi-Fi is shown for @string/wifi_settings_title.
If you want to edit any value then press ctrl key and click any reference starting with @ like @string or @id to open reference. It will directly open reference file in new tab. Now edit value and press ctrl + s key to save file.
For example: if you want to change Developer Options to Noobs keep out then press ctrl key and click @string/development_settings_title. It will open res/values/strings.xml file. Now you can change default text to Noobs keep out as shown below
Save all edited files and click Build All button to recompile apk.
You can see build status in Tasks and Logs window:
Recompiled apk can be found in Binary folder of Project. I’ve saved my project in C:\Users\Qamrul Haque\Documents\Virtuous Ten Studio\Projects\Settings\ so my recompiled apk is saved in folder C:\Users\Qamrul Haque\Documents\Virtuous Ten Studio\Projects\Settings\Settings\Binary
Pushing apk via ADB:
Enable USB debugging in phone and connect phone to PC via USB cable. Click Push All button to push files to phone.
Replacing apk manually:
Use ES file explorer or root explorer to copy edited apk and change file permission to 0644 (rw- r– r–). Restart phone after changing permission.
Install apk from recovery: