Skip to content

Instantly share code, notes, and snippets.

View ShivamKumarJha's full-sized avatar

Shivam Kumar Jha ShivamKumarJha

View GitHub Profile
diff --git a/ims.apk b/ims.apk
index d98706e..3e4792c 100644
Binary files a/ims.apk and b/ims.apk differ
diff --git a/ims/apktool.yml b/ims/apktool.yml
index 3cfe49c..1d69909 100644
--- a/ims/apktool.yml
+++ b/ims/apktool.yml
@@ -2,7 +2,6 @@
apkFileName: ims.apk
compressionType: false
# TWRP
lib64/[email protected]:recovery/root/sbin/[email protected]
lib64/[email protected]:recovery/root/sbin/[email protected]
lib64/[email protected]:recovery/root/sbin/[email protected]
lib64/[email protected]:recovery/root/sbin/[email protected]
lib64/libicuuc.so:recovery/root/sbin/libicuuc.so
lib64/libion.so:recovery/root/sbin/libion.so
lib64/libxml2.so:recovery/root/sbin/libxml2.so
lib64/[email protected]:recovery/root/sbin/[email protected]
vendor/bin/hw/[email protected]:recovery/root/sbin/[email protected]
#!/bin/bash
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Copyright (C) 2019 Shivam Kumar Jha <[email protected]>
#
# Helper functions
# Store project path
PROJECT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
const botConfig = {
db: {
host: 'localhost',
port: 27017,
name: 'test'
},
token: '',
sudoers: [271096459,456642569,591929714,432729528,293861388,388628872,92027269,370300617,234006496,690734297,406160519,555923570,410295342,271913103,273713314,158598724,252376788,470460877,524963551,23663027,174189495,444730308,152405066,480991272,1040450749,491180611,492511185,445041211]
};
#!/usr/bin/env bash
[[ -z "$1" ]] && exit 1
ATDIR="/Users/shivam/android_tools"
cd ${ATDIR}
mkdir -p "$ATDIR/input"
# Reset to origin/HEAD
BNAME="$(git symbolic-ref HEAD 2>/dev/null)"
method to get app keyhash:
First declare following val with you app package name from manifest.
val appPackage = "com.XXX.XXX"
Now add below code to onCreate method of your activity and check logcat after running the app:
try {
val info: PackageInfo = packageManager.getPackageInfo(
appPackage,
package com.shivamkumarjha.myapp.persistence
import android.content.Context
import androidx.datastore.core.DataStore
import androidx.datastore.preferences.core.Preferences
import androidx.datastore.preferences.core.edit
import androidx.datastore.preferences.core.emptyPreferences
import androidx.datastore.preferences.core.preferencesKey
import androidx.datastore.preferences.createDataStore
import kotlinx.coroutines.flow.Flow
@ShivamKumarJha
ShivamKumarJha / ImageEditText.kt
Last active April 20, 2021 00:49 — forked from oianmol/UriAwareEditText.java
This EditText will support GBOARD for gifs and other attachments like "image/png", "image/gif", "image/jpeg","image/webp"
package com.example.app.ui
import android.content.Context
import android.os.Build
import android.os.Bundle
import android.util.AttributeSet
import android.view.inputmethod.EditorInfo
import android.view.inputmethod.InputConnection
import androidx.appcompat.widget.AppCompatEditText
import androidx.core.view.inputmethod.EditorInfoCompat
recyclerview.addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
super.onScrollStateChanged(recyclerView, newState)
when (newState) {
RecyclerView.SCROLL_STATE_DRAGGING -> {
Log.d(TAG, "dragging")
}
RecyclerView.SCROLL_STATE_IDLE -> {
Log.d(TAG, "idle")
}
@ShivamKumarJha
ShivamKumarJha / NetworkHelper.kt
Last active September 24, 2021 18:47
Check internet using ConnectivityManager. Supports API 16 and above.
import android.net.ConnectivityManager
import android.net.NetworkCapabilities
import android.os.Build
class NetworkHelper(private val connectivityManager: ConnectivityManager) {
fun isNetworkConnected(): Boolean {
var result = false
when {
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M -> {