Skip to content

Instantly share code, notes, and snippets.

View FacuM's full-sized avatar

Facundo Montero FacuM

View GitHub Profile
@FacuM
FacuM / takescreenshot.bat
Created January 8, 2017 02:52
Take screenshots and download to your PC, then, remove them from the internal memory or sdcard.
@echo off
set NUMFILE=1
:1
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png
adb shell rm /sdcard/screen.png
move screen.png screen%NUMFILE%.png
set /a NUMFILE=%NUMFILE%+1
echo Screenshot taken.
pause
@FacuM
FacuM / main.cpp
Created January 11, 2017 04:33
Hello world example (Spanish)
#include <stdio.h>
/* Las funciones se declaran como enteros.*/
int main() {
/* Se escribe en una línea con printf. Nueva línea es \n */
printf ("Hola mundo!");
/* return 0 indica que, si el código pasa correctamente y llega hasta el final, el código de error DEBE ser 0 (es decir, ninguno).*/
return 0;
}
@FacuM
FacuM / backupboot.sh
Last active February 7, 2017 03:46
Backup harpia boot image
#!/bin/sh
printf "Backing up boot...\n"
dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img
if [ $? -eq 0 ]
then
printf "Complete, saved to /sdcard/boot.img\n"
exit 0
else
printf "Something went wrong. (permissions problem?)\n"
exit 1
@FacuM
FacuM / local_manifest.xml
Last active September 15, 2018 10:00
Carbon manifest for harpia, make sure to include on (sourceroot)/.repo/local_manifests . Special thanks to @eldainosor for his help on building this.
<!-- Using a custom CM remote to avoid editing and editing of this file -->
<remote name="losgit" fetch="https://github.com/LineageOS" />
<remote name="FacuM" fetch="https://github.com/FacuM" />
<remote name="Moto8916" fetch="https://github.com/moto8916" />
<!-- harpia stuff -->
<project path="device/motorola/harpia" name="android_device_motorola_harpia" revision="cr-5.1" remote="FacuM" />
<project path="device/motorola/msm8916-common" name="android_device_motorola_msm8916-common" revision="carbon_5.1" remote="FacuM" />
<project path="kernel/motorola/msm8916" name="android_kernel_motorola_msm8916-2" revision="exp5" remote="FacuM" />
@FacuM
FacuM / local_manifest.xml
Created July 21, 2017 01:34
OctOS for harpia, required modifications. Put 'local_manifest' on .repo/local_manifests.
<?xml version="1.0" encoding="UTF-8"?> <manifest>
<!-- Remote names -->
<remote name="aidonnou"
fetch="https://github.com/aidonnou-surnia" />
<!-- Using a custom CM remote to avoid editing and
editing of this file -->
<remote name="losgit"
fetch="https://github.com/LineageOS" />
<!-- muppets remote just in case -->
<remote name="tehmuppets"
@FacuM
FacuM / local_manifest.xml
Created July 21, 2017 03:43
LineageOS OMS manifest.
<?xml version="1.0" encoding="UTF-8"?> <manifest>
<!-- Remote names -->
<remote name="aidonnou" fetch="https://github.com/aidonnou-surnia" />
<!-- Using a custom CM remote to avoid editing and editing of this file -->
<remote name="losgit" fetch="https://github.com/LineageOS" />
<!-- muppets remote just in case -->
<remote name="tehmuppets" fetch="https://github.com/themuppets" />
<!-- let's get mike a place -->
<remote name="mike-q" fetch="https://github.com/MikeUYSCUTI/" /> <!-- bring the
0wl -->
@FacuM
FacuM / local_manifest.xml
Last active July 25, 2017 08:26
OmniROM manifest for harpia. Thanks to @eldainosor and @DroidFreak32.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- harpia stuff -->
<project path="device/motorola/harpia" name="FacuM/android_device_motorola_harpia" revision="omni-7.1" remote="github" />
<project path="device/motorola/msm8916-common" name="FacuM/device_motorola_msm8916-common" revision="ng7.1" remote="github" />
<project path="kernel/motorola/msm8916" name="LineageOS/android_kernel_motorola_msm8916" revision="cm-14.1" remote="github" />
<!-- dependencies (supposedly not needed) -->
<project path="vendor/motorola" name="TheMuppets/proprietary_vendor_motorola" revision="cm-14.1" remote="github" />
<project path="device/qcom/sepolicy" name="android_device_qcom_caf-sepolicy" revision="android-7.1" remote="omnirom" />
<project path="device/qcom/common" name="LineageOS/android_device_qcom_common" revision="cm-14.1" remote="github" />
@FacuM
FacuM / jenkins_los-oms.sh
Last active September 21, 2017 05:46
LOS-OMS build script for Jenkins job.
#!/bin/bash
mkdir -p $WORKSPACE/bin
mkdir -p $WORKSPACE/los
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > $WORKSPACE/bin/repo && chmod a+x $WORKSPACE/bin/repo
export CCACHE_DIR=$WORKSPACE/.ccache
export USE_CCACHE=1
export TO_OR=$(nproc --all)
# Resize the Java Heap size
export _JAVA_OPTIONS="-Xmx4096m"
# Resize the Jack Heap size
@FacuM
FacuM / local_manifest.xml
Created July 24, 2017 05:11
XenonHD ROM manifest for harpia.
<?xml version="1.0" encoding="UTF-8"?> <manifest>
<!-- Remote names -->
<!-- Using a custom CM remote to avoid editing and editing of this file -->
<remote name="losgit" fetch="https://github.com/LineageOS" />
<!-- Just my remote setup -->
<remote name="facuarmo" fetch="https://github.com/FacuM" />
<!-- muppets remote just in case -->
<remote name="themuppets" fetch="https://github.com/themuppets" />
<!-- let's get mike a place -->
<remote name="mike-q" fetch="https://github.com/MikeUYSCUTI/" /> <!-- bring the
@FacuM
FacuM / jenkins_xenonhd.sh
Created July 24, 2017 06:35
XenonHD build script for Jenkins job.
#!/bin/bash
mkdir -p $WORKSPACE/bin
mkdir -p $WORKSPACE/xenon
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > $WORKSPACE/bin/repo && chmod a+x $WORKSPACE/bin/repo
export CCACHE_DIR=$WORKSPACE/.ccache
export USE_CCACHE=1
export TO_OR=$(nproc --all)
#export PATH=$PATH:$WORKSPACE/xenon/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin
#export PATH=$PATH:$WORKSPACE/xenon/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin
# Resize the Java Heap size