[Android Studio]SQLScout插件安装破解

时间:2023-11-14 00:05:20


以下内容为原创,欢迎转载,转载请注明
来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/5972138.html

[Android Studio]SQLScout插件安装破解

0. 写在前面

想当初很长一段时间内不想用Android Studio而喜欢用Intellij IDEA(旗舰版)其中一个原因就是因为Intellij IDEA(旗舰版)自带Database Explorer功能便于调试,终于找到了这个Android Studio的插件可以用了,下载试用,满意!就是这个感觉!可惜需要付费,还有点小贵--,囊中羞涩,所以只好亲自手动破解,大家好孩子别轻易尝试。。。

官网http://www.idescout.com/download/

1. 安装SQLScout插件

  1. 打开Android Studio

  2. Settings(on Windows and Linux) or Preferences(Mac)

  3. Plugins

  4. Browse Repositories...
    [Android Studio]SQLScout插件安装破解

  5. 选择SQLScout并安装

2. 激活SQLScout

在试用期过后,需要购买一个商业证书来激活SQLScout。

[Android Studio]SQLScout插件安装破解

通过这里 [购买商业证书] (https://www.idescout.com/secure/buy),然后点击Activate按钮。

[Android Studio]SQLScout插件安装破解

3. 破解

注意:以下破解只供学习讨论,请勿传播

3.1 破解SQLScout 2.0.4

for Android Studio 2.1 and IntelliJ IDEA 2016.1

通过前面的方法安装SQLScout插件之后,进入Intellij IDEA插件安装目录:

~/Library/Application Support/AndroidStudio/SQLScout/lib/

反编译SQLScout.jar

进入com/idescout/sqlite/license/,修改License.class

License.java如下:

package com.idescout.sqlite.license;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Lists;
import com.intellij.ide.IdeEventQueue;
import com.intellij.openapi.components.ServiceManager;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;
import java.util.concurrent.TimeUnit;

public class License {
    @NotNull
    private final m a = new m();
    @NotNull
    private final k b = new k();
    @NotNull
    private final List<j> c = Lists.newArrayList();
    @NotNull
    private final LicenseCheck.Type d = LicenseCheck.Type.COMMERCIAL;
    public static int e;
    private static final String[] f = new String[4];

    @NotNull
    public static License getInstance() {
        License license = null;
        try {

            if ((license = (License) ServiceManager.getService(License.class)) == null) {
                throw new IllegalStateException(String.format(f[0], new Object[]{f[2], f[1]}));
            }
        } catch (IllegalStateException localIllegalStateException) {
            throw localIllegalStateException;
        }
        return license;
    }

    private License() {
        this.c.add(this.b);
        this.c.add(this.a);
        int i = (int) TimeUnit.MINUTES.toMillis(1L);
        IdeEventQueue.getInstance().addIdleListener(new i(this), i);
    }

    private void a() {
    }

    private void a(@NotNull com.intellij.openapi.project.Project paramProject) {
    }

    boolean b() {
        return false;
    }

    public boolean isValidLicense() {
        return true;
    }

    public boolean isValidLicense(@Nullable com.intellij.openapi.project.Project arg1) {
        return true;
    }

    @VisibleForTesting
    void c() {
        this.b.c();
    }

    void a(@NotNull String paramString)
            throws Throwable {
    }

    void a(@NotNull Throwable paramThrowable, @org.jetbrains.annotations.Nullable com.intellij.openapi.project.Project paramProject) {
    }

    static void a(License paramLicense) {
        paramLicense.a();
    }

    static m b(License paramLicense) {
        return paramLicense.a;
    }

    static k c(License paramLicense) {
        return paramLicense.b;
    }
}

然后编译该文件复制License.class文件,替换原来的License.class

然后jar cvf SQLScout.jar ./*打包jar。

最后替换~/Library/Application Support/AndroidStudio/SQLScout/lib/下的SQLScout.jar文件,重启Android Studio。

3.2 破解SQLScout 2.0.6

方法与破解2.0.4一样,License.class替换如下:

package com.idescout.sqlite.license;

import com.google.common.annotations.VisibleForTesting;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.project.Project;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.List;

public class License {
    @NotNull
    private final h a;
    @NotNull
    private final f b;
    @NotNull
    private final List<e> c;
    @NotNull
    private final LicenseCheck.Type d;
    private static final String[] e = new String[11];

    @NotNull
    public static License getInstance() {
        License license;
        try {
            license = (License) ServiceManager.getService((Class) License.class);
            if (license == null) {
                throw new IllegalStateException("error by wangjie");
            }
        } catch (IllegalStateException ex) {
            throw ex;
        }
        return license;
    }

    private License() {
        this.a = new h();
        this.b = new f();
        this.c = new ArrayList<e>();
        this.d = LicenseCheck.Type.COMMERCIAL;
        this.c.add(this.b);
        this.c.add(this.a);
//        IdeEventQueue.getInstance().addIdleListener(this::d, (int) TimeUnit.MINUTES.toMillis(1L));
    }

    private void a() {
    }

    private void a(@NotNull final Project project) {
    }

    boolean b() {
        return false;
    }

    public boolean isValidLicense() {
        return true;
    }

    public boolean isValidLicense(@Nullable final Project p0) {
        return true;
    }

    @VisibleForTesting
    void c() {
        this.b.c();
    }

    void a(@NotNull final String s) throws Throwable {
    }

    void a(@NotNull final Throwable t, @Nullable final Project project) {
    }

    private void d() {
    }

    static h a(final License license) {
        return license.a;
    }

    static f b(final License license) {
        return license.b;
    }

}

3.3 破解文件下载

使用方式,下载下面的SQLScout.jar,替换~/Library/Application Support/AndroidStudio../SQLScout/lib/SQLScout.jar文件,重启AndroidStudio即可。

3.3.1 SQLScout 2.0.4:

支持Android Studio 2.1 和 IntelliJ IDEA 2016.1.

SQLScout.jar下载:

https://github.com/wangjiegulu/wangjiegulu.github.com/tree/master/file/SQLScout/2.0.4

3.3.2 SQLScout 2.0.6:

支持Android Studio 2.2

SQLScout.jar下载:

https://github.com/wangjiegulu/wangjiegulu.github.com/tree/master/file/SQLScout/2.0.6