Related
Well, this a very simple guide on adding 6 lockscreen mod to your rom.
Files To be downloaded :
1. android.policy.zip
2. Lidroid-res.apk
3. Lidroid-Parts
Files to be Affected :
1. android.policy.jar
2. systemui.apk (only if you have added 14 status bar toggles before)
Steps :
-Pullout android.policy.jar from '/system/framework' (Must be Deodexed)
-Decompile it (Please dont expect a guide on how to decompile)
-Extract the android.policy.zip file
-copy the smali folder to directory where you decompiled your android.policy.jar
-Now open this file android.policy.jar.out\smali\com\android\internal\policy\impl\KeyguardUpdateMonitor.smali and make the following changes :
-At the begining after '#annonations' search for this line "Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$AirplaneModeChangeCallback;"
after that add this line
Code:
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;,
-Now find this line ".field private mLockscreenWallpaperDrawable:Landroid/graphics/drawable/Drawable;"
-Below it paste this line
Code:
.field private mMediaCallbacks:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;",
">;"
}
.end annotation
.end field
-Find this line ".field private mWallpaperModeValue:I"
and jus below paste this
Code:
.field private timezone:Ljava/lang/String;
-Now find this method ".method private handleSimStateChange(Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$SimArgsV"
and above it paste this :
Code:
.method private handleMediaUpdate(IILandroid/net/Uri;)V
.locals 5
.parameter "isPlaying"
.parameter "isStop"
.parameter "mediaUri"
.prologue
const/4 v4, 0x0
const/4 v3, 0x1
.line 467
if-ne p1, v3, :cond_0
move v0, v3
.line 468
.local v0, bIsPlaying:Z
:goto_0
if-ne p2, v3, :cond_1
move v1, v3
.line 470
.local v1, bIsStop:Z
:goto_1
const/4 v2, 0x0
.local v2, i:I
:goto_2
iget-object v3, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mMediaCallbacks:Ljava/util/ArrayList;
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v3
if-ge v2, v3, :cond_2
.line 471
iget-object v3, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mMediaCallbacks:Ljava/util/ArrayList;
invoke-virtual {v3, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;
invoke-interface {v3, v0, v1, p3}, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;->onMediaUpdated(ZZLandroid/net/Uri;)V
.line 470
add-int/lit8 v2, v2, 0x1
goto :goto_2
.end local v0 #bIsPlaying:Z
.end local v1 #bIsStop:Z
.end local v2 #i:I
:cond_0
move v0, v4
.line 467
goto :goto_0
.restart local v0 #bIsPlaying:Z
:cond_1
move v1, v4
.line 468
goto :goto_1
.line 473
.restart local v1 #bIsStop:Z
.restart local v2 #i:I
:cond_2
return-void
.end method
-Now find this line ".method public getFailedAttempts()I"
above it again paste this :
Code:
.method public getChangedTimeZone()Ljava/lang/String;
.locals 1
.prologue
.line 1131
iget-object v0, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->timezone:Ljava/lang/String;
return-object v0
.end method
this one's last for this file , search for ".method public isDevicePluggedIn()Z"
and above it paste :
Code:
.method public isDeviceCharged()Z
.locals 2
.prologue
.line 866
iget v0, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mBatteryLevel:I
const/16 v1, 0x64
if-lt v0, v1, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
-Now close this file and open "\smali\com\android\internal\policy\impl\LockPatternKeyguardView"
-Search for this method now ".method createLockScreen()Landroid/view/View;"
Find this (Jus one line below)
Code:
.prologue
.line 868
below it paste this :
Code:
const/4 v2, 0x0
const/4 v0, 0x0
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "lockscreen_style_pref"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
const/4 v2, 0x1
if-eq v2, v0, :cond_3
const/4 v2, 0x2
if-eq v2, v0, :cond_3
const/4 v2, 0x3
if-eq v2, v0, :cond_3
const/4 v2, 0x4
if-eq v2, v0, :cond_3
const/4 v2, 0x5
if-eq v2, v0, :cond_3
if-eqz v0, :cond_0
.line 869
const/4 v2, 0x0
const/4 v0, 0x0
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "lockscreen_style_pref"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
const/4 v2, 0x6
if-eq v2, v0, :cond_2
const/4 v2, 0x7
if-eq v2, v0, :cond_1
:cond_0
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_0
:cond_1
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_0
:cond_2
after ':cond_2' there will be your default lockscreen so dont leave any line between them.
After the end of your default lockscreen , it might be like this
" invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/CircleLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallbackV
"
paste this
Code:
:goto_0
then on the next line after "return-object v0"
paste this
Code:
:cond_3
new-instance v0, Lcom/android/internal/policy/impl/CyanogenLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/CyanogenLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_0
Now you may save and close the file.
Now recompile the android.policy.jar and push it to /system/framework with lidroid-res.apk .
Also Push the Lidroid-Parts.apk to '/system/app'
In case If you already have 14 toggles in the status bar adding this may affect it resulting in force closes . So to fix it follow this :
*Prooceed here only if you have 14 status bar toggles mod in your rom*
1.Decompile SystemUI.apk
2.Delete these two folders (if present) : /smali/com/lidroid & /smali/lidroid
3.Download Status_bar_fix from attachments below.
4.Extract it and copy the smali folder to your decompiled SystemUI.apk
5.Recompile and push the SystemUI.apk back to /system/app
Credits
Lidroid - This Mod Isnt Possible without him.
Regarding any help please prefer commenting on this thread rather than sending PM's.
nice guide :good:
Cool... Great guide... Thanks Aryan ^_^
Does the 6 lockscreen include ICS lockscreen? And do I have to download lidroid res? I already had it in my current rom ...
Sent from my GT-S5360 using xda app-developers app
advance user :|
I can't wait for the update.
Please update soon sir
:good::good::good:
ocoot said:
advance user :|
Click to expand...
Click to collapse
its actually quite easy. .
AvijitGhosh82 said:
Does the 6 lockscreen include ICS lockscreen? And do I have to download lidroid res? I already had it in my current rom ...
Sent from my GT-S5360 using xda app-developers app
Click to expand...
Click to collapse
Yes...the new res file contains resources for cyanogen lockscreens..
Waiting for 14 toggle fix!!
Sent from my GT-S5360 using XDA
Good one thanks pratyush
If my status bar is themed, what happens when I add lidroid res apk? Does the theme stay or go away? Thanks.
Sent from my GT-S5360 using xda app-developers app
awesome guide siirrr...:good: but my Status bar FC :laugh:
Creed when are u going to put d 14 toggle fix??
Sent from my GT-S6102 using xda premium
Bhocan said:
awesome guide siirrr...:good: but my Status bar FC :laugh:
Click to expand...
Click to collapse
Was busy for a bit...will put up the status bar fix today !!
pratyush.creed said:
Was busy for a bit...will put up the status bar fix today !!
Click to expand...
Click to collapse
Ohkz.. Gr8.. Eagerly w8ing!!!.
Dude 1 more qs?? Dude u hav put d code for only 6 lockscreens.. But actually there are 9 rite??
Sent from my GT-S6102 using xda premium
Only 6 in this...
Means u knoe how to make only 6 work or in this post there are 6 only?? Coz in ur Rom its 8 and in cyanogen 9...
Sent from my GT-S6102 using xda premium
Status Bar fix added to the guide ... Do not forget to sign your apps after applying it
pratyush.creed said:
Status Bar fix added to the guide ... Do not forget to sign your apps after applying it
Click to expand...
Click to collapse
putting modded classes.dex and res in original systemUI.apk will not work?
The fix you've added....do we have to use it AFTER the lockscreen adding part? Or is it a separate part?
Sent from my GT-S5360 using xda app-developers app
Creed can u add 2 more lockscreens??
Sent from my GT-S6102 using xda premium
Okay, since it seems like I only get about 3 people who actually want to download and use my ROM (actually its more like 4....LOL) I will just try to contribute by releasing some more "How-Too's" for those DEVs who want to use them.
As always feel free to use these MODs with your ROM but since it took a few days to get this coded correctly just give me some thanks and some credit in your thread please.
[Q] What does this MOD do?
[A] It allows you to toggle between TW lock screen or AOSP lock screen.
*****EDIT******
If you experience your lock screen freezing when you turn it to landscape mode, just go to lockscreen options and make sure all settings are UNTICKED......except for AOSP lockscreen that is .
Thanks to jdub251 for the feedback.
Here are the goodies.....
We will be working in two files.
-SecSettings
-android.policy
As always, I will assume you know how to compile/decompile so I will not be providing information how to do that.
Lets begin with the easiest file, Android.policy.jar
Navigate to smali/com/android/internal/policy/imp/LockPatternKeyguardView
Find the following code
Code:
.method createLockScreen()Landroid/view/View;
We are going to replace the whole method with the following code.
Code:
.method createLockScreen()Landroid/view/View;
.locals 6
.prologue
.line 1268
const/4 v0, 0x0
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v5}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v5
const-string v4, "enable_aosp_lock"
invoke-static {v5, v4, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v5
if-nez v5, :cond_0
.line 1044
new-instance v0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/sec/CircleLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
.line 1274
.local v0, lockView:Landroid/view/View;
:goto_0
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V
.line 1275
return-object v0
:cond_0
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
.line 1274
goto :goto_0
.end method
Thats it for android.policy.jar. Recompile and push to /system/app. If you want to Diff out the exact changes feel free.
Now for SecSettings.
Navigate to res/values/strings
Add the following lines somewhere in this file. In the middle or end, it doesnt matter.
Code:
<string name="enable_aosp_lock">Enable AOSP lockscreen</string>
<string name="enable_aosp_lock_text">Enable AOSP lockscreen in place of circle lockscreen</string>
Navigate to res/xml/Lockscreen_Settings.xml
Add the following line below in RED.
Code:
<PreferenceCategory android:title="@string/display_settings" />
[COLOR="red"]<CheckBoxPreference android:title="@string/enable_aosp_lock" android:key="enable_aosp_lock" android:summary="@string/enable_aosp_lock_text" />
[/COLOR] <SwitchPreferenceScreen android:title="@string/lock_screen_shortcut_title" android:key="lock_screen_shortcut" android:summary="@string/lock_screen_shortcut_summary">
Now lets hit some smali.....
Still in SecSettings, lets navigate to smali/com/android/settings/LockScreenSettings
Find the following code
Code:
.field private mWeather:Landroid/preference/SwitchPreferenceScreen;
Add this line below it
Code:
.field private mAospLock:Landroid/preference/CheckBoxPreference;
Find the following code and add the parts in RED
Code:
.method private updateState()V
.locals 9
.prologue
const/4 v5, 0x1
const/4 v6, 0x0
.line 263
[COLOR="Red"]iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "enable_aosp_lock"
invoke-static {v4, v8, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-eqz v4, :cond_7
move v4, v5
invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 265
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
[/COLOR]
iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mClock:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v8, "show_clock"
Find the following code and add the parts in RED
Code:
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mClock:Landroid/preference/CheckBoxPreference;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setPersistent(Z)V
[COLOR="red"]const-string v9, "enable_aosp_lock"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
check-cast v9, Landroid/preference/CheckBoxPreference;
iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
.line 159
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setPersistent(Z)V
[/COLOR]
.line 161
const-string v9, "weather"
invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v9
Find the following code and add the parts in RED
Code:
:cond_9
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, [COLOR="red"]:cond_b
[/COLOR]
.line 338
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v5, "wake_up_lock_screen"
iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
invoke-virtual {v6}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v6
if-eqz v6, :cond_a
Find the following code and add the parts in RED
Code:
invoke-static {v4, v5, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1
:cond_a
move v2, v3
goto :goto_5
[COLOR="red"]:cond_b
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_0
.line 313
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v5, "enable_aosp_lock"
iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;
invoke-virtual {v6}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v6
if-eqz v6, :cond_c
:goto_6
invoke-static {v4, v5, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 314
invoke-direct {p0}, Lcom/android/settings/LockScreenSettings;->updateState()V
.line 340
invoke-super {p0, p1, p2}, Lcom/android/settings/SettingsPreferenceFragment;->onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
move-result v2
return v2
:cond_c
move v2, v3
.line 313
goto :goto_6
[/COLOR]
.line 337
.end method
.method public onResume()V
.locals 0
.prologue
.line 257
invoke-super {p0}, Lcom/android/settings/SettingsPreferenceFragment;->onResume()V
.line 258
invoke-direct {p0}, Lcom/android/settings/LockScreenSettings;->updateState()V
Thats it! Recompile and push to /system/app
You will find your new toggle in lockscreen options.
Enjoy!
The newest version for BLK3 has a few other mods included in it as well. See the installer screen when installing for specifics. This is meant for Stock Deodexed RoMs.If your using a custom ROM this will break the theme and maybe other stuff. Enjoy.
BLK3 AOSP Lockscreen ZIP
Thanks Button!
Awesome work as always bud!!!
Seriously... always a pleasure working with you...
Sent from my SPH-L900 using Xparent ICS Tapatalk 2
Argh I thought this was the answer to my prayers, a zip file. I appreciate the tutorial but it looks Chinese to a dunce like myself. No zip file? I desperately want to keep touch wiz but want aosp lock screen to afraid I'm going to screw my phone up.
dukins said:
Argh I thought this was the answer to my prayers, a zip file. I appreciate the tutorial but it looks Chinese to a dunce like myself. No zip file? I desperately want to keep touch wiz but want aosp lock screen to afraid I'm going to screw my phone up.
Click to expand...
Click to collapse
I also wonder if it's possible to have something more semi-automatic...
Seems very complicated, especially since I flash new ROM's every few days.... Thank you so much for putting the time into such a great tutorial though!! I will definitely try it out soon, because I love the ASOP lockscreen.
Edit: one request - can you post a picture of the ASOP lockscreen we would have? Thank you!
Nightwind Hawk said:
I also wonder if it's possible to have something more semi-automatic...
Seems very complicated, especially since I flash new ROM's every few days.... Thank you so much for putting the time into such a great tutorial though!! I will definitely try it out soon, because I love the ASOP lockscreen.
Edit: one request - can you post a picture of the ASOP lockscreen we would have? Thank you!
Click to expand...
Click to collapse
This would give you AOSP lock with two extra shortcuts......Camera and Google. I am going to post up a tutorial on how to add more shortcuts soon.
Due to popular demand I am going to throw a flashable zip in the opening post. To be honest I didnt test it so nandroid first. This is my upgraded lockscreen with extra shortcuts. Let me know if this installs okay (it should). There may be some misc. other things included because I pulled this right out of my ROM. Enjoy!
Thanks Button!!
I'm gonna give it a shot.
Shh! maybe I'm just paranoid, but I think people are listening....
Just checked out your ROM. I missed it but will be giving it a shot when classes are over tomorrow for break lol
Sent from my SCH-I535 using xda app-developers app
tu3218 said:
Just checked out your ROM. I missed it but will be giving it a shot when classes are over tomorrow for break lol
Sent from my SCH-I535 using xda app-developers app
Click to expand...
Click to collapse
Thanks. I will release another soon with this MOD included.
I just flashed on clean ROM 3.5 an not seeing it in lock screen options.
Sent from my SCH-I535 using xda app-developers app
Didact74 said:
Let me know if this installs okay (it should).
Click to expand...
Click to collapse
Nothing on the flash. No option to enable
Sorry guys, it was my error. I packed the zip wrong. Thats what i get for rushing it.
Should be good now. Let me know.
Didact74 said:
Sorry guys, it was my error. I packed the zip wrong. Thats what i get for rushing it.
Should be good now. Let me know.
Click to expand...
Click to collapse
Fuggin saweeet!
EDIT:
Works perfectly on CleanROM 4.5.
Does it matter base of the ROM and if is deodexed or odexed? I'm in new leak and want to use this zip. When fixed is out of course
Sent from my SCH-I535 using xda premium
The revised zip file worked great on synergy r118. Frackin beautiful! Thanks.
Shh! maybe I'm just paranoid, but I think people are listening....
Works on Jelly Beans Build 3, but de-themes everything. Nandroid'd back, i gotta have my AOSP looks!
Works fine now. CR 4.5
dawiseguy77 said:
Does it matter base of the ROM and if is deodexed or odexed? I'm in new leak and want to use this zip. When fixed is out of course
Sent from my SCH-I535 using xda premium
Click to expand...
Click to collapse
Just needs to be a deodexed rom.
charlieg90 said:
Works on Jelly Beans Build 3, but de-themes everything. Nandroid'd back, i gotta have my AOSP looks!
Click to expand...
Click to collapse
Sorry, maybe your rom dev will pick up the mod so you can retain themes.
If you experience your lock screen freezing when you turn it to landscape mode, just go to lockscreen options and make sure all settings are UNTICKED......except for AOSP lockscreen that is .
Thanks to jdub251 for the feedback.
Glad you guys like it.
Didact74 said:
If you experience your lock screen freezing when you turn it to landscape mode, just go to lockscreen options and make sure all settings are UNTICKED......except for AOSP lockscreen that is .
Thanks to jdub251 for the feedback.
Glad you guys like it.
Click to expand...
Click to collapse
Thanks much appreciated. I havent tested it yet im in the process. If calendar events aren't included on the lockscreen is this something you could incorporate on the lock screen like cm10?
dukins said:
Thanks much appreciated. I havent tested it yet im in the process. If calendar events aren't included on the lockscreen is this something you could incorporate on the lock screen like cm10?
Click to expand...
Click to collapse
Currently working on adding calander and weather options. I will post up when I get it worked out.
Thanks
before proceed this guide, you must download this files : android.policy.zip, Lidroid-res.apk and Lidroid-Parts.
please notice that this guide based on stock deodex DXLF1 firmware
decompile your android.policy.jar
unzip android.policy.zip that u have download before
now copy lidroid folder from android.policy.zip\android.policy\smali to your android.policy.jar\smali
copy lidroid folder from android.policy.zip[/B]\android.policy\smali\com to your android.policy.jar\smali\com
copy CyanogenLockScreen.smali, CyanogenLockScreen$1.smali, CyanogenLockScreen$2.smali, CyanogenLockScreen$3.smali, CyanogenLockScreen$4.smali, CyanogenLockScreen$5.smali, CyanogenLockScreen$Status.smali and KeyguardUpdateMonitor$MediaStateCallback.smali from android.policy.zip\android.policy\smali\com\android\internal\policy\impl to your android.policy.jar\smali\com\android\internal\policy\impl
now edit KeyguardUpdateMonitor.smali from your android.policy.jar\smali\com\android\internal\policy\impl
find this (line 6)
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$LockscreenWallpaperCallback;,
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$PcwInfoChangeCallback;,
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$AirplaneModeChangeCallback;,
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$SimStateCallback;,
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$InfoCallback;,
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$ConfigurationChangeCallback;,
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$SimArgs;
}
.end annotation
add this line "Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;," below this line "Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$AirplaneModeChangeCallback;,"
after :
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$LockscreenWallpaperCallback;,
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$PcwInfoChangeCallback;,
[COLOR="blue"] Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$AirplaneModeChangeCallback;,[/COLOR]
[COLOR="Red"]Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;,[/COLOR]
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$SimStateCallback;,
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$InfoCallback;,
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$ConfigurationChangeCallback;,
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$SimArgs;
}
.end annotation
find this (line 160)
.field private mLockscreenWallpaperDrawable:Landroid/graphics/drawable/Drawable;
add this line below it
Code:
[COLOR="Red"].field private mMediaCallbacks:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;",
">;"
}
.end annotation
.end field[/COLOR]
after :
Code:
.field private mLockscreenWallpaperDrawable:Landroid/graphics/drawable/Drawable;
[COLOR="red"].field private mMediaCallbacks:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;",
">;"
}
.end annotation
.end field[/COLOR]
find this (line 202)
.field private mWallpaperModeValue:I
add this line below it
Code:
[COLOR="Red"].field private timezone:Ljava/lang/String;[/COLOR]
after :
Code:
.field private mWallpaperModeValue:I
[COLOR="red"].field private timezone:Ljava/lang/String;[/COLOR]
note: if u already has this line .field private timezone:Ljava/lang/String; below .field private mWallpaperModeValue:I , u may continue to next step.
find this (line 1772)
.method private handleSimStateChange(Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$SimArgsV
add this line above it
Code:
[COLOR="red"].method private handleMediaUpdate(IILandroid/net/Uri;)V
.locals 5
.parameter "isPlaying"
.parameter "isStop"
.parameter "mediaUri"
.prologue
const/4 v4, 0x0
const/4 v3, 0x1
.line 467
if-ne p1, v3, :cond_0
move v0, v3
.line 468
.local v0, bIsPlaying:Z
:goto_0
if-ne p2, v3, :cond_1
move v1, v3
.line 470
.local v1, bIsStop:Z
:goto_1
const/4 v2, 0x0
.local v2, i:I
:goto_2
iget-object v3, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mMediaCallbacks:Ljava/util/ArrayList;
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v3
if-ge v2, v3, :cond_2
.line 471
iget-object v3, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mMediaCallbacks:Ljava/util/ArrayList;
invoke-virtual {v3, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;
invoke-interface {v3, v0, v1, p3}, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;->onMediaUpdated(ZZLandroid/net/Uri;)V
.line 470
add-int/lit8 v2, v2, 0x1
goto :goto_2
.end local v0 #bIsPlaying:Z
.end local v1 #bIsStop:Z
.end local v2 #i:I
:cond_0
move v0, v4
.line 467
goto :goto_0
.restart local v0 #bIsPlaying:Z
:cond_1
move v1, v4
.line 468
goto :goto_1
.line 473
.restart local v1 #bIsStop:Z
.restart local v2 #i:I
:cond_2
return-void
.end method[/COLOR]
after :
Code:
[COLOR="red"].method private handleMediaUpdate(IILandroid/net/Uri;)V
.locals 5
.parameter "isPlaying"
.parameter "isStop"
.parameter "mediaUri"
.prologue
const/4 v4, 0x0
const/4 v3, 0x1
.line 467
if-ne p1, v3, :cond_0
move v0, v3
.line 468
.local v0, bIsPlaying:Z
:goto_0
if-ne p2, v3, :cond_1
move v1, v3
.line 470
.local v1, bIsStop:Z
:goto_1
const/4 v2, 0x0
.local v2, i:I
:goto_2
iget-object v3, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mMediaCallbacks:Ljava/util/ArrayList;
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v3
if-ge v2, v3, :cond_2
.line 471
iget-object v3, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mMediaCallbacks:Ljava/util/ArrayList;
invoke-virtual {v3, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;
invoke-interface {v3, v0, v1, p3}, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$MediaStateCallback;->onMediaUpdated(ZZLandroid/net/Uri;)V
.line 470
add-int/lit8 v2, v2, 0x1
goto :goto_2
.end local v0 #bIsPlaying:Z
.end local v1 #bIsStop:Z
.end local v2 #i:I
:cond_0
move v0, v4
.line 467
goto :goto_0
.restart local v0 #bIsPlaying:Z
:cond_1
move v1, v4
.line 468
goto :goto_1
.line 473
.restart local v1 #bIsStop:Z
.restart local v2 #i:I
:cond_2
return-void
.end method[/COLOR]
.method private handleSimStateChange(Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$SimArgs;)V
find this (line 2135)
.method public getFailedAttempts()I
add this line above it
Code:
.method public getChangedTimeZone()Ljava/lang/String;
.locals 1
.prologue
.line 1131
iget-object v0, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->timezone:Ljava/lang/String;
return-object v0
.end method
after :
Code:
[COLOR="red"].method public getChangedTimeZone()Ljava/lang/String;
.locals 1
.prologue
.line 1131
iget-object v0, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->timezone:Ljava/lang/String;
return-object v0
.end method[/COLOR]
.method public getFailedAttempts()I
find this (line 2315)
.method public isDevicePluggedIn()Z
add this line above it
Code:
.method public isDeviceCharged()Z
.locals 2
.prologue
.line 866
iget v0, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mBatteryLevel:I
const/16 v1, 0x64
if-lt v0, v1, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
after
Code:
[COLOR="red"].method public isDeviceCharged()Z
.locals 2
.prologue
.line 866
iget v0, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mBatteryLevel:I
const/16 v1, 0x64
if-lt v0, v1, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method[/COLOR]
.method public isDevicePluggedIn()Z
close and save.
now edit LockPatternKeyguardView.smali from your android.policy.jar\smali\com\android\internal\policy\impl
find this (line 2007)
.method createLockScreen()Landroid/view/View;
below this line
.prologue
.line 892
add this line
Code:
[COLOR="red"]const/4 v2, 0x0
const/4 v0, 0x0
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "lockscreen_style_pref"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
const/4 v2, 0x1
if-eq v2, v0, :cond_3
const/4 v2, 0x2
if-eq v2, v0, :cond_3
const/4 v2, 0x3
if-eq v2, v0, :cond_3
const/4 v2, 0x4
if-eq v2, v0, :cond_3
const/4 v2, 0x5
if-eq v2, v0, :cond_3
if-eqz v0, :cond_0
.line 869
const/4 v2, 0x0
const/4 v0, 0x0
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "lockscreen_style_pref"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
const/4 v2, 0x6
if-eq v2, v0, :cond_2
const/4 v2, 0x7
if-eq v2, v0, :cond_1
:cond_0
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_0
:cond_1
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_0
:cond_2[/COLOR]
after :
Code:
.method createLockScreen()Landroid/view/View;
.registers 7
.prologue
.line 892
[COLOR="red"]const/4 v2, 0x0
const/4 v0, 0x0
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "lockscreen_style_pref"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
const/4 v2, 0x1
if-eq v2, v0, :cond_3
const/4 v2, 0x2
if-eq v2, v0, :cond_3
const/4 v2, 0x3
if-eq v2, v0, :cond_3
const/4 v2, 0x4
if-eq v2, v0, :cond_3
const/4 v2, 0x5
if-eq v2, v0, :cond_3
if-eqz v0, :cond_0
.line 869
const/4 v2, 0x0
const/4 v0, 0x0
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "lockscreen_style_pref"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
const/4 v2, 0x6
if-eq v2, v0, :cond_2
const/4 v2, 0x7
if-eq v2, v0, :cond_1
:cond_0
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_0
:cond_1
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_0
:cond_2[/COLOR]
fine this (line 2129)
Code:
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/GlassLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
.line 907
:goto_13
return-object v0
and change to this
Code:
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/GlassLockScreen;-><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
[COLOR="Red"]:goto_0[/COLOR]
.line 907
:goto_13
return-object v0
[COLOR="red"]:cond_3
new-instance v0, Lcom/android/internal/policy/impl/CyanogenLockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/CyanogenLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
goto :goto_0
[/COLOR]
save and close.
recompile android.policy.jar, set permission r-w-r-r and push to /system/framework and also with lidroid-res.apk.
set permission r-w-r-r and push Lidroid-Parts.apk to /system/app
note : if u already have 14 toggle please go to this thread to avoid force close
i hope u like it, and dont forget to press thanks :good::good::good:
credit : [email protected]
hey,have can add the "image slide" lockscreen?
Nice guide
If i help you press thanks button
sent by my Y using hyperion rom frm XDA Premium
@OP, looks like you're really sharing your thoughts bro.. thabjs a lot for this... by the way... can i request for a simple TUT bro on how to make "14 toggles work when your systemui already had swipe to remove codes" pls... i always end up frustration... resulted to fc
Sent from my GT-S5360 using xda premium
OP,I know you just wanted to share the information.But still,is it really needed?.Pratyush.creed has an awesome guide
Original Thread
.I know you've given the credits.But a copy paste tut isnt gonna help.And also put the original thread link in the Start of OP.Just a suggestion
Yes i already done And i dont just copy paste all of tread since original thread based on galaxy fit. I put some informative lines that direct exactly which line to edit but if u think im just copycat and this thread is not usefull then @mod please delete this thread since i think everyone in here good at development. Im just sharing to other noob as me. IMHO
Sent from my GT-S5360 using xda premium
any screen masbro ?
is this only aosp lockscreen? or can you choose from several lockscreens with lidroid parts?
kentoi me said:
@OP, looks like you're really sharing your thoughts bro.. thabjs a lot for this... by the way... can i request for a simple TUT bro on how to make "14 toggles work when your systemui already had swipe to remove codes" pls... i always end up frustration... resulted to fc
Sent from my GT-S5360 using xda premium
Click to expand...
Click to collapse
try this its worked for me
YudhiezChitilieaz said:
any screen masbro ?
Click to expand...
Click to collapse
1 sliding tab
2 rotary
3 rotary revamped
4 lense
5 ring
6 samsung stock
mjz2cool said:
is this only aosp lockscreen? or can you choose from several lockscreens with lidroid parts?
Click to expand...
Click to collapse
its only have 6 lockscreen (5 + 1 stock lockscreen), see screenshoot
Can u add image sliding ??
"T}{@ÑK$" ÑøT TÕ $Ä¥ Jû§T Pr€ë$ ÎT...!!!
Sent From MY ¥ Dûø$ Üs!nG ËvÕ X RoM V¡Å XpArEnT TaPtAlK 2
Any reference or ss or what rom? I try to googling seems cant find it
Sent from my GT-S5360 using xda premium
d3cka said:
its only have 6 lockscreen (5 + 1 stock lockscreen), see screenshoot
Click to expand...
Click to collapse
i posted too soon thanks anyway, trying right now
EliTSamsunG said:
hey,have can add the "image slide" lockscreen?
Click to expand...
Click to collapse
samsoul16 said:
Can u add image sliding ??
"T}{@ÑK$" ÑøT TÕ $Ä¥ Jû§T Pr€ë$ ÎT...!!!
Sent From MY ¥ Dûø$ Üs!nG ËvÕ X RoM V¡Å XpArEnT TaPtAlK 2
Click to expand...
Click to collapse
try this one :
decompile android.policy.jar, edit LockPatternKeyguardView.smali and find
(line 155)
iput-boolean v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->CIRCLELOCK_MODE:Z
and change to
iput-boolean v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->CIRCLELOCK_MODE:Z
save and compile.
note: this mod will replace ur stock lockscreen (swipe to remove) to image lockscreen
d3cka said:
try this one :
decompile android.policy.jar, edit LockPatternKeyguardView.smali and find
(line 155)
iput-boolean v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->CIRCLELOCK_MODE:Z
and change to
iput-boolean v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->CIRCLELOCK_MODE:Z
save and compile.
note: this mod will replace ur stock lockscreen (swipe to remove) to image lockscreen
Click to expand...
Click to collapse
if u want only the AOSP lockscreen then
Find in lockpatternkeyguardview.smali
Code:
.method createLockScreen()Landroid/view/View;
find that method
mine is
Code:
.method createLockScreen()Landroid/view/View;
.locals 6
.prologue
.line 868
new-instance v0, Lcom/android/internal/policy/impl/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/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
return-object v0
.end method
now change it to this
Code:
.method createLockScreen()Landroid/view/View;
.locals 6
.prologue
.line 868
[COLOR="red"] new-instance v0, Lcom/android/internal/policy/impl/LockScreen;[/COLOR]
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;
[COLOR="Red"] 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[/COLOR]
return-object v0
.end method
Noticed red codes ?
well thats the changed parts
this enables the old sliding tab lockscreen or when u use Galaxy Y or ace i
u will have an old SGS2 lockscreen
Thanks for the guide bro
Sent from my GT-S5360 using xda premium
Did you all guys know a xda thread for Guide 8 lockscreen for galaxy y?
can't get it recompiled, always gettin errors (screenshot in attachements)
could somebody please help me? i have also attached my android.policy.jar and my modified smali files.
Pls search how to decompile .jar file
Sent from my GT-S5360 using Tapatalk 2
Hello guys im here to share my knowledge since alot off member ask for this mod i mean how to added this option to ur rom
First of all i would like to thanks Jimmy Lam for his framework and android.policy.jar from which i learnt by comparing
Requirements
Attached File
Notepad++
Backsmali Manager
Apktool
Patience
Brain Off cource
Click to expand...
Click to collapse
Ok i have divided this Guide in Two Parts to make it easy
In First Part we will edit framework and in second part we will edit android policy.jar
Part-1
Decompile Your framework-res.apk and move to
Code:
framework-res\res\values
Open Strings.xml with notepad++ or any other tool you use
paste the following lines in the end
Code:
<string name="global_action_reboot_now">Restart</string>
<string name="global_action_reboot_recovery">Recovery</string>
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Close it and recompile.
Then again decompile and move to
Code:
framework-res\res\values
and note the following ids (you may have different)
Here we end our First Part.
Part-2
Decompile your android.policy.jar using backsmali managaer or any other tool
vDownload and extract the attached file to
Code:
android.policy\com\android\internal\policy\impl
Then open GlobalActions.smali
And do how i say
Before
Code:
.line 165
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;
const v2, 0x104013c
invoke-direct {v1, p0, v12, v2}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 185
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
After
Just Add the Bold ( For A7/A5 Users just copy paste )
Code:
.line 165
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;
const v2, 0x104013a
invoke-direct {v1, p0, v12, v2}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
[B].line 183
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$8;
const v2, [COLOR="Red"]0x104054d[/COLOR]
invoke-direct {v1, p0, v12, v2}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 184
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$9;
const v2, [COLOR="Red"]0x104054e[/COLOR]
invoke-direct {v1, p0, v12, v2}, Lcom/android/internal/policy/impl/GlobalActions$9;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z[/B]
.line 185
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
Note: Note Ids must be same as you noted in part 1
Code:
[COLOR="Red"]Only Replace last 7 digits of IDS when renaming in the above step [/COLOR]
Recompile and replace the classes.dex using Z-zip
Yipeee You Now have 3 Way boot:victory:
This Guide is tested by me and is working Fine
I have uploaded the Modded files for A5/A7/A7+ users so they can download and enjoy
Device Tested for this MOD
Karbonn A5
Karbonn A7
Karbonn A7+
Spice Mi355
Walton Primo
......Report yours if it works for you
Click to expand...
Click to collapse
Screenshot
Hit thanks to show your appreciation, it encourages me
reserved
one more reserved just in case
Tried this on a110 didnt get success.
Will try again and let u know.
Its not for touchwiz ROMs right
but how to change the icons of the restart and recovery option?
ahmed.zunaid said:
but how to change the icons of the restart and recovery option?
Click to expand...
Click to collapse
Thats a drawback of this MOD that it uses the icon of power off only
ahmed.zunaid said:
but how to change the icons of the restart and recovery option?
Click to expand...
Click to collapse
Inside framework res APK......Res folder....Hdpi folder....add two PNG and rename them to above names....
Sent from my Micromax A116 using Tapatalk 2
Dark4Droid said:
Inside framework res APK......Res folder....Hdpi folder....add two PNG and rename them to above names....
Sent from my Micromax A116 using Tapatalk 2
Click to expand...
Click to collapse
No need as the MOD uses the png of power off only
Is it only for ICS??
Sent from my Karbonn A9..
Ok.. This guide sparked my interest in getting this to work again - thank you.
So, it is working.. kind of.. But I broke the "Power off" option somehow.
This is what I did (only want Reboot, so I removed the Recovery option lines):
Added the strings and drawables to framework-res.. compiled, decompiled.. got my new public ids.
Added GlobalActions$9.smali to android.policy, and edited my GlobalActions.smali:
Original:
Code:
iget-object v0, v10, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;
const v2, 0x1080030
const v3, 0x1040142
invoke-direct {v1, v10, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
iget-boolean v0, v10, Lcom/android/internal/policy/impl/GlobalActions;->isDeepSleepSupported:Z
if-eqz v0, :cond_51
iget-object v0, v10, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$3;
const v2, 0x108060d
const v3, 0x1040567
const v4, 0x1040568
invoke-direct {v1, v10, v2, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$3;-><init>(Lcom/android/internal/policy/impl/GlobalActions;III)V
Modded:
Code:
iget-object v0, v10, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;
const v2, 0x1080030
const v3, 0x1040142
invoke-direct {v1, v10, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
[B]iget-object v0, v10, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$9;
const v2, 0x108064b
const v3, 0x10406aa
invoke-direct {v1, v10, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$9;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z[/B]
iget-boolean v0, v10, Lcom/android/internal/policy/impl/GlobalActions;->isDeepSleepSupported:Z
if-eqz v0, :cond_51
iget-object v0, v10, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$3;
const v2, 0x108060d
const v3, 0x1040567
const v4, 0x1040568
invoke-direct {v1, v10, v2, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$3;-><init>(Lcom/android/internal/policy/impl/GlobalActions;III)V
So, Reboot works with a new icon.. but it gives me the "Power off" prompts when I hit reboot (but reboots normally). And, the Power off option now gives no prompts and reboots the phone..
Any ideas for a simple fix?
EDIT: Got it working a little better now..
I cross-referenced this thread, and edited my ShutdownThread.smali, copied my existing GlobalActions$2.smali (the one with the Shutdown stuff in it), renamed it to GlobalActions$9 and added that "reboot" bit to it as suggested in the other guide.
Bro not working in jellybean will try and post if working in ICS later(now on jb )
Sent from my Micromax A120 Quadcore HD using xda premium
alteredlikeness said:
Ok.. This guide sparked my interest in getting this to work again - thank you.
So, it is working.. kind of.. But I broke the "Power off" option somehow.
This is what I did (only want Reboot, so I removed the Recovery option lines):
Added the strings and drawables to framework-res.. compiled, decompiled.. got my new public ids.
Added GlobalActions$9.smali to android.policy, and edited my GlobalActions.smali:
Original:
Code:
iget-object v0, v10, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;
const v2, 0x1080030
const v3, 0x1040142
invoke-direct {v1, v10, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
iget-boolean v0, v10, Lcom/android/internal/policy/impl/GlobalActions;->isDeepSleepSupported:Z
if-eqz v0, :cond_51
iget-object v0, v10, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$3;
const v2, 0x108060d
const v3, 0x1040567
const v4, 0x1040568
invoke-direct {v1, v10, v2, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$3;-><init>(Lcom/android/internal/policy/impl/GlobalActions;III)V
Modded:
Code:
iget-object v0, v10, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;
const v2, 0x1080030
const v3, 0x1040142
invoke-direct {v1, v10, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
[B]iget-object v0, v10, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$9;
const v2, 0x108064b
const v3, 0x10406aa
invoke-direct {v1, v10, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$9;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z[/B]
iget-boolean v0, v10, Lcom/android/internal/policy/impl/GlobalActions;->isDeepSleepSupported:Z
if-eqz v0, :cond_51
iget-object v0, v10, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$3;
const v2, 0x108060d
const v3, 0x1040567
const v4, 0x1040568
invoke-direct {v1, v10, v2, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$3;-><init>(Lcom/android/internal/policy/impl/GlobalActions;III)V
So, Reboot works with a new icon.. but it gives me the "Power off" prompts when I hit reboot (but reboots normally). And, the Power off option now gives no prompts and reboots the phone..
Any ideas for a simple fix?
EDIT: Got it working a little better now..
I cross-referenced this thread, and edited my ShutdownThread.smali, copied my existing GlobalActions$2.smali (the one with the Shutdown stuff in it), renamed it to GlobalActions$9 and added that "reboot" bit to it as suggested in the other guide.
Click to expand...
Click to collapse
Yeah actually this MOD uses every resource of Power Off but functions differently like Recovery will also show you power off prompt but will take you to recovery
Coudnt get it working on a110.
If u want to take a look up android.policy.jar tell me
.salil. said:
Coudnt get it working on a110.
If u want to take a look up android.policy.jar tell me
Click to expand...
Click to collapse
i am going to start developing on A110 as my friend has it and he wants a ROM from me so rather making only for him i will release it here also :angel: and i will try if it works on A110
karbonn A18
Hello guneet,
i am closely watching your every step towards success with a5.
can i ask you a favour?
i need this mod for karbonn a18 which runs on stock android 4.0.4
Pritesh.mohan said:
Hello guneet,
i am closely watching your every step towards success with a5.
can i ask you a favour?
i need this mod for karbonn a18 which runs on stock android 4.0.4
Click to expand...
Click to collapse
You can try it out with A18 and report in the thread
I don't find any credits.
is this your own work without reference?
shahulakthar said:
I don't find any credits.
is this your own work without reference?
Click to expand...
Click to collapse
Yeah this is my Own work and i have given thanks aka credits to the person which deserves that
The Droid Master said:
Yeah this is my Own work and i have given thanks aka credits to the person which deserves that
Click to expand...
Click to collapse
I missed 2nd line of ur post. Is there any success with a110? Any method to add them in JB?
shahulakthar said:
I missed 2nd line of ur post. Is there any success with a110? Any method to add them in JB?
Click to expand...
Click to collapse
Hmm bro i have not started my work for A110 as my friend(who has that device) is out of station so i will have to wait for him till then we(my team) is working on our Smart apps
Hello!
using ApkTool I created very simple MOD to achieve higher bitrates on video, include 3 lower format.
So, this MOD has following bitrates:
FHD 1920x1088 > 20 mbits
HD 1280x720 > 16 mbits
QHD 960x544 > 12 mbits
VGA 640x480 > 6 mbits
on good light conditions!
on less lights bitrates are lower ~ 25%.
MODifications in RecordLimitCheck.smali:
Code:
.method public setByteRate(Lcom/android/camera/HTCCamera;)V
...
...
.line 75
:cond_0
iget v3, v2, Lcom/android/camera/Resolution;->width:I
.line 79
.local v3, video_width:I
const v0, 0x11170
.line 80
.local v0, bitrate_setting:I
const/16 v4, 0x780
if-lt v3, v4, :cond_2
.line 81
const v0, [COLOR="Red"]20000000[/COLOR]
.line 120
:cond_1
:goto_1
iput v0, p0, Lcom/android/camera/RecordLimitCheck;->mVideoBitrate:I
.line 131
const/16 v1, 0x4e20
.line 132
.local v1, extraBitrate:I
add-int/2addr v0, v1
.line 134
div-int/lit8 v4, v0, 0x8
iput v4, p0, Lcom/android/camera/RecordLimitCheck;->mByteRate:I
goto :goto_0
.line 82
.end local v1 #extraBitrate:I
:cond_2
const/16 v4, 0x500
if-le v3, v4, :cond_3
.line 83
const v0, [COLOR="red"]16000000[/COLOR]
goto :goto_1
.line 84
:cond_3
const/16 v4, 0x3c0
if-le v3, v4, :cond_4
.line 85
const v0, [COLOR="red"]16000000[/COLOR]
goto :goto_1
.line 86
:cond_4
const/16 v4, 0x320
if-lt v3, v4, :cond_5
.line 87
const v0, [COLOR="red"]12000000[/COLOR]
goto :goto_1
.line 88
:cond_5
const/16 v4, 0x2d0
if-lt v3, v4, :cond_6
.line 89
const v0, [COLOR="red"]7000000[/COLOR]
goto :goto_1
.line 90
:cond_6
const/16 v4, 0x280
if-lt v3, v4, :cond_7
.line 91
const v0, [COLOR="red"]6000000[/COLOR]
goto :goto_1
howto install ? EASY
put MOD-file onto SDCARD and correct its name to HTCCamera.apk
open ES file explorer with root access & go to ROOT explorer > Mount RW & switch /system to RW
backup copy file HTCCamera to your SDCARD
then go to ROOT explorer > Uninstall system app, choose & uninstall Camera
wait few seconds.
go back to SDCARD & copy MOD to /system/app. change file attributes as -rw-r-r
go to ROOT explorer > Mount RW & switch /system back to R
exit from ES file explorer & in menu you should again see camera icons, but from desktops it can be missing;
just copy them again if you need.
no restart is need.
NOTE1:
I think, more correct is 19MBs bitrate;
this will fit 30 min video in 4GB file size.
NOTE2:
before increasing bitrate, be sure about SDCard speed!!!
2nd class SDCard has 2mbyte write speed >> 16mbits.
bcome said:
Correct me if I'm wrong, but I do believe that ARHD does 20mbit by default, since the following mod has been implemented in ARHD since 6.6.2.
http://forum.xda-developers.com/showthread.php?t=1533238
Click to expand...
Click to collapse
SORRY!
my misstape ARHD is 7.3, not as I wrote 3.7 in title;
I now will correct title..
Sorry if the answer is obvious, but does this work on aosp roms?
Sent from my HTC Sensation using xda app-developers app
PantsFullOfGuns said:
Sorry if the answer is obvious, but does this work on aosp roms?
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
Don't think so
updated first post with source showing MOD.