Related
Here is a new LockScreen Torch MOD updated for use on the new JB leak BLK1. I have made a few changes this time around (hopefully fr the better )
This new version (due to code within android.policy.jar) allows the torch to stay on until the screen times out or you unlock it. No need to hold the button in. Again, not my doing, just changes in the policy.
I have implemented a toggle to allow the user to enable or disable the torch. I did this because I love toggles, Im on a toggle kick right now
****EDIT****
This is an updated version to the LockScreen Torch guide.
It is for the newest firmware BLK1
It now includes an on/off toggle located in LockScreen Settings
Enjoy!
THE FLASHABLE ZIP IS MEANT FOR STOCK BLK1 DEODEXED ROMs. IT WILL ADD A FEW OTHER MODs AS WELL. IF YOUR ON A CUSTOM ROM IT WILL PROBABLY STILL WORK BUT IT WILL BREAK ANY THEMES YOU MAY HAVE.
LOCKSCREEN TORCH ZIP DOWNLOAD
The lockscreen torch will allow you to quickly turn on your flashlight from the lockscreen. Simply push the home button in for torch, it will go off when you unlock, hit the power button or it times out. Not sure who originally wrote the MOD but I have spent some time re-writing it to fit the GS3 based on a dozen or so other tutorials.
After reboot, it will take about 60 seconds before the MOD will engage. Then it will work at will as long as you are on the lockscreen.
DEVs if you want to use this in your ROM feel free, just shoot me some credit and some thanks!
Hit the Thanks Button!
Here is the guide.....
GUIDE New Version with toggle! For BLK1
First you will need to download the torch file below and drop it in /system/app, do not install.....just drop in the folder. This will be in the zip file with the smali files.
We will be working with two system files
SecSettings.apk
android.policy.jar
We will begin with SecSettings
Navigate to res/values/strings
Add the following lines somewhere in the middle or end, it doesnt matter.
Code:
<string name="enable_lockscreen_torch">LockScreen Torch</string>
<string name="enable_lockscreen_torch_text">Enables torch for lockscreen</string>
Navigate to res/xml/Lockscreen_Settings.xml
Add the following lines in RED (this assumes you have the aosplock also, if not just ignore it)
Code:
<PreferenceCategory android:title="@string/display_settings" />
<CheckBoxPreference android:title="@string/enable_aosp_lock" android:key="enable_aosp_lock" android:summary="@string/enable_aosp_lock_text" />
[COLOR="Red"]<CheckBoxPreference android:title="@string/enable_lockscreen_torch" android:key="enable_lockscreen_torch" android:summary="@string/enable_lockscreen_torch_text" />
[/COLOR] <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>
Navigate to com/android/settings/LockScreenSettings.smali
Add the following code in RED (again, this assumes you havethe AOSP lockscreen. If not, ignore that code)
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;->mLockScreenTorch:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "enable_lockscreen_torch"
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;->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
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"
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
Code:
:cond_0
const-string v9, "clock"
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;->mClock:Landroid/preference/CheckBoxPreference;
.line 159
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
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="red"]const-string v9, "enable_lockscreen_torch"
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;->mLockScreenTorch:Landroid/preference/CheckBoxPreference;
.line 159
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenTorch: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
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, :cond_b
.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
:goto_5
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
: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
[COLOR="red"] if-eqz v4, :cond_d
[/COLOR]
.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
goto/16 :goto_1
:cond_c
move v2, v3
.line 313
goto :goto_6
[COLOR="red"]:cond_d
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenTorch:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_0
.line 400
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v5, "enable_lockscreen_torch"
iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenTorch:Landroid/preference/CheckBoxPreference;
invoke-virtual {v6}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v6
if-eqz v6, :cond_e
:goto_7
invoke-static {v4, v5, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 450
goto/16 :goto_1
:cond_e
move v2, v3
.line 550
goto :goto_7
[/COLOR] .line 600
.end method
.method public onResume()V
Thats it for SecSettings!
Now for android.policy.jar
See next post to continue.......
PART 2 android.policy.jar
Navigate to smali/com/android/internal/policy/impl/KeyguardViewMediator$4.smali
Find the following code and add the part in RED
Code:
packed-switch v2, :pswitch_data_0
.line 1172
:goto_0
[COLOR="Red"][B] :pswitch_0
[/B][/COLOR] return-void
Find the 13 : pswitch_ lines and increase them by 1. For example
Code:
:pswitch_0 becomes :pswitch_1
:pswitch_1 becomes :pswitch_2
:pswitch_2 becomes :pswitch_3
:pswitch_3 becomes :pswitch_4
:pswitch_4 becomes :pswitch_5
:pswitch_5 becomes :pswitch_6
:pswitch_6 becomes :pswitch_7
:pswitch_7 becomes :pswitch_8
:pswitch_8 becomes :pswitch_9
:pswitch_9 becomes :pswitch_a
:pswitch_a becomes :pswitch_b
:pswitch_b becomes :pswitch_c
:pswitch_c becomes :pswitch_d
Find the following code
Code:
invoke-static {v0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->access$300(Lcom/android/internal/policy/impl/KeyguardViewMediator;)V
.line 1169
monitor-exit v1
goto :goto_0
Add the following directly after
Code:
.line 974
:pswitch_e
iget-object v2, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator$4;->this$0:Lcom/android/internal/policy/impl/KeyguardViewMediator;
iget v3, p1, Landroid/os/Message;->arg1:I
if-eqz v3, :cond_2
move v3, v0
:goto_3
#calls: Lcom/android/internal/policy/impl/KeyguardViewMediator;->handleSetTorch(Z)V
invoke-static {v2, v3}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->access$1900(Lcom/android/internal/policy/impl/KeyguardViewMediator;Z)V
goto :goto_0
:cond_2
move v3, v1
goto :goto_3
Find the "nop' at the end and add another one right below it
Code:
throw v0
.line 1129
nop
nop
Find the stack of : pswitch_ lines at the end of the smali and delete : pswitch_0
Then add the following so the entire stack will end up looking like this
Code:
.packed-switch 0x1
:pswitch_1
:pswitch_2
:pswitch_3
:pswitch_4
:pswitch_5
:pswitch_6
:pswitch_7
:pswitch_8
:pswitch_9
:pswitch_a
:pswitch_b
:pswitch_c
:pswitch_d
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_e
.end packed-switch
.end method
Thats it for KeyguardViewMediator$4.smali. Save and close the file.
Navigate to smali/com/android/internal/policy/impl/KeyguardViewMediator.smali
Add the following in RED
Code:
.field private static final SET_HIDDEN:I = 0xc
[COLOR="Red"].field private static final SET_TORCH:I = 0x14[/COLOR]
.field private static final SHOW:I = 0x2
Code:
.field private mTelephonyManager:Landroid/telephony/TelephonyManager;
[COLOR="red"].field private mTorchEnabled:Z
.field private mTorchStateChanged:Z
[/COLOR]
.field private mUnlockSoundId:I
Code:
# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/android/internal/policy/impl/PhoneWindowManager;Landroid/os/LocalPowerManager;)V
.locals 11
.parameter "context"
.parameter "callback"
.parameter "powerManager"
.prologue
.line 299
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
[COLOR="red"]const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchEnabled:Z
[/COLOR]
.line 179
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mSuppressNextLockSound:Z
.line 180
const/4 v0, 0x1
Code:
iput-object p1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mContext:Landroid/content/Context;
.line 302
iput-object p3, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mRealPowerManager:Landroid/os/LocalPowerManager;
[COLOR="red"] const/4 v0, 0x0
iput-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchEnabled:Z
iput-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchStateChanged:Z
[/COLOR]
.line 303
const-string v0, "power"
invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
iput-object v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mPM:Landroid/os/PowerManager;
.line 304
iget-object v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mPM:Landroid/os/PowerManager;
const v1, 0x1000001a
Code:
.method static synthetic access$2300(Lcom/android/internal/policy/impl/KeyguardViewMediator;Z)V
.locals 0
.parameter "x0"
.parameter "x1"
.prologue
.line 103
invoke-direct {p0, p1}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->handleSetHidden(Z)V
return-void
.end method
[COLOR="red"].method static synthetic access$2400(Lcom/android/internal/policy/impl/KeyguardViewMediator;Z)V
.locals 0
invoke-direct {p0, p1}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->handleSetTorch(Z)V
return-void
.end method
[/COLOR]
.method static synthetic access$300(Lcom/android/internal/policy/impl/KeyguardViewMediator;I)V
Code:
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->adjustLocked(Z)V
.line 1411
monitor-exit p0
[COLOR="red"] invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->resetTorchState()V
[/COLOR]
goto :goto_0
:catchall_0
move-exception v0
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
.end method
.method private handleKeyguardDone(Z)V
Code:
invoke-virtual {v0}, Lcom/android/internal/policy/impl/KeyguardViewManager;->onScreenTurnedOff()V
.line 1562
monitor-exit p0
[COLOR="red"]invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->resetTorchState()V[/COLOR]
.line 1563
return-void
.line 1562
:catchall_0
move-exception v0
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
.end method
.method private handleNotifyScreenOn(Lcom/android/internal/policy/impl/KeyguardViewManager$ShowListener;)V
.locals 2
Code:
invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->adjustUserActivityLocked()V
.line 682
invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->adjustStatusBarLocked()V
[COLOR="red"] invoke-direct {p0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->resetTorchState()V
[/COLOR]
.line 684
:cond_0
monitor-exit p0
.line 685
return-void
.line 684
:catchall_0
move-exception v0
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
.end method
[COLOR="red"].method private handleSetTorch(Z)V
.locals 6
const/4 v0, 0x0
iget-object v5, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mContext:Landroid/content/Context;
invoke-virtual {v5}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v5
const-string v4, "enable_lockscreen_torch"
invoke-static {v5, v4, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v5
if-eqz v5, :cond_0
const/4 v5, 0x0
const/4 v4, 0x1
:try_start_0
iget-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchStateChanged:Z
if-nez v1, :cond_1
iput-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchEnabled:Z
const/4 v1, 0x1
iput-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchStateChanged:Z
:cond_0
:goto_0
return-void
:cond_1
iget-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchEnabled:Z
if-eq v1, p1, :cond_0
iput-boolean p1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchEnabled:Z
new-instance v0, Landroid/content/Intent;
const-string v1, "net.cactii.flash2.TOGGLE_FLASHLIGHT"
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const-string v1, "net.cactii.flash2.EXTRA_DISABLE_NOTIFICATION"
const/4 v2, 0x1
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mContext:Landroid/content/Context;
invoke-virtual {v1, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v1
goto :goto_0
.end method
[/COLOR]
.method private handleShow()V
Code:
invoke-interface {v0, v1}, Landroid/app/IActivityManager;->closeSystemDialogs(Ljava/lang/String;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.catch Landroid/os/RemoteException; {:try_start_1 .. :try_end_1} :catch_0
.line 1380
:goto_1
:try_start_2
iget-object v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mShowKeyguardWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v0}, Landroid/os/PowerManager$WakeLock;->release()V
[COLOR="red"]const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchStateChanged:Z
[/COLOR]
.line 1381
monitor-exit p0
goto :goto_0
:catchall_0
move-exception v0
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
Code:
.end method
[COLOR="red"].method private resetTorchState()V
.locals 1
iget-boolean v0, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mTorchStateChanged:Z
if-eqz v0, :cond_0
const/4 v0, 0x0
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->handleSetTorch(Z)V
:cond_0
return-void
.end method
[/COLOR]
.method private showLocked()V
.locals 3
.prologue
.line 839
const-string v1, "KeyguardViewMediator"
Code:
const-string v1, "KeyguardViewMediator"
const-string v2, "done waiting for mWaitingUntilKeyguardVisible"
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
goto :goto_1
.end method
[COLOR="red"].method public setTorch(Z)V
.locals 5
const/16 v4, 0x14
const/4 v3, 0x0
iget-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mScreenOn:Z
if-eqz v1, :cond_0
iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mHandler:Landroid/os/Handler;
invoke-virtual {v1, v4}, Landroid/os/Handler;->removeMessages(I)V
iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mHandler:Landroid/os/Handler;
if-eqz p1, :cond_1
const/4 v2, 0x1
:goto_0
invoke-virtual {v1, v4, v2, v3}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v0
iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewMediator;->mHandler:Landroid/os/Handler;
invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
:cond_0
return-void
:cond_1
move v2, v3
goto :goto_0
.end method
[/COLOR]
.method public verifyUnlock(Landroid/view/WindowManagerPolicy$OnKeyguardExitResult;)V
.locals 2
.parameter "callback"
.prologue
.line 618
monitor-enter p0
Thats it for KeyguardViewMediator.smali. Save the file and close.
Continue to post 3.........
PART 3 android.policy.jar continues.......
Navigate to smali/com/android/internal/policy/impl/PhoneWindowManager.smali
Find the following code and add the parts in RED
Code:
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpKeyConsumedByScreenRecordChord:Z
move/from16 v40, v0
if-eqz v40, :cond_15
.line 2954
:cond_14
:goto_4
const/16 v40, 0x3
move/from16 v0, v21
move/from16 v1, v40
[COLOR="Red"] if-ne v0, v1, :cond_2c
[/COLOR]
.line 2956
if-eqz p1, :cond_17
invoke-interface/range {p1 .. p1}, Landroid/view/WindowManagerPolicy$WindowState;->getAttrs()Landroid/view/WindowManager$LayoutParams;
move-result-object v4
.line 2957
.local v4, attrs:Landroid/view/WindowManager$LayoutParams;
:goto_5
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomeDoubleClickBehavior:Z
move/from16 v40, v0
if-eqz v40, :cond_18
if-eqz v19, :cond_18
const/16 v25, 0x1
.line 2959
.local v25, mSupportDoubleClick:Z
Code:
st-string v40, "WindowManager"
const-string v41, "Ignoring HOME; event canceled."
invoke-static/range {v40 .. v41}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_9
.line 3031
.end local v13 #homeWasLongPressed:Z
:cond_21
[COLOR="Red"] if-eqz v4, :cond_26
[/COLOR]
.line 3032
iget v0, v4, Landroid/view/WindowManager$LayoutParams;->type:I
move/from16 v38, v0
.line 3033
.local v38, type:I
const/16 v40, 0x7d4
move/from16 v0, v38
move/from16 v1, v40
Code:
if-eq v0, v1, :cond_22
const/16 v40, 0x7d9
move/from16 v0, v38
move/from16 v1, v40
if-ne v0, v1, :cond_24
.line 9999
:cond_22
[COLOR="red"]move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mKeyguardMediator:Lcom/android/internal/policy/impl/KeyguardViewMediator;
move-object/from16 v40, v0
invoke-virtual/range {v40 .. v40}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->isShowingAndNotHidden()Z
move-result v40
if-eqz v40, :cond_23
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mKeyguardMediator:Lcom/android/internal/policy/impl/KeyguardViewMediator;
move-object/from16 v40, v0
move-object/from16 v0, v40
move v1, v9
invoke-virtual {v0, v1}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->setTorch(Z)V
rem-int/lit8 v40, v30, 0xf
if-nez v40, :cond_23
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mKeyguardMediator:Lcom/android/internal/policy/impl/KeyguardViewMediator;
move-object/from16 v40, v0
invoke-virtual/range {v40 .. v40}, Lcom/android/internal/policy/impl/KeyguardViewMediator;->pokeWakelock()V
[/COLOR]
if-eqz v25, :cond_23
const/16 v40, 0x7d9
move/from16 v0, v38
move/from16 v1, v40
if-ne v0, v1, :cond_23
.line 3038
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomeKeyDoubleClickConcept:Lcom/android/internal/policy/impl/PhoneWindowManager$HomeKeyDoubleClickConcept;
move-object/from16 v40, v0
invoke-virtual/range {v40 .. v40}, Lcom/android/internal/policy/impl/PhoneWindowManager$HomeKeyDoubleClickConcept;->setHomeDownEventSent()V
.line 3041
:cond_23
DELETE the line below in RED
Code:
invoke-virtual/range {v40 .. v40}, Lcom/android/internal/policy/impl/PhoneWindowManager$HomeKeyDoubleClickConcept;->setHomeDownEventSent()V
.line 3041
:cond_23
const-wide/16 v40, 0x0
goto/16 :goto_2
.line 3043
[COLOR="red"] :cond_24[/COLOR]
sget-object v40, Lcom/android/internal/policy/impl/PhoneWindowManager;->WINDOW_TYPES_WHERE_HOME_DOESNT_WORK:[I
move-object/from16 v0, v40
array-length v0, v0
move/from16 v39, v0
.line 3044
.local v39, typeCount:I
Here is a sort of tricky part. Starting right after the above code change you need to comb the rest of this entire method for all references to ":cond_X" and deccrement them by one. THERE ARE A LOT! Take your time and find them all. For example
Code:
:cond_33 becomes :cond_32
:cond_29 becomes :cond_28
:cond_40becomes :cond_3f
....etc. MAKE SURE YOU FIND THEM ALL! The last one you change should be from:cond_56 to :cond_55.
Thats it! Recompile everything and push!
Enjoy! Thanks Button !!
mine3.........
Alldone. I will try to get a flashable up soon.
Enjoy!
Flashable Zip added to the OP.
Notice, It will bork your home button from selecting recent apps. Not a big deal cause I dont use that anyway but i will fix it shortly.
So no go on VRBLI5? Or may it still work?
Will there be a version that has the hold to turn on feature?
nice work will try .
TokedUp said:
So no go on VRBLI5? Or may it still work?
Will there be a version that has the hold to turn on feature?
Click to expand...
Click to collapse
nothing for LI5 sorry. I like the new version not baving to hold the button so I have not really looked into going back to the other way, sorry.
Will this work on sgs3 omega v37.1
Sent from my GT-I9300 using xda app-developers app
thanks for your toturial.
but i have issue from last part.
Here is a sort of tricky part. Starting right after the above code change you need to comb the rest of this entire method for all references to ":cond_X" and deccrement them by one. THERE ARE A LOT! Take your time and find them all. For example
Code:
:cond_33 becomes :cond_32
:cond_29 becomes :cond_28
:cond_40becomes :cond_3f
....etc. MAKE SURE YOU FIND THEM ALL! The last one you change should be from:cond_56 to :cond_55.
Click to expand...
Click to collapse
i am starting to change the cond_xx decrement , but where to start?
for example on MR2, the last parameter is cond_26
invoke-virtual/range {v40 .. v40}, Lcom/android/internal/policy/impl/PhoneWindowManager$HomeKeyDoubleClickConcept;->setHomeDownEventSent()V
.line 3041
:cond_23
const-wide/16 v40, 0x0
goto/16 :goto_2
.line 3043
:cond_26
sget-object v40, Lcom/android/internal/policy/impl/PhoneWindowManager;->WINDOW_TYPES_WHERE_HOME_DOESNT_WORK:[I
move-object/from16 v0, v40
array-length v0, v0
move/from16 v39, v0
.line 3044
.local v39, typeCount:I
Click to expand...
Click to collapse
i should start from this numbers? (which cond_xx is for starting to decrement?)
cond_26 -> cond_25
cond_27 -> cond_26
.......
or start from cond_0 -> cond_?
thanks
Has anyone tried this with a SPRINT S3 ?
Just wanted to mention that this line is missing in LockScreenSettings.smali:
Code:
.field private mLockScreenTorch:Landroid/preference/CheckBoxPreference;
Can you POST here original android.policy.jar ?
It ease to see difference some times instead of instruction.
Thanks.
With some modifications, I managed to get this working on the SGS3 GT-i9300
I'll make a thread in their forums.
Kryten2k35 said:
With some modifications, I managed to get this working on the SGS3 GT-i9300
I'll make a thread in their forums.
Click to expand...
Click to collapse
Please link to it here!
Any idea if it will work on Sprint ?
Sent from my SPH-L710
Tried this on a t-mo gs3 & everything seemed to work fine but whenever I hold the home button down like to show recent apps and stuff nothing happens. Any idea why?
could someone help me with this??
Here is a sort of tricky part. Starting right after the above code change you need to comb the rest of this entire method for all references to ":cond_X" and deccrement them by one. THERE ARE A LOT! Take your time and find them all. For example???
didnt get it tbh
AskinSavascisi said:
could someone help me with this??
Here is a sort of tricky part. Starting right after the above code change you need to comb the rest of this entire method for all references to ":cond_X" and deccrement them by one. THERE ARE A LOT! Take your time and find them all. For example???
didnt get it tbh
Click to expand...
Click to collapse
you edit every cond_X by -1
so if say you are starting with cond_29 it becomes cond_28
then you will go down find a cond_28 that then becomes cond_27
go down a bit find cond_27 that then becomes cond_26
and so on until they are done.
andybones said:
you edit every cond_X by -1
so if say you are starting with cond_29 it becomes cond_28
then you will go down find a cond_28 that then becomes cond_27
go down a bit find cond_27 that then becomes cond_26
and so on until they are done.
Click to expand...
Click to collapse
ok thanks may i ask u another question :fingers-crossed:
Code:
packed-switch v2, :pswitch_data_0
.line 1267
:goto_0
:pswitch_0
return-void
but mine looks like:
Code:
packed-switch v2, :pswitch_data_72
.line 1172
:goto_7
[COLOR="Red"]:pswitch_0[/COLOR] -> do i need to keep this still 0 or make it 8? coz my pswitch_ lines starts from :pswitch_8
return-void
and this will look like this rigt?
Code:
:pswitch_data_72
.packed-switch 0x1
:pswitch_8 -> [COLOR="red"]9[/COLOR]
:pswitch_10 ->[COLOR="red"]11[/COLOR]
:pswitch_16 ->[COLOR="red"]17[/COLOR]
:pswitch_1c ->[COLOR="red"]1d[/COLOR]
:pswitch_22 ->[COLOR="red"]23[/COLOR]
:pswitch_28 ->[COLOR="red"]29[/COLOR]
:pswitch_2e ->[COLOR="red"]2f[/COLOR]
:pswitch_38 ->[COLOR="red"]39[/COLOR]
:pswitch_40 ->[COLOR="red"]41[/COLOR]
:pswitch_4c ->[COLOR="red"]4d[/COLOR]
:pswitch_52 ->[COLOR="red"]53[/COLOR]
:pswitch_58 ->[COLOR="red"]59[/COLOR]
:pswitch_64 ->[COLOR="Red"]65[/COLOR]
.end packed-switch
.end method
Multiple Lockscreen MOD
What does this MOD do?
-Add several new selectable lockscreens to the lockscreens options menu
-Acer Cloud Lockscreen
-Blackberry 10 Lockscreen
-HTC Sense Lockscreen
-LG Optimus Lockscreen
-AOSP Lockscreen
-Galaxy S3 Circle (stock) Lockscreen
-Removes the ripple option so there is no chance of lockups
I am sorry but making a flashable zip for this MOD is virtually impossible due to the framework differences from ROM to ROM. I am putting this out there to help DEVs incorporate it into their ROMs if they want to.
Thanks goes to Alliance team for their initial work on this MOD.
So lets get on with the guide....
First just let me say that parts of this MOD are a tedius process of looking up and matching IDs from the included files to the IDs in your framework-res IDs. I have done most of the leg work for you as you will see when you open the attached files. Every ID is accompanied with a hash tag and the name of the ID for you to easily look up in your framework-res/res/values/public. I will explain a little more when we get to that part.
Next you wlll find an attached zip file containing the necessary files for you to get this MOD up and running. They are
1. The "didact" folder
-this folder goes in android.policy.jar. Drop it in the "COM" folder. Once you drop it in you will then have 4 files in that folder. They are android, didact, samsung, vlingo.
2. The contents of the other files get dropped in the folders that the folder they are in are named.
-For example, the contents of the folder "framework_res_drawable-xhdpi", get put in framework-res/res/drawable-xhdmi
Once your done moving the files its time to get started.
Decompile framework-res
Navigate to res/values/attrs
add the following lines:
Code:
<attr name="rightChevronDrawable" format="reference" />
<attr name="topChevronDrawable" format="reference" />
<attr name="bottomChevronDrawable" format="reference" />
<attr name="hitRadius" format="dimension" />
<attr name="verticalOffset" format="dimension" />
<attr name="horizontalOffset" format="dimension" />
Navigate to res/values/dimens
add the following lines
Code:
<dimen name="multiwaveview_hit_radius">60.0dip</dimen>
<dimen name="multiwaveview_target_placement_radius">135.0dip</dimen>
<dimen name="multiwaveview_snap_margin">20.0dip</dimen>
<dimen name="htc_lockscreen_target_inset">25.0dip</dimen>
<dimen name="lg_keyguard_lockscreen_status_line_clockfont_top_margin">14.0dip</dimen>
<dimen name="lg_keyguard_lockscreen_status_line_font_size">14.0dip</dimen>
Navigate to res/values/ids
add the following lines
Code:
<item type="id" name="rotary">false</item>
<item type="id" name="status2">false</item>
<item type="id" name="timeDisplay">false</item>
<item type="id" name="status_box">false</item>
<item type="id" name="status_charging">false</item>
<item type="id" name="status_alarm">false</item>
<item type="id" name="status_calendar">false</item>
<item type="id" name="customMsg">false</item>
<item type="id" name="albumArt">false</item>
<item type="id" name="musicNowPlaying">false</item>
<item type="id" name="tab_selector2">false</item>
<item type="id" name="tab_selector">false</item>
<item type="id" name="rotary_selector">false</item>
<item type="id" name="ring_selector">false</item>
<item type="id" name="musicControlPlay">false</item>
<item type="id" name="musicControlPause">false</item>
<item type="id" name="musicControlPrevious">false</item>
<item type="id" name="musicControlNext">false</item>
<item type="id" name="gestures">false</item>
At this point you need to compile framework-res just as you normally would. Then immediately decompile it. The IDs for all the new files you just added will now be generated and we can move on to the next step.
Still in framework-res
Navigate to res/values/public
Leave the folder open in your editor.
Now android.policy.jar should be decompiled from when you dropped the files from the attached zip in it.
(in android.policy.jar) Navigate to smali/com/android/internal/policy/impl
Find the files you just copied in. If you want to move them to a temp folder while you do this next step thats fine too. You will need to go througheach file and find all the IDs (0x109014c) and look to the right to see what the ID represents. There will be a hashtag and the ID name to look for. It will look like this
Code:
0x109014c #keyguard_screen_bb_unlock
Copy "keyguard_screen_bb_unlock" and look it up in your already opened framework-res/public folder. If the ID matches whats already in the file great, if not, change it to the correct one. You will need to do this for all the new files placed in android.policy. Not all files will have IDs but carefully go through each one and make sure they are all correct.
Navigate to smali/com/android/internal/policy/impl/LockPatternKeyguardView.smali
Find the following method
Code:
.method createLockScreen()Landroid/view/View;
Replace the entire method with the following
Code:
.method createLockScreen()Landroid/view/View;
.locals 6
const/4 v2, 0x1
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_type_key"
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_0
const/4 v2, 0x2
if-eq v2, v0, :cond_1
const/4 v2, 0x3
if-eq v2, v0, :cond_2
const/4 v2, 0x4
if-eq v2, v0, :cond_3
const/4 v2, -0x1
if-eq v2, v0, :cond_4
const/4 v2, -0x2
if-eq v2, v0, :cond_5
iget-boolean v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mIsTabletDevice:Z
if-eqz v1, :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_0
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V
return-object v0
:cond_0
new-instance v0, Lcom/android/internal/policy/impl/AcerLockScreen;
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/AcerLockScreen;-><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/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_0
:cond_2
new-instance v0, Lcom/android/internal/policy/impl/BBLockScreen;
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/BBLockScreen;-><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_3
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_4
new-instance v0, Lcom/android/internal/policy/impl/HtcLockScreen;
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/HtcLockScreen;-><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/16 :goto_0
:cond_5
new-instance v0, Lcom/android/internal/policy/impl/LgLockScreen;
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/LgLockScreen;-><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
.end method
Now you are done with framework-res and android.policy.jar. Recompile both files and set them aside.
Go to the next post to continue......
Part TWO
Decompile SecSettings.apk
Navigate to res/values/arrays
Add the followin lines
Code:
<string-array name="lockscreen_entries">
<item>Acer Cloud</item>
<item>Galaxy SIII Ripple/Circle</item>
<item>BlackBerry 10</item>
<item>AOSP LockScreen</item>
<item>HTC Sense 4.0</item>
<item>LG Optimus</item>
</string-array>
<string-array name="lockscreen_values">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>-1</item>
<item>-2</item>
</string-array>
Navigate to res/xml/lockscreen_settings.xml
Replace all the code with the following
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/lock_screen"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<ListPreference android:persistent="true" android:entries="@array/lockscreen_entries" android:title="Choose Your LockScreen" android:key="lockscreen_type_key" android:defaultValue="1" android:entryValues="@array/lockscreen_values" />
<CheckBoxPreference android:title="@string/enable_lockscreen_torch" android:key="enable_lockscreen_torch" android:summary="@string/enable_lockscreen_torch_text" />
<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>
<SwitchPreferenceScreen android:title="@string/information_ticker" android:key="information_ticker" android:summary="@string/information_ticker_summary" android:fragment="com.android.settings.InformationTicker" />
<CheckBoxPreference android:title="@string/clock" android:key="clock" android:summary="@string/clock_summary" />
<SwitchPreferenceScreen android:title="@string/dualclock_settings_title" android:key="dualclock_settings" android:summary="@string/dualclock_settings_summary" android:dependency="clock" android:fragment="com.android.settings.dualclock.DualClockSetting" />
<SwitchPreferenceScreen android:title="@string/weather" android:key="weather" android:summary="@string/weather_summary" />
<CheckBoxPreference android:title="@string/ripple_effect" android:key="ripple_effect" android:summary="@string/ripple_effect_summary" />
<PreferenceScreen android:title="@string/ink_effect" android:key="ink_effect">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.InkeffectPreview" />
</PreferenceScreen>
<CheckBoxPreference android:title="@string/help_text_title" android:key="help_text" android:summary="@string/help_text_summary" />
<PreferenceCategory android:title="@string/features_category_title" android:key="feature_category" />
<SwitchPreferenceScreen android:title="@string/motion_camera_short_cut_title" android:key="camera_short_cut" android:summary="@string/motion_camera_short_cut_summary" android:fragment="com.android.settings.motion.MotionView">
<extra android:name="title" android:value="@string/motion_camera_short_cut_title" />
<extra android:name="sensitivity" android:value="false" />
</SwitchPreferenceScreen>
<CheckBoxPreference android:title="@string/samsung_unlock_option_say_your_wakeup_command_to_unlock_screen" android:key="say_your_wakeup" android:summary="@string/wakeup_in_lockscreen_summary" />
<PreferenceScreen android:title="@string/samsung_unlock_option_set_wakeup_command" android:key="set_wakeup_command">
<intent android:action="android.intent.action.VOICE_SETTING_SET_WAKEUP_COMMAND" />
</PreferenceScreen>
</PreferenceScreen>
Navigate to smali/com/android/settings/LockScreenSettings.smali
Add the following code at the top of the file
Code:
.field private mLockScreenStylePref:Landroid/preference/ListPreference;
Find the following method
Code:
.method private updateState()V
Replace the entire method with the following code
Code:
.method private updateState()V
.locals 9
.prologue
const/4 v5, 0x1
const/4 v6, 0x0
.line 263
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenTorch:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "enable_lockscreen_torch"
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_12
move v4, v5
:goto_0
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
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"
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
:goto_1
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
const-string v7, "aw_daemon_service_key_app_service_status"
invoke-static {v4, v7, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
and-int/lit8 v2, v4, 0x1
.line 267
.local v2, mAppLockScreen:I
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v7, "pen_hovering_ink_effect"
invoke-static {v4, v7, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
.line 269
.local v3, mInkEffectColor:I
const-string v4, "LockScreenSettings"
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "mInkEffectColor : "
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
invoke-static {v4, v7}, Landroid/util/secutil/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I
.line 271
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
if-eqz v4, :cond_0
.line 272
if-ne v2, v5, :cond_8
.line 273
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v4, v5}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
.line 278
:cond_0
:goto_2
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mDualclock:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "dualclock_menu_settings"
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_9
move v4, v5
:goto_3
invoke-virtual {v7, v4}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
.line 279
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
if-eqz v4, :cond_1
.line 280
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "information_ticker"
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_a
move v4, v5
:goto_4
invoke-virtual {v7, v4}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
.line 282
:cond_1
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
if-eqz v4, :cond_2
.line 283
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "motion_unlock_camera_short_cut"
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_b
move v4, v5
:goto_5
invoke-virtual {v7, v4}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
.line 286
:cond_2
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v7, "lockscreen_wallpaper"
invoke-static {v4, v7, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-ne v4, v5, :cond_c
move v0, v6
.line 287
.local v0, isLiveWallpaper:Z
:goto_6
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v7, "lock_motion_tilt_to_unlock"
invoke-static {v4, v7, v6}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
.line 289
.local v1, isMotionLock:I
if-nez v0, :cond_3
if-lez v1, :cond_d
.line 290
:cond_3
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
invoke-virtual {v4, v6}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V
.line 293
:goto_7
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "lockscreen_ripple_effect"
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_e
move v4, v5
:goto_8
invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v7, "lockscreen_type_key"
invoke-static {v4, v7, v6}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const/4 v0, 0x1
if-eq v1, v0, :cond_13
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
invoke-virtual {v4, v6}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V
invoke-virtual {v4, v6}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
:goto_9
:goto_a
.line 294
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
invoke-virtual {v7}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v7
invoke-virtual {v4, v7}, Landroid/preference/PreferenceScreen;->setEnabled(Z)V
.line 295
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v7
iget-object v8, p0, Lcom/android/settings/LockScreenSettings;->mInkEffectSummary:[I
aget v8, v8, v3
invoke-virtual {v7, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v7
invoke-virtual {v4, v7}, Landroid/preference/PreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V
.line 297
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mHelpText:Landroid/preference/CheckBoxPreference;
if-eqz v4, :cond_4
.line 298
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mHelpText:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "unlock_text"
invoke-static {v4, v8, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-eqz v4, :cond_f
move v4, v5
:goto_b
invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 300
:cond_4
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
if-eqz v4, :cond_5
.line 301
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "wake_up_lock_screen"
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_10
move v4, v5
:goto_c
invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 304
:cond_5
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
if-eqz v4, :cond_6
.line 305
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v7
const-string v8, "lock_screen_shortcut"
invoke-static {v7, v8, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v7
if-ne v7, v5, :cond_11
:goto_d
invoke-virtual {v4, v5}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
.line 308
:cond_6
return-void
.end local v0 #isLiveWallpaper:Z
.end local v1 #isMotionLock:I
.end local v2 #mAppLockScreen:I
.end local v3 #mInkEffectColor:I
:cond_7
move v4, v6
.line 263
goto/16 :goto_1
.line 275
.restart local v2 #mAppLockScreen:I
.restart local v3 #mInkEffectColor:I
:cond_8
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v4, v6}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
goto/16 :goto_2
:cond_9
move v4, v6
.line 278
goto/16 :goto_3
:cond_a
move v4, v6
.line 280
goto/16 :goto_4
:cond_b
move v4, v6
.line 283
goto/16 :goto_5
:cond_c
move v0, v5
.line 286
goto/16 :goto_6
.line 292
.restart local v0 #isLiveWallpaper:Z
.restart local v1 #isMotionLock:I
:cond_d
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
invoke-virtual {v4, v5}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V
goto/16 :goto_7
:cond_e
move v4, v6
.line 293
goto :goto_8
:cond_f
move v4, v6
.line 298
goto :goto_b
:cond_10
move v4, v6
.line 301
goto :goto_c
:cond_11
move v5, v6
.line 305
goto :goto_d
:cond_12
move v4, v6
.line 263
goto/16 :goto_0
:cond_13
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
invoke-virtual {v4, v5}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V
invoke-virtual {v4, v5}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
goto/16 :goto_9
:cond_14
move v4, v6
goto/16 :goto_a
.end method
Go to the next post to continue.....
Part Three (last part)
Find the following method
Code:
.method public onCreate(Landroid/os/Bundle;)V
Replace the entire method with the following code
Code:
.method public onCreate(Landroid/os/Bundle;)V
.locals 13
.parameter "savedInstanceState"
.prologue
.line 139
invoke-super {p0, p1}, Lcom/android/settings/SettingsPreferenceFragment;->onCreate(Landroid/os/Bundle;)V
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
move-result-object v9
invoke-virtual {v9}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v6
.line 142
.local v6, resolver:Landroid/content/ContentResolver;
new-instance v9, Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
move-result-object v10
invoke-direct {v9, v10}, Lcom/android/internal/widget/LockPatternUtils;-><init>(Landroid/content/Context;)V
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
.line 144
const v9, 0x7f070036
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->addPreferencesFromResource(I)V
const-string v9, "lockscreen_type_key"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/ListPreference;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenStylePref:Landroid/preference/ListPreference;
const-string v9, "lockscreen_type_key"
const/4 v11, 0x0
invoke-static {v6, v9, v11}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v9
iget-object v12, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenStylePref:Landroid/preference/ListPreference;
invoke-static {v9}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v11
invoke-virtual {v12, v11}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v12, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenStylePref:Landroid/preference/ListPreference;
invoke-virtual {v12, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
.line 147
const-string v9, "lock_screen_shortcut"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/SwitchPreferenceScreen;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
.line 148
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
.line 149
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
const-string v9, "lock_screen_shortcut"
const/4 v11, 0x0
invoke-static {v6, v9, v11}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v9
const/4 v11, 0x1
if-ne v9, v11, :cond_e
const/4 v9, 0x1
:goto_0
invoke-virtual {v10, v9}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
.line 150
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
if-eqz v9, :cond_0
.line 151
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z
move-result v9
if-eqz v9, :cond_0
.line 153
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 158
:cond_0
const-string v9, "clock"
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;->mClock:Landroid/preference/CheckBoxPreference;
.line 159
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
const-string v9, "enable_lockscreen_torch"
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;->mLockScreenTorch:Landroid/preference/CheckBoxPreference;
.line 159
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenTorch:Landroid/preference/CheckBoxPreference;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setPersistent(Z)V
.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
check-cast v9, Landroid/preference/SwitchPreferenceScreen;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
.line 162
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
.line 163
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v9
const v10, 0x1110048
invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getBoolean(I)Z
move-result v9
iput-boolean v9, p0, Lcom/android/settings/LockScreenSettings;->isWeatherEnabled:Z
.line 164
iget-boolean v9, p0, Lcom/android/settings/LockScreenSettings;->isWeatherEnabled:Z
if-nez v9, :cond_1
.line 165
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 169
:cond_1
const-string v9, "dualclock_settings"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/SwitchPreferenceScreen;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mDualclock:Landroid/preference/SwitchPreferenceScreen;
.line 170
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mDualclock:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
.line 172
const-string v9, "information_ticker"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/SwitchPreferenceScreen;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
.line 173
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
.line 175
invoke-static {}, Lcom/android/settings/Utils;->isChinaModel()Z
move-result v9
if-eqz v9, :cond_10
.line 176
const-string v9, "CHM"
const-string v10, "ro.csc.sales_code"
invoke-static {v10}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v9
if-eqz v9, :cond_f
.line 177
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v10
const v11, 0x7f0909bf
invoke-virtual {v10, v11}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Landroid/preference/SwitchPreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V
.line 186
:goto_1
invoke-static {}, Lcom/sec/android/app/CscFeature;->getInstance()Lcom/sec/android/app/CscFeature;
move-result-object v9
const-string v10, "CscFeature_Setting_RemoveMenuInLockScreenTicker"
invoke-virtual {v9, v10}, Lcom/sec/android/app/CscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 187
.local v0, ContentsTypeFeature:Ljava/lang/String;
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
if-eqz v9, :cond_2
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v9
const v10, 0x1110046
invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getBoolean(I)Z
move-result v9
if-eqz v9, :cond_11
:cond_2
invoke-static {}, Lcom/android/settings/Utils;->isDomesticModel()Z
move-result v9
if-nez v9, :cond_11
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z
move-result v9
if-nez v9, :cond_11
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v9
if-nez v9, :cond_3
const-string v9, "-1"
invoke-virtual {v9, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v9
if-nez v9, :cond_11
.line 197
:cond_3
:goto_2
const-string v9, "camera_short_cut"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/SwitchPreferenceScreen;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
.line 198
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
if-eqz v9, :cond_5
.line 199
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
.line 200
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
move-result-object v9
invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v9
if-nez v9, :cond_4
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z
move-result v9
if-eqz v9, :cond_5
.line 202
:cond_4
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 207
:cond_5
invoke-static {}, Lcom/android/settings/Utils;->isDomesticModel()Z
move-result v9
if-nez v9, :cond_6
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
move-result-object v9
invoke-static {v9}, Lcom/android/settings/Utils;->isWifiOnly(Landroid/content/Context;)Z
move-result v9
if-eqz v9, :cond_7
.line 209
:cond_6
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mDualclock:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 210
const-string v9, "LockScreenSettings"
const-string v10, " remove Dualclock menu"
invoke-static {v9, v10}, Landroid/util/secutil/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I
.line 213
:cond_7
const-string v9, "ripple_effect"
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;->mRippleEffect:Landroid/preference/CheckBoxPreference;
.line 214
const-string v9, "ja"
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v10
invoke-virtual {v10}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
move-result-object v10
iget-object v10, v10, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;
invoke-virtual {v10}, Ljava/util/Locale;->getLanguage()Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v9
if-eqz v9, :cond_12
const-string v1, ""
.line 215
.local v1, dot:Ljava/lang/String;
:goto_3
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
new-instance v10, Ljava/lang/StringBuilder;
invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v11
const v12, 0x7f090cdc
invoke-virtual {v11, v12}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v11
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {v10, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v11
const v12, 0x7f090d26
invoke-virtual {v11, v12}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v11
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setSummary(Ljava/lang/CharSequence;)V
.line 217
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v9
const-string v10, "pen_hovering_ink_effect"
const/4 v11, 0x0
invoke-static {v9, v10, v11}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
.line 218
.local v3, mInkEffectColor:I
const-string v9, "ink_effect"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/PreferenceScreen;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;
.line 219
const-string v9, "help_text"
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;->mHelpText:Landroid/preference/CheckBoxPreference;
.line 220
const-string v9, "say_your_wakeup"
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;->mSayCommand:Landroid/preference/CheckBoxPreference;
.line 223
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
if-eqz v9, :cond_8
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
move-result-object v9
invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v9
if-eqz v9, :cond_8
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v9
const v10, 0x1110049
invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getBoolean(I)Z
move-result v9
if-eqz v9, :cond_9
:cond_8
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z
move-result v9
if-eqz v9, :cond_a
.line 225
:cond_9
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 229
:cond_a
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v5
.line 230
.local v5, ps:Landroid/preference/PreferenceScreen;
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;
invoke-virtual {v5, v9}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 234
const-string v9, "set_wakeup_command"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v7
check-cast v7, Landroid/preference/PreferenceScreen;
.line 235
.local v7, setWakeupCommand:Landroid/preference/PreferenceScreen;
if-eqz v7, :cond_d
.line 236
invoke-virtual {v7}, Landroid/preference/PreferenceScreen;->getIntent()Landroid/content/Intent;
move-result-object v8
.line 237
.local v8, set_wakeup_commant_intent:Landroid/content/Intent;
if-eqz v8, :cond_d
.line 238
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
move-result-object v9
invoke-virtual {v9}, Landroid/app/Activity;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v4
.line 239
.local v4, pm:Landroid/content/pm/PackageManager;
const/4 v9, 0x0
invoke-virtual {v4, v8, v9}, Landroid/content/pm/PackageManager;->queryIntentActivities(Landroid/content/Intent;I)Ljava/util/List;
move-result-object v2
.line 240
.local v2, list:Ljava/util/List;,"Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
invoke-interface {v2}, Ljava/util/List;->size()I
move-result v9
const/4 v10, 0x1
if-ge v9, v10, :cond_d
.line 241
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
if-eqz v9, :cond_b
.line 242
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 243
:cond_b
if-eqz v7, :cond_c
.line 244
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
invoke-virtual {v9, v7}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 246
:cond_c
const/4 v9, 0x0
invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v9
if-eqz v9, :cond_d
.line 247
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v10
const-string v9, "feature_category"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/PreferenceCategory;
invoke-virtual {v10, v9}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 253
.end local v2 #list:Ljava/util/List;,"Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
.end local v4 #pm:Landroid/content/pm/PackageManager;
.end local v8 #set_wakeup_commant_intent:Landroid/content/Intent;
:cond_d
return-void
.line 149
.end local v0 #ContentsTypeFeature:Ljava/lang/String;
.end local v1 #dot:Ljava/lang/String;
.end local v3 #mInkEffectColor:I
.end local v5 #ps:Landroid/preference/PreferenceScreen;
.end local v7 #setWakeupCommand:Landroid/preference/PreferenceScreen;
:cond_e
const/4 v9, 0x0
goto/16 :goto_0
.line 179
:cond_f
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v10
const v11, 0x7f0909be
invoke-virtual {v10, v11}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Landroid/preference/SwitchPreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V
goto/16 :goto_1
.line 182
:cond_10
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
move-result-object v10
const v11, 0x7f0909bd
invoke-virtual {v10, v11}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Landroid/preference/SwitchPreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V
goto/16 :goto_1
.line 193
.restart local v0 #ContentsTypeFeature:Ljava/lang/String;
:cond_11
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v9
iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
goto/16 :goto_2
.line 214
:cond_12
const-string v1, ". "
goto/16 :goto_3
.end method
Recompile SecSettings and push all files.
Enjoy!
Thanks for your contribution didact74. You sir are truly helping the community!
Sent from my SCH-I605 using Tapatalk 2
You sir.. are a machine!! Thank you for sharing so many great mods with the community!!
Thanks again Didact, your quite the boss!!!
I hated you in Halo 4.
Your Mod, however, is awesome. I thank you
Haha funny to scroll through and see all the winky faces because of the code.
Thank you for this.
How ever I guess I missed the purpose of this as it must be the base and not compatible with all ROMs yet. Haha glad I didn't read the op.....
Figured it out real quick when it aborted every time.
Love to see this on clean ROM
sent from that young galaxy on clean ROM!
You are the best!! I ve been locking for this very time, and now I will port to S2. Thanks
c'mon guy only 12 "thanks"!? this man is a beast providing his free time, the least we can do is hit that thanks button to show some appreciation.
andybones said:
c'mon guy only 12 "thanks"!? this man is a beast providing his free time, the least we can do is hit that thanks button to show some appreciation.
Click to expand...
Click to collapse
Damn straight, such a boss didact is
I'm not to the level to be able to successfully port these types of tutorials yet but I still wanted to say how much I appreciate what you do! I look over your code daily. One day I'll be able to do more but right now I'm still learning.
Thanks a lot man!
Sent from my ASUS Transformer Pad TF700T using xda app-developers app
Thanks for the thanks!
Keep an eye out in the next few hours....got a new MOD coming I know you all will enjoy!
Didact74 said:
Thanks for the thanks!
Keep an eye out in the next few hours....got a new MOD coming I know you all will enjoy!
Click to expand...
Click to collapse
Hell yes such a boss
Sent from my SCH-I605 using xda premium
I'm having issues porting this to SGS2. Are there any differences in how to for s3 and how to for s2? Thanks!
rompnit said:
You sir.. are a machine!! Thank you for sharing so many great mods with the community!!
Click to expand...
Click to collapse
i agree 100% with this statement. and your wife's statement. lol great work, i get a headache just reading all that code.
phenomarc said:
I'm having issues porting this to SGS2. Are there any differences in how to for s3 and how to for s2? Thanks!
Click to expand...
Click to collapse
What are the issues you are having? Won't build? No arrays? Fcs? Etc?
Sent from my SPH-L710 using xda app-developers app
rompnit said:
What are the issues you are having? Won't build? No arrays? Fcs? Etc?
Sent from my SPH-L710 using xda app-developers app
Click to expand...
Click to collapse
When I flash the mod, I can't unlock the phone and the lockscreen settings FC. The clock in lockscreen has changed but I can't unlock. I' ve seen the files to mod in the alliance Rom for S2 and there are differences between this guide and the files. Thanks!
I am in a similar situation. The default lockscreen for the mod (see 2nd screenshot on OP) works fine, but lockscreen settings FC's.
I did notice a few things while working on this mod.
There were two strings missing when I tried to compile SecSettings.apk (enable_lockscreen_torch and enable_lockscreen_torch_text).
These missing strings are for lockscreen_settings.xml from this code:
Code:
<CheckBoxPreference android:title="@string/enable_lockscreen_torch" android:key="enable_lockscreen_torch" android:summary="@string/enable_lockscreen_torch_text" />
I am guessing that this line assumes you have the lockscreen torch mod already on your device since it is not included in this mod.
But whether I added the missing strings or removed the code from the code box above lockscreen settings still FC's.
Need to play with this some more....
(Don't get me wrong, I am not complaining. I want to get his bad boy working!)
Edit:
The line of code in green should be added to lockscreen_settings.xml and the line of code in red should be deleted (or made invisible) unless you already have the lockscreen torch mod:
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/lock_screen"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
[COLOR="Green"]<PreferenceCategory android:title="@string/display_settings" />[/COLOR]
<ListPreference android:persistent="true" android:entries="@array/lockscreen_entries" android:title="Choose Your LockScreen" android:key="lockscreen_type_key" android:defaultValue="1" android:entryValues="@array/lockscreen_values" />
[COLOR="Red"]<CheckBoxPreference android:title="@string/enable_lockscreen_torch" android:key="enable_lockscreen_torch" android:summary="@string/enable_lockscreen_torch_text" />[/COLOR]
<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>
ETC...
These are the missing strings I mentioned earlier:
Code:
<string name="enable_lockscreen_torch">Lockscreen Torch</string>
<string name="enable_lockscreen_torch_text">Enable torch through lockscreen</string>
For settings to be FC'ing your issue is in LockScreenSettings.smali.
Start simple.......
Begin with SecSettings. Make no alterations to android.policy yet.
Add everything EXCEPT the smali changes to SecSettings first. Push SecSettings to your phone and verify you have the menus and everything is there. You should be able to click the lockscreen options but they wont be functional until you add the smali code.
Next, add the changes needed to android.policy. Push android policy to the phone and check everything again. The MOD still wont be functional but you should not get any FC's.
Lastly, add the smali code to SecSettings. If your working wiht a different carrier you must make sure to change the registers accordingly.
If your still having issues post up your OnCreate and OnPreferenceChange methods here using the hide tags and we can tke a look to see where the issues may be.
This is a how to add quick pin unlock and scramble pad to lollipop. It has been tested and working on s5, s6, note 3 and possibly note 4.
This is a guide for people to add it themselves, not for people to upload their files and expect it done for them. It does require the ability to decompile and compile apks and is done with making a toggle for it in custom settings which can be found in this great thread here so it can be toggled on or off depending on what people want to use.
For this mod we will be modifying SystemUI from system/priv-app. It requires 3 files to be modified and 2 to be added which are attached to this post.
Download and extract the attached zip and place the two smali files into
Code:
com/android/keyguard/
in the same folder com/android/keyguard/ look for these 3 files which we will need to modify for this.
KeyguardPINView.smali
PasswordTextView.smali
NumPadKey.smali
Lets start with NumPadKey.smali
look for this method which should be near the top
Code:
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
and look for the following section of code in that method
Code:
iget-object v5, p0, Lcom/android/keyguard/NumPadKey;->mContext:Landroid/content/Context;
sget v6, Lcom/android/keyguard/R$drawable;->lock_ripple_drawable:I
invoke-virtual {v5, v6}, Landroid/content/Context;->getDrawable(I)Landroid/graphics/drawable/Drawable;
above the iget we will add this line
Code:
invoke-direct {p0}, Lcom/android/keyguard/NumPadKey;->updateText()V
so it should look something like this
Code:
invoke-direct {p0}, Lcom/android/keyguard/NumPadKey;->updateText()V
iget-object v5, p0, Lcom/android/keyguard/NumPadKey;->mContext:Landroid/content/Context;
sget v6, Lcom/android/keyguard/R$drawable;->lock_ripple_drawable:I
invoke-virtual {v5, v6}, Landroid/content/Context;->getDrawable(I)Landroid/graphics/drawable/Drawable;
Now look for the following line
Code:
# virtual methods
and add this whole method above it
Code:
.method private updateText()V
.locals 4
.prologue
.line 122
iget v2, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
if-ltz v2, :cond_1
.line 123
iget-object v2, p0, Lcom/android/keyguard/NumPadKey;->mDigitText:Landroid/widget/TextView;
iget v3, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
invoke-static {v3}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 124
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
if-nez v2, :cond_0
.line 125
invoke-virtual {p0}, Lcom/android/keyguard/NumPadKey;->getResources()Landroid/content/res/Resources;
move-result-object v2
sget v3, Lcom/android/keyguard/R$array;->lockscreen_num_pad_klondike:I
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;
move-result-object v2
sput-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
.line 127
:cond_0
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
if-eqz v2, :cond_1
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
array-length v2, v2
iget v3, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
if-le v2, v3, :cond_1
.line 128
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
iget v3, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
aget-object v0, v2, v3
.line 129
.local v0, "klondike":Ljava/lang/String;
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v1
.line 130
.local v1, "len":I
if-lez v1, :cond_2
.line 131
iget-object v2, p0, Lcom/android/keyguard/NumPadKey;->mKlondikeText:Landroid/widget/TextView;
invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 137
.end local v0 # "klondike":Ljava/lang/String;
.end local v1 # "len":I
:cond_1
:goto_0
return-void
.line 133
.restart local v0 # "klondike":Ljava/lang/String;
.restart local v1 # "len":I
:cond_2
iget-object v2, p0, Lcom/android/keyguard/NumPadKey;->mKlondikeText:Landroid/widget/TextView;
const/4 v3, 0x4
invoke-virtual {v2, v3}, Landroid/widget/TextView;->setVisibility(I)V
goto :goto_0
.end method
Now anywhere under the virtual method line add the following whole method. It can be right at the end of the smali if want, thats where I usually add it
Code:
.method public setDigit(I)V
.locals 0
.param p1, "digit" # I
.prologue
.line 117
iput p1, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
.line 118
invoke-direct {p0}, Lcom/android/keyguard/NumPadKey;->updateText()V
.line 119
return-void
.end method
That it for that smali and move onto the next
so now we will modify PasswordTextView.smali.
at the start of this file you will see
Code:
# annotations
To this annotation
Code:
.annotation system Ldalvik/annotation/MemberClasses;
we will add the following
Code:
Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
so it will look like this for example. Note some devices may have more values there, do not remove and values just ass the quick unlock listener value
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/keyguard/PasswordTextView$CharState;,
Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
}
.end annotation
now also up the top look for
Code:
# instance fields
and add the following field below that
Code:
.field protected mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
now find the following method
Code:
.method public append(C)V
and in it look for the following section of code
Code:
:cond_1
invoke-direct {p0}, Lcom/android/keyguard/PasswordTextView;->userActivity()V
.line 296
const-wide/16 v4, 0x0
invoke-direct {p0, v4, v5}, Lcom/android/keyguard/PasswordTextView;->showAndHideHint(J)V
and add this below it
Code:
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
if-eqz v4, :cond_next
.line 215
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
iget-object v5, p0, Lcom/android/keyguard/PasswordTextView;->mText:Ljava/lang/String;
invoke-interface {v4, v5}, Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;->onValidateQuickUnlock(Ljava/lang/String;)V
:cond_next
return-void
so it looks like this for example
Code:
:cond_1
invoke-direct {p0}, Lcom/android/keyguard/PasswordTextView;->userActivity()V
const-wide/16 v4, 0x0
invoke-direct {p0, v4, v5}, Lcom/android/keyguard/PasswordTextView;->showAndHideHint(J)V
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
if-eqz v4, :cond_next
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
iget-object v5, p0, Lcom/android/keyguard/PasswordTextView;->mText:Ljava/lang/String;
invoke-interface {v4, v5}, Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;->onValidateQuickUnlock(Ljava/lang/String;)V
:cond_next
return-void
goto :goto_0
.end local v0 # "charState":Lcom/android/keyguard/PasswordTextView$CharState;
:cond_2
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mTextChars:Ljava/util/ArrayList;
add-int/lit8 v5, v1, -0x1
invoke-virtual {v4, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
then at the end of the smali add this whole method
Code:
.method public setQuickUnlockListener(Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;)V
.locals 0
.param p1, "listener" # Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
.prologue
.line 101
iput-object p1, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
.line 102
return-void
.end method
Now we move on to the final smali KeyguardPINView.smali
look for this at the top
Code:
# static fields
and add the following field
Code:
.field private static sNumbers:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List",
"<",
"Ljava/lang/Integer;",
">;"
}
.end annotation
.end field
also under this line
Code:
# instance fields
you may need to add the following line if it is not present already. It already exists on s5 and note 3 but needs to be added for s6. So if it is not there then add it
Code:
.field private mDivider:Landroid/view/View;
now look for
Code:
# direct methods
which should be not far from the above added lines and add the following constructor method
Code:
.method static constructor <clinit>()V
.locals 7
.prologue
const/4 v6, 0x4
const/4 v5, 0x3
const/4 v4, 0x2
const/4 v2, 0x1
const/4 v3, 0x0
.line 48
const/16 v0, 0xa
new-array v0, v0, [Ljava/lang/Integer;
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v3
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v2
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v4
invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v5
const/4 v1, 0x5
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v6
const/4 v1, 0x5
const/4 v2, 0x6
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/4 v1, 0x6
const/4 v2, 0x7
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/4 v1, 0x7
const/16 v2, 0x8
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/16 v1, 0x8
const/16 v2, 0x9
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/16 v1, 0x9
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
invoke-static {v0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
move-result-object v0
sput-object v0, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
return-void
.end method
look for this access
Code:
.method static synthetic access$000(Lcom/android/keyguard/KeyguardPINView;Z)V
and add the following two methods below that method
Code:
.method static synthetic access$100(Lcom/android/keyguard/KeyguardPINView;Ljava/lang/String;)V
.locals 0
.param p0, "x0" # Lcom/android/keyguard/KeyguardPINView;
.param p1, "x1" # Ljava/lang/String;
.prologue
.line 37
invoke-direct {p0, p1}, Lcom/android/keyguard/KeyguardPINView;->validateQuickUnlock(Ljava/lang/String;)V
return-void
.end method
Code:
.method private validateQuickUnlock(Ljava/lang/String;)V
.locals 3
.param p1, "password" # Ljava/lang/String;
.prologue
const/4 v2, 0x1
.line 198
if-eqz p1, :cond_0
.line 199
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
const/4 v1, 0x3
if-le v0, v1, :cond_0
iget-object v0, p0, Lcom/android/keyguard/KeyguardPINView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {v0, p1}, Lcom/android/internal/widget/LockPatternUtils;->checkPassword(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_0
.line 201
iget-object v0, p0, Lcom/android/keyguard/KeyguardPINView;->mCallback:Lcom/android/keyguard/KeyguardSecurityCallback;
invoke-interface {v0, v2}, Lcom/android/keyguard/KeyguardSecurityCallback;->reportUnlockAttempt(Z)V
.line 202
iget-object v0, p0, Lcom/android/keyguard/KeyguardPINView;->mCallback:Lcom/android/keyguard/KeyguardSecurityCallback;
invoke-interface {v0, v2}, Lcom/android/keyguard/KeyguardSecurityCallback;->dismiss(Z)V
.line 203
invoke-virtual {p0, v2}, Lcom/android/keyguard/KeyguardPINView;->resetPasswordText(Z)V
.line 206
:cond_0
return-void
.end method
now look for this method
Code:
.method protected onFinishInflate()V
and replace the whole method with this one
Code:
.method protected onFinishInflate()V
.locals 12
.prologue
const/4 v9, 0x1
const/4 v10, 0x0
.line 77
invoke-super {p0}, Lcom/android/keyguard/KeyguardPinBasedInputView;->onFinishInflate()V
.line 78
sget v8, Lcom/android/keyguard/R$id;->keyguard_bouncer_frame:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mKeyguardBouncerFrame:Landroid/view/ViewGroup;
.line 79
sget v8, Lcom/android/keyguard/R$id;->row0:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow0:Landroid/view/ViewGroup;
.line 80
sget v8, Lcom/android/keyguard/R$id;->row1:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow1:Landroid/view/ViewGroup;
.line 81
sget v8, Lcom/android/keyguard/R$id;->row2:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow2:Landroid/view/ViewGroup;
.line 82
sget v8, Lcom/android/keyguard/R$id;->row3:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow3:Landroid/view/ViewGroup;
.line 83
sget v8, Lcom/android/keyguard/R$id;->divider:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mDivider:Landroid/view/View;
.line 85
invoke-virtual {p0}, Lcom/android/keyguard/KeyguardPINView;->getContext()Landroid/content/Context;
move-result-object v8
invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v8
const-string v11, "lockscreen_quick_unlock_control"
invoke-static {v8, v11, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v8
if-ne v8, v9, :cond_1
move v4, v9
.line 88
.local v4, "quickUnlock":Z
:goto_0
invoke-virtual {p0}, Lcom/android/keyguard/KeyguardPINView;->getContext()Landroid/content/Context;
move-result-object v8
invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v8
const-string v11, "lockscreen_scramble_pin_layout"
invoke-static {v8, v11, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v8
if-ne v8, v9, :cond_2
move v5, v9
.line 91
.local v5, "scramblePin":Z
:goto_1
if-eqz v5, :cond_5
.line 92
sget-object v8, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
invoke-static {v8}, Ljava/util/Collections;->shuffle(Ljava/util/List;)V
.line 94
sget v8, Lcom/android/keyguard/R$id;->keyguard_bouncer_frame:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/LinearLayout;
.line 95
.local v0, "bouncer":Landroid/widget/LinearLayout;
new-instance v7, Ljava/util/ArrayList;
invoke-direct {v7}, Ljava/util/ArrayList;-><init>()V
.line 96
.local v7, "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
const/4 v1, 0x0
.local v1, "i":I
:goto_2
invoke-virtual {v0}, Landroid/widget/LinearLayout;->getChildCount()I
move-result v8
if-ge v1, v8, :cond_4
.line 97
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
move-result-object v8
instance-of v8, v8, Landroid/widget/LinearLayout;
if-eqz v8, :cond_3
.line 98
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
move-result-object v3
check-cast v3, Landroid/widget/LinearLayout;
.line 99
.local v3, "nestedLayout":Landroid/widget/LinearLayout;
const/4 v2, 0x0
.local v2, "j":I
:goto_3
invoke-virtual {v3}, Landroid/widget/LinearLayout;->getChildCount()I
move-result v8
if-ge v2, v8, :cond_3
.line 100
invoke-virtual {v3, v2}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
move-result-object v6
.line 101
.local v6, "view":Landroid/view/View;
invoke-virtual {v6}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v8
const-class v9, Lcom/android/keyguard/NumPadKey;
if-ne v8, v9, :cond_0
.line 102
check-cast v6, Lcom/android/keyguard/NumPadKey;
.end local v6 # "view":Landroid/view/View;
invoke-interface {v7, v6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 99
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_3
.end local v0 # "bouncer":Landroid/widget/LinearLayout;
.end local v1 # "i":I
.end local v2 # "j":I
.end local v3 # "nestedLayout":Landroid/widget/LinearLayout;
.end local v4 # "quickUnlock":Z
.end local v5 # "scramblePin":Z
.end local v7 # "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
:cond_1
move v4, v10
.line 85
goto :goto_0
.restart local v4 # "quickUnlock":Z
:cond_2
move v5, v10
.line 88
goto :goto_1
.line 96
.restart local v0 # "bouncer":Landroid/widget/LinearLayout;
.restart local v1 # "i":I
.restart local v5 # "scramblePin":Z
.restart local v7 # "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
:cond_3
add-int/lit8 v1, v1, 0x1
goto :goto_2
.line 109
:cond_4
const/4 v1, 0x0
:goto_4
sget-object v8, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
invoke-interface {v8}, Ljava/util/List;->size()I
move-result v8
if-ge v1, v8, :cond_5
.line 110
invoke-interface {v7, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v6
check-cast v6, Lcom/android/keyguard/NumPadKey;
.line 111
.local v6, "view":Lcom/android/keyguard/NumPadKey;
sget-object v8, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
invoke-interface {v8, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v8
check-cast v8, Ljava/lang/Integer;
invoke-virtual {v8}, Ljava/lang/Integer;->intValue()I
move-result v8
invoke-virtual {v6, v8}, Lcom/android/keyguard/NumPadKey;->setDigit(I)V
.line 109
add-int/lit8 v1, v1, 0x1
goto :goto_4
.line 115
.end local v0 # "bouncer":Landroid/widget/LinearLayout;
.end local v1 # "i":I
.end local v6 # "view":Lcom/android/keyguard/NumPadKey;
.end local v7 # "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
:cond_5
if-eqz v4, :cond_6
.line 116
iget-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mPasswordEntry:Lcom/android/keyguard/PasswordTextView;
new-instance v9, Lcom/android/keyguard/KeyguardPINView$2;
invoke-direct {v9, p0}, Lcom/android/keyguard/KeyguardPINView$2;-><init>(Lcom/android/keyguard/KeyguardPINView;)V
invoke-virtual {v8, v9}, Lcom/android/keyguard/PasswordTextView;->setQuickUnlockListener(Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;)V
.line 124
:goto_5
return-void
.line 122
:cond_6
iget-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mPasswordEntry:Lcom/android/keyguard/PasswordTextView;
const/4 v9, 0x0
invoke-virtual {v8, v9}, Lcom/android/keyguard/PasswordTextView;->setQuickUnlockListener(Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;)V
goto :goto_5
.end method
Thats all we need to do for the modifications all that is left now is add the following keys to custom settings to toggle them on and off
Code:
<CheckBoxPreference android:title="Quick Unlock" android:key="lockscreen_quick_unlock_control" android:summaryOn="Enabled" android:summaryOff="Disabled" />
<CheckBoxPreference android:title="Pin Pad Scramble" android:key="lockscreen_scramble_pin_layout" android:summaryOn="Enabled" android:summaryOff="Disabled" />
Thats it.
If you use this in your rom please give credits.
An example of what scramble pad is, is attached to this post
Thanks for sharing this with us bro. Nice work
Works great.
Thank you again for the guide!
Create a diff instead please... The guide above isn't applicable on BOD3. Lots of the code above don't have any matches and have some slight reiterations.
thank you for the awsome guide but I have this problem.
Code:
..\3-Out\SystemUI.apk\smali\com\android\keyguard\PasswordTextView.smali[10,2] no viable alternative at input 'Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;'
nambavuong said:
thank you for the awsome guide but I have this problem.
Code:
..\3-Out\SystemUI.apk\smali\com\android\keyguard\PasswordTextView.smali[10,2] no viable alternative at input 'Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;'
Click to expand...
Click to collapse
try to add the comma after the last memberclasses
from this
Code:
Lcom/android/keyguard/PasswordTextView$CharState;
to this
Code:
Lcom/android/keyguard/PasswordTextView$CharState;,
then add
Code:
Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
so the final code is
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/keyguard/PasswordTextView$1;,
Lcom/android/keyguard/PasswordTextView$CharState;[COLOR="Red"],
Lcom/android/keyguard/PasswordTextView$QuickUnlockListener; [/COLOR]
}
.end annotation
txr33 said:
This is a how to add quick pin unlock and scramble pad to lollipop. It has been tested and working on s5, s6, note 3 and possibly note 4.
This is a guide for people to add it themselves, not for people to upload their files and expect it done for them. It does require the ability to decompile and compile apks and is done with making a toggle for it in custom settings which can be found in this great thread here so it can be toggled on or off depending on what people want to use.
For this mod we will be modifying SystemUI from system/priv-app. It requires 3 files to be modified and 2 to be added which are attached to this post.
Download and extract the attached zip and place the two smali files into
Code:
com/android/keyguard/
in the same folder com/android/keyguard/ look for these 3 files which we will need to modify for this.
KeyguardPINView.smali
PasswordTextView.smali
NumPadKey.smali
Lets start with NumPadKey.smali
look for this method which should be near the top
Code:
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
and look for the following section of code in that method
Code:
iget-object v5, p0, Lcom/android/keyguard/NumPadKey;->mContext:Landroid/content/Context;
sget v6, Lcom/android/keyguard/R$drawable;->lock_ripple_drawable:I
invoke-virtual {v5, v6}, Landroid/content/Context;->getDrawable(I)Landroid/graphics/drawable/Drawable;
above the iget we will add this line
Code:
invoke-direct {p0}, Lcom/android/keyguard/NumPadKey;->updateText()V
so it should look something like this
Code:
invoke-direct {p0}, Lcom/android/keyguard/NumPadKey;->updateText()V
iget-object v5, p0, Lcom/android/keyguard/NumPadKey;->mContext:Landroid/content/Context;
sget v6, Lcom/android/keyguard/R$drawable;->lock_ripple_drawable:I
invoke-virtual {v5, v6}, Landroid/content/Context;->getDrawable(I)Landroid/graphics/drawable/Drawable;
Now look for the following line
Code:
# virtual methods
and add this whole method above it
Code:
.method private updateText()V
.locals 4
.prologue
.line 122
iget v2, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
if-ltz v2, :cond_1
.line 123
iget-object v2, p0, Lcom/android/keyguard/NumPadKey;->mDigitText:Landroid/widget/TextView;
iget v3, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
invoke-static {v3}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 124
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
if-nez v2, :cond_0
.line 125
invoke-virtual {p0}, Lcom/android/keyguard/NumPadKey;->getResources()Landroid/content/res/Resources;
move-result-object v2
sget v3, Lcom/android/keyguard/R$array;->lockscreen_num_pad_klondike:I
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;
move-result-object v2
sput-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
.line 127
:cond_0
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
if-eqz v2, :cond_1
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
array-length v2, v2
iget v3, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
if-le v2, v3, :cond_1
.line 128
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
iget v3, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
aget-object v0, v2, v3
.line 129
.local v0, "klondike":Ljava/lang/String;
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v1
.line 130
.local v1, "len":I
if-lez v1, :cond_2
.line 131
iget-object v2, p0, Lcom/android/keyguard/NumPadKey;->mKlondikeText:Landroid/widget/TextView;
invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 137
.end local v0 # "klondike":Ljava/lang/String;
.end local v1 # "len":I
:cond_1
:goto_0
return-void
.line 133
.restart local v0 # "klondike":Ljava/lang/String;
.restart local v1 # "len":I
:cond_2
iget-object v2, p0, Lcom/android/keyguard/NumPadKey;->mKlondikeText:Landroid/widget/TextView;
const/4 v3, 0x4
invoke-virtual {v2, v3}, Landroid/widget/TextView;->setVisibility(I)V
goto :goto_0
.end method
Now anywhere under the virtual method line add the following whole method. It can be right at the end of the smali if want, thats where I usually add it
Code:
.method public setDigit(I)V
.locals 0
.param p1, "digit" # I
.prologue
.line 117
iput p1, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
.line 118
invoke-direct {p0}, Lcom/android/keyguard/NumPadKey;->updateText()V
.line 119
return-void
.end method
That it for that smali and move onto the next
so now we will modify PasswordTextView.smali.
at the start of this file you will see
Code:
# annotations
To this annotation
Code:
.annotation system Ldalvik/annotation/MemberClasses;
we will add the following
Code:
Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
so it will look like this for example. Note some devices may have more values there, do not remove and values just ass the quick unlock listener value
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/keyguard/PasswordTextView$CharState;,
Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
}
.end annotation
now also up the top look for
Code:
# instance fields
and add the following field below that
Code:
.field protected mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
now find the following method
Code:
.method public append(C)V
and in it look for the following section of code
Code:
:cond_1
invoke-direct {p0}, Lcom/android/keyguard/PasswordTextView;->userActivity()V
.line 296
const-wide/16 v4, 0x0
invoke-direct {p0, v4, v5}, Lcom/android/keyguard/PasswordTextView;->showAndHideHint(J)V
and add this below it
Code:
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
if-eqz v4, :cond_next
.line 215
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
iget-object v5, p0, Lcom/android/keyguard/PasswordTextView;->mText:Ljava/lang/String;
invoke-interface {v4, v5}, Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;->onValidateQuickUnlock(Ljava/lang/String;)V
:cond_next
return-void
so it looks like this for example
Code:
:cond_1
invoke-direct {p0}, Lcom/android/keyguard/PasswordTextView;->userActivity()V
const-wide/16 v4, 0x0
invoke-direct {p0, v4, v5}, Lcom/android/keyguard/PasswordTextView;->showAndHideHint(J)V
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
if-eqz v4, :cond_next
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
iget-object v5, p0, Lcom/android/keyguard/PasswordTextView;->mText:Ljava/lang/String;
invoke-interface {v4, v5}, Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;->onValidateQuickUnlock(Ljava/lang/String;)V
:cond_next
return-void
goto :goto_0
.end local v0 # "charState":Lcom/android/keyguard/PasswordTextView$CharState;
:cond_2
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mTextChars:Ljava/util/ArrayList;
add-int/lit8 v5, v1, -0x1
invoke-virtual {v4, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
then at the end of the smali add this whole method
Code:
.method public setQuickUnlockListener(Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;)V
.locals 0
.param p1, "listener" # Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
.prologue
.line 101
iput-object p1, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
.line 102
return-void
.end method
Now we move on to the final smali KeyguardPINView.smali
look for this at the top
Code:
# static fields
and add the following field
Code:
.field private static sNumbers:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List",
"<",
"Ljava/lang/Integer;",
">;"
}
.end annotation
.end field
also under this line
Code:
# instance fields
you may need to add the following line if it is not present already. It already exists on s5 and note 3 but needs to be added for s6. So if it is not there then add it
Code:
.field private mDivider:Landroid/view/View;
now look for
Code:
# direct methods
which should be not far from the above added lines and add the following constructor method
Code:
.method static constructor <clinit>()V
.locals 7
.prologue
const/4 v6, 0x4
const/4 v5, 0x3
const/4 v4, 0x2
const/4 v2, 0x1
const/4 v3, 0x0
.line 48
const/16 v0, 0xa
new-array v0, v0, [Ljava/lang/Integer;
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v3
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v2
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v4
invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v5
const/4 v1, 0x5
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v6
const/4 v1, 0x5
const/4 v2, 0x6
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/4 v1, 0x6
const/4 v2, 0x7
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/4 v1, 0x7
const/16 v2, 0x8
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/16 v1, 0x8
const/16 v2, 0x9
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/16 v1, 0x9
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
invoke-static {v0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
move-result-object v0
sput-object v0, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
return-void
.end method
look for this access
Code:
.method static synthetic access$000(Lcom/android/keyguard/KeyguardPINView;Z)V
and add the following two methods below that method
Code:
.method static synthetic access$100(Lcom/android/keyguard/KeyguardPINView;Ljava/lang/String;)V
.locals 0
.param p0, "x0" # Lcom/android/keyguard/KeyguardPINView;
.param p1, "x1" # Ljava/lang/String;
.prologue
.line 37
invoke-direct {p0, p1}, Lcom/android/keyguard/KeyguardPINView;->validateQuickUnlock(Ljava/lang/String;)V
return-void
.end method
Code:
.method private validateQuickUnlock(Ljava/lang/String;)V
.locals 3
.param p1, "password" # Ljava/lang/String;
.prologue
const/4 v2, 0x1
.line 198
if-eqz p1, :cond_0
.line 199
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
const/4 v1, 0x3
if-le v0, v1, :cond_0
iget-object v0, p0, Lcom/android/keyguard/KeyguardPINView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {v0, p1}, Lcom/android/internal/widget/LockPatternUtils;->checkPassword(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_0
.line 201
iget-object v0, p0, Lcom/android/keyguard/KeyguardPINView;->mCallback:Lcom/android/keyguard/KeyguardSecurityCallback;
invoke-interface {v0, v2}, Lcom/android/keyguard/KeyguardSecurityCallback;->reportUnlockAttempt(Z)V
.line 202
iget-object v0, p0, Lcom/android/keyguard/KeyguardPINView;->mCallback:Lcom/android/keyguard/KeyguardSecurityCallback;
invoke-interface {v0, v2}, Lcom/android/keyguard/KeyguardSecurityCallback;->dismiss(Z)V
.line 203
invoke-virtual {p0, v2}, Lcom/android/keyguard/KeyguardPINView;->resetPasswordText(Z)V
.line 206
:cond_0
return-void
.end method
now look for this method
Code:
.method protected onFinishInflate()V
and replace the whole method with this one
Code:
.method protected onFinishInflate()V
.locals 12
.prologue
const/4 v9, 0x1
const/4 v10, 0x0
.line 77
invoke-super {p0}, Lcom/android/keyguard/KeyguardPinBasedInputView;->onFinishInflate()V
.line 78
sget v8, Lcom/android/keyguard/R$id;->keyguard_bouncer_frame:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mKeyguardBouncerFrame:Landroid/view/ViewGroup;
.line 79
sget v8, Lcom/android/keyguard/R$id;->row0:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow0:Landroid/view/ViewGroup;
.line 80
sget v8, Lcom/android/keyguard/R$id;->row1:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow1:Landroid/view/ViewGroup;
.line 81
sget v8, Lcom/android/keyguard/R$id;->row2:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow2:Landroid/view/ViewGroup;
.line 82
sget v8, Lcom/android/keyguard/R$id;->row3:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow3:Landroid/view/ViewGroup;
.line 83
sget v8, Lcom/android/keyguard/R$id;->divider:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mDivider:Landroid/view/View;
.line 85
invoke-virtual {p0}, Lcom/android/keyguard/KeyguardPINView;->getContext()Landroid/content/Context;
move-result-object v8
invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v8
const-string v11, "lockscreen_quick_unlock_control"
invoke-static {v8, v11, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v8
if-ne v8, v9, :cond_1
move v4, v9
.line 88
.local v4, "quickUnlock":Z
:goto_0
invoke-virtual {p0}, Lcom/android/keyguard/KeyguardPINView;->getContext()Landroid/content/Context;
move-result-object v8
invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v8
const-string v11, "lockscreen_scramble_pin_layout"
invoke-static {v8, v11, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v8
if-ne v8, v9, :cond_2
move v5, v9
.line 91
.local v5, "scramblePin":Z
:goto_1
if-eqz v5, :cond_5
.line 92
sget-object v8, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
invoke-static {v8}, Ljava/util/Collections;->shuffle(Ljava/util/List;)V
.line 94
sget v8, Lcom/android/keyguard/R$id;->keyguard_bouncer_frame:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/LinearLayout;
.line 95
.local v0, "bouncer":Landroid/widget/LinearLayout;
new-instance v7, Ljava/util/ArrayList;
invoke-direct {v7}, Ljava/util/ArrayList;-><init>()V
.line 96
.local v7, "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
const/4 v1, 0x0
.local v1, "i":I
:goto_2
invoke-virtual {v0}, Landroid/widget/LinearLayout;->getChildCount()I
move-result v8
if-ge v1, v8, :cond_4
.line 97
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
move-result-object v8
instance-of v8, v8, Landroid/widget/LinearLayout;
if-eqz v8, :cond_3
.line 98
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
move-result-object v3
check-cast v3, Landroid/widget/LinearLayout;
.line 99
.local v3, "nestedLayout":Landroid/widget/LinearLayout;
const/4 v2, 0x0
.local v2, "j":I
:goto_3
invoke-virtual {v3}, Landroid/widget/LinearLayout;->getChildCount()I
move-result v8
if-ge v2, v8, :cond_3
.line 100
invoke-virtual {v3, v2}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
move-result-object v6
.line 101
.local v6, "view":Landroid/view/View;
invoke-virtual {v6}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v8
const-class v9, Lcom/android/keyguard/NumPadKey;
if-ne v8, v9, :cond_0
.line 102
check-cast v6, Lcom/android/keyguard/NumPadKey;
.end local v6 # "view":Landroid/view/View;
invoke-interface {v7, v6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 99
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_3
.end local v0 # "bouncer":Landroid/widget/LinearLayout;
.end local v1 # "i":I
.end local v2 # "j":I
.end local v3 # "nestedLayout":Landroid/widget/LinearLayout;
.end local v4 # "quickUnlock":Z
.end local v5 # "scramblePin":Z
.end local v7 # "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
:cond_1
move v4, v10
.line 85
goto :goto_0
.restart local v4 # "quickUnlock":Z
:cond_2
move v5, v10
.line 88
goto :goto_1
.line 96
.restart local v0 # "bouncer":Landroid/widget/LinearLayout;
.restart local v1 # "i":I
.restart local v5 # "scramblePin":Z
.restart local v7 # "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
:cond_3
add-int/lit8 v1, v1, 0x1
goto :goto_2
.line 109
:cond_4
const/4 v1, 0x0
:goto_4
sget-object v8, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
invoke-interface {v8}, Ljava/util/List;->size()I
move-result v8
if-ge v1, v8, :cond_5
.line 110
invoke-interface {v7, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v6
check-cast v6, Lcom/android/keyguard/NumPadKey;
.line 111
.local v6, "view":Lcom/android/keyguard/NumPadKey;
sget-object v8, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
invoke-interface {v8, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v8
check-cast v8, Ljava/lang/Integer;
invoke-virtual {v8}, Ljava/lang/Integer;->intValue()I
move-result v8
invoke-virtual {v6, v8}, Lcom/android/keyguard/NumPadKey;->setDigit(I)V
.line 109
add-int/lit8 v1, v1, 0x1
goto :goto_4
.line 115
.end local v0 # "bouncer":Landroid/widget/LinearLayout;
.end local v1 # "i":I
.end local v6 # "view":Lcom/android/keyguard/NumPadKey;
.end local v7 # "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
:cond_5
if-eqz v4, :cond_6
.line 116
iget-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mPasswordEntry:Lcom/android/keyguard/PasswordTextView;
new-instance v9, Lcom/android/keyguard/KeyguardPINView$2;
invoke-direct {v9, p0}, Lcom/android/keyguard/KeyguardPINView$2;-><init>(Lcom/android/keyguard/KeyguardPINView;)V
invoke-virtual {v8, v9}, Lcom/android/keyguard/PasswordTextView;->setQuickUnlockListener(Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;)V
.line 124
:goto_5
return-void
.line 122
:cond_6
iget-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mPasswordEntry:Lcom/android/keyguard/PasswordTextView;
const/4 v9, 0x0
invoke-virtual {v8, v9}, Lcom/android/keyguard/PasswordTextView;->setQuickUnlockListener(Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;)V
goto :goto_5
.end method
Thats all we need to do for the modifications all that is left now is add the following keys to custom settings to toggle them on and off
Code:
<CheckBoxPreference android:title="Quick Unlock" android:key="lockscreen_quick_unlock_control" android:summaryOn="Enabled" android:summaryOff="Disabled" />
<CheckBoxPreference android:title="Pin Pad Scramble" android:key="lockscreen_scramble_pin_layout" android:summaryOn="Enabled" android:summaryOff="Disabled" />
Thats it.
If you use this in your rom please give credits.
An example of what scramble pad is, is attached to this post
Click to expand...
Click to collapse
Will this xposed with work on Samsung Infuser?
Riyal said:
Create a diff instead please... The guide above isn't applicable on BOD3. Lots of the code above don't have any matches and have some slight reiterations.
Click to expand...
Click to collapse
Nope
Cowboy from Hell on a twisted trail.
Koffed From my Big Ass Outlaw Phone.
Bubbajoe40356 said:
Will this xposed with work on Samsung Infuser?
Nope
Cowboy from Hell on a twisted trail.
Koffed From my Big Ass Outlaw Phone.
Click to expand...
Click to collapse
1. Dont quote O.P
2. Gravity also supported.
3. Pls dont talk xposed in this guide. Thank you!
Sent from my SM-G9250
nambavuong said:
1. Dont quote O.P
2. Gravity also supported.
3. Pls dont talk xposed in this guide. Thank you!
Sent from my SM-G9250
Click to expand...
Click to collapse
1 . It's a team thing. You worry about you and I'll take care of Bubba.
2. Who cares.
3. See #1 and have a lovely day. When you get your police badge ... come pull me over.
Cowboy from Hell on a twisted trail.
Koffed From my Big Ass Outlaw Phone.
Thanks for sharing, working great on N3.
I have not tried it yet but from the pictures i can see that if a key with number and letters is in the first position it loses the letters
it's normal?
remuntada78 said:
I have not tried it yet but from the pictures i can see that if a key with number and letters is in the first position it loses the letters
it's normal?
Click to expand...
Click to collapse
Are you talking about "Scramble Pad", that can be enabled/disabled. I guess it for higher security level.
kmokhtar79 said:
Are you talking about "Scramble Pad", that can be enabled/disabled. I guess it for higher security level.
Click to expand...
Click to collapse
Yes talking about it, ok
Inviato dal mio SM-G900F utilizzando Tapatalk
@Bubbajoe40356
Seriously, you just quoted the entire first post only to type one line underneath. This added a lot of unnecessary scrolling and it is very annoying.
corncobman said:
@Bubbajoe40356
Seriously, you just quoted the entire first post only to type one line underneath. This added a lot of unnecessary scrolling and it is very annoying.
Click to expand...
Click to collapse
I dont find it annoying but complaining about it is unnecessary
txr33 said:
Thats all we need to do for the modifications all that is left now is add the following keys to custom settings to toggle them on and off
Code:
<CheckBoxPreference android:title="Quick Unlock" android:key="lockscreen_quick_unlock_control" android:summaryOn="Enabled" android:summaryOff="Disabled" />
<CheckBoxPreference android:title="Pin Pad Scramble" android:key="lockscreen_scramble_pin_layout" android:summaryOn="Enabled" android:summaryOff="Disabled" />
Click to expand...
Click to collapse
Who help me add this segment to where ?
huaminhquan93 said:
Who help me add this segment to where ?
Click to expand...
Click to collapse
add to xml/pref of your custom setting.apk
nambavuong said:
add to xml/pref of your custom setting.apk
Click to expand...
Click to collapse
xml/pref name ?
you need to have a custom settings app to enable/disable this mod, you can find the custom settings apk in the op of the link posted in this op. once you have the custom settings apk you need to decompile it and go to res/xml/preferences.xml and thats where those 2 lines will be added
JoHnNYBlaZE716 said:
you need to have a custom settings app to enable/disable this mod, you can find the custom settings apk in the op of the link posted in this op. once you have the custom settings apk you need to decompile it and go to res/xml/preferences.xml and thats where those 2 lines will be added
Click to expand...
Click to collapse
no link for custom setting apk in the OP
hi guy's i whant to share this guide :
Guide How to add Native Blur on stock rom 7.0 by @DGCM7 and @maxx35000
first you have to find some compatible libs with your device "from device with native blur" :
Code:
libandroid_runtime.so
libgui.so
libsurfaceflinger.so
libsurfaceflinger_ddmconnection.so
if missing libsensorhub.so
so now first edit :
SamsungWindowState.smali
you can found it in Samsung-services.jar
got to android/server/wm/SamsungWindowState.jar
scearch:
Code:
[COLOR="Red"]invoke-virtual {v1}, Lcom/android/server/wm/WindowState;->getBridge()Lcom/samsung/android/view/IWindowStateBridge;
move-result-object v8
invoke-interface {v8}, Lcom/samsung/android/view/IWindowStateBridge;->getSystemUiVisibility()I
[/COLOR]
and replace with:
Code:
[COLOR="Blue"]invoke-virtual {v1}, Lcom/android/server/wm/WindowState;->getSystemUiVisibility()I[/COLOR]
scearch and replace :
Code:
[COLOR="Red"]:cond_5
iget v5, p0, Lcom/android/server/wm/SamsungWindowState;->mSystemUiVisibility:I[/COLOR]
with:
Code:
[COLOR="Blue"]:cond_5
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
invoke-virtual {v8}, Lcom/android/server/wm/WindowState;->getSystemUiVisibility()I
move-result v5 [/COLOR]
and now find :
Code:
[COLOR="Red"]
.method public applyBlurEffect()V
.locals 0
return-void
.end method [/COLOR]
replace all the method with:
Code:
[COLOR="Blue"].method public applyBlurEffect()V
.locals 13
const/4 v12, -0x2
const/4 v7, 0x0
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
iget-object v8, v8, Lcom/android/server/wm/WindowState;->mAttrs:Landroid/view/WindowManager$LayoutParams;
iget v8, v8, Landroid/view/WindowManager$LayoutParams;->flags:I
and-int/lit8 v8, v8, 0x2
if-eqz v8, :cond_0
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
iget-object v8, v8, Lcom/android/server/wm/WindowState;->mAttrs:Landroid/view/WindowManager$LayoutParams;
iget v8, v8, Landroid/view/WindowManager$LayoutParams;->samsungFlags:I
and-int/lit8 v8, v8, 0x40
if-eqz v8, :cond_0
const/4 v5, 0x1
:goto_0
if-eqz v5, :cond_1
invoke-direct {p0}, Lcom/android/server/wm/SamsungWindowState;->getLegacyBlurRadius()I
move-result v0
:goto_1
if-eqz v5, :cond_2
invoke-direct {p0}, Lcom/android/server/wm/SamsungWindowState;->getLegacySaturation()I
move-result v6
:goto_2
iget v8, p0, Lcom/android/server/wm/SamsungWindowState;->mLastBlurRadius:I
if-ne v8, v0, :cond_3
iget v8, p0, Lcom/android/server/wm/SamsungWindowState;->mLastSat:I
if-ne v8, v6, :cond_3
return-void
:cond_0
move v5, v7
goto :goto_0
:cond_1
const/4 v0, 0x0
goto :goto_1
:cond_2
const/4 v6, 0x0
goto :goto_2
:cond_3
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
iget-object v8, v8, Lcom/android/server/wm/WindowState;->mWinAnimator:Lcom/android/server/wm/WindowStateAnimator;
if-nez v8, :cond_4
return-void
:cond_4
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
iget-object v8, v8, Lcom/android/server/wm/WindowState;->mAttrs:Landroid/view/WindowManager$LayoutParams;
iget-wide v8, v8, Landroid/view/WindowManager$LayoutParams;->dimDuration:J
const-wide/16 v10, -0x1
cmp-long v8, v8, v10
if-eqz v8, :cond_7
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
iget-object v8, v8, Lcom/android/server/wm/WindowState;->mAttrs:Landroid/view/WindowManager$LayoutParams;
iget-wide v2, v8, Landroid/view/WindowManager$LayoutParams;->dimDuration:J
:goto_3
invoke-static {}, Landroid/view/SurfaceEffects;->newBuilder()Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v8
sget-object v9, Landroid/view/SurfaceEffects$PixEffectType;->BLUR:Landroid/view/SurfaceEffects$PixEffectType;
invoke-virtual {v8, v9}, Landroid/view/SurfaceEffects$Effect$Builder;->setPixelEffectType(Landroid/view/SurfaceEffects$PixEffectType;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v1
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
invoke-virtual {v8}, Lcom/android/server/wm/WindowState;->getAttrs()Landroid/view/WindowManager$LayoutParams;
move-result-object v8
if-eqz v8, :cond_6
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
invoke-virtual {v8}, Lcom/android/server/wm/WindowState;->getAttrs()Landroid/view/WindowManager$LayoutParams;
move-result-object v8
iget v8, v8, Landroid/view/WindowManager$LayoutParams;->height:I
if-eq v8, v12, :cond_5
iget-object v8, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
invoke-virtual {v8}, Lcom/android/server/wm/WindowState;->getAttrs()Landroid/view/WindowManager$LayoutParams;
move-result-object v8
iget v8, v8, Landroid/view/WindowManager$LayoutParams;->width:I
if-ne v8, v12, :cond_6
:cond_5
invoke-virtual {v1}, Landroid/view/SurfaceEffects$Effect$Builder;->makeFullscreen()Landroid/view/SurfaceEffects$Effect$Builder;
:cond_6
if-lez v0, :cond_8
sget-object v8, Landroid/view/SurfaceEffects$AnimationMode;->ONCE_STAY_END:Landroid/view/SurfaceEffects$AnimationMode;
invoke-virtual {v1, v8}, Landroid/view/SurfaceEffects$Effect$Builder;->setAnimationMode(Landroid/view/SurfaceEffects$AnimationMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v8
sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_RADIUS:Landroid/view/SurfaceEffects$AnimParam;
iget v10, p0, Lcom/android/server/wm/SamsungWindowState;->mLastBlurRadius:I
int-to-float v10, v10
sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->HOLD:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v8, v9, v7, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v8
sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_RADIUS:Landroid/view/SurfaceEffects$AnimParam;
long-to-int v10, v2
int-to-float v11, v0
sget-object v12, Landroid/view/SurfaceEffects$InterpMode;->SMOOTH_IN:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v8, v9, v10, v11, v12}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v8
sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_SATURATION:Landroid/view/SurfaceEffects$AnimParam;
iget v10, p0, Lcom/android/server/wm/SamsungWindowState;->mLastSat:I
int-to-float v10, v10
sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->HOLD:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v8, v9, v7, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v7
sget-object v8, Landroid/view/SurfaceEffects$AnimParam;->BLUR_SATURATION:Landroid/view/SurfaceEffects$AnimParam;
long-to-int v9, v2
int-to-float v10, v6
sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->SMOOTH_IN:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v7, v8, v9, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
:goto_4
invoke-virtual {v1}, Landroid/view/SurfaceEffects$Effect$Builder;->build()Landroid/view/SurfaceEffects$Effect;
move-result-object v7
invoke-virtual {v7}, Landroid/view/SurfaceEffects$Effect;->getBytes()[I
move-result-object v4
iget-object v7, p0, Lcom/android/server/wm/SamsungWindowState;->mWin:Lcom/android/server/wm/WindowState;
iget-object v7, v7, Lcom/android/server/wm/WindowState;->mWinAnimator:Lcom/android/server/wm/WindowStateAnimator;
iget-object v7, v7, Lcom/android/server/wm/WindowStateAnimator;->mSurfaceController:Lcom/android/server/wm/WindowSurfaceController;
invoke-virtual {v7, v4}, Lcom/android/server/wm/WindowSurfaceController;->startSurfaceAnimation([I)V
iput v0, p0, Lcom/android/server/wm/SamsungWindowState;->mLastBlurRadius:I
iput v6, p0, Lcom/android/server/wm/SamsungWindowState;->mLastSat:I
return-void
:cond_7
const-wide/16 v2, 0xc8
goto :goto_3
:cond_8
sget-object v8, Landroid/view/SurfaceEffects$AnimationMode;->ONCE_DESTROY:Landroid/view/SurfaceEffects$AnimationMode;
invoke-virtual {v1, v8}, Landroid/view/SurfaceEffects$Effect$Builder;->setAnimationMode(Landroid/view/SurfaceEffects$AnimationMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v8
sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_RADIUS:Landroid/view/SurfaceEffects$AnimParam;
iget v10, p0, Lcom/android/server/wm/SamsungWindowState;->mLastBlurRadius:I
int-to-float v10, v10
sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->HOLD:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v8, v9, v7, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v8
sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_RADIUS:Landroid/view/SurfaceEffects$AnimParam;
long-to-int v10, v2
int-to-float v11, v0
sget-object v12, Landroid/view/SurfaceEffects$InterpMode;->SMOOTH_OUT:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v8, v9, v10, v11, v12}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v8
sget-object v9, Landroid/view/SurfaceEffects$AnimParam;->BLUR_SATURATION:Landroid/view/SurfaceEffects$AnimParam;
iget v10, p0, Lcom/android/server/wm/SamsungWindowState;->mLastSat:I
int-to-float v10, v10
sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->HOLD:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v8, v9, v7, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
move-result-object v7
sget-object v8, Landroid/view/SurfaceEffects$AnimParam;->BLUR_SATURATION:Landroid/view/SurfaceEffects$AnimParam;
long-to-int v9, v2
const/4 v10, 0x0
sget-object v11, Landroid/view/SurfaceEffects$InterpMode;->SMOOTH_OUT:Landroid/view/SurfaceEffects$InterpMode;
invoke-virtual {v7, v8, v9, v10, v11}, Landroid/view/SurfaceEffects$Effect$Builder;->addPixAnimation(Landroid/view/SurfaceEffects$AnimParam;IFLandroid/view/SurfaceEffects$InterpMode;)Landroid/view/SurfaceEffects$Effect$Builder;
goto :goto_4
.end method[/COLOR]
add new method :
Code:
[COLOR="Lime"].method public getAspectRatio()F
.locals 1
iget v0, p0, Lcom/android/server/wm/SamsungWindowState;->mAspectRatio:F
return v0
.end method[/COLOR]
find and replace;
Code:
[COLOR="Red"].method public resetEffects()V
.locals 0
return-void
.end method[/COLOR]
by:
Code:
[COLOR="Blue"].method public resetEffects()V
.locals 1
const/4 v0, 0x0
iput v0, p0, Lcom/android/server/wm/SamsungWindowState;->mLastBlurRadius:I
iput v0, p0, Lcom/android/server/wm/SamsungWindowState;->mLastSat:I
return-void
.end method[/COLOR]
now open in services.jar\smali\com\android\server\wm\WindowStateAnimator.smali
scearch :
Code:
[COLOR="Red"]invoke-virtual {v4}, Lcom/android/server/wm/WindowSurfaceController;->setLayerStackInTransaction()V
return-void[/COLOR]
and replace with :
Code:
[COLOR="Blue"] invoke-virtual {v4}, Lcom/android/server/wm/WindowSurfaceController;->setLayerStackInTransaction()V
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/server/wm/WindowStateAnimator;->mWin:Lcom/android/server/wm/WindowState;
invoke-virtual {v4}, Lcom/android/server/wm/WindowState;->getBridge()Lcom/samsung/android/view/IWindowStateBridge;
move-result-object v4
invoke-interface {v4}, Lcom/samsung/android/view/IWindowStateBridge;->applyBlurEffect()V
return-void[/COLOR]
Now open android/server/policy/GlobalActions.smali in services.jar
find:
Code:
iput-boolean[COLOR="Red"] v5[/COLOR], p0, Lcom/android/server/policy/GlobalActions;->mIsSupportedBlur:Z
and change to :
Code:
iput-boolean [COLOR="Lime"]v4[/COLOR], p0, Lcom/android/server/policy/GlobalActions;->mIsSupportedBlur:Z
find in same file :
Code:
const-string/jumbo v4, "CscFeature_Common_ConfigBikeMode"
edit all part V4 to V6 & all V6 to V7
on original file for me :
Code:
const-string/jumbo [COLOR="Red"]v4[/COLOR], "CscFeature_Common_ConfigBikeMode"
invoke-virtual {v3, [COLOR="Red"]v4[/COLOR]}, Lcom/samsung/android/feature/SemCscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
const-string/jumbo [COLOR="Red"]v4[/COLOR], "bikemode"
invoke-virtual {v3, [COLOR="Red"]v4[/COLOR]}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_1
invoke-static {}, Lcom/samsung/android/feature/SemCscFeature;->getInstance()Lcom/samsung/android/feature/SemCscFeature;
move-result-object v3
const-string/jumbo [COLOR="Red"]v4[/COLOR], "CscFeature_Common_ConfigBikeMode"
invoke-virtual {v3, [COLOR="Red"]v4[/COLOR]}, Lcom/samsung/android/feature/SemCscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
const-string/jumbo [COLOR="Red"]v4[/COLOR], "globalaction"
invoke-virtual {v3, [COLOR="Red"]v4[/COLOR]}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_1
const-string/jumbo v3, "com.samsung.android.app.bikemode"
invoke-direct {p0, v3}, Lcom/android/server/policy/GlobalActions;->isSBikeInstalled(Ljava/lang/String;)Z
move-result v3
if-eqz v3, :cond_1
iget-object v3, p0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string/jumbo [COLOR="Red"]v4[/COLOR], "isBikeMode"
invoke-static {[COLOR="Red"]v4[/COLOR]}, Landroid/provider/Settings$Secure;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object [COLOR="Red"]v4
[/COLOR]
iget-object [COLOR="Red"]v6[/COLOR], p0, Lcom/android/server/policy/GlobalActions;->mBikeModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v3, [COLOR="Red"]v4[/COLOR], v5, [COLOR="Red"]v6[/COLOR]}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
after editing :
Code:
const-string/jumbo [COLOR="Lime"]v6[/COLOR], "CscFeature_Common_ConfigBikeMode"
invoke-virtual {v3, [COLOR="Lime"]v6[/COLOR]}, Lcom/samsung/android/feature/SemCscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
const-string/jumbo [COLOR="Lime"]v6[/COLOR], "bikemode"
invoke-virtual {v3, [COLOR="Lime"]v6[/COLOR]}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_1
invoke-static {}, Lcom/samsung/android/feature/SemCscFeature;->getInstance()Lcom/samsung/android/feature/SemCscFeature;
move-result-object v3
const-string/jumbo [COLOR="Lime"]v6[/COLOR], "CscFeature_Common_ConfigBikeMode"
invoke-virtual {v3, [COLOR="Lime"]v6[/COLOR]}, Lcom/samsung/android/feature/SemCscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
const-string/jumbo [COLOR="Lime"]v6[/COLOR], "globalaction"
invoke-virtual {v3,[COLOR="Lime"] v6[/COLOR]}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_1
const-string/jumbo v3, "com.samsung.android.app.bikemode"
invoke-direct {p0, v3}, Lcom/android/server/policy/GlobalActions;->isSBikeInstalled(Ljava/lang/String;)Z
move-result v3
if-eqz v3, :cond_1
iget-object v3, p0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string/jumbo [COLOR="Lime"]v6[/COLOR], "isBikeMode"
invoke-static {[COLOR="Lime"]v6[/COLOR]}, Landroid/provider/Settings$Secure;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object [COLOR="Lime"]v6
[/COLOR]
iget-object [COLOR="Lime"]v7[/COLOR], p0, Lcom/android/server/policy/GlobalActions;->mBikeModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v3, [COLOR="Lime"]v6[/COLOR], v5, [COLOR="Lime"]v7[/COLOR]}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
Good job guys @DGCM7 @maxx35000
Awesome
Awesome Work @maxx35000 & @DGCM7
Is this done from the PC?
with abd?
I do not understand :v
make vedio to do this please
Will this work for a3 2016?
@parth111999 sir is this working on our j700f?
FerXray13 said:
Is this done from the PC?
with abd?
I do not understand :v
Click to expand...
Click to collapse
No need Of Adb
U will be needing Java JRE installed and An apk tool like Tickle My Android
Mikkel Nf said:
Will this work for a3 2016?
Click to expand...
Click to collapse
Yes it would Work On Many 7.0 Stock Roms.....But the Main thing matters is Proper Libs
Ayushj702 said:
@parth111999 sir is this working on our j700f?
Click to expand...
Click to collapse
I tried it with one of my base that didnt worked maybe i will try in some other base.....
Android 7.1.1
How i can do that on Android 7.1.1????
i cant find these files, i dont know the path, please help me
....
parth111999 said:
No need Of Adb
U will be needing Java JRE installed and An apk tool like Tickle My Android
Click to expand...
Click to collapse
How ? Please help me
Tell me step by step
How ??????
Please make guide to video please
Please respon ***** !
Antulut23 said:
Please make guide to video please
Click to expand...
Click to collapse
Please respond ***** !
---------- Post added at 06:21 AM ---------- Previous post was at 06:20 AM ----------
Bina Rahmawan said:
Please respond ***** !
Click to expand...
Click to collapse
@maxx35000
I want to delete that from RADICAL Quack 4.5
Can someone send me a 7.0 ROM?
For galaxy sm-j320fn model?
Hi guys,
I need devs to help me to find a way to disable signature verification on Pie.
The old patching of compare signature method doesn't work anymore.
Could a java pro analyse PackageManagerService to find how to allow signature of core apps with a different signature.
Thanks
Edit: Here's a working method that I've created:
1) First decompile framework-res.apk and add this in arrays.xml
Code:
<string-array name="config_vendorPlatformSignatures">
<item>308203BB308202A3A003020102020900F00F8E7F45E72D86300D06092A864886F70D01010B05003074310B30090603550406130255533113301106035504080C0A43616C69666F726E69613116301406035504070C0D4D6F756E7461696E205669657731143012060355040A0C0B476F6F676C6520496E632E3110300E060355040B0C07416E64726F69643110300E06035504030C07416E64726F6964301E170D3136303531303138313332385A170D3433303932363138313332385A3074310B30090603550406130255533113301106035504080C0A43616C69666F726E69613116301406035504070C0D4D6F756E7461696E205669657731143012060355040A0C0B476F6F676C6520496E632E3110300E060355040B0C07416E64726F69643110300E06035504030C07416E64726F696430820122300D06092A864886F70D01010105000382010F003082010A02820101009DA10ED05B5EBFE8E5794CFA3A633E605748FDB8F3545C288D9EFFBA4F2CA1BFC16DA0D4C5724575A21D4DF9D44C1B068785C084BFD4C7071EEF258F2169494239B55FCF187E529760D77DD495F65872D6BF7E61C764A368D0AA6272A51C10E91F89991EA147377B3B37B2ED714E622D17288C8A7003DC6A11022F1B0C6EB005A18CFAB5EF3F9B6912EE1B1CBECCD96A1F76DEBB6E6A9BFCCB76E9C2D279EF119D9E9BF6A089C21507FD00A0237A0C11C32946FE123C0A2CE0C52CB4D3B5D815281F244E4F998CDC4D765459BF1FFA960FC48324869DB0555A6844A94204891A01CCA268448374C7CD17661C74C692FB32AF0DF4C20AFF02F9966B5C94BB80710203010001A350304E301D0603551D0E041604149078B7EBD42D359E4E98E6FEF868CABFFA634F9F301F0603551D230418301680149078B7EBD42D359E4E98E6FEF868CABFFA634F9F300C0603551D13040530030101FF300D06092A864886F70D01010B050003820101008646166908812FD5373CE79FBAAC62F691ECDDCB82619D35BD990D068689E15E0C556D246ED8AE96816743D80CEE443F94F55CB6E169CC8F10B3770C434F351E50170F445369A26A4C37B2CA893C14A3AF7C7513A5420784CE4B6D9B92ED61252F5335A11C75EC978B979B1CD776DC3081094C3E7BE161C21E868303E0B40CB6441A95BB85F6CF83BD707735DAB8908C954CF5BB8553D0384480E1D789130D19151CA2AB01F928657E0DF2AD1FB31DCE18436BF873E4E924A59B7A89AE18C8B93CE0FF2C0ECAB4E7A67CEA1F7022CEA3C27699FA67D3B4965ABF9CE89016F33A08BFBE25AD2A9A6626C1A98802F0592DE720BDEFDDE83963D767C7AD96915224</item>
</string-array>
2) Recompile framework-res.apk and decompile new compiled one to find new id inside public.xml
Code:
<public type="array" name="config_vendorPlatformSignatures" id="0x01070057" />
3) Decompile Services.jar and look for this method in com/android/server/pm/PackageManagerService.smali
Code:
.method private collectCertificatesLI(Lcom/android/server/pm/PackageSetting;Landroid/content/pm/PackageParser$Package;ZZ)V
Replace the complete method by:
Code:
.method private collectCertificatesLI(Lcom/android/server/pm/PackageSetting;Landroid/content/pm/PackageParser$Package;ZZ)V
.registers 16
.param p1, "ps" # Lcom/android/server/pm/PackageSetting;
.param p2, "pkg" # Landroid/content/pm/PackageParser$Package;
.param p3, "forceCollect" # Z
.param p4, "skipVerify" # Z
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/android/server/pm/PackageManagerException;
}
.end annotation
.line 8546
iget-boolean v0, p0, Lcom/android/server/pm/PackageManagerService;->mIsPreNMR1Upgrade:Z
if-eqz v0, :cond_10
.line 8547
new-instance v0, Ljava/io/File;
iget-object v1, p2, Landroid/content/pm/PackageParser$Package;->codePath:Ljava/lang/String;
invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/File;->lastModified()J
move-result-wide v0
goto :goto_14
:cond_10
invoke-static {p2}, Lcom/android/server/pm/PackageManagerServiceUtils;->getLastModifiedTime(Landroid/content/pm/PackageParser$Package;)J
move-result-wide v0
.line 8548
.local v0, "lastModifiedTime":J
:goto_14
if-eqz p1, :cond_77
if-nez p3, :cond_77
iget-object v2, p1, Lcom/android/server/pm/PackageSetting;->codePathString:Ljava/lang/String;
iget-object v3, p2, Landroid/content/pm/PackageParser$Package;->codePath:Ljava/lang/String;
.line 8549
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_77
iget-wide v2, p1, Lcom/android/server/pm/PackageSetting;->timeStamp:J
cmp-long v2, v2, v0
if-nez v2, :cond_77
.line 8551
invoke-direct {p0, p2}, Lcom/android/server/pm/PackageManagerService;->isCompatSignatureUpdateNeeded(Landroid/content/pm/PackageParser$Package;)Z
move-result v2
if-nez v2, :cond_77
.line 8552
invoke-direct {p0, p2}, Lcom/android/server/pm/PackageManagerService;->isRecoverSignatureUpdateNeeded(Landroid/content/pm/PackageParser$Package;)Z
move-result v2
if-nez v2, :cond_77
.line 8553
iget-object v2, p1, Lcom/android/server/pm/PackageSetting;->signatures:Lcom/android/server/pm/PackageSignatures;
iget-object v2, v2, Lcom/android/server/pm/PackageSignatures;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v2, v2, Landroid/content/pm/PackageParser$SigningDetails;->signatures:[Landroid/content/pm/Signature;
if-eqz v2, :cond_59
iget-object v2, p1, Lcom/android/server/pm/PackageSetting;->signatures:Lcom/android/server/pm/PackageSignatures;
iget-object v2, v2, Lcom/android/server/pm/PackageSignatures;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v2, v2, Landroid/content/pm/PackageParser$SigningDetails;->signatures:[Landroid/content/pm/Signature;
array-length v2, v2
if-eqz v2, :cond_59
iget-object v2, p1, Lcom/android/server/pm/PackageSetting;->signatures:Lcom/android/server/pm/PackageSignatures;
iget-object v2, v2, Lcom/android/server/pm/PackageSignatures;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget v2, v2, Landroid/content/pm/PackageParser$SigningDetails;->signatureSchemeVersion:I
if-eqz v2, :cond_59
.line 8559
new-instance v2, Landroid/content/pm/PackageParser$SigningDetails;
iget-object v3, p1, Lcom/android/server/pm/PackageSetting;->signatures:Lcom/android/server/pm/PackageSignatures;
iget-object v3, v3, Lcom/android/server/pm/PackageSignatures;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
invoke-direct {v2, v3}, Landroid/content/pm/PackageParser$SigningDetails;-><init>(Landroid/content/pm/PackageParser$SigningDetails;)V
iput-object v2, p2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
.line 8561
return-void
.line 8564
:cond_59
const-string v2, "PackageManager"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "PackageSetting for "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v4, p1, Lcom/android/server/pm/PackageSetting;->name:Ljava/lang/String;
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v4, " is missing signatures. Collecting certs again to recover them."
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_99
.line 8567
:cond_77
const-string v2, "PackageManager"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
iget-object v4, p2, Landroid/content/pm/PackageParser$Package;->codePath:Ljava/lang/String;
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v4, " changed; collecting certs"
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 8568
if-eqz p3, :cond_8d
const-string v4, " (forced)"
goto :goto_8f
:cond_8d
const-string v4, ""
:goto_8f
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
.line 8567
invoke-static {v2, v3}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 8573
:goto_99
const-wide/32 v2, 0x40000
:try_start_9c
const-string v4, "collectCertificates"
invoke-static {v2, v3, v4}, Landroid/os/Trace;->traceBegin(JLjava/lang/String;)V
.line 8574
invoke-static {p2, p4}, Landroid/content/pm/PackageParser;->collectCertificates(Landroid/content/pm/PackageParser$Package;Z)V
.line 8575
iget-object v4, p2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v4, v4, Landroid/content/pm/PackageParser$SigningDetails;->signatures:[Landroid/content/pm/Signature;
iget-object v5, p0, Lcom/android/server/pm/PackageManagerService;->mVendorPlatformSignatures:[Landroid/content/pm/Signature;
invoke-static {v4, v5}, Lcom/android/server/pm/PackageManagerServiceUtils;->compareSignatures2([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
move-result v4
if-nez v4, :cond_e6
.line 8579
iget-object v4, p0, Lcom/android/server/pm/PackageManagerService;->mPlatformPackage:Landroid/content/pm/PackageParser$Package;
if-eqz v4, :cond_e6
.line 8580
new-instance v4, Landroid/content/pm/PackageParser$SigningDetails;
iget-object v5, p0, Lcom/android/server/pm/PackageManagerService;->mPlatformPackage:Landroid/content/pm/PackageParser$Package;
iget-object v5, v5, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v6, v5, Landroid/content/pm/PackageParser$SigningDetails;->signatures:[Landroid/content/pm/Signature;
iget-object v5, p2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget v7, v5, Landroid/content/pm/PackageParser$SigningDetails;->signatureSchemeVersion:I
iget-object v5, p2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v8, v5, Landroid/content/pm/PackageParser$SigningDetails;->publicKeys:Landroid/util/ArraySet;
iget-object v5, p2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v9, v5, Landroid/content/pm/PackageParser$SigningDetails;->pastSigningCertificates:[Landroid/content/pm/Signature;
iget-object v5, p2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v10, v5, Landroid/content/pm/PackageParser$SigningDetails;->pastSigningCertificatesFlags:[I
move-object v5, v4
invoke-direct/range {v5 .. v10}, Landroid/content/pm/PackageParser$SigningDetails;-><init>([Landroid/content/pm/Signature;ILandroid/util/ArraySet;[Landroid/content/pm/Signature;[I)V
iput-object v4, p2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
.line 8586
iget-object v4, p2, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
iget v4, v4, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
.line 8587
.local v4, "targetSdkVersion":I
iget-object v5, p2, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
iget v5, v5, Landroid/content/pm/ApplicationInfo;->targetSandboxVersion:I
.line 8588
.local v5, "targetSandboxVersion":I
invoke-virtual {p2}, Landroid/content/pm/PackageParser$Package;->isPrivileged()Z
move-result v6
.line 8590
.local v6, "isPrivileged":Z
iget-object v7, p2, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
invoke-static {p2, v6, v5, v4}, Lcom/android/server/pm/SELinuxMMAC;->getSeInfo(Landroid/content/pm/PackageParser$Package;ZII)Ljava/lang/String;
move-result-object v8
iput-object v8, v7, Landroid/content/pm/ApplicationInfo;->seInfo:Ljava/lang/String;
:try_end_e6
.catch Landroid/content/pm/PackageParser$PackageParserException; {:try_start_9c .. :try_end_e6} :catch_ed
.catchall {:try_start_9c .. :try_end_e6} :catchall_eb
.line 8597
.end local v4 # "targetSdkVersion":I
.end local v5 # "targetSandboxVersion":I
.end local v6 # "isPrivileged":Z
:cond_e6
invoke-static {v2, v3}, Landroid/os/Trace;->traceEnd(J)V
.line 8598
nop
.line 8599
return-void
.line 8597
:catchall_eb
move-exception v4
goto :goto_f3
.line 8594
:catch_ed
move-exception v4
.line 8595
.local v4, "e":Landroid/content/pm/PackageParser$PackageParserException;
:try_start_ee
invoke-static {v4}, Lcom/android/server/pm/PackageManagerException;->from(Landroid/content/pm/PackageParser$PackageParserException;)Lcom/android/server/pm/PackageManagerException;
move-result-object v5
throw v5
:try_end_f3
.catchall {:try_start_ee .. :try_end_f3} :catchall_eb
.line 8597
.end local v4 # "e":Landroid/content/pm/PackageParser$PackageParserException;
:goto_f3
invoke-static {v2, v3}, Landroid/os/Trace;->traceEnd(J)V
throw v4
.end method
4) Look for this method in com/android/server/pm/PackageManagerService.smali
Code:
.method public constructor <init>(Landroid/content/Context;Lcom/android/server/pm/Installer;ZZ)V
Inside this method add this part (take care of 0x1070057 it must be replaced by the one you've added in framework-res.apk):
Code:
.line 2420
invoke-virtual/range {p1 .. p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v1, 0x1070057
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lcom/android/server/pm/PackageManagerServiceUtils;->createSignatures([Ljava/lang/String;)[Landroid/content/pm/Signature;
move-result-object v0
iput-object v0, v13, Lcom/android/server/pm/PackageManagerService;->mVendorPlatformSignatures:[Landroid/content/pm/Signature;
Add the above code just before this:
Code:
.line 2428
move/from16 v5, p3
iput-boolean v5, v13, Lcom/android/server/pm/PackageManagerService;->mFactoryTest:Z
.line 2429
iput-boolean v11, v13, Lcom/android/server/pm/PackageManagerService;->mOnlyCore:Z
.line 2430
new-instance v0, Landroid/util/DisplayMetrics;
invoke-direct {v0}, Landroid/util/DisplayMetrics;-><init>()V
iput-object v0, v13, Lcom/android/server/pm/PackageManagerService;->mMetrics:Landroid/util/DisplayMetrics;
.line 2431
iput-object v15, v13, Lcom/android/server/pm/PackageManagerService;->mInstaller:Lcom/android/server/pm/Installer;
.line 2434
iget-object v1, v13, Lcom/android/server/pm/PackageManagerService;->mInstallLock:Ljava/lang/Object;
monitor-enter v1
5) Add this field at the top of in com/android/server/pm/PackageManagerService.smali
Code:
.field private final mVendorPlatformSignatures:[Landroid/content/pm/Signature;
6) Add this method in com/android/server/pm/PackageManagerServiceUtils.smali
Code:
.method public static compareSignatures2([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.registers 9
.param p0, "s1" # [Landroid/content/pm/Signature;
.param p1, "s2" # [Landroid/content/pm/Signature;
.line 411
const/4 v0, 0x0
return v0
.end method
7) Add this method in com/android/server/pm/PackageManagerServiceUtils.smali
Code:
.method public static createSignatures([Ljava/lang/String;)[Landroid/content/pm/Signature;
.registers 5
.param p0, "hexBytes" # [Ljava/lang/String;
.line 708
array-length v0, p0
new-array v0, v0, [Landroid/content/pm/Signature;
.line 709
.local v0, "sigs":[Landroid/content/pm/Signature;
const/4 v1, 0x0
.local v1, "i":I
:goto_4
array-length v2, v0
if-ge v1, v2, :cond_13
.line 710
new-instance v2, Landroid/content/pm/Signature;
aget-object v3, p0, v1
invoke-direct {v2, v3}, Landroid/content/pm/Signature;-><init>(Ljava/lang/String;)V
aput-object v2, v0, v1
.line 709
add-int/lit8 v1, v1, 0x1
goto :goto_4
.line 712
.end local v1 # "i":I
:cond_13
return-object v0
.end method
8) Find this method in com/android/server/pm/permission/PermissionManagerService.smali
Code:
.method constructor <init>(Landroid/content/Context;Lcom/android/server/pm/permission/DefaultPermissionGrantPolicy$DefaultPermissionGrantedCallback;Ljava/lang/Object;)V
Replace whole method by (take care of 0x1070057 it must be replaced by the one you've added in framework-res.apk):
Code:
.method constructor <init>(Landroid/content/Context;Lcom/android/server/pm/permission/DefaultPermissionGrantPolicy$DefaultPermissionGrantedCallback;Ljava/lang/Object;)V
.registers 14
.param p1, "context" # Landroid/content/Context;
.param p2, "defaultGrantCallback" # Lcom/android/server/pm/permission/DefaultPermissionGrantPolicy$DefaultPermissionGrantedCallback;
.param p3, "externalLock" # Ljava/lang/Object;
.line 144
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 130
new-instance v0, Lcom/android/internal/logging/MetricsLogger;
invoke-direct {v0}, Lcom/android/internal/logging/MetricsLogger;-><init>()V
iput-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mMetricsLogger:Lcom/android/internal/logging/MetricsLogger;
.line 145
iput-object p1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mContext:Landroid/content/Context;
.line 146
iput-object p3, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mLock:Ljava/lang/Object;
.line 147
const-class v0, Landroid/content/pm/PackageManagerInternal;
invoke-static {v0}, Lcom/android/server/LocalServices;->getService(Ljava/lang/Class;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/content/pm/PackageManagerInternal;
iput-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
.line 148
const-class v0, Landroid/os/UserManagerInternal;
invoke-static {v0}, Lcom/android/server/LocalServices;->getService(Ljava/lang/Class;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/UserManagerInternal;
iput-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mUserManagerInt:Landroid/os/UserManagerInternal;
.line 149
new-instance v0, Lcom/android/server/pm/permission/PermissionSettings;
iget-object v1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mLock:Ljava/lang/Object;
invoke-direct {v0, p1, v1}, Lcom/android/server/pm/permission/PermissionSettings;-><init>(Landroid/content/Context;Ljava/lang/Object;)V
iput-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mSettings:Lcom/android/server/pm/permission/PermissionSettings;
.line 151
new-instance v0, Lcom/android/server/ServiceThread;
const-string v1, "PackageManager"
const/4 v2, 0x1
const/16 v3, 0xa
invoke-direct {v0, v1, v3, v2}, Lcom/android/server/ServiceThread;-><init>(Ljava/lang/String;IZ)V
iput-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mHandlerThread:Landroid/os/HandlerThread;
.line 153
iget-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mHandlerThread:Landroid/os/HandlerThread;
invoke-virtual {v0}, Landroid/os/HandlerThread;->start()V
.line 154
new-instance v0, Landroid/os/Handler;
iget-object v1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mHandlerThread:Landroid/os/HandlerThread;
invoke-virtual {v1}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;
move-result-object v1
invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V
iput-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mHandler:Landroid/os/Handler;
.line 155
invoke-static {}, Lcom/android/server/Watchdog;->getInstance()Lcom/android/server/Watchdog;
move-result-object v0
iget-object v1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mHandler:Landroid/os/Handler;
invoke-virtual {v0, v1}, Lcom/android/server/Watchdog;->addThread(Landroid/os/Handler;)V
.line 157
new-instance v0, Lcom/android/server/pm/permission/DefaultPermissionGrantPolicy;
iget-object v1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mHandlerThread:Landroid/os/HandlerThread;
.line 158
invoke-virtual {v1}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;
move-result-object v1
invoke-direct {v0, p1, v1, p2, p0}, Lcom/android/server/pm/permission/DefaultPermissionGrantPolicy;-><init>(Landroid/content/Context;Landroid/os/Looper;Lcom/android/server/pm/permission/DefaultPermissionGrantPolicy$DefaultPermissionGrantedCallback;Lcom/android/server/pm/permission/PermissionManagerService;)V
iput-object v0, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mDefaultPermissionGrantPolicy:Lcom/android/server/pm/permission/DefaultPermissionGrantPolicy;
.line 159
invoke-static {}, Lcom/android/server/SystemConfig;->getInstance()Lcom/android/server/SystemConfig;
move-result-object v0
.line 160
.local v0, "systemConfig":Lcom/android/server/SystemConfig;
invoke-virtual {v0}, Lcom/android/server/SystemConfig;->getSystemPermissions()Landroid/util/SparseArray;
move-result-object v1
iput-object v1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mSystemPermissions:Landroid/util/SparseArray;
.line 161
invoke-virtual {v0}, Lcom/android/server/SystemConfig;->getGlobalGids()[I
move-result-object v1
iput-object v1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mGlobalGids:[I
.line 168
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v3, 0x1070057
invoke-virtual {v1, v3}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;
move-result-object v1
.line 167
invoke-static {v1}, Lcom/android/server/pm/PackageManagerServiceUtils;->createSignatures([Ljava/lang/String;)[Landroid/content/pm/Signature;
move-result-object v1
iput-object v1, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mVendorPlatformSignatures:[Landroid/content/pm/Signature;
.line 165
invoke-static {}, Lcom/android/server/SystemConfig;->getInstance()Lcom/android/server/SystemConfig;
move-result-object v1
invoke-virtual {v1}, Lcom/android/server/SystemConfig;->getPermissions()Landroid/util/ArrayMap;
move-result-object v1
.line 166
.local v1, "permConfig":Landroid/util/ArrayMap;, "Landroid/util/ArrayMap<Ljava/lang/String;Lcom/android/server/SystemConfig$PermissionEntry;>;"
iget-object v3, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mLock:Ljava/lang/Object;
monitor-enter v3
.line 167
const/4 v4, 0x0
.local v4, "i":I
:goto_7b
:try_start_7b
invoke-virtual {v1}, Landroid/util/ArrayMap;->size()I
move-result v5
if-ge v4, v5, :cond_b0
.line 168
invoke-virtual {v1, v4}, Landroid/util/ArrayMap;->valueAt(I)Ljava/lang/Object;
move-result-object v5
check-cast v5, Lcom/android/server/SystemConfig$PermissionEntry;
.line 169
.local v5, "perm":Lcom/android/server/SystemConfig$PermissionEntry;
iget-object v6, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mSettings:Lcom/android/server/pm/permission/PermissionSettings;
iget-object v7, v5, Lcom/android/server/SystemConfig$PermissionEntry;->name:Ljava/lang/String;
invoke-virtual {v6, v7}, Lcom/android/server/pm/permission/PermissionSettings;->getPermissionLocked(Ljava/lang/String;)Lcom/android/server/pm/permission/BasePermission;
move-result-object v6
.line 170
.local v6, "bp":Lcom/android/server/pm/permission/BasePermission;
if-nez v6, :cond_a2
.line 171
new-instance v7, Lcom/android/server/pm/permission/BasePermission;
iget-object v8, v5, Lcom/android/server/SystemConfig$PermissionEntry;->name:Ljava/lang/String;
const-string v9, "android"
invoke-direct {v7, v8, v9, v2}, Lcom/android/server/pm/permission/BasePermission;-><init>(Ljava/lang/String;Ljava/lang/String;I)V
move-object v6, v7
.line 172
iget-object v7, p0, Lcom/android/server/pm/permission/PermissionManagerService;->mSettings:Lcom/android/server/pm/permission/PermissionSettings;
iget-object v8, v5, Lcom/android/server/SystemConfig$PermissionEntry;->name:Ljava/lang/String;
invoke-virtual {v7, v8, v6}, Lcom/android/server/pm/permission/PermissionSettings;->putPermissionLocked(Ljava/lang/String;Lcom/android/server/pm/permission/BasePermission;)V
.line 174
:cond_a2
iget-object v7, v5, Lcom/android/server/SystemConfig$PermissionEntry;->gids:[I
if-eqz v7, :cond_ad
.line 175
iget-object v7, v5, Lcom/android/server/SystemConfig$PermissionEntry;->gids:[I
iget-boolean v8, v5, Lcom/android/server/SystemConfig$PermissionEntry;->perUser:Z
invoke-virtual {v6, v7, v8}, Lcom/android/server/pm/permission/BasePermission;->setGids([IZ)V
.line 167
.end local v5 # "perm":Lcom/android/server/SystemConfig$PermissionEntry;
.end local v6 # "bp":Lcom/android/server/pm/permission/BasePermission;
:cond_ad
add-int/lit8 v4, v4, 0x1
goto :goto_7b
.line 178
.end local v4 # "i":I
:cond_b0
monitor-exit v3
:try_end_b1
.catchall {:try_start_7b .. :try_end_b1} :catchall_bd
.line 180
const-class v2, Lcom/android/server/pm/permission/PermissionManagerInternal;
new-instance v3, Lcom/android/server/pm/permission/PermissionManagerService$PermissionManagerInternalImpl;
const/4 v4, 0x0
invoke-direct {v3, p0, v4}, Lcom/android/server/pm/permission/PermissionManagerService$PermissionManagerInternalImpl;-><init>(Lcom/android/server/pm/permission/PermissionManagerService;Lcom/android/server/pm/permission/PermissionManagerService$1;)V
invoke-static {v2, v3}, Lcom/android/server/LocalServices;->addService(Ljava/lang/Class;Ljava/lang/Object;)V
.line 182
return-void
.line 178
:catchall_bd
move-exception v2
:try_start_be
monitor-exit v3
:try_end_bf
.catchall {:try_start_be .. :try_end_bf} :catchall_bd
throw v2
.end method
9) Look for this method in com/android/server/pm/permission/PermissionManagerService.smali
Code:
.method private grantSignaturePermission(Ljava/lang/String;Landroid/content/pm/PackageParser$Package;Lcom/android/server/pm/permission/BasePermission;Lcom/android/server/pm/permission/PermissionsState;)Z
Replace whole method by:
Code:
.method private grantSignaturePermission(Ljava/lang/String;Landroid/content/pm/PackageParser$Package;Lcom/android/server/pm/permission/BasePermission;Lcom/android/server/pm/permission/PermissionsState;)Z
.registers 26
.param p1, "perm" # Ljava/lang/String;
.param p2, "pkg" # Landroid/content/pm/PackageParser$Package;
.param p3, "bp" # Lcom/android/server/pm/permission/BasePermission;
.param p4, "origPermissions" # Lcom/android/server/pm/permission/PermissionsState;
move-object/from16 v0, p0
move-object/from16 v1, p1
move-object/from16 v2, p2
.line 1046
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isOEM()Z
move-result v3
.line 1047
.local v3, "oemPermission":Z
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isVendorPrivileged()Z
move-result v4
.line 1048
.local v4, "vendorPrivilegedPermission":Z
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isPrivileged()Z
move-result v5
const/4 v7, 0x0
if-nez v5, :cond_1e
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isVendorPrivileged()Z
move-result v5
if-eqz v5, :cond_1c
goto :goto_1e
:cond_1c
move v5, v7
goto :goto_1f
:cond_1e
:goto_1e
const/4 v5, 0x1
.line 1049
.local v5, "privilegedPermission":Z
:goto_1f
sget-boolean v8, Lcom/android/internal/os/RoSystemProperties;->CONTROL_PRIVAPP_PERMISSIONS_DISABLE:Z
.line 1051
.local v8, "privappPermissionsDisable":Z
const-string v9, "android"
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->getSourcePackageName()Ljava/lang/String;
move-result-object v10
invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v9
.line 1052
.local v9, "platformPermission":Z
const-string v10, "android"
iget-object v11, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
invoke-virtual {v10, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v10
.line 1053
.local v10, "platformPackage":Z
if-nez v8, :cond_e2
if-eqz v5, :cond_e2
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isPrivileged()Z
move-result v11
if-eqz v11, :cond_e2
if-nez v10, :cond_e2
if-eqz v9, :cond_e2
.line 1055
invoke-direct/range {p0 .. p2}, Lcom/android/server/pm/permission/PermissionManagerService;->hasPrivappWhitelistEntry(Ljava/lang/String;Landroid/content/pm/PackageParser$Package;)Z
move-result v11
if-nez v11, :cond_e2
.line 1057
iget-boolean v11, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mSystemReady:Z
if-nez v11, :cond_dd
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isUpdatedSystemApp()Z
move-result v11
if-nez v11, :cond_dd
.line 1059
const/4 v11, 0x0
.line 1060
.local v11, "deniedPermissions":Landroid/util/ArraySet;, "Landroid/util/ArraySet<Ljava/lang/String;>;"
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isVendor()Z
move-result v12
if-eqz v12, :cond_63
.line 1061
invoke-static {}, Lcom/android/server/SystemConfig;->getInstance()Lcom/android/server/SystemConfig;
move-result-object v12
iget-object v13, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
.line 1062
invoke-virtual {v12, v13}, Lcom/android/server/SystemConfig;->getVendorPrivAppDenyPermissions(Ljava/lang/String;)Landroid/util/ArraySet;
move-result-object v11
goto :goto_7e
.line 1063
:cond_63
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isProduct()Z
move-result v12
if-eqz v12, :cond_74
.line 1064
invoke-static {}, Lcom/android/server/SystemConfig;->getInstance()Lcom/android/server/SystemConfig;
move-result-object v12
iget-object v13, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
.line 1065
invoke-virtual {v12, v13}, Lcom/android/server/SystemConfig;->getProductPrivAppDenyPermissions(Ljava/lang/String;)Landroid/util/ArraySet;
move-result-object v11
goto :goto_7e
.line 1067
:cond_74
invoke-static {}, Lcom/android/server/SystemConfig;->getInstance()Lcom/android/server/SystemConfig;
move-result-object v12
iget-object v13, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
.line 1068
invoke-virtual {v12, v13}, Lcom/android/server/SystemConfig;->getPrivAppDenyPermissions(Ljava/lang/String;)Landroid/util/ArraySet;
move-result-object v11
.line 1070
:goto_7e
if-eqz v11, :cond_89
.line 1071
invoke-virtual {v11, v1}, Landroid/util/ArraySet;->contains(Ljava/lang/Object;)Z
move-result v12
if-nez v12, :cond_87
goto :goto_89
:cond_87
move v12, v7
goto :goto_8a
:cond_89
:goto_89
const/4 v12, 0x1
.line 1072
.local v12, "permissionViolation":Z
:goto_8a
if-eqz v12, :cond_dc
.line 1073
const-string v13, "PackageManager"
new-instance v14, Ljava/lang/StringBuilder;
invoke-direct {v14}, Ljava/lang/StringBuilder;-><init>()V
const-string v15, "Privileged permission "
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v14, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v15, " for package "
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v15, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v15, " - not in privapp-permissions whitelist"
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v14}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v14
invoke-static {v13, v14}, Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 1076
sget-boolean v13, Lcom/android/internal/os/RoSystemProperties;->CONTROL_PRIVAPP_PERMISSIONS_ENFORCE:Z
if-eqz v13, :cond_dd
.line 1077
iget-object v13, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPrivappPermissionsViolations:Landroid/util/ArraySet;
if-nez v13, :cond_c0
.line 1078
new-instance v13, Landroid/util/ArraySet;
invoke-direct {v13}, Landroid/util/ArraySet;-><init>()V
iput-object v13, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPrivappPermissionsViolations:Landroid/util/ArraySet;
.line 1080
:cond_c0
iget-object v13, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPrivappPermissionsViolations:Landroid/util/ArraySet;
new-instance v14, Ljava/lang/StringBuilder;
invoke-direct {v14}, Ljava/lang/StringBuilder;-><init>()V
iget-object v15, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v15, ": "
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v14, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v14}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v14
invoke-virtual {v13, v14}, Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z
goto :goto_dd
.line 1083
:cond_dc
return v7
.line 1086
.end local v11 # "deniedPermissions":Landroid/util/ArraySet;, "Landroid/util/ArraySet<Ljava/lang/String;>;"
.end local v12 # "permissionViolation":Z
:cond_dd
:goto_dd
sget-boolean v11, Lcom/android/internal/os/RoSystemProperties;->CONTROL_PRIVAPP_PERMISSIONS_ENFORCE:Z
if-eqz v11, :cond_e2
.line 1087
return v7
.line 1091
:cond_e2
iget-object v11, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
invoke-virtual {v11, v7, v7}, Landroid/content/pm/PackageManagerInternal;->getKnownPackageName(II)Ljava/lang/String;
move-result-object v11
.line 1093
.local v11, "systemPackageName":Ljava/lang/String;
iget-object v12, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
.line 1094
invoke-virtual {v12, v11}, Landroid/content/pm/PackageManagerInternal;->getPackage(Ljava/lang/String;)Landroid/content/pm/PackageParser$Package;
move-result-object v12
.line 1104
.local v12, "systemPackage":Landroid/content/pm/PackageParser$Package;
iget-object v13, v2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
.line 1106
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->getSourcePackageSetting()Lcom/android/server/pm/PackageSettingBase;
move-result-object v14
invoke-virtual {v14}, Lcom/android/server/pm/PackageSettingBase;->getSigningDetails()Landroid/content/pm/PackageParser$SigningDetails;
move-result-object v14
.line 1105
invoke-virtual {v13, v14}, Landroid/content/pm/PackageParser$SigningDetails;->hasAncestorOrSelf(Landroid/content/pm/PackageParser$SigningDetails;)Z
move-result v13
if-nez v13, :cond_132
.line 1107
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->getSourcePackageSetting()Lcom/android/server/pm/PackageSettingBase;
move-result-object v13
invoke-virtual {v13}, Lcom/android/server/pm/PackageSettingBase;->getSigningDetails()Landroid/content/pm/PackageParser$SigningDetails;
move-result-object v13
iget-object v14, v2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
const/4 v15, 0x4
invoke-virtual {v13, v14, v15}, Landroid/content/pm/PackageParser$SigningDetails;->checkCapability(Landroid/content/pm/PackageParser$SigningDetails;I)Z
move-result v13
if-nez v13, :cond_132
iget-object v13, v2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v14, v12, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
.line 1110
invoke-virtual {v13, v14}, Landroid/content/pm/PackageParser$SigningDetails;->hasAncestorOrSelf(Landroid/content/pm/PackageParser$SigningDetails;)Z
move-result v13
if-nez v13, :cond_132
iget-object v13, v12, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v14, v2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
.line 1111
invoke-virtual {v13, v14, v15}, Landroid/content/pm/PackageParser$SigningDetails;->checkCapability(Landroid/content/pm/PackageParser$SigningDetails;I)Z
move-result v13
if-nez v13, :cond_132
iget-object v13, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mVendorPlatformSignatures:[Landroid/content/pm/Signature;
iget-object v14, v2, Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
iget-object v14, v14, Landroid/content/pm/PackageParser$SigningDetails;->signatures:[Landroid/content/pm/Signature;
.line 1114
invoke-static {v13, v14}, Lcom/android/server/pm/PackageManagerServiceUtils;->compareSignatures2([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
move-result v13
if-nez v13, :cond_130
goto :goto_132
:cond_130
move v13, v7
goto :goto_133
:cond_132
:goto_132
const/4 v13, 0x1
.line 1116
.local v13, "allowed":Z
:goto_133
if-nez v13, :cond_25f
if-nez v5, :cond_139
if-eqz v3, :cond_25f
.line 1117
:cond_139
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isSystem()Z
move-result v14
if-eqz v14, :cond_25f
.line 1120
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isUpdatedSystemApp()Z
move-result v14
if-eqz v14, :cond_20e
.line 1121
iget-object v14, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
iget-object v15, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
.line 1122
invoke-virtual {v14, v15}, Landroid/content/pm/PackageManagerInternal;->getDisabledPackage(Ljava/lang/String;)Landroid/content/pm/PackageParser$Package;
move-result-object v14
.line 1124
.local v14, "disabledPkg":Landroid/content/pm/PackageParser$Package;
if-eqz v14, :cond_154
iget-object v15, v14, Landroid/content/pm/PackageParser$Package;->mExtras:Ljava/lang/Object;
check-cast v15, Lcom/android/server/pm/PackageSetting;
goto :goto_155
:cond_154
const/4 v15, 0x0
.line 1125
.local v15, "disabledPs":Lcom/android/server/pm/PackageSetting;
:goto_155
if-eqz v15, :cond_17a
.line 1126
invoke-virtual {v15}, Lcom/android/server/pm/PackageSetting;->getPermissionsState()Lcom/android/server/pm/permission/PermissionsState;
move-result-object v6
invoke-virtual {v6, v1}, Lcom/android/server/pm/permission/PermissionsState;->hasInstallPermission(Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_17a
.line 1130
if-eqz v5, :cond_169
invoke-virtual {v15}, Lcom/android/server/pm/PackageSetting;->isPrivileged()Z
move-result v6
if-nez v6, :cond_177
:cond_169
if-eqz v3, :cond_20d
.line 1131
invoke-virtual {v15}, Lcom/android/server/pm/PackageSetting;->isOem()Z
move-result v6
if-eqz v6, :cond_20d
.line 1132
invoke-static {v15, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->canGrantOemPermission(Lcom/android/server/pm/PackageSetting;Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_20d
.line 1133
:cond_177
const/4 v13, 0x1
goto/16 :goto_20d
.line 1142
:cond_17a
if-eqz v15, :cond_19b
if-eqz v14, :cond_19b
.line 1143
invoke-direct {v0, v14, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->isPackageRequestingPermission(Landroid/content/pm/PackageParser$Package;Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_19b
if-eqz v5, :cond_18c
.line 1144
invoke-virtual {v15}, Lcom/android/server/pm/PackageSetting;->isPrivileged()Z
move-result v6
if-nez v6, :cond_19a
:cond_18c
if-eqz v3, :cond_19b
.line 1145
invoke-virtual {v15}, Lcom/android/server/pm/PackageSetting;->isOem()Z
move-result v6
if-eqz v6, :cond_19b
.line 1146
invoke-static {v15, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->canGrantOemPermission(Lcom/android/server/pm/PackageSetting;Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_19b
.line 1147
:cond_19a
const/4 v13, 0x1
.line 1152
:cond_19b
iget-object v6, v2, Landroid/content/pm/PackageParser$Package;->parentPackage:Landroid/content/pm/PackageParser$Package;
if-eqz v6, :cond_20d
.line 1153
iget-object v6, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
iget-object v7, v2, Landroid/content/pm/PackageParser$Package;->parentPackage:Landroid/content/pm/PackageParser$Package;
iget-object v7, v7, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
.line 1154
invoke-virtual {v6, v7}, Landroid/content/pm/PackageManagerInternal;->getDisabledPackage(Ljava/lang/String;)Landroid/content/pm/PackageParser$Package;
move-result-object v6
.line 1155
.local v6, "disabledParentPkg":Landroid/content/pm/PackageParser$Package;
if-eqz v6, :cond_1b0
.line 1156
iget-object v7, v6, Landroid/content/pm/PackageParser$Package;->mExtras:Ljava/lang/Object;
check-cast v7, Lcom/android/server/pm/PackageSetting;
goto :goto_1b1
:cond_1b0
const/4 v7, 0x0
.line 1157
.local v7, "disabledParentPs":Lcom/android/server/pm/PackageSetting;
:goto_1b1
if-eqz v6, :cond_20d
if-eqz v5, :cond_1bb
.line 1158
invoke-virtual {v7}, Lcom/android/server/pm/PackageSetting;->isPrivileged()Z
move-result v16
if-nez v16, :cond_1c3
:cond_1bb
if-eqz v3, :cond_20d
.line 1159
invoke-virtual {v7}, Lcom/android/server/pm/PackageSetting;->isOem()Z
move-result v16
if-eqz v16, :cond_20d
.line 1160
:cond_1c3
invoke-direct {v0, v6, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->isPackageRequestingPermission(Landroid/content/pm/PackageParser$Package;Ljava/lang/String;)Z
move-result v16
if-eqz v16, :cond_1d1
.line 1161
invoke-static {v7, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->canGrantOemPermission(Lcom/android/server/pm/PackageSetting;Ljava/lang/String;)Z
move-result v16
if-eqz v16, :cond_1d1
.line 1162
const/4 v13, 0x1
goto :goto_20d
.line 1163
:cond_1d1
move-object/from16 v17, v7
iget-object v7, v6, Landroid/content/pm/PackageParser$Package;->childPackages:Ljava/util/ArrayList;
.end local v7 # "disabledParentPs":Lcom/android/server/pm/PackageSetting;
.local v17, "disabledParentPs":Lcom/android/server/pm/PackageSetting;
if-eqz v7, :cond_20d
.line 1165
iget-object v7, v6, Landroid/content/pm/PackageParser$Package;->childPackages:Ljava/util/ArrayList;
invoke-virtual {v7}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v7
:goto_1dd
invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z
move-result v16
if-eqz v16, :cond_20d
invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v16
move-object/from16 v18, v6
move-object/from16 v6, v16
check-cast v6, Landroid/content/pm/PackageParser$Package;
.line 1167
.local v6, "disabledChildPkg":Landroid/content/pm/PackageParser$Package;
.local v18, "disabledParentPkg":Landroid/content/pm/PackageParser$Package;
if-eqz v6, :cond_1f6
.line 1168
move-object/from16 v19, v7
iget-object v7, v6, Landroid/content/pm/PackageParser$Package;->mExtras:Ljava/lang/Object;
check-cast v7, Lcom/android/server/pm/PackageSetting;
goto :goto_1f9
.line 1169
:cond_1f6
move-object/from16 v19, v7
const/4 v7, 0x0
.line 1170
.local v7, "disabledChildPs":Lcom/android/server/pm/PackageSetting;
:goto_1f9
invoke-direct {v0, v6, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->isPackageRequestingPermission(Landroid/content/pm/PackageParser$Package;Ljava/lang/String;)Z
move-result v16
if-eqz v16, :cond_207
.line 1171
invoke-static {v7, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->canGrantOemPermission(Lcom/android/server/pm/PackageSetting;Ljava/lang/String;)Z
move-result v16
if-eqz v16, :cond_207
.line 1173
const/4 v13, 0x1
.line 1174
goto :goto_20d
.line 1176
.end local v6 # "disabledChildPkg":Landroid/content/pm/PackageParser$Package;
.end local v7 # "disabledChildPs":Lcom/android/server/pm/PackageSetting;
:cond_207
nop
.line 1165
move-object/from16 v6, v18
move-object/from16 v7, v19
goto :goto_1dd
.line 1181
.end local v14 # "disabledPkg":Landroid/content/pm/PackageParser$Package;
.end local v15 # "disabledPs":Lcom/android/server/pm/PackageSetting;
.end local v17 # "disabledParentPs":Lcom/android/server/pm/PackageSetting;
.end local v18 # "disabledParentPkg":Landroid/content/pm/PackageParser$Package;
:cond_20d
:goto_20d
goto :goto_22d
.line 1182
:cond_20e
iget-object v6, v2, Landroid/content/pm/PackageParser$Package;->mExtras:Ljava/lang/Object;
check-cast v6, Lcom/android/server/pm/PackageSetting;
.line 1183
.local v6, "ps":Lcom/android/server/pm/PackageSetting;
if-eqz v5, :cond_21a
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isPrivileged()Z
move-result v7
if-nez v7, :cond_228
:cond_21a
if-eqz v3, :cond_22a
.line 1184
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isOem()Z
move-result v7
if-eqz v7, :cond_22a
.line 1185
invoke-static {v6, v1}, Lcom/android/server/pm/permission/PermissionManagerService;->canGrantOemPermission(Lcom/android/server/pm/PackageSetting;Ljava/lang/String;)Z
move-result v7
if-eqz v7, :cond_22a
:cond_228
const/4 v7, 0x1
goto :goto_22b
:cond_22a
const/4 v7, 0x0
:goto_22b
move v6, v7
.line 1190
.end local v13 # "allowed":Z
.local v6, "allowed":Z
move v13, v6
.end local v6 # "allowed":Z
.restart local v13 # "allowed":Z
:goto_22d
if-eqz v13, :cond_25f
if-eqz v5, :cond_25f
if-nez v4, :cond_25f
.line 1191
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isVendor()Z
move-result v6
if-eqz v6, :cond_25f
.line 1192
const-string v6, "PackageManager"
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v14, "Permission "
invoke-virtual {v7, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v14, " cannot be granted to privileged vendor apk "
invoke-virtual {v7, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v14, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
invoke-virtual {v7, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v14, " because it isn\'t a \'vendorPrivileged\' permission."
invoke-virtual {v7, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
invoke-static {v6, v7}, Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 1194
const/4 v13, 0x0
.line 1198
:cond_25f
if-nez v13, :cond_2f8
.line 1199
if-nez v13, :cond_272
.line 1200
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isPre23()Z
move-result v6
if-eqz v6, :cond_272
iget-object v6, v2, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
iget v6, v6, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
const/16 v7, 0x17
if-ge v6, v7, :cond_272
.line 1205
const/4 v13, 0x1
.line 1207
:cond_272
if-nez v13, :cond_28b
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isInstaller()Z
move-result v6
if-eqz v6, :cond_28b
iget-object v6, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
iget-object v7, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
const/4 v14, 0x2
.line 1208
const/4 v15, 0x0
invoke-virtual {v7, v14, v15}, Landroid/content/pm/PackageManagerInternal;->getKnownPackageName(II)Ljava/lang/String;
move-result-object v7
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_28b
.line 1212
const/4 v13, 0x1
.line 1214
:cond_28b
if-nez v13, :cond_2a4
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isVerifier()Z
move-result v6
if-eqz v6, :cond_2a4
iget-object v6, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
iget-object v7, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
const/4 v14, 0x3
.line 1215
const/4 v15, 0x0
invoke-virtual {v7, v14, v15}, Landroid/content/pm/PackageManagerInternal;->getKnownPackageName(II)Ljava/lang/String;
move-result-object v7
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_2a4
.line 1219
const/4 v13, 0x1
.line 1221
:cond_2a4
if-nez v13, :cond_2b3
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isPreInstalled()Z
move-result v6
if-eqz v6, :cond_2b3
.line 1222
invoke-virtual/range {p2 .. p2}, Landroid/content/pm/PackageParser$Package;->isSystem()Z
move-result v6
if-eqz v6, :cond_2b3
.line 1224
const/4 v13, 0x1
.line 1226
:cond_2b3
if-nez v13, :cond_2c2
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isDevelopment()Z
move-result v6
if-eqz v6, :cond_2c2
.line 1229
move-object/from16 v6, p4
invoke-virtual {v6, v1}, Lcom/android/server/pm/permission/PermissionsState;->hasInstallPermission(Ljava/lang/String;)Z
move-result v13
goto :goto_2c4
.line 1231
:cond_2c2
move-object/from16 v6, p4
:goto_2c4
if-nez v13, :cond_2de
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isSetup()Z
move-result v7
if-eqz v7, :cond_2de
iget-object v7, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
iget-object v14, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
.line 1232
const/4 v1, 0x1
const/4 v15, 0x0
invoke-virtual {v14, v1, v15}, Landroid/content/pm/PackageManagerInternal;->getKnownPackageName(II)Ljava/lang/String;
move-result-object v1
invoke-virtual {v7, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_2de
.line 1236
const/4 v1, 0x1
.line 1238
.end local v13 # "allowed":Z
.local v1, "allowed":Z
move v13, v1
.end local v1 # "allowed":Z
.restart local v13 # "allowed":Z
:cond_2de
if-nez v13, :cond_2fa
invoke-virtual/range {p3 .. p3}, Lcom/android/server/pm/permission/BasePermission;->isSystemTextClassifier()Z
move-result v1
if-eqz v1, :cond_2fa
iget-object v1, v2, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
iget-object v7, v0, Lcom/android/server/pm/permission/PermissionManagerService;->mPackageManagerInt:Landroid/content/pm/PackageManagerInternal;
const/4 v14, 0x5
.line 1239
const/4 v15, 0x0
invoke-virtual {v7, v14, v15}, Landroid/content/pm/PackageManagerInternal;->getKnownPackageName(II)Ljava/lang/String;
move-result-object v7
invoke-virtual {v1, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_2fa
.line 1243
const/4 v13, 0x1
goto :goto_2fa
.line 1246
:cond_2f8
move-object/from16 v6, p4
:cond_2fa
:goto_2fa
return v13
.end method
10) Add this field at the top of in com/android/server/pm/permission/PermissionManagerService
Code:
.field private final mVendorPlatformSignatures:[Landroid/content/pm/Signature;
Explanations:
This code will give platform signature to all apk by default so you can resign them as you want.
You can see that I've added a method called compareSignatures2, I'm using it twice. Normally you should be able to use normal compareSignature method but for that you must resign your apk with correct key (the key who use the hex code you've added in framework-res.apk), unfortunately I haven't be able to do it yet.
Here's an interesting commit
https://github.com/pixeldustproject...mmit/09262632845eb971e222ae9aaa41277a87d00558
It allows to specify a vendor signature who will be recognize as the platform signature.
I've implemented it to my rom but how can I use this signature. The vendor signature used by this commit is a numeric code.
How can we find which key is use.
Envoyé de mon H8266 en utilisant Tapatalk
anyone ?
Still haven't found a solution [emoji53]
Envoyé de mon H8266 en utilisant Tapatalk
Have u seen the core-oj.jar ? Signature check can be disabled there ..
thereassaad said:
Have u seen the core-oj.jar ? Signature check can be disabled there ..
Click to expand...
Click to collapse
I’ll take a look [emoji6]
Envoyé de mon iPhone en utilisant Tapatalk
niaboc79 said:
Hi guys,
I need devs to help me to find a way to disable signature verification on Pie.
The old patching of compare signature method doesn't work anymore.
Could a java pro analyse PackageManagerService to find how to allow signature of core apps with a different signature.
Thanks
Envoyé de mon H8266 en utilisant Tapatalk
Click to expand...
Click to collapse
Hi!
Have you found a way to disable signature verification on Pie?
scrubber said:
Hi!
Have you found a way to disable signature verification on Pie?
Click to expand...
Click to collapse
Yes I've used the commit linked above [emoji3]
I've edited the code a little bit and it works [emoji6]
Envoyé de mon H8266 en utilisant Tapatalk
niaboc79 said:
Yes I've used the commit linked above [emoji3]
I've edited the code a little bit and it works [emoji6]
Envoyé de mon H8266 en utilisant Tapatalk
Click to expand...
Click to collapse
Share the manual!
How did you do it ???
:good: :laugh:
scrubber said:
Share the manual!
How did you do it ???
:good: :laugh:
Click to expand...
Click to collapse
I think the numeric ID is just the signature of the public key, which you can get from keytool in JDK iirc.
CosmicDan said:
I think the numeric ID is just the signature of the public key, which you can get from keytool in JDK iirc.
Click to expand...
Click to collapse
How can this help us to disable signature verification on Pie?
scrubber said:
Share the manual!
How did you do it ???
:good: [emoji23]
Click to expand...
Click to collapse
ASAP [emoji3]
Envoyé de mon H8266 en utilisant Tapatalk
CosmicDan said:
I think the numeric ID is just the signature of the public key, which you can get from keytool in JDK iirc.
Click to expand...
Click to collapse
If you're building aosp or any rom, yes you can sign any apk with platform signature.
But with pre compiled rom we don't have access to private keys.
Envoyé de mon H8266 en utilisant Tapatalk
ASAP ))))))
scrubber said:
How can this help us to disable signature verification on Pie?
Click to expand...
Click to collapse
In fact we won't disable signature verification, we'll add a new platform signature accepted by the package manager [emoji16]
Envoyé de mon H8266 en utilisant Tapatalk
niaboc79 said:
If you're building aosp or any rom, yes you can sign any apk with platform signature.
But with pre compiled rom we don't have access to private keys.
Envoyé de mon H8266 en utilisant Tapatalk
Click to expand...
Click to collapse
I agree. We need the Disable signature verification on Pie method.
niaboc79 said:
In fact we won't disable signature verification, we'll add a new platform signature accepted by the package manager [emoji16]
Envoyé de mon H8266 en utilisant Tapatalk
Click to expand...
Click to collapse
niaboc79;78415563
No need for secrets .. We are all developers!
Share with us your success in disable signature verification.
My mods do not work for me because of the new protection system .. and I am very sad :crying:
scrubber said:
niaboc79;78415563
No need for secrets .. We are all developers!
Share with us your success in disable signature verification.
My mods do not work for me because of the new protection system .. and I am very sad :crying:
Click to expand...
Click to collapse
I told you as soon as possible...
So wait [emoji57]
Envoyé de mon H8266 en utilisant Tapatalk
niaboc79 said:
I told you as soon as possible...
So wait [emoji57]
Envoyé de mon H8266 en utilisant Tapatalk
Click to expand...
Click to collapse
See pm bro @niaboc79
Great job with superuser mod btw ^^
scrubber said:
How can this help us to disable signature verification on Pie?
Click to expand...
Click to collapse
Why do you want to disable it completely? That's a terrible idea.
Re-sign the packages in question with your own signature, then use the commit you linked. You asked how/what the numeric ID is for, and I explained what I think it is - it's based on public key afaik so re-signing is not necessary, but useful for consistency. All the puzzle pieces are there. I did a similar thing back when I worked for Xtreamer on their Android devices.