首页
社区
课程
招聘
[求助][原创]请教这个软件运行时弹出信息的问题
发表于: 2014-4-25 16:34 4717

[求助][原创]请教这个软件运行时弹出信息的问题

2014-4-25 16:34
4717
软件名字叫bw-go free,谷歌商店中有。这是个围棋棋谱编辑软件,由于买不到正式版。只有这个FREE版,每次设置时,会弹出信息showtipscreens,很烦人。我反编译了一下,发现ActSettingsSmall.smali中有这么一段:
.method public onCreate(Landroid/os/Bundle;)V
    .locals 7

    const/4 v5, 0x1

    const/4 v6, 0x0

    invoke-virtual {p0, v5}, Lmco/prj/app/bwgofree/ActSettingsSmall;->requestWindowFeature(I)Z

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

    const v0, 0x7f030007

    invoke-virtual {p0, v0}, Lmco/prj/app/bwgofree/ActSettingsSmall;->setContentView(I)V

    const v0, 0x7f0b003c

    invoke-virtual {p0, v0}, Lmco/prj/app/bwgofree/ActSettingsSmall;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lmco/prj/app/bwgofree/ActSettingsSmall;->a:Landroid/view/View;

    const/high16 v0, 0x7f050000

    invoke-virtual {p0, v0}, Lmco/prj/app/bwgofree/ActSettingsSmall;->addPreferencesFromResource(I)V

    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v1

    const-string v0, "fullScreen"

    invoke-interface {v1, v0, v6}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v2

    invoke-virtual {p0, v2}, Lmco/prj/app/bwgofree/ActSettingsSmall;->a(Z)V

    const-string v0, "showTipScreens"

    invoke-virtual {p0, v0}, Lmco/prj/app/bwgofree/ActSettingsSmall;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    const v3, 0x7f060082

    invoke-virtual {p0, v3}, Lmco/prj/app/bwgofree/ActSettingsSmall;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

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

    const-string v0, "gobanKaya"

    invoke-interface {v1, v0, v5}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v0

    const-string v3, "gobanKaya"

    invoke-virtual {p0, v3}, Lmco/prj/app/bwgofree/ActSettingsSmall;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    if-eqz v0, :cond_1

    const v0, 0x7f060079

    :goto_0
    invoke-virtual {v3, v0}, Landroid/preference/Preference;->setSummary(I)V

    const-string v0, "stones3D"

    invoke-interface {v1, v0, v5}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v0

    const-string v3, "stones3D"

    invoke-virtual {p0, v3}, Lmco/prj/app/bwgofree/ActSettingsSmall;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    if-eqz v0, :cond_2

    const v0, 0x7f06007c

    :goto_1

看不懂啊
还请各位指点一下,看看能不能把烦人的提示去掉。
另外这个软件的设置中,show tip screens是灰色的,默认打了勾,无法设置去掉勾。
如果能把这个灰色激活,不知道能不能把勾去掉。
大侠帮帮我吧。

[招生]系统0day安全班,企业级设备固件漏洞挖掘,Linux平台漏洞挖掘!

上传的附件:
收藏
免费 0
支持
分享
最新回复 (2)
雪    币: 208
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
问题解决了。
我修改了两个地方:
1、res/xml/preferences.xml中,我把<CheckBoxPreference android:title="@string/t_showtipscreens" android:key="showTipScreens" android:defaultValue="ture" />改为<CheckBoxPreference android:title="@string/t_showtipscreens" android:key="showTipScreens" android:defaultValue="false" />
修改后,软件的设置中,show tip screens还是灰色的,默认打的勾,已经去掉了。
2、把ActMain.smali中的method protected onResume()V这一段程序全部删掉了。删掉的内容如下:
.method protected onResume()V
    .locals 6

    const/4 v3, 0x1

    const/4 v5, 0x0

    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v0

    const-string v1, "showTipScreens"

    invoke-interface {v0, v1, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v1

    const-string v2, "showTut"

    invoke-interface {v0, v2, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v2

    const-string v3, "lastVer"

    const/4 v4, 0x0

    invoke-interface {v0, v3, v4}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    if-eqz v2, :cond_3

    iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;

    invoke-virtual {v1}, Lmco/prj/app/bwgofree/cs;->b()Z

    move-result v1

    if-nez v1, :cond_1

    :cond_0
    new-instance v1, Lmco/prj/app/bwgofree/cx;

    iget-boolean v2, p0, Lmco/prj/app/bwgofree/ActMain;->D:Z

    invoke-direct {v1, p0, v2}, Lmco/prj/app/bwgofree/cx;-><init>(Landroid/content/Context;Z)V

    iput-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;

    :cond_1
    iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;

    invoke-virtual {v1}, Lmco/prj/app/bwgofree/cs;->a()V

    :cond_2
    :goto_0
    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    const-string v1, "lastVer"

    invoke-static {}, Lmco/prj/app/bwgofree/dt;->a()Ljava/lang/String;

    move-result-object v2

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    invoke-virtual {p0}, Lmco/prj/app/bwgofree/ActMain;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    iget v0, v0, Landroid/content/res/Configuration;->orientation:I

    sput v0, Lmco/prj/app/bwgofree/et;->a:I

    invoke-direct {p0}, Lmco/prj/app/bwgofree/ActMain;->o()V

    return-void

    :cond_3
    invoke-static {}, Lmco/prj/app/bwgofree/dt;->a()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_6

    iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;

    if-eqz v1, :cond_4

    iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;

    invoke-virtual {v1}, Lmco/prj/app/bwgofree/cs;->b()Z

    move-result v1

    if-nez v1, :cond_5

    :cond_4
    new-instance v1, Lmco/prj/app/bwgofree/dc;

    iget-boolean v2, p0, Lmco/prj/app/bwgofree/ActMain;->D:Z

    invoke-direct {v1, p0, v2}, Lmco/prj/app/bwgofree/dc;-><init>(Landroid/content/Context;Z)V

    iput-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;

    :cond_5
    iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;

    invoke-virtual {v1}, Lmco/prj/app/bwgofree/cs;->a()V

    goto :goto_0

    :cond_6
    iget-boolean v2, p0, Lmco/prj/app/bwgofree/ActMain;->H:Z

    if-eqz v2, :cond_7

    if-nez v1, :cond_8

    :cond_7
    invoke-virtual {p0}, Lmco/prj/app/bwgofree/ActMain;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v1

    iget v1, v1, Landroid/content/res/Configuration;->orientation:I

    sget v2, Lmco/prj/app/bwgofree/et;->a:I

    if-ne v1, v2, :cond_2

    :cond_8
    iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;

    if-eqz v1, :cond_9

    iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;

    invoke-virtual {v1}, Lmco/prj/app/bwgofree/cs;->b()Z

    move-result v1

    if-nez v1, :cond_a

    :cond_9
    new-instance v1, Lmco/prj/app/bwgofree/cv;

    iget-boolean v2, p0, Lmco/prj/app/bwgofree/ActMain;->D:Z

    invoke-direct {v1, p0, v2, v5}, Lmco/prj/app/bwgofree/cv;-><init>(Landroid/content/Context;ZZ)V

    iput-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;

    :cond_a
    iput-boolean v5, p0, Lmco/prj/app/bwgofree/ActMain;->H:Z

    iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;

    invoke-virtual {v1}, Lmco/prj/app/bwgofree/cs;->a()V

    goto :goto_0
.end method

修改这两处,保存后重新编译。安装测试,问题解决。
2014-4-26 10:22
0
雪    币: 1
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
能否发个给我?
2014-6-4 23:11
0
游客
登录 | 注册 方可回帖
返回
//