yashsingh1/xdaforums huggingface dataset:
[Verizon Samsung Galaxy S III] sbreen94:
Thanks again Didact, your quite the boss!!!
[Verizon Samsung Galaxy S III] Supercutetom:
I hated you in Halo 4.

Your Mod, however, is awesome. I thank you :)
[Verizon Samsung Galaxy S III] barrackOBAMA:
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!
[Verizon Samsung Galaxy S III] phenomarc:
You are the best!! I ve been locking for this very time, and now I will port to S2. Thanks
[Verizon Samsung Galaxy S III] andybones:
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.
[Verizon Samsung Galaxy S III] sbreen94:
Damn straight, such a boss didact is
[Verizon Samsung Galaxy S III] dan_joegibbsfan:
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!
[Verizon Samsung Galaxy S III] Didact74:
Thanks for the thanks! :)

Keep an eye out in the next few hours....got a new MOD coming I know you all will enjoy!
[Verizon Samsung Galaxy S III] sbreen94:
Hell yes such a boss
[Verizon Samsung Galaxy S III] phenomarc:
I'm having issues porting this to SGS2. Are there any differences in how to for s3 and how to for s2? Thanks!
[Verizon Samsung Galaxy S III] Thebear j koss:
i agree 100% with this statement. and your wife's statement. lol great work, i get a headache just reading all that code.
[Verizon Samsung Galaxy S III] rompnit:
What are the issues you are having? Won't build? No arrays? Fcs? Etc?
[Verizon Samsung Galaxy S III] phenomarc:
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!
[Verizon Samsung Galaxy S III] upndwn4par:
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:

<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:

<?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:

<string name="enable_lockscreen_torch">Lockscreen Torch</string>
<string name="enable_lockscreen_torch_text">Enable torch through lockscreen</string>
[Verizon Samsung Galaxy S III] Didact74:
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.
[Verizon Samsung Galaxy S III] vegeta1:
this is the error i was error , great one can you check

http://pastebin.com/31a7azFq
[Verizon Samsung Galaxy S III] upndwn4par:
Thanks. I actually already did what you suggested with just the xml mods in SecSettings and the menus work just fine (sorry, neglected to mention that).

I never thought about checking my registers. I have always used the ones in your guides and they always work just fine (this ain't my first didact74 mod ;)) even though I am on AT&T. Will check those tonight.

Also, I found a line of missing xml code for lockscreen_settings. I'll add that to my previous post.

I owe you a THANKS (none left for now).
[Verizon Samsung Galaxy S III] vegeta1:
again the same issue with sec settings

---------- Post added at 02:57 PM ---------- Previous post was at 02:03 PM ----------

+1 same goes with me , any way outs ??
[Verizon Samsung Galaxy S III] rompnit:
In the zip files.. didact\widget folder, you need to rename

AllianceSettings.smali

to

didactSettings.smali
[Verizon Samsung Galaxy S III] upndwn4par:
Thanks. Lockscreen settings still FC's for me though. But I haven't gone back and checked my registers yet. Will do that tonight.
[Verizon Samsung Galaxy S III] upndwn4par:
OK, so I diffed your modded LockScreenSettings.smali with stock VZW and it seems you increased the conds by one. I think this put them in conflict with some AT&T conds.

I couldn't post my onCreate and onPreferenceChange methods as you suggested because they exceeded the post size limit. So I attached my modded and stock LockScreenSettings.smali. Before I spend a lot of time re-mapping, I am hoping you can find a quick fix (or error on my part).

Thanks!
[Verizon Samsung Galaxy S III] andybones:
can you PM me and give me some info on conds and how to work with them, they are the one thing that seems to always mess me up when doing any smali work, thank you in advance. no worries if no time. :cool:
[Verizon Samsung Galaxy S III] upndwn4par:
I will help anyone in any way I can. But me helping you with smali would certainly be the blind leading the blind. :eek: Any original smali work I do is purely trial and error (this is true with most devs - they just won't admit it).

I would guess that for every 50 devs there is one that can code smali like Didact74. There are even fewer that are willing to share their awesomeness.
[Verizon Samsung Galaxy S III] Didact74:
Post up your issues. Maybe we can work them out as a group and help everyone :).
[Verizon Samsung Galaxy S III] upndwn4par:
I figured out what was causing lockscreen settings to FC. This was missing from LockScreenSettings:

.field private mLockScreenTorch:Landroid/preference/CheckBoxPreference;

On to the next problem...when I select a different lockscreen it doesn't change. No FC or anything, just stays on the same lockscreen (it's the lockscreen shown in your second screenshot. I assume that is the default).

