Most of what you need:
sudo apt install android-sdk android-sdk-platform-23
If you can't find it, just download Android Studio and abandon this guide.
git clone https://github.com/Shadowstyler/android-sdk-licenses.git
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
void hijack(uintptr_t *addr, uintptr_t *newa, uint8_t buf[4]) { | |
uint32_t temp = (uintptr_t)newa; | |
if (addr < newa) { | |
temp = (temp - 8) / 4; |
void assemble_b(uintptr_t *from, uintptr_t *to, uint8_t buf[4]) { | |
uint32_t temp = (uintptr_t)to; | |
// Assemble instruction based on location | |
// of new addr relative to old address | |
if (from < to) { | |
temp = (temp - 8) / 4; | |
memcpy(buf, &temp, 4); | |
} else { | |
temp = 0xffffff - ((from - to + 4) / 4); |
void *allocList_[1000];int allocn_=0;void *malloc_(long unsigned int n){ | |
void *x=malloc(n);allocList_[allocn_]=x;allocn_++;return x;}void autofree(){ | |
while (allocn_){allocn_--;free(allocList_[allocn_]);}} | |
#define malloc(x) malloc_(x) | |
#define exit(x) autofree(x);exit(x); |
Yes.
Kind of.
I'm not a lawyer, nor have I talked to one, but this is my analysis:
Copyright is a nightmare to work with. There are no garuntees
that a company won't sue you.
As for US law, "Reverse engineering (section 1201(f))"
This exception permits
# You may use this anywhere, if you link back to this page. | |
# Usage: | |
# $(call getMacro header.h MY_MAC %s) | |
# The macro will be 0 when it is undefined | |
# "Parse" C header, converting C macro to Make macro | |
# See https://gist.github.com/petabyt/898d3437decf65fc04fc50bd0e125362 | |
define importMacro | |
$(shell echo "#include <stdio.h>\n \ |
// Inspired by https://gist.github.com/laobubu/d6d0e9beb934b60b2e552c2d03e1409e | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <netdb.h> | |
#include <signal.h> | |
#define MAX_CONNECTION 100 | |
#define RESP_BUF_MAX 1000 |