Related
here is a mod in which quick panel settings button are at bottom
DOWNLOAD LINK
http://www.mediafire.com/?r0ml74kqjc6fc8a
For any rom ???
Nice work bro... does it has 14 toggle icon. or just the stock.
Nice work brother
great job working KPQ stock
Can you tell me how to locate quickpanel at bottom?
want to use for any rom..
thx man
have 14 toggle button???
HOW?
How did You do this? Instructions!!!!?
How to install ?
Sent from my GT-I9003 using xda premium
The "how to..."
I have Xperia Mini and I did bottom quickpanel in the following way (this info for experts - if You don't understand these infos then You probably can't done with success):
Edit StatusBarService.smali in SystemUI.apk - at the end of makeExpandedVisible() method (at line #778 in my case) I changed code to this:
const v6, 0x7f030007
invoke-static {p1, v6, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroupLandroid/view/View;
move-result-object v5
check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;
.local v5, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v5}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mCloseView:Lcom/android/systemui/statusbar/CloseDragHandle;
invoke-virtual {v6, v5, v11}, Lcom/android/systemui/statusbar/CloseDragHandle;->addView(Landroid/view/View;I)V
const v6, 0x7f030009
invoke-static {p1, v6, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroupLandroid/view/View;
move-result-object v5
check-cast v5, Lcom/android/systemui/statusbar/quickpanel/BrightnessSettingsView;
.local v5, brs:Lcom/android/systemui/statusbar/quickpanel/BrightnessSettingsView;
invoke-virtual {v5}, Lcom/android/systemui/statusbar/quickpanel/BrightnessSettingsView;->init()V
iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mCloseView:Lcom/android/systemui/statusbar/CloseDragHandle;
const/4 v11, 0x1
invoke-virtual {v6, v5, v11}, Lcom/android/systemui/statusbar/CloseDragHandle;->addView(Landroid/view/View;I)V
return-void
Click to expand...
Click to collapse
In original code was mExpandedView & ExpandedView instead of mCloseView & CloseDragHandle.
I spent a half day to figure out WHAT to modify (I did never edited smali before) but worth it! :victory:
Nice
nice one sir :good:
good jobe
Well, this a very simple guide on adding 6 lockscreen mod to your rom.
Files To be downloaded :
1. android.policy.zip
2. Lidroid-res.apk
3. Lidroid-Parts
Files to be Affected :
1. android.policy.jar
2. systemui.apk (only if you have added 14 status bar toggles before)
Steps :
-Pullout android.policy.jar from '/system/framework' (Must be Deodexed)
-Decompile it (Please dont expect a guide on how to decompile)
-Extract the android.policy.zip file
-copy the smali folder to directory where you decompiled your android.policy.jar
-Now open this file android.policy.jar.out\smali\com\android\internal\policy\impl\KeyguardUpdateMonitor.smali and make the following changes :
-At the begining after '#annonations' search for this line "Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$AirplaneModeChangeCallback;"
after that add this line
Code:
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;,
-Now find this line ".field private mLockscreenWallpaperDrawable:Landroid/graphics/drawable/Drawable;"
-Below it paste this line
Code:
.field private mMediaCallbacks:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;",
">;"
}
.end annotation
.end field
-Find this line ".field private mWallpaperModeValue:I"
and jus below paste this
Code:
.field private timezone:Ljava/lang/String;
-Now find this method ".method private handleSimStateChange(Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$SimArgsV"
and above it paste this :
Code:
.method private handleMediaUpdate(IILandroid/net/Uri;)V
.locals 5
.parameter "isPlaying"
.parameter "isStop"
.parameter "mediaUri"
.prologue
const/4 v4, 0x0
const/4 v3, 0x1
.line 467
if-ne p1, v3, :cond_0
move v0, v3
.line 468
.local v0, bIsPlaying:Z
:goto_0
if-ne p2, v3, :cond_1
move v1, v3
.line 470
.local v1, bIsStop:Z
:goto_1
const/4 v2, 0x0
.local v2, i:I
:goto_2
iget-object v3, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mMediaCallbacks:Ljava/util/ArrayList;
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v3
if-ge v2, v3, :cond_2
.line 471
iget-object v3, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mMediaCallbacks:Ljava/util/ArrayList;
invoke-virtual {v3, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;
invoke-interface {v3, v0, v1, p3}, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;->onMediaUpdated(ZZLandroid/net/Uri;)V
.line 470
add-int/lit8 v2, v2, 0x1
goto :goto_2
.end local v0 #bIsPlaying:Z
.end local v1 #bIsStop:Z
.end local v2 #i:I
:cond_0
move v0, v4
.line 467
goto :goto_0
.restart local v0 #bIsPlaying:Z
:cond_1
move v1, v4
.line 468
goto :goto_1
.line 473
.restart local v1 #bIsStop:Z
.restart local v2 #i:I
:cond_2
return-void
.end method
-Now find this line ".method public getFailedAttempts()I"
above it again paste this :
Code:
.method public getChangedTimeZone()Ljava/lang/String;
.locals 1
.prologue
.line 1131
iget-object v0, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->timezone:Ljava/lang/String;
return-object v0
.end method
this one's last for this file , search for ".method public isDevicePluggedIn()Z"
and above it paste :
Code:
.method public isDeviceCharged()Z
.locals 2
.prologue
.line 866
iget v0, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mBatteryLevel:I
const/16 v1, 0x64
if-lt v0, v1, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
-Now close this file and open "\smali\com\android\internal\policy\impl\LockPatternKeyguardView"
-Search for this method now ".method createLockScreen()Landroid/view/View;"
Find this (Jus one line below)
Code:
.prologue
.line 868
below it paste this :
Code:
const/4 v2, 0x0
const/4 v0, 0x0
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "lockscreen_style_pref"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
const/4 v2, 0x1
if-eq v2, v0, :cond_3
const/4 v2, 0x2
if-eq v2, v0, :cond_3
const/4 v2, 0x3
if-eq v2, v0, :cond_3
const/4 v2, 0x4
if-eq v2, v0, :cond_3
const/4 v2, 0x5
if-eq v2, v0, :cond_3
if-eqz v0, :cond_0
.line 869
const/4 v2, 0x0
const/4 v0, 0x0
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "lockscreen_style_pref"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
const/4 v2, 0x6
if-eq v2, v0, :cond_2
const/4 v2, 0x7
if-eq v2, v0, :cond_1
:cond_0
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
goto :goto_0
:cond_1
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
goto :goto_0
:cond_2
after ':cond_2' there will be your default lockscreen so dont leave any line between them.
After the end of your default lockscreen , it might be like this
" invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/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/KeyguardScreenCallbackV
"
paste this
Code:
:goto_0
then on the next line after "return-object v0"
paste this
Code:
:cond_3
new-instance v0, Lcom/android/internal/policy/impl/CyanogenLockScreen;
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/CyanogenLockScreen;-><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_0
Now you may save and close the file.
Now recompile the android.policy.jar and push it to /system/framework with lidroid-res.apk .
Also Push the Lidroid-Parts.apk to '/system/app'
In case If you already have 14 toggles in the status bar adding this may affect it resulting in force closes . So to fix it follow this :
*Prooceed here only if you have 14 status bar toggles mod in your rom*
1.Decompile SystemUI.apk
2.Delete these two folders (if present) : /smali/com/lidroid & /smali/lidroid
3.Download Status_bar_fix from attachments below.
4.Extract it and copy the smali folder to your decompiled SystemUI.apk
5.Recompile and push the SystemUI.apk back to /system/app
Credits
Lidroid - This Mod Isnt Possible without him.
Regarding any help please prefer commenting on this thread rather than sending PM's.
nice guide :good:
Cool... Great guide... Thanks Aryan ^_^
Does the 6 lockscreen include ICS lockscreen? And do I have to download lidroid res? I already had it in my current rom ...
Sent from my GT-S5360 using xda app-developers app
advance user :|
I can't wait for the update.
Please update soon sir
:good::good::good:
ocoot said:
advance user :|
Click to expand...
Click to collapse
its actually quite easy. .
AvijitGhosh82 said:
Does the 6 lockscreen include ICS lockscreen? And do I have to download lidroid res? I already had it in my current rom ...
Sent from my GT-S5360 using xda app-developers app
Click to expand...
Click to collapse
Yes...the new res file contains resources for cyanogen lockscreens..
Waiting for 14 toggle fix!!
Sent from my GT-S5360 using XDA
Good one thanks pratyush
If my status bar is themed, what happens when I add lidroid res apk? Does the theme stay or go away? Thanks.
Sent from my GT-S5360 using xda app-developers app
awesome guide siirrr...:good: but my Status bar FC :laugh:
Creed when are u going to put d 14 toggle fix??
Sent from my GT-S6102 using xda premium
Bhocan said:
awesome guide siirrr...:good: but my Status bar FC :laugh:
Click to expand...
Click to collapse
Was busy for a bit...will put up the status bar fix today !!
pratyush.creed said:
Was busy for a bit...will put up the status bar fix today !!
Click to expand...
Click to collapse
Ohkz.. Gr8.. Eagerly w8ing!!!.
Dude 1 more qs?? Dude u hav put d code for only 6 lockscreens.. But actually there are 9 rite??
Sent from my GT-S6102 using xda premium
Only 6 in this...
Means u knoe how to make only 6 work or in this post there are 6 only?? Coz in ur Rom its 8 and in cyanogen 9...
Sent from my GT-S6102 using xda premium
Status Bar fix added to the guide ... Do not forget to sign your apps after applying it
pratyush.creed said:
Status Bar fix added to the guide ... Do not forget to sign your apps after applying it
Click to expand...
Click to collapse
putting modded classes.dex and res in original systemUI.apk will not work?
The fix you've added....do we have to use it AFTER the lockscreen adding part? Or is it a separate part?
Sent from my GT-S5360 using xda app-developers app
Creed can u add 2 more lockscreens??
Sent from my GT-S6102 using xda premium
Okay, since it seems like I only get about 3 people who actually want to download and use my ROM (actually its more like 4....LOL) I will just try to contribute by releasing some more "How-Too's" for those DEVs who want to use them.
As always feel free to use these MODs with your ROM but since it took a few days to get this coded correctly just give me some thanks and some credit in your thread please.
[Q] What does this MOD do?
[A] It allows you to toggle between TW lock screen or AOSP lock screen.
*****EDIT******
If you experience your lock screen freezing when you turn it to landscape mode, just go to lockscreen options and make sure all settings are UNTICKED......except for AOSP lockscreen that is .
Thanks to jdub251 for the feedback.
Here are the goodies.....
We will be working in two files.
-SecSettings
-android.policy
As always, I will assume you know how to compile/decompile so I will not be providing information how to do that.
Lets begin with the easiest file, Android.policy.jar
Navigate to smali/com/android/internal/policy/imp/LockPatternKeyguardView
Find the following code
Code:
.method createLockScreen()Landroid/view/View;
We are going to replace the whole method with the following code.
Code:
.method createLockScreen()Landroid/view/View;
.locals 6
.prologue
.line 1268
const/4 v0, 0x0
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v5}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v5
const-string v4, "enable_aosp_lock"
invoke-static {v5, v4, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v5
if-nez v5, :cond_0
.line 1044
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
.line 1274
.local v0, lockView:Landroid/view/View;
:goto_0
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V
.line 1275
return-object v0
:cond_0
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
.line 1274
goto :goto_0
.end method
Thats it for android.policy.jar. Recompile and push to /system/app. If you want to Diff out the exact changes feel free.
Now for SecSettings.
Navigate to res/values/strings
Add the following lines somewhere in this file. In the middle or end, it doesnt matter.
Code:
<string name="enable_aosp_lock">Enable AOSP lockscreen</string>
<string name="enable_aosp_lock_text">Enable AOSP lockscreen in place of circle lockscreen</string>
Navigate to res/xml/Lockscreen_Settings.xml
Add the following line below in RED.
Code:
<PreferenceCategory android:title="@string/display_settings" />
[COLOR="red"]<CheckBoxPreference android:title="@string/enable_aosp_lock" android:key="enable_aosp_lock" android:summary="@string/enable_aosp_lock_text" />
[/COLOR] <SwitchPreferenceScreen android:title="@string/lock_screen_shortcut_title" android:key="lock_screen_shortcut" android:summary="@string/lock_screen_shortcut_summary">
Now lets hit some smali.....
Still in SecSettings, lets navigate to smali/com/android/settings/LockScreenSettings
Find the following code
Code:
.field private mWeather:Landroid/preference/SwitchPreferenceScreen;
Add this line below it
Code:
.field private mAospLock:Landroid/preference/CheckBoxPreference;
Find the following code and add the parts in RED
Code:
.method private updateState()V
.locals 9
.prologue
const/4 v5, 0x1
const/4 v6, 0x0
.line 263
[COLOR="Red"]iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "enable_aosp_lock"
invoke-static {v4, v8, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-eqz v4, :cond_7
move v4, v5
invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 265
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
[/COLOR]
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mClock:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "show_clock"
Find the following code and add the parts in RED
Code:
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mClock:Landroid/preference/CheckBoxPreference;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setPersistent(Z)V
[COLOR="red"]const-string v9, "enable_aosp_lock"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/CheckBoxPreference;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
.line 159
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setPersistent(Z)V
[/COLOR]
.line 161
const-string v9, "weather"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
Find the following code and add the parts in RED
Code:
:cond_9
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, [COLOR="red"]:cond_b
[/COLOR]
.line 338
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v5, "wake_up_lock_screen"
iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
invoke-virtual {v6}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v6
if-eqz v6, :cond_a
Find the following code and add the parts in RED
Code:
invoke-static {v4, v5, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1
:cond_a
move v2, v3
goto :goto_5
[COLOR="red"]:cond_b
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_0
.line 313
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v5, "enable_aosp_lock"
iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
invoke-virtual {v6}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v6
if-eqz v6, :cond_c
:goto_6
invoke-static {v4, v5, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 314
invoke-direct {p0}, Lcom/android/settings/LockScreenSettings;->updateState()V
.line 340
invoke-super {p0, p1, p2}, Lcom/android/settings/SettingsPreferenceFragment;->onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
move-result v2
return v2
:cond_c
move v2, v3
.line 313
goto :goto_6
[/COLOR]
.line 337
.end method
.method public onResume()V
.locals 0
.prologue
.line 257
invoke-super {p0}, Lcom/android/settings/SettingsPreferenceFragment;->onResume()V
.line 258
invoke-direct {p0}, Lcom/android/settings/LockScreenSettings;->updateState()V
Thats it! Recompile and push to /system/app
You will find your new toggle in lockscreen options.
Enjoy!
The newest version for BLK3 has a few other mods included in it as well. See the installer screen when installing for specifics. This is meant for Stock Deodexed RoMs.If your using a custom ROM this will break the theme and maybe other stuff. Enjoy.
BLK3 AOSP Lockscreen ZIP
Thanks Button!
Awesome work as always bud!!!
Seriously... always a pleasure working with you...
Sent from my SPH-L900 using Xparent ICS Tapatalk 2
Argh I thought this was the answer to my prayers, a zip file. I appreciate the tutorial but it looks Chinese to a dunce like myself. No zip file? I desperately want to keep touch wiz but want aosp lock screen to afraid I'm going to screw my phone up.
dukins said:
Argh I thought this was the answer to my prayers, a zip file. I appreciate the tutorial but it looks Chinese to a dunce like myself. No zip file? I desperately want to keep touch wiz but want aosp lock screen to afraid I'm going to screw my phone up.
Click to expand...
Click to collapse
I also wonder if it's possible to have something more semi-automatic...
Seems very complicated, especially since I flash new ROM's every few days.... Thank you so much for putting the time into such a great tutorial though!! I will definitely try it out soon, because I love the ASOP lockscreen.
Edit: one request - can you post a picture of the ASOP lockscreen we would have? Thank you!
Nightwind Hawk said:
I also wonder if it's possible to have something more semi-automatic...
Seems very complicated, especially since I flash new ROM's every few days.... Thank you so much for putting the time into such a great tutorial though!! I will definitely try it out soon, because I love the ASOP lockscreen.
Edit: one request - can you post a picture of the ASOP lockscreen we would have? Thank you!
Click to expand...
Click to collapse
This would give you AOSP lock with two extra shortcuts......Camera and Google. I am going to post up a tutorial on how to add more shortcuts soon.
Due to popular demand I am going to throw a flashable zip in the opening post. To be honest I didnt test it so nandroid first. This is my upgraded lockscreen with extra shortcuts. Let me know if this installs okay (it should). There may be some misc. other things included because I pulled this right out of my ROM. Enjoy!
Thanks Button!!
I'm gonna give it a shot.
Shh! maybe I'm just paranoid, but I think people are listening....
Just checked out your ROM. I missed it but will be giving it a shot when classes are over tomorrow for break lol
Sent from my SCH-I535 using xda app-developers app
tu3218 said:
Just checked out your ROM. I missed it but will be giving it a shot when classes are over tomorrow for break lol
Sent from my SCH-I535 using xda app-developers app
Click to expand...
Click to collapse
Thanks. I will release another soon with this MOD included.
I just flashed on clean ROM 3.5 an not seeing it in lock screen options.
Sent from my SCH-I535 using xda app-developers app
Didact74 said:
Let me know if this installs okay (it should).
Click to expand...
Click to collapse
Nothing on the flash. No option to enable
Sorry guys, it was my error. I packed the zip wrong. Thats what i get for rushing it.
Should be good now. Let me know.
Didact74 said:
Sorry guys, it was my error. I packed the zip wrong. Thats what i get for rushing it.
Should be good now. Let me know.
Click to expand...
Click to collapse
Fuggin saweeet!
EDIT:
Works perfectly on CleanROM 4.5.
Does it matter base of the ROM and if is deodexed or odexed? I'm in new leak and want to use this zip. When fixed is out of course
Sent from my SCH-I535 using xda premium
The revised zip file worked great on synergy r118. Frackin beautiful! Thanks.
Shh! maybe I'm just paranoid, but I think people are listening....
Works on Jelly Beans Build 3, but de-themes everything. Nandroid'd back, i gotta have my AOSP looks!
Works fine now. CR 4.5
dawiseguy77 said:
Does it matter base of the ROM and if is deodexed or odexed? I'm in new leak and want to use this zip. When fixed is out of course
Sent from my SCH-I535 using xda premium
Click to expand...
Click to collapse
Just needs to be a deodexed rom.
charlieg90 said:
Works on Jelly Beans Build 3, but de-themes everything. Nandroid'd back, i gotta have my AOSP looks!
Click to expand...
Click to collapse
Sorry, maybe your rom dev will pick up the mod so you can retain themes.
If you experience your lock screen freezing when you turn it to landscape mode, just go to lockscreen options and make sure all settings are UNTICKED......except for AOSP lockscreen that is .
Thanks to jdub251 for the feedback.
Glad you guys like it.
Didact74 said:
If you experience your lock screen freezing when you turn it to landscape mode, just go to lockscreen options and make sure all settings are UNTICKED......except for AOSP lockscreen that is .
Thanks to jdub251 for the feedback.
Glad you guys like it.
Click to expand...
Click to collapse
Thanks much appreciated. I havent tested it yet im in the process. If calendar events aren't included on the lockscreen is this something you could incorporate on the lock screen like cm10?
dukins said:
Thanks much appreciated. I havent tested it yet im in the process. If calendar events aren't included on the lockscreen is this something you could incorporate on the lock screen like cm10?
Click to expand...
Click to collapse
Currently working on adding calander and weather options. I will post up when I get it worked out.
Thanks
With all of the ROMs coming out with CRT animation, I decided to just release the tutorial for devs so they can get it to work on their ROMs should they not have it. I have only tested this on the 2.24.401.1 base, but believe it will work on older bases as well. I have confirmed it to work on the following ROMs:
AxisOne v1.0.2
Renovate Milestone 4
Android Revolution HD 12.1
Let's get on with the tutorial. We'll be working with two files: services.jar and framework-res.apk
PART 1
Decompile services.jar and open up DisplayPowerController.smali in smali/com/android/server/power/
Find the following code:
Code:
:cond_10
:goto_8
iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mLightSensor:Landroid/hardware/Sensor;
if-eqz v8, :cond_11
iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mPowerRequest:Lcom/android/server/power/DisplayPowerRequest;
iget v8, v8, Lcom/android/server/power/DisplayPowerRequest;->screenState:I
invoke-static {v8}, Lcom/android/server/power/DisplayPowerController;->wantScreenOn(I)Z
move-result v8
[COLOR="red"]if-eqz v8, :cond_2a
iget-boolean v8, p0, Lcom/android/server/power/DisplayPowerController;->mScreenOffBecauseOfProximity:Z
if-nez v8, :cond_2a
move v8, v9[/COLOR]
Replace the code in RED with the following:
Code:
if-eqz v8, :cond_2d
iget-boolean v8, p0, Lcom/android/server/power/DisplayPowerController;->mScreenOffBecauseOfProximity:Z
if-nez v8, :cond_2d
const/4 v8, 0x1
Find the following code:
Code:
invoke-virtual {v8, v11}, Lcom/android/server/power/DisplayPowerState;->setElectronBeamLevel(F)V
iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
invoke-virtual {v8}, Lcom/android/server/power/DisplayPowerState;->dismissElectronBeam()V
goto/16 :goto_8
:cond_29
iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOnAnimator:Landroid/animation/ObjectAnimator;
invoke-virtual {v8}, Landroid/animation/ObjectAnimator;->isStarted()Z
move-result v8
if-nez v8, :cond_10
[COLOR="red"]invoke-direct {p0, v10, v10, v10, v13}, Lcom/android/server/power/DisplayPowerController;->animateScreenBrightness(IIII)V
iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
invoke-virtual {v8, v14}, Lcom/android/server/power/DisplayPowerState;->setElectronBeamLevel(F)V
invoke-direct {p0, v10}, Lcom/android/server/power/DisplayPowerController;->setScreenOn(Z)V
goto/16 :goto_8
:cond_2a
move v8, v10[/COLOR]
goto/16 :goto_9
:catchall_1
move-exception v8
:try_start_3
monitor-exit v9
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
throw v8
.end method
Replace the code in RED with the following:
Code:
iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;
invoke-virtual {v8}, Landroid/animation/ObjectAnimator;->isStarted()Z
move-result v8
if-nez v8, :cond_10
iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
invoke-virtual {v8}, Lcom/android/server/power/DisplayPowerState;->getElectronBeamLevel()F
move-result v8
const/4 v9, 0x0
cmpl-float v8, v8, v9
if-nez v8, :cond_2a
const/4 v8, 0x0
invoke-direct {p0, v8}, Lcom/android/server/power/DisplayPowerController;->setScreenOn(Z)V
goto/16 :goto_8
:cond_2a
iget-object v9, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
iget-boolean v8, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamFadesConfig:Z
if-eqz v8, :cond_2b
const/4 v8, 0x2
:goto_c
invoke-virtual {v9, v8}, Lcom/android/server/power/DisplayPowerState;->prepareElectronBeam(I)Z
move-result v8
if-eqz v8, :cond_2c
iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
invoke-virtual {v8}, Lcom/android/server/power/DisplayPowerState;->isScreenOn()Z
move-result v8
if-eqz v8, :cond_2c
iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;
invoke-virtual {v8}, Landroid/animation/ObjectAnimator;->start()V
goto/16 :goto_8
:cond_2b
const/4 v8, 0x1
goto :goto_c
:cond_2c
iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;
invoke-virtual {v8}, Landroid/animation/ObjectAnimator;->end()V
goto/16 :goto_8
:cond_2d
const/4 v8, 0x0
Recompile services.jar.
PART 2
Decompile framework-res.apk and open up bools.xml in res/values/
Change the following instance:
Code:
<bool name="config_animateScreenLights">[COLOR="Red"]true[/COLOR]</bool>
to
Code:
<bool name="config_animateScreenLights">[COLOR="Red"]false[/COLOR]</bool>
recompile framework-res.apk
You are now done!
Full credit for this mod goes to myself and mwilky.
Reserved for a toggle
tks bro for guide ...
there is a flashable zip file for add CRT ?
tks again
jonata said:
tks bro for guide ...
there is a flashable zip file for add CRT ?
tks again
Click to expand...
Click to collapse
He just told you how to do it! Just edit it recompile it and replace it in /system/framework
Sent from my HTC One using Tapatalk HD
mate,
it not easy for me because haven't tools to decompile etc.etc. .. so ask if there was a flashable zip ...
nothing more ...
jonata said:
mate,
it not easy for me because haven't tools to decompile etc.etc. .. so ask if there was a flashable zip ...
nothing more ...
Click to expand...
Click to collapse
Op said he posted it for devs. if you can't do it yourself, Just wait. Some dev or some advanced user will make flashable sooner or later.
Sent from my HTC One using xda premium
jonata said:
mate,
it not easy for me because haven't tools to decompile etc.etc. .. so ask if there was a flashable zip ...
nothing more ...
Click to expand...
Click to collapse
Just make a backup and try it for yourself Follow this guide for decompiling: http://forum.xda-developers.com/showthread.php?t=2195680
Restore your backup if it goes balls up..
redbull123 said:
Just make a backup and try it for yourself Follow this guide for decompiling: http://forum.xda-developers.com/showthread.php?t=2195680
Restore your backup if it goes balls up..
Click to expand...
Click to collapse
Giggity
Sent from my HTC One using Tapatalk HD
I modified successfully, but one problem : lock screen widget(https://play.google.com/store/apps/details?id=com.droidmania.lockscreenwidget) doesn't work, when I pressed, the screen off but on immediately.
There are some files modfied by me, you can flash into your device (FLASHED AT YOUR OWN RISK! PLEASE BACKUP SYSTEM AT FIRST !)
https://dl.dropboxusercontent.com/u/36136585/hTC MOD/screen_off_CRT_animation.zip
Ok, so I'm trying this.. managed to get everything decompiled but when I open DisplayPowerController.smali with Notepad++ I get '.line' everywhere..
Code:
.line 964
invoke-direct {p0, v10, v10, v10, v13}, Lcom/android/server/power/DisplayPowerController;->animateScreenBrightness(IIII)V
.line 966
iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
invoke-virtual {v8, v14}, Lcom/android/server/power/DisplayPowerState;->setElectronBeamLevel(F)V
.line 967
invoke-direct {p0, v10}, Lcom/android/server/power/DisplayPowerController;->setScreenOn(Z)V
goto/16 :goto_148
:cond_2bf
move v8, v10
.line 979
goto/16 :goto_15b
Is this normal? I was expecting it to be the same layout as your post..
I'm a noob with this stuff, but please don't anyone say "wait for someone else to do it" - I want to learn for myself..:good:
redbull123 said:
Ok, so I'm trying this.. managed to get everything decompiled but when I open DisplayPowerController.smali with Notepad++ I get '.line' everywhere..
Code:
.line 964
invoke-direct {p0, v10, v10, v10, v13}, Lcom/android/server/power/DisplayPowerController;->animateScreenBrightness(IIII)V
.line 966
iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
invoke-virtual {v8, v14}, Lcom/android/server/power/DisplayPowerState;->setElectronBeamLevel(F)V
.line 967
invoke-direct {p0, v10}, Lcom/android/server/power/DisplayPowerController;->setScreenOn(Z)V
goto/16 :goto_148
:cond_2bf
move v8, v10
.line 979
goto/16 :goto_15b
Is this normal? I was expecting it to be the same layout as your post..
I'm a noob with this stuff, but please don't anyone say "wait for someone else to do it" - I want to learn for myself..:good:
Click to expand...
Click to collapse
Ignore the line, it's used as a reference so not really needed. Most devs remove all the line references to improve performance
HTC One - RenovateROM
mwilky said:
Ignore the line, it's used as a reference so not really needed. Most devs remove all the line references to improve performance
HTC One - RenovateROM
Click to expand...
Click to collapse
Thanks, so can I cut the .lines and paste the new code over them or do I need to keep them in the code?
redbull123 said:
Thanks, so can I cut the .lines and paste the new code over them or do I need to keep them in the code?
Click to expand...
Click to collapse
You can get rid of the lines it won't make a difference
HTC One - RenovateROM
mwilky said:
You can get rid of the lines it won't make a difference
HTC One - RenovateROM
Click to expand...
Click to collapse
Ok mate, one more thing please..
I've done the apk but can't recompile the classes.dex file after editing. I get this:
Code:
C:\Users\BOOTCAMP\Desktop\dex>java -jar smali.jar dex -o new_classes.dex
dex\com\android\server\power\DisplayPowerController.smali[5928,16] Label "cond_1
0" is not defined.
dex\com\android\server\power\DisplayPowerController.smali[5946,13] Label "goto_8
" is not defined.
dex\com\android\server\power\DisplayPowerController.smali[5976,13] Label "goto_8
" is not defined.
dex\com\android\server\power\DisplayPowerController.smali[5988,13] Label "goto_8
" is not defined.
I get the same errors if I use Toolkits, etc. Any ideas?
Is there a way to have CRT off work in conjunction with the Nova launcher? Both my S4 and HTC one have this issue.
redbull123 said:
Ok mate, one more thing please..
I've done the apk but can't recompile the classes.dex file after editing. I get this:
Code:
C:\Users\BOOTCAMP\Desktop\dex>java -jar smali.jar dex -o new_classes.dex
dex\com\android\server\power\DisplayPowerController.smali[5928,16] Label "cond_1
0" is not defined.
dex\com\android\server\power\DisplayPowerController.smali[5946,13] Label "goto_8
" is not defined.
dex\com\android\server\power\DisplayPowerController.smali[5976,13] Label "goto_8
" is not defined.
dex\com\android\server\power\DisplayPowerController.smali[5988,13] Label "goto_8
" is not defined.
I get the same errors if I use Toolkits, etc. Any ideas?
Click to expand...
Click to collapse
Try to remove debug code after decompiling the classes.dex, there is a tool for that or just use VTS and check there to remove it.
Then you wont see the .line bloat etc.
Sorry guys, tried using VTS 2.6.16 but I couldn't find framework-res/res/values folder (while I modded and rebuilt services.jar just fine). What am I doing wrong here?
EDIT: Got it... now building.
I tried replacing stock files with the VTS-modded ones, too bad ROM doesn't boot (stuck on HTC One bootscreen), cleared dalvik&cache but to no avail. Can anybody suggest what to check? I'd really like to do this myself but I think I don't have enough knowledge...
Hi guys,
if someone has the apk for directly install it on THE ONE, it would be nice.
Thanks
NIce !
Just work great on One X with latest APM and services.jar... awesome tutorial and very clear for noob lime me !
:good:
Hello there !!!
I would like to present you a guide on how to enable the Private Mode feature for deodexed roms...
Intro:
when you trip knox this feature isn't supposed to work anymore, basically because it checks the security of your device and since knox is voided is not anymore for Samsung standards. i recently found out thanks to @Goldie that the reason is deodex, since even if you trip knox and you're on stock rom and wipe data you can still access the partition after is wiped
what i did was running a log while enabling the P.M. and i got that it "failed to get key value from SecureProperties"
Actions: << kitkat guide >> for Lollipop search for post 141
decompiling the app we find that navigating to /smali/com/samsung/android/personalpage/service/util/ there is a smali called SecureProperties.smali
opening it we found:
Code:
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 1
.param p1, "context" # Landroid/content/Context;
.prologue
.line 59
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 52
const/4 v0, 0x0
iput-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
.line 62
invoke-static {p1}, Lcom/samsung/android/personalpage/service/util/SecureProperties$SecureStorageProperties;->getInstance(Landroid/content/Context;)Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
move-result-object v0
iput-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
.line 64
iget-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
if-nez v0, :cond_0
.line 65
invoke-static {p1}, Lcom/samsung/android/personalpage/service/util/SecureProperties$NonSecureProperties;->getInstance(Landroid/content/Context;)Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
move-result-object v0
iput-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
.line 67
:cond_0
return-void
.end method
this will get the value from framework and we don't want it
so basically we're now going make it read that the framework is still odex by adding a line in the method above like below:
Code:
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 1
.param p1, "context" # Landroid/content/Context;
.prologue
.line 59
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 52
const/4 v0, 0x0
iput-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
.line 62
invoke-static {p1}, Lcom/samsung/android/personalpage/service/util/SecureProperties$SecureStorageProperties;->getInstance(Landroid/content/Context;)Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
move-result-object v0
[COLOR="Lime"] const/4 v0, 0x0[/COLOR]
iput-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
.line 64
iget-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
if-nez v0, :cond_0
.line 65
invoke-static {p1}, Lcom/samsung/android/personalpage/service/util/SecureProperties$NonSecureProperties;->getInstance(Landroid/content/Context;)Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
move-result-object v0
iput-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
.line 67
:cond_0
return-void
.end method
adding the line const/4 v0, 0x0 overrides the one from secure storage with a null value and makes it load the PrivateFsKey value from properties.xml and enabling the feature
so we're done.. just save the smali, recompile and.. enjoy....
optional editing you can apply to the app: (curtesy of @Goldie )
force secure storage to true ( be supported):
in smali/com/sec/android/securestorage/SecureStorage.smali change the .method public static isSupported()Z
like this:
Code:
.method public static isSupported()Z
.locals 1
.prologue
.line 2060
[COLOR="Red"]const/4 v0, 0x1[/COLOR]
return v0
.end method
with the const/4 v0, 0x1 we're forcing it to load a positive value and saing it is supported anyway, instead of loading the value from output
let the app work without the lockscreen keyguard enabled
in smali/com/samsung/android/personalpage/service/PersonalPageService.smali search for new-instance v0, Lcom/android/internal/widget/LockPatternUtils;
the code is now looking like this in stock :
Code:
new-instance v0, Lcom/android/internal/widget/LockPatternUtils;
iget-object v1, p0, Lcom/samsung/android/personalpage/service/PersonalPageService;->mContext:Landroid/content/Context;
invoke-direct {v0, v1}, Lcom/android/internal/widget/LockPatternUtils;-><init>(Landroid/content/Context;)V
.line 282
.local v0, "lockPatternUtils":Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {v0}, Lcom/android/internal/widget/LockPatternUtils;->isSecure()Z
move-result v1
if-nez v1, :cond_0
.line 283
const/4 v1, 0x1
invoke-direct {p0, v1}, Lcom/samsung/android/personalpage/service/PersonalPageService;->showPrivateModeDialog(Z)V
.line 288
.end local v0 # "lockPatternUtils":Lcom/android/internal/widget/LockPatternUtils;
:cond_0
const/4 v1, 0x1
invoke-direct {p0, v1}, Lcom/samsung/android/personalpage/service/PersonalPageService;->handleChangePrivateMode(Z)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
and we're going to add const/4 v1, 0x1 like below:
Code:
new-instance v0, Lcom/android/internal/widget/LockPatternUtils;
iget-object v1, p0, Lcom/samsung/android/personalpage/service/PersonalPageService;->mContext:Landroid/content/Context;
invoke-direct {v0, v1}, Lcom/android/internal/widget/LockPatternUtils;-><init>(Landroid/content/Context;)V
.line 282
.local v0, "lockPatternUtils":Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {v0}, Lcom/android/internal/widget/LockPatternUtils;->isSecure()Z
move-result v1
[COLOR="Red"]const/4 v1, 0x1[/COLOR]
if-nez v1, :cond_0
.line 283
const/4 v1, 0x1
invoke-direct {p0, v1}, Lcom/samsung/android/personalpage/service/PersonalPageService;->showPrivateModeDialog(Z)V
.line 288
.end local v0 # "lockPatternUtils":Lcom/android/internal/widget/LockPatternUtils;
:cond_0
const/4 v1, 0x1
invoke-direct {p0, v1}, Lcom/samsung/android/personalpage/service/PersonalPageService;->handleChangePrivateMode(Z)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
and remove the notification in status bar when personal page is enbled
in smali/com/samsung/android/personalpage/service/util/PersonalPageNotiManager.smali search for .method private static secretModeSetNotification(Landroid/app/NotificationManager;IIIIII)V
chance the whole method to retur void so it won't load the notification like this
Code:
.method private static secretModeSetNotification(Landroid/app/NotificationManager;IIIIII)V
.locals 9
.param p0, "notificationManager" # Landroid/app/NotificationManager;
.param p1, "nMoodId" # I
.param p2, "nTitleId" # I
.param p3, "nTextId" # I
.param p4, "nTickerId" # I
.param p5, "nId" # I
.param p6, "nIndicatorState" # I
.prologue
const/4 v8, 0x0
return-void
.end method
for those not able to enable the private mode with stock rom it is more likely due to wipe not done, or foldermount or any other app that replaces the sdcard binary
no credits need except for samsung that actually made this nice feature...
i just want to thank @daxgirl for moral help first and for helping me making the guide more clear as possible
Seriously, you're the best! This is AMAZING! Absolutely superb job, Wuby!
Sent from my SM-G900F using Tapatalk
It WOOOORRRRRRKKKKSSSSSS! GENIUS!
Sent from my SM-G900F using Tapatalk
Working here to, appreciate the zip, thanks. (NeatROM v2.3)
SM-G900W8 / 0x1
Great guide @Wuby986 ! I am sure many moders & users will benefit from your clean work ! What a nice and simple guide . Private mode can have it's uses, finally !
With friendship,
Thomas
thanks magician wuby, :good: it works perfectly
Samsung stock odex NG2 not work
Tamerlan2009 said:
Samsung stock odex NG2 not work
Click to expand...
Click to collapse
You need to delete the odex file of the apk. The zip replaced the apk. But the odex is still there. Delete it and it should work.
Find PersonalPageService.apk. in /system/priv-app and see if you have PersonalPageService.odex. delete it.
Sent from my SM-G900F using Tapatalk
daxgirl said:
You need to delete the odex file of the apk. The zip replaced the apk. But the odex is still there. Delete it and it should work.
Find PersonalPageService.apk. in /system/priv-app and see if you have PersonalPageService.odex. delete it.
Sent from my SM-G900F using Tapatalk
Click to expand...
Click to collapse
long the file has been deleted) that I just did not do. still does not work
Tamerlan2009 said:
long the file has been deleted) that I just did not do. still does not work
Click to expand...
Click to collapse
Then I suggest opening the actual deodexed apk for ng2 base and modding it according to the guide. Maybe there are differences.
Sent from my SM-G900F using Tapatalk
daxgirl said:
Then I suggest opening the actual deodexed apk for ng2 base and modding it according to the guide. Maybe there are differences.
Sent from my SM-G900F using Tapatalk
Click to expand...
Click to collapse
did not work.
Tamerlan2009 said:
did not work.
Click to expand...
Click to collapse
When you say it doesn't work, what do you mean? What happens when you start private mode?
Also, since this is a development thread, log cat is usually the best way for troubleshooting. Present your log cat or the output of your log cat error. Since "doesn't work" is really a wide range of issues.
Sent from my SM-G900F using Tapatalk
daxgirl said:
When you say it doesn't work, what do you mean? What happens when you start private mode?
Also, since this is a development thread, log cat is usually the best way for troubleshooting. Present your log cat or the output of your log cat error. Since "doesn't work" is really a wide range of issues.
Sent from my SM-G900F using Tapatalk
Click to expand...
Click to collapse
here is what : Failed to enable private mode. Please try again
Tamerlan2009 said:
here is what : Failed to enable private mode. Please try again
Click to expand...
Click to collapse
Please provide a log cat of your error and/or your modified smali/apk.
Sent from my SM-G900F using Tapatalk
Thank's ....
Working perfectly ???[emoji6] [emoji106] [emoji106]
SM-G900F ___abym
daxgirl said:
Please provide a log cat of your error and/or your modified smali/apk.
Sent from my SM-G900F using Tapatalk
Click to expand...
Click to collapse
log and modified apk
Tamerlan2009 said:
log and modified apk
Click to expand...
Click to collapse
Your error is the same as if the file hasn't been modified. I will have a look at the apk and let you know.
Sent from my SM-G900F using Tapatalk
---------- Post added at 07:08 PM ---------- Previous post was at 06:51 PM ----------
Tamerlan2009 said:
log and modified apk
Click to expand...
Click to collapse
I just pushed the app you uploaded into my device and it works immidiately. Even though yours is from ng2 and I am on ng9. So the problem is on your device with something else. from your log I can see some errors on secure storage disabled... could that be the problem?
Your smali is modified correctly, your apk works on my device flawlessly. So it's something in your settings that's blocking it. Maybe one of the build.prop configs? Sorry I can't help more at this point. I will have a deeper look into your log cat. Cheers!
Edit: make sure you don't have it installed in both /system/app and /system/priv-app.
Edit: noticed something else. If you wipe data to the apk after it was working, it never enables again. Maybe wiping all data will help. I will have to try it later. My guess is since you removed the apk and the odex file it wiped data for the app, since it was removed before pushing the new one. I hope wiping data to the device will solve this. Still have to try.
Edit: wiping all data fixed it again. No problem. All works.
Sent from my SM-G900F using Tapatalk
Not that I have an S5 or using this MOD but I just want to thank @wuby986 and @daxgirl for their continuous support and contributions to XDA developers forum. You guys rocks:good:
I will probably try it on my Note 3 S5 port
oluwaponmile said:
Not that I have an S5 or using this MOD but I just want to thank @wuby986 and @daxgirl for their continuous support and contributions to XDA developers forum. You guys rocks:good:
I will probably try it on my Note 3 S5 port
Click to expand...
Click to collapse
Thanks, mate! Nice to see you around! You're on Jamal's port I see from your posts there. Quite a nice rom I hear! I can't say if the note3 is capable of having personal page partition, but I would really like to know if it works! Drop a line if it does! ???
Sent from my SM-G900F using Tapatalk
Wow, im so excited when this guide release :good:. Is this method can be working (Flash the zip file) on Ported S5 ROM on Note 3? I was looking for this most everyday to fix it (Private Mode). But im too noob on this manner. Still learn some knowledge, my finger keep searching non stop :crying: