[MULTI-MOD] Reboot Option, Percentage Battery, Percentage WiFi, & ASU Signal Strength
I managed to port untermensch's modification to add reboot option(s) to our power menu. See original thread for more information on the process.
Alternative versions also include the Super Circle Battery modification, my own WiFi percentage indicator and ASU network signal strength mods.
{
"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"
}
Requirements:
1. Root privileges
2. Choose appropriate firmware version below.
2.3_3.0.1.G.0.75_GENERIC
See this post for Reboot Option only.
See this post for Reboot Option & Percentage Battery.
See this post for Reboot Option & Percentage Battery & WiFi Percentage & ASU Signal Strength.
See this post for Reboot Option & Percentage Battery & WiFi Percentage & ASU Signal Strength + Roaming.
2.1.A.0.435_GLOBAL See this post.
2.0.2.A.0.24_GLOBAL See this post.
2.0.A.0.504_GLOBAL See this post's attachments.
Note: This replaces core system files, i.e. will remove previously installed themes and modifications. If you have problems, push back the original files.
Automatic (xRecovery) Installation:
Reboot into xRecovery and flash update.zip if supplied.
Automatic (ADB GUI) Installation:
Use the X10 Mod Tool, to push the files to the device.
SystemUI.apk goes in system/app if present, and rest in system/framework.
Manual (Terminal Emulator) Installation:
1. Unrar archive.
2. Copy extracted files to /sdcard, and
3. In Terminal Emulator:
a) make sure you have super user permissions (su),
b) remount /system partition as read-write (mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system),
c) replace framework.jar (dd if=/sdcard/framework.jar of=/system/framework/framework.jar),
d) replace android.policy.jar (dd if=/sdcard/android.policy.jar of=/system/framework/android.policy.jar),
e) replace SystemUI.apk (dd if=/sdcard/SystemUI.apk of=/system/app/SystemUI.apk) if present,
f) replace framework-res.apk (dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk) if present, and
g) reboot device (reboot) if not automatic.
Thanks Mr. Rusch glad your also modding the x10
Tested on my Singapore X10i but it cannot boot up, I am repairing my X10 via the PC Companion now.
Under contruction
Percentage Battery
A. The 101 stat_sys_battery_X.png and 21 stat_sys_battery_charge_X.png images of which the modification is based, need to be inserted into framework-res.apk.
1. Decompile framework-res.apk with APK Tool or X10 Mod Tool.
2. Add images to res/drawable-hdpi/.
B. These images then need to be referenced in public.xml as drawables.
1. Open res/values/public.xml in e.g. Notepad.
2. Find last drawable-id and increment by one hexadecimal value (XxXXXXXXXX).
3. Create and add all of your drawables as below, incrementing by one hexadeimal value per item.
Code:
<public type="drawable" name="stat_sys_battery_X" id="XxXXXXXXXX" />
4. Save and Close.
C. The XMLs controlling the battery stats (stat_sys_battery.xml and stat_sys_battery_charge.xml) need to be adjusted to percentage levels (100 on battery, and 20 at charging).
1. Replace stat_sys_battery.xml with the one attached to this post.
2. Replace stat_sys_battery_charge.xml with the one attached to this post.
3. Recompile framework-res.apk with APK Tools or X10 Mod Tool.
Replace framework-res.apk on your device.
Reboot Option
A. The reboot.png needs to be inserted into the framework-res.apk.
1. Decompile framework-res.apk with APK Tool or X10 Mod Tool.
2. Add reboot.png to res/drawable-hdpi/.
B. This image is then to be referenced in public.xml as a drawable.
1. Open res/values/public.xml in e.g. Notepad.
2. Find last drawable-id and increment by one hexadecimal value (XxXXXXXXXX).
3. Create and add your drawable as below,
Code:
<public type="drawable" name="reboot" id="XxXXXXXXXX" />
C. The string "Reboot" needs to be added as well, in public.xml and strings.xml.
1. Find last string-id and increment by one hexadecimal value (XxXXXXXXXX).
2. Create and add your string as below,
Code:
<public type="string" name="reboot" id="XxXXXXXXXX" />
3. Save and Close public.xml.
5. Open res/values/strings.xml in e.g. Notepad.
6. Create and add your string as below,
Code:
<string name="reboot">Reboot</string>
7. Save and Close.
8. Recompile framework-res.apk with APK Tool or X10 Mod Tool.
D. ShutdownThread.java needs to be modified to handle the reboot-command from the power menu.
1. Decompile framework.jar with X10 Mod Tool or baksmali.jar.
2. Open com\android\internal\app\ShutdownThread.smali in e.g Notepad.
3. After the last entry in the "# static fields" section, add
Code:
.field public static mReboot:I
4. Search for "invoke-static {}, Landroid/os/Power;->shutdown()V", and add the following code before this line.
Code:
sget v1, Lcom/android/internal/app/ShutdownThread;->mReboot:I
const/4 v2, 0x1
if-eq v1, v2, :reboot
5. After the next return-void statement, add this code
Code:
:reboot
const-string v4, "now"
invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
This will send the "now" command to the kernels shutdown process. When we get our kernels sorted, we can add other commands such as "recovery" or "download" here.
6. Save and Close.
7. Recompile framework.jar with X10 Mod Tool or smali.jar.
E. GlobalActions.java needs to be modified to present the reboot-
drawble/string in the power menu.
1. Decompile android.policy.jar with X10 Mod Tool or baksmali.jar.
2. Open com\android\internal\policy\impl\GlobalActions.smali in e.g Notepad.
3. In the "createDialog" method, extend the array by changing this
Code:
const/4 v0, 0x3
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
to this
Code:
const/4 v0, 0x[B]4[/B]
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
Note here that depending on how many options that already exist in your power menu, this constant's value may differ. The point is - increment it by 1.
4. Add the reboot menu item by adding the following code after last instance of "aput-object v2, v0, v1"
Code:
const/4 v1, 0x3
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$7;
const v3, XxXXXXXXX # reboot icon resource id
const v4, YxYYYYYYY # reboot string resource id
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
Note: Swap XxXXXXXXX for the drawable-ID and YxYYYYYYY for the string-ID. The constant v1 decides the placement in the array we extended above. So you can adjust this if you want to place the entry somewhere other than at the end. But remember to adjust the other entries as well then.
5. Save and Close.
6. Now make a copy of GlobalActions$3.smali and rename it to GlobalActions$7.smali.
7. Open GlobalActions$7.smali in e.g Notepad.
8. Replace all instances of "GlobalActions$3" inside it, with "GlobalActions$7".
9. Search for "invoke-static {v0, v1}, Lcom/android/internal/app/ShutdownThread;->shutdown(Landroid/content/Context;Z)V", and add the following code in the line before
Code:
const/4 v2, 0x1
sput v2, Lcom/android/internal/app/ShutdownThread;->mReboot:I
10. Save and Close.
11. Recompile android.policy.jar with X10 Mod Tool or smali.jar.
Replace framework.jar, android.policy.jar and framework-res.apk on your device.
Percentage WiFi
A. The 21 stat_sys_wifi_signal_X.png images need to be inserted into framework-res.apk (<2.3.3) or SystemUI.apk (>2.3.3).
1. Decompile framework-res.apk with APK Tool or X10 Mod Tool.
2. Add images to res/drawable-hdpi/.
B. These images then need to be registered as drawables in public.xml.
1. Open res/values/public.xml in e.g. Notepad.
2. Find last drawable-id and increment by one hexadecimal value (XxXXXXXXXX).
3. Create and add all of your drawables as below, incrementing by one hexadeimal value per item.
Code:
<public type="drawable" name="stat_sys_wifi_signal_X" id="XxXXXXXXXX" />
4. Recompile framework-res.apk (<2.3.3) or SystemUI.apk (>2.3.3) with APKTool or X10 Mod Tool.
C. StatusBarPolicy.java needs to load the new WiFi-drawables into status bar.
1. Decompile services.jar with X10 Mod Tool.
2. Open StatusBarPolicy.smali in e.g. Notepad.
3. Go the start of the constructor at ".method static constructor <clinit>()V".
4. Increment " .locals X" by one decimal value.
5. Under " .prologue", add another registry to extend the array with,
Code:
const/16 vX, 0x21
Note: vX is also incremented by one decimal value.
6. Now search for "sput-object v0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->sWifiSignalImages:[[I"
The three rows above this, will look like this
Code:
new-array vX, vY, [I
fill-array-data vX, :array_Q
aput-object vX, vZ, v4
6. In the first row, swap vY to the constant we created to initiate the array with.
7. From the second row, copy the ":array_Q" value and go to this marker.
8. Extend this array at the end with references to the drawables-IDs we registered in public.xml earlier.
Note: The ID-format is backwards, i.e.
0xXXt 0xYYt 0xZZt 0xQQt = 0xQQZZYYXX
9. Save and Close.
10. Recompile services.jar with X10 Mod Tool.
D. WifiManager's calculateSignalLevel() functions decision-logic needs to be modified for the 20 levels of WiFi (5% increments).
Note: This function should according to the APIs work as is, as it recieves the array-length as maximum value. For some reason though, I constantly face OutOfBoundsExceptions when using this. Instead, I have created my own logic in java, converted it into smali-code, and replaced the original function with it.
1. Decompile framework.jar with X10 Mod Tool or baksmali.jar.
2. Open WifiManager.smali in e.g. Notepad.
3. Replace the "calculateSignalLevel" function with the one attached to this post.
4. Save and Close.
5. Recompile framework.jar with X10Mod Tool or smali.jar.
Replace framework.jar, services.jar and framework-res.apk on your device.
ASU/dBm Signal Strength
A. The 33 stat_sys_signal_X.png images need to be inserted into framework-res.apk.
B. These images then need to be registered as drawables in public.xml.
C. StatusBarPolicy.java needs to be modified to choose drawable by ASU-value.
D. StatusBarPolicy.java needs to load the new ASU-drawables into status bar.
E. For roaming to work, same process (1-4) needs to be repeated for stat_sys_r_signal_X.png images.
Thank you very much for your mod, tested on my X10 with 2.1 Global Generic and work very well.
To serve options:
Recovery and Download?
Great Work
PD: It would be possible to modify the text of the options?:
Reboot----- for Reiniciar
Recovery----for Recuperar
Download--- for Descargar
It's because I have the X10 in Spanish
tiggerbcn said:
PD: It would be possible to modify the text of the options?:
Reboot----- for Reiniciar
Recovery----for Recuperar
Download--- for Descargar
It's because I have the X10 in Spanish
Click to expand...
Click to collapse
You'd have to mod the APK. So depends how comfortable you are with this.
Edit: Decompile the APK, modify strings.xml, and recompile.
Sent from my X10i using XDA App
Buffff, that will not do, be so kind to modify that file and put it here to download it?, I've put a link to this post in a forum Spanish and there are some who call me, but I have the tools to edit these files
Thanks
PD:and these options are used?
Recovery and Download
Hi, MrRusch. How can I install ONLY that grey battery icon with the percentage within it? Is it possible?
Thanks in advance
PS: I'm the one who asked tiggerbcn for the spanish translation btw
is it possible to modify it to have the reboot option only?
as I dont think I would be using the other options...and would rather not press them by mistake....he he
MrRusch said:
You'd have to mod the APK. So depends how comfortable you are with this.
Edit: Decompile the APK, modify strings.xml, and recompile.
Sent from my X10i using XDA App
Click to expand...
Click to collapse
where i can find that "stings.xml" ?
thks
rendeiro2005 said:
where i can find that "stings.xml" ?
thks
Click to expand...
Click to collapse
It's in res\values in the APK.
Zenghelis said:
Hi, MrRusch. How can I install ONLY that grey battery icon with the percentage within it? Is it possible?
Thanks in advance
PS: I'm the one who asked tiggerbcn for the spanish translation btw
Click to expand...
Click to collapse
You will find the battery mod itself in this thread.
tiggerbcn said:
Buffff, that will not do, be so kind to modify that file and put it here to download it?, I've put a link to this post in a forum Spanish and there are some who call me, but I have the tools to edit these files
Thanks
PD:and these options are used?
Recovery and Download
Click to expand...
Click to collapse
Sorry all, but I will not be making language-specific mods, as this would lead to requests for lots of different languages. If you want to modify it to your language, follow the instructions I have given here (or consult your national chef for help).
As for the latter part of your question - perhaps someone else here can answer this, as this is my first Android device.
mith500 said:
is it possible to modify it to have the reboot option only?
as I dont think I would be using the other options...and would rather not press them by mistake....he he
Click to expand...
Click to collapse
Yes, this version is coming.
MrRusch said:
It's in res\values in the APK.
Click to expand...
Click to collapse
thks a lot.
i`m trying to create a new theme with animations, battery info, etc and i don`t want just install.
thks
rendeiro2005 said:
thks a lot.
i`m trying to create a new theme with animations, battery info, etc and i don`t want just install.
thks
Click to expand...
Click to collapse
Now you got me
how the hell i`m suppoused to mess if i don`t have that folder???
yours don`t have it as mine
rendeiro2005 said:
Now you got me
how the hell i`m suppoused to mess if i don`t have that folder???
yours don`t have it as mine
Click to expand...
Click to collapse
You need to decompile it, not just extract it as an archive. Use apktool or client such as APK Manager to access meta-data from resources.arsc.
MrRusch said:
You need to decompile it, not just extract it as an archive. Use apktool or client such as APK Manager to access meta-data from resources.arsc.
Click to expand...
Click to collapse
forget it
i`m working with that now
thks
i`m sorry but i need your hel with one more thing
were i can find "com\android\internal\app\ShutdownThread.smali "?
it`s suppoused to be on framework but we only have framework-res andi can`t find that
thks
rendeiro2005 said:
i`m sorry but i need your hel with one more thing
were i can find "com\android\internal\app\ShutdownThread.smali "?
it`s suppoused to be on framework but we only have framework-res andi can`t find that
thks
Click to expand...
Click to collapse
No, sorry this is embedded in framework.jar, not framework-res.apk. You will need to deodex this file with baksmali to decompile, edit, and then recompile with smali. But FYI you don't need to touch anything but the APK if you only want to change the language. For this editing strings.xml is enough.
MrRusch said:
No, sorry this is embedded in framework.jar, not framework-res.apk. You will need to deodex this file with baksmali to decompile, edit, and then recompile with smali.
Click to expand...
Click to collapse
ooops
ok
thks
I have now added the single option version, only displaying the Reboot (normal) alternative. This one also comes in two versions, with the default battery indicator, or the percentage one. See screenshots in first post.
MrRusch said:
I have now added the single option version, only displaying the Reboot (normal) alternative. This one also comes in two versions, with the default battery indicator, or the percentage one. See screenshots in first post.
Click to expand...
Click to collapse
sorry again
what`s the command to compile android.policy.jar?
thks
ALL IN ONE Guide for all TouchWiz3 Users !
NOTE : I have taken other Tutorials and made all in one , therefore some of the guides are new and no tutorial on XDA has them !
What is Touchwiz3 ?
Touchwiz is more than a simple launcher.
It's a framework , a set of functions, developed by and for Samsung, available only to Samsung developers.
Those functions allow them to create Samsung's own launcher, Touchwiz UI, their unique Camera App, a few more apps as well as a whole bunch of Android customization specifically for the SGS3 or any other Android phone they come up with.
Click to expand...
Click to collapse
Post Navigation :
Page Indicators
Homescreen
App drawer
Dock Icons
Click to expand...
Click to collapse
Caution : In case keep a secondary launcher if anything goes wrong !
OK , Now let's go
PAGE INDICATORS :
How to place Page indicators at the bottom ( As in TouchWiz4 ) :
1) Go to Res/Values-mdpi/Dimens.xml ( Values-xxxx depend on your resolution )
2) Find :
Code:
<dimen name="menu_top_offset">XXXdip</dimen>
Change XXX to any size you want. ( Normally use 6.0 dip )
3) Find :
Code:
<dimen name="workspace_pageindicator_top">XXXdip</dimen>
Again Change XXX to any size you want ( Normally use 385.0 dip )
4) Find :
Code:
<dimen name="pageindicator_top_offset">XXXdip</dimen>
Again Change XXX to any size you want ( Normally used 375.0 dip )
Recompile TouchWiz30Launcher.apk and test.
Click to expand...
Click to collapse
Disable/Enable Autohide of Page Indicators on Homescreen & App drawer :
- Go to Res/Values/Bools.xml
For homescreen change :
Code:
<bool name="pageindicator_showhide_enable">true</BOOL>
( True = Autohide enabled )
to:
Code:
<bool name="pageindicator_showhide_enable">false</BOOL>
( False = Autodhide disabled )
For AppDrawer change :
Code:
<bool name="workspace_pageindicator_showhide_enable">true</bool>
( True = Autohide enabled )
to :
Code:
<bool name="workspace_pageindicator_showhide_enable">false</bool>
( False = Autodhide disabled )
Click to expand...
Click to collapse
Remove number on Page Indicator :
Open /smali/com/sec/android/app/twlauncher/PageIndicator$Page.smali and delete :
Code:
invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
Click to expand...
Click to collapse
HOMESCREEN :
Set default screen counter :
Go to /res/xml-mdpi/launcher_config.xml
Change :
Code:
launcher:defaultScreenCount="3"
Number 3 from "1 to 7"
Click to expand...
Click to collapse
Set default homescreen :
Add this line on build.prop :
Code:
ro.csc.homescreen.defaultscreen=2
Click to expand...
Click to collapse
5x5 Icons Home screen (Widgets will look smaller)
Go to /res/layout-mdpi/workspace_screen.xml
Code:
shortAxisCells="[B]4[/B]"
Change to :
Code:
shortAxisCells="[B]5[/B]"
Here again find :
Code:
cellWidth="[B]80.0dip[/B]"
Change to :
Code:
cellWidth="[B]64.0dip[/B]"
Find again :
Code:
longAxisCells="[B]4[/B]"
Change to :
Code:
longAxisCells="[B]5[/B]"
One last time find :
Code:
cellHeight="[B]100.0dip[/B]"
Change to :
Code:
cellHeight="[B]80.0dip[/B]"
Go to /res/values-mdpi/styles.xml
Find :
Code:
<item name="android:layout_marginBottom">[B]4.0dip[/B]</item>
Change to :
Code:
<item name="android:layout_marginBottom">[B]2.0dip[/B]</item>
Click to expand...
Click to collapse
Post #2
App Drawer :
Transparent app drawer :
Go to /res/values-mdpi/colors.xml
Code:
<color name="menu_background">#FF000000</color>
change FF to 80 (semi-transparent) or 99 (like TouchWiz4)
Click to expand...
Click to collapse
Enable concentration effect in app drawer :
Go to /res/xml-mdpi/launcher_config.xml
Add :
Code:
launcher:usemainmenuconcentrationeffect="true"
above launcher:use16bitwindow="xxx"
Click to expand...
Click to collapse
Enable list view option:
Go to /res/xml-mdpi/launcher_config.xml
add :
Code:
launcher:usemainmenulistmode="true"
Click to expand...
Click to collapse
Adding auto-alphabetical arrangement:
Go to /smali/com/sec/android/app/twlauncher/menumanager.smali
Find :
Code:
invoke-virtual {v0, v6}, lcom/sec/android/app/twlauncher/launchermodel$applicationinfocomparator;->setmode(i)v
.line 1770
[b]iget-object v0, p0, lcom/sec/android/app/twlauncher/menumanager;->mordercomparator:lcom/sec/android/app/twlauncher/launchermodel$applicationinfocomparator;[/b]
Change to :
Code:
invoke-virtual {v0, v6}, lcom/sec/android/app/twlauncher/launchermodel$applicationinfocomparator;->setmode(i)v
.line1770
[B]sget-object v0, lcom/sec/android/app/twlauncher/launchermodel;->app_name_comparator:ljava/util/comparator;[/B]
Click to expand...
Click to collapse
Dock Icons
Last
1. Download Settings Files.zip
2. Decompile your Settings.apk
3. Extract custombanner.xml of Settings Files.zip and place it in res/layout in decompiled Settings.apk
4. Open /res/xml/device_info_settings.xml
You'll see several <Preference android:title tags
5.Add this just a line above the first Preference tag:
Code:
<PreferenceCategory android:layout="@layout/custombanner" android:title="" />
6. Save the file and exit
7. Now make a .png banner for your ROM or find one on the internet. It has to be a .png
Resize your banner to 480x300 and rename it to custombanner.png
8. Place the custombanner.png in res/drawable
9. Recompile Settings.apk and Replace the settings.apk in your ROM
10. Enjoy :good:
Reserved for Screenshots
Screenshots
Hi ...... Can you add theme option in settings ?????
nathanjp said:
1. Download Settings Files.zip
2. Decompile your Settings.apk
3. Extract custombanner.xml of Settings Files.zip and place it in res/layout in decompiled Settings.apk
4. Open /res/xml/device_info_settings.xml
You'll see several <Preference android:title tags
5.Add this just a line above the first Preference tag:
Code:
Code:
<PreferenceCategory android:layout="@layout/myawesomerom" android:title="" />
6. Save the file and exit
7. Now make a .png banner for your ROM or find one on the internet. It has to be a .png
Resize your banner to 480x300 and rename it to custombanner.png
8. Place the custombanner.png in res/drawable
9. Recompile Settings.apk and Replace the settings.apk in your ROM
10. Enjoy :good:
Click to expand...
Click to collapse
Thanks bro... it works on my Samsung Galaxy Mega GT-I9152, but I Think there's only one mistake with your guide bro... in step number 5 :
Code:
<PreferenceCategory android:layout="@layout/myawesomerom" android:title="" />
it should be
Code:
<PreferenceCategory android:layout="@layout/custombanner" android:title="" />
Please correct me if I was wrong...Thanks...
sitifire said:
Thanks bro... it works on my Samsung Galaxy Mega GT-I9152, but I Think there's only one mistake with your guide bro... in step number 5 :
Code:
<PreferenceCategory android:layout="@layout/myawesomerom" android:title="" />
it should be
Code:
<PreferenceCategory android:layout="@layout/custombanner" android:title="" />
Please correct me if I was wrong...Thanks...
Click to expand...
Click to collapse
Thanks for pointing that when i war writing the xml file i thought of using myawesomerom but instead i used custombanner. Thats why i made a mistake will correct it immediately. Thanks for letting me know
It works perfect!!!!!
G.M.L._V2_IcSmoothness
http://pasakalis.blogspot.gr
Ended up in error in recompiling Any help?
Works perfect on sprint Galaxy Note 3 running stock deodexed lollipop rom. Thanks for this. It's awesome!!
great..thanks..I just try
I've heard somebody told that they had to disable low RAM function in Kitkat to enable status bar transparent. So in this post, I'll show you how to enable low Ram but the status bar still can be transparent when you're in launcher or lockscreen
First, we need:
- your phone rooted, deodexed running android 4.4+
- Nandroid backup (very important)
- Apktool and you know how to use it
- Notepad++
Ok, so let's start:
Step 1: copy these file from your phone to your computer:
/system/framework/framework.jar
/system/priv-app/SystemUI.apk
/system/build.prop
Step 2: open build.prop in notepad++, find this line:
Code:
ro.config.low_ram=
if it say "true", skip to step 4
if it say "false", just change to "true" and reboot your phone
if you can not find this line, or nothing change after you changed it to "true" and reboot, follow step 3
Step 3: (force enable low Ram)
Add this line to your build.prop
Code:
ro.config.low_ram.mod=true
Now use apktool to decompile your framework.jar
Navigate to \framework.jar.out\smali\android\app\ActivityManager.smali, open it in notepad++
Find this line:
Code:
ro.config.low_ram
And change it to
Code:
ro.config.low_ram.mod
Compile, push it back to your phone and reboot
Wait until your phone booted up
Step 4: (force enable status bar transparent)
Decompile SystemUI.apk
Navigate to \SystemUI\smali\com\android\systemui\statusbar\phone\BarTransitions.smali
find these line:
Code:
invoke-static {}, Landroid/app/ActivityManager;->isHighEndGfx()Z
move-result v0
Change it to
Code:
const/4 v0, 0x1
Compile and push it back to your phone
Done :highfive:
Sorry for my bad english. This is my first post since I used xda. Hope you like it!
Thank you for your post
Bro I'd love to have this, but my de-recompiling skills are next to 0. If I upload the files, would you mind doing it for me? Thanks ?
Inviato dal mio Xperia U utilizzando Tapatalk
Bert98 said:
Bro I'd love to have this, but my de-recompiling skills are next to 0. If I upload the files, would you mind doing it for me? Thanks ?
Inviato dal mio Xperia U utilizzando Tapatalk
Click to expand...
Click to collapse
Please check your code again. You saw that error when you compile framework-res or SystemUI?
I was able to do the changes up to the framework.jar and also edited systemui.apk but got systemui force close at boot. One question though I got odexed systemui.apk that has a systemui.odex do I need to deodex them at a single systemui.apk? either way I tried them both but same, results to force close hoping for help in this one :good:
For those on Lollipop or above:
I was poking around in the Android Source when i found these two functions
Code:
/**
* Used by persistent processes to determine if they are running on a
* higher-end device so should be okay using hardware drawing acceleration
* (which tends to consume a lot more RAM).
* @hide
*/
static public boolean isHighEndGfx() {
return (!isLowRamDeviceStatic() &&
!Resources.getSystem().getBoolean(com.android.internal.R.bool.config_avoidGfxAccel))
|| isForcedHighEndGfx();
}
/**
* @hide
*/
public static boolean isForcedHighEndGfx() {
return SystemProperties.getBoolean("persist.sys.force_highendgfx", false);
}
So, to enable high end graphics, all you have to do is set a new property "persist.sys.force_highendgfx" to true and it should work
Tried and working
Cheers!
Technohacker
If the original code of the option is "ro.config=low_ram" why add a ".mod" in the end of the code when adding it to build.prop? Will that still have any effects? Sincr i dont have that option available in build.prop
And in what part of the build.prop should i put the code?
What other .jar files or other files contain the code? Only framework.jar? What about the services.jar??
Bootloop on Android 11
Hi
As promise to @tromine this is simple tutorial that change lockscreen Hour style to bold
What You Need:
1. APK Tool for decompiling (i use TMA and Thanks go to Ticklefish)
2. Stock Sony 18.6.A.0.175 rom installed and odex
3. Patience & Time
Lets Start.
First pull: SystemUI, framework-res and SemcGenericUxpRes ( Res are needed so you can properly decompile SystemUI)
Decompile SystemUI and go to SystemUI.apk\res\values folder open styles.xml
Find:
Code:
<style name="somc_sony_clock_hour_style" parent="@style/SonyClockBaseStyle">
<item name="android:textSize">@dimen/somc_sony_clock_hour_digit_size</item>
<item name="android:maxLines">1</item>
<item name="android:fontFamily">x-sst</item>
</style>
<style name="somc_sony_clock_minute_style" parent="@style/SonyClockBaseStyle">
<item name="android:textSize">@dimen/somc_sony_clock_minute_digit_size</item>
<item name="android:maxLines">1</item>
<item name="android:fontFamily">x-sst</item>
"somc_sony_clock_hour_style" controls Hour numbers
"somc_sony_clock_minute_style" control Min numbers
Add this line:
At "clock_hour_style"
Code:
<item name="android:textStyle">bold</item>
under
Code:
<item name="android:textSize">@dimen/somc_sony_clock_hour_digit_size</item>
At "clock_minute_style" change:
Code:
<item name="android:fontFamily">x-sst</item>
To
Code:
<item name="android:fontFamily">x-sst-light</item>
Now save and you can recompile.
If you want to change size of clock go to SystemUI.apk\res\values open dimens.xml
This are sizes for clock:
Code:
<dimen name="somc_sony_clock_hour_digit_size">114.0dip</dimen>
<dimen name="somc_sony_clock_minute_digit_size">108.0dip</dimen>
I changed my like this:
Code:
<dimen name="somc_sony_clock_hour_digit_size">94.0dip</dimen>
<dimen name="somc_sony_clock_minute_digit_size">94.0dip</dimen>
So it look smaller
@psichokillah want to get rid of the clock on the lockscreen. Is it possible?
The Answer is Yes.
Go to SystemUI.apk\res\layout\somc_sony_clock_view.xml
On First line:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.sonymobile.keyguard.plugin.sonyclock.SonyClock android:layout_gravity="center_horizontal" android:orientation="vertical" android:id="@id/sony_clock_root" android:layout_width="wrap_content" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
Add (android:visibility="invisible") after android:id="@id/sony_clock_root" so it look like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.sonymobile.keyguard.plugin.sonyclock.SonyClock android:layout_gravity="center_horizontal" android:orientation="vertical" android:id="@id/sony_clock_root" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
Save, recompile Push apk to system.
P.S. zips are NOT flashable copy/push them your choice.
How to Install:
1. Copy moded SysteUI to sd_card
2. Reboot to PhilZ_Touch recovery
3. Go to "Mounts and Storage
- mount /system ++Go Back++
Advanced Functions->Aroma File Manager
4. Select sdcard
5. Press and hold SystemUI->copy->Go back
6. Select: system->priv-app->SystemUI (Paste here and Overwrite)
Note: If permession is not rw-r--r-- select SystemUI.apk->menu->Change Permission to (User:read/write, Group:read, Others:read)
- Exit Aroma FM
- Wipe Cache and Dalvik/ART Cache
7. Reboot System Now
@Dzepar Thanks i'll try it this evening
LOL, I thought it was already in bold. Thanks m8!
@tromine
Your welcome m8
But please edit your post and remove quote of OP, you can tag me with @ sign before name
Thanks
Sent from my D2303
The zips for d2303?
I have installed the recoveries, but I can't enter since no cyan led appears. It's impossible to change the SystemUI
TheSLZ said:
The zips for d2303?
Click to expand...
Click to collapse
Yap, it's from D2303. But you can change it on any SystemUI from M2 variants and maybe more, as long it have those lines in styles.
Sent from my D2303
psichokillah said:
I have installed the recoveries, but I can't enter since no cyan led appears. It's impossible to change the SystemUI
Click to expand...
Click to collapse
Which recovery do you installed? Install NUT app from Play Store it may help.
Sent from my D2303
Installed T2U NUT recovery and replaced file through TWRP, because I can't enter PhilZ, anyway ..the result..
P.S: I love you and thank you so much!
You need to download the NDR util app from the playstore you can reboot to any of them then no need to use the tapping of the vol button then
D2303 5.1lollipop customised NCB rooted LB t2u nut dual recovery bravia engine+x-reality debloated
[email protected] said:
You need to download the NDR util app from the playstore you can reboot to any of them then no need to use the tapping of the vol button then
D2303 5.1lollipop customised NCB rooted LB t2u nut dual recovery bravia engine+x-reality debloated
Click to expand...
Click to collapse
Believe me I tried, but it doesn;t work. The phone boots and it appears the green LED color then the screen goes blank and that's it.
Thanks for the release
It works! But it seems tight between hour and minutes. How can I fix this ?
@tromine
It looks like you need to lower dimensions of minute numbers. Go to values/dimensions.xml and see what's best for you.
You have which dimensions are responsible for what in OP.
Sent from my D2303
Can u make flashable zip?
@djborek
I'll try .
But this is tutorial for how to make it on your own and it's not that hard. Let me know if you have some difficulty I'll help you
Sent from my D2303
what wrong ?
adek89 said:
what wrong ?
Click to expand...
Click to collapse
Did you install SemcGenericUxpRes.apk?
You need both Res apks (resources) to properly de/recompile apk.
Sent from my D2303
how to instal ?
adek89 said:
how to instal ?
Click to expand...
Click to collapse
Put framework-res.apk and SemcGenericUxpRes.apk in "_in" folder, open TMA->Theming Menu->Install Framework On PC.