[Continuum General] trailblazer101:
Alright, here's if I was you how to start out... First, figure out where the actions you want to change are coming from... You can change something in the area that you want changed (like push a button or anything like that), then look in logcat/DDMS to see where it is coming from! That will lead you to the smali file..... In your case, because you want to modify something in the Ticker Missed Notification View screen, you can use a little bit of luck and assume its coming from TickerMissedNotificationView.smali within the services file, haha... Now, you limited it down a lot... From here, you need to narrow it down more... Think about what exactly is happening; so, you are clicking a button, and it does some action... Well, why don't we find the button first, then that can lead us elsewhere... *HINT: A good place to start looking for things, no matter where you are, is within onFinishInflate()V*... So, let's look for something that looks like the button... First thing I see is: "mNewEmailImage:Landroid/widget/ImageButton;." alright, so let's follow that, and see where it goes! Later on within that function, you see something along the lines of:

iget-object v0, p0, Lcom/android/server/ticker/TickerMissNotificationView;->mNewEmailImage:Landroid/widget/ImageButton;

new-instance v1, Lcom/android/server/ticker/TickerMissNotificationView$4;

invoke-direct {v1, p0}, Lcom/android/server/ticker/TickerMissNotificationView$4;-><init>(Lcom/android/server/ticker/TickerMissNotificationView;)V

invoke-virtual {v0, v1}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

We are getting warmer! We know that this is right, because it has "OnClickListener"... Its just common sense that this code does whatever is within TickerMissNotificationView$4 when clicked! Now, open up the specified file, TickerMissNotificationView$4, and see what that does!

This is where it gets tricky.. You don't see anything that says: HEY, I JUST GOT CLICKED, SO LET'S DO THIS!!!"

Instead, you often see code that sends a "message" to somewhere else, just for funsies :P But, let's continue... Since we don't see anything within that file itself about opening the email screen (HINT: you know a program is being opened when you see: com.blah.blah.SOMETHINGEMAIL"), find what the message is, and where it is being sent to!

So, at the end of the file, you see:

const/16 v1, 0x69

iput v1, v0, Landroid/os/Message;->arg1:I

.line 220
iget-object v1, p0, Lcom/android/server/ticker/TickerMissNotificationView$4;->this$0:Lcom/android/server/ticker/TickerMissNotificationView;

iget-object v1, v1, Lcom/android/server/ticker/TickerMissNotificationView;->mHandler:Lcom/android/server/ticker/TickerMissNotificationView$H;

invoke-virtual {v1, v0}, Lcom/android/server/ticker/TickerMissNotificationView$H;->sendMessage(Landroid/os/Message;)Z

This looks promising! So now let's open up TickerMissNotificationView$H, and try and do a search for const/16 v1, 0x69... Oh uh, no results! But you do see that this is the right place, because you see that it is launching other apps from here! From here, you can do two things... A) you can just search through the file, find code that looks like it is opening the email program, and move to the start of the section (right after pswitch)... or my favorite, b) you know that each section of this file is doing different things, and you see that they are divied up by "pswitch"s... so, let's find out how it knows where to go! After looking around, you will find your answer at the bottom: ".packed-switch 0x65"... This code starts with 65, and goes up to whatever the last message is :) so, for example: 65 would be pswitch_0, 66 would be pswitch_1, etc etc... So, by using this method, we can go exactly where we need to go! find where pswitch_4 happens again, and that's your start... Now, select all the code within the two pswitchs, copy it into another file, then delete it... you should now have "pswitch_4, then right after, pswitch_5"...

Here's the part that makes you always feel guilty, cheat! Find code that is close to what you want, and make it your own ;) So, look through the other "pswitch"s and find which one has code that is ONLY launching an application, not anything else... CLUES: look for the indicator I gave you before: "com.blah.blah.whatever"... So for this case, you find something like this:

new-instance v8, Landroid/content/Intent;

invoke-direct {v8}, Landroid/content/Intent;-><init>()V

.line 547
.restart local v8 #intent:Landroid/content/Intent;
const/high16 v18, 0x1480

move-object v0, v8

move/from16 v1, v18

invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

.line 548
const-string v18, "com.android.mms"

const-string v19, "com.android.mms.ui.ConversationList"

move-object v0, v8

move-object/from16 v1, v18

move-object/from16 v2, v19

invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

.line 549
move-object/from16 v0, p0

iget-object v0, v0, Lcom/android/server/ticker/TickerMissNotificationView$H;->this$0:Lcom/android/server/ticker/TickerMissNotificationView;

move-object/from16 v18, v0

move-object/from16 v0, v18

iget-object v0, v0, Lcom/android/server/ticker/TickerMissNotificationView;->mTickerService:Lcom/android/server/ticker/TickerTapeService;

move-object/from16 v18, v0

move-object/from16 v0, p0

iget-object v0, v0, Lcom/android/server/ticker/TickerMissNotificationView$H;->this$0:Lcom/android/server/ticker/TickerMissNotificationView;

move-object/from16 v19, v0

invoke-virtual/range {v19 .. v19}, Lcom/android/server/ticker/TickerMissNotificationView;->getContext()Landroid/content/Context;

move-result-object v19

move-object/from16 v0, v18

move-object/from16 v1, v19

move-object v2, v8

invoke-virtual {v0, v1, v2}, Lcom/android/server/ticker/TickerTapeService;->launchActivity(Landroid/content/Context;Landroid/content/Intent;)V

goto/16 :goto_0

.line 555
.end local v8 #intent:Landroid/content/Intent;

This is short and sweet, so let's use this!

copy and paste that code into the emptiness, and pray ;) Now, i would compile, and make sure that the button you are trying to modify does the same thing that the button you copied from does... If yes, yay!

Now you have to find what is the "call" that is being done when you launch the application of your choice... So, go into logcat/DDMS, again, and open up the program you want to set as your button... look for the hint I gave you before; you should see code code code, and within some of that code: "com.1.2" ".1.2.3"

For example, this is what you see when you open up facebook:

starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.facebook.katana/.LoginActivity }

So, replace the

const-string v18, "com.android.mms"

const-string v19, "com.android.mms.ui.ConversationList"

with

const-string v18, "com.facebook.katana"

const-string v19, "com.facebook.katana.LoginActivity"

You should now be done ;)