This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export NDK_HOME_TOOLCHAIN_BIN="$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin" | |
RUSTFLAGS="-C linker=${NDK_HOME_TOOLCHAIN_BIN}/aarch64-linux-android30-clang" cargo build --target aarch64-linux-android | |
RUSTFLAGS="-C linker=${NDK_HOME_TOOLCHAIN_BIN}/armv7a-linux-androideabi30-clang" cargo build --target armv7-linux-androideabi | |
RUSTFLAGS="-C linker=${NDK_HOME_TOOLCHAIN_BIN}/x86_64-linux-android30-clang" cargo build --target x86_64-linux-android | |
RUSTFLAGS="-C linker=${NDK_HOME_TOOLCHAIN_BIN}/i686-linux-android30-clang" cargo build --target i686-linux-android |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Test { | |
static { | |
System.loadLibrary("hello"); | |
} | |
public static void main(String[] args) { | |
System.out.println("Test OK"); | |
System.out.println(stringFromJNI()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.scottyab.whatsnewplayground.data | |
import android.content.Context | |
import android.content.SharedPreferences | |
import androidx.security.crypto.EncryptedSharedPreferences | |
import androidx.security.crypto.MasterKeys | |
import com.scottyab.whatsnewplayground.BuildConfig | |
internal class SampleEncPrefs(context: Context) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.content.pm.PackageInfo; | |
import android.content.pm.PackageManager; | |
import android.content.pm.PackageManager.NameNotFoundException; | |
import android.content.pm.Signature; | |
public class TamperCheck { | |
//we store the hash of the signture for a little more protection | |
private static final String APP_SIGNATURE = "1038C0E34658923C4192E61B16846"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// package me.piebridge; | |
import java.io.IOException; | |
import java.io.RandomAccessFile; | |
import java.math.BigInteger; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; | |
import java.util.Arrays; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.AppComponentFactory; | |
import android.content.pm.ApplicationInfo; | |
import android.util.Log; | |
import java.io.IOException; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.Channels; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.zip.ZipFile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
#include <string> | |
#include <cinttypes> | |
#include <android/log.h> | |
#include <sys/system_properties.h> | |
using namespace std; | |
extern "C" { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.segment "HEADER" | |
.byte "NES", $1A ; Constant | |
.byte 2 ; 2 x 16KB PRG ROM | |
.byte 1 ; 1 x 8KB CHR ROM | |
.segment "CHARS" | |
;------------------------------------------------------------- | |
; CREATE SPRITES | |
;------------------------------------------------------------- | |
; The following creates one sprite. The following two bitmaps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ___ _ __ ___ __ ___ | |
; / __|_ _ __ _| |_____ / /| __|/ \_ ) | |
; \__ \ ' \/ _` | / / -_) _ \__ \ () / / | |
; |___/_||_\__,_|_\_\___\___/___/\__/___| | |
; An annotated version of the snake example from Nick Morgan's 6502 assembly tutorial | |
; on http://skilldrick.github.io/easy6502/ that I created as an exercise for myself | |
; to learn a little bit about assembly. I **think** I understood everything, but I may | |
; also be completely wrong :-) |
NewerOlder