Related
Hi guys, i have noticed that most people here in order to disable battery Full/Low sound notification just delete these files:
-system/media/audio/ui/TW_Battery_caution.ogg
-system/media/audio/ui/TW_Low_Battery.ogg
Well this is not the right way to do it, because the vibration is still here to wake us up while sleeping
I decided to share this simple mod to avoid this inconvenience!
How to (for dev)
Decompile SystemUI.apk
Open with your favourite Text Editor this file: smali\com\android\systemui\statusbar\policy\StatusBarPolicy.smali
search for this method signature: .method private onBatteryLow(Landroid/content/IntentV
The following code will disable Dialog popup for low battery warning (if you don't want to disable it but just sound and vibration then leave this function as it is)
Change code from
Code:
.method private onBatteryLow(Landroid/content/Intent;)V
.locals 0
.parameter "intent"
.prologue
.line 985
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->showLowBatteryWarning()V
.line 990
return-void
.end method
to
Code:
.method private onBatteryLow(Landroid/content/Intent;)V
.locals 0
.parameter "intent"
.prologue
return-void
.line 985
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->showLowBatteryWarning()V
.line 990
return-void
.end method
Now to disable Sound and Vibration notification search for this method signature: .method private playTone(Landroid/net/UriV
Edit code from
Code:
.method private playTone(Landroid/net/Uri;)V
.locals 5
.parameter
.prologue
const-string v4, "StatusBarPolicy"
.line 1180
const-string v0, "StatusBarPolicy"
...
...
...
to
Code:
.method private playTone(Landroid/net/Uri;)V
.locals 5
.parameter
.prologue
return-void
const-string v4, "StatusBarPolicy"
.line 1180
const-string v0, "StatusBarPolicy"
...
...
...
That's it! Recompile apk and you can sleep deeply
In addition it is possible to leave it as an option! I got it working following the IDEA behind JKAY theme settings application! (big thanks to Jkay)
If you'd like to get sound back, you can create a folder "battery_SOUND_ON" in some places for this example i used this path: /sdcard/Revolution/battery_SOUND_ON (if you don't want sound just delete or rename this folder)
Now we can modify smali code as following:
Code:
.method private playTone(Landroid/net/Uri;)V
.locals 5
.parameter
.prologue
new-instance v0, Ljava/io/File;
const-string v1, "/sdcard/Revolution/battery_SOUND_ON"
invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v0
if-eqz v0, :goto_1
const-string v4, "StatusBarPolicy"
.line 1180
const-string v0, "StatusBarPolicy"
...
...
...
"goto_1" label if followed by return-void which means that if this folder does not exists this method will return straight away, if this folder exists then the normal code will be executed!
Note:
This mod will also display battery full charge icon on the status bar when the charge is completed!
so could any dev make a mod to enable to battery full notifacations and sounds and vibrations??
would be handy to have one in the kitchen for your rom leo so peeps can either have it or not have it etc
it is another way to customise the device as well which is always good
buxz777 said:
so could any dev make a mod to enable to battery full notifacations and sounds and vibrations??
would be handy to have one in the kitchen for your rom leo so peeps can either have it or not have it etc
it is another way to customise the device as well which is always good
Click to expand...
Click to collapse
Yes it is also possible to leave it as an option, i am testing it now and if it works i will update the OP!
\EDIT
It is working, OP has been updated!
Yeah, working great! Allways great thing when user can decide whether use it or not.
Thanks LeoMar!
fisrt off thanks alot about the grate MOD
but can i use it only with LOW battery?? and keep the notification when the battery is full
KinG_Ruin said:
fisrt off thanks alot about the grate MOD
but can i use it only with LOW battery?? and keep the notification when the battery is full
Click to expand...
Click to collapse
\EDIT
Yes it is possible of course!
1)Modify method "private onBatteryLow(Landroid/content/Intent; )V" as shown to the OP.
2)Don't change code (leave the original code) for this method ".method private playTone(Landroid/net/Uri; )V"
In this way you will only disable Low battery notification Dialod + Sound
thanks alot dude
it works fine, keep it up
edit:-
when i tried to edit another ROM i got this code
Code:
.method private onBatteryLow(Landroid/content/Intent;)V
[COLOR="Red"][B] .registers 2
.parameter "intent"[/B][/COLOR]
.prologue
.line 985
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->showLowBatteryWarning()V
.line 990
return-void
.end method
so is it save to replace it with
Code:
.method private onBatteryLow(Landroid/content/Intent;)V
[COLOR="Red"][B] .locals 0
.parameter "intent"[/B][/COLOR]
.prologue
return-void
.line 985
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->showLowBatteryWarning()V
.line 990
return-void
.end method
KinG_Ruin said:
thanks alot dude
it works fine, keep it up
edit:-
when i tried to edit another ROM i got this code
Code:
.method private onBatteryLow(Landroid/content/Intent;)V
[COLOR="Red"][B] .registers 2
.parameter "intent"[/B][/COLOR]
.prologue
.line 985
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->showLowBatteryWarning()V
.line 990
return-void
.end method
so is it save to replace it with
Code:
.method private onBatteryLow(Landroid/content/Intent;)V
[COLOR="Red"][B] .locals 0
.parameter "intent"[/B][/COLOR]
.prologue
return-void
.line 985
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->showLowBatteryWarning()V
.line 990
return-void
.end method
Click to expand...
Click to collapse
It's not safe, therefore just add "return-void" after .prologue don't change anithing else!
hi, thanks for sharing, works great.
one thing...
when i use this code:
.method private playTone(Landroid/net/UriV
.locals 5
.parameter
.prologue
new-instance v0, Ljava/io/File;
const-string v1, "/sdcard/Revolution/battery_SOUND_ON"
invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/StringV
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v0
if-eqz v0, :goto_1
const-string v4, "StatusBarPolicy"
.line 1180
const-string v0, "StatusBarPolicy"
compiling classes.dex gives me an error "goto_1" not specified.
i am on kh3, can you tell me where to go?
methux
LeoMar75 said:
It's not safe, therefore just add "return-void" after .prologue don't change anithing else!
Click to expand...
Click to collapse
I love u
thanks alot dude, it works fine
juberg said:
hi, thanks for sharing, works great.
one thing...
when i use this code:
.method private playTone(Landroid/net/UriV
.locals 5
.parameter
.prologue
new-instance v0, Ljava/io/File;
const-string v1, "/sdcard/Revolution/battery_SOUND_ON"
invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/StringV
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v0
if-eqz v0, :goto_1
const-string v4, "StatusBarPolicy"
.line 1180
const-string v0, "StatusBarPolicy"
compiling classes.dex gives me an error "goto_1" not specified.
i am on kh3, can you tell me where to go?
methux
Click to expand...
Click to collapse
You should find a label followed by return-void then modify
Code:
if-eqz v0, :goto_1
to the correct label!
Pls quote your complete function code if you need help!
there are many goto´s
which part of the code do you need for helping me out?
The whole StatusBarPolicy.smali or just the part from
.method private playTone(Landroid/net/UriV?
thanks
juberg said:
there are many goto´s
which part of the code do you need for helping me out?
The whole StatusBarPolicy.smali or just the part from
.method private playTone(Landroid/net/UriV?
thanks
Click to expand...
Click to collapse
Just that method.
Basicly you want to find goto or cond what will follow code "return-void"
For example in my .method private playTone it looks like this:
Code:
invoke-virtual {v0, v2, v1}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V
.line 1204
:cond_42
:goto_42
return-void
So in that case it would be that goto_42
that was fast.
ok, got it...
thanks
Could someone upload the systemUI.apk with this mod?
celiocalves said:
Could someone upload the systemUI.apk with this mod?
Click to expand...
Click to collapse
SystemUI.apk can be posted because it's not generic... SystemUI.apk is rensponsible for status bar, Quick toggle icons, edt tweaks support, jkay support...
There are plenty of version depending on the theme and the mod you are using!
LeoMar75 said:
SystemUI.apk can be posted because it's not generic... SystemUI.apk is rensponsible for status bar, Quick toggle icons, edt tweaks support, jkay support...
There are plenty of version depending on the theme and the mod you are using!
Click to expand...
Click to collapse
I didn't know that! :/
Thanks for the explanation!
thanks for the tutorial, i am having issue compiling this. i lose my status bar every time.
Leo,
Thank you for the tutorial. Here's how the method looks on the SGS2 Skyrocket for AT&T:
Code:
.method private playTone(Landroid/net/Uri;Z)V
.locals 5
.parameter
.parameter
.prologue
const-string v2, "playTone() - "
const-string v3, "audio"
const-string v4, "StatusBarPolicy"
.line 1212
const-string v0, "StatusBarPolicy"
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "playTone() - "
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v4, v0}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 1213
Not sure where I should add the "return-void" in this snippet, or if I need something else. Let me know!
How do I disable low and full battery sounds on Ics? thank you!
Want to have AOSP lock screen (Android stock) with opportunity to use your own wallpaper as it is with the Glass lockscreen (Settings/Display/Wallpapers/Lock screen wallpaper)? Not a problem This MOD is suitable to the JVS/JVT, you may try and tell me if it works with JVU and other GB versions.
1. Decompile android.policy.jar
2. Replace existing LockScreen.smali file (attached).
3. Edit LockPatternKeyguardView.smali
4. Replace whole section:
Code:
.method private getLockScreenMode()Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;
.locals 1
.prologue
.line 1338
invoke-direct {p0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->isMissedEventsArrived()Z
move-result v0
if-eqz v0, :cond_0
.line 1339
sget-object v0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;->PuzzleLock:Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;
.line 1342
:goto_0
return-object v0
:cond_0
sget-object v0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;->GlassLock:Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;
goto :goto_0
.end method
with
Code:
.method private getLockScreenMode()Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;
.locals 1
.prologue
.line 1338
invoke-direct {p0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->isMissedEventsArrived()Z
move-result v0
sget-object v0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;->TapLock:Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;
return-object v0
.end method
5. Decompile framework-res.apk
6. Replace existing keyguard_screen_tab_unlock.xml and keyguard_screen_tab_unlock_land.xml files (attached).
7. Compile both files, upload them to the device and be happy
hi
xxjvt
screen is black
LockScreen.smali not fixed
thank..
flonec said:
xxjvt
screen is black
LockScreen.smali not fixed
thank..
Click to expand...
Click to collapse
This has been tested on XXJVT so it is working on this release... Please do the whole procedure once again.
Does this work on lollipop?
Hy Guys! in my request to isolate all the codes in Smali files to enable Extended Power Menu, CRT-OF, Long Menu Press To Kill and AOSP Lockscreen working separately to implement in my ROM (crDroid ROM) i manage to found how to do it!
Updated 19.01.2013 = Working in latest XXELLC
Requirements :
- You need to know how to work with apktool, smali and baksmali stuffs.
- Notepad++
- 7-zip
WE WILL USE FOLLOING STEPS IN ALL 4 MODS
1 - You need to extract from inside the stock framework/ a file called android.policy.jar;
2 - Open android.policy.jar with 7-zip;
3 - Extract classes.dex from it;
2 - Decompile using baksmail commands;
3 - Once it's done Recompile using smali commands:
Click to expand...
Click to collapse
== AOSP Lockscreen with Toggle ==
Decompile android.policy.jar
Go to: com\android\internal\policy\impl\LockPatternKeyguardView.smali
Click to expand...
Click to collapse
Find this method
Code:
.method createLockScreen()Landroid/view/View;
And switch completely with this (Same method with new codes inside)
Code:
[left][color="blue"].method createLockScreen()Landroid/view/View;
.registers 7
.prologue
.line 1254
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "aosp_lock"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-nez v0, :cond_1f
new-instance v0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/sec/CircleLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_2e
.line 1260
:cond_1f
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
.local v0, lockView:Landroid/view/View;
:goto_2e
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V
.line 1261
return-object v0
.end method[/color][/left]
It will create the AOSP lockscreen but with one issue. Adding only this "new" method will made the lockscreen unlockable using menu button;
So let's made some changes to fix this. There are 2 ways to fix it
1st way
Go to: com\android\internal\policy\impl\LockScreen.smali
Click to expand...
Click to collapse
Find and delete the red one
Code:
.field private mCreationOrientation:I
[color="red"]--- .field private mEnableMenuKeyInLockScreen:Z[/color]
.field private mEnableRingSilenceFallback:Z
Find and delete the red ones
Code:
[left].line 447
iput-object p5, p0, Lcom/android/internal/policy/impl/LockScreen;->mCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
.line 448
[color="red"]--- invoke-direct {p0}, Lcom/android/internal/policy/impl/LockScreen;->shouldEnableMenuKey()Z
--- move-result v0
--- iput-boolean v0, p0, Lcom/android/internal/policy/impl/LockScreen;->mEnableMenuKeyInLockScreen:Z[/color]
.line 449
iget v0, p2, Landroid/content/res/Configuration;->orientation:I[/left]
Find the method and delete completely
Code:
[left][color="red"].method public onKeyDown(ILandroid/view/KeyEvent;)Z
.registers 4
.parameter "keyCode"
.parameter "event"
.prologue
.line 541
const/16 v0, 0x52
if-ne p1, v0, :cond_d
iget-boolean v0, p0, Lcom/android/internal/policy/impl/LockScreen;->mEnableMenuKeyInLockScreen:Z
if-eqz v0, :cond_d
.line 542
iget-object v0, p0, Lcom/android/internal/policy/impl/LockScreen;->mCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-interface {v0}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->goToUnlockScreen()V
.line 544
:cond_d
const/4 v0, 0x0
return v0
.end method[/color][/left]
Recompile android.policy.jar and it's done!
AOSP Lockscreen Properly working
2nd way (Thanks to jimbo77)
Using this method we will need to decompile framework-res.apk
Go to: res/values/bools
Click to expand...
Click to collapse
Find and switch
Code:
[color="red"]--- <bool name="config_disableMenuKeyInLockScreen">false</bool>[/color]
[color="blue"]+++ <bool name="config_disableMenuKeyInLockScreen">true</bool>[/color]
Recompile framework-res.apk and it's done.
Lets put toggle in SecSettings.apk
decompile SecSettings.apk
Go to:res/values/strings
Click to expand...
Click to collapse
Add this at the end of the file, before close resources</resources>.
This 2 string bellow will be shown in settings, so feel free to change.
Code:
[left][color="blue"]+++ <string name="aosp">Jelly Bean (AOSP) Lockscreen</string>
+++ <string name="aosp_summary">Enable Original Jelly Bean Lockscreen</string>[/color]
[/left]
Go to: res/xml/Lockscreen_Settings.xml
Click to expand...
Click to collapse
Find and add
Code:
[left]<SwitchPreferenceScreen android:title="@string/lock_screen_shortcut_title" android:key="lock_screen_shortcut" android:summary="@string/lock_screen_shortcut_summary">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.lockscreenshortcut.LockScreenShortcutSettings" />
</SwitchPreferenceScreen>
[color="blue"]+++ <CheckBoxPreference android:title="@string/aosp" android:key="say_your_wakeup" android:summary="@string/aosp_summary" />[/color]
<SwitchPreferenceScreen android:title="@string/information_ticker" android:key="information_ticker" android:summary="@string/information_ticker_summary" android:fragment="com.android.settings.InformationTicker" />
[/left]
Go to: smali\com\android\settings\LockScreenSettings.smali
Click to expand...
Click to collapse
Find and add
Code:
[left].field private isWeatherEnabled:Z
[color="blue"]+++ .field private mAospLock:Landroid/preference/CheckBoxPreference;[/color]
.field private mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;[/left]
Find and Switch
Code:
[left]iput-object v0, p0, Lcom/android/settings/LockScreenSettings;->mMotionDialog:Landroid/app/AlertDialog;
[color="red"]--- const/16 v0, 0x8[/color]
[color="blue"]+++ const/16 v0, 0x11[/color]
new-array v0, v0, [I[/left]
Find and Switch
Code:
[left]invoke-virtual {v6, v3}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 294
:cond_3
[color="red"]--- iget-object v3, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++ iget-object v3, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
if-eqz v3, :cond_4
.line 295
[color="red"]--- iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++ iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
[color="red"]--- const-string v7, "wake_up_lock_screen"[/color]
[color="blue"]+++ const-string v7, "aosp_lock"[/color]
invoke-static {v3, v7, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I[/left]
Find and Switch
Code:
[left]const-string v8, "say_your_wakeup"
invoke-virtual {p0, v8}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v8
check-cast v8, Landroid/preference/CheckBoxPreference;
[color="red"]--- iput-object v8, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++ iput-object v8, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
.line 212
iget-object v8, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
if-eqz v8, :cond_8[/left]
Find and Switch
Code:
[left]goto :goto_4
:cond_9
[color="red"]--- iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++ iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
invoke-virtual {p2, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_0
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
[color="red"]--- const-string v5, "wake_up_lock_screen"[/color]
[color="blue"]+++ const-string v5, "aosp_lock"[/color]
[color="red"]---iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
invoke-virtual {v6}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v6
if-eqz v6, :cond_a[/left]
Find Switch and delete
Code:
[left]
invoke-interface {v1}, Ljava/util/List;->size()I
move-result v8
if-ge v8, v9, :cond_f
.line 240
[color="red"]--- iget-object v8, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="blue"]+++ iget-object v8, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;[/color]
if-eqz v8, :cond_e
[color="red"]--- invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;[/color]
[color="red"]--- move-result-object v8[/color]
[color="red"]--- iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;[/color]
[color="red"]--- invoke-virtual {v8, v9}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z[/color]
:cond_e
if-eqz v6, :cond_f
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;[/left]
Recompile SecSettings.apk and it's done!
== 3 Way Extended Power Menu ==
Go to: com/android/internal/policy/impl/GlobalActions.smali
Click to expand...
Click to collapse
Find this
Code:
[LEFT].line 368
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$5;[/LEFT]
And switch with this
Code:
[LEFT][COLOR="Blue"].line 368
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$99;[/COLOR][/LEFT]
Find this
Code:
[LEFT]invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$5;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V[/LEFT]
And switch with this
Code:
[LEFT][COLOR="Blue"]invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$99;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V[/COLOR][/LEFT]
Now go to
com/android/internal/policy/impl/GlobalActions$SinglePressAction.smali
Click to expand...
Click to collapse
Find this
Code:
[LEFT].end annotation
# instance fields
.field private final mIconResId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
[/LEFT]
And between .end annotation and # instance fields, add this
Code:
[LEFT][COLOR="Blue"]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;[/COLOR][/LEFT]
Find this
Code:
[LEFT]# direct methods
.method protected constructor <init>(II)V
.registers 4
.parameter "iconResId"
.parameter "messageResId"
[/LEFT]
And between # direct methods and .method protected constructor <init>(II)V, add this
Code:
[LEFT][COLOR="Blue"].method static constructor <clinit>()V
.registers 3
const/4 v0, 0x3
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Download"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method[/COLOR][/LEFT]
To finalize Extended Power Menu you need to copy tree smali files (GlobalActions$99$1.smali, GlobalActions$99$2, and GlobalActions$1.smali) and paste then inside -> com/android/internal/policy/impl/
Recompile android.policy.jar using smali commands it's DONE!
== CRT OFF Animation ==
Follow the same procedure as android.policy.jar to decompile and extract classes.dex
Go to
Go to: com/android/internal/policy/impl/PhoneWindowManager.smali
Click to expand...
Click to collapse
find this
Code:
[LEFT]# interfaces
.implements Landroid/view/WindowManagerPolicy;
# annotations
[/LEFT]
Between .implements Landroid/view/WindowManagerPolicy and # annotations, add this
Code:
[LEFT][COLOR="Blue"].implements Ljava/lang/Runnable;[/COLOR][/LEFT]
find this
Code:
[LEFT].line 5938
.end local v9 #isAllowed:Z
.end local v16 #kioskMode:Landroid/app/enterprise/kioskmode/KioskMode;
:cond_66
:goto_66
return v19[/LEFT]
Between :goto_66 and return v19, add this
Code:
[LEFT][COLOR="Blue"]and-int/lit8 v0, v19, 0x4
if-eqz v0, :cond_71
and-int/lit8 v19, v19, -0x5
move-object/from16 v0, p0
invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sleepDelay()V
:cond_71[/COLOR][/LEFT]
Go to the Bottom of the file and add this hole code
Code:
[LEFT][COLOR="Blue"].method public sleepDelay()V
.locals 10
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
const-wide v2, 0x64
check-cast p0, Ljava/lang/Runnable;
invoke-virtual {v0, p0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
.end method
.method public run()V
.locals 10
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const-string v1, "power"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v2
const-wide/16 v6, 0x3e8
add-long/2addr v2, v6
invoke-virtual {v0, v2, v3}, Landroid/os/PowerManager;->goToSleep(J)V
return-void
.end method[/COLOR][/LEFT]
Now you can recompile android.policy.jar using smali commands.
Now
Extract services.jar from inside framework folder and follow the same procedure extract classes.dex and decompile it.
Go to
Go to: com/android/server/PowerMangerService$ScreenBrightnessAnimator.smali
Click to expand...
Click to collapse
find this
Code:
[LEFT]#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7300(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v7
const/16 v9, 0xa[/LEFT]
Between move-result-object v7 and const/16 v9, 0xa, add this
Code:
[LEFT][COLOR="Blue"]if-eqz p2, :cond_75
const/16 v9, 0xb
const/4 v10, 0x0
const v2, 0x10
invoke-virtual {v7, v9, v2, v10}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v9
invoke-virtual {v9}, Landroid/os/Message;->sendToTarget()V
:cond_75[/COLOR][/LEFT]
Now you can recompile services.jar using apktool and smali commands
== Long Menu Press to Kill App ==
Follow the same procedure as android.policy.jar and services.jar to decompile and extract classes.dex again from android.policy.jar
Go to: com/android/internal/policy/impl/PhoneWindowManager.smali
Click to expand...
Click to collapse
find this
Code:
.line 1455
[COLOR="Red"]new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$8;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$8;-><init (Lcom/android/internal/policy/impl/PhoneWindowManager;)V[/COLOR]
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mMenuLongPress:Ljava/lang/Runnable;
change the red ones for blues under
Code:
[COLOR="Blue"]+ new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$MenuLongPress;
+ invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$MenuLongPress;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V[/COLOR]
Extract the PhoneWindowManager-file.zip attached, extract the file int it and copy to com/android/internal/policy/impl/
Recompile android.policy.jar using smali commands and it's done!
With this we will be able to add or remove this 4 mods from inside any other
CREDITS
For CRT OFF Animation method all the credits goes to Sorg. I've just follow his tutorial.
For part Extended Power Menu i like to thanks mgn2o
For part of AOSP Lockscreen i like to thanks Didact74
Nice, an EPM whitout Hot Reboot (mgn2o) thanks for reference ....
Enviado de meu GT-I9300 usando o Tapatalk 2
Excellent guide! Would love one for lockscreen media skip !! I cant find the source/guide anywhere !
Great guide.
It will be great:
Can you add how to decompile .odex such that we obtain .smali for editing ??
Thanks in advance mate.
Post updated with Long Menu Press to Kill for XXELK4
Akshay (Aky) said:
Great guide.
It will be great:
Can you add how to decompile .odex such that we obtain .smali for editing ??
Thanks in advance mate.
Click to expand...
Click to collapse
You can try to deodex a file, made the changes and re-odex.
I never try with odex. I only use roms deodexed and my (crDroid) in development is surely deodexed.
Take a look in here: CLICK
how to Inkeffect tutorial
One more thing, how to add the function "Long press volume key to jump muisc" in lockscreen mode? Thanks.
I'll definitely use this to add crt animation to the 4.1.2 ROM I have for the Sprint S2. Thanks!
Sent from my SPH-D710 using xda premium
Great job, Hoping this will become a central hub for source code ! Bookmarked for future use.. looking forward to future sources!
Would you please also add the mod for "long press volume key to skip song"? Thanks.
dongfangri said:
Would you please also add the mod for "long press volume key to skip song"? Thanks.
Click to expand...
Click to collapse
I'm working on this. Trying some kind of "reverse engineering" to spot the codes.
Great tutorial, for my first attempt at these types of edits, it made life very easy. Although i have a small problem. Ive made the edits so i can have extended power menu, crt off and any app multi window in my rom. Everything went smoothly but it seems that crt off is erratic. Sometimes it works and sometimes it does not. Any ideas?
Sent from my GT-I9300 using Tapatalk 2
anaraxia said:
Great tutorial, for my first attempt at these types of edits, it made life very easy. Although i have a small problem. Ive made the edits so i can have extended power menu, crt off and any app multi window in my rom. Everything went smoothly but it seems that crt off is erratic. Sometimes it works and sometimes it does not. Any ideas?
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Well a never had this kind of problem.
Using Kernle Perseus, by the way? It seems to broke CRT.
Cristiano Matos said:
Well a never had this kind of problem.
Using Kernle Perseus, by the way? It seems to broke CRT.
Click to expand...
Click to collapse
No... Stock kernel. Keeping in simple
Sent from my GT-I9300 using Tapatalk 2
anaraxia said:
No... Stock kernel. Keeping in simple
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
There's a problem with the Stock kernel on the newest JB update (For both leak and official)
Try using Siyah's 1.8.3 and use the CRT Fix in the STweaks application.
---------- Post added at 11:15 AM ---------- Previous post was at 10:29 AM ----------
Thanks alot for this tutorial, very simple and straight to the point!
Lost.soul said:
There's a problem with the Stock kernel on the newest JB update (For both leak and official)
Try using Siyah's 1.8.3 and use the CRT Fix in the STweaks application.
Thanks for the help. Downloaded, flashed and tested. Works perfectly now. Will have to add it to my next release. Thanks again :thumbup:
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Loved your post, but i have a question: is it possible to do this with gingerbread rom? is it the same procedure?
Também sou brasileiro, hehehe. Tem como tu me ajudar com algumas coisas?
Click to expand...
Click to collapse
Note II InkEffect Lockscreen
It is not compatible with Note II InkEffect Lockscreen Mod.
When I flash this mod (extended menu) the ink effect lockscreen stop working
thank you
anaraxia said:
Great tutorial, for my first attempt at these types of edits, it made life very easy. Although i have a small problem. Ive made the edits so i can have extended power menu, crt off and any app multi window in my rom. Everything went smoothly but it seems that crt off is erratic. Sometimes it works and sometimes it does not. Any ideas?
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Can you confirm it works ONLY with Wifi On ? Seams like that on my try
in the service.jar...i have 2 times those codes...234, 264 something, so how do you choose where to insert your part ?
later edit:
Makes no diff where i add those it seams. Still CRT only works with WIFI on, its like a CRT SWICH haha...suppose "stuff" should be inserted differently on 4.1.2.
Replace code = BLUE
Remove code = RED
Add code = GREEN
Based on I337UCUAMDL
Here we go:
Add toggle to disable Screen ON when receiving a message:
Go here: \SecMms\smali\com\android\mms\ui\MessagingPreferenceActivity.smali
Change this:
Code:
.line 876
.local v2, NotiCategory:Landroid/preference/PreferenceCategory;
invoke-static {}, Lcom/android/mms/MmsConfig;->getEnableNotificationBacklight()Z
move-result v10
if-nez v10, :cond_7
.line 877
const-string v10, "pref_key_backlight"
invoke-virtual {p0, v10}, Lcom/android/mms/ui/MessagingPreferenceActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v10
[COLOR=red] invoke-direct {p0, v2, v10}, Lcom/android/mms/ui/MessagingPreferenceActivity;->removePreference(Landroid/preference/PreferenceGroup;Landroid/preference/Preference;)V[/COLOR]
.line 879
:cond_7
invoke-static {}, Lcom/android/mms/MmsConfig;->getEnableCmas()Z
move-result v10
if-eqz v10, :cond_8
invoke-static {}, Lcom/android/mms/MmsConfig;->getCMASProvider()I
move-result v10
To this:
Code:
.line 876
.local v2, NotiCategory:Landroid/preference/PreferenceCategory;
invoke-static {}, Lcom/android/mms/MmsConfig;->getEnableNotificationBacklight()Z
move-result v10
if-nez v10, :cond_7
.line 877
const-string v10, "pref_key_backlight"
invoke-virtual {p0, v10}, Lcom/android/mms/ui/MessagingPreferenceActivity;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v10
.line 879
:cond_7
invoke-static {}, Lcom/android/mms/MmsConfig;->getEnableCmas()Z
move-result v10
if-eqz v10, :cond_8
invoke-static {}, Lcom/android/mms/MmsConfig;->getCMASProvider()I
move-result v10
Increase Limits, Image sending resolution, Message Save/Restore Function
Go here: \SecMms\smali\com\android\mms\MmsConfig.smali
MMS Max size to 1024000 bytes:
Change this:
Code:
.line 151
sput-boolean v2, Lcom/android/mms/MmsConfig;->mMmsWidgetEnabled:Z
.line 152
const v0, 0x4b000
sput v0, Lcom/android/mms/MmsConfig;->mMaxMessageSize:I
To this:
Code:
.line 151
sput-boolean v2, Lcom/android/mms/MmsConfig;->mMmsWidgetEnabled:Z
.line 152
const v0, [COLOR=blue]0xfa000[/COLOR]
sput v0, Lcom/android/mms/MmsConfig;->mMaxMessageSize:I
Increase MMS Image size (2048x1536 or 3.2MP):
Change this:
Code:
.line 158
sput-object v4, Lcom/android/mms/MmsConfig;->mEmailGateway:Ljava/lang/String;
.line 159
sget v0, Lcom/android/mms/MmsConfig;->MAX_IMAGE_HEIGHT:I
sput v0, Lcom/android/mms/MmsConfig;->mMaxImageHeight:I
.line 160
sget v0, Lcom/android/mms/MmsConfig;->MAX_IMAGE_WIDTH:I
sput v0, Lcom/android/mms/MmsConfig;->mMaxImageWidth:I
.line 161
const/16 v0, 0x1e0
To this:
Code:
.line 158
sput-object v4, Lcom/android/mms/MmsConfig;->mEmailGateway:Ljava/lang/String;
.line 159
[COLOR=blue]const/16 v0, 0x600[/COLOR]
sput v0, Lcom/android/mms/MmsConfig;->mMaxImageHeight:I
.line 160
[COLOR=blue]const/16 v0, 0x800[/COLOR]
sput v0, Lcom/android/mms/MmsConfig;->mMaxImageWidth:I
.line 161
const/16 v0, 0x1e0
Enable message Save/Restore function:
Change this:
Code:
.method public static getEnableSaveRestoreSDCardMessage()Z
.locals 1
.prologue
.line 907
const/4 v0, 0x0
return v0
.end method
To this:
Code:
.method public static getEnableSaveRestoreSDCardMessage()Z
.locals 1
.prologue
.line 907
[COLOR=blue]const/4 v0, 0x1[/COLOR]
return v0
.end method
Text message limit (1000):
Change this:
Code:
.method public static getMaxRecipientLength()I
.locals 1
.prologue
.line 2510
sget v0, Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I
return v0
.end method
To this:
Code:
.method public static getMaxRecipientLength()I
.locals 1
.prologue
.line 2510
[COLOR=blue]const/16 v0, 0x3e8[/COLOR]
return v0
.end method
Max recipients (1000):
Change this:
Code:
.method public static getMmsMaxRecipient()I
.locals 1
.prologue
.line 2751
sget v0, Lcom/android/mms/MmsConfig;->mMmsRecipientLimit:I
return v0
.end method
To this:
Code:
.method public static getMmsMaxRecipient()I
.locals 1
.prologue
.line 2751
[COLOR=blue]const/16 v0, 0x3e8[/COLOR]
return v0
.end method
Change this:
Code:
.method public static getRecipientLimit()I
.locals 1
.prologue
.line 759
sget v0, Lcom/android/mms/MmsConfig;->mRecipientLimit:I
return v0
.end method
To this:
Code:
.method public static getRecipientLimit()I
.locals 1
.prologue
.line 759
[COLOR=blue]const/16 v0, 0x3e8[/COLOR]
return v0
.end method
Change this:
Code:
.line 1767
const-string v11, "CscFeature_Message_MaxRecipientLengthAs"
invoke-virtual {v1, v11}, Lcom/sec/android/app/CscFeature;->getInteger(Ljava/lang/String;)I
move-result v11
sput v11, Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I
.line 1768
sget v11, Lcom/android/mms/MmsConfig;->mMinRecipientLength:I
To this:
Code:
.line 1767
const-string v11, "CscFeature_Message_MaxRecipientLengthAs"
invoke-virtual {v1, v11}, Lcom/sec/android/app/CscFeature;->getInteger(Ljava/lang/String;)I
move-result v11
[COLOR=green]const/16 v11, 0x3e8[/COLOR]
sput v11, Lcom/android/mms/MmsConfig;->mMaxRecipientLength:I
.line 1768
sget v11, Lcom/android/mms/MmsConfig;->mMinRecipientLength:I
Change this:
Code:
.line 2049
const-string v1, "pref_key_max_recipient"
invoke-interface {v0, v1, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v1
sput v1, Lcom/android/mms/MmsConfig;->mRecipientLimit:I
To this:
Code:
.line 2049
const-string v1, "pref_key_max_recipient"
invoke-interface {v0, v1, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v1
[COLOR=green]const/16 v1, 0x3e8[/COLOR]
sput v1, Lcom/android/mms/MmsConfig;->mRecipientLimit:I
.line 2050
const-string v1, "Mms/MmsConfig"
SMS to MMS Conversion (1000):
Change this:
Code:
.method public static getSmsToMmsTextThreshold()I
.locals 1
.prologue
.line 688
sget v0, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I
return v0
.end method
To this:
Code:
.method public static getSmsToMmsTextThreshold()I
.locals 1
.prologue
.line 688
[COLOR=blue]const/16 v0, 0x3e8[/COLOR]
return v0
.end method
Change this:
Code:
.line 2044
const-string v1, "pref_key_threshold"
const/4 v2, 0x4
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v1
sput v1, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I
.line 2045
const-string v1, "Mms/MmsConfig"
To this:
Code:
.line 2044
const-string v1, "pref_key_threshold"
const/4 v2, 0x4
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v1
[COLOR=green]const/16 v1, 0x3e8[/COLOR]
sput v1, Lcom/android/mms/MmsConfig;->mSmsToMmsTextThreshold:I
.line 2045
const-string v1, "Mms/MmsConfig"
Thanks:
Wanam for 1000 Recipients and SMS/MMS conversion
FEEL FREE TO USE THIS BUT PLEASE GIVE THANKS TO MYSELF AND WANAM
Saved just in case.
Awesome work!! Works perfectly... thanks a bunch for this. Hate the damn screen coming on for messages.
~If shoman doesnt mind, heres the finished product +no texts added to logs.
sulpher said:
Awesome work!! Works perfectly... thanks a bunch for this. Hate the damn screen coming on for messages.
I'll have to come back to click thanks, spent all mine
~If shoman doesnt mind, heres the finished product +no texts added to logs.
Click to expand...
Click to collapse
Just so you know, the no text to logs is not needed.... The log can be viewed without messages and set that way by default.
shoman94 said:
Just so you know, the no text to logs is not needed.... The log can be viewed without messages and set that way by default.
Click to expand...
Click to collapse
Hmm couldnt figure out how to set it to that default... if i backed out of the log instead of home key or rebooted it was reverting.
sulpher said:
Hmm couldnt figure out how to set it to that default... if i backed out of the log instead of home key or rebooted it was reverting.
Click to expand...
Click to collapse
I'm confused now....lol Mine always reverts to "ALL CALLS" when backing out or rebooting... Not sure of the reason for the differences. This may be something to look into. Are you running your own modded stock that you did yourself or did you use something posted here?
shoman94 said:
I'm confused now....lol Mine always reverts to "ALL CALLS" when backing out or rebooting... Not sure of the reason for the differences. This may be something to look into. Are you running your own modded stock that you did yourself or did you use something posted here?
Click to expand...
Click to collapse
I'm on the odin from here (http://forum.xda-developers.com/showthread.php?t=2261573) plus the OTA... honestly i cant remember if it was doing it when i first got the phone.. i bricked it pretty fast with the xposed framework. Only mod i did myself to it was jeboo's removing sms from call log mod. +stolen's systemui, dev threads framework & secsettings
Cool, I'm going to add a few of these to my Xposed mod, coming soon.
Nottach said:
Cool, I'm going to add a few of these to my Xposed mod, coming soon.
Click to expand...
Click to collapse
I would love too see this as an exposed mod. What u hiding under the sleeve?
How do you know all this stuff
Ok being VERY new to this... where are you finding the \SecMms\smali\com\android\mms\ui\MessagingPreferen ceActivity.smali ???
I'm trying to learn this a bit and some guidance would be appreciated. I want to contribute.
I appologize but I'm on Rogers with I337UCUAMDJ and the APK attached does not seem to work so I'll mod myself.
I only want to eliminate the pop up when screen off. Baby steps.
I always donate to XDA contributors so I'm hoping someone can show me this little tweak. Pay it forward.
Thanks
To fine that file you need a deodexed ROM and have to decompile secmms.apk
If your on a odexed ROM you will not find the smali files
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Ah THANK YOU for this!! I was patiently waiting for this mod.
ibike2much said:
Ok being VERY new to this... where are you finding the \SecMms\smali\com\android\mms\ui\MessagingPreferen ceActivity.smali ???
I'm trying to learn this a bit and some guidance would be appreciated. I want to contribute.
I appologize but I'm on Rogers with I337UCUAMDJ and the APK attached does not seem to work so I'll mod myself.
I only want to eliminate the pop up when screen off. Baby steps.
I always donate to XDA contributors so I'm hoping someone can show me this little tweak. Pay it forward.
Thanks
Click to expand...
Click to collapse
As said above... You must deodex and decompile to get to that file.
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
akira02rex said:
How do you know all this stuff
Click to expand...
Click to collapse
Practice practice practice
Nottach said:
Cool, I'm going to add a few of these to my Xposed mod, coming soon.
Click to expand...
Click to collapse
Cool beans
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
shoman94 said:
Practice practice practice
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Click to expand...
Click to collapse
And a lot of soft bricks/apk's crashing
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Learn how to read logs. Usually logcat will tell you exactly what the error is and where.
shoman94 said:
As said above... You must deodex and decompile to get to that file.
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Click to expand...
Click to collapse
Thanks all. For now I'll let the experts continue your fine work and gladly continue to generously donate.
After dl happens it sayz not installed so I guess we have to push to systems/apps folders
Sent from my SAMSUNG-SGH-I337 using xda app-developers app
azz72 said:
After dl happens it sayz not installed so I guess we have to push to systems/apps folders
Sent from my SAMSUNG-SGH-I337 using xda app-developers app
Click to expand...
Click to collapse
Or use your favorite root explorer to copy/paste/overwrite the apk.
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
How to: TouchWiz 4.3 and 4.2.2 Infinite lock screen pages with all widgets enabled.
decompile android.policy.jar
smali/com/android/internal/policy/impl/keyguard/KeyguardActivityLauncher.smali
search for .method public launchWidgetPicker(I)V
Code:
.method public launchWidgetPicker(I)V
.locals 9
.parameter "appWidgetId"
.prologue
const/4 v4, 0x0
const/4 v8, 0x2 [COLOR="Blue"]<---- change to 0x3[/COLOR]
const/4 v2, 0x0
.line 124
new-instance v7, Landroid/os/UserHandle;
const/4 v0, -0x2
invoke-direct {v7, v0}, Landroid/os/UserHandle;-><init>(I)V
Next: smali/com/android/internal/policy/impl/keyguard/KeyguardHostView.smali
Search for: .method private numWidgets()I
Code:
.method private numWidgets()I
.locals 4
.prologue
.line 2009
iget-object v3, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mAppWidgetContainer:Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;
invoke-virtual {v3}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;->getChildCount()I
move-result v0
.line 2010
.local v0, childCount:I
const/4 v2, 0x0
.line 2011
.local v2, widgetCount:I
const/4 v1, 0x0
.local v1, i:I
:goto_0
if-ge v1, v0, :cond_1
.line 2012
iget-object v3, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mAppWidgetContainer:Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;
invoke-virtual {v3, v1}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;->isWidgetPage(I)Z
move-result v3
if-eqz v3, :cond_0
iget-object v3, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardHostView;->mAppWidgetContainer:Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;
invoke-virtual {v3, v1}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;->isContextualPage(I)Z
move-result v3
if-nez v3, :cond_0
.line 2013
add-int/lit8 v2, v2, 0x1
.line 2011
:cond_0
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 2016
:cond_1
return v2
.end method
Replace entire method with:
Code:
.method private numWidgets()I
.locals 4
const/4 v2, 0x0
return v2
.end method
That's it. compile and enjoy.
First!!
work fine on i9305 4.3
thanks
So umm. Couple questions. First off does this work on the note 3 running touchwiz 4.3?
Second what do you use to decompile and recompile?
P.s. just cus I don't know does not mean I am a moron and can't learn. However I am reluctant to Google as due to there nature of how much I could **** up my device I prefer to ask the source directly.
Sent from my SM-N900W8 using xda app-developers app
nickzan said:
So umm. Couple questions. First off does this work on the note 3 running touchwiz 4.3?
Second what do you use to decompile and recompile?
P.s. just cus I don't know does not mean I am a moron and can't learn. However I am reluctant to Google as due to there nature of how much I could **** up my device I prefer to ask the source directly.
Sent from my SM-N900W8 using xda app-developers app
Click to expand...
Click to collapse
I would assume it would work on the note 3 but I can't say for sure without looking at the android.policy.jar
You would use apktool 2.0.9b or maybe apk multi tool.
There is a lot to try and explain on how to mod apk and jar files. Unfortunately your going to need to do some reading up. There are a lot of tutorials on how to do it.
Sent from my SAMSUNG-SGH-I747 using Tapatalk
nickzan said:
So umm. Couple questions. First off does this work on the note 3 running touchwiz 4.3?
Second what do you use to decompile and recompile?
P.s. just cus I don't know does not mean I am a moron and can't learn. However I am reluctant to Google as due to there nature of how much I could **** up my device I prefer to ask the source directly.
Sent from my SM-N900W8 using xda app-developers app
Click to expand...
Click to collapse
Perfect, thanks for pointing me in the right direction, this is the key information I was looking for and now I should be able to look up the rest!
Thanks again.