Related
{
"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"
}
****** For ICS 4.0.4, the code has changed a bit. Instead of changing the original tutorial, I'm providing a known working patch I did for an i9100 XWLPT build ******
(there's also a 2nd patch below to ignore regular swipe actions while using AOSP lockscreen)
https://github.com/shoman94/SHOstock2-XWLPT/commit/523075aac1730883a14e365e29c58eb8cce03248
https://github.com/shoman94/SHOstock2-XWLPT/commit/a55fb9b42a5f3f0c0c840c72e68372ab6a199cc2
This tutorial will be a bit involved, you've been warned! It was more of a learning experience, so here are the things you will see:
1. Add toggle settings via xml
2. Add global settings that are retained
3. Add code support for your toggles
4. Have your toggles be smart, and enable/disable other related toggles
5. Add a debug message using Slog, this is invaluable for any project!
Based on 4.0.3 LP3 base..Adjust resource IDs (bolded) for your base!!
--------------------------------------------------------------------------
Step 1. Adding the toggles to Settings/Date & Time (the easy part)
Decompile Settings.apk, modify the following:
public.xml, add:
Code:
<public type="string" name="disable_ampm" id="[b]0x7f0b0923[/b]" />
<public type="string" name="disable_ampm_text" id="[b]0x7f0b0924[/b]" />
<public type="string" name="disable_time" id="[b]0x7f0b0925[/b]" />
<public type="string" name="disable_time_text" id="[b]0x7f0b0926[/b]" />
strings.xml, add:
Code:
<string name="disable_time">Hide Time</string>
<string name="disable_time_text">Remove time from status bar</string>
<string name="disable_ampm">Hide AM/PM</string>
<string name="disable_ampm_text">Remove AM/PM from time in status bar</string>
xml/date_time_prefs.xml, add:
Code:
<CheckBoxPreference android:title="@string/disable_time" android:key="hide_time" android:summary="@string/disable_time_text" />
<CheckBoxPreference android:title="@string/disable_ampm" android:key="hide_ampm" android:summary="@string/disable_ampm_text" />
Compile settings.apk, u/l and reboot. Make sure the toggles are added!
Step 2. Adding code for the settings (the not so easy part). This code gets a bit involved since we have to handle the new settings, and also add 'toggle logic' for different combinations to enable/disable them.
Still in settings.apk, DateTimeSettings.smali:
At top, add:
Code:
.field private mHideTime:Landroid/preference/Preference;
.field private mHideAmPm:Landroid/preference/Preference;
Then in the '.method private initUI()V', find 'return-void' and add this code above it:
Code:
const-string v6, "hide_time"
invoke-virtual {p0, v6}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v6
check-cast v6, Landroid/preference/Preference;
iput-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
const-string v6, "hide_ampm"
invoke-virtual {p0, v6}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v6
check-cast v6, Landroid/preference/Preference;
iput-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
if-eqz v0, :no_disablebtns
const/4 v0, 0x0
iget-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
invoke-virtual {v6, v0}, Landroid/preference/Preference;->setEnabled(Z)V
iget-object v6, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
invoke-virtual {v6, v0}, Landroid/preference/Preference;->setEnabled(Z)V
:no_disablebtns
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
if-eqz v0, :no_disableampm
const/4 v0, 0x0
iget-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
invoke-virtual {v6, v0}, Landroid/preference/Preference;->setEnabled(Z)V
:no_disableampm
Now search for '.method public onPreferenceTreeClick' and on the line below, change .locals 2 to:
Code:
.locals 6
Now search for:
:cond_2
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
if-ne p2, v0, :cond_0
change the last line to:
Code:
if-ne p2, v0, :cond_new
About 10 lines below that, you will see 'invoke-direct {p0, v0}, Lcom/android/settings/DateTimeSettings;->set24Hour(Z)V', add this below that line:
Code:
iget-object v1, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
if-nez v0, :cond_hideampm
const/4 v0, 0x1
goto :set_ampm
:cond_hideampm
const/4 v0, 0x0
:set_ampm
invoke-virtual {v1, v0}, Landroid/preference/Preference;->setEnabled(Z)V
:cond_updatetime
Then search for 'goto :goto_0' about 10 lines below and add this before '.end method':
Code:
:cond_new
const-string v3, "hide_ampm"
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
if-ne p2, v0, :cond_new2
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v2
:save_ampm
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "hide_ampm"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto :cond_updatetime
:cond_new2
const-string v3, "hide_time"
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
if-ne p2, v0, :goto_0
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v2
:save_time
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "hide_time"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
if-nez v2, :cond_hidebtns
const/4 v2, 0x1
goto :cond_setbtns
:cond_hidebtns
const/4 v2, 0x0
:cond_setbtns
iget-object v1, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
invoke-virtual {v1, v2}, Landroid/preference/Preference;->setEnabled(Z)V
iget-object v1, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
invoke-virtual {v1, v2}, Landroid/preference/Preference;->setEnabled(Z)V
goto :cond_updatetime
And that's it for Settings! Recompile and upload and check everything looks right in Settings/Date and Time and the toggles work.
Step 3. Modifying the clock code to handle new changes (kinda easy =)
Decompile SystemUI and open Clock.smali.
Search for the following in func getSmallTime:
.local v3, context:Landroid/content/Context;
invoke-static {v3}, Landroid/text/format/DateFormat;->is24HourFormat(Landroid/content/ContextZ
Then add this code BEFORE the invoke-static .. line above (NOTE: there's a constant below that refers to the clock resource in public.xml [<public type="id" name="clock" id="0x7f0e0027" />], be sure it matches!):
Code:
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v7, "hide_time"
const/4 v0, 0x0
invoke-static {v2, v7, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v7
const/4 v0, 0x0
if-eqz v7, :cond_nohide
const/16 v0, 0x8
:cond_nohide
const v1, [b]0x7f0e0027[/b]
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v1
invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V
About 20 lines below that, you will see:
.local v1, MAGIC2:C
invoke-virtual {v3, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v4
Add this directly after:
Code:
if-nez v2, :cond_continue
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "hide_ampm"
const/4 v0, 0x0
invoke-static {v2, v3, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v7
########### Start of debug msg, can be removed #######
const-string v0, "ampm"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "getint returned="
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
########### End of debug msg ###########
move v2, v7
if-eqz v2, :cond_continue
const-string v4, "h:mm"
:cond_continue
That's it for Clock.smali.
Step 4. Almost there, now we just have to make one more change to SystemUI in PhoneStatusBar.smali.
Find '.method public showClock' and change .locals 2 to:
Code:
.locals 3
Find:
if-eqz p1, :cond_1
const/4 v0, 0x0
and insert this code after it:
Code:
iget-object v2, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "hide_time"
invoke-static {v2, v3, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-eqz v2, :goto_0
const/16 v0, 0x8
Recompile SystemUI and reboot. Now try out the new feature =)
Excellent.... built into my rom. Thanks !
...or just use 24h format which is shorter and more natural
sorg said:
...or just use 24h format which is shorter and more natural
Click to expand...
Click to collapse
Ummm You can use this to remove the clock completely....
I just updated to OP to include Step 4. I didn't realize the lock screen was interfering with the feature since I don't use one..Fixed now.
Building into mine as well, tonight if I don't fall asleep.
And a few moments of disagreeing with smali, got it going...thanks a bunch Jeboo!
nice, welldone!
but it s better to leave public.xml, add only the others xml and recompile once.
then decompile again to get the public xml
it s safer, and then match the smali changes with the new public values.
Anyway great guide
if your decompiling with smali/baksmali directly make sure to use the -l flag (thats a L) so you have local varibles instead of registers, learned this the hard way lol
This mod is amazing, thank you very much my friend works fabulously
Add a toggle for CRT Animation
Building upon the same theme from the OP, we can now add another toggle under display settings for CRT animation. This feature is controlled by the boolean animateScreenLights in framework-res.apk (thanks to whomever the original author was!).
Since adding the setting is pretty much identical to the procedure in the OP, I will just discuss the relevant code needed to access the new setting (I leave adding the setting up to you!). The only requirement is you name your setting 'crt_animation'.
Our patch point will be inside services.jar, specifically PowerManagerService$BrightnessState.smali (this is based on LP7):
Code:
iget-object v6, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
iget-boolean v6, v6, Lcom/android/server/PowerManagerService;->mAnimateScreenLights:Z
if-nez v6, :cond_19
NOTE: cond_19 may differ depending on your decompiler.
So we need to delete the 3 lines above. In its place, add our new code:
Code:
iget-object v0, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v0}, Lcom/android/server/PowerManagerService;->access$4300(Lcom/android/server/PowerManagerService;)Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "crt_animation"
const/4 v4, 0x0
invoke-static {v0, v1, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v6
if-eqz v6, :cond_19
NOTE: Again, if cond_19 is different, fix the last line above!
Recompile settings.apk & services.jar, u/l and reboot!
Porting this mod to the skyrocket
Hey jeboo, as i told you I am trying to port this over to my rom but need some guidance in clock.smali and PhoneStatusBar.smali Thanks I appreciate the help I am attaching the smali files...
adding toggle CRT animation settings
jeboo said:
Building upon the same theme from the OP, we can now add another toggle under display settings for CRT animation. This feature is controlled by the boolean animateScreenLights in framework-res.apk (thanks to whomever the original author was!).
Since adding the setting is pretty much identical to the procedure in the OP, I will just discuss the relevant code needed to access the new setting (I leave adding the setting up to you!). The only requirement is you name your setting 'crt_animation'.
Our patch point will be inside services.jar, specifically PowerManagerService$BrightnessState.smali (this is based on LP7):
Code:
iget-object v6, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
iget-boolean v6, v6, Lcom/android/server/PowerManagerService;->mAnimateScreenLights:Z
if-nez v6, :cond_19
NOTE: cond_19 may differ depending on your decompiler.
So we need to delete the 3 lines above. In its place, add our new code:
Code:
iget-object v0, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v0}, Lcom/android/server/PowerManagerService;->access$4300(Lcom/android/server/PowerManagerService;)Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "crt_animation"
const/4 v4, 0x0
invoke-static {v0, v1, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v6
if-eqz v6, :cond_19
NOTE: Again, if cond_19 is different, fix the last line above!
Recompile settings.apk & services.jar, u/l and reboot!
Click to expand...
Click to collapse
hi Mr Jeboo.. could u specify the settings in the strings.xml and public.xml in settings.apk? i assume u have got this mod to work.. I couldn't get what to add in this files.. thanks..
Apparently when I was redoing the whole thing to do AOSP/CRT toggle I placed the step 4 in the wrong spot.
How would we disable Weather in Lockscreen when AOSP is checked?
Clock.smali
Ok so I found out that the the statusbarservices is where I look instead of phonestatusbar.smali
however I'm having trouble with the Clock.smali inserts.
Could someone take a look, who knows, and make any suggestions or point me where i need to edit?
jeboo said:
...
Find:
if-eqz p1, :cond_1
const/4 v0, 0x0
and insert this code after it:
Code:
iget-object v2, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "hide_time"
invoke-static {v2, v3, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-eqz v2, [B][COLOR="DarkOrange"]:goto_0[/COLOR][/B]
const/16 v0, 0x8
Recompile SystemUI and reboot. Now try out the new feature =)
Click to expand...
Click to collapse
On LPD, instead of :goto_0, use :goto_e
Robobob1221 said:
Ok so I found out that the the statusbarservices is where I look instead of phonestatusbar.smali
however I'm having trouble with the Clock.smali inserts.
Could someone take a look, who knows, and make any suggestions or point me where i need to edit?
Click to expand...
Click to collapse
I took a quick look at your clock.smali, GB sure made things complicated (24 registers vs 9 in ICS). When the registers change that much, unfortunately you're going to have to track them, it sucks.
One major problem I see is the return value from is24hourfmt in your ver uses v9, so you need to update the line 'if-nez v2, :cond_continue' to use v9 as well. Try that and let me know.
Thanks to the others for helping with the other changes lately..I must admit I use a much shorter patch for personal use, so I can fall behind with the latest code changes =)
jeboo
jeboo said:
I took a quick look at your clock.smali, GB sure made things complicated (24 registers vs 9 in ICS). When the registers change that much, unfortunately you're going to have to track them, it sucks.
One major problem I see is the return value from is24hourfmt in your ver uses v9, so you need to update the line 'if-nez v2, :cond_continue' to use v9 as well. Try that and let me know.
Thanks to the others for helping with the other changes lately..I must admit I use a much shorter patch for personal use, so I can fall behind with the latest code changes =)
jeboo
Click to expand...
Click to collapse
Thanks for checking out my file.
So you mean that the line should be 'if-nez v2, v9 :cond_continue' or just replace v2 with v9?
Thanks for the help
私はローボーボブ。 Haro!!
Robobob1221 said:
Thanks for checking out my file.
So you mean that the line should be 'if-nez v2, v9 :cond_continue' or just replace v2 with v9?
Thanks for the help
私はローボーボブ。 Haro!!
Click to expand...
Click to collapse
if-nez v9, :cond_continue
Basically if you're using military time, there's no need to worry about am/pm.
Still no compiling
jeboo said:
if-nez v9, :cond_continue
Basically if you're using military time, there's no need to worry about am/pm.
Click to expand...
Click to collapse
In plain English it seems so simple! Lol!
Thanks again. I'll check it out and see if it works. I hope it does Thanks again for the help.
Ok I tried the change you suggested and it still won't compile
I tried a few other changes but it results in the same error '
Could not smali file: [email protected]'. Sometimes the numbers ate end vary but its the same result.
another set is this
[email protected]
私はローボーボブ。 Haro!!
jeboo said:
if-nez v9, :cond_continue
Basically if you're using military time, there's no need to worry about am/pm.
Click to expand...
Click to collapse
Hello Jeboo!
Weird to say but.. with ur tutorial I ve been able to make a toggle to choose Samsung lockscreen or the AOSP one credits for u in my next Simplistic Disaster III Rom
whoa!
Hi everyone!
kanpurite made a great job giving us the easy way to locking apps in memory in this thread.
But, as i told in http://forum.xda-developers.com/showpost.php?p=31627356&postcount=23 there is other, a little bit harder, but still it can be done.
Requirements:
A Pc (this guide is made over Windows, but may work on linux as well)
notepad++
baksmali/smali tools (attached at this thread)
root explorer (or any file explorer with root capabilities)
Here is a step by step guide to do it:
1. Extract baksmali tools to a new folder
2. Extract services.jar from your phone (at /system/framework) and copy to your baksmali folder
3. Run baksmali manager.bat
4. select option 4 (select file to work), then select services.jar
5. select option 1 (baksmali) and wait (CAUTION: DON'T CLOSE THE BAKSMALI MANAGER WINDOW)
6. Go to your baksmali folder, there must be a new folder named "services"
7. enter to services folder and go to this sub-folder
Code:
\com\android\server\am
8. open ActivityManagerService.smali with notepad++
9. search for ".line 13892" and add the following after "if-lez v10, :cond_2af":
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_2b4
move-object/from16 v0, p1
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_2bf
.line 13894
:cond_2b4
const/4 v11, 0x0
(NOTE: You can change to any app you want, just give the proper name of the app process....)
10. add the following:
Code:
.line 13895
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_2bf
11. change the subsequent numbers of ".line" (including the old .line 13895) like this:
Code:
.line 13896
move/from16 v11, p2
.line 13897
.restart local v11 #adj:I
const/16 v34, 0x0
.line 13898
.restart local v34 #schedGroup:I
const/4 v2, 0x1
move-object/from16 v0, p1
iput-boolean v2, v0, Lcom/android/server/am/ProcessRecord;->hidden:Z
.line 13899
const-string v2, "bg-activities"
move-object/from16 v0, p1
iput-object v2, v0, Lcom/android/server/am/ProcessRecord;->adjType:Ljava/lang/String;
goto/16 :goto_f1
12. Save the file.
13. Go to the baksmali manager window and select option 2 (smali) and wait, it will create a classes.dex file on your baksmali folder
14. Open up services.jar with 7zip or WinRAR and drag the newly created classes.dex into the window to refresh services.jar with the new
classes.dex
15. Copy the new services.jar file to your sdcard and from there, copy to /system/framework (use root explorer, mount read/write and copy the
file).
16. set proper permissions: set 644 permissions ((rw-r--r--) or (tick Read: owner, group, others / Write: owner)
17. Restart, make a wipe dalvik and cache and
18. Enjoy!
thx... but why not just upload a baked/moded ver of services.jar... it would be much easier just to replace this specific file ;p as i assume u did for youreself ;p
meilbox said:
thx... but why not just upload a baked/moded ver of services.jar... it would be much easier just to replace this specific file ;p as i assume u did for youreself ;p
Click to expand...
Click to collapse
I could do it, but I do prefer to share knowledge with everyone... I could upload a services.jar but it's more fun to learn new things.
Enviado desde mi MB525 usando Tapatalk 2
i dont have line 10429..
This is what is in my services.jar (Latest Build):
.line 10420
:cond_167
const/16 v48, 0x0
.line 10421
.local v48, mi:Landroid/os/Debug$MemoryInfo;
if-eqz v38, :cond_22a
.line 10423
:try_start_16b
move-object/from16 v0, v61
iget-object v5, v0, Lcom/android/server/am/ProcessRecord;->thread:Landroid/app/IApplicationThread;
move-object/from16 v0, p1
move/from16 v1, v43
move/from16 v2, v38
move-object/from16 v3, v42
invoke-interface {v5, v0, v1, v2, v3}, Landroid/app/IApplicationThread;->dumpMemInfo(Ljava/io/FileDescriptor;ZZ[Ljava/lang/StringLandroid/os/Debug$MemoryInfo;
:try_end_17a
.catch Landroid/os/RemoteException; {:try_start_16b .. :try_end_17a} :catch_21b
move-result-object v48
.line 10435
:cond_17b
:goto_17b
if-nez v43, :cond_26b
if-eqz v48, :cond_26b
.line 10436
invoke-virtual/range {v48 .. v48}, Landroid/os/Debug$MemoryInfo;->getTotalPss()I
move-result v5
int-to-long v7, v5
.line 10437
.local v7, myTotalPss:J
add-long v68, v68, v7
Click to expand...
Click to collapse
vaibhav palande said:
i dont have line 10429..
This is what is in my services.jar (Latest Build):
Click to expand...
Click to collapse
I'm not talking about ".line" on the code, I'm talking about the number of the line in the document. On notepad++ look at the numbers at the most left and you will find line 10429 with no problem
Enviado desde mi MB525 usando Tapatalk 2
Should i add here?
SO Should i add the code u gave above in line 10429 in the pic??
This is my services.jar:
{
"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"
}
vaibhav palande said:
SO Should i add the code u gave above in line 10429 in the pic??
This is my services.jar:
Click to expand...
Click to collapse
Ummm... Weird it's send that I have to polish my guide... I'm using last version of quarx too but my code it's aligned different. Don't add the code in that line cause could break all the code. Please, wait a little bit for me to be on my pc to check what is wrong...
Enviado desde mi MB525 usando Tapatalk 2
espaciosalter20 said:
Ummm... Weird it's send that I have to polish my guide... I'm using last version of quarx too but my code it's aligned different. Don't add the code in that line cause could break all the code. Please, wait a little bit for me to be on my pc to check what is wrong...
Enviado desde mi MB525 usando Tapatalk 2
Click to expand...
Click to collapse
I am using latest build 09-12.. U have latest build? or u want me to send u services.jar?
vaibhav palande said:
I am using latest build 09-12.. U have latest build? or u want me to send u services.jar?
Click to expand...
Click to collapse
ok, it was my bad... i was using an old services.jar as reference. I double check again that and the right code is:
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_2b4
move-object/from16 v0, p1
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_2bf
.line 13894
:cond_2b4
const/4 v11, 0x0
after this part:
Code:
[SIZE="5"][COLOR="Red"].line 13892[/COLOR][/SIZE]
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_29c
if-lez v10, :cond_2af
.line 13892, it's the key....
espaciosalter20 said:
ok, it was my bad... i was using an old services.jar as reference. I double check again that and the right code is:
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_2b4
move-object/from16 v0, p1
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_2bf
.line 13894
:cond_2b4
const/4 v11, 0x0
after this part:
Code:
[SIZE="5"][COLOR="Red"].line 13892[/COLOR][/SIZE]
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_29c
if-lez v10, :cond_2af
.line 13892, it's the key....
Click to expand...
Click to collapse
So, where should i add this code? Which line?
vaibhav palande said:
So, where should i add this code? Which line?
Click to expand...
Click to collapse
I updated OP... Check in there
Enviado desde mi MB525 usando Tapatalk 2
espaciosalter20 said:
I updated OP... Check in there
Enviado desde mi MB525 usando Tapatalk 2
Click to expand...
Click to collapse
If i want to add some more apps, which part of the code needs to be repeated for new app?? Because difference in the upper part and lower part of code is highlighted with red color below and in the lower part green colored part is absent.. otherwise the code is same..
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-[COLOR="red"]nez[/COLOR] v2, :cond_2b[COLOR="red"]4[/COLOR]
[COLOR="Lime"]move-object/from16 v0, p1[/COLOR]
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-[COLOR="red"]eqz[/COLOR] v2, :cond_2b[COLOR="red"]f[/COLOR]
.line 13894
:cond_2b4
const/4 v11, 0x0
Problem doing smali
Here is the problem i am getting while doing smali:
vaibhav palande said:
Here is the problem i am getting while doing smali:
Click to expand...
Click to collapse
OP UPDATED
add the following:
Code:
.line 13895
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_2bf
if-lez v10, :cond_2d2
and change the subsequent numbers of ".line" (including the old .line 13895) like this:
Code:
.line 13896
move/from16 v11, p2
.line 13897
.restart local v11 #adj:I
const/16 v34, 0x0
.line 13898
.restart local v34 #schedGroup:I
const/4 v2, 0x1
move-object/from16 v0, p1
iput-boolean v2, v0, Lcom/android/server/am/ProcessRecord;->hidden:Z
.line 13899
const-string v2, "bg-activities"
move-object/from16 v0, p1
iput-object v2, v0, Lcom/android/server/am/ProcessRecord;->adjType:Ljava/lang/String;
goto/16 :goto_f1
espaciosalter20 said:
add the following:
Code:
.line 13895
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_2bf
if-lez v10, :cond_2d2
and change the subsequent numbers of ".line" (including the old .line 13895) like this:
Code:
.line 13896
move/from16 v11, p2
.line 13897
.restart local v11 #adj:I
const/16 v34, 0x0
.line 13898
.restart local v34 #schedGroup:I
const/4 v2, 0x1
move-object/from16 v0, p1
iput-boolean v2, v0, Lcom/android/server/am/ProcessRecord;->hidden:Z
.line 13899
const-string v2, "bg-activities"
move-object/from16 v0, p1
iput-object v2, v0, Lcom/android/server/am/ProcessRecord;->adjType:Ljava/lang/String;
goto/16 :goto_f1
Click to expand...
Click to collapse
What about this? Sorry for so many questions but i really don't know a thing about smali files. I just learned one or 2 things by reading it here on xda..
vaibhav palande said:
What about this? Sorry for so many questions but i really don't know a thing about smali files. I just learned one or 2 things by reading it here on xda..
Click to expand...
Click to collapse
it's for resolve the problem that you commented earlier.... i do gave you the code in which i defined "cond_2b4" variable to be readed in the smali, but i forgot to give you the define of "cond_2bf" variable... this is what you have to do in order to make the variable work properly and avoid the error in compile the service.jar again
I mean what about the question below..
vaibhav palande said:
If i want to add some more apps, which part of the code needs to be repeated for new app?? Because there is some in upper and lower part of code.. difference in the upper part and lower part of code is highlighted with red color below and the text in green color is absent in lower part.. So little confused about which part of code to be repeated for locking more apps in memory... otherwise the code is same..
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-[COLOR="red"]nez[/COLOR] v2, :cond_2b[COLOR="red"]4[/COLOR]
[COLOR="Lime"]move-object/from16 v0, p1[/COLOR]
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-[COLOR="red"]eqz[/COLOR] v2, :cond_2b[COLOR="red"]f[/COLOR]
.line 13894
:cond_2b4
const/4 v11, 0x0
Click to expand...
Click to collapse
espaciosalter20 said:
it's for resolve the problem that you commented earlier.... i do gave you the code in which i defined "cond_2b4" variable to be readed in the smali, but i forgot to give you the define of "cond_2bf" variable... this is what you have to do in order to make the variable work properly and avoid the error in compile the service.jar again
Click to expand...
Click to collapse
This is not working.. :crying:
I get this error while doing smali:
Easier version?
http://forum.xda-developers.com/showthread.php?t=1889300
Sent from my MB525 using xda app-developers app
vaibhav palande said:
This is not working.. :crying:
I get this error while doing smali:
Click to expand...
Click to collapse
delete "if-lez v10, :cond_2d2"
Thanks to Sorg, Poppuri, Pako, Wanam.
2 level reboot menu from Wanam also included.
The mod actually developed by sorg and implemented into poppuri ROM with 2 another mods. One of them is too complicated idnd changes whole logic of hard buttons behavior. I just separated it from another ones.
Warning:
Installing of this mod will:
1. Remove another hard keys related mods like volume long press etc.
2. Remove old TV effect.
I dislike this mods, so they are not implemented.
3. Replace power menu with one from WanamLite ROM.
If you need tis mods, please ask autors of mod or ROM for implementing this one or do it yourself.
v2 Update.
Always vibrate, also if nothing killed.
Kills launchers.
Excluded App list:
com.android.providers.applications
com.sec.android.app.clockpackage
com.sec.android.widgetapp.alarmclock
com.sec.phone
com.android.settings
com.android.defcontainer
com.android.contacts
com.sec.android.app.factorymode
v3 - Will not kill launchers, but always provide feedback
To implement into another ROM/file:
1. Decompile android.policy.jar (both from attachment and from your ROM).
2. Copy PhoneWindowManager$BackLongPress.smali into
\android.policy.jar.out\com\android\internal\policy\impl\
3. Merge changes from \android.policy.jar.out\com\android\internal\policy\impl\PhoneWindowManager.smali to your file.
You can use original file from LIH ROM to find differences.
4. Recompile.
hi, just flash the zip in cwm? Criskelo I LIH.?
You can.
Make backup first.
Better - ask Kriskello for implementing this mod.
It simple.
I hope that will work.
---------- Post added at 08:17 PM ---------- Previous post was at 08:13 PM ----------
So I already have and it seems fully functional, many thanks for your work, it's ok
Doesn't work in my custom LIH rom.
well i don.t have a notebook or a desktop system in the next few days,and i really like this feature...so can someone compile one for wanam 4.0 XXDLJ1?tx
Work in omega 29
Enviado desde mi GT-I9300 usando Tapatalk 2
Work on hyper light DLJ1 1.1.5
finally I don't need to install jkay
Tap talk killed now with kill back key
Envoyé depuis mon GT-I9300 avec Tapatalk
You may name my babies
Insert coin 2.0.0 XDLID. works perfectly, wanted this so long. if i could thousand thank i would
akelon said:
Work in omega 29
Enviado desde mi GT-I9300 usando Tapatalk 2
Click to expand...
Click to collapse
I tried on omega 29 and its not worked any solution will be appriciated. Thanks..
There is no differences in android.policy.jar between LIH and LJ1.
So, the mod should work on LJ1.
akelon said:
Work in omega 29
Enviado desde mi GT-I9300 usando Tapatalk 2
Click to expand...
Click to collapse
Have you recompiled it or just flashed it directly?
I am on Omega v29 and it didn't work after flashing. Could you please share the modded file? Thanks in advance.
tczhang said:
Have you recompiled it or just flashed it directly?
I am on Omega v29 and it didn't work after flashing. Could you please share the modded file? Thanks in advance.
Click to expand...
Click to collapse
Worked here on v29. Just flashed
Sent from my GT-I9300 using Xparent Green Tapatalk 2
d8389 said:
To implement into another ROM/file:
1. Decompile android.policy.jar (both from attachment and from your ROM).
2. Copy PhoneWindowManager$BackLongPress.smali into
\android.policy.jar.out\com\android\internal\policy\impl\
3. Merge changes from \android.policy.jar.out\com\android\internal\policy\impl\PhoneWindowManager.smali to your file.
You can use original file from LIH ROM to find differences.
4. Recompile.
Click to expand...
Click to collapse
Plz give us the guide about "the changes of PhoneWindowManager.smali"
androidphone2012 said:
Plz give us the guide about "the changes of PhoneWindowManager.smali"
Click to expand...
Click to collapse
You should add
Code:
.field private final mBackLongPress:Ljava/lang/Runnable;
.field public mBackLongPressed:I
somewhere in
# instance fields
---
Code:
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$BackLongPress;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$BackLongPress;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
in
Code:
.method public constructor <init>()V
i do it in another similar group
---
in
Code:
.method public interceptKeyBeforeDispatching(Landroid/view/WindowManagerPolicy$WindowState;Landroid/view/KeyEvent;I)J
I increased number of registers by 1 (not sure it's necessary)
and after something like
Code:
const-string v41, "RemoteException when showing recent apps"
move-object/from16 v0, v40
move-object/from16 v1, v41
invoke-static {v0, v1, v10}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto :goto_521
.line 3110
.end local v10 #e:Landroid/os/RemoteException;
:cond_532
add
Code:
const/16 v40, 0x4
move/from16 v0, v21
move/from16 v1, v40
if-ne v0, v1, :cond_569
.line 2281
if-eqz v9, :cond_556
if-nez v30, :cond_55f
move-object/from16 v0, p0
const v1, 0x0
iput v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPressed:I
if-nez v22, :cond_569
iget-object v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
invoke-static {}, Landroid/view/ViewConfiguration;->getGlobalActionKeyTimeout()J
move-result-wide v2
const-wide/16 v4, 0x5
mul-long/2addr v2, v4
invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_569
:cond_556
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
:cond_55f
move-object/from16 v0, p0
iget v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPressed:I
if-eqz v1, :cond_569
const-wide/16 v40, -0x1
goto/16 :goto_ad
:cond_569
:goto_569
check also for conflicting goto & cond
d8389 said:
You should add
Code:
.field private static final LONG_PRESS_TIMEOUT:I = 0x190
somewhere in
# static fields
---
Code:
.field private final mBackLongPress:Ljava/lang/Runnable;
.field public mBackLongPressed:I
somewhere in
# instance fields
---
Code:
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$BackLongPress;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$BackLongPress;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
in
Code:
.method public constructor <init>()V
i do it in another similar group
---
in
Code:
.method public interceptKeyBeforeDispatching(Landroid/view/WindowManagerPolicy$WindowState;Landroid/view/KeyEvent;I)J
I increased number of registers by 1 (not sure it's necessary)
and after something like
Code:
const-string v41, "RemoteException when showing recent apps"
move-object/from16 v0, v40
move-object/from16 v1, v41
invoke-static {v0, v1, v10}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto :goto_521
.line 3110
.end local v10 #e:Landroid/os/RemoteException;
:cond_532
add
Code:
const/16 v40, 0x4
move/from16 v0, v21
move/from16 v1, v40
if-ne v0, v1, :cond_569
.line 2281
if-eqz v9, :cond_556
if-nez v30, :cond_55f
move-object/from16 v0, p0
const v1, 0x0
iput v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPressed:I
if-nez v22, :cond_569
iget-object v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
invoke-static {}, Landroid/view/ViewConfiguration;->getGlobalActionKeyTimeout()J
move-result-wide v2
const-wide/16 v4, 0x5
mul-long/2addr v2, v4
invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_569
:cond_556
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
:cond_55f
move-object/from16 v0, p0
iget v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPressed:I
if-eqz v1, :cond_569
const-wide/16 v40, -0x1
goto/16 :goto_ad
:cond_569
:goto_569
check also for conflicting goto & cond
Click to expand...
Click to collapse
Thanks, but PhoneWindowManager.smali in Nexus S differs from SGS III Could you give me some tips?
d8389 said:
Thanks to Sorg, Poppuri, Pako, Wanam.
2 level reboot menu from Wanam also included.
The mod actually developed by sorg and implemented into poppuri ROM with 2 another mods. One of them is too complicated idnd changes whole logic of hard buttons behavior. I just separated it from another ones.
Click to expand...
Click to collapse
also working on CheckROM 5.5 DLIB!
@D8329,can you make Pin Code Unlock without pressing OK button mod too ?
works perfectly on foxhound 1.0
Tired of the volume panel sitting on the screen for what seems like way too long? You can now change the timeout so it hides much quicker.
We're going to be working with the following two files:
SecSettings.apk
framework.jar
KEY
ADD what's in RED
SecSettings.apk
Navigate to /res/values/arrays.xml
Add the following to the end of the file
Code:
<string-array name="volume_panel_timeout_entries">
<item>0.5s</item>
<item>1s</item>
<item>1.5s</item>
<item>2s</item>
<item>2.5s</item>
<item>3s (Default)</item>
</string-array>
<string-array name="volume_panel_timeout_values">
<item>500</item>
<item>1000</item>
<item>1500</item>
<item>2000</item>
<item>2500</item>
<item>3000</item>
</string-array>
Navigate to /res/values/strings.xml
Add the following to the end of the file
Code:
<string name="volume_panel_timeout_title">Volume Panel Timeout</string>
<string name="volume_panel_timeout_summary">%s</string>
Navigate to /xml/display_settings.xml
Add the following line wherever you would like it to show in the menu
Code:
<ListPreference android:persistent="false" android:entries="@array/volume_panel_timeout_entries" android:title="@string/volume_panel_timeout_title" android:key="volume_panel_timeout" android:summary="@string/volume_panel_timeout_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/volume_panel_timeout_values" />
Navigate to /smali/com/android/settings/DisplaySettings.smali
Code:
.field mSupportFolderType:Z
.field private mTouchKeyLight:Landroid/preference/ListPreference;
[COLOR="Red"].field mVolumePanel:Landroid/preference/ListPreference;[/COLOR]
.method private updateState()V
Code:
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v4, "display_battery_percentage"
invoke-static {v0, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_4
move v0, v1
:goto_1
invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
[COLOR="red"]iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "volume_panel_timeout"
const/16 v5, 0x5
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v0, v3}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
invoke-virtual {v3}, Landroid/preference/ListPreference;->getEntry()Ljava/lang/CharSequence;
move-result-object v3
invoke-virtual {v0, v3}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V[/COLOR]
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mTouchKeyLight:Landroid/preference/ListPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "button_key_light"
.method public onCreate(Landroid/os/BundleV
Code:
const-string v11, "display_battery_level"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
[COLOR="red"]const-string v11, "volume_panel_timeout"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/ListPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
iget-object v11, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
invoke-virtual {v11, p0}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getActivity()Landroid/app/Activity;
move-result-object v11
invoke-static {v11}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v11
if-eqz v11, :cond_6
.method public onPreferenceChange(Landroid/preference/Preference;Ljava/lang/ObjectZ
Code:
:catch_2
move-exception v0
.line 1038
const-string v1, "DisplaySettings"
const-string v2, "could not persist Touch key light setting"
invoke-static {v1, v2, v0}, Landroid/util/Log;->secE(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto/16 :goto_4
.line 1040
:cond_9
[COLOR="red"]const-string v2, "volume_panel_timeout"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_next
check-cast p2, Ljava/lang/String;
invoke-static {p2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v0
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "volume_panel_timeout"
invoke-static {v1, v2, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
iget-object v1, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
iget-object v1, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
invoke-virtual {v1}, Landroid/preference/ListPreference;->getEntry()Ljava/lang/CharSequence;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V
goto/16 :goto_4
:cond_next[/COLOR]
const-string v2, "quick_launch"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
That's it for SecSettings. Compile.
framework.jar
Navigate to /smali/android/view/VolumePanel.smali
Find .method private resetTimeout()V
and replace the entire thing with this:
Code:
.method private resetTimeout()V
.locals 5
.prologue
const/4 v4, 0x5
.line 16
iget-object v1, p0, Landroid/view/VolumePanel;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
.line 17
const-string v2, "volume_panel_timeout"
const/4 v3, 0x0
.line 16
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
.line 18
.local v0, temp:I
invoke-virtual {p0, v4}, Landroid/view/VolumePanel;->removeMessages(I)V
.line 19
if-eqz v0, :cond_0
.line 20
invoke-virtual {p0, v4}, Landroid/view/VolumePanel;->obtainMessage(I)Landroid/os/Message;
move-result-object v1
int-to-long v2, v0
invoke-virtual {p0, v1, v2, v3}, Landroid/view/VolumePanel;->sendMessageDelayed(Landroid/os/Message;J)Z
.line 24
:goto_0
return-void
.line 22
:cond_0
invoke-virtual {p0, v4}, Landroid/view/VolumePanel;->obtainMessage(I)Landroid/os/Message;
move-result-object v1
const-wide/16 v2, 0xbb8
invoke-virtual {p0, v1, v2, v3}, Landroid/view/VolumePanel;->sendMessageDelayed(Landroid/os/Message;J)Z
goto :goto_0
.end method
Now compile framework.jar (Make sure you compile it correctly adding back the META-INF and preloaded-classes files)
First. (;
Sent from my SGH-I747 using Tapatalk 4
Sajoeee said:
First. (;
Sent from my SGH-I747 using Tapatalk 4
Click to expand...
Click to collapse
First thanks
awesome mod man
Danvdh said:
First thanks
awesome mod man
Click to expand...
Click to collapse
(; ah, man. should have done that. Second thanks. (;
Sent from my SGH-I747 using Tapatalk 4
Nice work....how about some array detail? Looks like you forgot to post up your res/arrays info.
Thanks man.
Didact74 said:
Nice work....how about some array detail? Looks like you forgot to post up your res/arrays info.
Thanks man.
Click to expand...
Click to collapse
Awkward... will do that right now
Sent from my SAMSUNG-SGH-I747
EDIT: Done. Here's what needs to be added:
Navigate to /res/values/arrays.xml
Add the following to the end of the file
Code:
<string-array name="volume_panel_timeout_entries">
<item>0.5s</item>
<item>1s</item>
<item>1.5s</item>
<item>2s</item>
<item>2.5s</item>
<item>3s (Default)</item>
</string-array>
<string-array name="volume_panel_timeout_values">
<item>500</item>
<item>1000</item>
<item>1500</item>
<item>2000</item>
<item>2500</item>
<item>3000</item>
</string-array>
You're a king with this stuff buddy, great work still not really sure what this mod does, is it the timeout for the volume sliders? but definately gonna do it
loserskater said:
Awkward... will do that right now
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
Thanks man!
sbreen94 said:
You're a king with this stuff buddy, great work still not really sure what this mod does, is it the timeout for the volume sliders? but definately gonna do it
Click to expand...
Click to collapse
When you press the volume buttons and the slider pops up, this changes how long that is displayed for.
loserskater said:
When you press the volume buttons and the slider pops up, this changes how long that is displayed for.
Click to expand...
Click to collapse
Alright very cool, Lol this is a very general question, but how the heck did you find where that was located in the framework files lol
sbreen94 said:
Alright very cool, Lol this is a very general question, but how the heck did you find where that was located in the framework files lol
Click to expand...
Click to collapse
I decompiled framework and searched for volume. Luckily it was in framework.jar, otherwise I would have just kept decompiling different files until I found it.
Sent from my SAMSUNG-SGH-I747
loserskater said:
I decompiled framework and searched for volume. Luckily it was in framework.jar, otherwise I would have just kept decompiling different files until I found it.
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
Ahh so you just have a general idea of what you want to do for a mod and then you search for corresponding files for it.
Mod Works like a charm. Easy to do for the Galaxy S4
Hi! Thanks for this usefull mod Just one small question - is there any way how to set some value as default? After apply this mod and after restart, there wasn't any timeout selected and after volume change volume panel was still visible.
somin.n said:
Hi! Thanks for this usefull mod Just one small question - is there any way how to set some value as default? After apply this mod and after restart, there wasn't any timeout selected and after volume change volume panel was still visible.
Click to expand...
Click to collapse
I just updated this on my rom. I'll edit the OP with the changes.
EDIT: Updated. You'll just have to change the framework.jar
loserskater said:
I just updated this on my rom. I'll edit the OP with the changes.
EDIT: Updated. You'll just have to change the framework.jar
Click to expand...
Click to collapse
Once again thanks for your mods and effort :good:
loserskater said:
Tired of the volume panel sitting on the screen for what seems like way too long? You can now change the timeout so it hides much quicker.
We're going to be working with the following two files:
SecSettings.apk
Click to expand...
Click to collapse
I want volume panel timeout, so i did all other things except in DisplaySettings.smali, actually i cant find those lines in here, so requested to you, i am given here my DisplaySettings.smali, you check please and put those edit in the file and give.
Thanks ☺
Link- https://drive.google.com/file/d/0B-yQqsVcgEKWOXFzc1lxVHh3X2c/view?usp=drivesdk
This guide was written based on the Sprint Samsung Galaxy S3 ND8 KitKat stock ROM but with the proper modifications may work for other KitKat ROMs. Please don't ask me to modify this to work with ROM xyz or to compile this for you into a ROM. I won't do it.
Background Info
As you know, Android 4.4 has a heads-up notification feature built in but disabled with no way to enable it from settings. While there are various Xposed modules that will enable this for you as well as give some additional functionality (such as whitelisting), I personally don't use Xposed because it causes conflicts on my ROM so I decided to figure out how to enable it myself. Simply enabling Heads Up notifications caused all sorts of force closes any time an ongoing notification presented itself so that had to be worked out as well.
Requirements
apktool 2.0 beta 9 and the knowledge of how to use it. There are various guides on how to use apktool on XDA. Find one and read it. Make sure to read the information on the apktool site as well since some of the options in 2.0 may be different from the guides you find.
A text editor that supports Unix-style text files. I recommend Notepad++.
Files
You'll be working with the following apks:
SystemUI.apk
SecSettings.apk
SystemUI.apk
Decompile SystemUI.apk using apktool.
Open smali\com\android\systemui\statusbar\BaseStatusBar.smali in your preferred text editor.
Find .method protected shouldInterrupt(Landroid/service/notification/StatusBarNotificationZ.
This method is of no use to us in it's current form and is what causes the force closes/ongoing notification issues so we are going to completely remove it and replace it with the following:
Code:
.method protected shouldInterrupt(Landroid/service/notification/StatusBarNotification;)Z
.locals 12
.param p1, "sbn" # Landroid/service/notification/StatusBarNotification;
.prologue
const/4 v8, 0x0
const/4 v9, 0x1
.line 1292
invoke-virtual {p1}, Landroid/service/notification/StatusBarNotification;->isOngoing()Z
move-result v4
if-nez v4, :cond_0
iget-object v10, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mPowerManager:Landroid/os/PowerManager;
invoke-virtual {v10}, Landroid/os/PowerManager;->isScreenOn()Z
move-result v1
:goto_0
return v1
:cond_0
move v1, v8
goto :goto_0
.end method
Save the file and recompile SystemUI using apktool. Don't forget to re-sign the APK (either use an APK signer if you have a ROM that has 3rd-party system app signatures enabled or copy the AndroidManifest.xml file and META-INF folder from the original to the new APK).
That's it for SystemUI.apk.
SecSettings.apk
Decompile SecSettings.apk with apktool.
First, we need to add the title and summary for the setting to enable Heads Up notifications. Open res\values\Strings.xml in your preferred text editor.
Add the following lines to the bottom of the file:
Code:
<string name="heads_up">Heads up notifications</string>
<string name="heads_up_desc">Enable heads up notifications</string>
Save the file and close it.
Next we need to add the setting entry. Open res\xml\display_settings.xml in your preferred text editor.
Add the following line underneath your preferred setting category (I chose to place it under "General" in my ROM):
Code:
<CheckBoxPreference android:title="@string/heads_up" android:key="heads_up_setting" android:widgetLayout="@touchwiz:layout/preference_widget_twcheckbox" />
Save the file and close it.
Finally, we will add the code to enable/disable Heads Up notifications. Open smali\com\android\settings\DisplaySettings.smali in your preferred text editor.
Find # instance fields and add the following line (on a new line) somewhere before # direct methods:
Code:
.field private mHeadsUp:Landroid/preference/CheckBoxPreference;
Find .method private updateState()V, then locate the section of code that looks similar to this:
Code:
:cond_0
invoke-direct {p0}, Lcom/android/settings/DisplaySettings;->updateInformativeScreenSummary()V
.line 1374
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v4, "display_battery_percentage"
invoke-static {v0, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_2
move v0, v1
:goto_0
invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
Your variables (v#'s), conditionals (cond_#'s), gotos (goto_#'s), and .line #'s may differ. Under the line invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V, add:
Code:
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mHeadsUp:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v4, "heads_up_enabled"
invoke-static {v0, v4, v2}, Landroid/provider/Settings$Global;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_8
move v0, v1
:goto_6
invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
You'll want to change the variables to match the ones in the prior code section if they are different for you. Also make sure to change the conditional and goto labels to one hexadecimal numeral higher than the highest one already present in the method (for example, in stock ND8, the highest conditional is cond_7 so we choose cond_8 for the conditional here and the highest goto is goto_5 so we chose goto_6).
Scroll down to the end of the method and add the following above .end method:
Code:
:cond_8
move v0, v2
goto/16 :goto_6
Make sure to change v2 to whatever variable is defined at the beginning of the method as 0x0 (ie. const/4 v2, 0x0 in this case).
Find .method public onCreate(Landroid/os/BundleV, then locate the section of code that looks similar to the following:
Code:
const-string v0, "display_battery_level"
invoke-virtual {p0, v0}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v0
check-cast v0, Landroid/preference/CheckBoxPreference;
iput-object v0, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
Again, your variables (v#'s) may differ. Beneath the line iput-object v0, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;, add the following:
Code:
const-string v0, "heads_up_setting"
invoke-virtual {p0, v0}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v0
check-cast v0, Landroid/preference/CheckBoxPreference;
iput-object v0, p0, Lcom/android/settings/DisplaySettings;->mHeadsUp:Landroid/preference/CheckBoxPreference;
Make sure to change the variable #'s to match the ones in the prior code section.
Find .method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/PreferenceZ and locate the section of code that looks similar to:
Code:
:cond_a
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_c
.line 1530
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1531
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v4, "display_battery_percentage"
if-eqz v0, :cond_b
move v3, v2
:cond_b
invoke-static {v1, v4, v3}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto :goto_3
.line 1533
:cond_c
As usual, your variables (v#'s), conditionals (cond_#'s), gotos (goto_#'s), and .line #'s may differ. Under :cond_c, add the following:
Code:
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mHeadsUp:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2b
.line 1530
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mHeadsUp:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 1531
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v4, "heads_up_enabled"
if-eqz v0, :cond_2c
move v3, v2
:cond_2c
invoke-static {v1, v4, v3}, Landroid/provider/Settings$Global;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_3
:cond_2b
Again, you'll want to change the variables to match the ones in the prior code section if they are different for you and make sure to change the conditional labels to one hexadecimal numeral higher than the highest one already present in the method. Change the goto/16 :goto_3 to match the one in the previous code section.
Save the file and close it.
That's it for SecSettings.apk. Recompile and re-sign it.
Install both files to your phone using your preferred method. You should already know this but I'll say it anyway, THESE FILES CANNOT BE INSTALLED LIKE NORMAL SIDE-LOADED APKs. I prefer to reboot to recovery and use ADB to push the files to the system, but you can use whatever method is easiest for you (ie. Aroma file manager, flashable zip, etc.).
So I guess those of us that aren't very good at this will have to wait then? Lol
Sent from my SPH-L710 using Tapatalk
Great tutorial man! Thank you looking forward to add this to all my releases soon. Great job!
Great, it compiles without mistakes with Dn3 4.4.2 for N7105, but I was playing with my 4 years old daughter and I'm sure something will be wrong, lol!
I just had to use cond 8 instead of 7, but I will report very likely my failure... It will take longer for me to let it work.
Anyway, it is a very useful tutorial and it's the only one here.
Mismatch?
I think there is a typo in the code for statusbar, it says mismatched input "p1" expecting END_METHOD_DIRECTIVE
I took this one from your original code (the one inside your rom) and it compiles fine
.method protected shouldInterrupt(Landroid/service/notification/StatusBarNotificationZ
.locals 12
.parameter "sbn"
.prologue
const/4 v8, 0x0
const/4 v9, 0x1
.line 1292
invoke-virtual {p1}, Landroid/service/notification/StatusBarNotification;->isOngoing()Z
move-result v4
if-nez v4, :cond_0
iget-object v10, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mPowerManager:Landroid/os/PowerManager;
invoke-virtual {v10}, Landroid/os/PowerManager;->isScreenOn()Z
move-result v1
:goto_0
return v1
:cond_0
move v1, v8
goto :goto_0
.end method
I will re-check the next steps, because last night I was unable to get everything working (I am not a dev).
Thanks again.
lucaoldb said:
I think there is a typo in the code for statusbar, it says mismatched input "p1" expecting END_METHOD_DIRECTIVE
I took this one from your original code (the one inside your rom) and it compiles fine
.method protected shouldInterrupt(Landroid/service/notification/StatusBarNotificationZ
.locals 12
.parameter "sbn"
.prologue
const/4 v8, 0x0
const/4 v9, 0x1
.line 1292
invoke-virtual {p1}, Landroid/service/notification/StatusBarNotification;->isOngoing()Z
move-result v4
if-nez v4, :cond_0
iget-object v10, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mPowerManager:Landroid/os/PowerManager;
invoke-virtual {v10}, Landroid/os/PowerManager;->isScreenOn()Z
move-result v1
:goto_0
return v1
:cond_0
move v1, v8
goto :goto_0
.end method
I will re-check the next steps, because last night I was unable to get everything working (I am not a dev).
Thanks again.
Click to expand...
Click to collapse
The code in the guide is taken straight from my ROM. All this method does is check to see if the notification is ongoing or not, then check to make sure the screen is on. also, I highly recommend using the latest version of apktool.
First of all, thank you.
I still have to edit the files by myself, but I have tested both your system ui and your secsettings on to the rom I am using (Dn3 4.4.2 for N7105) and they work fine, including heads up notifications... So I will keep these settings for some days, until I have the time to learn more about this matter.
Btw, I will try some of yor themed apps I found inside your rom, which are very good looking.
So what does the hud look like and how does it work? Not familiar with it.
Sent from my SPH-L710 using Tapatalk
Works great. Thank you moonknightus
Deleted
marcran75 said:
Deleted
Click to expand...
Click to collapse
???
Sent from my SPH-L710 using Tapatalk
Just an fyi, I just tried this on the S5 stock touchwiz (which is 4.4.2). I get an error when trying to compile SecSettings.apk.
Code:
I: Smaling smali folder into classes.dex...
..\_WorkArea1\_working\SecSettings.apk\smali\com\android\settings\DisplaySettings.smali[2936,4] There is already a label with that name.
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: com/android/settings/DisplaySettings.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:71)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:55)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:358)
at brut.androlib.Androlib.buildSources(Androlib.java:298)
at brut.androlib.Androlib.build(Androlib.java:284)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)
It seems like the method or something is already being duplicated. SystemUI recompiled perfectly.
tp2215 said:
Just an fyi, I just tried this on the S5 stock touchwiz (which is 4.4.2). I get an error when trying to compile SecSettings.apk.
Code:
I: Smaling smali folder into classes.dex...
..\_WorkArea1\_working\SecSettings.apk\smali\com\android\settings\DisplaySettings.smali[2936,4] There is already a label with that name.
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: com/android/settings/DisplaySettings.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:71)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:55)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:358)
at brut.androlib.Androlib.buildSources(Androlib.java:298)
at brut.androlib.Androlib.build(Androlib.java:284)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)
It seems like the method or something is already being duplicated. SystemUI recompiled perfectly.
Click to expand...
Click to collapse
Either a goto or a conditional label is being duplicated. Reread the instructions paying attention to the part that says to adjust the labels accordingly. The S3 and S5 use very similar code but by no means is it identical.
Thanks moonknightus for this guide. I manage to apply this mod to my tablet.:good: .Now my only problem is your other mod.
@moonknightus please check your PM sir
Do I actually need to sign the apks our can I just use them once they are modified
Sent from my SPH-L710 using Tapatalk
bigwillyg said:
Do I actually need to sign the apks our can I just use them once they are modified
Sent from my SPH-L710 using Tapatalk
Click to expand...
Click to collapse
Either use an APK signer if you have a ROM that has 3rd-party system app signatures enabled or copy the AndroidManifest.xml file and META-INF folder from the original to the new APK.As stated by moonknightus in his other thread.
filchi756 said:
Either use an APK signer if you have a ROM that has 3rd-party system app signatures enabled or copy the AndroidManifest.xml file and META-INF folder from the original to the new APK.As stated by moonknightus in his other thread.
Click to expand...
Click to collapse
Ah gotcha. Thanks
Sent from my SPH-L710 using Tapatalk
Shouldn't this be :cond_8?
Code:
[COLOR="Red"]:cond_7
[/COLOR] move v0, v2
goto/16 :goto_6
tdunham said:
Shouldn't this be :cond_8?
Code:
[COLOR="Red"]:cond_7
[/COLOR] move v0, v2
goto/16 :goto_6
Click to expand...
Click to collapse
Yup