yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] tdunham:
Hi Goldie,

I've been having trouble with a couple of smali's that just wont take a context toggle but it occurred to me that customsettings already has the ability to use a key to read io from the sdcard/Alliance folder for a similar purpose.

If you have a moment, would you mind explaining a little of how to implement the Ljava/io/File reads and writes for that sort of thing?
[Galaxy S II Android Development] CNexus:
What exactly are you trying to do? It's just java so I can help you out
[Galaxy S II Android Development] tdunham:
I'm trying to add a customsettings toggle using a key where one wouldn't normally work because context, mcontext, getcontext wont work. In customsettings is a built in routine to check file exist and read/write to sdcard and utilize the 'key' that is defined similar to how Mythandyr's old acrs.apk used to do for the toggle for the old call recorder mod.
[Galaxy S II Android Development] remuntada78:
can you post a smali file example where context does not want to work?
[Galaxy S II Android Development] tdunham:
Sure.

This is a fairly small smali that I am trying to change a couple constructs with a toggle in this method:

.method checkScreenState()I
.locals 1

iget-object v0, p0, Lcom/android/nfc/ScreenStateHelper;->mPowerManager:Landroid/os/PowerManager;

invoke-virtual {v0}, Landroid/os/PowerManager;->isScreenOn()Z

move-result v0

if-nez v0, :cond_0

const/4 v0, 0x1

:goto_0
return v0

:cond_0
iget-object v0, p0, Lcom/android/nfc/ScreenStateHelper;->mKeyguardManager:Landroid/app/KeyguardManager;

invoke-virtual {v0}, Landroid/app/KeyguardManager;->isKeyguardLocked()Z

move-result v0

if-eqz v0, :cond_1

const/4 v0, 0x2

goto :goto_0

:cond_1
const/4 v0, 0x3

goto :goto_0
.end method

This is just an example of one spot. I would normally just change the result where it is called but it is called in 6 different areas, which doesn't make things any easier.
[Galaxy S II Android Development] remuntada78:
too hard for me, the only thing that I would try is to use context as parameter like this

.method checkScreenState(Landroid/content/Context;)I and then call the context like this

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

move-result-object vx

and then check if the old method name is called in other place in the apk and change it to .method checkScreenState(Landroid/content/Context;)I
[Galaxy S II Android Development] tdunham:
I'll have to take another crack at it. Like I said, there is more than one spot I have issue adding a toggle so looking for a different method like the file read/write way.

I'm pretty sure I tried this but you how it is, after a while of attempting different methods to get something working, you end up losing track of what you've done along the way. LOL
[Galaxy S II Android Development] remuntada78:
Then I suppose you have already tried to add mContext field in the # instance fields

Inviato dal mio SM-G900F utilizzando Tapatalk
[Galaxy S II Android Development] CNexus:
Alright I can give you two methods that will essentially allow you to read/write keys from anywhere by backing the keys with actual files

To make it easier, you could probably then integrate these two methods into one of the framework jars so that you'll be able to do something like:

#Get value
const-string v0, "key_name_here"
invoke-static {v0}, Lcom/android/Moar;->getValue(Ljava/lang/String;)Ljava/lang/String;

# Set value
const-string v0, "key_name_here"
const-string v1, "value_here"
invoke-static {v0, v1}, Lcom/android/Moar;->setValue(Ljava/lang/String;Ljava/lang/String;)V

From anywhere
[Galaxy S II Android Development] remuntada78:
Hi anybody knows how can i set a View position?

From developer android site i learned to manage the position of LinearLayout using setGravity (I) V, thanks to the site where the developer of Android LinearLayout is the following table

so for a LinearLayout we can set

check-cast vx, Landroid/widget/LinearLayout;

const/16 vy, 0x70 [COLOR="Red"] This constant determines the integer for the position to be obtained according to the table[/COLOR]

invoke-virtual {vx, vy}, Landroid/widget/LinearLayout;->setGravity(I)V

now for a View we should set one of the following codes

invoke-virtual {px, vx}, Landroid/view/View;->setTop(I)V to set the View up

invoke-virtual {px, vx}, Landroid/view/View;->setBottom(I)V to set the View down

invoke-virtual {px, vx}, Landroid/view/View;->setLeft(I)V to set the View to the left

invoke-virtual {px, vx}, Landroid/view/View;->setRight(I)V to set the View to the right

But I do not understand how to assign the integer to the constant

