yashsingh1/xdaforums huggingface dataset:
[Galaxy Note GT-N7000 Android Development] majdinj:
I tried that first, to get the setTorchLight(I)V from Lcom/sec/android/hardware/SecHardwareInterface, but something goes wrong with my smali,,, so I used the way with lockscreen torch and it works.. If I got that working, I will share it for sure.

Right now, I am doing extra feature (ROM csc features controller),, I have succeed adding toggles to control some csc features (i.e no need to add csc feature in others.xml or features.xml, just toggle it in ROM csc features controller and that is it) The only thing I would like to do and I need help is: Is there a way to make changes in fly without adding observer smali?

May be [MENTION=3065070]Goldie[/MENTION] can give me some advices.. :o

If any one is interested in what I am doing, here is teaser code (not something big for developers though :p):

Adding toggle to control <CscFeature_Launcher_DisableTiltEffect>, in Launcher.smali:

:cond_a3
[B][COLOR="RoyalBlue"]+ invoke-virtual {p0}, Lcom/android/launcher2/Launcher;->getContentResolver()Landroid/content/ContentResolver;

+ move-result-object v9

+ const-string v10, "tilt_effect"

+ invoke-static {v9, v10, v13}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

+ move-result v9

+ if-nez v9, :cond_b1[/COLOR][/B]

invoke-static {}, Lcom/sec/android/app/CscFeature;->getInstance()Lcom/sec/android/app/CscFeature;

move-result-object v9

const-string v10, "CscFeature_Launcher_DisableTiltEffect"

invoke-virtual {v9, v10}, Lcom/sec/android/app/CscFeature;->getEnableStatus(Ljava/lang/String;)Z

move-result v9

[B][COLOR="RoyalBlue"]+ const/4 v9, 0x1[/COLOR][/B]

[B][COLOR="Red"]- if-eqz v9, :cond_b1[/COLOR][/B]

.line 303
sput-boolean v12, Lcom/android/launcher2/Launcher;->CSCFEATURE_LAUNCHER_DISABLETILTEFFECT:Z

Any advice regarding adding on fly code with no need to add observer.smali for each toggle is welcomed..!!!

Preliminary tutorial will be there in few days since I have a lot of things to do in my real life :eek:

Some ScreenShots teasers:

​

Cheers,,
[Galaxy Note GT-N7000 Android Development] Goldie:
I remember now. Its in alliance-res
[Galaxy Note GT-N7000 Android Development] Dr. Narinder:
Yes now i got it and id for reflectionmap can be found in alliance-res.

Now ragarding location of circleunlockripplerenderer.smalis it is in sec folder in JB while in impl in ICS where should i paste them?

Secondly should i also edit all the smalis for location if they are to be placed in impl folder and what about inkeffect folder containing 4 smali files
[Galaxy Note GT-N7000 Android Development] Goldie:
You will need them in impl and as you say you will need to change the path in the smalis. And yes you will need ink effect folder. Any reference to CircleUnlockRippleRenderer in any file will need the path as impl
[Galaxy Note GT-N7000 Android Development] Dr. Narinder:
Thanx for all the help but in the end there is Bootloop

Not working
[Galaxy Note GT-N7000 Android Development] Goldie:
Lol....man....if you wanna do stuff like that your gonna have hundreds of bootloops. You should log it and fix it not give up after one loop! I guess you're in the wrong thread! :p
[Galaxy Note GT-N7000 Android Development] cbucz24:
Omg, I bootloop so many times it's stupid. My testers give me crap cuz they never know if what I send them is gonna break their SystemUI or not...

I always say status bars are overrated :D
[Galaxy Note GT-N7000 Android Development] Goldie:
https://www.youtube.com/watch?v=zmyKvGONb3k&feature=youtube_gdata_player

....tried again for transparent lockscreen and finally got it! First one since sammy jb I think. It used to be easy on ics and gb but since jb ive always failed. It only worked on aosp based. Not anymore! :D

Nice on the csc toggles. Funnily enough I did one too the other day for our note 2 rom. Potential for lots of toggles there!

Not sure about on fly without observers. For some maybe. Depends when the mod code is run I suppose
[Galaxy Note GT-N7000 Android Development] morisah:
Btw great job mate. keep it up.. im using gt p6200, but im success to put my sign in easter egg, put screen shot in power button, add 4way reboot and enabling ink effect by using your guide. it look like easy to me. sound easy? 5times facing bootloop.. ouh yeah.. :p .

