Skip to content

Instantly share code, notes, and snippets.

View hfutxqd's full-sized avatar
💻
working

Fishand hfutxqd

💻
working
View GitHub Profile
@hfutxqd
hfutxqd / OVERVIEW.TXT
Last active March 17, 2024 23:30
adb protocol
Implementation notes regarding ADB.
I. General Overview:
The Android Debug Bridge (ADB) is used to:
- keep track of all Android devices and emulators instances
connected to or running on a given host developer machine
- implement various control commands (e.g. "adb shell", "adb pull", etc.)
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
def get_file_dir_path(drive, file, files_map):
if 'parents' in file and len(file['parents']) > 0:
if file['parents'][0]['isRoot']:
return file['title']
parent_title = get_file_dir_path(drive, files_map[file['parents'][0]['id']], files_map)
return parent_title + '/' + file['title']
#!/bin/bash
BASE_URL="https://android.googlesource.com"
BRANCH="android10-release"
SCRIPT_DIR=`dirname "$BASH_SOURCE"`
download_snapshot() {
PROJECT_NAME=${1}
FILE_NAME=${2}
FILE=${SCRIPT_DIR}/${FILE_NAME}-refs_heads_${BRANCH}.tar.gz
echo "Downloading $FILE ..."
/**
It should be launch earlier in order to be aware of a maximun
quantity of file descriptors.
@author @FrenchYeti
*/
Java.perform(function() {
// ============= Config
@hfutxqd
hfutxqd / PKGBUILD
Created December 3, 2019 12:59 — forked from naetherm/PKGBUILD
hsakmt-roct
# Maintainer: Olaf Leidinger <oleid@mescharet.de>
pkgname=hsakmt-roct
pkgver=2.9.0
pkgrel=2
pkgdesc="Radeon Open Compute Thunk Interface"
_gitdir=ROCT-Thunk-Interface
arch=('x86_64')
url="https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface"
license=('X11/MIT')
groups=()
@hfutxqd
hfutxqd / PKGBUILD
Created December 3, 2019 03:37 — forked from naetherm/PKGBUILD
hcc
# Submitter: Olaf Leidinger <oleid@mescharet.de>
# Maintainer: Jakub Okoński <jakub@okonski.org>
# Maintainer: Rigo Reddig <rigo.reddig@gmail.com> ;)
pkgname=hcc
pkgver=2.10.0
pkgrel=1
pkgdesc="HCC is an Open Source, Optimizing C++ Compiler for Heterogeneous Compute"
arch=('x86_64')
url="https://github.com/RadeonOpenCompute/hcc"
license=('NCSAOSL')
FROM ubuntu:16.04
RUN sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list && \
sed -i 's/security.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list
WORKDIR /lede
RUN apt-get update && \
apt-get -y install build-essential \
@hfutxqd
hfutxqd / MyHttpInjector.kt
Created June 13, 2019 11:24
simple http injector sample for netbare
package com.android.netbare
import android.text.TextUtils
import android.util.Log
import com.github.megatronking.netbare.http.HttpBody
import com.github.megatronking.netbare.http.HttpRequest
import com.github.megatronking.netbare.http.HttpResponse
import com.github.megatronking.netbare.injector.InjectorCallback
import com.github.megatronking.netbare.injector.SimpleHttpInjector
import java.io.ByteArrayInputStream