oppo 手机 去除root警告,去除修改系统后通知栏常驻root警告

该博客内容涉及一个名为`com.wuxianlin.oppotools.k`的Android类,该类似乎用于处理Oppo手机上的Root警告和系统修改通知。方法包括检查文件是否存在以确定是否显示警告,以及启动线程执行相关系统操作来禁用或恢复这些警告。此外,类中还包含了点击不同偏好设置时触发的不同操作,如跳转到网页或执行系统命令。
摘要由CSDN通过智能技术生成

oppo 手机 去除root警告,去除修改系统后通知栏常驻root警告

.class public Lcom/wuxianlin/oppotools/k;
.super Landroid/preference/PreferenceFragment;


# instance fields
.field private a:Landroid/preference/Preference;

.field private b:Landroid/preference/CheckBoxPreference;

.field private c:Landroid/preference/Preference;

.field private d:Landroid/preference/Preference;

.field private e:Landroid/preference/Preference;

.field private f:Landroid/preference/Preference;

.field private g:Landroid/preference/Preference;

.field private h:Ljava/lang/Runnable;

.field private i:Z


# direct methods
.method public constructor <init>()V
    .registers 1

    invoke-direct {p0}, Landroid/preference/PreferenceFragment;-><init>()V

    return-void
.end method

.method private a()V
    .registers 4

    invoke-static {}, Lcom/wuxianlin/oppotools/h;->a()Z

    move-result v0

    invoke-virtual {p0}, Lcom/wuxianlin/oppotools/k;->getActivity()Landroid/app/Activity;

    move-result-object v1

    new-instance v2, Lcom/wuxianlin/oppotools/k$2;

    invoke-direct {v2, p0, v0}, Lcom/wuxianlin/oppotools/k$2;-><init>(Lcom/wuxianlin/oppotools/k;Z)V

    invoke-virtual {v1, v2}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    return-void
.end method

.method static synthetic a(Lcom/wuxianlin/oppotools/k;)V
    .registers 1

    invoke-direct {p0}, Lcom/wuxianlin/oppotools/k;->a()V

    return-void
.end method

.method static synthetic b(Lcom/wuxianlin/oppotools/k;)Landroid/preference/CheckBoxPreference;
    .registers 2

    iget-object v0, p0, Lcom/wuxianlin/oppotools/k;->b:Landroid/preference/CheckBoxPreference;

    return-object v0
.end method


# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
    .registers 4

    invoke-super {p0, p1}, Landroid/preference/PreferenceFragment;->onCreate(Landroid/os/Bundle;)V

    const v0, 0x7f070001

    invoke-virtual {p0, v0}, Lcom/wuxianlin/oppotools/k;->addPreferencesFromResource(I)V

    const-string v0, "wifipasswords"

    invoke-virtual {p0, v0}, Lcom/wuxianlin/oppotools/k;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Lcom/wuxianlin/oppotools/k;->a:Landroid/preference/Preference;

    const-string v0, "fix_root"

    invoke-virtual {p0, v0}, Lcom/wuxianlin/oppotools/k;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    check-cast v0, Landroid/preference/CheckBoxPreference;

    iput-object v0, p0, Lcom/wuxianlin/oppotools/k;->b:Landroid/preference/CheckBoxPreference;

    const-string v0, "/system/etc/security/ck.fs"

    invoke-static {v0}, Lcom/wuxianlin/oppotools/c;->a(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_2b

    const-string v0, "/system/etc/security/ck.fs.bak"

    invoke-static {v0}, Lcom/wuxianlin/oppotools/c;->a(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_68

    :cond_2b
    const/4 v0, 0x1

    :goto_2c
    iput-boolean v0, p0, Lcom/wuxianlin/oppotools/k;->i:Z

    iget-boolean v0, p0, Lcom/wuxianlin/oppotools/k;->i:Z

    if-nez v0, :cond_3f

    const-string v0, "common"

    invoke-virtual {p0, v0}, Lcom/wuxianlin/oppotools/k;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    check-cast v0, Landroid/preference/PreferenceGroup;

    iget-object v1, p0, Lcom/wuxianlin/oppotools/k;->b:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v0, v1}, Landroid/preference/PreferenceGroup;->removePreference(Landroid/preference/Preference;)Z

    :cond_3f
    const-string v0, "jiaocheng"

    invoke-virtual {p0, v0}, Lcom/wuxianlin/oppotools/k;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Lcom/wuxianlin/oppotools/k;->c:Landroid/preference/Preference;

    const-string v0, "ziyuan"

    invoke-virtual {p0, v0}, Lcom/wuxianlin/oppotools/k;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Lcom/wuxianlin/oppotools/k;->d:Landroid/preference/Preference;

    const-string v0, "recovery"

    invoke-virtual {p0, v0}, Lcom/wuxianlin/oppotools/k;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Lcom/wuxianlin/oppotools/k;->e:Landroid/preference/Preference;

    const-string v0, "rom"

    invoke-virtual {p0, v0}, Lcom/wuxianlin/oppotools/k;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Lcom/wuxianlin/oppotools/k;->f:Landroid/preference/Preference;

    const-string v0, "crack_theme"

    invoke-virtual {p0, v0}, Lcom/wuxianlin/oppotools/k;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Lcom/wuxianlin/oppotools/k;->g:Landroid/preference/Preference;

    return-void

    :cond_68
    const/4 v0, 0x0

    goto :goto_2c
.end method

.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
    .registers 11

    const/4 v7, 0x3

    const/4 v6, 0x2

    const/4 v5, 0x1

    const/16 v3, 0x17

    const/4 v1, 0x0

    iget-object v0, p0, Lcom/wuxianlin/oppotools/k;->c:Landroid/preference/Preference;

    if-ne p2, v0, :cond_24

    new-instance v0, Landroid/content/Intent;

    invoke-virtual {p0}, Lcom/wuxianlin/oppotools/k;->getActivity()Landroid/app/Activity;

    move-result-object v1

    const-class v2, Lcom/wuxianlin/oppotools/WebActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "url"

    const-string v2, "file:///android_asset/jiaocheng.html"

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

    invoke-virtual {p0, v0}, Lcom/wuxianlin/oppotools/k;->startActivity(Landroid/content/Intent;)V

    :cond_1f
    :goto_1f
    invoke-super {p0, p1, p2}, Landroid/preference/PreferenceFragment;->onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z

    move-result v0

    return v0

    :cond_24
    iget-object v0, p0, Lcom/wuxianlin/oppotools/k;->d:Landroid/preference/Preference;

    if-ne p2, v0, :cond_3e

    new-instance v0, Landroid/content/Intent;

    invoke-virtual {p0}, Lcom/wuxianlin/oppotools/k;->getActivity()Landroid/app/Activity;

    move-result-object v1

    const-class v2, Lcom/wuxianlin/oppotools/WebActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "url"

    const-string v2, "file:///android_asset/ziyuan.html"

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

    invoke-virtual {p0, v0}, Lcom/wuxianlin/oppotools/k;->startActivity(Landroid/content/Intent;)V

    goto :goto_1f

    :cond_3e
    iget-object v0, p0, Lcom/wuxianlin/oppotools/k;->e:Landroid/preference/Preference;

    if-ne p2, v0, :cond_58

    new-instance v0, Landroid/content/Intent;

    invoke-virtual {p0}, Lcom/wuxianlin/oppotools/k;->getActivity()Landroid/app/Activity;

    move-result-object v1

    const-class v2, Lcom/wuxianlin/oppotools/WebActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "url"

    const-string v2, "file:///android_asset/recovery.html"

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

    invoke-virtual {p0, v0}, Lcom/wuxianlin/oppotools/k;->startActivity(Landroid/content/Intent;)V

    goto :goto_1f

    :cond_58
    iget-object v0, p0, Lcom/wuxianlin/oppotools/k;->f:Landroid/preference/Preference;

    if-ne p2, v0, :cond_72

    new-instance v0, Landroid/content/Intent;

    invoke-virtual {p0}, Lcom/wuxianlin/oppotools/k;->getActivity()Landroid/app/Activity;

    move-result-object v1

    const-class v2, Lcom/wuxianlin/oppotools/WebActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "url"

    const-string v2, "file:///android_asset/rom.html"

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

    invoke-virtual {p0, v0}, Lcom/wuxianlin/oppotools/k;->startActivity(Landroid/content/Intent;)V

    goto :goto_1f

    :cond_72
    iget-object v0, p0, Lcom/wuxianlin/oppotools/k;->b:Landroid/preference/CheckBoxPreference;

    if-ne p2, v0, :cond_140

    iget-object v0, p0, Lcom/wuxianlin/oppotools/k;->b:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z

    move-result v0

    if-eqz v0, :cond_11e

    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    if-lt v0, v3, :cond_cd

    const-string v0, "$XKIT mount -o remount,rw /system"

    invoke-static {v0}, La/a/a/b$b;->a(Ljava/lang/String;)Ljava/util/List;

    :goto_87
    const-string v0, "/system/etc/security/ck.fs.bak"

    invoke-static {v0}, Lcom/wuxianlin/oppotools/c;->a(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_94

    const-string v0, "mv /system/etc/security/ck.fs /system/etc/security/ck.fs.bak"

    invoke-static {v0}, La/a/a/b$b;->a(Ljava/lang/String;)Ljava/util/List;

    :cond_94
    const-string v0, "busybox find /system -type f -o -type l | busybox xargs busybox ls -l --color=never | busybox grep -Ev \'sysmd5.zip|sd_after|ck.fs|install-recovery.sh|install_recovery.sh|recovery-from-boot.p|com.google.android.maps\' | busybox awk \'{print $5,$9}\' | busybox sort | busybox md5sum | busybox cut -b 1-32"

    sget v2, Landroid/os/Build$VERSION;->SDK_INT:I

    if-lt v2, v3, :cond_9c

    const-string v0, "$XKIT find /system -type f -o -type l | $XKIT xargs $XKIT ls -l --color=never | $XKIT grep -Ev \'sysmd5.zip|sd_after|ck.fs|install-recovery.sh|install_recovery.sh|recovery-from-boot.p|com.google.android.maps\' | $XKIT awk \'{print $5,$9}\' | $XKIT sort | $XKIT md5sum | $XKIT cut -b 1-32"

    :cond_9c
    new-instance v2, Ljava/lang/StringBuilder;

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

    invoke-static {v0}, La/a/a/b$b;->a(Ljava/lang/String;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

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

    move-result-object v0

    const-string v2, "\n"

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

    move-result-object v0

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

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->getBytes()[B

    move-result-object v2

    move v0, v1

    :goto_be
    array-length v3, v2

    if-ge v0, v3, :cond_d3

    aget-byte v3, v2, v0

    xor-int/lit8 v3, v3, -0x1

    xor-int/lit8 v3, v3, 0x62

    int-to-byte v3, v3

    aput-byte v3, v2, v0

    add-int/lit8 v0, v0, 0x1

    goto :goto_be

    :cond_cd
    const-string v0, "mount -o remount,rw /system"

    invoke-static {v0}, La/a/a/b$b;->a(Ljava/lang/String;)Ljava/util/List;

    goto :goto_87

    :cond_d3
    new-instance v0, Ljava/io/File;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Lcom/wuxianlin/oppotools/k;->getActivity()Landroid/app/Activity;

    move-result-object v4

    invoke-virtual {v4}, Landroid/app/Activity;->getFilesDir()Ljava/io/File;

    move-result-object v4

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

    move-result-object v3

    const-string v4, "/ckfs"

    invoke-virtual {v3, v4}, 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

    invoke-direct {v0, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/File;->delete()Z

    :try_start_f6
    new-instance v3, Ljava/io/FileOutputStream;

    invoke-direct {v3, v0}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V

    invoke-virtual {v3, v2}, Ljava/io/FileOutputStream;->write([B)V

    invoke-virtual {v3}, Ljava/io/FileOutputStream;->close()V
    :try_end_101
    .catch Ljava/io/FileNotFoundException; {:try_start_f6 .. :try_end_101} :catch_114
    .catch Ljava/io/IOException; {:try_start_f6 .. :try_end_101} :catch_119

    :goto_101
    new-array v0, v7, [Ljava/lang/String;

    const-string v2, "cp /data/data/com.wuxianlin.oppotools/files/ckfs /system/etc/security/ck.fs"

    aput-object v2, v0, v1

    const-string v1, "chmod 644 /system/etc/security/ck.fs"

    aput-object v1, v0, v5

    const-string v1, "mount -o remount,ro /system"

    aput-object v1, v0, v6

    invoke-static {v0}, La/a/a/b$b;->a([Ljava/lang/String;)Ljava/util/List;

    goto/16 :goto_1f

    :catch_114
    move-exception v0

    invoke-virtual {v0}, Ljava/io/FileNotFoundException;->printStackTrace()V

    goto :goto_101

    :catch_119
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_101

    :cond_11e
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    if-lt v0, v3, :cond_13a

    const-string v0, "$XKIT mount -o remount,rw /system"

    invoke-static {v0}, La/a/a/b$b;->a(Ljava/lang/String;)Ljava/util/List;

    :goto_127
    new-array v0, v7, [Ljava/lang/String;

    const-string v2, "mv /system/etc/security/ck.fs.bak /system/etc/security/ck.fs"

    aput-object v2, v0, v1

    const-string v1, "chmod 644 /system/etc/security/ck.fs"

    aput-object v1, v0, v5

    const-string v1, "mount -o remount,ro /system"

    aput-object v1, v0, v6

    invoke-static {v0}, La/a/a/b$b;->a([Ljava/lang/String;)Ljava/util/List;

    goto/16 :goto_1f

    :cond_13a
    const-string v0, "mount -o remount,rw /system"

    invoke-static {v0}, La/a/a/b$b;->a(Ljava/lang/String;)Ljava/util/List;

    goto :goto_127

    :cond_140
    iget-object v0, p0, Lcom/wuxianlin/oppotools/k;->g:Landroid/preference/Preference;

    if-ne p2, v0, :cond_1f

    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    if-lt v0, v3, :cond_154

    const-string v0, "$XKIT sed -i \'s/20fe83d7c4f96b39/6ed4c56a47485647/g\' /data/theme/core/keys/*.ctk"

    invoke-static {v0}, La/a/a/b$b;->a(Ljava/lang/String;)Ljava/util/List;

    :goto_14d
    const-string v0, "rm -rf /data/data/com.nearme.themespace/databases/theme.db*"

    invoke-static {v0}, La/a/a/b$b;->a(Ljava/lang/String;)Ljava/util/List;

    goto/16 :goto_1f

    :cond_154
    const-string v0, "busybox sed -i \'s/20fe83d7c4f96b39/6ed4c56a47485647/g\' /data/theme/core/keys/*.ctk"

    invoke-static {v0}, La/a/a/b$b;->a(Ljava/lang/String;)Ljava/util/List;

    goto :goto_14d
.end method

.method public onResume()V
    .registers 5

    invoke-super {p0}, Landroid/preference/PreferenceFragment;->onResume()V

    iget-object v0, p0, Lcom/wuxianlin/oppotools/k;->a:Landroid/preference/Preference;

    invoke-static {}, Lcom/wuxianlin/oppotools/b;->a()Z

    move-result v1

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setEnabled(Z)V

    iget-object v0, p0, Lcom/wuxianlin/oppotools/k;->g:Landroid/preference/Preference;

    invoke-static {}, Lcom/wuxianlin/oppotools/b;->a()Z

    move-result v1

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setEnabled(Z)V

    iget-boolean v0, p0, Lcom/wuxianlin/oppotools/k;->i:Z

    if-eqz v0, :cond_36

    iget-object v0, p0, Lcom/wuxianlin/oppotools/k;->b:Landroid/preference/CheckBoxPreference;

    invoke-static {}, Lcom/wuxianlin/oppotools/b;->a()Z

    move-result v1

    invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V

    :try_start_22
    new-instance v0, Lcom/wuxianlin/oppotools/k$1;

    invoke-direct {v0, p0}, Lcom/wuxianlin/oppotools/k$1;-><init>(Lcom/wuxianlin/oppotools/k;)V

    iput-object v0, p0, Lcom/wuxianlin/oppotools/k;->h:Ljava/lang/Runnable;

    new-instance v0, Ljava/lang/Thread;

    const/4 v1, 0x0

    iget-object v2, p0, Lcom/wuxianlin/oppotools/k;->h:Ljava/lang/Runnable;

    const-string v3, "Background"

    invoke-direct {v0, v1, v2, v3}, Ljava/lang/Thread;-><init>(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V
    :try_end_36
    .catch Ljava/lang/Exception; {:try_start_22 .. :try_end_36} :catch_37

    :cond_36
    :goto_36
    return-void

    :catch_37
    move-exception v0

    goto :goto_36
.end method

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

z920981023

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值