thanks in advance
[Galaxy S II Android Development] Goldie:
You answered your own question!! Const/16 vy, 0x70
[Galaxy S II Android Development] Goldie:
Depends which text you wanna change :p
[Galaxy S II Android Development] Goldie:
Mean these ones?....
[Galaxy S II Android Development] remuntada78:
yes i mean exactly like in image
[Galaxy S II Android Development] Goldie:
Ok...dont wanna tell you exactly where as that defeats the object but...
[Galaxy S II Android Development] remuntada78:
Thank you the smali file you show me was one of many i've detect whit my research

I'll try to work whit it following your guide

Thanks:)
[Galaxy S II Android Development] Goldie:
Thanks. Its so nice to see someome making an attempt. Hope you're successful :)
[Galaxy S II Android Development] sieuan:
Thanks sir! But I don't understand anything. I'm a noob:(:( sorry:(
[Galaxy S II Android Development] remuntada78:
always me:crying:

i found 4 setText in the Settings$HeaderAdapter.smali

:pswitch_3
iget-object v8, v3, Lcom/android/settings/Settings$HeaderAdapter$HeaderViewHolder;->title:Landroid/widget/TextView;

invoke-virtual {p0}, Landroid/widget/ArrayAdapter;->getContext()Landroid/content/Context;

move-result-object v9

invoke-virtual {v9}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v9

invoke-virtual {v1, v9}, Landroid/preference/PreferenceActivity$Header;->getTitle(Landroid/content/res/Resources;)Ljava/lang/CharSequence;

move-result-object v9

invoke-virtual {v8, v9}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

goto/16 :goto_2

:goto_9
iget-object v8, v3, Lcom/android/settings/Settings$HeaderAdapter$HeaderViewHolder;->title:Landroid/widget/TextView;

invoke-virtual {p0}, Landroid/widget/ArrayAdapter;->getContext()Landroid/content/Context;

move-result-object v9

invoke-virtual {v9}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v9

invoke-virtual {v1, v9}, Landroid/preference/PreferenceActivity$Header;->getTitle(Landroid/content/res/Resources;)Ljava/lang/CharSequence;

move-result-object v9

invoke-virtual {v8, v9}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

.line 1211

.line 1213
iget-object v8, v3, Lcom/android/settings/Settings$HeaderAdapter$HeaderViewHolder;->title:Landroid/widget/TextView;

invoke-virtual {p0}, Landroid/widget/ArrayAdapter;->getContext()Landroid/content/Context;

move-result-object v9

invoke-virtual {v9}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v9

const v10, 0x7f09056b

invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

move-result-object v9

invoke-virtual {v8, v9}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

.line 1216

.line 1226
iget-object v8, v3, Lcom/android/settings/Settings$HeaderAdapter$HeaderViewHolder;->summary:Landroid/widget/TextView;

invoke-virtual {v8, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

goto/16 :goto_2

i suppose i need to add some strings to all but i think i need to add the part of your guide in DisplaySettings.smali.

it's right?
[Galaxy S II Android Development] Goldie:
No. All the additions go in that file. At those points
[Galaxy S II Android Development] remuntada78:
I'm trying to figure out what to do.

if in this section i add the red lines it might work?

:pswitch_3
iget-object v8, v3, Lcom/android/settings/Settings$HeaderAdapter$HeaderViewHolder;->title:Landroid/widget/TextView;

invoke-virtual {p0}, Landroid/widget/ArrayAdapter;->getContext()Landroid/content/Context;

move-result-object v9

invoke-virtual {v9}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v9

invoke-virtual {v1, v9}, Landroid/preference/PreferenceActivity$Header;->getTitle(Landroid/content/res/Resources;)Ljava/lang/CharSequence;

move-result-object v9

invoke-virtual {v8, v9}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

[COLOR="Red"] invoke-virtual {p0}, Lcom/android/settings/Settings$HeaderAdapter;->getContext()Landroid/content/Context;

move-result-object v9

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

move-result-object v9

const-string v10, "text_color"

const v11, -0x000000

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

move-result v9

invoke-virtual {v8, v9}, Lcom/android/settings/Settings$HeaderAdapter;->setTextColor(I)V[/COLOR]

goto/16 :goto_2

and i'll apply the same strings in the other 3 section
[Galaxy S II Android Development] Goldie:
Very nearly. Look at the getContext in the code you posted above the red lines. Slightly different to your red part. ;)
[Galaxy S II Android Development] remuntada78:
You mean this

invoke-virtual {p0}, Landroid/widget/ArrayAdapter;->getContext()Landroid/content/Context;

Why?
[Galaxy S II Android Development] Goldie:
Indeed. That is how context is achieved in that method so just replace that getContext line into your red and it should work :)
[Galaxy S II Android Development] remuntada78:
so i need to replace invoke-virtual {v9}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

with this invoke-virtual {p0}, Lcom/android/settings/Settings$HeaderAdapter;->getContext()Landroid/content/Context; ?

if yes i need to replace it only in the other 3 sections or in all file?
[Galaxy S II Android Development] Goldie:
No....you put this in red....

invoke-virtual {p0}, Lcom/android/settings/Settings$HeaderAdapter;->getContext()Landroid/content/Context;

Needs to be....

invoke-virtual {p0}, Landroid/widget/ArrayAdapter;->getContext()Landroid/content/Context;
[Galaxy S II Android Development] remuntada78:
ah ok i've some issue whit translation my english isn't perfect:o

thank you very much:laugh:
[Galaxy S II Android Development] remuntada78:
Hi Goldie i've tried to add the lines with your correction but don't work

this is the log View attachment logcat.txt

if i've understand it i need to create a new method?
[Galaxy S II Android Development] Goldie:
No....in your code you must be saying this....

invoke-virtual {v8, v9}, Lcom/android/settings/Settings$HeaderAdapter;->setTextColor(I)V

Instead of this....

invoke-virtual {v8, v9}, Landroid/widget/TextView;->setTextColor(I)V

As you see earlier in the code v8 is a android/widget/TextView not Lcom/android/settings/Settings$HeaderAdapter and it is the TextView that has the setTextColor method hence why it cant find it in Settings$HeaderAdapter :)

Sorry, didnt spot it when you posted your code before :)
[Galaxy S II Android Development] remuntada78:
I'm confused i've add the red lines