Back to work....

P.S. Congrats on RD. Well deserved!
[Verizon Samsung Galaxy S III] Didact74:
Post up your "CreateLockScreen" method from your LockScreenKeyguardView.smali in Android.Policy.jar

...and thanks for the congrats!
[Verizon Samsung Galaxy S III] Didact74:
Okay, that looks good.

Lets see your lock_screen_settings.xml in SecSettings/res/xml

and

Lets see the following methods from SecSettings/com/android/settings/LockScreenSettings.smali

-"OnCreate" and "OnPreferenceTreeChange"
[Verizon Samsung Galaxy S III] upndwn4par:
Rather than use multiple posts to paste that code, I just attached the xml and smali files. Thanks!
[Verizon Samsung Galaxy S III] Didact74:
So you have a few odd things going on in your OnCreate method. For some reason you have re-numbered your ":goto_x" indicators so that :goto_9 and :goto_a are directly after one another with no code between them. This wont keep the mod from working but it should be cleaned up.

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

[COLOR="Red"]:goto_9

:goto_a
[/COLOR]

.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

The part thats keeping your mod from working however is your lack of follow-up to the MOD in the onPreferenceChange method. You

should

have (4) instances of your MOD key string in LockScreenSettings.smali and you only have three. The MOD key is "lockscreen_type_key".

You need to go back to the tutorial or whatever you are diffing the MOD from and add the needed code to the OnPreferenceChange method. Once you do that your MOD should work. Then you can go back and clean up the OnCreate stuff if you want to.

Keep us posted, this will help others as well!
[Verizon Samsung Galaxy S III] upndwn4par:
If you look at post #2 you will see that my code and yours are identical since I was following your guide. :D
[Verizon Samsung Galaxy S III] imjehh:
Thanks sire. Thank # 30 :D
[Verizon Samsung Galaxy S III] Didact74:
LOL...i know. There have been some corrections since the original went out. I will paste up acopy of my LockScreenSettings.smali for you to diff out.
[Verizon Samsung Galaxy S III] upndwn4par:
OK, I made some changes based on your LockSceenSettings and now I can choose different lockscreens. Thanks!

Some of the lockscreens are not working properly, but I can't rule out errors on my part. I will report back when I get these issues fixed.
[Verizon Samsung Galaxy S III] Didact74:
Great! Errors are most likely due to incorrect IDs in the new files you added to android policy jar. Double and triple check those IDs.

Good luck!
[Verizon Samsung Galaxy S III] ldrifta:
hey didact, first let me start by saying you are a genius!! lol to actually write these guides out and everything your such a huuuge plus to the android development community :D

now on to my typical noob question LOLOL, im also experiencing some issues at the very end of this guide to-do with secsettings portion, i cant garuntee 100% that all my ID's are correct but i mean i spent hours making sure they all matched up even did all smali files in didact folder etc.. made sure not to skip a beat ;)

so my issue somewhat relates to the one mentioned above but im not sure if the same solution will be used..

my first issue was the lockscreen_settings.xml caused by the torch line, then when i viewed your torch guide i didn't see anything related to adding the checkbox option in secsettings.apk so i was slightly flustered lol maybe i didn't read hard enough!!

but anyway i figured ok i can just remove that one line, so i did and all worked out so far.. but an issue still remains of trying to open the lockscreen settings.. the option doesn't exist lol, and when i try to open stock lockscreen options i get a system freeze :(

even thought i would love for you to hold my hand and guide me through it all, i dont expect that lol so i was hoping maybe you can just point me in the right direction and ill try figuring it out on my own lol, and if at all possible maybe you can shed some light on the torch option because i think it'd be a badass addition to the rom LOL

thank you so much for your work & help!!

jus some info you may find usefull, using the metro pcs version of gs3 "D2mtr/SCH-R530M, 4.1.2/MB2 firmware release pure stock as of now and most of the ID's were very close to matching but required adding a 0 to most of them lol and some were not identicle at all so i replaced what was needed, also when i turn on device after first installation my default lockscreen seems to be all black screen with clock and i need to swipe up to unlock it.. not sure if this helps you or not but figured i'd share it all with you guys LOL

thanks again!!

EDIT: I just noticed in some of the smali for sec settings you have the inkblot thing, which i do not have that included in my rom yet.. :/ think im going to have to start really digging through these text lines.. lol
[Verizon Samsung Galaxy S III] M_J_Nazari:
Hi didact , thanks for your sharing!

