- 註冊時間
- 2014-1-21
- 最後登錄
- 2021-6-2
- 帖子
- 2663
- 閱讀權限
- 60
- 積分
- 10142
- 精華
- 0
- 機型
- 紅米
- 版本
- 台灣16.0修改版
   
- 真實姓名
- 佬輝阿郎
|
本帖最後由 kid888 於 2017-4-9 08:41 編輯
網路上已有很多種services.jar修改教學,測試結果不一定成功
以下是本人紅米Note3雙網通自行修改官方V8.2.1.0穩定版的services.jar方法
紅米Note3雙網通跟全網通的ROM打包方式不同,不用先進行system.new.dat 解包跟打包
1.首先作業系統需安裝跟設定JAVA
2.準備:一鍵合併odex軟體,APKDB組建跟回組建工具,官方完整ROM包
步驟一:
用解壓軟體將ROM包\system裡面的framework跟app以及priv-app資料夾還有build.prop文件解壓縮出來
執行一鍵合併odex的SVADeodexerForArt程式,路徑指向剛解壓出來的資料夾,左邊3項打勾(如圖)
接著點擊右下角Execute執行,就開始合併odex,合併完成會生成app/dex/framework/odex/priv-app五個資料夾
步驟二:
在framework資料夾內的services.jar文件按右鍵,點選使用APKDB組建(如圖)
反編譯完成後會生成services資料夾
步驟三:
修改services\com\miui\server資料夾內的SecurityManagerService$1.smali跟SecurityManagerService.smali文件
1.打開SecurityManagerService$1.smali文件
只保留這段內容,其餘內容刪除
.class Lcom/miui/server/SecurityManagerService$1;
.super Ljava/lang/Thread;
.source "SecurityManagerService.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/miui/server/SecurityManagerService;->checkSystemSelfProtection(Z)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0 com/miui/server/SecurityManagerService;
.field final synthetic val$onlyCore:Z
# direct methods
.method constructor <init>(Lcom/miui/server/SecurityManagerService;Z)V
.registers 3
.prologue
.line 468
iput-object p1, p0, Lcom/miui/server/SecurityManagerService$1;->this$0 com/miui/server/SecurityManagerService;
iput-boolean p2, p0, Lcom/miui/server/SecurityManagerService$1;->val$onlyCore:Z
invoke-direct {p0}, Ljava/lang/Thread;-><init>()V
return-void
.end method
(如下圖)
2.打開SecurityManagerService.smali文件
搜尋.method private checkSystemSelfProtection(Z)V
找到如下:
.method private checkSystemSelfProtection(Z)V
.registers 3
.param p1, "onlyCore" # Z
.prologue
.line 468
new-instance v0, Lcom/miui/server/SecurityManagerService$1;
invoke-direct {v0, p0, p1}, Lcom/miui/server/SecurityManagerService$1;-><init>(Lcom/miui/server/SecurityManagerService;Z)V
invoke-virtual {v0}, Lcom/miui/server/SecurityManagerService$1;->start()V
.line 543
return-void
.end method
(刪除下面這些內容)
new-instance v0, Lcom/miui/server/SecurityManagerService$1;
invoke-direct {v0, p0, p1}, Lcom/miui/server/SecurityManagerService$1;-><init>(Lcom/miui/server/SecurityManagerService;Z)V
invoke-virtual {v0}, Lcom/miui/server/SecurityManagerService$1;->start()V
(如下圖)
步驟四:
修改完成後,在services資料夾按右鍵,點選使用APKDB組建
回編譯成功後,services資料夾內會生成classes跟services.jar兩個文件
步驟五:
將services.jar文件覆蓋官方ROM包內的services.jar文件,這樣刪除ROM包內的系統程式就不會卡白米
PS:下載一鍵合併odex跟System_Extractor http://www.mediafire.com/file/p2ohe4qrelw9gg0/MIUI_ROM_TOOL.rar
APKDB安卓逆手 http://idoog.me/?p=2933 |
本帖子中包含更多資源
您需要 登錄 才可以下載或查看,沒有帳號?立即註冊
-
總評分: 經驗 + 9
查看全部評分
|