Skip to content

Instantly share code, notes, and snippets.

View gss200610's full-sized avatar

Gilmar Silva Santos gss200610

View GitHub Profile
@gss200610
gss200610 / AppRestAssuredIT.java
Created January 24, 2025 14:31 — forked from Jet-C/AppRestAssuredIT.java
Rest-assured integration tests
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, classes = SpringTestApplication.class)
@TestInstance(Lifecycle.PER_CLASS)
@ActiveProfiles({ "integration" })
public class AppRestAssuredIT {
@Value("${local.server.port}")
private int ports;
@BeforeAll
public void setUp() {
@gss200610
gss200610 / AdbCommands
Created November 18, 2023 20:04 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@gss200610
gss200610 / edit-init-rc.md
Created November 16, 2023 14:56 — forked from ashutosh-mishra/edit-init-rc.md
How to run custom script from init.rc, How to Extract Android Kernel And Modify The Boot Ramdisk(Android 4+)

init.rc changes

init.rc changes to run any script Can be used to start any android application, service

on property:dev.bootcomplete=1
    exec - system system -- /system/bin/sh <custom script path>
    # exec - system system -- /system/bin/sh /data/local/bootscript/testservice.sh

Script can contains applications start, stop commands

@gss200610
gss200610 / default.prop
Created October 30, 2023 10:24
HOW TO: Modify boot.img to allow usb debugging from recovery adb
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
persist.sys.usb.config=adb
ro.adb.secure=0
@gss200610
gss200610 / java-path-variable-setup.md
Created September 22, 2023 22:30 — forked from Devendra0110/java-path-variable-setup.md
Path set up for java in fish

Before going ahead make sure you have installed java if not follow How To Install Java Development Kit 11 on Debian 10

In the above following article stop at Set Environment Variables

  1. copy the below code at the end of config.fish
## java 11 jdk

set --export JAVA_HOME (dirname (dirname (readlink -f (which java))))
set -gx PATH $JAVA_HOME $PATH
  1. Save the changes and exit your text editor.
@gss200610
gss200610 / archlinux_android
Created October 20, 2021 09:57 — forked from adumont/archlinux_android
ArchLinux for building Android
pacman -Sy
pacman -S --needed python2 openjdk6 perl git gnupg flex bison gperf zip unzip sdl wxgtk squashfs-tools ncurses libpng zlib libusb libusb-compat readline inetutils
pacman -S --needed gcc-multilib gcc-libs-multilib binutils-multilib libtool-multilib lib32-libusb lib32-libusb-compat lib32-readline lib32-glibc bash-completion lib32-zlib
Install yaourt (& package-query):
add to /etc/pacman.conf:
[archlinuxfr]
Server = http://repo.archlinux.fr/$arch
@gss200610
gss200610 / nosleep.sh
Created October 10, 2021 22:50
Completely disable sleep on any Mac
# Useful to prevent Macbooks to go to sleep when closing the lid instead of running tools that requires a Kernel Extension (e.g. InsomniaX) and more
# Before doing anything, save your current configuration using
pmset -g
# To disable sleep
sudo pmset -a sleep 0; sudo pmset -a hibernatemode 0; sudo pmset -a disablesleep 1;
# And to go back to normal
sudo pmset -a sleep 1; sudo pmset -a hibernatemode [original hibernatemode value]; sudo pmset -a disablesleep 0;
@gss200610
gss200610 / merge-xml-coverage.py
Created September 20, 2021 10:34 — forked from tgsoverly/merge-xml-coverage.py
Merge Cobertura XML's
import sys
import os
import xml.etree.ElementTree as ET
import logging
import re
from shutil import copyfile
from optparse import OptionParser
### This file came from the https://github.com/flow123d/flow123d repo they were nice enough to spend time to write this.
### It is copied here for other people to use on its own.
@gss200610
gss200610 / combine.py
Created September 20, 2021 10:33 — forked from DominicBM/combine.py
combine multiple xml files into one (Python 2.7)
import os, re
file = 'm384-import-11.xml'
filenames = ['M384_0201_output.xml','M384_0202_output.xml','M384_0203_output.xml','M384_0204_output.xml','M384_0205_output.xml','M384_0206_output.xml','M384_0207_output.xml','M384_0208_output.xml','M384_0209_output.xml','M384_0210_output.xml','M384_0211_output.xml','M384_0212_output.xml','M384_0213_output.xml','M384_0214_output.xml','M384_0215_output.xml','M384_0216_output.xml','M384_0217_output.xml','M384_0218_output.xml','M384_0219_output.xml','M384_0220_output.xml']
counter = 2
outputfile = file
for fname in filenames:
in_size = (os.stat(fname).st_size / 1000000)
@gss200610
gss200610 / BuildGuide.txt
Created September 19, 2021 22:38 — forked from masemoel/BuildGuide.txt
How to build a Q/R ROM from scratch under Ubuntu 20.04+
To build a A10/A11 (AOSP based-only) on Ubuntu 20.04+ (or based on it), there are four main steps:
(This guide is applicable for recoveries as well (like TWRP, OFRP or PBRP).)
#################################################################
# Step 1: Setup your environment #
#################################################################
****Setup Ubuntu and install the required tools to build Android****
sudo apt full-upgrade && sudo apt install build-essential ccache libncurses5 libssl-dev m4 unzip zip brotli && sudo apt install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev adb fastboot python python3.8 abootimg && sudo apt install ruby gem && sudo gem install rmega && sudo apt update && sudo apt full-upgrade