anyway may u help me with ink effect? i have no idea why my menu option in setting doesn't appear? ive follow your guide. from fresh apk or jar but still no luck yet. dont ask how much i compile & decompile. since galaxy tab 7plus has a small fan, no modder look at it. ive read all over post in this thread (found 3 or 4 friend facing same problem) but still no luck yet.

im running all stock jellybean 4.1.2 xxmd6 (deodexed). thank for your effort.

(sorry my bad english)
[Galaxy Note GT-N7000 Android Development] MyLifeRocks10:
Anyone got screenshot on power menu mod working on 4.3?? I've implemented the code for screenshot but pressing the screenshot button in power menu does nothing meaning it doesn't take screenshots.:confused:

And yes the screenshot file in /system/bin folder has correct permissions.
[Galaxy Note GT-N7000 Android Development] cbucz24:
I've not gotten that far yet, just the extended reboot menu. I had to do that cuz I hated not being able to boot to recovery
[Galaxy Note GT-N7000 Android Development] MyLifeRocks10:
Thanks for the reply. Yeah in 4.3 it has changed a lot. I implemented screenshot mod along with toggle but the button in power menu does nothing. In 4.1.2 it was working.
[Galaxy Note GT-N7000 Android Development] Goldie:
Logged the button press?
[Galaxy Note GT-N7000 Android Development] MyLifeRocks10:
Yes. There was lot of TalkBack was not installed warning along with others. Here's cut off log after pressing power menu. If u need full log then let me know. Thanks in advance.
[Galaxy Note GT-N7000 Android Development] tkari4:
Wi-Fi hotspot toggle TW 4.1.2

[MENTION=369057]majdinj[/MENTION]

One more.... ;)

Found the missing smali files in the Note 8 SystemUI.apk. (they are attached below)

Add the attached smali files to: com\android\systemui\statusbar\policy\quicksetting\

Change all 0x7.... ID to your public.xml ID in WiFiHotspotQuickSettingButton.smali.

The IDs are added from the Note 8 public.xml.

example:

.line 107
const/4 v2, 0x0

const v3, 0x7f0a00fc [COLOR="Red"]"string" name="quickpanel_wifi_hotspot_text"[/COLOR]

const v4, 0x7f020224 [COLOR="red"]"drawable" name="tw_quick_panel_icon_wifihotspot_on"[/COLOR]

const v5, 0x7f020223 [COLOR="red"]"drawable" name="tw_quick_panel_icon_wifihotspot_off"[/COLOR]

const v6, 0x7f020222 [COLOR="red"]"drawable" name="tw_quick_panel_icon_wifihotspot_dim"[/COLOR]

The red line after each ID correction must be deleted. (they aren't red in the attachment and there is more)

Toggle name for SecSettingsProvider.apk: WiFiHotspot
[Galaxy Note GT-N7000 Android Development] majdinj:
Really thanks [MENTION=2312076]tkari4[/MENTION], you are amazing,,, sure I will link that in the notification toggle original way section :good:

My new csc controller is ready now, just I need time to write the tutorial for you guys to implement in your ROM, may be next week ;)
[Galaxy Note GT-N7000 Android Development] cbucz24:
hopefully your phone will get a 4.3 update an you can start figuring out those too. :D

I just wish I was able to fully decompile the SecSettingsProvider.apk

Everyone That I've Talked To Tried An It fails. I was able to baksmali it on my phone fully I think. But without a full one to compare it too, I'm not sure if it's all of it.
[Galaxy Note GT-N7000 Android Development] majdinj:
That will be hilarious :D

I and [MENTION=3065070]Goldie[/MENTION] just helped someone to get the 4-way reboot menu running on 4.3

Check here:

http://xdaforums.com/showthread.php?p=47481360#post47481360
[Galaxy Note GT-N7000 Android Development] asmanao:
hi [MENTION=369057]majdinj[/MENTION] can you share the smali file .for inkeffect. i'm too lazy. thank
[Galaxy Note GT-N7000 Android Development] majdinj:
mine is linked to public.xml framework-res.apk for roms before LT series.. so if you are running one of LT series, you will still needs to link ids
[Galaxy Note GT-N7000 Android Development] cbucz24:
I'm on mobile and it doesn't show, what model phone is that for?

