Skip to content

Instantly share code, notes, and snippets.

Avatar
📚
Studding

Erfan Abdi erfanoabdi

📚
Studding
View GitHub Profile
View bingwallpaper_mac.sh
#!/bin/bash
# this script is not written by me. Just using it and sharing it here.
# export DBUS_SESSION_BUS_ADDRESS environment variable useful when the script is set as a cron job
#PID=$(pgrep gnome-session)
#export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)
# $bing is needed to form the fully qualified URL for
@erfanoabdi
erfanoabdi / griffin.json
Last active Mar 21, 2017
Moto Z MultiRom Json
View griffin.json
{
"status": "ok",
"date": "2016-12-30",
"commands": "",
"gpg": false,
"devices": [{
"files": [{
"url": "https://qc3.androidfilehost.com/dl/xnpoeOTGwtloxLmGLzWdCg/1490340719/529152257862712557/multirom-20170321-v33b-UNOFFICIAL-griffin.zip",
"version": "33b",
"type": "multirom",
@erfanoabdi
erfanoabdi / sparse_convertor.sh
Created Aug 6, 2017
sparseChunks to image Convertor for motorola images
View sparse_convertor.sh
#!/bin/sh
#SparseChunks to image Convertor for motorola images by Erfan Abdi
#special thanks to superR for header removal script
#make sure you have only one image with sparse chunks (system or oem)
echo "Converting all SparseChunks to Raw Image"
./simg2img *chunk* system.img.raw
echo "Removing Moto Header"
offset=$(LANG=C grep -aobP -m1 '\x53\xEF' system.img.raw | head -1 | gawk '{print $1 - 1080}')
dd if=system.img.raw of=system_moto.img ibs=$offset skip=1 2>&1
View proprietary-files.txt
?lib64/android.hardware.wifi@1.0.so
?lib/android.hardware.nfc@1.0.so
?lib64/android.hardware.nfc@1.0.so
?lib64/libtinyalsa.so
?lib/libtinyalsa.so
?lib64/android.hardware.radio@1.0.so
?lib/android.hardware.radio@1.0.so
?lib64/libcap.so
?lib/libcap.so
?lib64/android.hardware.biometrics.fingerprint@2.1.so
View testpropfile.sh
#/bin/sh
proptxt="$1"
find="$2"
while read -r line
do
[[ $line = \#* ]] && continue
[ -z "$line" ] && continue
if [[ $line = '-'* ]]
View getpropfile.sh
#/bin/sh
proptxt="$1"
dirsrc="$2"
dirdis="$3"
while read -r line
do
[[ $line = \#* ]] && continue
[ -z "$line" ] && continue
View fetchblobs.sh
#/bin/sh
proptxt="$1"
URL="$2"
dirdis="$3"
while read -r line
do
[[ $line = \#* ]] && continue
[ -z "$line" ] && continue
if [[ $line = '-'* ]]
View LightsService.java
/* * Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
View packsparseimg.go
package main
import (
"encoding/xml"
"flag"
"fmt"
"io"
"io/ioutil"
"os"
"strings"
View sony_advanced_menu.py
#!/usr/bin/python
import sys, struct
VSS_OFFSET = 0x351048
VSS_SIZE = 0x00ffb8
PATCH_OFFSET = 0x258
PATCH_VALUE = 0x01
PATCH_VARIABLE = u"Setup"