public override void SetUp() { var salt = new byte[] { 104, 12, 112, 82, 85, 10, 11, 61, 15, 54, 44, 66, 117, 89, 64, 110, 53, 123, 33 }; string deviceId = Settings.Secure.GetString(Context.ContentResolver, Settings.Secure.AndroidId); this.policy = new ApkExpansionPolicy(Context, new AesObfuscator(salt, Context.PackageName, deviceId)); }
/// <summary> /// The run. /// </summary> public void Run() { this.context.IsServiceRunning = true; this.context.downloadNotification.OnDownloadStateChanged(DownloaderState.FetchingUrl); string deviceId = Settings.Secure.GetString(this.context.ContentResolver, Settings.Secure.AndroidId); var aep = new ApkExpansionPolicy( this.context, new AesObfuscator(this.context.Salt, this.context.PackageName, deviceId)); // reset our policy back to the start of the world to force a re-check aep.ResetPolicy(); // let's try and get the OBB file from LVL first // Construct the LicenseChecker with a IPolicy. var checker = new LicenseChecker(this.context, aep, this.context.PublicKey); checker.CheckAccess(new ApkLicenseCheckerCallback(this, aep)); }
/// <summary> /// Initializes a new instance of the <see cref="ApkLicenseCheckerCallback"/> class. /// </summary> /// <param name="lvlRunnable"> /// The lvl runnable. /// </param> /// <param name="policy"> /// The policy. /// </param> public ApkLicenseCheckerCallback(LvlRunnable lvlRunnable, ApkExpansionPolicy policy) { this.lvlRunnable = lvlRunnable; this.policy = policy; }