Skip to content

Instantly share code, notes, and snippets.

View MagneFire's full-sized avatar
🔥

MagneFire MagneFire

🔥
View GitHub Profile
@MagneFire
MagneFire / nemo_code.py
Last active October 13, 2024 19:20
nemo open in code extension. Open vscode in the current directory using the Ctrl+Alt+T keyboard shortcut.
#!/usr/bin/python3
# -*- coding: UTF-8 -*-
__author__ = "Darrel Griët"
__maintainer__ = "Darrel Griët <[email protected]>"
__version__ = "1.0"
__appname__ = "nemo-code"
__app_disp_name__ = "Nemo Code"
__website__ = "http://github.com/linuxmint/nemo-extensions"
@MagneFire
MagneFire / koi-gps-commands.md
Last active March 2, 2023 21:37
`koi` GPS commands

GPS commands for koi (and probably medaka too)

The commands below are executed in order starting at the function: void start_gps2(uint32_t fd, uint8_t* result_buffer).

result_buffer is a 14 byte buffer that's used to store command responses.

Power

#POWER,0\r\n
@MagneFire
MagneFire / aos-porting-notes.md
Last active July 31, 2023 21:09
AsteroidOS - Random porting notes

Ray

  • When using the stock kernel config on ray and booting to debug-ramdisk, the watch remains 'stuck'. Likely due to an kernel config mishap for configuring the USB adb mode.

hoki

The port is based on the beluga port (Android 9). Using a system and vendor dump provided via XDA.

Android R

#!/bin/bash
wf=`find . -maxdepth 1 -type d -not -name ".*" -exec echo {} \;`
for i in ${wf}; do
echo "require unofficial-watchface.inc" > "${i:2}_git.bb"
done
cat << EOF > unofficial-watchfaces_git.bb
@MagneFire
MagneFire / new_layer.sh
Created November 4, 2021 14:49
Easily create a new layer for a new smartwatch (AsteroidOS).
#!/bin/bash
SRC="$1"
DST="$2"
echo $PWD
if [ -d "meta-$DST-hybris/" ]; then
echo "Destination layer (meta-$DST-hybris) already exists!"
exit
fi
#!/bin/bash
set -x
dump_file=$1
if [[ -z "$dump_file" ]]; then
echo "No dump provided assuming \"mmcblk0\""
dump_file="mmcblk0"
fi
@MagneFire
MagneFire / compile
Created January 27, 2021 21:05
PowerHAL testing
. /usr/local/oecore-x86_64/environment-setup-armv7vehf-neon-oe-linux-gnueabi
arm-oe-linux-gnueabi-gcc -march=armv7ve -mfpu=neon -mfloat-abi=hard --sysroot=/usr/local/oecore-x86_64/sysroots/armv7vehf-neon-oe-linux-gnueabi -I<LOCATION TO ANDROID HEADERS> -o powerhal-test powerhal-test.c -lhardware
We couldn’t find that file to show.
This file has been truncated, but you can view the full file.
HOOKS hooks.c:3182 (__hybris_linker_init) DEBUG: Linker initialization
HOOKS hooks.c:3085 (get_android_sdk_version) DEBUG: Using SDK API version 23
HOOKS hooks.c:3228 (__hybris_linker_init) DEBUG: Loading linker from /usr/lib/libhybris/linker/mm.so..
[ linking /usr/libexec/hal-droid/system/lib/libGLESv2.so ]
[ linking /usr/libexec/hal-droid/system/lib/libcutils.so ]
[ linking /usr/libexec/hal-droid/system/lib/libutils.so ]
[ linking /usr/libexec/hal-droid/system/lib/liblog.so ]
[ linking /usr/libexec/hal-droid/system/lib/libEGL.so ]
[ linking /usr/libexec/hal-droid/system/lib/libdsyscalls.so ]