iget-object v8, v3, Lcom/android/settings/Settings$HeaderAdapter$HeaderViewHolder;->title:Landroid/widget/TextView;

invoke-virtual {p0}, Landroid/widget/ArrayAdapter;->getContext()Landroid/content/Context;

move-result-object v9

invoke-virtual {v9}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v9

invoke-virtual {v1, v9}, Landroid/preference/PreferenceActivity$Header;->getTitle(Landroid/content/res/Resources;)Ljava/lang/CharSequence;

move-result-object v9

invoke-virtual {v8, v9}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

[COLOR="Red"]invoke-virtual {p0}, Landroid/widget/ArrayAdapter;->getContext()Landroid/content/Context;

move-result-object v9

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

move-result-object v9

const-string v10, "text_color"

const v11, -0x000000

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

move-result v9

invoke-virtual {v8, v9}, Lcom/android/settings/Settings$HeaderAdapter;->setTextColor(I)V[/COLOR]

which is my error?

i'm sorry i read now your edit

---------- Post added at 09:01 PM ---------- Previous post was at 08:41 PM ----------

so the final code could be this :

iget-object v8, v3, Lcom/android/settings/Settings$HeaderAdapter$HeaderViewHolder;->title:Landroid/widget/TextView;

invoke-virtual {p0}, Landroid/widget/ArrayAdapter;->getContext()Landroid/content/Context;

move-result-object v9

invoke-virtual {v9}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v9

invoke-virtual {v1, v9}, Landroid/preference/PreferenceActivity$Header;->getTitle(Landroid/content/res/Resources;)Ljava/lang/CharSequence;

move-result-object v9

invoke-virtual {v8, v9}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

[COLOR="Red"][/COLOR]	invoke-virtual {p0}, Landroid/widget/ArrayAdapter;->getContext()Landroid/content/Context;

move-result-object v9

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

move-result-object v9

const-string v10, "text_color"

const v11, -0x000000

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

move-result v9

invoke-virtual {v8, v9}, Landroid/widget/TextView;->setTextColor(I)V [/COLOR]
[Galaxy S II Android Development] Goldie:
The last line...

invoke-virtual {v8, v9}, Lcom/android/settings/Settings$HeaderAdapter;->setTextColor(I)V

Should relate to what is in v8 which is the TextView rather than Settings$ HeaderAdapter.

So should be...

invoke-virtual {v8, v9}, Landroid/widget/TextView;->setTextColor(I)V

This calls the setTextColor method from the file TextView smali which is in framework2.jar in android/widget folder. The TextView is referred to earlier in the code and resides in v8 which is the part after invoke-virtual {v8, v9}. The next part of the line should be what is in the first v of the invoke-virtual (in this case Landroid/widget/TextView). This is followed by ;-> setTextColor(I)V where the I in brackets is the second v in the invoke-virtual. In this case your color stored as an integer in v9.
[Galaxy S II Android Development] remuntada78:
no, i tried but not work
[Galaxy S II Android Development] Goldie:
Any more specific than "not work"? [emoji14]
[Galaxy S II Android Development] remuntada78:
yes sure,i have a view(lockscreen clock) that is set to the top , i already change some xml to allow that view to move in more direction