i think you forget that lines .

you need to add this lines to SecSettings.apk/res/values/strings.xml

<string name="enable_lockscreen_torch_text">Enable Torch on Lockscreen</string>
<string name="enable_lockscreen_torch">Enable Torch</string>

---------------

i do all steps, but i think some files are missed from stock settings apk file.

when i press the lockscreen option, the settings gives me fc.

this is logcat.

what should i do?

could you please upload the modded SecSettings.apk file?

best regards
[Verizon Samsung Galaxy S III] M_J_Nazari:
i worked on smali file but, no success yet.

adb logcat:

E/AndroidRuntime( 7254): FATAL EXCEPTION: main

E/AndroidRuntime( 7254): java.lang.VerifyError: com/android/settings/LockScreenSettings

E/AndroidRuntime( 7254):	at java.lang.Class.newInstanceImpl(Native Method)

E/AndroidRuntime( 7254):	at java.lang.Class.newInstance(Class.java:1319)

E/AndroidRuntime( 7254):	at android.app.Fragment.instantiate(Fragment.java:577)

E/AndroidRuntime( 7254):	at android.preference.PreferenceActivity.switchToHeaderInner(PreferenceActivity.java:1229)

E/AndroidRuntime( 7254):	at android.preference.PreferenceActivity.switchToHeader(PreferenceActivity.java:1245)

E/AndroidRuntime( 7254):	at android.preference.PreferenceActivity.onCreate(PreferenceActivity.java:618)

E/AndroidRuntime( 7254):	at com.android.settings.Settings.onCreate(Settings.java:180)

E/AndroidRuntime( 7254):	at android.app.Activity.performCreate(Activity.java:5206)

E/AndroidRuntime( 7254):	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1083)

E/AndroidRuntime( 7254):	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)

E/AndroidRuntime( 7254):	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)

E/AndroidRuntime( 7254):	at android.app.ActivityThread.access$600(ActivityThread.java:140)

E/AndroidRuntime( 7254):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)

E/AndroidRuntime( 7254):	at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime( 7254):	at android.os.Looper.loop(Looper.java:137)

E/AndroidRuntime( 7254):	at android.app.ActivityThread.main(ActivityThread.java:4898)

E/AndroidRuntime( 7254):	at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 7254):	at java.lang.reflect.Method.invoke(Method.java:511)

E/AndroidRuntime( 7254):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)

E/AndroidRuntime( 7254):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)

E/AndroidRuntime( 7254):	at dalvik.system.NativeStart.main(Native Method)

my modified and stock LockScreenSettings.smali files are attached. [XXEMB2 firmware]
[Verizon Samsung Galaxy S III] M_J_Nazari:
i modified the ficeto app for taking control for lockscreens.

leave the editing for SecSettings.apk and use this app.

credits:

ficeto

aliance team

-----------------------------------

REMOVED because of Goldieking attack.
[Verizon Samsung Galaxy S III] MattBooth:
Working on thjis :)

Didact, your wife sounds like my GF :D
[Verizon Samsung Galaxy S III] MattBooth:
I've done this three times now. I've carefully matched all the ID's to the files in the zip, and they still come out scrambled

Any ideas?
[Verizon Samsung Galaxy S III] M_J_Nazari:
i did it, but htc lockscreen have problem for me.

aosp and htc are mixed.

i checked the ids 3 times, but no success here.

i thinks the samsung default is the best.
[Verizon Samsung Galaxy S III] M_J_Nazari:
on some lockscreens android.policy.jar files, the ID defined as wrong.

they started by 0x010****, you must change it to 0x1******

i don't remember which files having this problem, but i remember that happened on 3 files.
[Verizon Samsung Galaxy S III] MattBooth:
Why do you need to change them from 0x01XXXXX to 0x1XXXXX? The compiler trims all ID's anyway, I think.

I'm also running the SGS3 GT-i9300. Could you post your files?
[Verizon Samsung Galaxy S III] M_J_Nazari:
for me , compiler doesn't.
[Verizon Samsung Galaxy S III] rompnit:
Me neither..
[Verizon Samsung Galaxy S III] mikeman45:
Hey is there any way to change the color of the aosp lock screen. The white. I have a yellow background and wish it was black.
[Verizon Samsung Galaxy S III] rompnit:
It's a combination of xml and pngs.. but can be changed to any color you like.
[Verizon Samsung Galaxy S III] mikeman45:
Can you tell me how. I have no idea
[Verizon Samsung Galaxy S III] MattBooth:
Well, I've tried with and without the leading 0, no difference. Though, as I said, the compiler ignores it when it compiles down, I'm almost certain. Either way, it doesn't matter much, since the whole of the public.xml has leading zeros.

