Protecting in-app purchases from Freedom Hack

后端 未结 3 1768
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-07 16:43

I\'ve throughtoutly searched this site as well as others for answers and found no actual one.

My question is what exactly does the Freedom Hack (which allows users t

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-07 17:28

    I'm using something like this, I know it's not a good solution compared to a remote server check for your signature. I'm checking if Freedom app is installed, if so I'm not opening my app.

    @Override
    protected void onCreate(Bundle arg0) {
        super.onCreate(arg0);
        if(isHackerAppIsntalled())
            finish();
    }
    
    private boolean isHackerAppInstalled() {        
        final PackageManager pm = getApplication().getPackageManager();
        List packages = pm
                .getInstalledApplications(PackageManager.GET_META_DATA);
        for (ApplicationInfo packageInfo : packages) {
            String packageName = packageInfo.packageName;
            if (packageName.contains("cc.madkite.freedom")
                    || packageName.contains("madkite.freedom")) {
                return true;
            }
        }
        return false;
    }
    

提交回复
热议问题