JNI (Java Native Interface) allows implementing methods in C/C++, and use them in Java.
class JNIExample {
// Native method, no body.
let offset = 20000; | |
let chunk_size = 10000; | |
// File handle: | |
let mut handle = BufReader::new(File::open("data.bin").await?); | |
// Set cursor to needed chunk: | |
let mut chunk_stream = handle | |
.bytes() | |
.skip(offset) |
/** | |
* Basic Array class, similar to std::array. | |
* | |
* by Dmitry Soshnikov <dmitry.soshnikov@gmail.com> | |
* MIT Style License (C) 2020 | |
*/ | |
#ifndef __Array_h | |
#define __Array_h |
/* | |
* Copyright (c) 1996, 1998, Oracle and/or its affiliates. All rights reserved. | |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
* | |
* This code is free software; you can redistribute it and/or modify it | |
* under the terms of the GNU General Public License version 2 only, as | |
* published by the Free Software Foundation. Oracle designates this | |
* particular file as subject to the "Classpath" exception as provided | |
* by Oracle in the LICENSE file that accompanied this code. | |
* |
android { | |
signingConfigs { | |
getByName("debug") { | |
keyAlias = "debug" | |
keyPassword = "my debug key password" | |
storeFile = file("/home/miles/keystore.jks") | |
storePassword = "my keystore password" | |
} | |
create("release") { | |
keyAlias = "release" |
console.log("Script loaded successfully "); | |
Java.perform(() => { | |
const BaseActivity = Java.use('com.streema.simpleradio.SimpleRadioBaseActivity'); | |
BaseActivity.initAds.implementation = function () { }; | |
BaseActivity.preloadActivityAds.implementation = function () { }; | |
BaseActivity.isPremium.implementation = function () { |
/* | |
Android SSL Re-pinning frida script v0.2 030417-pier | |
$ adb push burpca-cert-der.crt /data/local/tmp/cert-der.crt | |
$ frida -U -f it.app.mobile -l frida-android-repinning.js --no-pause | |
https://techblog.mediaservice.net/2017/07/universal-android-ssl-pinning-bypass-with-frida/ | |
UPDATE 20191605: Fixed undeclared var. Thanks to @oleavr and @ehsanpc9999 ! | |
*/ |
package com.versobit.kmark.gist; | |
import android.app.Application; | |
import android.content.Context; | |
import de.robv.android.xposed.IXposedHookLoadPackage; | |
import de.robv.android.xposed.XC_MethodHook; | |
import de.robv.android.xposed.callbacks.XC_LoadPackage; | |
import static de.robv.android.xposed.XposedHelpers.findAndHookMethod; |
try { | |
PathClassLoader pcl = (PathClassLoader) Thread.currentThread().getContextClassLoader(); | |
Field f = Class.forName("dalvik.system.BaseDexClassLoader").getDeclaredField("pathList"); | |
f.setAccessible(true); | |
Object dpl = f.get(pcl); | |
Class cls = Class.forName("dalvik.system.DexPathList"); | |
Field f2 = cls.getDeclaredField("dexElements"); | |
f2.setAccessible(true); | |
Object[] elements = (Object[])f2.get(dpl); | |
for(Object e : elements) { |
package you.should.change.this; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.app.FragmentActivity; | |
import android.support.v4.app.FragmentPagerAdapter; | |
import android.support.v4.view.ViewPager; | |
import android.view.View; | |
import android.view.ViewGroup; |