This mod will add a Calculator to your SystemUI.
I recommend that you use mods that will provide additional layouts space/tabs to your SystemUI such as SystemUI Tabs.
Note: Smali files were decompiled using apktool_2.0.0b9, so pls use the same apktool version in decompiling and recompiling your SystemUI.apk
Adding the calculator on SystemUI:
Steps:
1. Decompile your SystemUI.apk
2. Download the attachment (Use the latest version, It contains the needed smali files).
3. Extract the zip file to your decompiled SystemUI.apk folder (/SystemUI.apk/here).
Note: Starting v0.2, you have the option to customize the appearance of your calculator, If you don't want to customize it just extract the SMALI files ONLY, but if you want to customize it further, extract the RES and SMALI folders from the zip file.
4. Open your status_bar_expanded.xml (/SystemUI.apk/res/layout/status_bar_expanded.xml).
5. Insert this code:
Code:
<ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.jeremypacabis.statusbarmods.CalculatorOnSystemUI android:layout_width="match_parent" android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
after
Code:
xmlns:android="http://schemas.android.com/apk/res/android">
OR anywhere in your layout where there is a free space or free layout such as a Tab in your SystemUI.
6. Recompile your SystemUI.apk
7. Push of Flash your SystemUI.apk
Now, you are done adding the calculator on your SystemUI, If you want to customize it (starting CalcOnSystemUI_v0,2), proceed with the next steps:
Customizing the appearance of calculator on SystemUI:
1. Extract the RES folder from the attachment (if you have not extracted it from the previous steps above) into /SystemUI.apk/here.
2. Recompile your SystemUI.apk
3. Decompile your SystemUI.apk into a new location
4. Open public.xml (/SystemUI.apk/res/values/public.xml) and take note of these public ids:
Code:
<public type="drawable" name="calc_display" id="0x7f020179" />
<public type="drawable" name="btnc" id="0x7f020172" />
<public type="drawable" name="btn" id="0x7f02016c" />
Note: These public ids MIGHT BE DIFFERENT from what you will get after recompiling and decompiling your SystemUI.apk, its ok, just take note of them.
5. Open CalculatorOnSystemUI,smali (/SystemUI.apk/smali/com/jeremypacabis/statusbarmods/CalculatorOnSystemUI.smali) and search for these:
Code:
const v0, 0x1080004 # Replace 0x1080004 with your customized number button drawable public id, by default it is android.R.drawable.btn_default
const v0, 0x1080005 # Replace 0x1080005 with your customized operation button drawable public id, by default it is android.R.drawable.btn_default_small
const v0, 0x108001c # Replace 0x108001c with your customized advanced op button drawable public id, by default it is android.R.drawable.gallery_thumb
const v0, 0x1080016 # Replace 0x1080016 with your customized display drawable public id, by default it is android.R.drawable.edit_text
Replace 0x1080004 with the public id you get from <public type="drawable" name="btnc" id="0x7f020172" /> which is 0x7f020172.
Replace 0x1080005 with the public id you get from <public type="drawable" name="btn" id="0x7f02016c" /> which is 0x7f02016c.
Replace 0x108001c with the public id you get from <public type="drawable" name="btn" id="0x7f02016c" /> which is 0x7f02016c.
Replace 0x1080016 with the public id you get from <public type="drawable" name="calc_display" id="0x7f020179" /> which is 0x7f020179.
SO my new code based from the public ids I get after recompiling and decompiling is:
Code:
const v0, 0x7f020172 # Replace 0x1080004 with your customized number button drawable public id, by default it is android.R.drawable.btn_default
const v0, 0x7f02016c # Replace 0x1080005 with your customized operation button drawable public id, by default it is android.R.drawable.btn_default_small
const v0, 0x7f02016c # Replace 0x108001c with your customized advanced op button drawable public id, by default it is android.R.drawable.gallery_thumb
const v0, 0x7f020179 # Replace 0x1080016 with your customized display drawable public id, by default it is android.R.drawable.edit_text
6. Save your edited CalculatorOnSystemUI.smali
7. Recompile your new SystemUI.apk
8. Push of Flash your SystemUI.apk
Screenshots:
v0.1 - basic calculator only
{
"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"
}
v0.2 - calculator with some advance functions (not customized)
v0.2 - calculator with some advance functions (customized)
Needed Files:
View attachment CalcOnSystemUI.zip v0.1
-Basic calculator only
View attachment CalcOnSystemUI_v0.2.zip v0.2
-Added some advanced functions
-Can be customized further
Source Codes?
You want to play with the code? Add functions? Explore and Learn? Copy method snippets? You can check it at my GitHub.:good::
Suggestions? Comments? Bugs (I hope none)?
Just post a reply here and I will try to attend to it. (The word "try" always has a "catch" Exception, iykwim.)
How to change the calculator .png?
the_vanya1 said:
How to change the calculator .png?
Click to expand...
Click to collapse
I already thought of changing the background of buttons sir, Its already in my source code, but when I compiled the APK and decompiled for the SMALI, my method did not work. This code from CalculatorOnSystemUI.smali should take care of the button png,
Code:
.field private static final BTN_NUM_BG:I = 0x1080004 # Public drawable id for numbers button
.field private static final BTN_OP_BG:I = 0x1080005 # Public drawable id for operations button
but it did not work. I already have custom buttons but unfortunately did not work so I did not include it.
I will update the smali, so that we can customize the buttons, I will also include some scientific function in the update.
EDIT: I have updated the SMALI with new functions and you can customize it now
Related
First of all: this guide is based off the guide by @lukakas found here http://forum.xda-developers.com/showthread.php?t=2460877
I tweaked it to get it to work on CM11, comparing the files of the Z2 system dump, the 4.3 resources provided in the guide by @lukakas and compared the difference with CM11 files.
In this guide I am using OPENsemc rom beta 3, wich is CyanogenMod 11 / Android KitKat
Before flashing the files, perform a FULL BACKUP in case something goes wrong!
Code:
I will NOT be held responsible if something happens to your device while or after flashing any of these files! All flashing is done at your OWN RISK.
I recommend using Virtuous Ten Studio for editing the files. It can be downloaded from: http://www.virtuous-ten-studio.com/index.php/downloads
Setting up Virtuous Ten Studio
Click on “File” then on “Open Settings” then proceed to ApkTool, and install Framework-res.apk from the rom you are trying to port SmallApps to by clicking on “Add single framework”
{
"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"
}
Android.policy.jar
Click on “Open” then on “New Project” and import anroid.policy.jar as shown below:
(note, in properties/settings click on “Smali” and make sure the API is set to 4.4 KitKat)
Now open smali\com\android\internal\policy\impl\PhoneWindowManager.smali and select checkAddPermission from the dropdown menu
Find and alter the following lines of code: (added code is marked in green)
.method public checkAddPermission(Landroid/view/WindowManager$LayoutParams;[I)I
(Lines of code not needed in the part of the tutorial has been cut, do not delete them though)
:cond_1
const/4 v0, 0x0
.line 1609
.local v0, permission:Ljava/lang/String;
sparse-switch v1, :sswitch_data_0
(Lines of code not needed in the part of the tutorial has been cut, do not delete them though)
:sswitch_1
const-string v0, "android.permission.SYSTEM_ALERT_WINDOW"
.line 1627
const/16 v3, 0x18
aput v3, p2, v2
goto :goto_1
.line 1397 - This number should be a new number and should not be found elsewhere in this document
:sswitch_2
const-string v0, "com.sony.smallapp.permission.SMALLAPP"
.line 1398 - This number should be a new number and should not be found elsewhere in this document
goto :goto_1
.line 1609 - This number must match the number above the line.local v0, permission:Ljava/lang/String;
nop
:sswitch_data_0
.sparse-switch
0x7d2 -> :sswitch_1
0x7d3 -> :sswitch_1
0x7d5 -> :sswitch_0
0x7d6 -> :sswitch_1
0x7d7 -> :sswitch_1
0x7da -> :sswitch_1
0x7db -> :sswitch_0
0x7dd -> :sswitch_0
0x7e7 -> :sswitch_0
0xbb5 -> :sswitch_2
0xbb6 -> :sswitch_2
.end sparse-switch
.end method
Press control s to save the document and recompile it: (use right click on android.policy and click “Build project”
Framework2.jar
For this step, import and decompile Framework2.jar like in steps show above. Right click on “framework2” and select “Open in windows explorer”
In the explorer screen, navigate to Data/smali/com, copy and paste the “sony” folder provided in the resources zip. Once done, right click on “framework2” and select “Reload project”
Once the project has reloaded, right click on “framework2” and select “Build project”
Framework-res.apk
Import framework-res.apk into the project.
Note: make sure before importing that in the Apk-Tool section you select “Use newest ApkTool” and that you select the Framework tag. (Remember you installed framework-res.apk earlier?)
Once framework-res.apk has imported, open AndroidManifest.XML
Add the lines marked in green like below.
<permission android:name="com.sony.smallapp.permission.CONTROL_SMALLAPP" androidrotectionLevel="system|signature" />
<permission android:label="@string/permlab_smallapp" android:name="com.sony.smallapp.permission.SMALLAPP" androidrotectionLevel="dangerous" android:description="@string/permdesc_smallapp" />
<permission android:label="@string/permlab_taskSwitcherPluginView" android:name="com.sonymobile.permission.TASK_SWITCHER_PLUGIN_VIEW" androidrotectionLevel="signatureOrSystem" android:description="@string/permdesc_taskSwitcherPluginView" />
<permission android:name="com.sonymobile.permission.ACCESS_BEACON_MANAGER" androidrotectionLevel="system|signature" />
Don’t forget to save the modifications you just made.
Next up: open res/values/ and open “strings.xml”
At the end of the file, copy the green lines:
<string name="permlab_smallapp">Small application overlay</string>
<string name="permdesc_smallapp">Allows running movable small applications on top of other applications.</string>
<string name="permlab_taskSwitcherPluginView">Provide plugin-view to the task-switcher</string>
<string name="permdesc_taskSwitcherPluginView">Allows the application to provide a plugin-view to the task-switcher</string>
Save your modifications and and “Build project”
SystemUI.apk
This part can be the trickiest and can cause a lot of headache. Import SystemUI.apk and open AndroidManifest.xml
Note: make sure before importing that in the Apk-Tool section you select “Use newest ApkTool” and that you select the Framework tag.
Add the lines marked in green like below.
<uses-permission android:name="com.sonymobile.permission.XSSM_PROVIDER" />
<uses-permission android:name="com.sonymobile.permission.XSSM" />
<uses-permission android:name="android.permission.BIND_APPWIDGET" />
<uses-permission android:name="com.sony.smallapp.app.widget.permission.BIND_SMALLAPP_WIDGET_MANAGER" />
<uses-permission android:name="com.sony.smallapp.permission.SMALLAPPMANAGER_CONTROL" />
<uses-permission android:name="com.sony.smallapp.launcher.permission.ACCESS_DATABASE" />
<uses-permission android:name="android.permission.DELETE_PACKAGES" />
<permission android:name="com.sonymobile.permission.TASK_SWITCHER_PLUGIN_VIEW" androidrotectionLevel="normal" />
Add the lines marked in green like below. (in Recents Activity)
<action android:name="com.android.systemui.recent.action.OPEN_RECENTS_INTENT_FROM_SMALL_APP_LAUNCHER" />
Now navigate to res/values/ and open “attrs.xml”
Add the line marked in green at the end of the file:
<attr name="lookupKey" format="string" />
Now navigate to res/values/ and open “ids.xml”
Add the line marked in green at the end of the file:
<item type="id" name="recent_wipe_app">false</item>
<item type="id" name="recents_inject_custom_view">false</item>
<item type="id" name="recents_layout">false</item>
<item type="id" name="recents_pluginview_container">false</item>
Now navigate to res/values/ and open “public.xml”
Since we will be working with hex id’s, a word of advice.
Always create a new hex id in this file. Duplicating other hex number will result in a fail when trying to recompile
As an example:
<public type="attr" name="maxSize" id="0x7f010008" />
<public type="attr" name="holdTime" id="0x7f010009" />
<public type="attr" name="decayTime" id="0x7f01000a" />
<public type="attr" name="orientation" id="0x7f01000b" />
<public type="attr" name="singleRow" id="0x7f01000c" />
<public type="attr" name="lookupKey" id="0x7f01000d" />
Notice that all the hex number are sequential? All these numbers are only found once in the entire document. If I were to add another line below LookupKey it would look like this:
<public type="attr" name="Tutorial" id="0x7f01000e" />
When in doubt as to if the number you assigned to a line, just copy the hex number and use control f to search for it. When you can’t find another line with that number, you know that your hex number is one of a kind.
Let’s get started shall we.
First of all locate the last “attr” line and add the line below marked in green:
<public type="attr" name="lookupKey" id="PUT_HEX_HERE" />
Locate the last “layout” line (like where you put LookupKey in the example above) and add line below marked in green:
<public type="layout" name="plugin_view" id="PUT_HEX_HERE" />
Locate the last “id” line and do the same with the line below
<public type="id" name="recents_inject_custom_view" id=" PUT_HEX_HERE" " />
<public type="id" name="recents_layout" id=" PUT_HEX_HERE" " />
<public type="id" name="recents_pluginview_container" id=" PUT_HEX_HERE" " />
Now copy and paste (and overwrite) the files in the resources to res/layout and res/layout-land.
Now copy and paste (and overwrite) the .smali files in the resources to com/android/systemui and com/android/systemui/recent
Before going any further, don’t forget to save ALL the modifications you made and after that you need to right click on “SystemUI” and click on “Reload project”
Now open up RecentsActivity.smali
Virtuous Ten Studio helps you in which lines you need to alter. Every line that has an hex id will be marked by a little blue box
In the example above, 0x7f07007f represents “recents_pluginview_container” you need to change that hex number to the number you assigned to it earlier in “public.xml”
You need to change every hex number in this file to match the hex numbers you assigned earlier.
These are:
recents_pluginview_container
recents_layout
plugin_view
status_bar_recent_panel
recents_root
config_recent_item_min_alpha
recents_pluginview_container
recents_return_to_launcher_enter
recents_return_to_launcher_exit
Note that the list above is in the same order as the lines containing the hex numbers in RecentsActivity.smali. This means that “recents_pluginview_container” represents the first hex number, “recents_layout” the second, “plugin_view” the third etc. etc.
Once that is done, save the file and open R$styleable.smali.
Find line: sput-object v0, Lcom/android/systemui/R$styleable;->RecentsPanelView:[I
Change that hex id to match the id for LookupKey, you added that in “public.xml”.
Save all modifications and build your project.
Zip up all the files in a flashable zip and start flashing
These are all the steps I made to get it working, I hope this guide will help others to port SmallApps/Taskswitcher.
nice i will try when i come home.
thanks the guide
Sent from my LT26i using xda app-developers app
Well done!
@Kevin-0100, mate where to find Recent Activity? is it in the " smali\com\android\systemui\recent " ??
EDIT: found it already :3
@Kevin-0100
EDIT: im having these errors while doing the last step mate. pls help
In the top bar in VTS, click on view log. There you will find which lines are causing the build error. Are you trying to port it tot OmniRom? If so you should not copy and paste the .smali files in my resources as they come from another ROM (opensemc). Try using the .smali files from the OmniRom
Sent from my Xperia S using XDA Premium 4 mobile app
Ohh ok tnx mate
Sent from my LT26ii using xda premium
Error on
\res\layout\status_bar_recent_panel.xml:11: error: Error: No resource found that matches the given name (at 'id' with value '@id/recents_clear').'
\res\layout-land\status_bar_recent_panel.xml:11: error: Error: No resource found that matches the given name (at 'id' with value '@id/recents_clear').'
what should I do
Using Beanstalk ROM
I found similar error and fix by find some similar picture
I already change @drawable/ic_recents_clear to @drawable/ic_notify_clear_normal in both status_bar_recent_panel.xml
@MaDMaT80 can you add this taskswitcher and small apps to your 4.4 kitkat rom..it would be awsome..
Sent from my LT28h using Tapatalk
nut27455 said:
Error on
\res\layout\status_bar_recent_panel.xml:11: error: Error: No resource found that matches the given name (at 'id' with value '@id/recents_clear').'
\res\layout-land\status_bar_recent_panel.xml:11: error: Error: No resource found that matches the given name (at 'id' with value '@id/recents_clear').'
what should I do
Using Beanstalk ROM
I found similar error and fix by find some similar picture
I already change @drawable/ic_recents_clear to @drawable/ic_notify_clear_normal in both status_bar_recent_panel.xml
Click to expand...
Click to collapse
You need to go to res/values/ids and make a new value for recents_clear. That should fix it
Sent from my C1905 using XDA Premium 4 mobile app
Kevin-0100 said:
You need to go to res/values/ids and make a new value for recents_clear. That should fix it
Sent from my C1905 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Thank you it work for build.
But FC when open recent in phone.
Anyway thank you for sharing this.
If you get a logcat you could try finding the reason for the FC
Sent from my C1905 using XDA Premium 4 mobile app
Got it
I/dalvikvm(3258): Could not find method com.android.systemui.recent.RecentsActivity.dismissAndDoNothing, referenced from method com.android.systemui.recent.RecentsPanelView.dismissAndDoNothing
W/dalvikvm(3258): VFY: unable to resolve virtual method 4171: Lcom/android/systemui/recent/RecentsActivity;.dismissAndDoNothing ()V
There is an error in your RecentsActivity.smali. Open that file and search for PanelView and see if everything is correct. I think the FC may be caused by an error in the PanelView section.
Sent from my C1905 using XDA Premium 4 mobile app
@Kevin-0100
I can't understant last step.In oldu version. 10.1 Op write the line which we must past the hex code at the public. Find the blué line in RecentsActivity.smali but which is the "recents_pluginview_container" or "recents_layout" cant find.
You will not find "recents_activity" etc. In Recentsactivity.smali the names are replaced with hex numbers. Follow the last step precisely (using virtuous ten studio) and you will find which lines to edit
Sent from my C1905 using XDA Premium 4 mobile app
Good working i'll be add my rom. Thanks
Kevin-0100 said:
First of all: this guide is based off the guide by @lukakas found here http://forum.xda-developers.com/showthread.php?t=2460877
I tweaked it to get it to work on CM11, comparing the files of the Z2 system dump, the 4.3 resources provided in the guide by @lukakas and compared the difference with CM11 files.
In this guide I am using OPENsemc rom beta 3, wich is CyanogenMod 11 / Android KitKat
Before flashing the files, perform a FULL BACKUP in case something goes wrong!
Code:
I will NOT be held responsible if something happens to your device while or after flashing any of these files! All flashing is done at your OWN RISK.
I recommend using Virtuous Ten Studio for editing the files. It can be downloaded from: http://www.virtuous-ten-studio.com/index.php/downloads
Setting up Virtuous Ten Studio
Click on “File” then on “Open Settings” then proceed to ApkTool, and install Framework-res.apk from the rom you are trying to port SmallApps to by clicking on “Add single framework”
Android.policy.jar
Click on “Open” then on “New Project” and import anroid.policy.jar as shown below:
(note, in properties/settings click on “Smali” and make sure the API is set to 4.4 KitKat)
Now open smali\com\android\internal\policy\impl\PhoneWindowManager.smali and select checkAddPermission from the dropdown menu
Find and alter the following lines of code: (added code is marked in green)
.method public checkAddPermission(Landroid/view/WindowManager$LayoutParams;[I)I
(Lines of code not needed in the part of the tutorial has been cut, do not delete them though)
:cond_1
const/4 v0, 0x0
.line 1609
.local v0, permission:Ljava/lang/String;
sparse-switch v1, :sswitch_data_0
(Lines of code not needed in the part of the tutorial has been cut, do not delete them though)
:sswitch_1
const-string v0, "android.permission.SYSTEM_ALERT_WINDOW"
.line 1627
const/16 v3, 0x18
aput v3, p2, v2
goto :goto_1
.line 1397 - This number should be a new number and should not be found elsewhere in this document
:sswitch_2
const-string v0, "com.sony.smallapp.permission.SMALLAPP"
.line 1398 - This number should be a new number and should not be found elsewhere in this document
goto :goto_1
.line 1609 - This number must match the number above the line.local v0, permission:Ljava/lang/String;
nop
:sswitch_data_0
.sparse-switch
0x7d2 -> :sswitch_1
0x7d3 -> :sswitch_1
0x7d5 -> :sswitch_0
0x7d6 -> :sswitch_1
0x7d7 -> :sswitch_1
0x7da -> :sswitch_1
0x7db -> :sswitch_0
0x7dd -> :sswitch_0
0x7e7 -> :sswitch_0
0xbb5 -> :sswitch_2
0xbb6 -> :sswitch_2
.end sparse-switch
.end method
Press control s to save the document and recompile it: (use right click on android.policy and click “Build project”
Framework2.jar
For this step, import and decompile Framework2.jar like in steps show above. Right click on “framework2” and select “Open in windows explorer”
In the explorer screen, navigate to Data/smali/com, copy and paste the “sony” folder provided in the resources zip. Once done, right click on “framework2” and select “Reload project”
Once the project has reloaded, right click on “framework2” and select “Build project”
Framework-res.apk
Import framework-res.apk into the project.
Note: make sure before importing that in the Apk-Tool section you select “Use newest ApkTool” and that you select the Framework tag. (Remember you installed framework-res.apk earlier?)
Once framework-res.apk has imported, open AndroidManifest.XML
Add the lines marked in green like below.
<permission android:name="com.sony.smallapp.permission.CONTROL_SMALLAPP" androidrotectionLevel="system|signature" />
<permission android:label="@string/permlab_smallapp" android:name="com.sony.smallapp.permission.SMALLAPP" androidrotectionLevel="dangerous" android:description="@string/permdesc_smallapp" />
<permission android:label="@string/permlab_taskSwitcherPluginView" android:name="com.sonymobile.permission.TASK_SWITCHER_PLUGIN_VIEW" androidrotectionLevel="signatureOrSystem" android:description="@string/permdesc_taskSwitcherPluginView" />
<permission android:name="com.sonymobile.permission.ACCESS_BEACON_MANAGER" androidrotectionLevel="system|signature" />
Don’t forget to save the modifications you just made.
Next up: open res/values/ and open “strings.xml”
At the end of the file, copy the green lines:
<string name="permlab_smallapp">Small application overlay</string>
<string name="permdesc_smallapp">Allows running movable small applications on top of other applications.</string>
<string name="permlab_taskSwitcherPluginView">Provide plugin-view to the task-switcher</string>
<string name="permdesc_taskSwitcherPluginView">Allows the application to provide a plugin-view to the task-switcher</string>
Save your modifications and and “Build project”
SystemUI.apk
This part can be the trickiest and can cause a lot of headache. Import SystemUI.apk and open AndroidManifest.xml
Note: make sure before importing that in the Apk-Tool section you select “Use newest ApkTool” and that you select the Framework tag.
Add the lines marked in green like below.
<uses-permission android:name="com.sonymobile.permission.XSSM_PROVIDER" />
<uses-permission android:name="com.sonymobile.permission.XSSM" />
<uses-permission android:name="android.permission.BIND_APPWIDGET" />
<uses-permission android:name="com.sony.smallapp.app.widget.permission.BIND_SMALLAPP_WIDGET_MANAGER" />
<uses-permission android:name="com.sony.smallapp.permission.SMALLAPPMANAGER_CONTROL" />
<uses-permission android:name="com.sony.smallapp.launcher.permission.ACCESS_DATABASE" />
<uses-permission android:name="android.permission.DELETE_PACKAGES" />
<permission android:name="com.sonymobile.permission.TASK_SWITCHER_PLUGIN_VIEW" androidrotectionLevel="normal" />
Add the lines marked in green like below. (in Recents Activity)
<action android:name="com.android.systemui.recent.action.OPEN_RECENTS_INTENT_FROM_SMALL_APP_LAUNCHER" />
Now navigate to res/values/ and open “attrs.xml”
Add the line marked in green at the end of the file:
<attr name="lookupKey" format="string" />
Now navigate to res/values/ and open “ids.xml”
Add the line marked in green at the end of the file:
<item type="id" name="recent_wipe_app">false</item>
<item type="id" name="recents_inject_custom_view">false</item>
<item type="id" name="recents_layout">false</item>
<item type="id" name="recents_pluginview_container">false</item>
Now navigate to res/values/ and open “public.xml”
Since we will be working with hex id’s, a word of advice.
Always create a new hex id in this file. Duplicating other hex number will result in a fail when trying to recompile
As an example:
<public type="attr" name="maxSize" id="0x7f010008" />
<public type="attr" name="holdTime" id="0x7f010009" />
<public type="attr" name="decayTime" id="0x7f01000a" />
<public type="attr" name="orientation" id="0x7f01000b" />
<public type="attr" name="singleRow" id="0x7f01000c" />
<public type="attr" name="lookupKey" id="0x7f01000d" />
Notice that all the hex number are sequential? All these numbers are only found once in the entire document. If I were to add another line below LookupKey it would look like this:
<public type="attr" name="Tutorial" id="0x7f01000e" />
When in doubt as to if the number you assigned to a line, just copy the hex number and use control f to search for it. When you can’t find another line with that number, you know that your hex number is one of a kind.
Let’s get started shall we.
First of all locate the last “attr” line and add the line below marked in green:
<public type="attr" name="lookupKey" id="PUT_HEX_HERE" />
Locate the last “layout” line (like where you put LookupKey in the example above) and add line below marked in green:
<public type="layout" name="plugin_view" id="PUT_HEX_HERE" />
Locate the last “id” line and do the same with the line below
<public type="id" name="recents_inject_custom_view" id=" PUT_HEX_HERE" " />
<public type="id" name="recents_layout" id=" PUT_HEX_HERE" " />
<public type="id" name="recents_pluginview_container" id=" PUT_HEX_HERE" " />
Now copy and paste (and overwrite) the files in the resources to res/layout and res/layout-land.
Now copy and paste (and overwrite) the .smali files in the resources to com/android/systemui and com/android/systemui/recent
Before going any further, don’t forget to save ALL the modifications you made and after that you need to right click on “SystemUI” and click on “Reload project”
Now open up RecentsActivity.smali
Virtuous Ten Studio helps you in which lines you need to alter. Every line that has an hex id will be marked by a little blue box
In the example above, 0x7f07007f represents “recents_pluginview_container” you need to change that hex number to the number you assigned to it earlier in “public.xml”
You need to change every hex number in this file to match the hex numbers you assigned earlier.
These are:
recents_pluginview_container
recents_layout
plugin_view
status_bar_recent_panel
recents_root
config_recent_item_min_alpha
recents_pluginview_container
recents_return_to_launcher_enter
recents_return_to_launcher_exit
Note that the list above is in the same order as the lines containing the hex numbers in RecentsActivity.smali. This means that “recents_pluginview_container” represents the first hex number, “recents_layout” the second, “plugin_view” the third etc. etc.
Once that is done, save the file and open R$styleable.smali.
Find line: sput-object v0, Lcom/android/systemui/R$styleable;->RecentsPanelView:[I
Change that hex id to match the id for LookupKey, you added that in “public.xml”.
Save all modifications and build your project.
Zip up all the files in a flashable zip and start flashing
These are all the steps I made to get it working, I hope this guide will help others to port SmallApps/Taskswitcher.
Click to expand...
Click to collapse
when i recompile, erro RecentsActivity$1.smali show screenshotView attachment 2715043
You should use apktool 1.5.2 and not 2.0 beta (you are probably using he beta version
Kevin-0100 said:
You should use apktool 1.5.2 and not 2.0 beta (you are probably using he beta version
Click to expand...
Click to collapse
Can you prapere video. i think better than this. Thanks.
carlito-lt26i said:
when i recompile, erro RecentsActivity$1.smali show screenshotView attachment 2715043
Click to expand...
Click to collapse
+1
Hello today I am Bring My first thread how to ad AF Volume Panel to Android Mobile Its Very Easy Methods to Do it. I have waste many time to do make some smali codes so don't kang this smali .ok Lets Start
Requirement:
Apktool http://forum.xda-developers.com/showthread.php?t=1755243
Framework.jar from ur phone
Framework-res.apk from ur phone
Nice Brain to Understand
Instructions:
Step 1 :- Decompile Framework-res.apk
Step 2 :- Open decompiled folder / values / ids.xml and Merged down the Framework-res.zip with ur Decompiled Folder
Step 3 :-
Code:
<item type="id" name="warning_message_af">false</item>
before </resources>
Step 4 :- Open layout/volume_adjust.xml Remove All lines
Step 5 :- Add This
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_horizontal" android:orientation="vertical" android:background="@drawable/panel_background" android:layout_width="300.0dip" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:textAppearance="?textAppearanceMedium" android:id="@id/message" android:layout_width="0.0dip" android:layout_height="0.0dip" />
<TextView android:textAppearance="?textAppearanceSmall" android:id="@id/additional_message" android:layout_width="0.0dip" android:layout_height="0.0dip" />
<LinearLayout android:gravity="left|center" android:orientation="horizontal" android:layout_width="280.0dip" android:layout_height="45.0dip" android:layout_marginTop="6.0dip" android:layout_marginBottom="6.0dip">
<ImageView android:id="@id/other_stream_icon" android:padding="0.0dip" android:layout_width="42.0dip" android:layout_height="32.0dip" />
<ImageView android:id="@id/ringer_stream_icon" android:padding="0.0dip" android:layout_width="42.0dip" android:layout_height="32.0dip" />
<ProgressBar android:id="@id/level" android:layout_width="215.0dip" android:layout_height="32.0dip" android:layout_marginRight="16.0dip" android:progressDrawable="@drawable/progress_volume_adjust" style="?android:attr/progressBarStyleHorizontal" />
<TextView android:textAppearance="?textAppearanceSmall" android:id="@id/warning_message_af" android:layout_width="195.0dip" android:layout_height="wrap_content" android:layout_marginLeft="15.0dip" android:layout_marginTop="3.0dip" android:layout_marginRight="15.0dip" android:layout_marginBottom="5.0dip" />
</LinearLayout>
</LinearLayout>
Step 6 :- Recompile the framework-res.apk
Step 7 :- Decompile The Output framework-res.apk one
Step 8 :- Open values/public.xml
Step 9 :- Search for
Code:
<public type="id" name="warning_message"
Step 10 :- Note Down public id we need
Step 11 :- Decompile framework.jar
Step 12 :- Downloads The Attachment and merged with ur Decompiled folder
Step 13 :- Open smali / android / view
Step 14 :- Open VolumePanel
Step 15 :- Search for 0x1020263
Step 16 :- You will See
HTML:
.line 148
const v4, 0x1020263
invoke-virtual {v3, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v4
check-cast v4, Landroid/widget/TextView;
iput-object v4, p0, Landroid/view/VolumePanel;->mWarningMessage:Landroid/widget/TextView;
Step 17 :- Change smali codes first list five digit like if my warning_message_af is 0x01020265] Volume Panel ids is 0x1020263
then we have replace waring public codes id to volume panel ids only last five digit
Step 18 :- Recompile The Framework.jar
Step 19 :- Sign The The Two apps
Step 20:- Push to ur phone
Step 21 :- Happy Modding
Result:
{
"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"
}
hey sir @AndroidFire i got error at [email protected]_volume_adjust
Mranggapo said:
hey sir @AndroidFire i got error at [email protected]_volume_adjust
Click to expand...
Click to collapse
Give me Logs of Your Error
Edit: Follow These Guide http://forum.xda-developers.com/showthread.php?t=2806060
@op Can i add your guide on my thread ?
Sure
AbhiLP said:
@op Can i add your guide on my thread ?
Click to expand...
Click to collapse
:good: Yeah Sure by pressing Thanks and Giving Proper Credit check my other guide maybe useful for u http://forum.xda-developers.com/showpost.php?p=53960404&postcount=2
Hi
Thanks alot
I change my volume panel
--------------
Is a way to add sound setting to volume panel??
Excuse me For MY Bad ENGLISH
danial199 said:
Hi
Thanks alot
I change my volume panel
--------------
Is a way to add sound setting to volume panel??
Excuse me For MY Bad ENGLISH
Click to expand...
Click to collapse
Thx
I have already try I have make it when I implemented to the system it is exception and so I drop this project
Sent from my SM-G530H using XDA Free mobile app
AndroidFire said:
Thx
I have already try I have make it when I implemented to the system it is exception and so I drop this project
Sent from my SM-G530H using XDA Free mobile app
Click to expand...
Click to collapse
So there isnt any way??
You dont try again?
Do not do another one?
Excuse me for bad English
This mod will provide ten (10) Tabs which supports ten layouts to your SystemUI.
Note: Smali files were decompiled using apktool_2.0.0b9, so pls use the same apktool version in decompiling and recompiling your SystemUI.apk
Steps:
1. Decompile your SystemUI.apk
2. Download the attachment (it contains the needed drawables and smali files).
3. Extract the zip file to your decompiled SystemUI.apk folder (/SystemUI.apk/here).
4. Open your ids.xml (/SystemUI.apk/res/values/ids.xml) then add this code before </resources>
Code:
<item type="id" name="tentabs">false</item>
5. Open your status_bar_expanded.xml (/SystemUI.apk/res/layout/status_bar_expanded.xml) then add this code after
Code:
xmlns:android="http://schemas.android.com/apk/res/android">
OR anywhere in your status_bar_expanded layout, its up to you to layout it as long as it looks like this:
Code:
xmlns:android="http://schemas.android.com/apk/res/android">
<com.jeremypacabis.statusbarmods.TenTabsViewChanger android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<com.jeremypacabis.statusbarmods.TenTabs android:id="@id/tentabs" android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="First Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Second Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Third Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Fourth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Fifth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Sixth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Seventh Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Eight Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Ninth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Tenth Layout" />
</com.jeremypacabis.statusbarmods.TenTabs>
Note: Every TextView in my example code represents a layout so its up to you to change it, AS LONG AS THE
com.jeremypacabis.statusbarmods.TenTabs has EXACTLY ten (10) child layouts within it. You can change a TextView into:
Code:
<ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" >
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" >
// YOUR CONTENTS FOR A LAYOUT HERE
</LinearLayout>
</ScrollView>
The above code is considered as ONE CHILD VIEW or LAYOUT.
6. Recompile your SystemUI.apk
7. Decompile your new SystemUI.apk into a new location.
8. Now we will work with the SMALI part of the newly decompiled SystemUI.apk
Now for the SMALI part:
1. After decompiling the new SystemUI.apk take note of these codes from your public.xml (/SystemUI.apk/res/values/public.xml):
Code:
<public type="id" name="tentabs" id="0x7f0a003a" />
<public type="drawable" name="zzz_tab_1" id="0x7f020162" />
<public type="drawable" name="zzz_tab_10" id="0x7f020163" />
<public type="drawable" name="zzz_tab_2" id="0x7f020164" />
<public type="drawable" name="zzz_tab_3" id="0x7f020165" />
<public type="drawable" name="zzz_tab_4" id="0x7f020166" />
<public type="drawable" name="zzz_tab_5" id="0x7f020167" />
<public type="drawable" name="zzz_tab_6" id="0x7f020168" />
<public type="drawable" name="zzz_tab_7" id="0x7f020169" />
<public type="drawable" name="zzz_tab_8" id="0x7f02016a" />
<public type="drawable" name="zzz_tab_9" id="0x7f02016b" />
Note: These were the public ids I got from decompiling my new SystemUI.apk after adding the drawables and the "tentabs" id. These public ids MAY BE DIFFERENT from what you will get after decompiling your own SystemUI.apk.
2. Now open TenTabs.smali from /SystemUI.apk/smali/com/jeremypacabis/statusbarmods/TenTabs.smali and look for
Code:
const v10, 0x7f060005 # Replace 0x7f060005 with your public.xml tentabs public id
As what the comment says, replace 0x7f060005 with your tentabs public id, which in my case from the example above is 0x7f0a003a. So it will now become:
Code:
const v10, 0x7f0a003a # Replace 0x7f060005 with your public.xml tentabs public id
Note: Your tentabs id might be different, it is still ok and just replace it with yours, and in a SMALI, everything in a line followed by a hashtag or number sign symbol # is just a comment, so you can just ignore it.
3. Save your edited TenTabs.smali
4. Open TenTabsViewChanger.smali from /SystemUI.apk/smali/com/jeremypacabis/statusbarmods/TenTabsViewChanger.smali and just search for my comments for the id of the drawables for the tabs and replace it as what the comment says.
Code:
const v1, 0x7f020001 # your tab 1 drawable id here
const v1, 0x7f020003 # your tab 2 drawable id here
const v1, 0x7f020004 # your tab 3 drawable id here
const v1, 0x7f020005 # your tab 4 drawable id here
const v1, 0x7f020006 # your tab 5 drawable id here
const v1, 0x7f020007 # your tab 6 drawable id here
const v1, 0x7f020008 # your tab 7 drawable id here
const v1, 0x7f020009 # your tab 8 drawable id here
const v1, 0x7f02000a # your tab 9 drawable id here
const v1, 0x7f020002 # your tab 10 drawable id here
Note: tab 1 drawable id corresponds to 0x7f020162 from <public type="drawable" name="zzz_tab_1" id="0x7f020162" />, tab 2 drawable id corresponds to 0x7f020164 from <public type="drawable" name="zzz_tab_2" id="0x7f020164" /> and so on and so forth. So your new code from my example public ids from above is:
Code:
const v1, 0x7f020162 # your tab 1 drawable id here
const v1, 0x7f020164 # your tab 2 drawable id here
const v1, 0x7f020165 # your tab 3 drawable id here
const v1, 0x7f020166 # your tab 4 drawable id here
const v1, 0x7f020167 # your tab 5 drawable id here
const v1, 0x7f020168 # your tab 6 drawable id here
const v1, 0x7f020169 # your tab 7 drawable id here
const v1, 0x7f02016a # your tab 8 drawable id here
const v1, 0x7f02016b # your tab 9 drawable id here
const v1, 0x7f020163 # your tab 10 drawable id here
5. Now save your edited smali, or review and double check the numbers, If you are confident enough then you may proceed.
6. Recompile your SystemUI.apk
7. Push or Flash your SystemUI.apk and see if your mod works.
Credits:
I used the Black Andy Head With 1% White Text by unknown battery icons for the tab example drawable from TickleMyAndroid user_files.
Screenshots:
{
"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"
}
Needed files:
View attachment TenTabsFiles.zip v0.1
Source Codes?
You want to play with the code? Add functions? Explore and Learn? Copy method snippets? You can check it at my GitHub.:good::
Suggestions? Comments? Bugs (I hope none)?
Just post a reply here and I will try to attend to it. (The word "try" always has a "catch" Exception, iykwim.)
thx, now i have 15 tabs
73R3WY said:
This mod will provide ten (10) Tabs which supports ten layouts to your SystemUI.
Note: Smali files were decompiled using apktool_2.0.0b9, so pls use the same apktool version in decompiling and recompiling your SystemUI.apk
Steps:
1. Decompile your SystemUI.apk
2. Download the attachment (it contains the needed drawables and smali files).
3. Extract the zip file to your decompiled SystemUI.apk folder (/SystemUI.apk/here).
4. Open your ids.xml (/SystemUI.apk/res/values/ids.xml) then add this code before </resources>
Code:
<item type="id" name="tentabs">false</item>
5. Open your status_bar_expanded.xml (/SystemUI.apk/res/layout/status_bar_expanded.xml) then add this code after
Code:
xmlns:android="diordna/ser/kpa/moc.diordna.samehcs//:ptth">
Note: I reversed the code above because xda recognizes it as an external link.
OR anywhere in your status_bar_expanded layout, its up to you to layout it as long as it looks like this:
Code:
xmlns:android="diordna/ser/kpa/moc.diordna.samehcs//:ptth">
<com.jeremypacabis.statusbarmods.TenTabsViewChanger android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<com.jeremypacabis.statusbarmods.TenTabs android:id="@id/tentabs" android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="First Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Second Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Third Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Fourth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Fifth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Sixth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Seventh Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Eight Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Ninth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Tenth Layout" />
</com.jeremypacabis.statusbarmods.TenTabs>
Note: Every TextView in my example code represents a layout so its up to you to change it, AS LONG AS THE
com.jeremypacabis.statusbarmods.TenTabs has EXACTLY ten (10) child layouts within it. You can change a TextView into:
Code:
<ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" >
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" >
// YOUR CONTENTS FOR A LAYOUT HERE
</LinearLayout>
</ScrollView>
The above code is considered as ONE CHILD VIEW or LAYOUT.
6. Recompile your SystemUI.apk
7. Decompile your new SystemUI.apk into a new location.
8. Now we will work with the SMALI part of the newly decompiled SystemUI.apk
Now for the SMALI part:
1. After decompiling the new SystemUI.apk take note of these codes from your public.xml (/SystemUI.apk/res/values/public.xml):
Code:
<public type="id" name="tentabs" id="0x7f0a003a" />
<public type="drawable" name="zzz_tab_1" id="0x7f020162" />
<public type="drawable" name="zzz_tab_10" id="0x7f020163" />
<public type="drawable" name="zzz_tab_2" id="0x7f020164" />
<public type="drawable" name="zzz_tab_3" id="0x7f020165" />
<public type="drawable" name="zzz_tab_4" id="0x7f020166" />
<public type="drawable" name="zzz_tab_5" id="0x7f020167" />
<public type="drawable" name="zzz_tab_6" id="0x7f020168" />
<public type="drawable" name="zzz_tab_7" id="0x7f020169" />
<public type="drawable" name="zzz_tab_8" id="0x7f02016a" />
<public type="drawable" name="zzz_tab_9" id="0x7f02016b" />
Note: These were the public ids I got from decompiling my new SystemUI.apk after adding the drawables and the "tentabs" id. These public ids MAY BE DIFFERENT from what you will get after decompiling your own SystemUI.apk.
2. Now open TenTabs.smali from /SystemUI.apk/smali/com/jeremypacabis/statusbarmods/TenTabs.smali and look for
Code:
const v10, 0x7f060005# Replace 0x7f060005 with your public.xml tentabs public id
As what the comment says, replace 0x7f060005 with your tentabs public id, which in my case from the example above is 0x7f0a003a. So it will now become:
Code:
const v10, 0x7f0a003a# Replace 0x7f060005 with your public.xml tentabs public id
Note: Your tentabs id might be different, it is still ok and just replace it with yours, and in a SMALI, everything in a line followed by a hashtag or number sign symbol # is just a comment, so you can just ignore it.
3. Save your edited TenTabs.smali
4. Open TenTabsViewChanger.smali from /SystemUI.apk/smali/com/jeremypacabis/statusbarmods/TenTabsViewChanger.smali and just search for my comments for the id of the drawables for the tabs and replace it as what the comment says.
Code:
const v1, 0x7f020001# your tab 1 drawable id here
const v1, 0x7f020003# your tab 2 drawable id here
const v1, 0x7f020004# your tab 3 drawable id here
const v1, 0x7f020005# your tab 4 drawable id here
const v1, 0x7f020006# your tab 5 drawable id here
const v1, 0x7f020007# your tab 6 drawable id here
const v1, 0x7f020008# your tab 7 drawable id here
const v1, 0x7f020009# your tab 8 drawable id here
const v1, 0x7f02000a# your tab 9 drawable id here
const v1, 0x7f020002# your tab 10 drawable id here
Note: tab 1 drawable id corresponds to 0x7f020162 from <public type="drawable" name="zzz_tab_1" id="0x7f020162" />, tab 2 drawable id corresponds to 0x7f020164 from <public type="drawable" name="zzz_tab_2" id="0x7f020164" /> and so on and so forth. So your new code from my example public ids from above is:
Code:
const v1, 0x7f020162# your tab 1 drawable id here
const v1, 0x7f020164# your tab 2 drawable id here
const v1, 0x7f020165# your tab 3 drawable id here
const v1, 0x7f020166# your tab 4 drawable id here
const v1, 0x7f020167# your tab 5 drawable id here
const v1, 0x7f020168# your tab 6 drawable id here
const v1, 0x7f020169# your tab 7 drawable id here
const v1, 0x7f02016a# your tab 8 drawable id here
const v1, 0x7f02016b# your tab 9 drawable id here
const v1, 0x7f020163# your tab 10 drawable id here
5. Now save your edited smali, or review and double check the numbers, If you are confident enough then you may proceed.
6. Recompile your SystemUI.apk
7. Push or Flash your SystemUI.apk and see if your mod works.
Credits:
I used the Black Andy Head With 1% White Text by unknown battery icons for the tab example drawable from TickleMyAndroid user_files.
Screenshots:
View attachment 2884923View attachment 2884924View attachment 2884925
Needed files:
View attachment 2884926 v0.1
Click to expand...
Click to collapse
Tanks i am work in stockrom deodex :thumbup::thumbup:
Sent from my SM-N9000 using XDA Free mobile app
73R3WY said:
This mod will provide ten (10) Tabs which supports ten layouts to your SystemUI.
Click to expand...
Click to collapse
Thanks. Can I decompile it with apktool for mobile? If not, can you decompile again the smali files with mobile apktool for mobile apktool users? Advance thanks mate.
jasper~ said:
Thanks. Can I decompile it with apktool for mobile? If not, can you decompile again the smali files with mobile apktool for mobile apktool users? Advance thanks mate.
Click to expand...
Click to collapse
I think you can still use the smali's from the attached file sir with apktool mobile. but in case it will not work, you can try the attached zip file from this reply with apktool mobile. I decompiled it using apktool mobile armel v4.3.1, there are slight differences from the output ids of the smali so just compare it with the smali above for reference with the guide.
View attachment TenTabsFilesDecompiledWithapktoolMobile.zip
73R3WY said:
I think you can still use the smali's from the attached file sir with apktool mobile. but in case it will not work, you can try the attached zip file from this reply with apktool mobile. I decompiled it using apktool mobile armel v4.3.1, there are slight differences from the output ids of the smali so just compare it with the smali above for reference with the guide.
View attachment 2888827
Click to expand...
Click to collapse
Oh, thanks bro. How about Apktool v4.1 armel. Can I also decompile it?
jasper~ said:
Oh, thanks bro. How about Apktool v4.1 armel. Can I also decompile it?
Click to expand...
Click to collapse
Try apktool 4.4 sir , its support smali like this
jasper~ said:
Oh, thanks bro. How about Apktool v4.1 armel. Can I also decompile it?
Click to expand...
Click to collapse
yes sir, because apktool mobile v4.1 armel also uses apktool v1.5.2
73R3WY said:
yes sir, because apktool mobile v4.1 armel also uses apktool v1.5.2
Click to expand...
Click to collapse
Ok. Thanks bro
This is what I get.
Sent from my GT-S5360 using XDA Free mobile app
sir can i change tab 1,2,3 with custom text?
Today again a new mod ( i collected this from great cataclysm rom )
You should be having Stock deodexed settings.apk
1. Decompile the settings
2. Open settings.apk/res/values/attrs.xml
Add this code
Code:
<attr name="type" format="integer" />
3. Open settings.apk/res/values/strings.xml
Add this code
Code:
<string name="window_animation_scale_title">Window animation scale</string>
<string name="transition_animation_scale_title">Transition animation scale</string>
<string name="animator_duration_scale_title">Animator duration scale</string>
4. Add this code to any of your settings like (display_settings.xml or as you wish )
Code:
<PreferenceScreen android:title="@string/animation_speeds_title" android:key="animation_speeds" android:summary="@string/animation_speeds_summary" android:fragment="com.android.settings.AnimationSpeeds" />
5. Add these ids in settings.apk/res/values/ids.xml
Code:
<item type="id" name="seek_bar_pref_unit_right">false</item>
<item type="id" name="seek_bar_pref_value">false</item>
<item type="id" name="seek_bar_pref_unit_left">false</item>
<item type="id" name="seek_bar_pref_bar_container">false</item>
6. Now download this View attachment settings.zip
and merge codes
Main Part Continued in Post #2
Final part and Result
Here comes a critical Part but not difficult
We had added new integer so we have to define in setting activity
i will explain in simple code just follow it
7. Now open settings.apk/smali/com/android/settings/R$styleable.smali
Find this code
Code:
.field public static final IntentPreference:[I
Below this add
Code:
.field public static final MySeekBarPreference:[I
Now look for
Code:
sput-object v0, Lcom/android/settings/R$styleable;->PercentageBarChart:[I
Below Add this code
Code:
.line 12360
new-array v0, v3, [I
const v1, 0x7f010044
aput v1, v0, v2
sput-object v0, Lcom/android/settings/R$styleable;->MySeekBarPreference:[I
So here you had define the integer
8. Compile and decompile so you get new public ids
From that in R$styleable.smali
Replace the Public code :- 0x7f010044 #<public type="attr" name="type" id="0x7f010044" />
and in MySeekBarPreference.smali and in AnimationSpeeds.smali compare with my public ids and replace them
9. Oh god... just compile and replace your settings.apk and enjoy the mod ( check the below image on what mod you did........... )
{
"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"
}
Don't forget to mention in if you used my work
Awesome bro ^^
“Sent From MWE V7.0.0 On My Z3”
6. Now download this settings.zip
and merge codes
Click to expand...
Click to collapse
hi venkat, i tried your guide, all is fine except the step mentioned ahead.
i compared the public.xml from the rom i use and your public(compare).xml with WinMerge and there are many differences (on both sides)
So what to do?
Tried to simple copy your xml into the values folder, but then recompiling failed.
And the second thing i don´t understand:
8. Compile and decompile so you get new public ids
Click to expand...
Click to collapse
where is this new public ids?
From that in R$styleable.smali
Replace the Public code :- 0x7f010044 #<public type="attr" name="type" id="0x7f010044" />
and in MySeekBarPreference.smali and in AnimationSpeeds.smali compare with my public ids and replace them
Click to expand...
Click to collapse
i get a new public code and must replace the similar code in R$styleable.smali?
And also in MySeekBarPreference.smali and AnimationSpeed.smali? Right?
Thx for your help.
I love this mod, so i want to try it on my own.
Add new animation?
How can I add the same animation that was on kitkat when you open an app or while you tap thumbnail on multitasking view? This animation in lollipop is missing
Can you help me to know what i did wrong?
dark90 said:
Can you help me to know what i did wrong?
Click to expand...
Click to collapse
You need to define seekbar preferences then you will get all
Another great tutorial from master @venkat kamesh :good:
venkat kamesh said:
You need to define seekbar preferences then you will get all
Click to expand...
Click to collapse
Thanks i got it.
The problem following you tut step by step is that you have 12seek_bar_preference.xml (defined in seekbarpreference.smali) and seek_bar_preference.xml (defined in myseekbarpreference.smali) and we only have seek_bar_preference.xml (defined on seekbarpreference.smali) and Just comparing the public id didnt gonnna work
dark90 said:
Thanks i got it.
The problem following you tut step by step is that you have 12seek_bar_preference.xml (defined in seekbarpreference.smali) and seek_bar_preference.xml (defined in myseekbarpreference.smali) and we only have seek_bar_preference.xml (defined on seekbarpreference.smali) and Just comparing the public id didnt gonnna work
Click to expand...
Click to collapse
In my settings I had 2 to 3 different seekbar bro
For this mod the seek bar out value should be px
The one in tut I have and the one 12seekbar are same brother.. You can compare
Any how it worked for you bro
Happy to hear
for that ppl that cant make it work (just the ppl who did all the things in op), just:
-download, uncompres and copy this file to your settings.apk/res/layout folder
-compile and decompìle to get the new public id
-open you settings.apk/res/value/public.xml and search <public type="layout" name="seekbar_preference" id
-open settings.apk/smali/com/android/settings/rz/myseekbarpreference.smali and go to the line 92 " const v1, 0x7f040103 # type="layout" name="seek_bar_preference "
-change the id for the one you find before in public.xml
-now compile and sign and you got it now working, well i hope xD
Great Job venkat
Sorry I forget modify some lines all works like a charm thanks bro
@dark90 mate
Thanks. Ur solution works like a charm..
dark90 said:
for that ppl that cant make it work (just the ppl who did all the things in op), just:
-download, uncompres and copy this file to your settings.apk/res/layout folder
-compile and decompìle to get the new public id
-open you settings.apk/res/value/public.xml and search <public type="layout" name="seekbar_preference" id
-open settings.apk/smali/com/android/settings/rz/myseekbarpreference.smali and go to the line 92 " const v1, 0x7f040103 # type="layout" name="seek_bar_preference "
-change the id for the one you find before in public.xml
-now compile and sign and you got it now working, well i hope xD
Click to expand...
Click to collapse
@dark90
This aint work bro, when i add your xml and try to compile, i have error cant find the ids in public.xml and i send you a pm btw.
I have it all except the switches
deleted
Yep, this could sounds to repost, but not, in this case the Porting Guide works with 4.4.x (KitKat) too.
Let's go with this, then:
For try port to LP: here
If you, don't understand that guide, here I've a explain (In spanish only):
Requirements
- Have a Deodex ROM (Really Important)
- Have the signature verification for all apps disabled (a.k.a Superuser Mod) installed.
- Know compile/decompile and sign apps (here a lite guide, I recommend download it)
- Brain (Not much xD )
- Patient
- Notepad++
- Latest apktool (in this case)
First, JellyBean (4.3)
Step 1
- Decompile XperiaLockScreen.apk
- Download Smali for JB 4.3 Lockscreen (In Download Section) and merge "smali" folder to your decompiled XperiaLockScreen
Step 2
Go to XperiaLockScreen/res/layout/keyguard_no_security_view.xml, search the follow line
Code:
[COLOR="RoyalBlue"]<LinearLayout android:gravity="center" android:layout_gravity="center_horizontal" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true">[/COLOR]
and add the red line down
Code:
[COLOR="Red"]<com.adi.rom.interface.MusicEqualizerVisualizer android:layout_gravity="bottom" android:id="@id/new_visualizer_view_panel" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="0.0dip">
<FrameLayout android:id="@id/new_custom_visualizer_view_panel" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.adi.rom.interface.VisualizerView android:id="@id/new_custom_visualizer_view" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</FrameLayout>
</com.adi.rom.interface.MusicEqualizerVisualizer>[/COLOR]
Some like this
{
"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"
}
Save it.
Step 3
Go to XperiaLockScreen/res/values/colors.xml
add these lines before of </resources>
Code:
[COLOR="Red"]<color name="new_custom_equalizer_fill_color">@color/didi2</color>
<color name="didi">@com.sonyericsson.uxp:color/somc_theme_accent_color_light</color>
<color name="didi2">@com.sonyericsson.uxp:color/somc_theme_accent_color_dark</color>
<color name="didi3">@com.sonyericsson.uxp:color/somc_accent_color_neutral</color>
<color name="didi4">@com.sonyericsson.uxp:color/semc_theme_illumination_color</color>[/COLOR]
If these lines don't leave compile, use only this
Code:
[COLOR="red"]<color name="new_custom_equalizer_fill_color">#96ffffff</color>[/COLOR]
Save it.
Go to XperiaLockScreen/res/values/dimens.xml
and add before of </resources>
Code:
[COLOR="red"] <dimen name="new_custom_eqalizer_path_effect_1">12.0dip</dimen>
<dimen name="new_custom_eqalizer_path_effect_2">1.0dip</dimen>
<dimen name="new_custom_eqalizer_path_stroke_width">24.0dip</dimen>[/COLOR]
Save it.
Go to XperiaLockScreen/res/values/ids.xml
and add before of </resources>
Code:
[COLOR="red"]<item type="id" name="new_visualizer_view_panel">false</item>
<item type="id" name="new_custom_visualizer_view_panel">false</item>
<item type="id" name="new_custom_visualizer_view">false</item>[/COLOR]
Save it.
Go to XperiaLockScreen/res/values/integers.xml
and add before of </resources>
Code:
[COLOR="red"]<integer name="new_custom_equalizer_divisions">4</integer>
<integer name="new_custom_equalizer_db_fuzz_factor">2</integer>
<integer name="new_custom_equalizer_db_fuzz">-10</integer>[/COLOR]
Step 4
Go to XperiaLockScreen/AndroidManifest.xml
and search
Code:
[COLOR="royalblue"]<uses-permission android:name="com.sonymobile.permission.READ_LOCKSCREEN_WALLPAPER"/>[/COLOR]
add the follow lines down
Code:
[COLOR="red"]<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>[/COLOR]
Step 5
- Compile XperiaLockScreen
- Sign it
- Push to System/app with the right permissions
- Download VisualizerStyleSettings.apk (from Download section) push to System/app with right permissions
Now with KitKat (4.4.x)
Step 1
- Decompile XperiaLockScreen.apk
- Download Smali for JB 4.3 Lockscreen (Yep, the same file, in Download Section) and merge "smali" folder to your decompiled XperiaLockscreen
Step 2
Go to XperiaLockScreen/res/layout/keyguard_no_security_view.xml, search the follow line
Code:
[COLOR="RoyalBlue"]<LinearLayout android:gravity="center" android:layout_gravity="center_horizontal" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true">[/COLOR]
and add the red line down
Code:
[COLOR="Red"]<com.adi.rom.interface.MusicEqualizerVisualizer android:layout_gravity="bottom" android:id="@id/new_visualizer_view_panel" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="0.0dip">
<FrameLayout android:id="@id/new_custom_visualizer_view_panel" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.adi.rom.interface.VisualizerView android:id="@id/new_custom_visualizer_view" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</FrameLayout>
</com.adi.rom.interface.MusicEqualizerVisualizer>[/COLOR]
Some like this
Save it.
Step 3
Go to XperiaLockScreen/res/values/dimens.xml
and add before of </resources>
Code:
[COLOR="red"] <dimen name="new_custom_eqalizer_path_effect_1">12.0dip</dimen>
<dimen name="new_custom_eqalizer_path_effect_2">1.0dip</dimen>
<dimen name="new_custom_eqalizer_path_stroke_width">24.0dip</dimen>[/COLOR]
Save it.
Go to XperiaLockScreen/res/values/ids.xml
and add before of </resources>
Code:
[COLOR="red"]<item type="id" name="new_visualizer_view_panel">false</item>
<item type="id" name="new_custom_visualizer_view_panel">false</item>
<item type="id" name="new_custom_visualizer_view">false</item>[/COLOR]
Save it.
Go to XperiaLockScreen/res/values/integers.xml
and add before of </resources>
Code:
[COLOR="red"] <integer name="new_custom_equalizer_divisions">13</integer>
<integer name="new_custom_equalizer_db_fuzz_factor">20</integer>
<integer name="new_custom_equalizer_db_fuzz">-10</integer>[/COLOR]
Step 4
Go to XperiaLockScreen/AndroidManifest.xml
and search
Code:
[COLOR="royalblue"]<uses-permission android:name="com.sonymobile.permission.READ_LOCKSCREEN_WALLPAPER"/>[/COLOR]
add the follow lines down
Code:
[COLOR="red"]<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>[/COLOR]
Step 5
- Compile XperiaLockScreen
- Sign it
- Push to System/app with the right permissions
- Download VisualizerStyleSettings.apk (from Download section) push to System/app with right permissions
Step 6
- Decompile SystemUI.apk
- Download Smali for KK-LP SystemUI (In Download Section) and merge "smali" folder to your decompiled SystemUI
Step 7
Go to SystemUI/res/layout/status_bar_expanded.xml, search the follow line
Code:
[COLOR="RoyalBlue"]
</LinearLayout>[/COLOR]
and add the red line down
Code:
[COLOR="Red"]<com.adi.rom.interface.MusicEqualizerVisualizer android:layout_gravity="bottom" android:id="@id/new_visualizer_view_panel" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="0.0dip">
<FrameLayout android:id="@id/new_custom_visualizer_view_panel" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.adi.rom.interface.VisualizerView android:id="@id/new_custom_visualizer_view" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</FrameLayout>
</com.adi.rom.interface.MusicEqualizerVisualizer>[/COLOR]
Save it.
Step 8
Go to SystemUI/res/values/colors.xml
add this line before of </resources>
Code:
[COLOR="red"]<color name="new_custom_equalizer_fill_color">#96ffffff</color>[/COLOR]
Save it.
Go to SystemUI/res/values/dimens.xml
and add before of </resources>
Code:
[COLOR="red"]<dimen name="new_custom_eqalizer_path_effect_1">6.0dip</dimen>
<dimen name="new_custom_eqalizer_path_effect_2">1.0dip</dimen>
<dimen name="new_custom_eqalizer_path_stroke_width">6.0dip</dimen>[/COLOR]
Save it.
Go to SystemUI/res/values/ids.xml
and add before of </resources>
Code:
[COLOR="red"]<item type="id" name="new_visualizer_view_panel">false</item>
<item type="id" name="new_custom_visualizer_view_panel">false</item>
<item type="id" name="new_custom_visualizer_view">false</item>[/COLOR]
Save it.
Go to SystemUI/res/values/integers.xml
and add before of </resources>
Code:
[COLOR="red"]<integer name="new_custom_equalizer_divisions">4</integer>
<integer name="new_custom_equalizer_db_fuzz_factor">2</integer>
<integer name="new_custom_equalizer_db_fuzz">-10</integer>[/COLOR]
Step 9
Go to SystemUI/AndroidManifest.xml
and search
Code:
[COLOR="royalblue"]<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/>[/COLOR]
add the follow lines down
Code:
[COLOR="red"]<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>[/COLOR]
Step 10
- Compile SystemUI
- Sign it
- Push to System/app with the right permissions
- Download VisualizerStyleSettings.apk (from Download section) push to System/app with right permissions
Screenies & Demo
JB 4.3
KK 4.4.x (CyanogenMod Visualizer don't works)
LP 5.x.x (Works almost all, except Lines Visualizer on Stock ROM)
Demo
Downloads
Smalies for JB 4.3
Smalies for KK/LP SystemUI
VisualizerStyleSettings
VisualizerStyleSettings Fix for Lollipop
Credits
@idid idamrep (For their port to JB 4.3)
@Adi Aisiteru Reborn (For their Guide for port to "All" Android devices)
@sebasrock156 (For port to KitKat and make this possible)