Skip to content

Instantly share code, notes, and snippets.

View gauravssnl's full-sized avatar
😸
use code::latest ;

GAURAV gauravssnl

😸
use code::latest ;
View GitHub Profile
@gauravssnl
gauravssnl / Guide-of-Lindroid.md
Created October 4, 2025 07:26 — forked from AngelaCooljx/Guide-of-Lindroid.md
A guide on how to use Lindroid

An Unofficial Guide of Lindroid

Official Guide: https://t.me/linux_on_droid/1263

What is Lindroid?

Lindroid is an Android app that lets you run Linux in a container, with support for hardware-acceleration. Official group: https://t.me/linux_on_droid

How to Compile Lindroid?

  1. Ensure your device has the necessary configurations:
    • Obtain a usable device configuration, kernel source, and ROM source code for your device.
@gauravssnl
gauravssnl / Bringup.md
Created October 3, 2025 23:59 — forked from mvaisakh/Bringup.md
An Android Device Tree Bringup Guide

A small Device Tree Bringup Guide

Introduction

So, you guys might be wondering, how do these "Developers" get your favourite Custom roms, such as LineageOS, Paranoid Android etc., to their own devices. Well I'm here to Guide you on how to do it, specifically on how to bringup or make your own device tree from scratch or adapting.

Gist of this Guide: This is for people with genuine interest in Android OS porting/development. After going through this guide, you should be able to do a total device tree bringup on your own.

Prerequisite: Certain requirements are to be met before you start with this amazing journey.

@gauravssnl
gauravssnl / AdbCommands
Created November 16, 2024 14:52 — forked from Pulimet/AdbCommands
Adb useful commands list
Hi All!
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future.
Feel free to request any features you'd like to see, and I'll prioritize them accordingly.
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it.
Here's the link to the repository: https://github.com/Pulimet/ADBugger
App Description:
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups.
@gauravssnl
gauravssnl / build-rust-code-for-android.sh
Last active November 16, 2024 12:47
Cross compile Rust code for Android OS multiple architectures
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
@gauravssnl
gauravssnl / Test.java
Last active November 13, 2024 20:57
JNI example to call java method (example : System.out.println)
class Test {
static {
System.loadLibrary("hello");
}
public static void main(String[] args) {
System.out.println("Test OK");
System.out.println(stringFromJNI());
}
@gauravssnl
gauravssnl / SampleEncPrefs.kt
Created January 30, 2024 15:23 — forked from scottyab/SampleEncPrefs.kt
Simple example of using EncrypredSharedPreferences
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) {
@gauravssnl
gauravssnl / SignatureCheck.java
Created January 30, 2024 15:22 — forked from scottyab/SignatureCheck.java
Simple Android signature check. Please note: This was created in 2013, not actively maintained and may not be compatible with the latest Android versions. It's not particularly difficult for an attacker to decompile an .apk, find this tamper check, replace the APP_SIGNATURE with theirs and rebuild (or use method hooking to return true from `vali…
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";
@gauravssnl
gauravssnl / SimpleApkV2.java
Created January 30, 2024 14:58 — forked from vvb2060/SimpleApkV2.java
SimpleApkV2
// 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;
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;
@gauravssnl
gauravssnl / hiddenapibypass.cpp
Created January 30, 2024 14:56 — forked from vvb2060/hiddenapibypass.cpp
`JNI_OnLoad` called by system
jint JNI_OnLoad(JavaVM *jvm, void *) {
JNIEnv *env;
jclass clazz;
if (jvm->GetEnv((void **) &env, JNI_VERSION_1_6) != JNI_OK) {
return JNI_ERR;
}
jclass vm = env->FindClass("dalvik/system/VMRuntime");
jclass string = env->FindClass("java/lang/String");