I used your guide on my 4.3 and it worked fine. Obviously there is a bit of code difference, but the idea is all the same.
[Galaxy Note GT-N7000 Android Development] asmanao:
okay if placed smali files. only then will change id of the framework :D
[Galaxy Note GT-N7000 Android Development] cbucz24:
Rarely if ever can you just cut and paste smali

Changing ids can be a huge ordeal. If you are adding new, you need to also make sure the one you add isn't already in use.

Then the id # also has to be added where ever it's needed.
[Galaxy Note GT-N7000 Android Development] Goldie:
Nah....just add resources to res and compile. Decompile and new public ids automatically assigned. ;)

And the changing ids numbers in smali to match your res is easily achieved with a remapper. Check out untermenschs :)

What do you mean by id #?
[Galaxy Note GT-N7000 Android Development] asmanao:
I can try?
[Galaxy Note GT-N7000 Android Development] Goldie:
If you wanna mod properly you gotta quit being lazy ;)
[Galaxy Note GT-N7000 Android Development] asmanao:
the mods (thanks to majdinj) are all made by me alone. but this is really long :)
[Galaxy Note GT-N7000 Android Development] cbucz24:
Yea your way better at that than I am. I've not had a whole lot of luck changing those myself.

Only once, I remade the SecWallpaper apk an added a bunch of my own.
[Galaxy Note GT-N7000 Android Development] hcthanh1610:
can you help me mod "Auto birghtness" lower than default? because screen eat too much battery!
[Galaxy Note GT-N7000 Android Development] tkari4:
an option...

Install Rom Toolbox Lite from Play Store.

Open it, switch to Performance window.

Press build.prop Editor button.

Find ro.lcd_min_brightness press it.

Set the value to 10, or higher. (under 10 I have not seen a change)

Press Yes to reboot.

Default is 30%. (normally)
[Galaxy Note GT-N7000 Android Development] aaasss10:
Hello mr.harsh,

thanks for your guide

and also thanks to majdinj for highlighting it. :good:

I have a problem:

when I smali the modded SystemUI.apk the Baksmali-Manager_v1.5 displays the following error:

Can you help me to solve it?

@majdinj

Airview Enabling + Control Panel + S Pen Gesture

Thanks to your guide I've added AirView and S Pen gesture to my stock deodexed LT5 rom.

Is normal that the Air View sound and haptic feedback doesn't work?

Thank you very much again!! :angel:

Happy weekend to all!!
[Galaxy Note GT-N7000 Android Development] tkari4:
Try it with the attached Baksmali.

I can't get working the haptic and sound feedback on my LT4 Rom too. :o
[Galaxy Note GT-N7000 Android Development] n0ak:
Adding more than one lockscreen.

hello sir majdinj, this is really a great thread with full of great tutor. I have implemented some of them (almost all) to my samsung low end device with same fw (JB 4.1.2). But i want to ask you something about adding lockscreen. how we can add more than one? in your thread you just explain add one by inserting this method:

iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;

invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v0

const-string v1, "aosp_lock"

const/4 v2, 0x0

invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v0

if-nez v0, :cond_majdi

and then add lockscreen with cond_majdi to the lockscreen source code in your tut

Lcom/android/internal/policy/impl/LockScreen

(aosp lockscreen).

now, what should we add/edit to add another lockscreen with another source code (i use didact code) on this thread:[MOD][GUIDE] Multiple Lockscreen MOD.

i try to edit by mix n match your code with some cond, by i always get bootlop.:D

sorry if my english is too bad sir. :D

hope you get what i want to say. :v
[Galaxy Note GT-N7000 Android Development] Goldie:
That guide is written from our mod ;)

The LockPatternKeyguardView createlockscreen method is used. The code you posted above is a simple toggle code which will switch between two on the result of the "aosp_lock" string in settings database.

To add more than one a list selection is needed which puts a value to the database and runs different lockscreen smalis depending on that value.

That code is already in that guide :)
[Galaxy Note GT-N7000 Android Development] n0ak:
respect and thanks

first of all, my respect to you and your mod sir. you are really a great modder. second thank you very much for your fast response. i really confused with "what should i edit" to get my lock screen with new cond.

this is the example code that will call new lock screen:

