Related
This is an Easy Tutorial, How to Decompile .apk and Recompile .apk FilesIf u like this Tutorial, Hit THANKS ButtonCREDITS
Memnoc - For Gud Ideas.
Xavierjohn22 - the amazing author of AutoApktool go Here, Hit thanks to Him Too.
Sandy7-For Motivation.
Requirements
Java (last version)
JDK (last version)
JDR (last version, usually included in JDK or Java)
Auto_Apktool 2.0.0 (DOWNLOAD THIS ONE NOT OTHERS)
HOW TO DO
NOTE: before start, select Apktool version with option 21, YOU MUST CHOOSE 1.4.1 version
1) Download and simply unpack Auto_ApkTool
2)Click on "autoapktoolmain.bat", prompt will open
{
"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"
}
3)put the apk you want to EDIT, in "_INPUT_APK"
4) Nw u Should Choose "option 6" for 'decompiling .apk
5) when option 6 is being selected, drag the apk from _INPUT_APK folder into the windows prompt and click enter
6) A Note window will appear, and will show IF the decompiling process has been done properly. Once you close that window, you will see the decompiled folder in _INPUT_APK folder
7) do your edits (xml, smali, or png, WHATEVER)
8) recompile with option 7 (NOTE: this time you MUST drag all the FOLDER, NOT the apk)
9) Once recompiling finished, u will Get a Dcompiled NOTE window that Shows your apk is sucessfully Compiled, Close that Window, Once open the decompiled folder, go to "dist" folder, and here you got your edited apk
10) NOW this is the Last step, since u cannot Sign System app, u will have to Copy the META-INF foldrer frm the Orginal apk to the edited apk, for more Info See the "Screen"
11) Rename the apk if Needed, and push it.
Reserved, Tutorial for how to de/re-compile, .jar files.
Reserved2, for video tutorial!
FAQ'sWhy can't we use Apktool???
Well, you can, but it's more difficult, that's it.
Why do you say "must use 1.4.1 apktool version"??
The reason why is that since 1.4.2 version, apktool generate java code while recompiling process is going on, and this lead to errors that 9/10 makes decompile process fail
I got errror
Hello,
I follow this instruction but when I recomoile (option 7 drag with folder), I got error
Log is below:
Code:
[*] "D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD"
recompiling "D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD"...
I: Smaling...
I: Building resources...
(skipping (null) file 'D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\drawable-hdpi\_next.png')
(skipping (null) file 'D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\drawable-hdpi\_pause.png')
(skipping (null) file 'D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\drawable-hdpi\_play.png')
(skipping (null) file 'D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\drawable-hdpi\_previous.png')
D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\values\public.xml:19: error: Public symbol drawable/_next declared here is not defined.
D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\values\public.xml:20: error: Public symbol drawable/_pause declared here is not defined.
D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\values\public.xml:21: error: Public symbol drawable/_play declared here is not defined.
D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\values\public.xml:22: error: Public symbol drawable/_previous declared here is not defined.
D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\values\public.xml:98: error: Public entry identifier 0x7f020050 entry index is larger than available symbols (index 80, total symbols 80).
D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\values\public.xml:98: error: Public symbol drawable/zplayer_2x2 declared here is not defined.
D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\values\public.xml:99: error: Public entry identifier 0x7f020051 entry index is larger than available symbols (index 81, total symbols 80).
D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\values\public.xml:99: error: Public symbol drawable/zplayer_c declared here is not defined.
D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\values\public.xml:100: error: Public entry identifier 0x7f020052 entry index is larger than available symbols (index 82, total symbols 80).
D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\values\public.xml:100: error: Public symbol drawable/zpp declared here is not defined.
D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\values\public.xml:101: error: Public entry identifier 0x7f020053 entry index is larger than available symbols (index 83, total symbols 80).
D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res\values\public.xml:101: error: Public symbol drawable/zzzz_ declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\MENGLIM\AppData\Local\Temp\APKTOOL3676539834868097954.tmp, -I, C:\Users\MENGLIM\apktool\framework\1.apk, -S, D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res, -M, D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\MENGLIM\AppData\Local\Temp\APKTOOL3676539834868097954.tmp, -I, C:\Users\MENGLIM\apktool\framework\1.apk, -S, D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\res, -M, D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\ZPlayer v3.6-AnDrOiD\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
The system cannot find the drive specified.
Of course, I install framework which copy from my device framework-res.apk and twframework-res.apk
and installed.
why?
I am using window 7 64bits, International S3, Rom null18.1, LLC
Bro u have decompiled it, the errors here r becoz, u have editied u apk in wrong way if u edit it simply jst replacing the strings want it wont recompile poperly !
stanlin salu said:
Bro u have decompiled it, the errors here r becoz, u have editied u apk in wrong way if u edit it simply jst replacing the strings want it wont recompile poperly !
Click to expand...
Click to collapse
I already decompiled with the option 6 and edit some string after that recompile(option 7). I follow this instruction.
do you mean if I just edit string, it will not compile properly?
menglim said:
I already decompiled with the option 6 and edit some string after that recompile(option 7). I follow this instruction.
Click to expand...
Click to collapse
Its not the problem with the instruction, its the problem with ur editing, u jst check properly in the error log, it explain where u have made mistake, a single misplace of strings, wont allow to recompile, see the log and correct accordingly !
Sent from my WT19i using xda premium
stanlin salu said:
Its not the problem with the instruction, its the problem with ur editing, u jst check properly in the error log, it explain where u have made mistake, a single misplace of strings, wont allow to recompile, see the log and correct accordingly !
Sent from my WT19i using xda premium
Click to expand...
Click to collapse
Sorry, could u tell me which line ?
---------- Post added at 04:28 PM ---------- Previous post was at 04:25 PM ----------
even I did not change any source. I just decompile and recompile, still get the error...
It can also be becoz of corrupt apk, Bro try to decomplie pure stock unmodified apks and check wether u get the error on them !
but the apk, which I want to compile, install on the phone properly and work properly.
Now, i am compiling and decompiling framework-res.apk.... (for test)
I will report later
---------- Post added at 04:50 PM ---------- Previous post was at 04:42 PM ----------
Here is the error when I recompile framwork-res.apk
Code:
[*] D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\framework-res
recompiling D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\framework-res...
W: Could not find sources
I: Building resources...
aapt: warning: string 'reboot_download' has no default translation in D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res; found: ru
aapt: warning: string 'reboot_recovery' has no default translation in D:\Android\DRCompileAPK\AutoAPKTool2.0.4\_INPUT_APK\framework-res\res; found: ru
I: Building apk file...
The system cannot find the drive specified.
look like miss some string in traslation
Thanks!!! I think this tutorial is perfect!!
Enviado desde mi GT-I9300 usando Tapatalk 2
Now Featured in XDA Portal. Thanks for the support
{
"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"
}
http://www.xda-developers.com/android/comprehensive-xthemeengine-theme-creation-guide/
***This Themer guide should work in any device running android 4.0.4 & +
About NICS Themer
NICS Themer works with Xposed App & X-Themer Engine. It is intended to serve the same purpose as T-Mobile/CM10 Theme Engine. NICS lets you to create own themed apk, my friend neroyoung first develop the idea of it & implemented in his NICS Rom. I am writing a complete guide here to share with you cause I think it's a really useful thing
Requirement
1. X-posed App by rovo89
2. X-Themer Engine by ruqqq
3. My Base.apk
4. Virtuous Ten Studio (VTS) - Official Website
5. A Editing Software like Paint.NET - Download Link
Note: # 1,2,3 are available in 2nd post attachment
Note: for more information about X-posed App & X-Themer Engine visit the official thread.
Main Guide
1. Download & install VTS in default directory & place Base.apk in Desktop
2. Open VTS & click on File>New Project (Right hand top corner). Click on Import tab & locate the Base.apk from Desktop, then click Import. Now click on Project tab & you will see the Project name as "Base", give a Solution name or just name it to "Base" as well. Then press Ok. For better understanding I am providing screenshot with serial number to the task you have to do.
3. You will see now task is running & in some seconds your apk will be decompile successfully. It will look like this, minimize VTS
4. Now go to there where VTS keeps projects. For me it is in C:\Documents and Settings\USER\My Documents\Virtuous Ten Studio\Projects
Now go inside your project "Base\Data folder.
Inside drawable folder there is a png which is the icon of the apk
Inside xml folder there is a redirection.xml, we have to redirect the packages which we will theme & other xmls need to be write here.
Go inside values folder & delete Public.xml
5. Now lets begin with the guide. As framework, systemUI & Settings are the three most important component of Rom, I will show how to theme & redirect them.
6. Now, 1st decompile Settings.apk which you want to theme to get the resources & pngs from there. Use another tool like Apktool, Xda Auto Apktool or Apk Multitool. Here is a Guide on Apk Multi Tool.
7. Open AndroidManifest.xml of Settings.apk, we need android version & package name of it. Like for my Settings.apk it is
android:versioncode="15"
pacakge="com.android.settings" Remember those or note it down somewhere
Also go to the drawable-hdpi folder of Settings.apk & copy the pngs you want to theme. Note that, according to your phone this drawable folder can be drawable-ldpi/mdpi/hdpi/xhdpi. So according to it make a drawable folder in Data\Res of the decompiled Base.apk
I am creating it in Data\res\drawable-hdpi, & adding the pngs in the folder which I have copied from Settings.apk
8. Now, inside the drawable-hdpi folder rename the pngs with anything you like. To avoid all conflicts I would suggest to add the package name infront of every png. For example, I have taken three pngs from settings. Here are the original & renamed name of them--
ic_settings_wireless.png -------------- com_android_settings_ic_settings_wireless.png
ic_settings_bluetooth2.png ---------- com_android_settings_ic_settings_bluetooth2.png
ic_settings_data.png ------------------- com_android_settings_ic_settings_data.png
9. Now go to xml folder & write a new xml named "com_android_settings.xml" & write according to how many pngs you have taken,
Code:
<?xml version="1.0" encoding="utf-8"?>
<resource-redirections>
<item name="drawable/ic_settings_bluetooth2">@drawable/com_android_settings_ic_settings_bluetooth2</item>
<item name="drawable/ic_settings_data_usage">@drawable/com_android_settings_ic_settings_data_usage</item>
<item name="drawable/ic_settings_wireless">@drawable/com_android_settings_ic_settings_wireless</item>
</resource-redirections>
Save it.
Here, item name="drawable/ic_settings_bluetooth2" - is the original png name which is inside Settings.apk
@drawable/com_android_settings_ic_settings_bluetooth2 - is the renamed pngs which will replace the original png
So it will look like this,
10. Now decompile SystemUI.apk the same way & get android version & package name from AndroidManifest.xml. For me it is,
android:versioncode="15"
package="com.android.systemui"
Copy the pngs you want to edit from drawable folder & add it to Data\res\drawable-hdpi folder of Base.apk. Now rename the pngs you have copied with the package name attached to the front. Like for a png the original & renamed is-
stat_bluetooth_on.png ---------- com_android_systemui_stat_bluetooth_on.png
11. Write a new xml in xml folder named "com_android_systemui.xml" & write according to how many pngs you have taken-
Code:
<?xml version="1.0" encoding="utf-8"?>
<resource-redirections>
<item name="drawable/stat_2g3g_off">@drawable/com_android_systemui_stat_2g3g_off</item>
<item name="drawable/stat_2g3g_on">@drawable/com_android_systemui_stat_2g3g_on</item>
<item name="drawable/stat_3g_on">@drawable/com_android_systemui_stat_3g_on</item>
<item name="drawable/stat_airplane_on">@drawable/com_android_systemui_stat_airplane_on</item>
<item name="drawable/stat_bluetooth_on">@drawable/com_android_systemui_stat_bluetooth_on</item>
<item name="drawable/stat_brightness_auto">@drawable/com_android_systemui_stat_brightness_auto</item>
<item name="drawable/stat_brightness_mid">@drawable/com_android_systemui_stat_brightness_mid</item>
<item name="drawable/stat_brightness_on">@drawable/com_android_systemui_stat_brightness_on</item>
<item name="drawable/stat_data_on">@drawable/com_android_systemui_stat_data_on</item>
<item name="drawable/stat_flashlight_on">@drawable/com_android_systemui_stat_flashlight_on</item>
<item name="drawable/stat_gps_on">@drawable/com_android_systemui_stat_gps_on</item>
<item name="drawable/stat_lock_screen_on">@drawable/com_android_systemui_stat_lock_screen_on</item>
<item name="drawable/stat_orientation_on">@drawable/com_android_systemui_stat_orientation_on</item>
<item name="drawable/stat_reboot">@drawable/com_android_systemui_stat_reboot</item>
<item name="drawable/stat_ring_on">@drawable/com_android_systemui_stat_ring_on</item>
<item name="drawable/stat_screen_timeout_1m">@drawable/com_android_systemui_stat_screen_timeout_1m</item>
<item name="drawable/stat_screen_timeout_2m">@drawable/com_android_systemui_stat_screen_timeout_2m</item>
<item name="drawable/stat_screen_timeout_10m">@drawable/com_android_systemui_stat_screen_timeout_10m</item>
<item name="drawable/stat_screen_timeout_30m">@drawable/com_android_systemui_stat_screen_timeout_30m</item>
<item name="drawable/stat_screen_timeout_15s">@drawable/com_android_systemui_stat_screen_timeout_15s</item>
<item name="drawable/stat_screen_timeout_30s">@drawable/com_android_systemui_stat_screen_timeout_30s</item>
<item name="drawable/stat_shutdown">@drawable/com_android_systemui_stat_shutdown</item>
<item name="drawable/stat_sync_on">@drawable/com_android_systemui_stat_sync_on</item>
<item name="drawable/stat_wifi_on">@drawable/com_android_systemui_stat_wifi_on</item>
</resource-redirections>
Save it.
12. Now decompile framework-res.apk get the package name & android version from AndroidManifest.xml & get the pngs from drawable folder & add them in Data\res\drawable-hdpi folder of Base.apk. My framework's package & version is -
android:versioncode="15"
package="android"
Now rename the framework-res pngs with package name "android" or like I have done. The original & renamed png name is like this for me-
switch_bg_on_disabled_holo_dark.png ------------ framework_res_switch_bg_on_disabled_holo_dark.png
Now open a new xml in xml folder named "android.xml" & write according to how many pngs you have taken to modify
Code:
<?xml version="1.0" encoding="utf-8"?>
<resource-redirections>
<item name="drawable/switch_bg_on_disabled_holo_dark">@drawable/framework_res_switch_bg_on_disabled_holo_dark</item>
<item name="drawable/switch_bg_on_disabled_holo_light">@drawable/framework_res_switch_bg_on_disabled_holo_light</item>
<item name="drawable/switch_bg_on_holo_dark">@drawable/framework_res_switch_bg_on_holo_dark</item>
<item name="drawable/switch_bg_on_holo_light">@drawable/framework_res_switch_bg_on_holo_light</item>
<item name="drawable/switch_thumb_disabled_focused_holo">@drawable/framework_res_switch_thumb_disabled_focused_holo</item>
<item name="drawable/switch_thumb_focused_holo">@drawable/framework_res_switch_thumb_focused_holo</item>
</resource-redirections>
Save it.
Note that for .9 pngs we won't add .9 to the xml
13. Open redirections.xml in xml folder & we have to write all the package redirections here. In my case I have three packages to redirect.
for Settings --
Code:
<package-redirections android:name="com.android.settings" android:resource="@xml/com_android_settings" android:minSdkVersion="15" />
for SystemUI --
Code:
<package-redirections android:name="com.android.systemui" android:resource="@xml/com_android_systemui" android:minSdkVersion="15" />
for framework --
Code:
<package-redirections android:name="android" android:resource="@xml/android" android:minSdkVersion="15" />
Here android:name is the main package which will be themed
android:resources is the xml from where png's will be redirected & replaced
android:minSdkVersion is the android:versioncode which we got from the main packages
So, the complete redirections.xml is may case will be -
Code:
<?xml version="1.0" encoding="utf-8"?>
<theme-redirections
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:pluto="http://www.w3.org/2001/pluto.html">
<package-redirections android:name="com.android.settings" android:resource="@xml/com_android_settings" android:minSdkVersion="15" />
<package-redirections android:name="com.android.systemui" android:resource="@xml/com_android_systemui" android:minSdkVersion="15" />
<package-redirections android:name="android" android:resource="@xml/android" android:minSdkVersion="15" />
</theme-redirections>
Save it. Note that, you need to close redirections with </theme-redirections> to the end.
Also, Remove "/" from the 3rd end of the line. So the 3rd line will be,
Code:
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:pluto="http://www.w3.org/2001/pluto.html">
14. Now go to drawable-hdpi folder where all the renamed pngs are. Open them with Paint.NET & change hue/saturation to the color you want to theme them. crtl+shift+U gives you the option in Paint.NET. When theming is done save all pngs. My drawable-hdpi folder looks like this-
15. Now check once again in Data\res folder.
In drawable folder there should be icon.png which will be the icon for your apk
In values folder there will be nothing as we have deleted public.xml earlier
In xml folder there should be redirections.xml with other xmls you have created
In drawable hdpi folder there will be all the renamed & themed pngs
16. Now maximize VTS window & open AndroidManifest.xml of the Base.apk. In android:label write something you want it to be shown as the apk name. In package name give name according to your color theme. Like for me it is "saqib.themer.green". If you make another one which is orange in color name it to "saqib.themer.orange" so that it doesn't replace the earlier apk when installing. After this, save the xml. For better understanding, I have marked screenshot with serial number-
When you are done press "Build all", it will run a process & create your new apk. CONGRATULATIONS :good: now you have successfully built your own themed apk. Get it from Data\Binary folder of VTS Project.
Attachments
* Download Xposed App & X-Themer Engine from attachment & install them as a normal apk in your device.
* Go to Xposed Installer App click on Install/Update, then go to Modules & tick mark on XTheme Engine. Reboot your device
* Install the newly created apk by yourself as a normal apk. You will find it inside XThemeEngine App. Apply it, it will ask for a soft reboot. After reboot you will see the changes that the app has made.
Here, I am sharing a screenshot after applying my Green themed apk via XTheme Engine
For automated batch file renaming & redirections go to this post by Madaditya - Link to Post
Credits
** neroyoung
** rovo89
** ruqqq
** Diamondback
For any more support, I am also attaching the Green_Hulk.apk I have made in the process. If you need to know more or have any confusion download that & decompile it. Your idea & conception will get more clear.
Nice Guide Mate...
Its really helpful for beginner
Nice work saqib,
Nicely written well mannered guide! Detailed enough to make even a beginner themer as pro
Awesome!!
nicely written bro... definitely a beginner would understand it with ease :good:
Awesome guide, bro...
Just a doubt... is it necessary to use vts? Can't I simply use apktool for decompiling the base apk? Im on linux and I dont think vts is for linux..
AJ
Amazing stuff there..Mate..
Keep it up ..Will link in my threads so as more people notice it..
Great guide mate! Keep it up! I'm sure even beginners are able to follow the steps
Abhinav2 said:
Awesome guide, bro...
Just a doubt... is it necessary to use vts? Can't I simply use apktool for decompiling the base apk? Im on linux and I dont think vts is for linux..
AJ
Click to expand...
Click to collapse
Thanks..Yes you can use other apk tools too for Base.apk. I have suggested VTS because with VTS when you change AndroidManifest you don't need to sign them or compile with old signature etc..If you use apktool then don't forget to re-sign the base apk
help
Hi saqib!
For first thank you for the gide!! It was really helpfull for me! But I got an error while I try to build my apk. I dont't know what is the problem, 'cause I did everything as you said (but change my android version to 16). The log says that I have some junk after document element, and I don't know what to do. Any suggestion?
question do you need to set resource file. like say Samsung framework resource would be 1.apk and so on. And if you do. what resource file do we need. from are rom or will it use java and android sdk for the resource files. thanks for this
dywerd said:
Hi saqib!
For first thank you for the gide!! It was really helpfull for me! But I got an error while I try to build my apk. I dont't know what is the problem, 'cause I did everything as you said (but change my android version to 16). The log says that I have some junk after document element, and I don't know what to do. Any suggestion?
Click to expand...
Click to collapse
Check redirections.xml line number 4, there is some problem in that line. If you cannot find it show it to me
monkeytools said:
question do you need to set resource file. like say Samsung framework resource would be 1.apk and so on. And if you do. what resource file do we need. from are rom or will it use java and android sdk for the resource files. thanks for this
Click to expand...
Click to collapse
When you setup VTS it will place some default frameworks which are needed for resources. So you don't need to install frameworks separately for this guide
Congrats for making it on the portal!
You're becoming something like a guru here hehe
Keep it up!
Hi saquib!
Thanks for the reply! I check those line a hundred times, even rewrite it, but no luck
Here's a creenshot, I hope you can figure it out :angel:
dywerd said:
Hi saquib!
Thanks for the reply! I check those line a hundred times, even rewrite it, but no luck
Here's a creenshot, I hope you can figure it out :angel:
Click to expand...
Click to collapse
You don't have any com_android_settings.xml in xml folder, that's why it is giving trouble. You also don't have android.xml from where the resources will be replaced. Go back to my guide & take a look again, you missed those parts
I don't know why they are not showing in vts, but now they are there (com_android_settings & so on), but android.xml not, and now I see that I have to create that, right? Can you tell me how to that? I check your gide, but can't find that... sorry
dywerd said:
I don't know why they are not showing in vts, but now they are there (com_android_settings & so on), but android.xml not, and now I see that I have to create that, right? Can you tell me how to that? I check your gide, but can't find that... sorry
Click to expand...
Click to collapse
rename com_android_framework.xml to android.xml, you have redirected to android.xml but named one xml as com_android_framework
you should download my Green_Hulk.apk which I attached to the 2nd post, it is a complete apk, you should get your concept clear from that apk
saqib nazm said:
rename com_android_framework.xml to android.xml, you have redirected to android.xml but named one xml as com_android_framework
you should download my Green_Hulk.apk which I attached to the 2nd post, it is a complete apk, you should get your concept clear from that apk
Click to expand...
Click to collapse
Thanks for your help! I really appreciate it!
I think I too noob for that, I do what you said or at least I think I do, but no succes :crying:
I upload my "creation"; if you so kind, will you see that and maybe you can help again for me... :angel::fingers-crossed:
Sorry for disturbing you
ImageRx
@saqib nazm
Thank You for Such an Awesome Guide!
I've just made a script ImageRx that would
1.Add the required prefix to image name and Rename them
2.Also create the required redirection xml
So this Would Automate renaming multiple images with same prefix as needed for NICS themer
Download ImageRx_Madaditya
Also Find my Updated tool Here ToolsX
Credits
[email protected] Used his Goptimizer Mini Cygwin Pack as Base for Bash script to Run on windows!
2 @saqib nazm-For this Awesome guide
Click to expand...
Click to collapse
Hope this will be helpful :good:
Since this is my first script might have errors.Please report
dywerd said:
Thanks for your help! I really appreciate it!
I think I too noob for that, I do what you said or at least I think I do, but no succes :crying:
I upload my "creation"; if you so kind, will you see that and maybe you can help again for me... :angel::fingers-crossed:
Sorry for disturbing you
Click to expand...
Click to collapse
Ohk I will take a look at night, or if not then tomorrow
Madaditya said:
@saqib nazm
Thank You for Such an Awesome Guide!
I've just made a script that would1.Add the required prefix to image name and Rename them
2.Also create the required redirection xmlSo this Would Automate renaming multiple images with same prefix as needed for NICS themer
Download ImageRx_Madaditya
Hope this will be helpful :good:
Since this is my first script might have errors.Please report
Click to expand...
Click to collapse
Really thanks for this man :good: you just made things alot easier now I will link this thread to my 2nd post
Good evening to all boys.
Today I wanted to announce the release of Piller, a Theme Installer for Lollipop, on behalf of pillSoft (Small development team).
Piller uses code as open source, EasyLicenseChecker by Ishida and parts of code Rahul K Dinesh.
We tried to make the 'installer as dynamic as possible, so that they serve a few steps to add themes and customize it.
We decided to to insert the control on the license to meet the needs of young developers who see their apps distributed on the third store.
All this is expressed as a clean graphics, attractive and modern.
We have already translated all strings in Italian !.
We report below changes necessary to customize your installer.
All this information is also given in the description of this project on GitHub.
Screenshoot!
{
"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"
}
Screenshot realized with Italian String .
Personalize and Add Theme:
- Addition of the theme in assets / files, the name of apk must be formed only by the name of the theme **Important**.
- Inclusion of information on the topic in the file arrays.xml this includes:
* Theme Name
* Package Theme
* Motto of the theme
* Color of Primary Theme
* Primary Color of Dark Theme
* Primary Accent Color of Theme
* Highlighted Primary Color of Theme
#Change The name of application
Code:
<string name = "nameApplication"> Piller </ string>
<string name = "app_name"> Piller </ string>
#Customize Toolbar and colors refers to the file Color.xml as:
Code:
<color name = "ColorPrimary"> # 2d5d82 </ color> ToolBar
<color name = "colorPrimaryDark"> # 21425d </ color> StatusBar
<color name = "colorAccent"> # 01bcd5 </ color> AccentColor
#To insert the image of the subject that will appear in the installation window should change some lines of code (look for "Change it for image Theme"):
Code:
switch (auxTheme.theme_name) {
houses "Lin": // Replace Lin with your Theme Name
res = R.drawable.imm; // Replace imm with your image name
break;
houses "Daa": // Replace Lin with your Theme Name
res = R.drawable.imm2; // Replace imm with your image name
}
Also provided are also files that relate to the themes and images placeholder icon, these files can be opened with illustrator,**Located in Graphics Folder**
We hope that this can be d 'help and to your liking, all criticisms are welcome in order to improve the project.
If you want to support us ,you can make a modest donation to the team via paypal.
FAQ:
* I saw Lin and Daa, but are available to download?
- At this moment not, but will be available soon, follow + GiulioFagioli on Google Plus.
* Can I use the installer for profit?
- Yes you can, it would be appreciated ,if you believe, a small donation.
* Can I modify and resell the code / project?
-No, the project is under the GPL, but you can change it, improve it and drop it OpenSource.
* Can I use the 'icon or / and pictures of Placeholder?
- Yes, you can. You can find these file on Graphics folder , the extension is .ai and you can open it with illustrator Cs6 or later..
* How can I stay updated on the development of the project?
- Follow Giulio Fagioli and Lorenzo Salani on Google+ and follow this Thread.
Piller Project on GitHub.
Changelog
Version 1.07:
-Fix bugs
-Added Gallery
Version 1.06:
-Now the preview image of the theme adapts automatically
-it is easier to change the icons of the fab and the size of both
------
-Fix bug (EBUSY)
Version 1.05:
-Added Unistall with same button used for installation
-Add Fab for installation and unistall of theme
-Removed for now the option of going directly to theme chooser
Version 1.04b:
-Add Internet Permission on manifest
-Add Theme engine requirement
-Clean up some part of code
-Change version of Piller
#Allthebest
Sent from my Moto G using Tapatalk
Awesome!
I pondered how to use this app
To add, for example, my theme, I have to recompile the Piller apk. And as a result, the installer will be with 1 my theme, which I'll post in the web. And I will add to it as the theme of manufacturing. And, thus, it will be a kind of application which will be gathered all of my work?
or
Suppose there is one person who will constantly add all existing themes in this app, and also spread to the web.
Maybe someone can explain me for what this application?
LidaFlorida said:
I pondered how to use this app
To add, for example, my theme, I have to recompile the Piller apk. And as a result, the installer will be with 1 my theme, which I'll post in the web. And I will add to it as the theme of manufacturing. And, thus, it will be a kind of application which will be gathered all of my work?
or
Suppose there is one person who will constantly add all existing themes in this app, and also spread to the web.
Maybe someone can explain me for what this application?
Click to expand...
Click to collapse
I think it is for packaged groups of themes - such as "Mono Family for CM11/PA" on store.. allows multiple themes to be distributed as one apk
haydnlj said:
I think it is for packaged groups of themes - such as "Mono Family for CM11/PA" on store.. allows multiple themes to be distributed as one apk
Click to expand...
Click to collapse
It is so.
Piller allows you to distribute multiple themes in one application.
We tried to make it as easy as possible the dynamic addition of themes.
In some installers have to change many pieces of code, and sometimes can be difficult for theme developers that do not know java.
It makes me happy to see people on this thread, thanks again.
LidaFlorida said:
I pondered how to use this app
To add, for example, my theme, I have to recompile the Piller apk. And as a result, the installer will be with 1 my theme, which I'll post in the web. And I will add to it as the theme of manufacturing. And, thus, it will be a kind of application which will be gathered all of my work?
or
Suppose there is one person who will constantly add all existing themes in this app, and also spread to the web.
Maybe someone can explain me for what this application?
Click to expand...
Click to collapse
download the source code of the app, download androidstudio or eclipse, jdk and set up build environment... set up androidstudio/eclipse and the workspace... import the project, do your modifications, compile the project.. profit
small request
can you devs make a themer for ASOP using xposed .because no themer lik xthemer or hkthemer support cm11 or cm12 themes.thank you
jjbro007 said:
can you devs make a themer for ASOP using xposed .because no themer lik xthemer or hkthemer support cm11 or cm12 themes.thank you
Click to expand...
Click to collapse
I'll made for You :good:
EnricoD said:
I'll made for You :good:
Click to expand...
Click to collapse
thank you so much for trying.many guys will be happy to see such a themer.i will help in promoting the module.even you can put a price on it if you want.all will be very thankfull.
Say a user downloads and installs this Theme Installer. They pick a theme and install, then a week later an update to that theme comes out. I'm assuming we would have to push out the full Theme Installer for the update, but will the theme the user already has installed get updated on their phone during this process or will they have to manually do it requiring them to have to check regularly for updates? This part always confused me.
93Akkord said:
Say a user downloads and installs this Theme Installer. They pick a theme and install, then a week later an update to that theme comes out. I'm assuming we would have to push out the full Theme Installer for the update, but will the theme the user already has installed get updated on their phone during this process or will they have to manually do it requiring them to have to check regularly for updates? This part always confused me.
Click to expand...
Click to collapse
Just like how Veu worked in CM11, you update the app, then you update the theme within the app.
awesome handy stuff! .... i just decompiled to apk and tried to replace the included theme.
38 To insert the image of the subject that will appear in the installation window should change some lines of code (look for "Change it for image Theme"):
39 ```
40 switch (auxTheme.theme_name) {
41 houses "Lin": // Replace Lin with your Theme Name
Click to expand...
Click to collapse
could you please be a bit more specific or better say "noob-friendly", how to add and change the included themes?
@93Akkord
To be as clear as possible, this application, as the theme installer, does nothing but collect a family of themes in one package, so that those who download the application can use all the themes in it.
In the event that an issue was updated would be updated must also application (theme installer), then it is the user who has to manually update the theme that had already installed. I hope to be exhaustive, if not, do not be afraid to ask for further explanations.
@ _moelle
you, then the addition of a theme is very very simple.
If we do, your theme is called moellered.apk, you must simply copy the apk in your assets / Files.
the second thing you have to update the files that contain the information and the colors of your theme.
Let's see how you do, go in app / src / main / res / values-v21 / arrays.xml and modify the following information:
Code:
<String-array name = "theme_names">
<Item> Lin </ item>
<Item> Daa </ item>
</ String-array>
Here contains information on the names of themes you want to insert in the installer, remember you're inserting the theme moellered then we can change this array like this:
Code:
<String-array name = "theme_names">
<Item> MoelleRed </ item>
</ String-array>
Let the name of the package and take the example com.example.moellered package as your theme.
before we have:
Code:
<String-array name = "theme_packages">
<Item> com.example.theme1 </ item>
<Item> com.example.theme2 </ item>
</ String-array>
after we have:
Code:
<String-array name = "theme_packages">
<Item> com.example.moellered </ item>
</ String-array>
it's time the motto of the theme , we take as an example that the motto of moellered is "Moelle is Red, Moelle is Awesome" thus:
before:
Code:
<String-array name = "theme_motto">
<Item> Leak, Coming Soon, Follow me </ item>
<Item> Not now, Fake, Maybe </ item>
</ String-array>
after:
Code:
<String-array name = "theme_motto">
<Item> Moelle is Red, Moelle is Awesome </ item>
</ String-array>
Lacks to change colors, we know that lollipop is based on four main colors,
primary, primaryDark, accent and highlighted and in fact we find 4 array containing the colors of your theme, make an example for the primary, the operation is indentical to the other three, you just have to change the color codes.
take # F44336 primary color of your theme and we would modify the array:
before we have:
Code:
<String-array name = "theme_colors">
<Item> # 009 688 </ item>
<Item> # f44336 </ item>
</ String-array>
after we have:
Code:
<String-array name = "theme_colors">
<Item> # F44336 </ item>
</ String-array>
Remembers each line in an array is the information related to a theme, if in addition to moellered wanted to add a theme moelleyellow, then you will need to enter the information relating to that theme even in these arrays, one example is:
Code:
<String-array name = "theme_names">
<Item> MoelleRed </ item>
<Item> MoelleYellow </ item>
</ String-array>
Code:
<String-array name = "theme_packages">
<Item> com.example.moelleyellow </ item>
</ String-array>
Code:
<String-array name = "theme_motto">
<Item> Moelle is Red, Moelle is Awesome </ item>
<Item> Yellow, Yellow, Moelle </ item>
</ String-array>
Code:
<String-array name = "theme_colors">
<Item> # F44336 </ item>
<Item> # FFEB3B </ item>
</ String-array>
Now we can do is add images related to the theme, with version 1.7 of piller Added gallery for each theme, if you use an older version we strongly recommend you to upgrade if you could not, below are the old method, so we go to the Assets folder of our project and we create two folders and MoelleRed MoelleYellow inside them we can put all the images to be included in the gallery, there are no limitations on the number and their name, it 's important that the folder names coincide with those of the theme to which they refer.
Old Version of Piller [Deprecated]
Lastly there are pictures to be included, we go in app / src / main / res / and insert images into folders drawable, (we for convenience we have inserted two directly in the drawable folder, but you can insert them in the right size various folders drawable-xxhdpi, drawable-xhdpi and so on)
call the two images and moellered.png moelleyellow.png the code will be:
before:
Code:
switch (auxTheme.theme_name) {
case "Lin": // Replace Lin with your Theme Name
res = R.drawable.imm; // Replace imm with your image name
break;
case "Daa": // Replace Lin with your Theme Name
res = R.drawable.imm2; // Replace imm with your image name
}
after:
Code:
switch (auxTheme.theme_name) {
case "MoelleRed": // Replace Lin with your Theme Name
res = R.drawable.moellered; // Replace imm with your image name
break;
case "MoelleYelllow": // Replace Lin with your Theme Name
res = R.drawable.moelleyellow; // Replace imm with your image name
}
I hope I was as exhaustive as possible, for any questions or concerns please do not hesitate to ask, even directly hangouts or email.
@remeic
Awesome guide Sir..... Can't wait to try and thanks to my buddy @nicholaschum that introduced this...I've been wanting to do this for all my XKrome themes.
Cant compile it..
extract the zip from https://github.com/pillSoft/Piller
open the project with android studio
and i get that error :
Unable to start activity ComponentInfo{io.github.pillsoft.piller/io.github.pillsoft.piller.MainActivity}: java.lang.IllegalArgumentException: java.security.spec.InvalidKeySpecException: java.lang.RuntimeException: error:0D07209B:asn1 encoding routines:ASN1_get_object:too long
could be more colors
@qreto I'm not sure you understand, you can explain?
@side you managed to solve? are you sure you have put your public key?
side said:
Cant compile it..
extract the zip from https://github.com/pillSoft/Piller
open the project with android studio
and i get that error :
Unable to start activity ComponentInfo{io.github.pillsoft.piller/io.github.pillsoft.piller.MainActivity}: java.lang.IllegalArgumentException: java.security.spec.InvalidKeySpecException: java.lang.RuntimeException: error:0D07209B:asn1 encoding routines:ASN1_get_object:too long
Click to expand...
Click to collapse
remeic said:
@qreto I'm not sure you understand, you can explain?
@side you managed to solve? are you sure you have put your public key?
Click to expand...
Click to collapse
I found out what to do for this. You have to comment out more than just the stuff in the instructions.
Must comment out these TWO lines instead of one in the github instructions, inside MainActivity.java
https://github.com/pillSoft/Piller/.../github/pillsoft/piller/MainActivity.java#L74
Java:
mLicenseChecker = new EasyLicenseChecker(this, new Handler());
mLicenseChecker.start();
and make it into this:
Java:
/*mLicenseChecker = new EasyLicenseChecker(this, new Handler());
mLicenseChecker.start();*/
@remeic, it'd be great if you can update the guide (on the github source) to reflect this change.
I make (another) guide on how to theme, but it’s based on my experience. If moderators think this thread redundant , they are free to delete or close it.
This tutorial is for « every » operating system. In this tutorial I will change the color of some object of the XDA Labs app . There will be 2 part for this guide, the first is the general method and the second one is the description of what I’ve done on the XDA Labs app to theme it. Please , before asking , read the entire OP , maybe your answer is into it.
I’m running Ubuntu 16.04 LTS but the softwares are also compatible with windows and mac.
Which software I use :
• Inkscape (to make icons)
• Alpha Colour for Android (to see which aplha code correspond to which level of opacity)
• Pipette for Android (to identify colors on the app’s screenshot) No longer available , use this app, it's even more accurate
• ZipSigner for Android(to sign apk)
No longer available, for signing please refer to this tool
I-General Method :
1-First you need to set-up your PC’s environment:
• A 64-bit PC Processor ( 32-bit has too many bugs linked to aapt compatibility)
• Apktool or other reverse engineering tools properly installed
• Java 7 or above
• Notepad++ or any text editor
2-What you should know before theming:
A)Colors:
Modifying colors is quite simple a process, but you should first understand it.Then you can change the app as your mind tells you to.
1-A regular line in this file is built like this :
-<color name="[object’s id]">#[alpha channel][hex code]</color>
2-Meaning :
- Alpha channel : This is the 2 characters that change the opacity of the color
- Hex Code : This is the 6 characters that define the color itself
3-For example :
<color name="design_fab_stroke_end_outer_color">#0f000000</color>
- «design_fab_stroke_end_outer_color» is the id of the object I want to change the color from
- «0f» is the alpha channel of the initial color
- «000000» is the hex code of the initial color
4-To modify them :
Replace the hex code of the initial colors by the hex code of the color you want to add , be careful not to delete a piece of the line with the old hex code because it will cause errors on apktool. I use alpha colour app for Android to see levels of opacity and to find color’s hex code.
B)Pictures :
You want to change pictures inside the app , that’s simple :
• Search for the picture you want to change in the drawable folder or mipmap folder
• Folders you want to browse to find the pictures :drawable-xhdpi-v4 / xxhdpi-v4 / xxxhdpi-v4 for the « in-app » pictures , every mipmap folders for icons (sometimes icons are in drawable folders and there aren’t any mipmap folders).
• When you prepare the pictures , make sure they have the SAME SIZE as the original pictures.
• Rename the picture you have prepared to replace old ones with the SAME NAME AS THE OLDER PICTURES.
• Once you have renamed those pictures, put them into the folder where you found them.
C) App name :
• go to /res/values and open string.xml
• Modify this string : <string name="app_name">[The name you want]</string>
Example :<string name="app_name">XDA Evolved</string>
3-Now , we can start theming :
• Go to the apktool’s directory , and open a command prompt there (keep it open till the end)
• Enter this command :
Code:
java -jar apktool.jar d [the apk name.apk]
• There should be a new folder which has the name of your apk file. Open this folder.
• Then go to /res/values and open the colors.xml file
• Modify the colors
• Search for the pictures you want to change and change them as I have written above
• Open the terminal you kept open
• Enter this command :
Code:
java -jar apktool.jar b [the apk name.apk]
4-Before installing , signing :
I use an Android app called zip signer , with which I can sign apks from my phone.
• Open the app , click on input and browse for the apk you’ve put on your phone
• Click on the file when you’ve found it
• Click on Output and select the same apk file as in the first step
• Rename the path adding a « -signed » just before « .apk » at the end of the path.
• Select on the « key/mode » menu « platform »
• Finally , click on « sign the file » and wait till the end of the progress bar.
II-What I’ve done
1-Identifying :
Here is the list of the infos I’ve written down :
• Image Size
• The Hex code of the color I want to change :
- Take a screenshot of the color(s) you want to modify
- Open the screenshot on Pipette
- Tap on the lock button and click on the color , the hex code will be displayed at the bottom
• The Hex code of the color I want to add : Same process with Pipette
• The colors I want to add :
-Blue :3174f1
-Yellow :fbb002
-Background :47595c
-Background of the posts :2d2d2d
-the secondary color :c0c0c0
Click to expand...
Click to collapse
• The colors I want to change:
-Background color :212121
-Accent color :edb02d
-Primary color :353535
-The secondary color :#aaffffff
Click to expand...
Click to collapse
2-Editing and making new icon, etc.:
• I used Inkscape (free alternative to illustrator) because there were vector-designed icons.
• I used gimp to resize the picture after making them.
3-Decompiling the apk file :
• I typed in the terminal :
Code:
java -jar apktool.jar d XDALabs.apk
4-Replacing icons and other images :
• I put the pictures in the 3 drawable folders because it’s where I found them
5-Editing colors and the name :
• I went to /res/values and I opened colors.xml file and I replaced colors and some alpha channel :
Code:
<color name="accent">#ffedb02d</color>
<color name="accent_translucent">#ddedb02d</color>
<color name="background_dark">#ff212121</color>
<color name="dialog_bg_dark">#ff212121</color>
<color name="primary">#ff353535</color>
<color name="primary_bg">#ff353535</color>
<color name="primary_dark">#ff2b2b2b</color>
<color name="search_divider_dark">#ff212121</color>
<color name="search_list_results_bg_dark">#ff212121</color>
<color name="secondary_text">#ff727272</color>
to
Code:
<color name="accent">#fffbb002</color>
<color name="accent_translucent">#ddfbb002</color>
<color name="background_dark">#ff47595c</color>
<color name="dialog_bg_dark">#ff2d2d2d</color>
<color name="primary">#ff3174f1</color>
<color name="primary_bg">#ff2d2d2d</color>
<color name="primary_dark">#ff3174f1</color>
<color name="search_divider_dark">#ff2d2d2d</color>
<color name="search_list_results_bg_dark">#ff2d2d2d</color>
<color name="secondary_text">#ffc0c0c0</color>
• I opened strings.xml file and I replaced the app name line :
Code:
<string name="app_name">XDA Labs</string>
to
Code:
<string name="app_name">XDA Evolved</string>
6-Recompiling the new apk file :
• I opened the same command prompt and I typed this command :
Code:
java -jar apktool.jar b XDALabs
7-Signing the apk after install it :
• The same process as in the step 4 in the part one of my guide (I - 4).
8-Install the Apk :
• Uninstall the original app
• Install the signed version of the apk.
You can ask me on this thread about everything about the theming and I'll do my best to solve your problems, but do it in the respect and following the Forum Rules
You can go to themed XDA Labs version's thread clicking here.
And please , if you found this guide useful , press the thank button.
When I learn
Thank you for posting this. I always wanted to customize an android app, but have never had much success.
coluvatz12 said:
Thank you for posting this. I always wanted to customize an android app, but have never had much success.
Click to expand...
Click to collapse
Glad to hear that , thanks!
If you think this thread helped you , please press the thank button , I'm happy to see that my work is appreciated , Happy Theming !
nandakumar12 via PM said:
dude one doubt, how can i change the background color of an app, i cant find a code to change..??
Click to expand...
Click to collapse
First you should have installed the app and identified the hex code of the background color (E.G :#36ge87)
You can do it via Pipette , an app which identify hex code in a picture. Just take a screenshot and identify the colors via Pipette .
Then you will have to search for the hex code of the background color you identified with Pipette previously.
This step is on your PC , you opened the color.xml file in notepad++ or whatever it is , and you wrote the hex code of the background color in the search bar. Make the search and find all the lines that have the hex code in it.
If you found multiple line , try to modify one of the lines , compile the APK , sign it and install it on your phone to see if something changed. Do that until you find the line holding the background color.
Theming , at the beginning is pretty long on require patience and many test before finding which line is the good one .
I hope my answer will help you .
Happy theming !!???
DUVIDA
Hello friends of the forum xda developers Instead, this forum is a newbie Needed to take a doubts:
I have a mobile model with windows 10 installed that is stopped in the drawer without use
He has put windows phone 10
I would like to change it on an Iphone with COMPATIVEL System OR ate pie android EVEN Instalar 9,0
I wonder if this is possible and what procedures to take I assume of all the risks ok
Other question:
I have a moto g5 plus and the Manufacturer Promised me an Update for the oreo 8.1.0 but until the moment nothing arrived and the artist said that it has already been released but up to the moment without conditions of receipt
There is a rumor that will be released only in September
Someone confirms this information
I await any response
Marcelo - DJ KUKA
djkukapr said:
Hello friends of the forum xda developers Instead, this forum is a newbie Needed to take a doubts:
I have a mobile model with windows 10 installed that is stopped in the drawer without use
He has put windows phone 10
I would like to change it on an Iphone with COMPATIVEL System OR ate pie android EVEN Instalar 9,0
I wonder if this is possible and what procedures to take I assume of all the risks ok
Other question:
I have a moto g5 plus and the Manufacturer Promised me an Update for the oreo 8.1.0 but until the moment nothing arrived and the artist said that it has already been released but up to the moment without conditions of receipt
There is a rumor that will be released only in September
Someone confirms this information
I await any response
Marcelo - DJ KUKA
Click to expand...
Click to collapse
Don't know what you want to ask
Please be clear
All I can infer is that this doubt doesn't belong here look over the ROMs sections
Thanks!
GAURAV THAKKAR said:
Don't know what you want to ask
Please be clear
All I can infer is that this doubt doesn't belong here look over the ROMs sections
Thanks!
Click to expand...
Click to collapse
Don't worry , that's a random spam , that's why I ignored it.
And I don't think he'll respond .
RaiZProduction said:
Don't worry , that's a random spam , that's why I ignored it.
And I don't think he'll respond .
Click to expand...
Click to collapse
Since you've replied please check the Signing Apk Guide..
You've mentioned a thread dated 4 sep
Can you please link me to it?
GAURAV THAKKAR said:
Since you've replied please check the Signing Apk Guide..
You've mentioned a thread dated 4 sep
Can you please link me to it?
Click to expand...
Click to collapse
Fixed !
That was just a typo , what I really meant is the step four in the first part of the Guide , the I - 4 .
RaiZProduction said:
Fixed !
That was just a typo , what I really meant is the step four in the first part of the Guide , the I - 4 .
Click to expand...
Click to collapse
Trying to theme Instagram
Will ping you if any issue occurs
Thanks for the simplest and to the point guide I've seen ever
GAURAV THAKKAR said:
Trying to theme Instagram
Will ping you if any issue occurs
Thanks for the simplest and to the point guide I've seen ever
Click to expand...
Click to collapse
You're welcome , all the pleasure is for me :highfive:
Does this work similar for changing a boot logo?
hello. i got this after compiling. is this normal ?
{
"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"
}
thanks !
Tarwada said:
hello. i got this after compiling. is this normal ?
thanks !
Click to expand...
Click to collapse
You can try to get your framework-res.apk from your ROM and set it to apktool with this command :
Code:
java -jar apktool.jar if framework-res.apk
RaiZProduction said:
You can try to get your framework-res.apk from your ROM and set it to apktool with this command :
Code:
java -jar apktool.jar if framework-res.apk
Click to expand...
Click to collapse
sorry i don't get it. im not connecting my phone to the computer
im trying to theme an app called mewe :\
Tarwada said:
You can try to get your framework-res.apk from your ROM and set it to apktool with this command :
sorry i don't get it. im not connecting my phone to the computer
im trying to theme an app called mewe :\
Click to expand...
Click to collapse
Hey buddy to theme some apps you need the framework apk also because it's some how dependent on framework as far as I know
GAURAV THAKKAR said:
Hey buddy to theme some apps you need the framework apk also because it's some how dependent on framework as far as I know
Click to expand...
Click to collapse
what about the message i got above
Tarwada said:
what about the message i got above
Click to expand...
Click to collapse
The message above means that the file I asked you to gather from your system isn't in the Apktool folder.
Sometimes, some apps require a framework to theme them correctly , that's why I asked you to do that.
So if you have root you can copy it from the /system/framework folder and paste it into your download folder to transfer it to your PC.
If not I'll search for you some others solution ?.
i managed to do it using apk editor on my phone but there's one thing i can't theme it in the app
can you help me so i provide some pictures ?
no pressure at all
---------- Post added at 01:23 PM ---------- Previous post was at 12:53 PM ----------
RaiZProduction said:
The message above means that the file I asked you to gather from your system isn't in the Apktool folder.
Sometimes, some apps require a framework to theme them correctly , that's why I asked you to do that.
So if you have root you can copy it from the /system/framework folder and paste it into your download folder to transfer it to your PC.
If not I'll search for you some others solution .
Click to expand...
Click to collapse
i extracted the framework-res.apk from my phone (im rooted)
but when i compile i get the same error even if i didn't modify the app :\
help ?
Tarwada said:
i managed to do it using apk editor on my phone but there's one thing i can't theme it in the app
can you help me so i provide some pictures ?
no pressure at all
---------- Post added at 01:23 PM ---------- Previous post was at 12:53 PM ----------
i extracted the framework-res.apk from my phone (im rooted)
but when i compile i get the same error even if i didn't modify the app :\
help ?
Click to expand...
Click to collapse
Can you tell me precisely what you modified in your APK ?
How to modify an apk
Intro:
I’ve done several threads about how to theme and other similar topics but the info is sparse, so this ultimate guide/index will seat proudly in the theme section of XDA and will be updated when new things come, and as I learn more. This isn’t a beginners guide, I’m here trying to be as complete as possible, with links, references, ...
This initial version of the thread isn't here to stay, if you could contribute to this thread, it would mean the world to me, and would clearly help the community (of course I'll mention you for your contribution )
And keep at mind that I’m just an enthusiast, nothing more, and that this thread has been made only by me, so it's far from perfect. If I made any mistakes or if you want to add something please let me know.
Legal aspect:
Using this knowledge to infringe copyright is not only illegal, it’s detrimental to the community. The only legal case, and the only usage of this info condoned, is using it to theme OPEN SOURCE apps (because most of the time, commercial apps forbid reverse engineering in their policies). So don’t worry, theming AOSP is legal. You can always ask the permission of the devs for an authorization to customize their apps, make sure to ask before modding, and distributing the result.
Now I’m not a lawyer, but you can learn more on the legal aspect of reverse engineering on this Stackexchange post.
Summary of this thread:
I-Requirements
II-Download APKs
III-Decompile
IV-What and how to modify
V-Recompile
VI-Sign and Zipalign
VII-Installing the apk
VIII-Other ways to theme your device
IX-Theming related topics
X-Not covered topics
XI-Mods Center
XII-Reserved
I-Requirements
A)Java:
It's essential, almost mandatory, the Java Development Kit (JDK) and Java Runtime Environment (JRE) must be installed to use java based tools.
How to install the JDK and JRE
(download and follow the instructions, it’s pretty simple)
Then, set the path to "java home", you need to do that in order to use java properly within your terminal:
Here’s a tutorial I found
To check if everything is okay, open a terminal anywhere and enter java --version. If it returns the version of the JDK and JRE you’re good.
B)Android SDK:
Unfortunately we aren’t able to download the Android SDK alone anymore, I used to consider it as a requirement, but now I don’t because some people don’t have the space to install the whole Android Studio IDE just to use the Android SDK.
C)Others:
I suppose that list is going to expand, those two above are the main ones, but if there's something else you need, I'll make sure to put it here
II-Download APKs
This sounds stupid to take one whole post for that, but sometimes it’s a drag, so here are some ways you can grab the apk you want to modify.
A)APKs form your phone:Every app you installed from the playstore is under /data/app. With a root explorer like the excellent MiXplorer, you can browse to it and see the icons representing the apps on your phone.
There is an apk called base.apk, that’s the one you want.
Sometime there might be parts called split_....apk along with base.apk, for the excraction of those you’ll need tools like the amazing app called SAI (Split APK Installer), it’s a graphical interface so I’ll assume you’ll figure out how to use it yourself
SAI on the Play Store
B)From internet:My two trusted sources I use: APK Mirror, XDA Labs (gone for now)
I also use this chrome module, it has simplified my life sooooo much, it’s provided by the APKmirror team: Toolbox for Google Play Store™
C)Your Sources:If I missed any good and trusted website, let me know
III-DecompileThis is getting serious now.
If you want to modify the apk, you need to have what’s inside: the code.
A)Resources: Decompile Binary XMLs to Human-Readable XMLs:We use APKtool for that, it decompiles the resources.arsc file to the res folder, and decodes binary XMLs to human-readable XMLs.
1-How to install APKtool:How to install APKtool
2-How to use APKtool:There are 3 main commands you need to know about:
apktool d [nameoftheapk].apkUsed to decompile the apk. There are several options you can use with that command, they're specified in APKtool's documentation (in the credits).
apktool if [nameoftheframework].apkUsed to set the framework files to decompile properly APKs. Usually some OEMs add framework APKs into Android for their apps to work, so we need to find and copy them, then “install” them with the apktool if command to APKtool. You can learn more about that on APKtool's website (in the credits).
apktoool b [nameoftheapk].apkUsed to recompile the apk. The final apk can be found inside the decompiled apk’s folder, in a subfolder named dist. You can also use various options with that command (listed in the documentation, link in the credits).
B) Decompile Classes.dex to smali:APKtool also convert classes.dex files to .smali files, but keep at mind that you won’t be able to see the java source code in those files.
The .dex extention is for Dalvik Executable, which is very self-explanatory, and is also a binary format. APKtool turn them into .smali files, which are Human-readable files, not in java, but still! And if you want to modify the code, you’ll have to learn smali. (covered in the next part, good luck with that lol)
C)Read java source code :There’s actually a way to see the java source code of an Android app, using some tools:
JD-GUI (or any other java decompiler)
Dex2jar
First turn the classes.dex files into .jar files with this command using Dex2jar:
./d2j-dex2jar.sh -f -o output_jar.jar apk_to_decompile.apk
(Execute the .bat if you’re on windows)
Quick explanation:
./d2j-dex2jar.sh: execute the dex2jar script
-f: replace the previous jar file named the same as output_jar.jar
-o output_jar.jar : set a name to the output jar file
apk_to_decompile.apk: name of the apk file you’re taking care of
Then read the jar file using JD-GUI (or any other java decompiler). It’s a quite simple software, lite weight, and you can download and run the java version without installing anything else.
Dex2jar isn’t updated anymore (since 2015), so there are errors when decompiling. You’ll be able to get a .jar file but it’ll be incomplete or not identical to the original one, that’s why this tool doesn’t allow one to modify java source directly. But you can get a great understanding of how this app works.
C) Nice tools from the XDA community:• Tickle My Android (TMA) by @Ticklefish
A tool that ease the work with APKtool, amazing one!
• APK Easy Tool by @evildog1
Also works with APKtool, I don’t use it often, but it is great!
• Other tools:
Let me know
Credits, links for this part:
Stack Overflow Post
Documentation for APKtool
Another SO Post
@Rizal Lovins ’
" [Share Latest Apktool 4.2.2/Guide/Tutorial/] How to Decompile/Compile/Sign Apk/Jar "
@A_U ’s
" [GUIDE][HOW-TO] Decompile and Compile apps using Apktool in 5 Simple Steps "
IV-What and how to modifyThis part is gigantic, I'll try to include as much link as I can, this part isn't supposed to stay like that very long, as it contains very few of the hundreds of guide about theming in XDA. Help me out by suggesting some links.
A)Resources (XML):1-ToolsTo edit XMLs you can use whatever text editor you want, but I’d recommend Visual Studio Code. It has solid plug-ins that may come handy to avoid mistakes when editing.
You can also sort of visualize XMLs with Android Studio's Layout Inspector.
You have to open the apk’s folder in Android Studio and browse to the desired xml. Opening the resource manager will aslo allow you to visualize the XML files to a certain extent, but it's not cristal clear (see the screenshot) so I don’t use that very often, but it’s good to know.
Spoiler: Screenshot
{
"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"
}
2-What’s xmlThis subject is very long, you can learn a lot of things. Here are some links (increasingly detailed) to learn about XML:
A Post in [GUIDE] Want to learn how to theme? by @theimpaler747
Google’s "Guide" (very complete): that google link is about resources in general, so it explains XMLs but not only XMLs
A Reference for Codenames in XMLs
3-Modifications:You can modify deeply the UI by editing XMLs, here are some guides to make you familiar with some techniques. Again this is a very vast field, it deserve a thread itself, and this list clearly isn"t finished. Here are my favourites ones:
XML 101 by @Ticklefish
[GUIDE][RES] Android Animation XML resources for Activity Transition by @niranjan94
Find the code you want to modify by @Raiz (Me lol)
[TUTORIAL] Where to find the colors for making a theme by @KBanause
[TUT][JB] HOW TO THEME SystemUI.apk for TOTALLY newbie! by @joehanh88
[Reference] Interactive Phone Modification [GUIDE] by @pstevep , this is AN ABSOLUTE UNIT OF INDEX!
[Tutorial][APP] PinP Shortcuts | How to Implement Picture in Picture Mode [API 26+] by @Geeks Empire
[Overlay] Enable Night Light, Auto-Brightness, Ambient Display & more on Treble ROM by @MishaalRahman
Let me know
4-Precaution:When modifying apks, some errors can be very frustrating, yet very easy to fix. Here are some usual cause of struggle:
Not properly set JAVA_HOME
The tools used (like apktool.jar) aren’t chmod +x (aren’t allowed to be executed)
You have to add java -jar [command] before every .jar tools commands for it to run
Tell me, don't be shy
For every tool related bug, please refer to their GitHubs, sometimes you’ll find a solution by searching. And XDA threads are also plenty of answers! (and if you’re really not lucky maybe stack overflow can help).
B)Smali:That’s a tough one. First, if you want my advice, editing them with Visual Studio Code and the smali plugin is way easier to find mistakes. There’s also a smali plugin for Android studio (and IntelliJ based IDE) made by Jesus-Freke, it is called smalidea.
Now I found one reaaallllyy awesome thread here on XDA about smali:
[GUIDE][SMALI]Understanding and Creating Smali Mods & General Smali Questions by @Goldie
Something else maybe? Tell me
This is my reference, I’m still learning smali tho, this list may be updated, but this thread is pure gold, go check it out!
Credit for this part:
Resources:
@Ticklefish , for XML 101 (but also for TMA), this is really one of my favourite thread on XDA
All the other members mentioned in the above list
Smali:
@Jesus-Freke , for his work on smali, baksmali (integrated in APKtool) and smalidea
@Goldie , for the amazing thread explaining smali
V-RecompileYou've done the hardest part, now what's left is repacking that thing together.
A)How to recompile:It’s pretty simple, do it with apktool with this command:
apktool b [nameoftheapk].apkYou can add several options, here’s the full list.
The -c option to me is the most useful, because it allows to leave the signature unchanged for system apks. It’ll be deprecated soon (APKtool v2.6.0), so you’ll have to do the trick manually.
What -c (--copy-orginal) does: “Copies original AndroidManifest.xml and META-INF folder into built apk. Scheduled for deprecation.”
A bit of details, good to know:
“META-INF contains apk signatures. After modifying the apk it is no longer signed. You can use -c / --copy-original to retain these signatures. However, using -c uses the original AndroidManifest.xml file, so changes to it will be lost.”
And
“After [d]ecode, there will be new folders (original / unknown) in the decoded apk folder
original = META-INF folder / AndroidManifest.xml, which are needed to retain the signature of apks to prevent needing to resign. Used with -c / --copy-original on build
unknown = Files / folders that are not part of the standard AOSP build procedure. These files will be injected back into the rebuilt APK.”
Apktool uses aapt2, the tool used in Android Studio to compile your app. You can learn more on what it is here.
B)Troubleshooting:First, remember that you can use aapt1 (used by default) and aapt2 when recompiling, try both if you run into some issues with the first.
If you have an issue with APKtool's dummy values, go on the Github Issue I opened, the problem is now solved.
Most common error, and simple to solve are the following:
-Name of the file not written correctly:
Code:
brut.directory.DirectoryException: java.nio.file.NoSuchFileException: Firefoxr
Solution: The correct name is Firefox not Firefoxr, how dumb can I be?
-Aapt errors: (here a folder isn’t recognized):
Code:
W:invalid resource directory name: /Users/Raiz/Desktop/apktool/Firefox/res navigation
Solution: Use aapt2, the folders not recognized are because aapt1 (used by default) is older than aapt2, so if you see an error like this, use the option “—use-aapt2”
-Xml Errors:
Code:
W: /Users/Raiz/Desktop/apktool/framework-res/res/values/styles.xml:1185: error: Resource entry Theme.Holo already has bag item textEditSuggestionItemLayout.
Solution: These errors are quite easy to fix, just go to the file at the line mentioned then fix the error. Usually it a doubled line, a synthax error, …
Unfortunately APKtool isn’t able to correct string typos, it’s up to you to write in correct English (definitely struggling with that on my side lol).
For other more specific errors, copy/pasting the error message in the google search bar will most certainly redirect you to a Github error, or a post in The Official APKtool XDA Thread. You can find answers by searching, so search thoroughly before asking, it’ll save you some time.
And what is troubleshooting without
[UNIVERSAL][LOGCAT]How to get & read a logcat/ Troubleshoot your own issues!
by @Stryke_the_Orc
Credit for this part:
APKtool issues on Github
The APKtool documentation
@iBotPeaches for this amazing tool
VI-Sign and Zipalign
We must sign an app after having modified it, so it can be installed properly on our devices. System Apps MUST keep the same signature they had before modifying, or else the app will continuously force close, and it may even result in bootloops and other bad things.
To keep the signature take the META-INF folder from the not decompiled apk (browse it as a zip file) and put it in the newly recompiled apk (browse it as a zip file too, if there is already a META-INF folder, just replace it)
Links to build and platform tool:
Platform-tools: https://developer.android.com/studio/releases/platform-toolsBuild-tools: Have to be downloaded from sdk manager in android studio
A)Official way:Tool used in the correct order:
1)keytool (included inside java)
2)zipalign from build tools (29.0.2 here, but use the latest )
3)apksigner from build tools (29.0.2 here, but use the latest) (+the lib folder containing apksigner.jar)
Where are build tools?
Mac: ~/Library/Android/sdk/build-tools/[your buld-tool version]/
Linux: ~/Android/sdk/build-tools/[your buld-tool version]/
Windows: C:/User/yourusername/AppData/Local/Android/sdk/build-tools/[your buld-tool version]/
Disclaimer: Using jarsigner is also possible (tool natively included in java jdk), if you use it, make sure you zipalign AFTER signing.
Make sure that apksigner (and lib) as well as zipalign are in the folder you’re apk is in.
Make sure they’re all executable (check that using chmod) and on mac os, make sure your terminal has full disk access (I had a hard time figuring this out lol).
1-Generate keystore:This is pretty simple, we’ll use keytool, at tool antively included in java jdk. We’ll need only one thing before using apksigner : the keystore.jks file (or a separate certificate and private key, but that’s more complicated)
keytool -genkey -v -keystore ~/Desktop/apktool/keystore.jks -alias Raiz -keyalg RSA -keysize 2048 -validity 10000
Just replace the alias (here Raiz) by a familiar name, you have to remember it! (here’s why)
Also replace the name of the jks file (but not it’s extension, even though it can be .keystore, I had less issues with .jks)
Quick explanation of what does what in the command:
keytool : the command to use keytool obviously
-genkey : generate the keystore
-v : display verbose
-keystore : set the path to the future file
~/Desktop/apktool/keystore.jks : Path and name of the future file, you can call the keystore whatever you want to.
-alias Raiz : specify the alias used, it can be whatever you want, but remember it, it’s like a publisher name
-keyalg RSA : specify the algorithm used for the key, here it’s RSA (here’s a bit of history)
-keysize 2048: the size of the key in bits
-validity 10000: validity in days, here 10000 days
1*- Generate key.pk8 and cert.pem:This is a quote from another thread (by @wilskywalker), this isn't necessary, but can come handy when signing zip, so I'll leave that here anyway.
You will need the following download:
OpenSSL [LINK]
[...]
Code:
openssl genrsa -out key.pem 1024
openssl req -new -key key.pem -out request.pem
openssl x509 -req -days 9999 -in request.pem -signkey key.pem -out certificate.pem
openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8
Click to expand...
Click to collapse
2- Zipalign:./zipalign -v 4 firfox-mod.apk firefox-aligned.apkQuick explanation:
-v : verbose
4 : align on 4 bits, putting another value will align the wrong way, just keep 4
firefox-mod.apk: name of the input apk, can be anything
firefox-mod-aligned.apk: name of the output apk, can be anything too
3-Sign the apk with apksigner:
./apksigner sign --ks keystore.jks firefox-mod-aligned.apk
Quick explanation:
sign: the command use to sign
--ks keystore.jks : specify the keystore file (the same one we generated seconds ago)
firefox-mod-aligned: the input apk (the one we just aligned), note that the apk will be signed and there won’t be any output apk this time
And you’re done, you can check that it has been properly signed with this command:
./apksigner verify firefox-mod-aligned
Where firefox-mod-aligned is the apk signed we want to check
3*-Sign the apk with apksigner using .pk8 and .pem files:
./apksigner sign ---key key.pk8 --cert certificate.pem firefox-mod-aligned.apk
Credits, links for this part:
How to sign an app (by Google)
apksigner documentation
keytool documentation
zipalign documentation
Stack Overflow post
@Rizal Lovins ’ Guide
B) Unofficial ways:Some amazing devs and contributors at xda provided us with tools to sign with ease APKs (without having to think about all of that),I didn’t fully tested every one fo them, but you can try them as an alternative if the “official way” didn’t worked out well.
Here they are:
APK easy tool by @evildog1
APK Sign/Zipalign/Install by @aureljared
Uber APK signer (Github)
VII-Installing the apkYour theme should be ready by now, but how do you want to install it?
There are several ways to get an apk inside your phone, I’ll go over the ones I think are the most common.
A)Regular apk install:Just install it duh… (here you go if you need a little help).
B)Flashable zip:I do recommend making flashable zips, because they’re pretty useful when installing modded system apps. So what is it?
1-Folders:A flashable zip contains 2 folders: META-INF and a folder which will mimic the path to the apk we want to install. Inside that succession of folders, we’ll put our modified apk, and when flashing, the modded apk (inside the zip) will replace the original one inside your phone.
E.g: create system/priv-app/systemUI/systemUI.apk to install a modified systemUI.apk file by replacing the original one
Click to expand...
Click to collapse
E.g: create data/data/com.mixplorer/databases/data.db to replace the original data.db file inside this folder
Click to expand...
Click to collapse
Once you get those folders done (and the apk inside of it), it’s time to write the edify script that’ll flash the zip file.
2-Edify Script:Edify is the language the script will be written in.
The file containing the script is located in /META-INF/com/google/android/updater-script (the name of the file is updater-script, naming it something else would make it ignored by your custom recovery)
Open this document with a text editor, and start coding!
We want to copy/paste the content of our zips onto the system (and replace files), so here’s the precise things we’ll do:
a-(OPTIONAL)Your “intro”:
Using the ui_print(" "); command, we can make some really cool looking ASCII art. You can write comments at whatever steps you want with this command, it’s pretty handy!
ui_print("Your Message here");b-Mount the system partition:
run_program("/sbin/busybox", "mount", "/system");
c-Extract the content of the zip to /system:
package_extract_dir("system", "/system");d-Unmount the system partition:
unmount("/system");This is very basic, you can do so much more with edify script! Set the progress bar progress, set permissions to certain files, delete folders and/or files,...
3-Sign your zip:You need to sign your zip after compressing it! The process looks like the one with key.pk8 and certificate.pem files, so I'll refere again to the same thread for that. (In the Credits)
I've covered the basics, now it's index time, you can go further with the links in the credits, and you can suggest me more!
Credits:
[WIP] How to Write an Updater-Script with Edify Code by @Karadorde
That one covers how to sign your zip:
[TUTORIAL] Making Flashable ZIPs, EDIFY Script, ZIP Signing & Key Creation [19.01.13] by @wilskywalker
My Very Own Script by Me
More Links:
[GUIDE] Create your own Flashable ZIP with custom updater-script and addon.d script by @Primokorn
[TUTORIAL] The updater-script completely explained by @KINGbabasula
Spoiler: Bonus
4-How to make a working progress barFirst “create” the progress bar that can go up to 100%
show_progress(1.000000, 0);Then set the progress after each steps: (here I set it at 10%)
Code: set_progress(0.100000)
C)ADB sideload:Adb allows one to flash zips through command line using a custom recovery.
How to install adbNow how to sideload an apk using adb:
Make sure your phone is plugged, and your PC allowed to use adb on your device. (the last steps of the guide I linked on how to install adb on your pc)
Reboot to recovery
For TWRP : Advanced → ADB Sideload For CWM : Install → Install Zip from Sideload
Code: adb sideload path/to/flashable.zip
And that’s it, congrats
D)Aroma Installer:They’re very cool, yet I’m not really familiar with those.
This concept origins from XDA Inactive Recognized Developer @amarullz , and is used by the OpenGApps team for their Aroma package. Needless to say its work eased the task for many others, feel free to leave a thank on the threads:
Q’n’A about Aroma Installers: [Q&A] AROMA Installer - [Dev Move To DevDB]
Q’n’A about Edify and Aroma: (by @Dblfstr) Aroma, Edify, updater script Question and Answer thread
A tool to create them: [TOOL][3-10-13] Aroma App Package Creator v1.3.2 (by @commandersafi)
VIII-Other ways to theme your deviceMaking the whole apk is often long, and doesn’t leave much control over the theme to the user, alternative ways of theming let users control how they want the theme to be applied. Those 2 ways won’t be covered by me (as I don’t know enough about them yet), that's why, for this part, every input in welcomed
A)Magisk Modules:This is now a pretty common and convenient way to distribute APKs and mods, so I had to cover it. Here’s a link to an official developer guide, it covers a good part of it, if you have an input, it is welcome!
https://topjohnwu.github.io/Magisk/guides.html
B)Substratum Themes:I don’t even need to tell you what is substratum, as it is pretty famous (along with Magisk), but let’s say you’re totally new.
Substratum is a theme engine that allows you to control what element of your system you want to be themed, and apply themes with the possibility of disabling theme at some point in time. So how to make a substratum theme ?
Links:
Video from the XDA chanel on YT
Another one from XDA on YT
Theme template form the official Substratum Github
IX-Theming related topicsAll of the things I couldn't fit in the previous sections are here, make an input, I'll make sure to add it if it's relevant
A)Design Basics:Now I don’t have especially fine taste in terms of designing, but I’m trying to learn!
Here are some links:
The Android Design Resources Forum in XDA
XDA Article about icon design
Material.io
Matrial.io YT channel
B)Boot Animations:Here are some helpful threads and links:
[TUTORIAL]How to make your own boot animations (with sound if you want) by @despotovski01
[GUIDE] How To Make Bootanimation by @jackeagle
[GUIDE][TUT]make/Port any bootanimation|||USING VIDEO/FRAMES by @deathviper
C)Icon Packs:[GUIDE]How to create icon packs for Go/Nova/Apex/Holo/ADW/LauncherPro/XperiaHome by @iamareebjamal
D)Port OEM Apps:[GUIDE/TIPS] How to Port OEM Apps / Vendor Apps to Your Current ROM by @Rizal Lovins , this one is a wealth of information! really good and unique
D)Build.prop:[Tweaks][Guide]Build.prop Tweaks by @bravonova
X-Not covered topicsWhy don’t you talk about … ? That’s theming tho! And what about … and …? What is this thread!
I understand, these are legit claims, but I can’t cover everything. That’s where YOU come in play, you certainly know things that I don’t, so please, if you have any knowledge about something I didn’t mentioned above, please let me know!
I’m trying to make this thread as complete as possible, so I’d be very grateful if you could share a little about your knowledge .
Thank a bunch!
I know I already said that 10000000 times, but really, it would be awesome to have inputs!
XI-Mods and Wallpapers:Let me take a tangent from the original purpose of this thread. This was supposed to be all about guides, but I thought about that twice and I think that's a good idea.
Basically, this here will list some of the amazing mods and themes around xda.
The goal here is to crack open those and see how they work, this would represent an immense work that I'm not able to take on right now, so I may leave links here, and you'll do the jobs of understanding how they work. Maybe at some point I'll write some here (with the credits of the OP of course!), but certainly not now.
Links:
Offline Google LLC App Wallpapers by @[email protected]
XII-Changelog:
For each update I'll bump this thread, so that you can enjoy latest links04-01-2021 Update:
Happy new year! I went through my long list of watched threads, and found the gems I kept selfishly, they're yours now !
Added:
[GUIDE] Create your own Flashable ZIP with custom updater-script and addon.d script
[UNIVERSAL][LOGCAT]How to get & read a logcat/ Troubleshoot your own issues!
[GUIDE/TIPS] How to Port OEM Apps / Vendor Apps to Your Current ROM
[Tweaks][Guide]Build.prop Tweaks
[GUIDE]How to create icon packs for Go/Nova/Apex/Holo/ADW/LauncherPro/XperiaHome
[TUTORIAL] The updater-script completely explained
[TUT][JB] HOW TO THEME SystemUI.apk for TOTALLY newbie
[Reference] Interactive Phone Modification [GUIDE]
[Tutorial][APP] PinP Shortcuts | How to Implement Picture in Picture Mode [API 26+]
Offline Google LLC App Wallpapers
[Overlay] Enable Night Light, Auto-Brightness, Ambient Display & more on Treble ROM
Thanks for this, useful for sure. This is mostly on Windows. There's a way to do this directly on the phone ( most of it anyway).
I use an app called: Apkeditorpro.
I use version 1.9.10 cause i don't like the ui in the newer version.
In it you can :
-edit xmls directly.
-decode the smali and edit them, and view the java code and edit it with no extra tools.
-extract or replace files
-and rebuild the apk when finished. It'll show you a list of compile errors if any when building to review. If the build works it signs it and offers to remove old app and reinstall the new apk.
I found it very useful in editing theme overlays or add fonts in fonts tab in settings.
I am like you an enthusiast in all things modding. Still learning smali/ java editing. Hope we can learn together and from each other
Merry Christmas
Hi is it also valid for Xiaomi apk?
Braain said:
Hi is it also valid for Xiaomi apk?
Click to expand...
Click to collapse
Yep, it's valid for almost anything (any apk at least), feel free to ask here if you encounter problem, I'll do my best to help
Hi I started working with Riru-Enhanced mode for Storage Isolation and some mistakes I made now it's oky now I want to try to modify the handset apk because Xiaomi Redmi 7 is andro system android carefully
Raiz said:
04-01-2021 Update
Click to expand...
Click to collapse
The First Update of this thread is out!, check out the post I quoted to see the list of threads I added, I also integrated them to the main guide (with proper credits), but I think making a list for each update more convenient for you readers.
I recommend to bookmark those thread or to watch them, because some are really amazing!
[QUOTE = "Raiz, post: 84227321, membro: 8020437"]
Il primo aggiornamento di questo thread è uscito !, controlla il post che ho citato per vedere l'elenco dei thread che ho aggiunto, li ho anche integrati nella guida principale (con i crediti appropriati), ma penso che fare un elenco per ogni aggiornamento più conveniente per voi lettori.
Consiglio di aggiungere quei thread ai preferiti o di guardarli, perché alcuni sono davvero fantastici!
[/CITAZIONE]
Great gems, indeed. Let me add this to the collection:
[Samsung only]How to modify stock font app (SamsungOne.apk, SamsungSans.apk, or Fondation.apk)
This post describes it using ApkEditorPro directly on the phone. It could work on other devices if you know what your stock font app is. It's a simple drag and drop your custom files in the right place.