Skip to content

Instantly share code, notes, and snippets.

@luca020400
luca020400 / Android.mk
Last active October 26, 2023 08:55
ACDB IDs parser
#
# Copyright (C) 2016 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
#!/sbin/sh
# TODO: Add msm8929 support
aboot="/dev/block/bootdevice/by-name/aboot"
hyp="/dev/block/bootdevice/by-name/hyp"
rpm="/dev/block/bootdevice/by-name/rpm"
sbl1="/dev/block/bootdevice/by-name/sbl1"
tz="/dev/block/bootdevice/by-name/tz"
modem="/dev/block/bootdevice/by-name/modem"
char inData[256]; // Allocate some space for the string
char inChar = -1; // Where to store the character read
byte index = 0; // Index into array; where to store the character
void read_uart() {
while (Serial.available() > 0) {
if (index < 256) {
inChar = Serial.read(); // Read a character
inData[index] = inChar; // Store it
index++; // Increment where to write next
#!/usr/bin/env zsh
chromium_version="52.0.2743.98"
clean=0
supported_arch=(arm arm64 x86 x64)
usage() {
echo "Usage:"
echo " build_webview [ options ]"
echo
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c
index 9d207c2..bfd4f4e 100644
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c
@@ -5874,8 +5874,32 @@ VOS_STATUS hdd_release_firmware(char *pFileName,v_VOID_t *pCtx)
{
VOS_STATUS status = VOS_STATUS_SUCCESS;
hdd_context_t *pHddCtx = (hdd_context_t*)pCtx;
+ static char *WLAN_NV_FILE = NULL;
ENTER();
@cryzed
cryzed / fix-infinality.md
Last active August 31, 2024 13:05
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

diff --git a/core/binary.mk b/core/binary.mk
index 069a3dd85..84a2334d4 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -368,11 +368,12 @@ my_target_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_TARGET_GLOBAL
my_target_global_cppflags += $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_TARGET_GLOBAL_CPPFLAGS)
my_target_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_TARGET_GLOBAL_LDFLAGS)
ifeq ($(my_sdclang),true)
+ my_target_global_cflags += $(SDLLVM_AE_FLAG) -Wno-vectorizer-no-neon -O3 -fvectorize-loops
ifeq ($(strip $(my_cc)),)
@thewisenerd
thewisenerd / extract.py
Created September 29, 2018 23:32
extract kernel builtin_fw
#!/usr/bin/env python3
import argparse
import mmap
import os
parser = argparse.ArgumentParser(description='extract builtin_fw')
parser.add_argument('image', metavar='IMAGE', type=str,
help='kernel image file')
parser.add_argument('kallsyms', metavar='KALLSYMS', type=str,
diff -ru ims/smali/org/codeaurora/ims/ImsRegistrationImpl.smali ims-patched/smali/org/codeaurora/ims/ImsRegistrationImpl.smali
--- ims/smali/org/codeaurora/ims/ImsRegistrationImpl.smali 2019-11-03 15:20:22.379761792 +0100
+++ ims-patched/smali/org/codeaurora/ims/ImsRegistrationImpl.smali 2019-11-03 15:18:10.976342747 +0100
@@ -216,35 +216,3 @@
.line 53
return-void
.end method
-
-.method public setRadioTechASUS(I)V
- .locals 2
diff -ru qti-telephony-common.jar.out/smali/com/qualcomm/qti/internal/telephony/QtiGsmCdmaPhone.smali qti-telephony-common-patched.jar.out/smali/com/qualcomm/qti/internal/telephony/QtiGsmCdmaPhone.smali
--- qti-telephony-common.jar.out/smali/com/qualcomm/qti/internal/telephony/QtiGsmCdmaPhone.smali 2019-11-08 11:21:07.283916098 +0100
+++ qti-telephony-common-patched.jar.out/smali/com/qualcomm/qti/internal/telephony/QtiGsmCdmaPhone.smali 2019-11-08 11:21:47.060523492 +0100
@@ -1104,18 +1104,13 @@
.local v0, "radioCapController":Lcom/qualcomm/qti/internal/telephony/QtiRadioCapabilityController;
if-eqz v0, :cond_0
- .line 85
- invoke-virtual {p0, p1}, Lcom/qualcomm/qti/internal/telephony/QtiGsmCdmaPhone;->getAsusNwTypeFilter(I)I
-