so i changed my smali

sget v0, Lcom/android/keyguard/R$id;->keyguard_single_clock_container:I

invoke-virtual {p0, v0}, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->findViewById(I)Landroid/view/View;

move-result-object v0
[COLOR="Red"]
const v2, 0x50 [COLOR="Blue"]this const set to the bottom[/COLOR]

invoke-virtual {v0, v2}, Landroid/view/View;->setBottom(I)V
[/COLOR]
iput-object v0, p0, Lcom/android/keyguard/sec/SecKeyguardClockSingleView;->mSingleClockContainer:Landroid/view/View;

but the view stay to the top
[Galaxy S II Android Development] Goldie:
Should it not be setgravity?
[Galaxy S II Android Development] remuntada78:
setGravity is only for android/widget/LinearLayout, there isn't that option for android/view/View, but perhaps i found another way

edit: the new way work:D:D
[Galaxy S II Android Development] fzn tools:
Very helpful for me:fingers-crossed:
[Galaxy S II Android Development] CNexus:
[MENTION=5292754]remuntada78[/MENTION]

You're missing a

move-result-object v1

after the invoke-static

Verification is failing because you're still holding a reference to the DialpadFragment in register v1 but you're trying to call a method from the View class on it
[Galaxy S II Android Development] Joe_E_Dotz:
Witch ADB do I use from the play store ?
[Galaxy S II Android Development] lacoursiere18:
I would try searching in your log for other instances of the VerifyError.. It's obviously either a variable you added or whatever p0 is referencing..

See if this:

Rejecting re-init on previously-failed

Pops up anywhere else with a little more definition
[Galaxy S II Android Development] remuntada78:
I noticed only that View attachment log2.zip

edit [MENTION=5056266]lacoursiere18[/MENTION] View attachment dumpstate_app_error.txt.gz
[Galaxy S II Android Development] lacoursiere18:
Can you grab your dumpstate? Can look through that, but I am only trying to learn as well..
[Galaxy S II Android Development] remuntada78:
take a look View attachment dumpstate_sys_error.txt.gz
[Galaxy S II Android Development] lacoursiere18:
Sorry should have specified.. dumpstate_app_error please.. Thanks
[Galaxy S II Android Development] remuntada78:
Hi i want to try to set a image background for the notification panel background then after it's set i want to apply on it the change color ,looking in my SystemUI if this way is already used i found the following code

.line 702
const v0, 0x7f020001

invoke-virtual {p0, v0}, Lcom/android/systemui/egg/LLand$Player;->setBackgroundResource(I)V

.line 703
invoke-virtual {p0}, Lcom/android/systemui/egg/LLand$Player;->getBackground()Landroid/graphics/drawable/Drawable;

move-result-object v0

sget-object v1, Landroid/graphics/PorterDuff$Mode;->SRC_ATOP:Landroid/graphics/PorterDuff$Mode;

invoke-virtual {v0, v1}, Landroid/graphics/drawable/Drawable;->setTintMode(Landroid/graphics/PorterDuff$Mode;)V

is this the right way to achieve what i want?

edit:solved , the solution is to use getBackground()Landroid/graphics/drawable/Drawable; after we set the background image ,then apply setColorFilter for Landroid/graphics/drawable/Drawable
[Galaxy S II Android Development] Joe_E_Dotz:
Can anyone please help me im a nood at all of this and im not sure which ADB

Notepad ++

A good image editor like Photoshop or GIMP app on the play store will be the best ones that fit listed tools can anyone please help me ???
[Galaxy S II Android Development] Petreion:
:)Thanks Goldie for all ur guide end thanks for helping people for learning how to work with smali code end for mod smali code because of people like Goldie xda its the best
[Galaxy S II Android Development] remuntada78:
how to call a class?

Hi to all, i'm trying to call a method of a SystemUI file into a other SystemUI file with a new method, in red is the method i need to call in QSTileView.smali file

.method new_method()V
.locals 3

iget-object v0, p0, Lcom/android/systemui/qs/QSTileView;->mContext:Landroid/content/Context;

new-instance v1, Lcom/android/systemui/qs/QSPanel;

invoke-direct {v1, v0}, Lcom/android/systemui/qs/QSPanel;-><init>(Landroid/content/Context;)V

[COLOR="Red"]invoke-direct {v1}, Lcom/android/systemui/qs/QSPanel;->refreshAllTiles()V[/COLOR]

return-void
.end method

i got a error and it says

E/AndroidRuntime( 1267): FATAL EXCEPTION: main

E/AndroidRuntime( 1267): Process: com.android.systemui, PID: 1267