new-instance v0, Lcom/android/internal/policy/impl/AcerLockScreen;

iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;

iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;

iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;

iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;

iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;

invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/AcerLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V

and of course i have placed AcerLockscreen.smali into it's place, nah something that i confuse is where i place the code to call this new lockscreen. If i'm not wrong, it means i should add code to call new cond, and then make that cond as this toggle. can you guide me out sir? :'(
[Galaxy Note GT-N7000 Android Development] n0ak:
sorry sir, i have already used that code (it is written on didact tutorial), but unfortunately it breaks my circle lock screen. it become static walpaper, and it's really become static (even my default lockscreen gone). it can not to be swipped again. :'(

but everything becomes well and works like a charm when i used code on this thread (to add ekstra lockscreen like aosp). so i guess, maybe the same code will works, if i can only make a cond to call the new lockscreen (not use code that you wrote above). about the list, i have already got it in my secsettings.apk. it a list by adding the list to array.

sorry for my english sir. hope you get what i mean. :'(
[Galaxy Note GT-N7000 Android Development] Goldie:
You cant because thats toggle code so aosp lock is either on or not. It only has two possible values 1 and 0. You need more so the type key code is how its done.

To be honest its virtually identical to get the value its just the part after that differs by comparing the value to a constant instead of testing if non zero.

You should log your error
[Galaxy Note GT-N7000 Android Development] n0ak:
Yes Sir i got your point the "key" is the important thing that will give us a way to switch among the lockscreen. i tried to take logcat sir, but it didn't appear as an error. :'(. i will retry to solve this sir, but may i compare your code with my code (from didact tutorial) sir? maybe there is something that i forgot.

i'm sure my static locksreen is because something wrong on my android.policy.jar. :(

ignore it if my request too much sir. thanks for your help sir. really appreciated. :good:
[Galaxy Note GT-N7000 Android Development] Goldie:
My code is the same as that guide but with about 6 more. Your device doesnt reboot on locking? Just blank wallpaper? Any clock etc?
[Galaxy Note GT-N7000 Android Development] n0ak:
no sir it's not blank. it shows the walpaper, but unable to be swiped. to open my locked phone (with swiped lockscreen), i should press my menu button. when i try to change my lockscreen from setings, i doesn't affect anything. just show my default walpaper when it's locked. any suggestion sir?

i think if mod on this thread was able to implemented on my device, it means another mod (which teoritically same) should be applicable too. :'(
[Galaxy Note GT-N7000 Android Development] Goldie:
Post your createlockscreen method
[Galaxy Note GT-N7000 Android Development] Goldie:
And it always returns circle? Check the database. Data/data/com.android.providers.settings/databases/settings.db

Change the lockscreen type then check in that database with root explorer that the value is changing when you change type.

If it is then maybe misTabletDevice is returning true
[Galaxy Note GT-N7000 Android Development] n0ak:
sorry for my fool sir. i have looked into settings.db, and i found "android_metadata, bluetooth_devices, bookmark, secure, sqlite_sequence, system". which one i should choose sir? metadata has locale, bluetooth_devices has blank with 5 headers, bookmark has intent information with 6 headers, secure has a lot information with 3 headers, sqlite_seq has system and secure information with 2 headers, and system has a lot of informations 3 headers too.

which one is the value should i check sir? secure or system?

once again, sorry for my fool sir. :(
[Galaxy Note GT-N7000 Android Development] Goldie:
System. See here....lockscreen_type_key and its value...
[Galaxy Note GT-N7000 Android Development] n0ak:
will retry sir.

oh i know sir, it means if i change my lockscreen into specific value for example lockscreen with value -0x7, it will be shown there. ok sir i will recheck it. i have inverted back to my rom. will aplly this mod again, once i get my home sir. hope you still give me a canche to solve my problem and still want to guide me out from my problem here. thanks sir. (y).
[Galaxy Note GT-N7000 Android Development] n0ak:
Sir sorry i came with my fool "again". i have tried using the mod again tonight. i have succed combined the secsettings, framework, and android.policy.jar.

i got the static walpaper on locked screen "again". i do what you suggested: change my lockscreen from settings, and then open the settings.db.

but i found something strange sir, i did not find key "lockscreen_type_key" and then i get back to my settings. and what a surprise the lockscreen that i choos befre is unchecked. what happen sir? have i did something wrong with my losckscreen_settings.smali? :'(
[Galaxy Note GT-N7000 Android Development] Goldie:
I guess you messed up the secsettings.apk part then. Maybe you missed a step
[Galaxy Note GT-N7000 Android Development] n0ak:
THANKS

Thanks for your help sir, now i can get it work. it bale to be swiped now, but the lock screen still unable to be implemented. it seems that the cond still can not be called. i don't know 100% about c code, but i will try with trial and error. i've got more than 18 bootlops just to make my static walpaper swipable. and now it works (although not 100%). Thanks sir for your attention to my case and your help also your guidance, i will try to solve the rest with trial and error. you are a great RD/RC. :thumbsup:. :victory:
[Galaxy Note GT-N7000 Android Development] majdinj:
I have added new tutorial before I stop xda-ing to prepare for my research project:

Create CSC features controller tab in settings menu

in post #11:

http://xdaforums.com/showpost.php?p=47555600&postcount=11

It was a great time spent with you guys,,, :D
[Galaxy Note GT-N7000 Android Development] Goldie:
How long til you're back mate?
[Galaxy Note GT-N7000 Android Development] majdinj:
most likely within 2 weeks,,, I have to travel to several areas to collect my study samples..

You were a great help [MENTION=3065070]Goldie[/MENTION],, I learned from you a lot.. :o

To all, please forgive me if I made un-intended thing that you don't like,,

xda was and still a great family to me..

Se ya all guys after 2 weeks..

Until then stay safe :angel:
[Galaxy Note GT-N7000 Android Development] Goldie:
You too buddy :)
[Galaxy Note GT-N7000 Android Development] asmanao:
hi [MENTION=369057]majdinj[/MENTION] goog luck :)
[Galaxy Note GT-N7000 Android Development] n0ak:
Gud luck majdinj. You are one of the best here. Wish u all the best
[Galaxy Note GT-N7000 Android Development] fcortes626:
hey so i followed your guide for the 4-way reboot menu and the menu pops up when i tap restart but it wont reboot to download or recovery. it just does a regular reboot no matter what I select. any idea on how to fix this?
[Galaxy Note GT-N7000 Android Development] asmanao:
Open classout folder and go to \com\android\internal\policy\impl and paste the four resource files.

Recompile (smali) your jar.
[Galaxy Note GT-N7000 Android Development] Goldie:
Probably not a normal reboot. Probably a crash. Post dumpstate_sys_error.txt.gz afterwards.

Oh and edit your post please. No need quote all that. It just clutters the thread!
[Galaxy Note GT-N7000 Android Development] fcortes626:
Ok edited the post and uploaded the file. Also forgot to mention i am doind this mod on the tmobile galaxy s3.
[Galaxy Note GT-N7000 Android Development] Goldie:
4.3? Your mContext access is different if its 4.3. $800 if I remember right. Theres a few calls to it. Replace the $200 with $800 in your new GlobalActions files not GlobalActions itself. :)

