Skip to content

Instantly share code, notes, and snippets.

View z3ntu's full-sized avatar

Luca Weiss z3ntu

View GitHub Profile
@z3ntu
z3ntu / init.rc
Last active November 4, 2015 15:08
Contents of different files --- CM11 for Fairphone ---
# Copyright (C) 2012 The Android Open Source Project
#
# IMPORTANT: Do not create world writable files or directories.
# This is a common source of Android security bugs.
#
import /init.environ.rc
import /init.usb.rc
import /init.${ro.hardware}.rc
import /init.trace.rc
@z3ntu
z3ntu / TINF
Last active November 5, 2015 11:29
Bash script for TINF, PLEASE edit yours!
#!/bin/bash
#
# 3EHIF, Luca Weiss, 2015-11-05
#
read -p "Please enter the title: " title
echo "Please now enter lines, finish with entering ---"
p_part=""
@z3ntu
z3ntu / README.md
Last active December 5, 2018 12:57
Compile applications for Android
  1. Set your PATH so the Android NDK tools (arm-linux-androideabi-cpp, arm-linux-androideabi-gcc, and friends) are on PATH:
  $ echo $PATH
/opt/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin:
  /opt/android-sdk-macosx/tools/:/opt/android-sdk-macosx/platform-tools/:
  /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:
  /opt/X11/bin:/usr/local/MacGPG2/bin
  1. Ensure ANDROID_NDK_ROOT is set (this is an Android requirement, see
@z3ntu
z3ntu / mayaOnUbuntu.sh
Last active November 1, 2019 19:37 — forked from Era-Dorta/mayaOnUbuntu.sh
Shell script for installing Maya 2016 SP4. Tested on Ubuntu 15.10
#!/bin/bash
# Heith Seewald 2012
# Garoe Dorta 2015
# Luca Weiss 2015
# Also based on https://gist.github.com/MichaelLawton/ee27bf4a0f591bed19ac
# Feel free to extend/modify to meet your needs.
#### Lets run a few checks to make sure things work as expected.
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then
@z3ntu
z3ntu / android_configure.sh
Last active November 16, 2019 21:09 — forked from nddrylliog/android_configure.sh
Use this for cross-compiling native Applications for Android! Place this script preferably in ~/bin and add this folder to your path variable. Instead of using ./configure just call this script.
#!/bin/sh
# THIS SCRIPT IS FOR A STANDALONE TOOLCHAIN!!
# For more information please consult https://z3ntu.github.io/2015/12/12/Cross-compiling-native-linux-applications-for-android.html
# Don't forget to adjust this to your standalone toolchain path
export TOOLCHAIN_PATH=$HOME/Android/standalone-toolchain/
# This is just an empty directory where I want the built objects to be installed
export PREFIX=$HOME/Android/out/prefix
@z3ntu
z3ntu / UnityForArch.sh
Created December 18, 2015 08:47
Installs unity for arch
#!/bin/sh
sudo echo "***Starting script 'unity-arch.in'...***"
echo "==============================
Adding Unity repos to pacman.conf..."
echo '[Unity-for-Arch]' | sudo tee -a /etc/pacman.conf
echo 'SigLevel = Optional TrustAll' | sudo tee -a /etc/pacman.conf
echo 'Server = http://dl.dropbox.com/u/486665/Repos/$repo/$arch' | sudo tee -a /etc/pacman.conf
echo ' ' | sudo tee -a /etc/pacman.conf
echo '[Unity-for-Arch-Extra]' | sudo tee -a /etc/pacman.conf
@z3ntu
z3ntu / Editor.log
Created December 18, 2015 14:39
Log from Unity Editor 5.3.0f4 on Ubuntu
mono profile = '/opt/Unity/Editor/Data/Mono/lib/mono/2.0'
Initialize mono
Mono path[0] = '/opt/Unity/Editor/Data/Managed'
Mono path[1] = '/opt/Unity/Editor/Data/Mono/lib/mono/2.0'
Mono path[2] = '/opt/Unity/Editor/Data/UnityScript'
Mono path[3] = '/opt/Unity/Editor/Data/Mono/lib/mono/2.0'
Mono config path = '/opt/Unity/Editor/Data/Mono/etc'
Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56260
Desktop is 1920 x 1080 @ 60 Hz
build/tools/make_standalone_toolchain.py --arch arm --api 21 --stl gnustl -v --install-dir /home/luca/Android/standalone-toolchain
@z3ntu
z3ntu / updateall.sh
Created December 31, 2015 12:31
Script for updating programs with the source code from git repositories.
#!/bin/bash
# Script by github.com/z3ntu
for dir in */; do
echo "Updating $dir."
cd $dir
output="$(git pull)"
if [ "$output" != 'Already up-to-date.' ]; then
if [ -x "build.sh" ]; then
echo "Running buid.sh."