Skip to content

Instantly share code, notes, and snippets.

View TwizzyIndy's full-sized avatar
😔

Aung Khant Myo TwizzyIndy

😔
View GitHub Profile
@TwizzyIndy
TwizzyIndy / frida-spoof.js
Created January 24, 2021 07:55 — forked from jacopo-j/frida-spoof.js
Frida script to spoof and hide several Android identifiers
/* Utilities */
var RANDOM = function() {};
function _randomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function _randomHex(len) {
var hex = '0123456789abcdef';
@TwizzyIndy
TwizzyIndy / disable.sh
Last active November 18, 2020 08:22
Disable bunch of #$!@ in Big Sur - Forked from https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Normal Mode's Terminal.
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# Agents to disable
@TwizzyIndy
TwizzyIndy / lollipop.java
Created September 27, 2015 05:22 — forked from plateaukao/lollipop.java
How to detect foreground process name in Android with Lollipop
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public static String getForegroundProcess(Context context) {
String topPackageName = null;
UsageStatsManager usage = (UsageStatsManager) context.getSystemService(Context.USAGE_STATS_SERVICE);
long time = System.currentTimeMillis();
List<UsageStats> stats = usage.queryUsageStats(UsageStatsManager.INTERVAL_DAILY, time - 1000*1000, time);
if (stats != null) {
SortedMap<Long, UsageStats> runningTask = new TreeMap<Long,UsageStats>();
for (UsageStats usageStats : stats) {
runningTask.put(usageStats.getLastTimeUsed(), usageStats);