[Android Software/Hacking General [Developers Only]] varun.chitre15:
I need a little bit of help on step 1.6 . I am doing it for Samsung device and saw the different code for Samsung device for makenotifications method.

I have modified it as given in the Samsung based code but getting an error while compilation

well error is

no alternative viable input at '('

And the related line is this

invoke-direct {v0, v1, v2}, Lcom/android/systemui/statusbar/StatusBarService$7;->(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V

And my complete modified method is

.method makeNotificationView(Lcom/android/internal/statusbar/StatusBarNotification;Landroid/view/ViewGroup;)[Landroid/view/View;
.locals 13
.parameter
.parameter

.prologue
const/4 v12, 0x1

const/4 v11, 0x0

const/4 v10, 0x0

.line 655
iget-object v2, p1, Lcom/android/internal/statusbar/StatusBarNotification;->notification:Landroid/app/Notification;

.line 656
iget-object v8, v2, Landroid/app/Notification;->contentView:Landroid/widget/RemoteViews;

.line 657
if-nez v8, :cond_b

move-object v1, v10

.line 695
:goto_a
return-object v1

.line 662
:cond_b
const-string v1, "layout_inflater"

invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/StatusBarService;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

move-result-object v1

check-cast v1, Landroid/view/LayoutInflater;

.line 663
const v3, 0x7f03000a

invoke-virtual {v1, v3, p2, v11}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

move-result-object v9

check-cast v9, Lcom/android/systemui/statusbar/LatestItemContainer;

.line 516
.local v9, row:Lcom/android/systemui/statusbar/LatestItemContainer;
move-object/from16 v0, v2

iget v0, v0, Landroid/app/Notification;->flags:I

move v4, v0

and-int/lit8 v4, v4, 0x2

if-nez v4, :cond_1

move-object/from16 v0, v2

iget v0, v0, Landroid/app/Notification;->flags:I

move v4, v0

and-int/lit8 v4, v4, 0x20

if-nez v4, :cond_1

new-instance v4, Lcom/android/systemui/statusbar/StatusBarService$7;

move-object v0, v4

move-object/from16 v1, p0

move-object/from16 v2, p1

[B] invoke-direct {v0, v1, v2}, Lcom/android/systemui/statusbar/StatusBarService$7;->(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V[/B]setOnSwipeCallback(Ljava/lang/Runnable;)V

.line 735
:cond_1
.line 666
const v1, 0x7f0a0031

invoke-virtual {v9, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->findViewById(I)Landroid/view/View;

move-result-object v1

move-object v0, v1

check-cast v0, Landroid/view/ViewGroup;

move-object v7, v0

.line 667
const/high16 v1, 0x6

invoke-virtual {v7, v1}, Landroid/view/ViewGroup;->setDescendantFocusability(I)V

.line 668
iget-object v1, p0, Lcom/android/systemui/statusbar/StatusBarService;->mFocusChangeListener:Landroid/view/View$OnFocusChangeListener;

invoke-virtual {v7, v1}, Landroid/view/ViewGroup;->setOnFocusChangeListener(Landroid/view/View$OnFocusChangeListener;)V

.line 669
iget-object v3, v2, Landroid/app/Notification;->contentIntent:Landroid/app/PendingIntent;

.line 670
if-eqz v3, :cond_42

.line 671
new-instance v1, Lcom/android/systemui/statusbar/StatusBarService$Launcher;

iget-object v4, p1, Lcom/android/internal/statusbar/StatusBarNotification;->pkg:Ljava/lang/String;

iget-object v5, p1, Lcom/android/internal/statusbar/StatusBarNotification;->tag:Ljava/lang/String;

iget v6, p1, Lcom/android/internal/statusbar/StatusBarNotification;->id:I

move-object v2, p0

invoke-direct/range {v1 .. v6}, Lcom/android/systemui/statusbar/StatusBarService$Launcher;->(Lcom/android/systemui/statusbar/StatusBarService;Landroid/app/PendingIntent;Ljava/lang/String;Ljava/lang/String;I)V

invoke-virtual {v7, v1}, Landroid/view/ViewGroup;->setOnClickListener(Landroid/view/View$OnClickListener;)V

.line 678
:cond_42
:try_start_42
invoke-virtual {v8, p0, v7}, Landroid/widget/RemoteViews;->apply(Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View;
:try_end_45
.catch Ljava/lang/RuntimeException; {:try_start_42 .. :try_end_45} :catch_83

move-result-object v1

move-object v2, v1

move-object v1, v10

.line 683
:goto_48
if-nez v2, :cond_86

.line 684
new-instance v2, Ljava/lang/StringBuilder;

invoke-direct {v2}, Ljava/lang/StringBuilder;->()V

iget-object v3, p1, Lcom/android/internal/statusbar/StatusBarNotification;->pkg:Ljava/lang/String;

invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v2

const-string v3, "/0x"

invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v2

iget v3, p1, Lcom/android/internal/statusbar/StatusBarNotification;->id:I

invoke-static {v3}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;

move-result-object v3

invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v2

invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v2

.line 685
const-string v3, "StatusBarService"

new-instance v4, Ljava/lang/StringBuilder;

invoke-direct {v4}, Ljava/lang/StringBuilder;->()V

const-string v5, "couldn\'t inflate view for notification "

invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v4

invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v2

invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v2

invoke-static {v3, v2, v1}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

move-object v1, v10

.line 686
goto :goto_a

.line 680
:catch_83
move-exception v1

move-object v2, v10

.line 681
goto :goto_48

.line 689
:cond_86
invoke-virtual {p0}, Lcom/android/systemui/statusbar/StatusBarService;->getResources()Landroid/content/res/Resources;

move-result-object v1

invoke-virtual {p0, v1, v2}, Lcom/android/systemui/statusbar/StatusBarService;->updateThemeForNotificationView(Landroid/content/res/Resources;Landroid/view/View;)V

.line 691
invoke-virtual {v7, v2}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V

.line 692
invoke-virtual {v9, v12}, Lcom/android/systemui/statusbar/LatestItemContainer;->setDrawingCacheEnabled(Z)V

.line 695
const/4 v1, 0x3

new-array v1, v1, [Landroid/view/View;

aput-object v9, v1, v11

aput-object v7, v1, v12

const/4 v3, 0x2

aput-object v2, v1, v3

goto/16 :goto_a
.end method

Any idea what should be done?