Skip to content

Instantly share code, notes, and snippets.

View Geofferey's full-sized avatar
🤓
OnePlus 8T time

Geofferey Eakins Geofferey

🤓
OnePlus 8T time
  • NETLABWORK
  • USA
View GitHub Profile
#!/bin/sh -e
PATH=$PATH:/usr/sbin:/usr/bin
hostname=somehost@v6.army
device=$2
token=blahblah
file=/tmp/.dynv6.addr6
bind_ip=192.0.0.1
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* This extremely simple program allows users/accounts to enable and disable wakelocks on Android based devices by to writing arbitray strings to /sys/power/wake_lock & /sys/power/wake_unlock.
Use case:
On my device I am running a service inside of a chroot as a system account. Because said service runs under a restrictive account and not root it can not write to /sys/power/wake_* even when adding the sys account to the aid_wakelock Adroid group. Instead of stupidly allowing a system account to run commands as root using sudo or some other means that would almost certainly grant more capabilities than required I wrote this program.
@Geofferey
Geofferey / radeon_bios.c
Created May 15, 2020 09:27
A patch to allow loading radeon graphics adapter bios from /lib/firmware/radeon/vbios.bin
/*
This is a simple patch that will allow Radeon graphics adapters to function in Linux VMs running under ESXi
File is located in drivers/gpu/drm/radeon/radeon_bios.c
*/
//* Add this line after other includes
#include <linux/firmware.h>
//* Add this function to file
static bool radeon_read_bios_from_firmware(struct radeon_device *rdev)
#!/bin/bash
## A simple session chooser for NX virtual desktops written using Zenity dialog boxes.
## Change the node.cfg default desktop to thid script
# DefaultDesktopCommand "/usr/bin/nx-session-choose.sh
## This script should easily be adaptable to suit ones needs.
sleep 4.5
export NX_SESSION=1
@Geofferey
Geofferey / keybase.md
Created October 18, 2019 05:14
Identify ones self to keybase

Keybase proof

I hereby claim:

  • I am geofferey on github.
  • I am geofferey (https://keybase.io/geofferey) on keybase.
  • I have a public key ASCJPOri7ZCDXpxJ7UVINNjqXDAg-pAm0fWeSYnc3j6VPgo

To claim this, I am signing this object:

@Geofferey
Geofferey / lineage-system.rc
Last active October 10, 2019 03:43
lineage/vendor/lineage/prebuilt/common/etc/init/lineage-system.rc (run in magisk context)
# LineageOS core functionality
on init
export ANDROID_CACHE /cache
export TERMINFO /system/etc/terminfo
on post-fs-data
mkdir /cache/recovery 0770 system cache
# Run sysinit
start sysinit
@Geofferey
Geofferey / build-error.log
Created September 28, 2019 03:30
Build error when building prima module moto ocean
file included from ../../../../../../kernel/motorola/msm8953/drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c:64:
../../../../../../kernel/motorola/msm8953/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_tdls.h:529:39: error: unknown type name 'eTDLSSupportMode'
eTDLSSupportMode tdls_mode)
^
../../../../../../kernel/motorola/msm8953/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_tdls.h:537:1: error: unknown type name 'tdlsConnInfo_t'
tdlsConnInfo_t *wlan_hdd_get_conn_info(hdd_context_t *pHddCtx,
^
../../../../../../kernel/motorola/msm8953/drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c:4697:22: error: no member named 'MFPCapable' in 'struct tagCsrRoamProfile'
roam_profile->MFPCapable = roam_profile->MFPEnabled;
~~~~~~~~~~~~ ^
@Geofferey
Geofferey / start-service.sh
Created August 28, 2019 08:47
Start Android App Service at boot using init.d
#!/system/bin/sh
until [[ $(getprop sys.boot_completed) = 1 ]] && [[ $(getprop dev.bootcomplete) = 1 ]] && [[ $(getprop service.bootanim.exit) = 1 ]] && [[ $(getprop init.svc.bootanim) = stopped ]] && [[ -d /sdcard/Android ]]; do
sleep 3
log "[init.d] - Waiting for boot animation exit & data decryption to complete before continuing..."
done
#!/system/xbin/bash
## A simple set of iptables firewall rules to
# to block incoming connevtions on rooted
# Android devices.
## Place this script in /su.d or /etc/init.d
# to run at startup.
## Firat perform several checks to confirm
@Geofferey
Geofferey / adb_pattern_input-sailfish.sh
Created October 25, 2018 08:23
inputs unlock pattern via adb, ssh or terminal on Google Pixel (sailfish)
#!/system/xbin/bash
#
# Google Pixel Pattern Input
# OG Author: Matt Wilson
# Modified for Pixel aka sailfish
# By: Geofferey Eakins
# License: Free to use, modify and share
#
# This script sends simulated touch input for
# remotely swiping pattern on a Google Pixel