E/AndroidRuntime( 1267): java.lang.IllegalAccessError: Method 'void com.android.systemui.qs.QSPanel.refreshAllTiles()' is inaccessible to class 'com.android.systemui.qs.QSTileView' (declaration of 'com.android.systemui.qs.QSTileView' appears in /system/priv-app/SystemUI/SystemUI.apk)

E/AndroidRuntime( 1267):	at com.android.systemui.qs.QSTileView.refreshIconColor(QSTileView.java)

E/AndroidRuntime( 1267):	at com.android.systemui.qs.QSTileView$SettingsObserver.onChange(QSTileView.java:291)

E/AndroidRuntime( 1267):	at android.database.ContentObserver.onChange(ContentObserver.java:130)

E/AndroidRuntime( 1267):	at android.database.ContentObserver.onChange(ContentObserver.java:145)

E/AndroidRuntime( 1267):	at android.database.ContentObserver$NotificationRunnable.run(ContentObserver.java:216)

E/AndroidRuntime( 1267):	at android.os.Handler.handleCallback(Handler.java:739)

E/AndroidRuntime( 1267):	at android.os.Handler.dispatchMessage(Handler.java:95)

E/AndroidRuntime( 1267):	at android.os.Looper.loop(Looper.java:145)

E/AndroidRuntime( 1267):	at android.app.ActivityThread.main(ActivityThread.java:5832)

E/AndroidRuntime( 1267):	at java.lang.reflect.Method.invoke(Native Method)

E/AndroidRuntime( 1267):	at java.lang.reflect.Method.invoke(Method.java:372)

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

E/AndroidRuntime( 1267):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)

W/ContextImpl( 1010): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1629 com.android.server.InputMethodManagerService$6.run:-1 java.lang.Thread.run:818 <bottom of call stack> <bottom of call stack>

how can i do it?

thanks in advance
[Galaxy S II Android Development] remuntada78:
[MENTION=3065070]Goldie[/MENTION], hi i added red lines in AlertController.smali

.method private setBackground(Landroid/content/res/TypedArray;Landroid/view/View;Landroid/view/View;Landroid/view/View;Landroid/view/View;ZZZ)V
.locals 24
.
.

:goto_3
move/from16 v0, v22

invoke-virtual {v12, v0}, Landroid/view/View;->setBackgroundResource(I)V
[COLOR="Red"]
invoke-virtual {v12}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;

move-result-object v4

move-object/from16 v2, p0

iget-object v1, v2, Lcom/android/internal/app/AlertController;->mContext:Landroid/content/Context;

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

move-result-object v1

const-string v2, "system_bg_color"

const/4 v3, -0x1

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

move-result v1

sget-object v5, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;

invoke-virtual {v4, v1, v5}, Landroid/graphics/drawable/Drawable;->setColorFilter(ILandroid/graphics/PorterDuff$Mode;)V
[/COLOR]
.line 761
:goto_4
const/16 v17, 0x1

.line 764
:cond_7

and i got error

11-19 12:25:00.750 681 1041 I dex2oat : Verification error in void com.android.internal.app.AlertController.setBackground(android.content.res.TypedArray, android.view.View, android.view.View, android.view.View, android.view.View, boolean, boolean, boolean)
11-19 12:25:00.750 681 1041 I dex2oat : void com.android.internal.app.AlertController.setBackground(android.content.res.TypedArray, android.view.View, android.view.View, android.view.View, android.view.View, boolean, boolean, boolean)[COLOR="Red"] failed to verify: register v5 has type Conflict but expected[/COLOR] Integerackground(android.content.res.TypedArray, android.view.View, android.view.View, android.view.View, android.view.View, boolean, boolean, boolean): [0x11C]
11-19 12:25:00.750 681 1041 E dex2oat : Verification failed on class com.android.internal.app.AlertController in /system/framework/framework.jar because: Verifier rejected class com.android.internal.app.AlertController due to bad method void com.android.internal.app.AlertController.setBackground(android.content.res.TypedArray, android.view.View, android.view.View, android.view.View, android.view.View, boolean, boolean, boolean)

can you explain me what is the problem with v5 register?

thanks ib advance
[Galaxy S II Android Development] xpirt:
try with v2 or v3, you can re-use them.

sget-object v2, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;

invoke-virtual {v4, v1, v2}, Landroid/graphics/drawable/Drawable;->setColorFilter(ILandroid/graphics/PorterDuff$Mode;)V
[Galaxy S II Android Development] Goldie:
I see people are still using our code to source....of all the possible keys yours shows identical to one of ours. Im away for a while and nothing changes huh