Command | Purpose |
---|---|
fastboot devices |
Lists attached devices, along with their serial number |
fastboot oem unlock |
Unlocks bootloader on most phones |
fastboot oem unlock UNLOCK_CODE |
Use this if you have an unlock code |
fastboot flashing unlock |
May be needed on older devices and some weird mtk phones (Tecno ke5k needed this for some reason) |
fastboot flash PARTITION_NAME PATH_TO_IMAGE |
Flashes the partition with the image file |
--disable-verity --disable-verification |
Add to a vbmeta flash command to disable verified boot |
fastboot erase PARTITION NAME |
Erases the partition USE WITH CAUTION |
fastboot -w |
cmake_minimum_required(VERSION 3.16.3) | |
project(cppefi C CXX) | |
if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) | |
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") | |
endif() | |
if (NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY) | |
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") | |
endif() |
Command:
$ fastboot help
Output:
usage: fastboot [OPTION...] COMMAND...
flashing:
// Add PNG Image Watermark on an Image using C# | |
using (Watermarker watermarker = new Watermarker("filePath/image.png")) | |
{ | |
using (ImageWatermark watermark = new ImageWatermark("filePath/watermarkLogo.png")) | |
{ | |
// Set Watermark Properties | |
watermark.X = 20; | |
watermark.Y = 80; | |
// Add watermark on image file and save the output | |
watermarker.Add(watermark); |
In this gist I show how to disassemble and modify a Linux executable binary to change the body of a function. This will allow you to control how a binary behaves, even when you don't have access to the source code and you can't recompile it.
In my case, I was asked to try and bypass the protection mechanism implemented. The protection mechanism implemented was meant to only allow a binary to be run in presence of a valid license.
So basically my activity involved:
- Finding the function which performs the protection check
- Disassembling the binary
The CTREE is built from the optimized microcode (maturity at CMAT_FINAL
), it represents an AST-like tree with C statements and expressions. It can be printed as C code.
from idaapi import PluginForm | |
from PyQt5 import QtCore, QtGui, QtWidgets | |
import sip | |
class MyPluginFormClass(PluginForm): | |
def OnCreate(self, form): | |
""" | |
Called when the widget is created | |
""" |
Note: This gist may be outdated, thanks to all contributors in comments.
adb
is the Android CLI tool with which you can interact with your android device, from your PC
You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.
Don't hesitate to read comments, there is useful tips, thanks guys for this !
THIS GIST IS EXTREMELY OBSOLETE. DO NOT FOLLOW THESE INSTRUCTIONS. SERIOUSLY.
IF YOU IGNORE THE ABOVE WARNING, YOU AGREE IN ADVANCE THAT YOU DIDN'T GET THESE INSTRUCTIONS FROM ME, THAT I WARNED YOU, AND THAT I RESERVE THE RIGHT TO POINT AND LAUGH MOCKINGLY IF AND WHEN SOMETHING BREAKS HORRIBLY.
I'll do a write-up of current custom-kernel procedures over on Random Bytes ( https://randombytes.substack.com/ ) one day soon.