Related
This tutorial is going to delve into the convoluted smali involved in handling dialogs, and ultimately bypassing them. I must warn you there will be a lot of tracing in this post, so if all you want is the patch, this may not be for you. The idea is to gain an intimate understanding of dialogs from smali! (This is based on LPD base)
Decompile jobmanager.apk, then search for 'Exit all', which leads to public.xml: <public type="string" name="kill_all" id="0x7f050005" />
Searching for '7f050005' leads us to RunningAppsListActivity.smali (referred to as RALA from now on), which we can now dissect. Start by looking at some of the variables at the top of
code. Two should stand out:
Code:
.field private mKillAll:Landroid/widget/Button;
...
.field private mOnClickListenerKillAll:Landroid/view/View$OnClickListener;
These represent the button and the code that executes when it's clicked. Let's find out what that code is by searching, which leads to:
Code:
.line 308
new-instance v0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;
invoke-direct {v0, p0}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;-><init>(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)V
iput-object v0, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mOnClickListenerKillAll:Landroid/view/View$OnClickListener;
So now we know RALA$6 is our executed code:
Code:
.method public onClick(Landroid/view/View;)V
.locals 2
.parameter "v"
.prologue
.line 311
iget-object v0, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
const/4 v1, 0x5
invoke-virtual {v0, v1}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->showDialog(I)V
.line 312
return-void
.end method
So what does this mean? When the button is clicked, it's calling back to RALA with a value of 0x5. Let's figure out what that means, look at '.method protected onCreateDialog'
Code:
packed-switch p1, :pswitch_data_0
(This is defined at the end of the method as)
:pswitch_data_0
.packed-switch 0x1
:pswitch_1
:pswitch_0
:pswitch_2
:pswitch_3
:pswitch_4
.end packed-switch
So our value when clicking the button is 0x5, which translates to pswitch_4
Code:
:pswitch_4
new-instance v3, Landroid/app/AlertDialog$Builder;
invoke-direct {v3, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V
const v4, 0x7f050005 <<<<<<<<<<<<<<<<<<<<<<<<<< Remember this #, it's our 'Exit all' string id
...
new-instance v4, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$12;
invoke-direct {v4, p0}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$12;-><init>(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)V
invoke-virtual {v3, v7, v4}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
This last line sets the code executed when you click 'Ok', so lets look at RALA$12, inside OnClick:
Code:
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mHandler:Landroid/os/Handler;
invoke-static {v0}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$300(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Landroid/os/Handler;
move-result-object v0
const/4 v1, 0x6
invoke-virtual {v0, v1}, Landroid/os/Handler;->sendEmptyMessage(I)Z
So this is sending a code (0x6) to mHandler in the main RALA module, let's see what that means. mHandler is our message handler, and is defined here:
Code:
.line 331
new-instance v0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
invoke-direct {v0, p0}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;-><init>(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)V
iput-object v0, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mHandler:Landroid/os/Handler;
So RALA$7 is our next target, specifically '.method public handleMessage(Landroid/os/MessageV':
Code:
iget v3, p1, Landroid/os/Message;->what:I
packed-switch v3, :pswitch_data_0
(which is)
.line 333
:pswitch_data_0
.packed-switch 0x1
:pswitch_0
:pswitch_1
:pswitch_2
:pswitch_3
:pswitch_4
:pswitch_5
:pswitch_6
:pswitch_7
.end packed-switch
(A side note, packed-switch 0x1 means the first entry starts with 0x1, so 0x6 is pswitch_5. Let's now look at that)
:pswitch_5
const-string v3, "RunningAppsListActivity"
const-string v4, "MSG_KILL_ALL"
invoke-static {v3, v4}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
.line 410
iget-object v3, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
new-instance v4, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;
...
So finally we have reached the true code for executing KILL ALL, and it lies within RALA$7$4. If you look at '.method public run()V' in RALA$7$4, you will see the extensive code to kill all running apps. So now we that we have what we want, how do we bypass the dialog? Simple, just abort creating the dialog and execute the code instead.
Let's take a moment to review the execution entirely:
RALA assigns button -> RALA$6 which calls back RALA -> Create dlg and set OK -> RALA$12 which then calls the message handler RALA$7 with code 0x5 ->
RALA$7$4 which is the ACTUAL 'kill all' code.
So our intercept point is in RALA$6, where we can bypass the creation of the dialog and execute the code directly. Now you can't just copy/paste the code from RALA$7$4 to RALA$6, there are variables specific to each .smali. So this is the fixed code with the manual changes highlighted:
Code:
.method public onClick(Landroid/view/View;)V
.locals [COLOR="Red"]7[/COLOR]
.parameter "v"
.prologue
.line 311
iget-object v0, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
const/4 v1, 0x5
[COLOR="red"]#[/COLOR] invoke-virtual {v0, v1}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->showDialog(I)V
.line 412
[COLOR="red"]#[/COLOR] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->getBaseAppList()Ljava/util/List;
move-result-object v1
.line 413
.local v1, items:Ljava/util/List;,"Ljava/util/List<Lcom/sec/android/app/controlpanel/PackageInfoItem;>;"
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
.line 414
.local v3, removeTarget:Ljava/util/Set;,"Ljava/util/Set<Lcom/sec/android/app/controlpanel/PackageInfoItem;>;"
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
.local v0, i$:Ljava/util/Iterator;
:cond_0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/sec/android/app/controlpanel/PackageInfoItem;
.line 415
.local v2, p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
invoke-virtual {v2}, Lcom/sec/android/app/controlpanel/PackageInfoItem;->isCanKilled()Z
move-result v4
if-eqz v4, :cond_0
.line 416
const-string v4, "RunningAppsListActivity"
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "Kill runningApplication! "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v2}, Lcom/sec/android/app/controlpanel/PackageInfoItem;->getPackageName()Ljava/lang/String;
move-result-object v6
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-static {v4, v5}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
.line 417
[COLOR="red"]#[/COLOR] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPkgInfo:Lcom/sec/android/app/controlpanel/PackageInfo;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$400(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/PackageInfo;
move-result-object v4
invoke-virtual {v2}, Lcom/sec/android/app/controlpanel/PackageInfoItem;->getPackageName()Ljava/lang/String;
move-result-object v5
const/4 v6, 0x1
invoke-virtual {v4, v5, v6}, Lcom/sec/android/app/controlpanel/PackageInfo;->killPackage(Ljava/lang/String;Z)V
.line 418
invoke-interface {v3, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
goto :goto_0
.line 421
.end local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
:cond_1
invoke-interface {v3}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_1
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_2
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/sec/android/app/controlpanel/PackageInfoItem;
.line 422
.restart local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
invoke-interface {v1, v2}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
goto :goto_1
.line 424
.end local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
:cond_2
[COLOR="red"]#[/COLOR] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4, v1}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->setList(Ljava/util/List;)V
.line 425
[COLOR="red"]#[/COLOR] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->notifyDataSetChanged()V
.line 428
[COLOR="red"]#[/COLOR] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
[COLOR="red"]#[/COLOR] iget-object v5, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v5, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
const v6, 0x7f050028
invoke-virtual {v5, v6}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->getText(I)Ljava/lang/CharSequence;
move-result-object v5
const/4 v6, 0x0
invoke-static {v4, v5, v6}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v4
invoke-virtual {v4}, Landroid/widget/Toast;->show()V
.line 312
return-void
.end method
That is it, recompile JobManager.apk, u/l and test it out! Hope you enjoyed the tut =)
Why didn't I see this before, your holding out on us in chat.
LiLChris06 said:
Why didn't I see this before, your holding out on us in chat.
Click to expand...
Click to collapse
I finished this a few weeks back, but just got around to writing it up..I'm pretty sure you got a pastebin msg one night =)
PS - For those that just want the patch, just copy/paste that last code box into RALA$6 (replacing the existing onclick method).
Lovely piece of information, easily readable
thanks very much
Update for 4.0.4
The overall structure is still the same, but here's the updated patch based on 4.0.4 LPO. You paste this into RALA$6, replacing the existing onclick method:
Code:
.method public onClick(Landroid/view/View;)V
.locals 8
.prologue
const/4 v7, 0x0
.line 428
# iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->getBaseAppList()Ljava/util/List;
move-result-object v1
.line 429
.local v1, items:Ljava/util/List;,"Ljava/util/List<Lcom/sec/android/app/controlpanel/PackageInfoItem;>;"
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
.line 432
.local v3, removeTarget:Ljava/util/Set;,"Ljava/util/Set<Lcom/sec/android/app/controlpanel/PackageInfoItem;>;"
if-eqz v1, :cond_3
.line 433
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
.local v0, i$:Ljava/util/Iterator;
:cond_0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/sec/android/app/controlpanel/PackageInfoItem;
.line 434
.local v2, p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
invoke-virtual {v2}, Lcom/sec/android/app/controlpanel/PackageInfoItem;->isCanKilled()Z
move-result v4
if-eqz v4, :cond_0
.line 437
# iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPkgInfo:Lcom/sec/android/app/controlpanel/PackageInfo;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$400(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/PackageInfo;
move-result-object v4
invoke-virtual {v2}, Lcom/sec/android/app/controlpanel/PackageInfoItem;->getPackageName()Ljava/lang/String;
move-result-object v5
const/4 v6, 0x1
invoke-virtual {v4, v5, v6}, Lcom/sec/android/app/controlpanel/PackageInfo;->killPackage(Ljava/lang/String;Z)V
.line 438
invoke-interface {v3, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
goto :goto_0
.line 441
.end local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
:cond_1
invoke-interface {v3}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_1
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_2
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/sec/android/app/controlpanel/PackageInfoItem;
.line 442
.restart local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
invoke-interface {v1, v2}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
goto :goto_1
.line 444
.end local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
:cond_2
# iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4, v1}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->setList(Ljava/util/List;)V
.line 445
# iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->notifyDataSetChanged()V
.line 447
const/4 v4, 0x2
const/4 v5, 0x0
:try_start_0
invoke-static {v4, v5}, Lcom/sec/android/hardware/SecHardwareInterface;->setBatteryUse(IZ)V
.line 448
const/4 v4, 0x3
const/4 v5, 0x0
invoke-static {v4, v5}, Lcom/sec/android/hardware/SecHardwareInterface;->setBatteryUse(IZ)V
.line 449
const/4 v4, 0x4
const/4 v5, 0x0
invoke-static {v4, v5}, Lcom/sec/android/hardware/SecHardwareInterface;->setBatteryUse(IZ)V
.line 450
const/4 v4, 0x5
const/4 v5, 0x0
invoke-static {v4, v5}, Lcom/sec/android/hardware/SecHardwareInterface;->setBatteryUse(IZ)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 457
:goto_2
# iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
# iget-object v5, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v5, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
const v6, 0x7f050028
invoke-virtual {v5, v6}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->getText(I)Ljava/lang/CharSequence;
move-result-object v5
invoke-static {v4, v5, v7}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v4
invoke-virtual {v4}, Landroid/widget/Toast;->show()V
.line 461
.end local v0 #i$:Ljava/util/Iterator;
:cond_3
return-void
.line 451
.restart local v0 #i$:Ljava/util/Iterator;
:catch_0
move-exception v4
goto :goto_2
.end method
All Swagged Out Project
The goal of ASOP is to provide every user with the chance to tweak their phones exactly how they like. At the same time, ASOP gives up and coming devs a place to learn how to get their hands dirty and add mods the old fashioned way.
Background
android.policy.jar is a framework file that controls a lot of things. The three mods that will be covered today include the Advanced Power Menu, Volume Rocker Mod (to skip tracks) and Long-press Back to Kill. These mods were created a long time ago and have been used on many devices. A big props does have to be given to mikmik user one_love_420 for bringing this to the HTC EVO 4G LTE's latest OTA.
Remember
This is for the HTC EVO 4G LTE running OTA 3.15, Android 4.1.1, Sense 4+ and nothing else. We are assuming you are starting with a stock android.policy.jar.
ADVANCED POWER MENU
The Mod
Long-press the Power button and be met with an advanced menu. Including, 4-in-1 Reboot Menu, sound profiles, airplane mode.
Decompile
You gotta figure this one out! Learn how to use apktool, baksmali or VTS. It is HIGHLY recommended that if you are decompiling with apktool or baksmali to add "-b" modifier. If using VTS, uncheck the smali debug code. This will make your smali code MUCH smaller - less system space = MORE RAM.
What Needs to Be Added
This mod requires two smali files that do not exist in the stock android.policy.jar you will find them attached at the bottom of this post.
GlobalActions$5$1.smali
GlobalActions$5$2.smali
They go in \com\android\internal\policy\impl\
What needs to Be Changed [The long part]
Using Notepad++ or a similar text editor (ie not Notepad) navigate to \com\android\internal\policy\impl\GlobalActions.smali
SEARCH FOR:
Code:
.method private changeAirplaneModeSystemSetting(Z)V
AFTER THIS METHOD ENDS, ADD THE FOLLOWING METHODS IN GREEN
Code:
.end method
[COLOR="SeaGreen"].method private createDialog()Lcom/htc/widget/HtcAlertDialog;
.locals 24
move-object/from16 v0, p0
iget-boolean v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mHasVibrator:Z
if-nez v3, :cond_14c
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$SilentModeToggleAction;
move-object/from16 v0, p0
invoke-direct {v3, v0}, Lcom/android/internal/policy/impl/GlobalActions$SilentModeToggleAction;-><init>(Lcom/android/internal/policy/impl/GlobalActions;)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeAction:Lcom/android/internal/policy/impl/GlobalActions$Action;
:goto_11
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$1;
const v5, 0x402002a
const v6, 0x402002a
const v7, 0x104013e
const v8, 0x104013f
const v9, 0x1040140
const/4 v10, 0x0
move-object/from16 v4, p0
invoke-direct/range {v3 .. v10}, Lcom/android/internal/policy/impl/GlobalActions$1;-><init>(Lcom/android/internal/policy/impl/GlobalActions;IIIIIZ)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/GlobalActions;->onAirplaneModeChanged()V
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$2;
const v5, 0x402003f
const v6, 0x402003f
const v7, 0x4070029
const v8, 0x4070028
const v9, 0x4070027
const/4 v10, 0x1
move-object/from16 v4, p0
invoke-direct/range {v3 .. v10}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;IIIIIZ)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mVibrationModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$3;
const v5, 0x402003d
const v6, 0x402003d
const v7, 0x407002a
const v8, 0x407002c
const v9, 0x407002b
const/4 v10, 0x1
move-object/from16 v4, p0
invoke-direct/range {v3 .. v10}, Lcom/android/internal/policy/impl/GlobalActions$3;-><init>(Lcom/android/internal/policy/impl/GlobalActions;IIIIIZ)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mMobileNetworkModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
new-instance v3, Ljava/util/ArrayList;
invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/GlobalActions;->isSense2Mode()Z
move-result v3
if-eqz v3, :cond_163
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const-string v4, "powerOptions_power_off_status"
const-string v5, "string"
const-string v6, "com.htc.framework"
invoke-virtual {v3, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v17
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const-string v4, "powerOptions_restart"
const-string v5, "string"
const-string v6, "com.htc.framework"
invoke-virtual {v3, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v20
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const-string v4, "powerOptions_restart_status"
const-string v5, "string"
const-string v6, "com.htc.framework"
invoke-virtual {v3, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v19
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$4;
const v5, 0x402003e
const v6, 0x104013a
move-object/from16 v0, p0
move/from16 v1, v17
invoke-direct {v4, v0, v5, v6, v1}, Lcom/android/internal/policy/impl/GlobalActions$4;-><init>(Lcom/android/internal/policy/impl/GlobalActions;III)V
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$5;
const v5, 0x4020044
move-object/from16 v0, p0
move/from16 v1, v20
move/from16 v2, v19
invoke-direct {v4, v0, v5, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$5;-><init>(Lcom/android/internal/policy/impl/GlobalActions;III)V
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
:goto_e0
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v3
invoke-virtual {v3}, Landroid/content/pm/PackageManager;->getUsers()Ljava/util/List;
move-result-object v23
invoke-interface/range {v23 .. v23}, Ljava/util/List;->size()I
move-result v3
const/4 v4, 0x1
if-le v3, v4, :cond_1fd
:try_start_f3
invoke-static {}, Landroid/app/ActivityManagerNative;->getDefault()Landroid/app/IActivityManager;
move-result-object v3
invoke-interface {v3}, Landroid/app/IActivityManager;->getCurrentUser()Landroid/content/pm/UserInfo;
:try_end_fa
.catch Landroid/os/RemoteException; {:try_start_f3 .. :try_end_fa} :catch_1dd
move-result-object v12
:goto_fb
invoke-interface/range {v23 .. v23}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v14
:goto_ff
invoke-interface {v14}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_1fd
invoke-interface {v14}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v22
check-cast v22, Landroid/content/pm/UserInfo;
if-nez v12, :cond_1e5
move-object/from16 v0, v22
iget v3, v0, Landroid/content/pm/UserInfo;->id:I
if-nez v3, :cond_1e1
const/16 v16, 0x1
:goto_115
new-instance v21, Lcom/android/internal/policy/impl/GlobalActions$8;
const v4, 0x108031d
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
move-object/from16 v0, v22
iget-object v3, v0, Landroid/content/pm/UserInfo;->name:Ljava/lang/String;
if-eqz v3, :cond_1f5
move-object/from16 v0, v22
iget-object v3, v0, Landroid/content/pm/UserInfo;->name:Ljava/lang/String;
:goto_129
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
if-eqz v16, :cond_1f9
const-string v3, " \u2714"
:goto_131
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
move-object/from16 v0, v21
move-object/from16 v1, p0
move-object/from16 v2, v22
invoke-direct {v0, v1, v4, v3, v2}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;ILjava/lang/CharSequence;Landroid/content/pm/UserInfo;)V
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, v21
invoke-virtual {v3, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_ff
:cond_14c
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$SilentModeTriStateAction;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAudioManager:Landroid/media/AudioManager;
move-object/from16 v0, p0
iget-object v6, v0, Lcom/android/internal/policy/impl/GlobalActions;->mHandler:Landroid/os/Handler;
invoke-direct {v3, v4, v5, v6}, Lcom/android/internal/policy/impl/GlobalActions$SilentModeTriStateAction;-><init>(Landroid/content/Context;Landroid/media/AudioManager;Landroid/os/Handler;)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeAction:Lcom/android/internal/policy/impl/GlobalActions$Action;
goto/16 :goto_11
:cond_163
sget-short v3, Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_DEVICE_flag:S
const/16 v4, 0x9
if-ne v3, v4, :cond_1a6
sget-short v3, Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_PROJECT_flag:S
const/16 v4, 0xd1
if-ne v3, v4, :cond_1a6
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$6;
const v5, 0x402003d
const v6, 0x104013a
move-object/from16 v0, p0
invoke-direct {v4, v0, v5, v6}, Lcom/android/internal/policy/impl/GlobalActions$6;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeAction:Lcom/android/internal/policy/impl/GlobalActions$Action;
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mVibrationModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mMobileNetworkModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto/16 :goto_e0
:cond_1a6
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$7;
const v5, 0x402003d
const v6, 0x104013a
move-object/from16 v0, p0
invoke-direct {v4, v0, v5, v6}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeAction:Lcom/android/internal/policy/impl/GlobalActions$Action;
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mVibrationModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto/16 :goto_e0
:catch_1dd
move-exception v18
const/4 v12, 0x0
goto/16 :goto_fb
:cond_1e1
const/16 v16, 0x0
goto/16 :goto_115
:cond_1e5
iget v3, v12, Landroid/content/pm/UserInfo;->id:I
move-object/from16 v0, v22
iget v4, v0, Landroid/content/pm/UserInfo;->id:I
if-ne v3, v4, :cond_1f1
const/16 v16, 0x1
goto/16 :goto_115
:cond_1f1
const/16 v16, 0x0
goto/16 :goto_115
:cond_1f5
const-string v3, "Primary"
goto/16 :goto_129
:cond_1f9
const-string v3, ""
goto/16 :goto_131
:cond_1fd
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$MyAdapter;
const/4 v4, 0x0
move-object/from16 v0, p0
invoke-direct {v3, v0, v4}, Lcom/android/internal/policy/impl/GlobalActions$MyAdapter;-><init>(Lcom/android/internal/policy/impl/GlobalActions;Lcom/android/internal/policy/impl/GlobalActions$1;)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAdapter:Lcom/android/internal/policy/impl/GlobalActions$MyAdapter;
new-instance v11, Lcom/htc/widget/HtcAlertDialog$Builder;
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-direct {v11, v3}, Lcom/htc/widget/HtcAlertDialog$Builder;-><init>(Landroid/content/Context;)V
invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/GlobalActions;->isSense2Mode()Z
move-result v3
if-eqz v3, :cond_278
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const-string v4, "global_actions"
const-string v5, "string"
const-string v6, "android"
invoke-virtual {v3, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v15
:goto_22a
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAdapter:Lcom/android/internal/policy/impl/GlobalActions$MyAdapter;
move-object/from16 v0, p0
invoke-virtual {v11, v3, v0}, Lcom/htc/widget/HtcAlertDialog$Builder;->setAdapter(Landroid/widget/ListAdapter;Landroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;
move-result-object v3
const/4 v4, 0x1
invoke-virtual {v3, v4}, Lcom/htc/widget/HtcAlertDialog$Builder;->setInverseBackgroundForced(Z)Lcom/htc/widget/HtcAlertDialog$Builder;
move-result-object v3
invoke-virtual {v3, v15}, Lcom/htc/widget/HtcAlertDialog$Builder;->setTitle(I)Lcom/htc/widget/HtcAlertDialog$Builder;
invoke-virtual {v11}, Lcom/htc/widget/HtcAlertDialog$Builder;->create()Lcom/htc/widget/HtcAlertDialog;
move-result-object v13
invoke-virtual {v13}, Lcom/htc/widget/HtcAlertDialog;->getListView()Landroid/widget/ListView;
move-result-object v3
const/4 v4, 0x1
invoke-virtual {v3, v4}, Landroid/widget/ListView;->setItemsCanFocus(Z)V
invoke-virtual {v13}, Lcom/htc/widget/HtcAlertDialog;->getListView()Landroid/widget/ListView;
move-result-object v3
const/4 v4, 0x1
invoke-virtual {v3, v4}, Landroid/widget/ListView;->setLongClickable(Z)V
invoke-virtual {v13}, Lcom/htc/widget/HtcAlertDialog;->getListView()Landroid/widget/ListView;
move-result-object v3
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$9;
move-object/from16 v0, p0
invoke-direct {v4, v0}, Lcom/android/internal/policy/impl/GlobalActions$9;-><init>(Lcom/android/internal/policy/impl/GlobalActions;)V
invoke-virtual {v3, v4}, Landroid/widget/ListView;->setOnItemLongClickListener(Landroid/widget/AdapterView$OnItemLongClickListener;)V
invoke-virtual {v13}, Lcom/htc/widget/HtcAlertDialog;->getWindow()Landroid/view/Window;
move-result-object v3
const/16 v4, 0x7d8
invoke-virtual {v3, v4}, Landroid/view/Window;->setType(I)V
move-object/from16 v0, p0
invoke-virtual {v13, v0}, Lcom/htc/widget/HtcAlertDialog;->setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)V
invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/GlobalActions;->isSense2Mode()Z
move-result v3
if-eqz v3, :cond_277
move-object/from16 v0, p0
invoke-virtual {v13, v0}, Lcom/htc/widget/HtcAlertDialog;->setOnKeyListener(Landroid/content/DialogInterface$OnKeyListener;)V
:cond_277
return-object v13
:cond_278
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const-string v4, "global_actions"
const-string v5, "string"
const-string v6, "android"
invoke-virtual {v3, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v15
goto :goto_22a
.end method[/COLOR]
.method private getWindowManager()Landroid/view/IWindowManager;
Navigate to \com\android\internal\policy\impl\GlobalActions$5.smali
SEARCH FOR:
Code:
.method public onPress()V
AFTER REPLACE THE REST OF THE FILE WITH
Code:
.locals 6
const/4 v5, 0x4
new-instance v1, Lcom/htc/widget/HtcAlertDialog$Builder;
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions$5;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v2
invoke-direct {v1, v2}, Lcom/htc/widget/HtcAlertDialog$Builder;-><init>(Landroid/content/Context;)V
const v2, 0x1080027
invoke-virtual {v1, v2}, Lcom/htc/widget/HtcAlertDialog$Builder;->setIcon(I)Lcom/htc/widget/HtcAlertDialog$Builder;
move-result-object v1
const v2, 0x20400cd
invoke-virtual {v1, v2}, Lcom/htc/widget/HtcAlertDialog$Builder;->setTitle(I)Lcom/htc/widget/HtcAlertDialog$Builder;
move-result-object v1
sget-object v2, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
const/4 v3, 0x0
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$5$2;
invoke-direct {v4, p0}, Lcom/android/internal/policy/impl/GlobalActions$5$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions$5;)V
invoke-virtual {v1, v2, v3, v4}, Lcom/htc/widget/HtcAlertDialog$Builder;->setSingleChoiceItems([Ljava/lang/CharSequence;ILandroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;
move-result-object v1
const v2, 0x2040151
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$5$1;
invoke-direct {v3, p0}, Lcom/android/internal/policy/impl/GlobalActions$5$1;-><init>(Lcom/android/internal/policy/impl/GlobalActions$5;)V
invoke-virtual {v1, v2, v3}, Lcom/htc/widget/HtcAlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;
move-result-object v1
const/high16 v2, 0x104
const/4 v3, 0x0
invoke-virtual {v1, v2, v3}, Lcom/htc/widget/HtcAlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;
move-result-object v1
invoke-virtual {v1}, Lcom/htc/widget/HtcAlertDialog$Builder;->create()Lcom/htc/widget/HtcAlertDialog;
move-result-object v0
invoke-virtual {v0}, Lcom/htc/widget/HtcAlertDialog;->getWindow()Landroid/view/Window;
move-result-object v1
const/16 v2, 0x7d8
invoke-virtual {v1, v2}, Landroid/view/Window;->setType(I)V
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions$5;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v1}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v1
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x1110009
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getBoolean(I)Z
move-result v1
if-nez v1, :cond_60
invoke-virtual {v0}, Lcom/htc/widget/HtcAlertDialog;->getWindow()Landroid/view/Window;
move-result-object v1
invoke-virtual {v1, v5, v5}, Landroid/view/Window;->setFlags(II)V
:cond_60
invoke-virtual {v0}, Lcom/htc/widget/HtcAlertDialog;->show()V
return-void
.end method
.method public showBeforeProvisioning()Z
.locals 1
const/4 v0, 0x1
return v0
.end method
.method public showDuringKeyguard()Z
.locals 1
const/4 v0, 0x1
return v0
.end method
Navigate to \com\android\internal\policy\impl\GlobalActions$6.smali
REPLACE
Code:
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions;[COLOR="Red"]II[/COLOR])V
WITH
Code:
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions;[COLOR="red"]III[/COLOR])V
REPLACE
Code:
invoke-direct {[COLOR="red"]p0, p2, p3[/COLOR]}, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;-><init>([COLOR="red"]II[/COLOR])V
WITH
Code:
invoke-direct {[COLOR="red"]p0, p2, p3, p4[/COLOR]}, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;-><init>([COLOR="red"]III[/COLOR])V
REPLACE
Code:
const/4 v1, 0x[COLOR="red"]1[/COLOR]
invoke-static {v0, v1}, Lcom/htc/app/HtcShutdownThread;->[COLOR="red"]shutdown[/COLOR](Landroid/content/Context;Z)V
WITH
Code:
const/4 v1, 0x[COLOR="red"]0[/COLOR]
invoke-static {v0, v1}, Lcom/htc/app/HtcShutdownThread;->[COLOR="red"]hibernate[/COLOR](Landroid/content/Context;Z)V
Navigate to \com\android\internal\policy\impl\GlobalActions$SinglePressAction.smali
ADD GREEN TEXT
Code:
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
[COLOR="SeaGreen"]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;[/COLOR]
# instance fields
.field private final mIconResId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
.field private final mStatusResId:I
SEARCH FOR
Code:
# direct methods
ADD AFTER
Code:
.method static constructor <clinit>()V
.locals 3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Normal"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Hot restart"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Bootloader"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method
The Final Step
Now that all the smali files have been edited, recompile your .jar, rename your file to android.policy.jar and push to /system/framework/android.policy.jar. Smali files are stored in classes.dex inside of .apks and .jars, I have uploaded some classes.dexs that include the other mods listed here as well as modified/unmodified smalis. Enjoy!
EXTRA FILES
GlobalActions$5$1.smali
GlobalActions$5$2.smali
STOCK FILES
GlobalActions.smali
GlobalActions$5.smali
GlobalActions$6.smali
GlobalActions$SinglePressAction.smali
classes.dex
android.policy.jar
APM FILES
GlobalActions.smali
GlobalActions$5.smali
GlobalActions$6.smali
GlobalActions$SinglePressAction.smali
classes.dex
android.policy.jar
APM + VOL-TRACK + BACK-KILL FILES
classes.dex
android.policy.jar
#ASOP
VOLUME ROCKER MOD
The Mod
When listening to music, with the screen off, long-press the VOL+ key to change tracks forward and long-press the VOL- key to change tracks backwards.
Decompile
You gotta figure this one out! Learn how to use apktool, baksmali or VTS. It is HIGHLY recommended that if you are decompiling with apktool or baksmali to add "-b" modifier. If using VTS, uncheck the smali debug code. This will make your smali code MUCH smaller - less system space = MORE RAM.
What Needs to Be Added
This mod requires two smali files that do not exist in the stock android.policy.jar you will find them attached at the bottom of this post.
PhoneWindowManager$VolumeLongPressF.smali
PhoneWindowManager$VolumeLongPressR.smali
They go in \com\android\internal\policy\impl\
What needs to Be Changed [The long part]
Using Notepad++ or a similar text editor (ie not Notepad) navigate to \com\android\internal\policy\impl\PhoneWindowManager.smali
SEARCH FOR
Code:
.field mIsGuestMode:Z
ADD TEXT IN GREEN
Code:
.field mIsGuestMode:Z
.field mIsHtcDockScreenAsHome:Z
[COLOR="SeaGreen"].field mIsLongPress:Z[/COLOR]
.field mKeyEventsBlocked:Z
.field mKeyboardTapVibePattern:[J
SEARCH FOR
Code:
.field private mVolumeDownKeyTime:J
ADD TEXT IN GREEN
Code:
.field private mVolumeDownKeyTime:J
.field private mVolumeDownKeyTriggered:Z
[COLOR="SeaGreen"].field mVolumeDownLongPress:Ljava/lang/Runnable;[/COLOR]
.field private mVolumeUpKeyTriggered:Z
[COLOR="SeaGreen"].field mVolumeUpLongPress:Ljava/lang/Runnable;
.field mWakeAcquired:Z[/COLOR]
.field mWindowManager:Landroid/view/IWindowManager;
.field mWindowManagerFuncs:Landroid/view/WindowManagerPolicy$WindowManagerFuncs;
SEARCH FOR:
.method public constructor <init>()V
NOW SCROLL UNTIL YOU FIND THIS TEXT, ADD TEXT IN GREEN
Code:
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$27;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$27;-><init> Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSetLastUserActivity:Ljava/lang/Runnable;
[COLOR="SeaGreen"]new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressF;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressF;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressR;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$VolumeLongPressR;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;[/COLOR]
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$28;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$28;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mPowerLongPress_Toast:Ljava/lang/Runnable;
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$29;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$29;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mEndCallLongPress:Ljava/lang/Runnable;
return-void
.end method
SEARCH FOR
Code:
.method handleVolumeKey(II)V
SCROLL TO THE END OF THIS METHOD AND ADD NEW METHODS IN GREEN
Code:
.end method
[COLOR="SeaGreen"].method handleVolumeLongPress(I)V
.locals 4
const/16 v1, 0x18
if-ne p1, v1, :cond_11
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
:goto_6
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
invoke-static {}, Landroid/view/ViewConfiguration;->getLongPressTimeout()I
move-result v2
int-to-long v2, v2
invoke-virtual {v1, v0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
:cond_11
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
goto :goto_6
.end method
.method handleVolumeLongPressAbort()V
.locals 2
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
return-void
.end method[/COLOR]
.method public hasNavigationBar()Z
SEARCH FOR
Code:
sparse-switch v13, :sswitch_data_6[COLOR="red"]82[/COLOR]
CHANGE TO
Code:
sparse-switch v13, :sswitch_data_6[COLOR="Red"]c4[/COLOR]
SEARCH FOR
Code:
:sswitch_274
BELOW THIS, YOU WILL NEED TO REPLACE EVERYTHING UNTIL AND INCLUDING
Code:
:sswitch_data_6c4
.sparse-switch
0x5 -> :sswitch_699
0x6 -> :sswitch_38a
0x18 -> :sswitch_274
0x19 -> :sswitch_274
0x1a -> :sswitch_49b
0x4f -> :sswitch_65c
0x55 -> :sswitch_64e
0x56 -> :sswitch_65c
0x57 -> :sswitch_65c
0x58 -> :sswitch_65c
0x59 -> :sswitch_65c
0x5a -> :sswitch_65c
0x5b -> :sswitch_65c
0x7e -> :sswitch_64e
0x7f -> :sswitch_64e
0x82 -> :sswitch_65c
0xa4 -> :sswitch_274
.end sparse-switch
.end method
THE CODE TO ADD CAN BE FOUND HERE:
http://goo.gl/1SfRm
IT'S TOO BIG FOR XDA
SEARCH FOR
Code:
.method sendEvent(IIIJ)V
SCROLL TO THE END OF THIS METHOD AND ADD NEW METHOD IN GREEN
Code:
.end method
[COLOR="SeaGreen"].method protected sendMediaButtonEvent(I)V
.locals 13
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v1
new-instance v11, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v11, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
new-instance v0, Landroid/view/KeyEvent;
const/4 v5, 0x0
const/4 v7, 0x0
move-wide v3, v1
move v6, p1
invoke-direct/range {v0 .. v7}, Landroid/view/KeyEvent;-><init>(JJIII)V
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v11, v4, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v11, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
new-instance v12, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v12, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
new-instance v3, Landroid/view/KeyEvent;
const/4 v8, 0x1
const/4 v10, 0x0
move-wide v4, v1
move-wide v6, v1
move v9, p1
invoke-direct/range {v3 .. v10}, Landroid/view/KeyEvent;-><init>(JJIII)V
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v12, v4, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v12, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
return-void
.end method[/COLOR]
.method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy$WindowState;IILandroid/view/WindowManagerPolicy$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
The Final Step
Now that all the smali files have been edited, recompile your .jar, rename your file to android.policy.jar and push to /system/framework/android.policy.jar. Smali files are stored in classes.dex inside of .apks and .jars, I have uploaded some classes.dexs that include the other mods listed here as well as modified/unmodified smalis. Enjoy!
EXTRA FILES
PhoneWindowManager$VolumeLongPressF.smali
PhoneWindowManager$VolumeLongPressR.smali
STOCK FILES
PhoneWindowManager.smali
classes.dex
android.policy.jar
VOL-TRACK FILES
PhoneWindowManager.smali
classes.dex
android.policy.jar
APM + VOL-TRACK FILES
classes.dex
android.policy.jar
APM + VOL-TRACK + BACK-KILL FILES
classes.dex
android.policy.jar
#ASOP
LONG-PRESS BACK TO KILL THIRD-PARTY APPS
The Mod
By long-pressing the Back capacitive button, any third-party app will be killed. This is very handy for when apps become unresponsive.
Decompile
You gotta figure this one out! Learn how to use apktool, baksmali or VTS. It is HIGHLY recommended that if you are decompiling with apktool or baksmali to add "-b" modifier. If using VTS, uncheck the smali debug code. This will make your smali code MUCH smaller - less system space = MORE RAM.
What needs to Be Changed [The long part]
Using Notepad++ or a similar text editor (ie not Notepad) navigate to \com\android\internal\policy\impl\PhoneWindowManager.smali
SEARCH FOR
Code:
.field mAutoMotiveReceiver:Landroid/content/BroadcastReceiver;
ADD TEXT IN GREEN
Code:
.field mAutoMotiveReceiver:Landroid/content/BroadcastReceiver;
[COLOR="SeaGreen"].field mBackKeyLongPressed:Z[/COLOR]
.field mBootCompleted:Z
SEARCH FOR
Code:
.method private launchAssistLongPressAction()V
SCROLL TO THE END OF THIS METHOD AND ADD NEW METHOD IN GREEN
Code:
.end method
[COLOR="SeaGreen"].method private launchBackLongPressAction()V
.locals 18
:try_start_0
invoke-static {}, Landroid/app/ActivityManagerNative;->getDefault()Landroid/app/IActivityManager;
move-result-object v9
invoke-interface {v9}, Landroid/app/IActivityManager;->getRunningAppProcesses()Ljava/util/List;
move-result-object v5
move-object/from16 v0, p0
iget-object v14, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const-string v15, "activity"
invoke-virtual {v14, v15}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Landroid/app/ActivityManager;
const/4 v14, 0x1
invoke-virtual {v2, v14}, Landroid/app/ActivityManager;->getRunningTasks(I)Ljava/util/List;
move-result-object v12
const/4 v14, 0x0
invoke-interface {v12, v14}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v14
check-cast v14, Landroid/app/ActivityManager$RunningTaskInfo;
iget-object v6, v14, Landroid/app/ActivityManager$RunningTaskInfo;->topActivity:Landroid/content/ComponentName;
invoke-interface {v5}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v14
:cond_26
:goto_26
invoke-interface {v14}, Ljava/util/Iterator;->hasNext()Z
move-result v15
if-nez v15, :cond_2d
:cond_2c
:goto_2c
return-void
:cond_2d
invoke-interface {v14}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Landroid/app/ActivityManager$RunningAppProcessInfo;
iget v13, v3, Landroid/app/ActivityManager$RunningAppProcessInfo;->uid:I
const/16 v15, 0x2710
if-lt v13, v15, :cond_26
const v15, 0x1869f
if-gt v13, v15, :cond_26
iget v15, v3, Landroid/app/ActivityManager$RunningAppProcessInfo;->importance:I
const/16 v16, 0x64
move/from16 v0, v16
if-ne v15, v0, :cond_26
iget-object v15, v3, Landroid/app/ActivityManager$RunningAppProcessInfo;->pkgList:[Ljava/lang/String;
if-eqz v15, :cond_26
invoke-interface {v5}, Ljava/util/List;->size()I
move-result v15
if-lez v15, :cond_26
iget-object v15, v3, Landroid/app/ActivityManager$RunningAppProcessInfo;->processName:Ljava/lang/String;
invoke-virtual {v6}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;
move-result-object v16
invoke-virtual/range {v15 .. v16}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v15
if-eqz v15, :cond_26
new-instance v8, Landroid/content/Intent;
const-string v15, "android.intent.action.MAIN"
invoke-direct {v8, v15}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const-string v15, "android.intent.category.HOME"
invoke-virtual {v8, v15}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;
move-object/from16 v0, p0
iget-object v15, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v15}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v15
const/16 v16, 0x0
move/from16 v0, v16
invoke-virtual {v15, v8, v0}, Landroid/content/pm/PackageManager;->resolveActivity(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;
move-result-object v11
iget-object v15, v11, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;
iget-object v15, v15, Landroid/content/pm/ActivityInfo;->processName:Ljava/lang/String;
iget-object v0, v3, Landroid/app/ActivityManager$RunningAppProcessInfo;->processName:Ljava/lang/String;
move-object/from16 v16, v0
invoke-virtual/range {v15 .. v16}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v15
if-nez v15, :cond_2c
move-object/from16 v0, p0
iget-object v15, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v15}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
:try_end_8d
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_8d} :catch_d8
move-result-object v10
:try_start_8e
invoke-virtual {v6}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;
move-result-object v15
const/16 v16, 0x0
move/from16 v0, v16
invoke-virtual {v10, v15, v0}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
:try_end_99
.catch Ljava/lang/Exception; {:try_start_8e .. :try_end_99} :catch_db
move-result-object v1
:goto_9a
if-eqz v1, :cond_de
:try_start_9c
invoke-virtual {v10, v1}, Landroid/content/pm/PackageManager;->getApplicationLabel(Landroid/content/pm/ApplicationInfo;)Ljava/lang/CharSequence;
move-result-object v4
:goto_a0
check-cast v4, Ljava/lang/String;
invoke-virtual {v6}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;
move-result-object v15
invoke-interface {v9, v15}, Landroid/app/IActivityManager;->forceStopPackage(Ljava/lang/String;)V
iget v15, v3, Landroid/app/ActivityManager$RunningAppProcessInfo;->pid:I
invoke-static {v15}, Landroid/os/Process;->killProcess(I)V
move-object/from16 v0, p0
iget-object v15, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
new-instance v16, Ljava/lang/StringBuilder;
invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v17
invoke-direct/range {v16 .. v17}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
const-string v17, " killed."
invoke-virtual/range {v16 .. v17}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v16
invoke-virtual/range {v16 .. v16}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v16
const-string v0, "lyapota"
move-object/from16 v2, v15
move-object/from16 v3, v16
invoke-static {v0, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
const/4 v4, 0x0
invoke-static {v2, v3, v4}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v15
invoke-virtual {v15}, Landroid/widget/Toast;->show()V
goto/16 :goto_26
:catch_d8
move-exception v14
goto/16 :goto_2c
:catch_db
move-exception v7
const/4 v1, 0x0
goto :goto_9a
:cond_de
const-string v4, "(unknown)"
:try_end_e0
.catch Ljava/lang/Exception; {:try_start_9c .. :try_end_e0} :catch_d8
goto :goto_a0
.end method[/COLOR]
.method static makeFnState(IIZIZ)V
(To make life easy) SEARCH FOR
Code:
const-string v40, "ignore handleLongPressOnHome when hasRingingCall or it\'s in GuestMode"
BELOW THIS, YOU WILL NEED TO REPLACE EVERYTHING UNTIL AND INCLUDING
Code:
:pswitch_data_8a4
.packed-switch 0x0
:pswitch_4bd
:pswitch_4c1
:pswitch_4bd
.end packed-switch
:pswitch_data_8ae
.packed-switch 0x1
:pswitch_527
:pswitch_545
.end packed-switch
.end method
NOTE: This last section WILL change with the new data.
THE CODE TO ADD CAN BE FOUND HERE:
http://goo.gl/NA8KI
IT'S TOO BIG FOR XDA
The Final Step
Now that all the smali files have been edited, recompile your .jar, rename your file to android.policy.jar and push to /system/framework/android.policy.jar. Smali files are stored in classes.dex inside of .apks and .jars, I have uploaded some classes.dexs that include the other mods listed here as well as modified/unmodified smalis. Enjoy!
STOCK FILES
PhoneWindowManager.smali
classes.dex
android.policy.jar
BACK-KILL FILES
PhoneWindowManager.smali
classes.dex
android.policy.jar
APM + BACK-KILL FILES
classes.dex
android.policy.jar
APM + VOL-TRACK + BACK-KILL FILES
classes.dex
android.policy.jar
#ASOP
Just in case there are more...
Awesome. /reserved
Sent from my EVO using Tapatalk 2
Reserved
Sent from my EVO using Xparent Red Tapatalk 2
can anyone see if this is updated? i cant seem to download the extra files.
Sup joe. It's not updated lol
Sent from my EVO using Tapatalk
Trying to dig around for those files
Sent from my EVO using Tapatalk now Free
ssojyeti2 said:
Sup joe. It's not updated lol
Sent from my EVO using Tapatalk
Click to expand...
Click to collapse
Sup bro! You been hiding around here?
Sent from my EVO using xda premium
Hey Folks, i'm Michael, i'm 28 and from Germany. First of all Great Forum you Guys build here. A really good Source for solutions in any kind of android problems.
Today i want talk with you about a Software "Problem" i have with my Android Car Stereo.
For a good overview i write a short briefing.
- Android Car Stereo: icartech Alpha v800
- Android 2.2 Froyo
- root access (with z4root)
- adb access only with wifi
- no recovery Menu
- i got the original Stock Rom, which can flash on the System
The Problem:
The Launcher has a Dock with several system App Shortcuts. The Dock is fix, so i can't delete icons, can't change Icon Order, can't add Icons. No new installed app can add a shortcut to the Dock. Except iGO Primo, it's the only app, that has automaticly add a shortcut to the Dock.
I want delete some shortcuts, cause i don't need them and i want add some shortcuts that i daily need.
My Question is: how can i unlock the Dock that i can change thins? Or modify non system apps to add a shortcut to the dock? Is it possible that the launcher has a app list, which controlls, what app can add a shortcut and what can't? And when a decompile the Launcher in which .smali i can possible find the "permissions"?
I really hoping to get help here, i tried to find help in several german Forums, but no one answered me. :-/
I hope you can't understand my english too.
I wish you all a great Day.
Michael
P.S. every app (Apk) is available, so i can post Sourcecode, if it needed
Thats the Car Stereo in my Skoda
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
michael08071984 said:
Hey Folks, i'm Michael, i'm 28 and from Germany. First of all Great Forum you Guys build here. A really good Source for solutions in any kind of android problems.
Click to expand...
Click to collapse
Why don't you experiment with different launchers - surely 1 of the hundreds available would work well for your car? I actually think one of the IOS clone launchers would work well for the car (i.e. no app drawer to navigate while driving). On the same vein, the Windows Launcher 8 clones could do a good job...
or this http://forum.xda-developers.com/showthread.php?t=2218231
Gosh! I forgot to mention, that other launchers not work properly, cause they set the system apps mute. I mean, when i hear analog Radio (fm Radio), AuxIn1 and 2 or Digital Radio, there is no Sound. Only with the stock Launcher.
Launchers i tested:
- Balance Launcher
- ADW Launcher
- go launcher ex
- zeam Launcher
- nemus Launcher
- smart Launcher pro
- Apex Launcher
Greetings
michael08071984 said:
Gosh! I forgot to mention, that other launchers not work properly, cause they set the system apps mute. I mean, when i hear analog Radio (fm Radio), AuxIn1 and 2 or Digital Radio, there is no Sound. Only with the stock Launcher.
Launchers i tested:
- Balance Launcher
- ADW Launcher
- go launcher ex
- zeam Launcher
- nemus Launcher
- smart Launcher pro
- Apex Launcher
Greetings
Click to expand...
Click to collapse
Odd... its possible the stock launcher has a list, I would check inside /data/data/com.name_of_launcher_package/
and see whether there is config files and or a sqllite database that has those entries... just a guess though
Have you tried pushing an alternate laucher to /system/app - might be a permissions thing that is preventing audio for user apps..
Sorry if you've tried this stuff, you quiet likely know more than me!
Thanks for the Tip, i'll give the data folder a sharper look.
I installed the different launcher from the system/apps Folder and i also renamed it like the original launcher, nothing helps.
Hey Folks.
Found the List in the CommUtil.smali. I changed the second app, with the spotify package name. Compiled the modified launcher2.apk. Interchanged the Launcher2.apk with the modified. Restart but nothing happens. Still no Spotify Icon in the Dock. Heres the CommUtil.smali Code:
Code:
.class public final Lcom/android/launcher2/foryou/CommUtil;
.super Ljava/lang/Object;
.source "CommUtil.java"
# static fields
.field public static final DELAY_TIME:I = 0x5dc
.field public static final IS_FORBID_THIRD_APPS:Z
.field public static mMatrix:Landroid/graphics/Matrix;
.field public static parkingFlag:I
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
.line 22
new-instance v0, Landroid/graphics/Matrix;
invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V
sput-object v0, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
.line 26
const/4 v0, 0x1
sput v0, Lcom/android/launcher2/foryou/CommUtil;->parkingFlag:I
.line 21
return-void
.end method
.method public constructor <init>()V
.locals 0
.prologue
.line 21
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static getSortFlagApplicationInfo(Ljava/lang/String;)I
.locals 3
.parameter "pkg"
.prologue
const/16 v2, 0x19
const/4 v1, 0x4
.line 131
if-eqz p0, :cond_19
.line 132
const-string v0, "com.foryou.radio.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
.line 133
const/4 v0, 0x1
.line 186
:goto_0
return v0
.line 134
:cond_0
const-string v0, "com.spotify.mobile.android.ui"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_1
.line 135
const/4 v0, 0x2
goto :goto_0
.line 136
:cond_1
const-string v0, "com.foryou.dab.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2
.line 137
const/4 v0, 0x3
goto :goto_0
.line 138
:cond_2
const-string v0, "com.foryou.mobilenavigation"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_3
move v0, v1
.line 139
goto :goto_0
.line 140
:cond_3
const-string v0, "com.navngo.igo.javaclient"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_4
move v0, v1
.line 141
goto :goto_0
.line 142
:cond_4
const-string v0, "com.navitel"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_5
move v0, v1
.line 143
goto :goto_0
.line 144
:cond_5
const-string v0, "com.navcol.quipu"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_6
move v0, v1
.line 145
goto :goto_0
.line 146
:cond_6
const-string v0, "com.sygic"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_7
move v0, v1
.line 147
goto :goto_0
.line 148
:cond_7
const-string v0, "cityguide.probki.net.co"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_8
move v0, v1
.line 149
goto :goto_0
.line 150
:cond_8
const-string v0, "com.metroview.nav"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_9
move v0, v1
.line 151
goto :goto_0
.line 152
:cond_9
const-string v0, "com.foryou.bt.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_a
.line 153
const/4 v0, 0x5
goto :goto_0
.line 154
:cond_a
const-string v0, "com.android.contacts"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_b
.line 155
const/4 v0, 0x6
goto :goto_0
.line 156
:cond_b
const-string v0, "com.foryou.ipod.usb.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_c
.line 157
const/4 v0, 0x7
goto :goto_0
.line 158
:cond_c
const-string v0, "com.android.music"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_d
.line 159
const/16 v0, 0x8
goto/16 :goto_0
.line 160
:cond_d
const-string v0, "com.foryou.rear.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_e
.line 161
const/16 v0, 0x9
goto/16 :goto_0
.line 162
:cond_e
const-string v0, "com.foryou.video"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_f
.line 163
const/16 v0, 0xa
goto/16 :goto_0
.line 164
:cond_f
const-string v0, "com.foryou.dvbt.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_10
.line 165
const/16 v0, 0xb
goto/16 :goto_0
.line 166
:cond_10
const-string v0, "com.foryou.dvr.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_11
.line 167
const/16 v0, 0xc
goto/16 :goto_0
.line 168
:cond_11
const-string v0, "com.foryou.auxin1"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_12
.line 169
const/16 v0, 0xd
goto/16 :goto_0
.line 170
:cond_12
const-string v0, "com.foryou.auxin2"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_13
.line 171
const/16 v0, 0xe
goto/16 :goto_0
.line 172
:cond_13
const-string v0, "com.foryou.atv.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_14
.line 173
const/16 v0, 0xf
goto/16 :goto_0
.line 174
:cond_14
const-string v0, "com.cooliris.media"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_15
.line 175
const/16 v0, 0x10
goto/16 :goto_0
.line 176
:cond_15
const-string v0, "com.foryou.camera"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_16
.line 177
const/16 v0, 0x11
goto/16 :goto_0
.line 178
:cond_16
const-string v0, "com.foryou.swc.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_17
.line 179
const/16 v0, 0x12
goto/16 :goto_0
.line 180
:cond_17
const-string v0, "com.foryou.eq.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_18
.line 181
const/16 v0, 0x13
goto/16 :goto_0
:cond_18
move v0, v2
.line 183
goto/16 :goto_0
:cond_19
move v0, v2
.line 186
goto/16 :goto_0
.end method
.method public static final isForyouAPP(Lcom/android/launcher2/ApplicationInfo;)Z
.locals 2
.parameter "appInfo"
.prologue
.line 37
invoke-virtual {p0}, Lcom/android/launcher2/ApplicationInfo;->getComponentName()Landroid/content/ComponentName;
move-result-object v1
invoke-virtual {v1}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;
move-result-object v0
.line 38
.local v0, pkgName:Ljava/lang/String;
invoke-static {v0}, Lcom/android/launcher2/foryou/CommUtil;->isForyouAPP(Ljava/lang/String;)Z
move-result v1
return v1
.end method
.method public static final isForyouAPP(Ljava/lang/String;)Z
.locals 1
.parameter "packageName"
.prologue
.line 44
const-string v0, "com.foryou"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 45
const-string v0, "com.android.music"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 46
const-string v0, "com.cooliris.media"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 47
const-string v0, "com.navngo.igo"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 48
const-string v0, "cityguide.probki.net"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 49
const-string v0, "com.metroview.nav"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 50
const-string v0, "com.navcol.quipu"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 51
const-string v0, "com.navitel"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 52
const-string v0, "com.sygic"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_1
.line 54
:cond_0
const/4 v0, 0x1
.line 56
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public static final isForyouAPP2(Ljava/lang/String;)Z
.locals 1
.parameter "packageName"
.prologue
.line 60
const-string v0, "com.foryou"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 61
const-string v0, "com.android.music"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 62
const-string v0, "com.cooliris.media"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_1
.line 69
:cond_0
const/4 v0, 0x1
.line 71
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public static final isNotForyouApps(Ljava/lang/String;)Z
.locals 1
.parameter "packageName"
.prologue
.line 81
const-string v0, "com.navngo.igo"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 82
const-string v0, "cityguide.probki.net.co"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 83
const-string v0, "com.metroview.nav"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 84
const-string v0, "com.navitel"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 85
const-string v0, "com.navcol.quipu"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 86
const-string v0, "com.sygic"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 87
const-string v0, "com.android.APKTools"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 88
const-string v0, "com.android.calendar"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 89
const-string v0, "com.android.deskclock"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 90
const-string v0, "com.android.settings"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 91
const-string v0, "com.foryou.settings"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 92
const-string v0, "com.google.android.apps.maps"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 93
const-string v0, "com.chartcross.gpstestplus"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_1
.line 95
:cond_0
const/4 v0, 0x1
.line 97
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public static final scaleBitmap(Landroid/graphics/Bitmap;FF)Landroid/graphics/Bitmap;
.locals 7
.parameter "src"
.parameter "scaleX"
.parameter "scaleY"
.prologue
const/4 v1, 0x0
.line 110
sget-object v0, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
invoke-virtual {v0}, Landroid/graphics/Matrix;->reset()V
.line 111
sget-object v0, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
invoke-virtual {v0, p1, p2}, Landroid/graphics/Matrix;->postScale(FF)Z
.line 112
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I
move-result v3
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I
move-result v4
sget-object v5, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
const/4 v6, 0x1
move-object v0, p0
move v2, v1
invoke-static/range {v0 .. v6}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;
move-result-object v0
return-object v0
.end method
.method public static final sendMessageToApp(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
.locals 1
.parameter "who"
.parameter "receiver"
.parameter "messageTag"
.parameter "messageValue"
.prologue
.line 123
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 124
.local v0, intent:Landroid/content/Intent;
invoke-virtual {v0, p1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 125
invoke-virtual {v0, p2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 126
invoke-virtual {p0, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
.line 127
return-void
.end method
I hope anyone can help me. I become desperate. :-/
Android ICS Road Veles Car Stereo Help
michael08071984 said:
Hey Folks.
Found the List in the CommUtil.smali. I changed the second app, with the spotify package name. Compiled the modified launcher2.apk. Interchanged the Launcher2.apk with the modified. Restart but nothing happens. Still no Spotify Icon in the Dock. Heres the CommUtil.smali Code:
Code:
.class public final Lcom/android/launcher2/foryou/CommUtil;
.super Ljava/lang/Object;
.source "CommUtil.java"
# static fields
.field public static final DELAY_TIME:I = 0x5dc
.field public static final IS_FORBID_THIRD_APPS:Z
.field public static mMatrix:Landroid/graphics/Matrix;
.field public static parkingFlag:I
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
.line 22
new-instance v0, Landroid/graphics/Matrix;
invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V
sput-object v0, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
.line 26
const/4 v0, 0x1
sput v0, Lcom/android/launcher2/foryou/CommUtil;->parkingFlag:I
.line 21
return-void
.end method
.method public constructor <init>()V
.locals 0
.prologue
.line 21
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static getSortFlagApplicationInfo(Ljava/lang/String;)I
.locals 3
.parameter "pkg"
.prologue
const/16 v2, 0x19
const/4 v1, 0x4
.line 131
if-eqz p0, :cond_19
.line 132
const-string v0, "com.foryou.radio.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
.line 133
const/4 v0, 0x1
.line 186
:goto_0
return v0
.line 134
:cond_0
const-string v0, "com.spotify.mobile.android.ui"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_1
.line 135
const/4 v0, 0x2
goto :goto_0
.line 136
:cond_1
const-string v0, "com.foryou.dab.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2
.line 137
const/4 v0, 0x3
goto :goto_0
.line 138
:cond_2
const-string v0, "com.foryou.mobilenavigation"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_3
move v0, v1
.line 139
goto :goto_0
.line 140
:cond_3
const-string v0, "com.navngo.igo.javaclient"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_4
move v0, v1
.line 141
goto :goto_0
.line 142
:cond_4
const-string v0, "com.navitel"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_5
move v0, v1
.line 143
goto :goto_0
.line 144
:cond_5
const-string v0, "com.navcol.quipu"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_6
move v0, v1
.line 145
goto :goto_0
.line 146
:cond_6
const-string v0, "com.sygic"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_7
move v0, v1
.line 147
goto :goto_0
.line 148
:cond_7
const-string v0, "cityguide.probki.net.co"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_8
move v0, v1
.line 149
goto :goto_0
.line 150
:cond_8
const-string v0, "com.metroview.nav"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_9
move v0, v1
.line 151
goto :goto_0
.line 152
:cond_9
const-string v0, "com.foryou.bt.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_a
.line 153
const/4 v0, 0x5
goto :goto_0
.line 154
:cond_a
const-string v0, "com.android.contacts"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_b
.line 155
const/4 v0, 0x6
goto :goto_0
.line 156
:cond_b
const-string v0, "com.foryou.ipod.usb.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_c
.line 157
const/4 v0, 0x7
goto :goto_0
.line 158
:cond_c
const-string v0, "com.android.music"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_d
.line 159
const/16 v0, 0x8
goto/16 :goto_0
.line 160
:cond_d
const-string v0, "com.foryou.rear.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_e
.line 161
const/16 v0, 0x9
goto/16 :goto_0
.line 162
:cond_e
const-string v0, "com.foryou.video"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_f
.line 163
const/16 v0, 0xa
goto/16 :goto_0
.line 164
:cond_f
const-string v0, "com.foryou.dvbt.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_10
.line 165
const/16 v0, 0xb
goto/16 :goto_0
.line 166
:cond_10
const-string v0, "com.foryou.dvr.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_11
.line 167
const/16 v0, 0xc
goto/16 :goto_0
.line 168
:cond_11
const-string v0, "com.foryou.auxin1"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_12
.line 169
const/16 v0, 0xd
goto/16 :goto_0
.line 170
:cond_12
const-string v0, "com.foryou.auxin2"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_13
.line 171
const/16 v0, 0xe
goto/16 :goto_0
.line 172
:cond_13
const-string v0, "com.foryou.atv.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_14
.line 173
const/16 v0, 0xf
goto/16 :goto_0
.line 174
:cond_14
const-string v0, "com.cooliris.media"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_15
.line 175
const/16 v0, 0x10
goto/16 :goto_0
.line 176
:cond_15
const-string v0, "com.foryou.camera"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_16
.line 177
const/16 v0, 0x11
goto/16 :goto_0
.line 178
:cond_16
const-string v0, "com.foryou.swc.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_17
.line 179
const/16 v0, 0x12
goto/16 :goto_0
.line 180
:cond_17
const-string v0, "com.foryou.eq.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_18
.line 181
const/16 v0, 0x13
goto/16 :goto_0
:cond_18
move v0, v2
.line 183
goto/16 :goto_0
:cond_19
move v0, v2
.line 186
goto/16 :goto_0
.end method
.method public static final isForyouAPP(Lcom/android/launcher2/ApplicationInfo;)Z
.locals 2
.parameter "appInfo"
.prologue
.line 37
invoke-virtual {p0}, Lcom/android/launcher2/ApplicationInfo;->getComponentName()Landroid/content/ComponentName;
move-result-object v1
invoke-virtual {v1}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;
move-result-object v0
.line 38
.local v0, pkgName:Ljava/lang/String;
invoke-static {v0}, Lcom/android/launcher2/foryou/CommUtil;->isForyouAPP(Ljava/lang/String;)Z
move-result v1
return v1
.end method
.method public static final isForyouAPP(Ljava/lang/String;)Z
.locals 1
.parameter "packageName"
.prologue
.line 44
const-string v0, "com.foryou"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 45
const-string v0, "com.android.music"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 46
const-string v0, "com.cooliris.media"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 47
const-string v0, "com.navngo.igo"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 48
const-string v0, "cityguide.probki.net"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 49
const-string v0, "com.metroview.nav"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 50
const-string v0, "com.navcol.quipu"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 51
const-string v0, "com.navitel"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 52
const-string v0, "com.sygic"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_1
.line 54
:cond_0
const/4 v0, 0x1
.line 56
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public static final isForyouAPP2(Ljava/lang/String;)Z
.locals 1
.parameter "packageName"
.prologue
.line 60
const-string v0, "com.foryou"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 61
const-string v0, "com.android.music"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 62
const-string v0, "com.cooliris.media"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_1
.line 69
:cond_0
const/4 v0, 0x1
.line 71
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public static final isNotForyouApps(Ljava/lang/String;)Z
.locals 1
.parameter "packageName"
.prologue
.line 81
const-string v0, "com.navngo.igo"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 82
const-string v0, "cityguide.probki.net.co"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 83
const-string v0, "com.metroview.nav"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 84
const-string v0, "com.navitel"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 85
const-string v0, "com.navcol.quipu"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 86
const-string v0, "com.sygic"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 87
const-string v0, "com.android.APKTools"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 88
const-string v0, "com.android.calendar"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 89
const-string v0, "com.android.deskclock"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 90
const-string v0, "com.android.settings"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 91
const-string v0, "com.foryou.settings"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 92
const-string v0, "com.google.android.apps.maps"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 93
const-string v0, "com.chartcross.gpstestplus"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_1
.line 95
:cond_0
const/4 v0, 0x1
.line 97
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public static final scaleBitmap(Landroid/graphics/Bitmap;FF)Landroid/graphics/Bitmap;
.locals 7
.parameter "src"
.parameter "scaleX"
.parameter "scaleY"
.prologue
const/4 v1, 0x0
.line 110
sget-object v0, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
invoke-virtual {v0}, Landroid/graphics/Matrix;->reset()V
.line 111
sget-object v0, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
invoke-virtual {v0, p1, p2}, Landroid/graphics/Matrix;->postScale(FF)Z
.line 112
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I
move-result v3
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I
move-result v4
sget-object v5, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
const/4 v6, 0x1
move-object v0, p0
move v2, v1
invoke-static/range {v0 .. v6}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;
move-result-object v0
return-object v0
.end method
.method public static final sendMessageToApp(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
.locals 1
.parameter "who"
.parameter "receiver"
.parameter "messageTag"
.parameter "messageValue"
.prologue
.line 123
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 124
.local v0, intent:Landroid/content/Intent;
invoke-virtual {v0, p1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 125
invoke-virtual {v0, p2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 126
invoke-virtual {p0, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
.line 127
return-void
.end method
I hope anyone can help me. I become desperate. :-/
Click to expand...
Click to collapse
I am desperate to know how to connect to this device to fault find, why the android system does not boot up!!
had this device 3 weeks and now no sound cause the android part does not boot so car stereo useless at moment..
Is there anyone who knows how to fix this device???
I do not want to send it back to china to be fixed due to cost and time....
any help would be appreciated...
KR
Flapjack1
flapjack1 said:
I am desperate to know how to connect to this device to fault find, why the android system does not boot up!!
had this device 3 weeks and now no sound cause the android part does not boot so car stereo useless at moment..
Is there anyone who knows how to fix this device???
I do not want to send it back to china to be fixed due to cost and time....
any help would be appreciated...
KR
Flapjack1
Click to expand...
Click to collapse
Have you a full android car Stereo or WinCE with Android Part? Mine is full android. press return, Home and Power Button at the same time and hold it pressed, when a flash Process is starting, i can help you.
Michael,
I have the wince 6 and android version all in a 1 DIN unit.
I called all or most if the car audio repair shops in UK, but they won't touch the unit as its an import. So you help would be fantastic as I searched the web and no info out there yet
KR
Flapjack1
Hi, I also have a Road Veles and am looking for a place to discuss the device.
I would like to work out how to add bluetooth to android. The device has a bluetooth adapter but it is for exclusive use of the winCE functions (Hands free, music from phone etc), Android does not have access to bluetooth so the app that I bought the stereo to run (MSDroid) does not work.
Road Veles comes with a WiFi adapter, I have purchased but am yet to receive a combined WiFi and Bluetooth dongle. I have tried plugging a BT dongle into the USB port that is normally used by the WiFi dongle, the device see the BT adapter inside "USB Device Info" app, but there is no Bluetooth control visible that would normally be located under WiFi inside Settings.
good day, I need some help in adding some codes to settings.smali. I want to add a condition to the preferencetreeclick method but I always get a force close error, the condition I'm trying to add would be that if wifi toggle is checked then call wifi_settings subscreen. please help me on this one devs. thanks..
Code:
.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
.locals 4
.parameter "preferenceScreen"
.parameter "preference"
.prologue
const-string v3, "com.android.settings"
.line 175
invoke-virtual {p2}, Landroid/preference/Preference;->getKey()Ljava/lang/String;
move-result-object v1
.line 176
.local v1, key:Ljava/lang/String;
const-string v2, "call_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_1
.line 177
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 178
.local v0, intent:Landroid/content/Intent;
const-string v2, "com.android.phone"
const-string v3, "com.android.phone.CallSettings"
invoke-virtual {v0, v2, v3}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 179
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
.line 258
.end local v0 #intent:Landroid/content/Intent;
:cond_0
:goto_0
invoke-super {p0, p1, p2}, Landroid/preference/PreferenceActivity;->onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
move-result v2
return v2
.line 180
:cond_1
const-string v2, "fm_transmitter_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_2
.line 181
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 182
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.mediatek.FMTransmitter"
const-string v3, "com.mediatek.FMTransmitter.FMTransmitterActivity"
invoke-virtual {v0, v2, v3}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 184
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto :goto_0
.line 185
.end local v0 #intent:Landroid/content/Intent;
:cond_2
const-string v2, "customization_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_3
.line 186
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 187
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.Customization"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 188
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto :goto_0
.line 189
.end local v0 #intent:Landroid/content/Intent;
:cond_3
const-string v2, "gemini_sim_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_4
.line 190
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 191
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.gemini.SimManagement"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 192
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto :goto_0
.line 193
.end local v0 #intent:Landroid/content/Intent;
:cond_4
const-string v2, "toggle_wifi"
# i don't know if this is the right dalvik code for the condition I want to add..
iget-boolean v2, v3, Lcom/android/settings/Settings;->mWifiEnabler:Lcom/android/settings/wifi/WifiEnabler;
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_5
.line 194
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 195
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.wifi.WifiSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 196
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto :goto_0
.line 197
.end local v0 #intent:Landroid/content/Intent;
:cond_5
const-string v2, "audio_profile_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_6
.line 198
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 199
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.audioprofile.AudioProfileSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 201
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto :goto_0
.line 202
.end local v0 #intent:Landroid/content/Intent;
:cond_6
const-string v2, "display_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_7
.line 203
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 204
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.DisplaySettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 205
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 206
.end local v0 #intent:Landroid/content/Intent;
:cond_7
const-string v2, "location_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_8
.line 207
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 208
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.LocationSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 209
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 210
.end local v0 #intent:Landroid/content/Intent;
:cond_8
const-string v2, "security_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_9
.line 211
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 212
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.SecuritySettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 213
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 214
.end local v0 #intent:Landroid/content/Intent;
:cond_9
const-string v2, "applications_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_a
.line 215
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 216
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.ApplicationSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 217
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 218
.end local v0 #intent:Landroid/content/Intent;
:cond_a
const-string v2, "privacy_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_b
.line 219
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 220
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.PrivacySettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 221
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 222
.end local v0 #intent:Landroid/content/Intent;
:cond_b
const-string v2, "storage_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_c
.line 223
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 224
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.deviceinfo.Memory"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 225
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 226
.end local v0 #intent:Landroid/content/Intent;
:cond_c
const-string v2, "language_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_d
.line 227
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 228
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.LanguageSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 229
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 230
.end local v0 #intent:Landroid/content/Intent;
:cond_d
const-string v2, "accessibility_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_e
.line 231
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 232
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.AccessibilitySettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 234
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 235
.end local v0 #intent:Landroid/content/Intent;
:cond_e
const-string v2, "date_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_f
.line 236
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 237
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.DateTimeSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 238
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 239
.end local v0 #intent:Landroid/content/Intent;
:cond_f
const-string v2, "power_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_10
.line 240
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 241
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.schpwronoff.AlarmClock"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 243
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 244
.end local v0 #intent:Landroid/content/Intent;
:cond_10
const-string v2, "about_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_11
.line 245
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 246
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.DeviceInfoSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 247
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 248
.end local v0 #intent:Landroid/content/Intent;
:cond_11
const-string v2, "voice_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_12
.line 249
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 250
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.VoiceInputOutputSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 252
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 253
.end local v0 #intent:Landroid/content/Intent;
:cond_12
const-string v2, "dock_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
.line 254
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 255
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.DockSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 256
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.end method
can anyone please help me?..my phone runs on gingerbread 2.3.6 os version..please help me with the codes..thanks!
help please..still can't find the right dalvik code to use..T_T
help anyone?
Hey guys,
I have modded 2-3 Android Apps for Root check and I was able to use them without problem on my rooted device. However this app is giving me a lot of issues. I believe I have found the 2 smali files that have the root check. Does anyone know what needs to be modded or how it needs to be modded on these 2 smali files to bypass the root detection or to make the app believe the device is not rooted?
AppStartMeasurement.smali
Code:
.class public Lcom/comscore/applications/AppStartMeasurement;
.super Lcom/comscore/applications/ApplicationMeasurement;
# direct methods
.method protected constructor <init>(Lcom/comscore/analytics/Core;Lcom/comscore/applications/EventType;Ljava/lang/String;Z)V
.locals 5
const/4 v4, 0x0
invoke-direct {p0, p1, p2, p3, p4}, Lcom/comscore/applications/ApplicationMeasurement;-><init>(Lcom/comscore/analytics/Core;Lcom/comscore/applications/EventType;Ljava/lang/String;Z)V
new-instance v0, Lcom/comscore/measurement/Label;
const-string v1, "ns_ap_gs"
invoke-virtual {p1}, Lcom/comscore/analytics/Core;->getFirstInstallId()J
move-result-wide v2
invoke-static {v2, v3}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
move-result-object v2
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v0}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
new-instance v0, Lcom/comscore/measurement/Label;
const-string v1, "ns_ap_install"
invoke-virtual {p1}, Lcom/comscore/analytics/Core;->getInstallId()J
move-result-wide v2
invoke-static {v2, v3}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
move-result-object v2
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v0}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
new-instance v0, Lcom/comscore/measurement/Label;
const-string v1, "ns_ap_runs"
invoke-virtual {p1}, Lcom/comscore/analytics/Core;->getRunsCount()I
move-result v2
invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v2
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v0}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
if-eqz p4, :cond_0
new-instance v0, Lcom/comscore/measurement/Label;
const-string v1, "ns_ap_csf"
const-string v2, "1"
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v0}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
:cond_0
const-string v0, "0"
invoke-static {}, Lcom/comscore/utils/RootDetector;->isDeviceRooted()Z
move-result v1
if-eqz v1, :cond_1
const-string v0, "1"
:cond_1
new-instance v1, Lcom/comscore/measurement/Label;
const-string v2, "ns_ap_jb"
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v1, v2, v0, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v1}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
new-instance v0, Lcom/comscore/measurement/Label;
const-string v1, "ns_ap_lastrun"
invoke-virtual {p1}, Lcom/comscore/analytics/Core;->getPreviousGenesis()J
move-result-wide v2
invoke-static {v2, v3}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
move-result-object v2
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v0}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
invoke-virtual {p1}, Lcom/comscore/analytics/Core;->getPreviousVersion()Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_2
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v1
if-lez v1, :cond_2
new-instance v1, Lcom/comscore/measurement/Label;
const-string v2, "ns_ap_updated"
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v1, v2, v0, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v1}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
:cond_2
return-void
.end method
RootDetector.smali
Code:
.class public Lcom/comscore/utils/RootDetector;
.super Ljava/lang/Object;
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private static a()Z
.locals 2
sget-object v0, Landroid/os/Build;->TAGS:Ljava/lang/String;
if-eqz v0, :cond_0
const-string v1, "test-keys"
invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method private static b()Z
.locals 2
:try_start_0
new-instance v0, Ljava/io/File;
const-string v1, "/system/app/Superuser.apk"
invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/File;->exists()Z
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:catch_0
move-exception v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method public static isDeviceRooted()Z
.locals 2
const/4 v0, 0x1
invoke-static {}, Lcom/comscore/utils/RootDetector;->a()Z
move-result v1
if-eqz v1, :cond_1
:cond_0
:goto_0
return v0
:cond_1
invoke-static {}, Lcom/comscore/utils/RootDetector;->b()Z
move-result v1
if-nez v1, :cond_0
const/4 v0, 0x0
goto :goto_0
.end method
just change this line:
const-string v1, "/system/app/Superuser.apk"
to this:
const-string v1, "/system/app/GTFOSTUPIDASS.apk"
saulin78 said:
Hey guys,
I have modded 2-3 Android Apps for Root check and I was able to use them without problem on my rooted device. However this app is giving me a lot of issues. I believe I have found the 2 smali files that have the root check. Does anyone know what needs to be modded or how it needs to be modded on these 2 smali files to bypass the root detection or to make the app believe the device is not rooted?
.end method
[/CODE]
Click to expand...
Click to collapse
I'm in the same boat. Narrowed it down to those two files. I've tried several methods but this app keeps detecting root. I'm still trying so I'll let you know if I have any success, did you ever find a solution?