【準(zhǔn)備事項(xiàng)】
1. 準(zhǔn)備好工具apktool,確定你對(duì)apktool的反編譯和重新編譯有所了解,而且知道怎么使用。
2. 準(zhǔn)備好文本編輯器notepad++ 。
3. 準(zhǔn)備好工具backsmali 。
【詳細(xì)修改步驟】
1、修改Flashbarservice.apk
用apktool反編譯system/app目錄中的flashbarservice.apk
進(jìn)入flashbarservicesmalicomsecandroidappFlashBar Service
用文件編輯器notepad++打開FlashBarInfo.smali文件
搜索方法 .method public generateFlashBarList()V
然后按照下面的說明來修改,左側(cè)有-號(hào)的是你要?jiǎng)h除的內(nèi)容,有+號(hào)的是你要增加的內(nèi)容
iget-object v10, v6, Landroid/content/pm/ResolveInfo;->filter:Landroid/content/IntentFilter;
- const-string v11, "android.intent.category.MULTIWINDOW_LAUNCHER"
+ const-string v11, "android.intent.category.LAUNCHER"
invoke-virtual {v10, v11}, Landroid/content/IntentFilter;->hasCategory(Ljava/lang/String;)Z
iget-object v10, v6, Landroid/content/pm/ResolveInfo;->filter:Landroid/content/IntentFilter;
- const-string v11, "com.sec.android.intent.category.MULTIWINDOW_LAUNCHER"
+ const-string v11, "com.sec.android.intent.category.LAUNCHER"
invoke-virtual {v10, v11}, Landroid/content/IntentFilter;->hasCategory(Ljava/lang/String;)Z
:try_end_0
iget-object v8, v7, Landroid/content/pm/ResolveInfo;->filter:Landroid/content/IntentFilter;
- const-string v9, "android.intent.category.MULTIWINDOW_LAUNCHER"
+ const-string v9, "android.intent.category.LAUNCHER"
invoke-virtual {v8, v9}, Landroid/content/IntentFilter;->hasCategory(Ljava/lang/String;)Z
iget-object v8, v7, Landroid/content/pm/ResolveInfo;->filter:Landroid/content/IntentFilter;
- const-string v9, "com.sec.android.intent.category.MULTIWINDOW_LAUNCHER"
+ const-string v9, "com.sec.android.intent.category.LAUNCHER"
invoke-virtual {v8, v9}, Landroid/content/IntentFilter;->hasCategory(Ljava/lang/String;)Z
:try_end_0
修改完成后,保存文件,然后重新編譯回去,替換原文件,這一部分的修改就完成了。
2、修改services.jar
反編譯system/framework目錄中的services.jar文件
進(jìn)入services.jar.outsmalicomandroidserveram目錄
使用文本編輯器notepad++打開MultiWindowManagerService.smali文件
搜索方法 .method public isSupportApp(Ljava/lang/StringZ
然后按照下面的說明來修改,左側(cè)有-號(hào)的是你要?jiǎng)h除的內(nèi)容,有+號(hào)的是你要增加的內(nèi)容
.PRologue
.line 567
+ const/4 v0, 0x1
+
+ goto :goto_0
+
iget-object v0, p0, Lcom/android/server/am/MultiWindowManagerService;->mSupportAppList:Ljava/util/ArrayList;
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
修改完成后,保存文件,然后重新編譯回去,替換原文件,這樣就修改完了。
新聞熱點(diǎn)
疑難解答
圖片精選