It's like 1011 is the same as 00001011. You can literally ignore all the zeros before the first 1.
[Verizon Samsung Galaxy S III] Edgehood:
Both Andybones and I have been having trouble getting this mod to work.. I'm not sure if it's because we're on the VRBMB1 base, or what, but whenever I change the lockscreen in settings nothing happens. I've tried making sure there are 4 counts of lockscreen_type_key in LockscreenSettings.smali to no avail. Any suggestions anyone? I've uploaded my LockscreenSettings.smali as an attachment if anyone's willing to look it over for me.

Thanks!
[Verizon Samsung Galaxy S III] Didact74:
I know there are quite a few of you having issues with this mod. I can verify however, that it does indeed work just fine with the new firmware. Work has had me pretty tied down the last few weeks but tonight when I get home I will post up a few files for diff'ing out as well as a new release of my multi-mod with a few new mods including this one.

As i mentioned in another post a while back, I am steering away from the conventional stradegy of working withing multiple SecSettings files. I have created a smali within SecSettings that handles ALL mods that the user can control. In other words if the mod uses a list preference selection or a toggle, all the code for it will be found in this new smali. No more working in LockScreenSettings, DisplaySettings, SoundSettings, etc....everything is done in one file that never changes, I have done this to eliminate the need to continue updating this part of the code around new firmware releases. This code nver changes it unless the DEV wants too.

Anyway......more info to come this evening. See ya

Edgehood, we will get you guys straightened out tonight :)
[Verizon Samsung Galaxy S III] MattBooth:
Cool, Didact :)

My only problem was that the ID's seemingly still matched to garbled stuff :( I meticulously matched all the ID's several times and they showed like in the screenshots I posted :(
[Verizon Samsung Galaxy S III] sbreen94:
Yeah my htc lock screen looked like yours so I ended up just removing it.

Can't wait for what you have in store didact!!!
[Verizon Samsung Galaxy S III] Didact74:
So here is what I am going to do to try and dispell any concerns about which IDs are or are not correct. I am going to put the following files into a zip and attach it to this post.

THIS IS NOT A FLASHABLE ZIP!!

1.) Original untouched 4.1.2 LockScreenSettings.smali

2.) Edited 4.1.2 LockScreenSettings.smali that contains code for multi-lockscreen and lockscreen torch (verified working)

Use these two files to diff out your code

3.) Edited 4.1.2 android.policy.jar with all lockscreen mods, files and correct IDs

4.) Edited 4.1.2 framework-res.apk with correct IDs and necessary lockscreen.xmls

Please follow the guide and use these files too reference the code and you should be golden!

I went ahead and modded this LockScreenSettings.smali for you guys so you can diff it out even though I dont use this method anymore. Like I mentioned earlier, all my SecSettings smali code is in my own file now which you will be able to see later tonight when I update my Multi-Mod thread. If you have garbled lockscreens the problem is in the IDs. If your selections are not taking or switching correctly,its likely in the LockScreenSettings.smali or in theLockScreenKeyguardView.smali in android.policy.jar. Good luck. If you have questions post them up here, my PM inbox is off the hook and it hurts my head to even look at it :).

Download Multi-Lock Files
[Verizon Samsung Galaxy S III] sbreen94:
Thanks boss! I can't click the link though :/
[Verizon Samsung Galaxy S III] Didact74:
sorry...fixed.
[Verizon Samsung Galaxy S III] Didact74:
So what's up guys? Did you get it figured out?
[Verizon Samsung Galaxy S III] MattBooth:
I'm having another go later today :)
[Verizon Samsung Galaxy S III] MattBooth:
Working better now :) I didn't bother with the SecSettings though and used my own version of the AOKP app. HTC was still fudged, but I removed it anyway.
[Verizon Samsung Galaxy S III] aamir123:
Ok so a complete noob here asking for help. in the op you said to go to smali/com/android/internal/policy/impl in order to match the ids of the files I added with the ones in res/values/public (framework-res). The problem is I the guide doesn't specify putting anything in there. I added the didact folder into android.policy...com. Also the extra lockscreen files that are not put in a folder in the lockscreen zip in op, where do I put those? (ex, AcerLockScreen$1.smali)

Any help would be appreciated, also didact if you wouldn't mind explaining how to just make a separate smali with all edits that would be amazing. I'm using a T-mobile galaxy s3 btw.