Can't figure out a few things. Rom Tweaks - HTC EVO 3D

I'm using android revolution right now as my current rom. It is missing a few things, that I'm used to from being on clean rom and infected for a while.
Can anyone help me figure these things out and add them to the rom myself.
Added camera settings - HDR, Panorama, sound on/off ~ http://forum.xda-developers.com/showthread.php?t=1263813
Dimmed Capacity Buttons with custom kernel ~ http://forum.xda-developers.com/showthread.php?t=1276936
Transparent Rosie
Transparent Pull down
Extended Quick Settings
Extended Power Options
I looked around for some flashable zips for these things but I couldnt find any. Thanks for your help.

faugnom1 said:
I'm using android revolution right now as my current rom. It is missing a few things, that I'm used to from being on clean rom and infected for a while.
Can anyone help me figure these things out and add them to the rom myself.
Added camera settings - HDR, Panorama, sound on/off ~ http://forum.xda-developers.com/showthread.php?t=1263813
Dimmed Capacity Buttons with custom kernel ~ http://forum.xda-developers.com/showthread.php?t=1276936
Transparent Rosie
Transparent Pull down
Extended Quick Settings
Extended Power Options
I looked around for some flashable zips for these things but I couldnt find any. Thanks for your help.
Click to expand...
Click to collapse
I don't know about the transparent things, but have done the last 2.
For extended settings, you just need to delete all of the following lines in quicksettings.smali inside of systemui.apk.
Code:
.line 79
iget-object v2, p0, Lcom/android/systemui/statusbar/preference/QuickSettings;->mSettingItems:[Lcom/android/systemui/statusbar/preference/StatusBarPreference;
aget-object v2, v2, v7
invoke-virtual {v2, v7}, Lcom/android/systemui/statusbar/preference/StatusBarPreference;->setEnable(Z)V
.line 80
iget-object v2, p0, Lcom/android/systemui/statusbar/preference/QuickSettings;->mSettingItems:[Lcom/android/systemui/statusbar/preference/StatusBarPreference;
aget-object v2, v2, v8
invoke-virtual {v2, v7}, Lcom/android/systemui/statusbar/preference/StatusBarPreference;->setEnable(Z)V
.line 85
sget-boolean v2, Lcom/android/systemui/statusbar/StatusBarFlag;->HTC_QS_TASK_MANAGER:Z
if-nez v2, :cond_0
.line 86
iget-object v2, p0, Lcom/android/systemui/statusbar/preference/QuickSettings;->mSettingItems:[Lcom/android/systemui/statusbar/preference/StatusBarPreference;
aget-object v2, v2, v10
invoke-virtual {v2, v7}, Lcom/android/systemui/statusbar/preference/StatusBarPreference;->setEnable(Z)V
.line 92
:cond_0
iget-object v2, p0, Lcom/android/systemui/statusbar/preference/QuickSettings;->mSettingItems:[Lcom/android/systemui/statusbar/preference/StatusBarPreference;
aget-object v2, v2, v11
invoke-virtual {v2, v7}, Lcom/android/systemui/statusbar/preference/StatusBarPreference;->setEnable(Z)V
Also change
Code:
.line 94
.local v0, cm:Landroid/net/ConnectivityManager;
if-eqz v0, :cond_2
.line 95
invoke-virtual {v0}, Landroid/net/ConnectivityManager;->getTetherableWifiRegexs()[Ljava/lang/String;
move-result-object v1
.line 96
.local v1, hotspotRegexs:[Ljava/lang/String;
array-length v2, v1
if-eqz v2, :cond_1
invoke-virtual {v0}, Landroid/net/ConnectivityManager;->isTetheringSupported()Z
move-result v2
if-nez v2, :cond_2
.line 97
:cond_1
to
Code:
.line 94
.local v0, cm:Landroid/net/ConnectivityManager;
if-eqz v0, :cond_[COLOR="Red"]1[/COLOR]
.line 95
invoke-virtual {v0}, Landroid/net/ConnectivityManager;->getTetherableWifiRegexs()[Ljava/lang/String;
move-result-object v1
.line 96
.local v1, hotspotRegexs:[Ljava/lang/String;
array-length v2, v1
if-eqz v2, :cond_[COLOR="Red"]0[/COLOR]
invoke-virtual {v0}, Landroid/net/ConnectivityManager;->isTetheringSupported()Z
move-result v2
if-nez v2, :cond_[COLOR="Red"]1[/COLOR]
.line 97
:cond_[COLOR="Red"]0[/COLOR]
For the extended power menu and reboot options, you need to edit android.policy.jar. Take one from a stock rom and compare the decompiled version to one from a custom rom (I usually use SteelH's ROM). I cannot remember exactly which files are changed.

Ty sir. I found some old transparency zips on my computer. Ill post them here in case anyone else wants them.

Related

Developing

I am slowly getting through the basics of apk decompiling, Editing, Debugging & recompiling.
Using tools like Apk Tool, Winrar, Notepad++ Winmerge, Adb .
first time I have touched an android or even done any kind of stuff like this was Early August 2012. So not long at all, now i have a question to the more experienced Devs. Eg; Lets just say I dont want increasing ringtone How do you pin point where in the apk to start editing i mean there are heaps of files its like looking for a needle in a haystack. One way I came close and pin pointed it is using a previous made mod and then used Winmerge to compare the differences, Problem is the differences in these to Apks is not just the Increasing ringtone, so when I winmerged them it picked out out the other differences Now this deffinatley narrowed it down. I have a feeling it has something to do with the Callnotifier.xml is this the only Xml?
Also Lets just say you dont have another apk to compare it to , how to you find out this stuff..
Another thing is I want to cook up a rom, but the way I want to do it is modding my own rom untill I am happy with it and then creating something like a nandroid without my personal data. then making it flashable for people. What tools is best used for this? I was thinking editing my nandroid and adding it to a cwm flash. but I think there is an easier way.
Thanks for you help
btemtd said:
I am slowly getting through the basics of apk decompiling, Editing, Debugging & recompiling.
Using tools like Apk Tool, Winrar, Notepad++ Winmerge, Adb .
first time I have touched an android or even done any kind of stuff like this was Early August 2012. So not long at all, now i have a question to the more experienced Devs. Eg; Lets just say I dont want increasing ringtone How do you pin point where in the apk to start editing i mean there are heaps of files its like looking for a needle in a haystack. One way I came close and pin pointed it is using a previous made mod and then used Winmerge to compare the differences, Problem is the differences in these to Apks is not just the Increasing ringtone, so when I winmerged them it picked out out the other differences Now this deffinatley narrowed it down. I have a feeling it has something to do with the Callnotifier.xml is this the only Xml?
Also Lets just say you dont have another apk to compare it to , how to you find out this stuff..
Another thing is I want to cook up a rom, but the way I want to do it is modding my own rom untill I am happy with it and then creating something like a nandroid without my personal data. then making it flashable for people. What tools is best used for this? I was thinking editing my nandroid and adding it to a cwm flash. but I think there is an easier way.
Thanks for you help
Click to expand...
Click to collapse
In my point of view,this is no shortcut,this is experience have been modified in the way
correct me,maybe i'm wrong!
Disable Increasing ringtone @secphone.apk\com\android\phone\Ringer$1.smali
delete every this code
Code:
setstreamvolume
thanks for your input.....It would now be good to have someone that has done this mod, to give us the 100% answer and maybe some extra advise/tips/tricks from their personal book of knowledge
Try the Android hacking forum on XDA
http://forum.xda-developers.com/
jje
I search, search and search the net for info on the mod i want. Some can be difficult to find the guides for.
If searching fails ill ask a dev for some info.
When it comes to comparing apks I will only do that if I know where the change needs to be then trial and error
Sent from my GT-I9305 using XDA Premium HD app
btemtd said:
thanks for your input.....It would now be good to have someone that has done this mod, to give us the 100% answer and maybe some extra advise/tips/tricks from their personal book of knowledge
Click to expand...
Click to collapse
I've 100% done this mod
disable increasing ringtone
http://www.mediafire.com/?72la46qi95j1d7b
leamoor said:
I've 100% done this mod
disable increasing ringtone
http://www.mediafire.com/?72la46qi95j1d7b
Click to expand...
Click to collapse
is this Disable Increasing ONLY mod?
And could you let me know what files inside the Secphone.apk you edited just for curiosty? was it the one file you stated above? Or did you port this mod?
btemtd said:
is this Disable Increasing ONLY mod?
And could you let me know what files inside the Secphone.apk you edited just for curiosty? Or did you port this mod?
Click to expand...
Click to collapse
yes,only disable Increasing ringtone!
this is exactly what i said @#2
decompile secphone/smali/com/android/phone/Ringer$1
delete red sentences
Code:
#setter for: Lcom/android/phone/Ringer;->mOriginRingtoneVolume:I
invoke-static {v1, v2}, Lcom/android/phone/Ringer;->access$702(Lcom/android/phone/Ringer;I)I
.line 571
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
iget-object v1, v1, Lcom/android/phone/Ringer;->mAudioManager:Landroid/media/AudioManager;
[COLOR="Red"]invoke-virtual {v1, v6, v4, v5}, Landroid/media/AudioManager;->setStreamVolume(III)V[/COLOR]
.line 573
const/4 v1, 0x7
const-wide/16 v2, 0x7d0
invoke-virtual {p0, v1, v2, v3}, Lcom/android/phone/Ringer$1;->sendEmptyMessageDelayed(IJ)Z
.line 578
:cond_4
:goto_2
invoke-virtual {v0}, Landroid/media/Ringtone;->play()V
.line 579
iget-object v2, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
monitor-enter v2
.line 580
:try_start_1
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mFirstRingStartTime:J
invoke-static {v1}, Lcom/android/phone/Ringer;->access$900(Lcom/android/phone/Ringer;)J
move-result-wide v3
const-wide/16 v5, 0x0
cmp-long v1, v3, v5
if-gez v1, :cond_5
.line 581
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v3
#setter for: Lcom/android/phone/Ringer;->mFirstRingStartTime:J
invoke-static {v1, v3, v4}, Lcom/android/phone/Ringer;->access$902(Lcom/android/phone/Ringer;J)J
.line 583
:cond_5
monitor-exit v2
goto/16 :goto_0
:catchall_0
move-exception v1
monitor-exit v2
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v1
.line 546
:catchall_1
move-exception v1
:try_start_2
monitor-exit v2
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
throw v1
.line 563
:cond_6
invoke-virtual {v0, v5}, Landroid/media/Ringtone;->setRepeat(Z)V
goto :goto_1
.line 574
:cond_7
const-string v1, "extra_ringer"
invoke-static {v1}, Lcom/android/phone/PhoneFeature;->hasFeature(Ljava/lang/String;)Z
move-result v1
if-eqz v1, :cond_4
.line 575
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mExtraRinger:Lcom/android/phone/ExtraRinger;
invoke-static {v1}, Lcom/android/phone/Ringer;->access$800(Lcom/android/phone/Ringer;)Lcom/android/phone/ExtraRinger;
move-result-object v1
invoke-virtual {v1}, Lcom/android/phone/ExtraRinger;->startExtraRinger()V
goto :goto_2
.line 589
:pswitch_2
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
const-string v2, "mRingHandler: PLAY_TTS..."
#calls: Lcom/android/phone/Ringer;->log(Ljava/lang/String;Z)V
invoke-static {v1, v2, v4}, Lcom/android/phone/Ringer;->access$400(Lcom/android/phone/Ringer;Ljava/lang/String;Z)V
.line 591
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
iget-object v2, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
iget-object v2, v2, Lcom/android/phone/Ringer;->mContext:Landroid/content/Context;
invoke-static {v2, v4}, Lcom/android/phone/CallTextToSpeech;->getInstance(Landroid/content/Context;I)Lcom/android/phone/CallTextToSpeech;
move-result-object v2
#setter for: Lcom/android/phone/Ringer;->mCallTextToSpeech:Lcom/android/phone/CallTextToSpeech;
invoke-static {v1, v2}, Lcom/android/phone/Ringer;->access$1002(Lcom/android/phone/Ringer;Lcom/android/phone/CallTextToSpeech;)Lcom/android/phone/CallTextToSpeech;
.line 592
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mRingHandler:Landroid/os/Handler;
invoke-static {v1}, Lcom/android/phone/Ringer;->access$1100(Lcom/android/phone/Ringer;)Landroid/os/Handler;
move-result-object v1
if-eqz v1, :cond_0
.line 593
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mRingHandler:Landroid/os/Handler;
invoke-static {v1}, Lcom/android/phone/Ringer;->access$1100(Lcom/android/phone/Ringer;)Landroid/os/Handler;
move-result-object v1
const/4 v2, 0x5
invoke-virtual {v1, v2}, Landroid/os/Handler;->removeMessages(I)V
goto/16 :goto_0
.line 598
:pswitch_3
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
const-string v2, "mRingHandler: STOP_RING..."
#calls: Lcom/android/phone/Ringer;->log(Ljava/lang/String;Z)V
invoke-static {v1, v2, v4}, Lcom/android/phone/Ringer;->access$400(Lcom/android/phone/Ringer;Ljava/lang/String;Z)V
.line 599
iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;
.end local v0 #r:Landroid/media/Ringtone;
check-cast v0, Landroid/media/Ringtone;
.line 600
.restart local v0 #r:Landroid/media/Ringtone;
if-eqz v0, :cond_9
.line 602
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mCallTextToSpeech:Lcom/android/phone/CallTextToSpeech;
invoke-static {v1}, Lcom/android/phone/Ringer;->access$1000(Lcom/android/phone/Ringer;)Lcom/android/phone/CallTextToSpeech;
move-result-object v1
if-eqz v1, :cond_8
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mCallTextToSpeech:Lcom/android/phone/CallTextToSpeech;
invoke-static {v1}, Lcom/android/phone/Ringer;->access$1000(Lcom/android/phone/Ringer;)Lcom/android/phone/CallTextToSpeech;
move-result-object v1
invoke-virtual {v1}, Lcom/android/phone/CallTextToSpeech;->IsSpeakingTts()Z
move-result v1
if-eqz v1, :cond_8
.line 603
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mCallTextToSpeech:Lcom/android/phone/CallTextToSpeech;
invoke-static {v1}, Lcom/android/phone/Ringer;->access$1000(Lcom/android/phone/Ringer;)Lcom/android/phone/CallTextToSpeech;
move-result-object v1
invoke-virtual {v1}, Lcom/android/phone/CallTextToSpeech;->stopTts()V
.line 604
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#setter for: Lcom/android/phone/Ringer;->mCallTextToSpeech:Lcom/android/phone/CallTextToSpeech;
invoke-static {v1, v8}, Lcom/android/phone/Ringer;->access$1002(Lcom/android/phone/Ringer;Lcom/android/phone/CallTextToSpeech;)Lcom/android/phone/CallTextToSpeech;
.line 606
:cond_8
invoke-virtual {v0}, Landroid/media/Ringtone;->stop()V
.line 610
:goto_3
invoke-virtual {p0}, Lcom/android/phone/Ringer$1;->getLooper()Landroid/os/Looper;
move-result-object v1
invoke-virtual {v1}, Landroid/os/Looper;->quit()V
goto/16 :goto_0
.line 608
:cond_9
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "- STOP_RING with null ringtone! msg = "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
#calls: Lcom/android/phone/Ringer;->log(Ljava/lang/String;Z)V
invoke-static {v1, v2, v4}, Lcom/android/phone/Ringer;->access$400(Lcom/android/phone/Ringer;Ljava/lang/String;Z)V
goto :goto_3
.line 614
:pswitch_4
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "RETURN_ORIGIN_VOLUME: "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
iget-object v3, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mOriginRingtoneVolume:I
invoke-static {v3}, Lcom/android/phone/Ringer;->access$700(Lcom/android/phone/Ringer;)I
move-result v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
#calls: Lcom/android/phone/Ringer;->log(Ljava/lang/String;Z)V
invoke-static {v1, v2, v4}, Lcom/android/phone/Ringer;->access$400(Lcom/android/phone/Ringer;Ljava/lang/String;Z)V
.line 615
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
iget-object v1, v1, Lcom/android/phone/Ringer;->mAudioManager:Landroid/media/AudioManager;
iget-object v2, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mOriginRingtoneVolume:I
invoke-static {v2}, Lcom/android/phone/Ringer;->access$700(Lcom/android/phone/Ringer;)I
move-result v2
[COLOR="Red"] invoke-virtual {v1, v6, v2, v5}, Landroid/media/AudioManager;->setStreamVolume(III)V[/COLOR]
.line 616
const-string v1, "extra_ringer"
invoke-static {v1}, Lcom/android/phone/PhoneFeature;->hasFeature(Ljava/lang/String;)Z
move-result v1
if-eqz v1, :cond_0
.line 617
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mExtraRinger:Lcom/android/phone/ExtraRinger;
invoke-static {v1}, Lcom/android/phone/Ringer;->access$800(Lcom/android/phone/Ringer;)Lcom/android/phone/ExtraRinger;
I am so confused now as i just tried to decompile the same secphone.apk as i did before which worked, it also worked now but it gave this message
with your apk and my own something like could not decode replacing by false value: drawable *****bla bla/calll video icon.png
My apk said could not find 9patch chunk in file and all of a sudden it is doing this i did nothing!! each apk repeated this message with a few differnet files. Now how and why would it do this for no reason. it has always decompiled flawlessly. now it seems like there are missing files weirddd.
PS how did you locate that line, It would be almost in possible to search for that with no leads
btemtd said:
I am so confused now as i just tried to decompile the same secphone.apk as i did before which worked, it also worked now but it gave this message
with your apk and my own something like could not decode replacing by false value: drawable *****bla bla/calll video icon.png
My apk said could not find 9patch chunk in file and all of a sudden it is doing this i did nothing!! each apk repeated this message with a few differnet files. Now how and why
Click to expand...
Click to collapse
This is the method i from i9000 alreay know(i decompile some devs mod and fround it)
What version apktool are you used?Modifed code apk some apktool can not compile and decompile them
maybe for this reason,i used two sets of apktool to compile and decompile jelly bean apk
i'm use apktool 1.4.3 to decomplie,apktool 1.4.2 to compile,hope this can help.
but the funny thing this only just happened now it showing these weird errors, but the file is decompiled , but before it nevr showed these errors. They are more like files or certain things not found... not really errors. thanks anyways
here is the screen shot of these weird messages i have NEVER seen them before when decompiing does anyone know what they are, and why is it saying that
OK I removed that line that you said setstreamvolume etc,,,,,, now check out what happened wen i tried to compile it. I really dont get it now this would of happened if i didnt remove the line as it already happened even when i decompiled
has anyone seen this
btemtd said:
OK I removed that line that you said setstreamvolume etc,,,,,, now check out what happened wen i tried to compile it. I really dont get it now this would of happened if i didnt remove the line as it already happened even when i decompiled
has anyone seen this
Click to expand...
Click to collapse
Because your apktool can not compile modified apk
try use another apktool compile them
upload your apk here,for test compile and decompile
leamoor said:
Because your apktool can not compile modified apk
try use another apktool compile them
upload your apk here,for test compile and decompile
Click to expand...
Click to collapse
but this seems too strange i already made a mod 5x6 touchwiz layout... and it compiled perfectt.
Do you think i hould get the latest apktool?
btemtd said:
but this seems too strange i already made a mod 5x6 touchwiz layout... and it compiled perfectt.
Do you think i hould get the latest apktool?
Click to expand...
Click to collapse
Yes,this is strange,but sometimes happen ,
apktool I will suggestion you get the latest one!

[TUT][LSJ] How to add quad targates in AOSP lockscreen

Hello Friends this is mine tutorial for quad targates in aosp lockscreen You can direct me here But when according to that tut when you decompile framework.jar you wont find any widget folder .
So my tut has very little change but fully wokring for XXLSJ rom
FOR WORKING quad targates you must have an AOSP lockscreen this tutorial is for adding over all quad targates to AOSP lockscreen
i m providing only smali part
Now Please start following the instuction with that tag.
Framework-res.apk Editing
[SMALI]
Decompile your framework-res.apk
Put ic_lockscreen_phone_activated.png, ic_lockscreen_phone_normal.png, ic_lockscreen_sms_activated.png, ic_lockscreen_sms_normal.png in /res/drawable-hdpi/
[SMALI]
Put ic_lockscreen_phone.xml, ic_lockscreen_sms.xml in /res/drawable/
[SMALI]
Open /res/values/arrays.xml
[SMALI]/
Replace the whole array .. with:
Code:
@drawable/ic_lockscreen_unlock
@drawable/ic_lockscreen_sms
@drawable/ic_action_assist_generic
@drawable/ic_lockscreen_phone
@drawable/ic_lockscreen_camera
@null
@null
@null
Replace the whole array .. with:
Code:
@string/description_target_unlock
@string/description_target_sms
@string/description_target_search
@string/description_target_phone
@string/description_target_camera
@null
@null
@null
[SMALI]
Open /res/values-land/arrays.xml
[SMALI]/
Replace the whole array .. with:
Code:
@null
@null
@drawable/ic_lockscreen_unlock
@drawable/ic_lockscreen_sms
@drawable/ic_action_assist_generic
@drawable/ic_lockscreen_phone
@drawable/ic_lockscreen_camera
@null
Replace the whole array .. with:
Code:
@null
@null
@string/description_target_unlock
@string/description_target_sms
@string/description_target_search
@string/description_target_phone
@string/description_target_camera
@null
[SMALI]
Open /res/values/strings.xml
[SMALI]/
Add the following entries:
Code:
Sms
Phone
Recompile your framework
framework editing:
[SMALI]
Disassemble your framework2.jar
Edit /com/android/internal/widget/multiwaveview/GlowPadView.smali and replace the whole methods ".method private getDirectionDescription(I)Ljava/lang/String;" and ".method private getTargetDescription(I)Ljava/lang/String;" with the following methods:
Code:
.method private getDirectionDescription(I)Ljava/lang/String;
.locals 4
.parameter "index"
.prologue
.line 1119
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptions:Ljava/util/ArrayList;
if-eqz v2, :cond_0
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->isEmpty()Z
move-result v2
if-eqz v2, :cond_1
.line 1120
:cond_0
iget v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptionsResourceId:I
invoke-direct {p0, v2}, Lcom/android/internal/widget/multiwaveview/GlowPadView;->loadDescriptions(I)Ljava/util/ArrayList;
move-result-object v2
iput-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptions:Ljava/util/ArrayList;
.line 1121
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDrawables:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
move-result v2
iget-object v3, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptions:Ljava/util/ArrayList;
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v3
if-eq v2, v3, :cond_1
.line 1122
const-string v2, "GlowPadView"
const-string v3, "The number of target drawables must be equal to the number of direction descriptions."
invoke-static {v2, v3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 1124
const/4 v0, 0x0
.line 1133
:goto_0
return-object v0
.line 1130
:cond_1
:try_start_0
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 1131
.local v0, directionZ:Ljava/lang/String;
goto :goto_0
.line 1132
.end local v0 #directionZ:Ljava/lang/String;
:catch_0
move-exception v1
.line 1133
.local v1, e:Ljava/lang/Exception;
const-string v0, ""
goto :goto_0
.end method
Code:
.method private getTargetDescription(I)Ljava/lang/String;
.locals 4
.parameter "index"
.prologue
.line 1099
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptions:Ljava/util/ArrayList;
if-eqz v2, :cond_0
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->isEmpty()Z
move-result v2
if-eqz v2, :cond_1
.line 1100
:cond_0
iget v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptionsResourceId:I
invoke-direct {p0, v2}, Lcom/android/internal/widget/multiwaveview/GlowPadView;->loadDescriptions(I)Ljava/util/ArrayList;
move-result-object v2
iput-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptions:Ljava/util/ArrayList;
.line 1101
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDrawables:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
move-result v2
iget-object v3, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptions:Ljava/util/ArrayList;
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v3
if-eq v2, v3, :cond_1
.line 1102
const-string v2, "GlowPadView"
const-string v3, "The number of target drawables must be equal to the number of target descriptions."
invoke-static {v2, v3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 1104
const/4 v1, 0x0
.line 1114
:goto_0
return-object v1
.line 1109
:cond_1
const-string v1, ""
.line 1111
.local v1, targetZ:Ljava/lang/String;
:try_start_0
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v2
move-object v0, v2
check-cast v0, Ljava/lang/String;
move-object v1, v0
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
.line 1112
:catch_0
move-exception v2
goto :goto_0
.end method
Recompile your framework2.jar
Now we're done with the framework2.jar now we need to modify that last file android.policy.jar
[SMALI]
Disassemble your android.policy.jar
Edit /com/android/internal/policy/impl/LockScreen.smali and add the following methods:
Code:
.method static synthetic access$1400(Lcom/android/internal/policy/impl/LockScreen;)Landroid/content/Context;
.locals 1
.parameter "x0"
.prologue
.line 56
iget-object v0, p0, Lcom/android/internal/policy/impl/LockScreen;->mContext:Landroid/content/Context;
return-object v0
.end method
.method static synthetic access$1500(Lcom/android/internal/policy/impl/LockScreen;)Landroid/content/Context;
.locals 1
.parameter "x0"
.prologue
.line 56
iget-object v0, p0, Lcom/android/internal/policy/impl/LockScreen;->mContext:Landroid/content/Context;
return-object v0
.end method
Edit /com/android/internal/policy/impl/LockScreen$GlowPadViewMethods.smali.
Replace the whole method onTrigger with:
Code:
.method public onTrigger(Landroid/view/View;I)V
.locals 7
.parameter "v"
.parameter "target"
.prologue
const/high16 v6, 0x1000
.line 313
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->mGlowPadView:Lcom/android/internal/widget/multiwaveview/GlowPadView;
invoke-virtual {v4, p2}, Lcom/android/internal/widget/multiwaveview/GlowPadView;->getResourceIdForTarget(I)I
move-result v3
.line 321
.local v3, resId:I
sparse-switch v3, :sswitch_data_0
.line 367
:goto_0
return-void
.line 323
:sswitch_0
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$1200(Lcom/android/internal/policy/impl/LockScreen;)Landroid/content/Context;
move-result-object v4
invoke-static {v4}, Landroid/app/SearchManager;->getAssistIntent(Landroid/content/Context;)Landroid/content/Intent;
move-result-object v0
.line 324
.local v0, assistIntent:Landroid/content/Intent;
if-eqz v0, :cond_0
.line 325
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->launchActivity(Landroid/content/Intent;)V
.line 329
:goto_1
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->pokeWakelock()V
goto :goto_0
.line 327
:cond_0
const-string v4, "LockScreen"
const-string v5, "Failed to get intent for assist activity"
invoke-static {v4, v5}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_1
.line 333
.end local v0 #assistIntent:Landroid/content/Intent;
:sswitch_1
new-instance v4, Landroid/content/Intent;
const-string v5, "android.media.action.STILL_IMAGE_CAMERA"
invoke-direct {v4, v5}, Landroid/content/Intent;->(Ljava/lang/String;)V
invoke-direct {p0, v4}, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->launchActivity(Landroid/content/Intent;)V
.line 334
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->pokeWakelock()V
goto :goto_0
.line 339
:sswitch_2
new-instance v2, Landroid/content/Intent;
const-string v4, "android.intent.action.MAIN"
invoke-direct {v2, v4}, Landroid/content/Intent;->(Ljava/lang/String;)V
.line 340
.local v2, phoneIntent:Landroid/content/Intent;
const-string v4, "com.android.contacts"
const-string v5, "com.android.contacts.activities.DialtactsActivity"
invoke-virtual {v2, v4, v5}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 341
invoke-virtual {v2, v6}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 342
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$1300(Lcom/android/internal/policy/impl/LockScreen;)Landroid/content/Context;
move-result-object v4
invoke-virtual {v4, v2}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
.line 343
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->goToUnlockScreen()V
goto :goto_0
.line 348
.end local v2 #phoneIntent:Landroid/content/Intent;
:sswitch_3
new-instance v1, Landroid/content/Intent;
const-string v4, "android.intent.action.MAIN"
invoke-direct {v1, v4}, Landroid/content/Intent;->(Ljava/lang/String;)V
.line 349
.local v1, mmsIntent:Landroid/content/Intent;
const-string v4, "com.android.mms"
const-string v5, "com.android.mms.ui.ConversationList"
invoke-virtual {v1, v4, v5}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 350
invoke-virtual {v1, v6}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 351
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$1400(Lcom/android/internal/policy/impl/LockScreen;)Landroid/content/Context;
move-result-object v4
invoke-virtual {v4, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
.line 352
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->goToUnlockScreen()V
goto :goto_0
.line 357
.end local v1 #mmsIntent:Landroid/content/Intent;
:sswitch_4
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$500(Lcom/android/internal/policy/impl/LockScreen;)V
.line 358
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->pokeWakelock()V
goto/16 :goto_0
.line 364
:sswitch_5
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->goToUnlockScreen()V
goto/16 :goto_0
.line 321
:sswitch_data_0
.sparse-switch
0x010802cd -> :sswitch_0
0x01080328 -> :sswitch_1
0x01080344 -> :sswitch_4
0x0108034f -> :sswitch_5
0x01080352 -> :sswitch_5
0x01080a4d -> :sswitch_2
0x01080a50 -> :sswitch_3
.end sparse-switch
.end method
Recompile and you're good to go!
I dont work only for thanks i work for my passion toward android too but if you will press thanks it will help me
Credits
atl4ntis for base tutorial
reserved
i used this one time ago: http://forum.xda-developers.com/showthread.php?t=2011461 pretty "same"
Mirko ddd said:
i used this one time ago: http://forum.xda-developers.com/showthread.php?t=2002620 pretty "same"
Click to expand...
Click to collapse
its for adding more targates to AOSP lockscreen
there is no link between mine and the one you give bcz i m not providing how to FOR TOGGLEING AOSP N TW LOCKSCREEN
ICS_XD said:
its for adding more targates to AOSP lockscreen
there is no link between mine and the one you give bcz i m not providing how to FOR TOGGLEING AOSP N TW LOCKSCREEN
Click to expand...
Click to collapse
sorry i linked wrong thing http://forum.xda-developers.com/showthread.php?t=2011461
this one is the same
Mirko ddd said:
sorry i linked wrong thing http://forum.xda-developers.com/showthread.php?t=2011461
this one is the same
Click to expand...
Click to collapse
I dont know
But i modified one which i linked in thread
Btw when i check the thread you gave previous
It will same like you post for LSJ ?
Toggle for TW n Aosp lockscreen
Sent from my GT-I9400 using Tapatalk
ICS_XD said:
I dont know
But i modified one which i linked in thread
Btw when i check the thread you gave previous
It will same like you post for LSJ ?
Toggle for TW n Aosp lockscreen
Sent from my GT-I9400 using Tapatalk
Click to expand...
Click to collapse
for sure is not the same as u can see mine consists to reuse an existings code and made it noobproof.
as u are not even explaining what this is
Code:
.line 321
:sswitch_data_0
.sparse-switch
0x010802cd -> :sswitch_0
0x01080328 -> :sswitch_1
0x01080344 -> :sswitch_4
0x0108034f -> :sswitch_5
0x01080352 -> :sswitch_5
0x01080a4d -> :sswitch_2
0x01080a50 -> :sswitch_3
.end sparse-switch
.end method
people may have different public values leading them into bootloops
Mirko ddd said:
for sure is not the same as u can see mine consists to reuse an existings code and made it noobproof.
as u are not even explaining what this is
Code:
.line 321
:sswitch_data_0
.sparse-switch
0x010802cd -> :sswitch_0
0x01080328 -> :sswitch_1
0x01080344 -> :sswitch_4
0x0108034f -> :sswitch_5
0x01080352 -> :sswitch_5
0x01080a4d -> :sswitch_2
0x01080a50 -> :sswitch_3
.end sparse-switch
.end method
people may have different public values leading them into bootloops
Click to expand...
Click to collapse
These values are not from that thread
These values are of LSJ rom i think these values will work on any LSJ rom ?
Isin't
Sent from my GT-I9400 using Tapatalk
ICS_XD said:
These values are not from that thread
These values are of LSJ rom i think these values will work on any LSJ rom ?
Isin't
Sent from my GT-I9400 using Tapatalk
Click to expand...
Click to collapse
suppose for a while that the guys who s applying your tutorial has one more png file on his framework-res.apk, or that the one u have has it, public valus will mismatch
noobproof is well explained, not easy to copy
Mirko ddd said:
suppose for a while that the guys who s applying your tutorial has one more png file on his framework-res.apk, or that the one u have has it, public valus will mismatch
noobproof is well explained, not easy to copy
Click to expand...
Click to collapse
Oh thanks mate
I will be updating thread tomorrow
Thanks for the help
Sent from my GT-I9100G using xda premium
ICS_XD said:
Oh thanks mate
I will be updating thread tomorrow
Thanks for the help
Sent from my GT-I9100G using xda premium
Click to expand...
Click to collapse
nice target is provide safer and detailed as possible guides
收件人: [TUT][LSJ] How to add quad targates in AOSP lockscreen
have a look. thx
Sent from my HTC X515d using xda premium

[MOD] [GUIDE] AOSP Lockscreen vibration toggle

AOSP Lockscreen vibration toggle​
This will allow you to toggle on/off the vibration you feel when you touch the glow ring on the AOSP lockscreen.
We will work with two files:
SecSettings
framework2
Lets begin with SecSettings.
I use Rom Control for settings but you may not...you will need to use your own toggle code if you are not using Rom Control....
Navigate to res/values/strings and add the following
Code:
<string name="enable_aosp_vibrate">AOSP lockscreen vibration</string>
<string name="enable_aosp_vibrate_text">Vibrate selection on lockscreen</string>
Navigate to res/xnl/rom_settings and add the following:
Code:
<CheckBoxPreference android:title="@string/enable_aosp_vibrate" android:key="aosp_vibrate" android:summary="@string/enable_aosp_vibrate_text" />
Navigate to smali/com/android/settings/didact/RomSettings.smali
Add the following
Code:
.field mAospLockVibration:Landroid/preference/CheckBoxPreference;
The first line in the next two examples identifies the method to paste in, it will be in bold...dont copy that line in to your method
Code:
[B].method public onCreate(Landroid/os/Bundle;)V[/B]
:goto_0
invoke-virtual {v4, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
const-string v1, "aosp_vibrate"
invoke-virtual {p0, v1}, Lcom/android/settings/didact/RomSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v1
check-cast v1, Landroid/preference/CheckBoxPreference;
iput-object v1, p0, Lcom/android/settings/didact/RomSettings;->mAospLockVibration:Landroid/preference/CheckBoxPreference;
iget-object v4, p0, Lcom/android/settings/didact/RomSettings;->mAospLockVibration:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/didact/RomSettings;->getActivity()Landroid/app/Activity;
move-result-object v1
invoke-virtual {v1}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v5, "aosp_vibrate"
invoke-static {v1, v5, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-ne v1, v2, :cond_1
move v1, v2
:goto_1
invoke-virtual {v4, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
Code:
[B].method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z[/B]
:cond_2
iget-object v2, p0, Lcom/android/settings/didact/RomSettings;->mAospLockVibration:Landroid/preference/CheckBoxPreference;
if-ne p2, v2, :cond_4
invoke-virtual {p0}, Lcom/android/settings/didact/RomSettings;->getActivity()Landroid/app/Activity;
move-result-object v2
invoke-virtual {v2}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "aosp_vibrate"
check-cast p2, Landroid/preference/CheckBoxPreference;
invoke-virtual {p2}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v4
if-eqz v4, :cond_3
move v0, v1
:cond_3
invoke-static {v2, v3, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto :goto_0
Thats it for SecSettings. Next section will cover changes in framework2.jar.....
AOSP lockscreen vibration toggle part 2, framework2​
Navigate to smali/com/android/internal/widget/multiwaveview/GlowPadView.smali. .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSetV. Replace the code from :cond_8 to :goto_2 with the following
Code:
:cond_8
const/4 v7, 0x0
const/16 v8, 0x30
invoke-virtual {v0, v7, v8}, Landroid/content/res/TypedArray;->getInt(II)I
move-result v7
iput v7, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mGravity:I
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
iget-object v7, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mContext:Landroid/content/Context;
invoke-virtual {v7}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v7
const-string v8, "aosp_vibrate"
const/4 v9, 0x0
invoke-static {v7, v8, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v8
if-eqz v8, :cond_9
const/4 v7, 0x1
:goto_2
Thats it. Recompile and push to your phone.
Thanks Button!!

[MOD] Samsung KeyBoard Swipe Color Change Found! - Updated Instructions

Okay, alot of dev's/themers been looking for this one...
If you use, please give credit, I spent many hours finding this Mod... Dont take credit for someone else's work...
This Mod will allow you to change the Samsung KeyBoard Swipe Color..(SamsungIME.apk)
Look for:
smali\com\diotek\ime\framework\view\AbstractKeyBoardView.smali
Search for -> .method private setTracePaintOptionsWithSettings()V
Click to see Org Code
Code:
.method private setTracePaintOptionsWithSettings()V
.locals 5
.prologue
const/16 v4, 0xff
const/4 v1, 0x1
const/4 v3, 0x0
.line 9829
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
if-nez v0, :cond_0
.line 9830
new-instance v0, Landroid/graphics/Paint;
invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V
iput-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
.line 9832
:cond_0
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
if-eqz v0, :cond_1
.line 9833
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
.line 9835
:cond_1
iput-short v3, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePointCount:S
.line 9836
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V
.line 9837
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setDither(Z)V
.line 9838
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
const/16 v1, 0xa5
const/16 v2, 0xf3
invoke-static {v4, v3, v1, v2}, Landroid/graphics/Color;->argb(IIII)I
Click to see what to change:
Code:
.method private setTracePaintOptionsWithSettings()V
.locals 5
.prologue
const/16 v4, [B][U][COLOR="Blue"]0xff[/COLOR][/U][/B] [B][COLOR="seagreen"]Change for Alpha Value - "0xff" [/COLOR][/B]
const/4 v1, 0x1
const/4 v3, [B][U][COLOR="Blue"]0x0[/COLOR][/U][/B] [B][COLOR="seaGreen"] - Change for Red Value - "0x0"[/COLOR][/B]
.line 9829
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
if-nez v0, :cond_0
.line 9830
new-instance v0, Landroid/graphics/Paint;
invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V
iput-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
.line 9832
:cond_0
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
if-eqz v0, :cond_1
.line 9833
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePoint:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
.line 9835
:cond_1
iput-short v3, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePointCount:S
.line 9836
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V
.line 9837
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setDither(Z)V
.line 9838
iget-object v0, p0, Lcom/diotek/ime/framework/view/AbstractKeyboardView;->mTracePaint:Landroid/graphics/Paint;
const/16 v1, [B][U][COLOR="Blue"]0xa5[/COLOR][/U][/B] [COLOR="seagreen"]- Change for Green Value - "0xa5"[/COLOR]
const/16 v2, [B][U][COLOR="Blue"]0xf3[/COLOR][/U][/B] [COLOR="seagreen"] - Change for Blue Value - "0xf3"[/COLOR]
invoke-static {v4, v3, v1, v2}, Landroid/graphics/Color;->argb(IIII)I
So what it boils down to is that the Swipe Color is what we call RGB color coding. I suggest a site like this to see values you can use:
Hex to RGB Color converter
Thats it folks.. swipe color squashed!!!!
Verified to work on N3 KeyBoards
A Little clarification on Instructions.
I was swamped with questions on how to edit and such.. So with @strongsteve help we dug more and here is an easier way to get your colors instead of trying to use RGB values..
change code:
Code:
const/16 v1, 0xa5
const/16 v2, 0xf3
to
Code:
const v3, 0x33
const v1, 0x66
const v2, 0xcc
Then just use any normal Hex Color code you would normally use!!!
In the above example I used 3366cc which is DarkHorse Blue..
I hope that helps
Thanks been looking for this myself. Great job!
Sent from my SCH-I545 using XDA Premium 4 mobile app
This has been long sought after....thanks for this and great work my friend! :highfive::good:
ALL Users must be reminded to give credit for this share, as, unless I am mistaken, it is not too many other places!
Sorry... can someone post what those lines should look like once they have been changed to a diff color? I'm not sure exactly what in those lines I should be changing (I do understand the color codes).
Sorry for the noobish question.
TheCelt said:
Sorry... can someone post what those lines should look like once they have been changed to a diff color? I'm not sure exactly what in those lines I should be changing (I do understand the color codes).
Sorry for the noobish question.
Click to expand...
Click to collapse
You would be changing the codes themselves.
i.e ff or a5, or whatever...
I will write up more in a bit..
Gunthermic said:
You would be changing the codes themselves.
i.e ff or a5, or whatever...
I will write up more in a bit..
Click to expand...
Click to collapse
Thanks for clarifying the coding changes.... one last (what I am sure if dumb) question. where does one find that file. I am rooted and searched the device for both "smali" and "diotek" using ES file Explorer and have not found the file referenced above.
TheCelt said:
Thanks for clarifying the coding changes.... one last (what I am sure if dumb) question. where does one find that file. I am rooted and searched the device for both "smali" and "diotek" using ES file Explorer and have not found the file referenced above.
Click to expand...
Click to collapse
Its contained inside the SamsungIME apk itself. It has to be decompiled and MODed
Gunthermic said:
Its contained inside the SamsungIME apk itself. It has to be decompiled and MODed
Click to expand...
Click to collapse
Got it. Thanks Gunthermic. Much appreciated.

[Devs][Guide] Add Reboot Safestrap Recovery to power menu with toggle

Credits goes to @sagitt67 and @daxgirl .
Credits for toggle goes to @tdunham main guide is here and @asc1977 for the guide here big thanks to them.
In this Guide we'll modify framework-res.apk and services.jar
framework-res.apk:
Download framework-res.zip that is attached below, extract and copy it in your decompiled framework-res.apk folder
now open res/values/arrays.xml
find <string-array name="config_globalActionsList"> and add blue
Code:
<string-array name="config_globalActionsList">
<item>power</item>
<item>datamode</item>
<item>airplane</item>
<item>restart</item>
<item>lockdown</item>
<item>bugreport</item>
<item>users</item>
[COLOR="blue"]<item>rebootsafestrap</item>[/COLOR]
<item>emergencymode</item>
<item>subscreen</item>
</string-array>
now go to res/values/strings.xml at very end and add blue
Code:
<string name="wifi_extender_notification_title">Wi-Fi extender on</string>
<string name="wifi_extender_notification_message">Tap here to set up.</string>
<string name="config_tspstate_threshold" />
[COLOR="blue"]<string name="tw_ic_do_restart_safestrap">Reboot Safestrap</string>[/COLOR]
</resources>
done with framework-res.apk recompile
Services.jar:
download services.zip that is attached below, extract and copy it in your decompiled services.jar folder
open smali/com/android/server/policy/GlobalActions.smali
add blue line in # instance fields
Code:
.field private mRestart:Lcom/android/server/policy/GlobalActions$SinglePressAction;
[COLOR="blue"].field private mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;
[/COLOR]
.field mRestartIconResId:I
find .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog;
add blue
Code:
if-eqz v4, :cond_27b
const v4, 0x1080a58
.line 1642
:goto_11c
const v6, 0x104070e
.line 1639
move-object/from16 v0, p0
invoke-direct {v5, v0, v4, v6}, Lcom/android/server/policy/GlobalActions$21;-><init>(Lcom/android/server/policy/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v5, v0, Lcom/android/server/policy/GlobalActions;->mRestart:Lcom/android/server/policy/GlobalActions$SinglePressAction;
[COLOR="Blue"]new-instance v4, Lcom/android/server/policy/GlobalActions$99;
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const-string v1, "tw_ic_do_restart_safestrap"
const-string v2, "drawable"
const-string v3, "android"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v5
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const-string v1, "tw_ic_do_restart_safestrap"
const-string v2, "string"
const-string v3, "android"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v6
move-object/from16 v0, p0
invoke-direct {v4, v0, v5, v6}, Lcom/android/server/policy/GlobalActions$99;-><init>(Lcom/android/server/policy/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v4, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;[/COLOR]
.line 1688
invoke-static {}, Lcom/samsung/android/feature/SemCscFeature;->getInstance()Lcom/samsung/android/feature/SemCscFeature;
move-result-object v4
const-string/jumbo v5, "CscFeature_Common_ConfigBikeMode"
invoke-virtual {v4, v5}, Lcom/samsung/android/feature/SemCscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
Now next part is tricky, add lines in blue and changes in green
Code:
const/4 v7, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v6, v4, v5, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z
.line 1767
new-instance v4, Lcom/android/server/policy/GlobalActions$BugReportAction;
move-object/from16 v0, p0
invoke-direct {v4, v0}, Lcom/android/server/policy/GlobalActions$BugReportAction;-><init>(Lcom/android/server/policy/GlobalActions;)V
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
[COLOR="blue"]const/16 v6, 0x100
const/4 v7, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v6, v4, v5, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;[/COLOR]
const/16 v6, [COLOR="Green"]0x200[/COLOR] [COLOR="Red"]#before was 0x100[/COLOR]
const/4 v7, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v6, v4, v5, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z
now search for const-string/jumbo v4, "silent" and add blue line above it and green parts must match orange part
Code:
const-string/jumbo v4, "emergencymode"
invoke-virtual {v4, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_381
.line 1835
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mEmergency:Lcom/android/server/policy/GlobalActions$ToggleAction;
invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto/16 :[COLOR="orange"]goto_2d9[/COLOR] #look that green part match this
.line 1836
:cond_381
[COLOR="Blue"]const-string/jumbo v4, "rebootsafestrap"
invoke-virtual {v4, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_3da
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;
invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto/16 :[COLOR="Green"]goto_2d9 [/COLOR]
:cond_3da[/COLOR]
const-string/jumbo v4, "silent"
next part is missing in Android 7 services.jar so we need to readd it for mod
find .method private addCustomDialogItems(Landroid/graphics/drawable/BitmapDrawable;Ljava/lang/String;Landroid/content/Intent;ILjava/util/ArrayListZ
add this above method
Code:
[COLOR="Blue"].method static synthetic access$500(Lcom/android/server/policy/GlobalActions;)Landroid/content/Context;
.locals 1
iget-object v0, p0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
return-object v0
.end method[/COLOR]
thats it, recompile and push to phone
Note: For me one time i get after reboot a loop of phone restarts, only one time happens. If it happen i solved it with wipe dalvik-cache and cache
Credits goes to @TheDriller for this part in this guide
Note: no need to change the code in GlobalActions$99.smali already done
GlobalActions$99.smali:
find .method public onPress()V and replace blue lines with red one
Code:
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
[COLOR="Red"]const-string v1, "recovery"
invoke-virtual {v0, v1}, Landroid/os/PowerManager;->reboot(Ljava/lang/String;)V[/COLOR]
to
Code:
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
[COLOR="Blue"]const-string v1, "su -c echo 1 > /data/.recovery_mode && su -c reboot now"
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v2
invoke-virtual {v2, v1}, Ljava/lang/Runtime;->exec(Ljava/lang/String;)Ljava/lang/Process;[/COLOR]
Wow thia makes things so much easier
Sent from my SM-G950U using Tapatalk
This is different on the Note 8 isn't it? I got as far as the services jar .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog; I input the blue text that was mentioned but I'm curious why in your sample does it not have .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog; before the blue text?
The Second batch of code with the green changes I had no idea where to input that and I couldn't find const/16 v6, 0x100 to change to 200 either
The step after that I was genuinely lost nothing matched what you had in your sample I felt like I was so close to getting it.
Thanks
SM-N950W
dillweedinc said:
This is different on the Note 8 isn't it? I got as far as the services jar .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog; I input the blue text that was mentioned but I'm curious why in your sample does it not have .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog; before the blue text?
The Second batch of code with the green changes I had no idea where to input that and I couldn't find const/16 v6, 0x100 to change to 200 either
The step after that I was genuinely lost nothing matched what you had in your sample I felt like I was so close to getting it.
Thanks
Click to expand...
Click to collapse
I will check them soon.
Maybe @JavixKGD can help you as he asked for the mod and he got it working on Note 8.
It is important to specify that this mod only applies to Nougat, it needs to be updated for Oreo.
I am using Nougat 7.1.1 on a note 8 sm-n950w with me's samfail firmware bl1 - I sent him a message thanks! I see it built into another firmware that is available but id rather build it into me's samfail firmy since there is some issues to be wrinkled out in the other custom firmwares.
This thread is more currently active than the Safestrap one. I'm just here looking for more information on how to flash ROMS while keeping your others. Like do I activate that slot then start flashing and do you know if it's possible to use Slick ROM as one of the slots? I'm rooted with Partcyborg on bootloader v2
xSl33p said:
This thread is more currently active than the Safestrap one. I'm just here looking for more information on how to flash ROMS while keeping your others. Like do I activate that slot then start flashing and do you know if it's possible to use Slick ROM as one of the slots? I'm rooted with Partcyborg on bootloader v2
Click to expand...
Click to collapse
Dont quote me on this but im pretty sure the slots arent 100% functional yet you can do backups and restore your system flash zips ect. , I know this thread is more active but you should really stick with the topic of the thread, your question would get answered there.
I got an answer from the guy you recommended afaneh92 thanks, it looks like I need to place the smalis in a different folder as they go over the limit, I dont have time right now but he also sent me his services .jar so I can see what the difference is I got some learning to do.
Thanks
Canadian Dilly.
dillweedinc said:
Dont quote me on this but im pretty sure the slots arent 100% functional yet you can do backups and restore your system flash zips ect. , I know this thread is more active but you should really stick with the topic of the thread, your question would get answered there.
I got an answer from the guy you recommended afaneh92 thanks, it looks like I need to place the smalis in a different folder as they go over the limit, I dont have time right now but he also sent me his services .jar so I can see what the difference is I got some learning to do.
Thanks
Canadian Dilly.
Click to expand...
Click to collapse
Im working on update and some fixes for the mod, then will rewrite this guide in the Note 8 section.

Categories

Resources