[ 506.478406] !@*** FATAL EXCEPTION IN SYSTEM PROCESS: UI

[ 506.478406] java.lang.NoSuchMethodError: com.android.internal.policy.impl.GlobalActions.access$200
[Galaxy Note GT-N7000 Android Development] fcortes626:
tried it and it still didnt work

---------- Post added at 12:24 PM ---------- Previous post was at 11:35 AM ----------

in my GlobalActions.smali i found this:

.method static synthetic access$700(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;

so does that mean my mContext is $700?

i search access$800 and i get this:

.method static synthetic access$800(Lcom/android/internal/policy/impl/GlobalActions;)Z

so what i did was change mContext in GlobalActions$99.smali from $200 to $700

the only 2 lines i found with $200 and changed to $700 were:

#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/internal/policy/impl/GlobalActions;->access$700(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;

and :

#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v1}, Lcom/android/internal/policy/impl/GlobalActions;->access$700(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;

not sure is if i did it right but thats what i did and it didnt work. Unless i was supposed to replace my GlobalActions.smali file with the one in the zip?
[Galaxy Note GT-N7000 Android Development] Goldie:
You did right. But i think there is two more in 99$1 :)
[Galaxy Note GT-N7000 Android Development] fcortes626:
yeah i did those right now and it still does the same. also searched in 99$2 but didnt find any. maybe because i used the patched resources???