Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Lucas Zanela lucaszanella

🏠
Working from home
View GitHub Profile
View gist:11e8b5d128a27b106f9702fb13638f46
./adb shell cmd appops set com.whatsapp RUN_IN_BACKGROUND ignore
./adb shell cmd appops set com.yubico.yubioath RUN_IN_BACKGROUND ignore
./adb shell cmd appops set com.instagram.android RUN_IN_BACKGROUND ignore
./adb shell cmd appops set com.whatsapp RUN_IN_BACKGROUND
./adb shell cmd appops set com.zhiliaoapp.musically RUN_IN_BACKGROUND ignore
./adb shell cmd appops set com.tinder RUN_IN_BACKGROUND ignore
./adb shell cmd appops get piuk.blockchain.android RUN_IN_BACKGROUND
./adb shell cmd appops set piuk.blockchain.android RUN_IN_BACKGROUND ignore
./adb shell cmd appops set br.com.intermedium RUN_IN_BACKGROUND ignore
./adb shell cmd appops set bipa.app.bipa RUN_IN_BACKGROUND ignore
@lucaszanella
lucaszanella / gist:85ac2aaba12a09df383fb6ca42d1ca59
Created Feb 22, 2021
simple boinary file write tests C++
View gist:85ac2aaba12a09df383fb6ca42d1ca59
#include <iostream>
#include <fstream>
#include <vector>
int main()
{
std::fstream f;
std::string filePath = "file.txt";
f.open(filePath, std::ios_base::binary | std::ios_base::out | std::ios_base::in | std::ios_base::trunc );
if (!f.is_open()) {
View gist:c83234be17b0864d4450dd2aeb4258a2
ALOGV(TAG, "#####################################################################");
std::fstream f;
ALOGV(TAG, "original filePath: %s", filePath.c_str());
std::string filePath2 = "/storage/emulated/0/Android/data/com.stompai.flutter_app/files/something_3.txt";//filePath + "22w";
ALOGV(TAG, "gonna open filePath2: %s", filePath2.c_str());
f.open(filePath2, std::ios_base::binary | std::ios_base::in | std::ios_base::out);
if (f.is_open()) {
ALOGV(TAG, "is open");
} else {
ALOGV(TAG, "is closed");
View gist:c756b4a186ddcdfc095becb94db6efae
repo init -u https://android.googlesource.com/platform/manifest -b emu-master-dev --depth=1
repo sync -c -j8
cd external/qemu
python android/build/python/cmake.py [--target darwin_aarch64]
View gist:fe836df6cdec8af7b72d47a71ae37214
https://fettec.net/en/shop/fettec-motor-1303.6 - FETtec Motor 1303.6
https://fettec.net/en/shop/fettec-mini-aio-15a - FETtec Mini AIO 15A (controller + ESCS?)
View gist:0f5fa522e4561aa8f61e2089d6f013a4
boot.img format:
https://forum.xda-developers.com/t/howto-unpack-edit-and-repack-boot-images.443994/
partitions explanation:
https://forum.xda-developers.com/t/info-android-device-partitions-and-filesystems.3586565/
bootloader unlock possibility for some brands:
@lucaszanella
lucaszanella / x0vncserver.sh
Created Jan 6, 2021
x0vncserver for desktop
View x0vncserver.sh
x0vncserver -display :0 -localhost -passwordfile ~/.vnc/passwd
@lucaszanella
lucaszanella / make.sh
Created Dec 24, 2020
kernel compare 2
View make.sh
#This script will create a folder kernel_compare and download the first kernel in `kernel`, commit it, then download the second kernel on `kernel` also, and commit
mkdir kernel_compare
cd kernel_compare
mkdir kernel
#commit = 848ff3b146631bba895c487cd9104d094b987a47
git clone https://source.codeaurora.org/quic/la/kernel/msm-4.14
cd msm-4.14
@lucaszanella
lucaszanella / main.dart
Created Dec 24, 2020
StatefulWidget wont change
View main.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _MyAppState();
}
@lucaszanella
lucaszanella / make.sh
Created Dec 22, 2020
Script to compare 2 kernels in VSCode using either GitLens or GitGraph extensions
View make.sh
#This script will create a folder kernel_compare and download the first kernel in `kernel`, commit it, then download the second kernel on `kernel` also, and commit
mkdir kernel_compare
cd kernel_compare
mkdir kernel
wget -O android-mainline.tar.gz https://android.googlesource.com/kernel/common/+archive/refs/heads/android-4.14-stable.tar.gz
tar xvzf android-mainline.tar.gz -C kernel
rm android-mainline.tar.gz