Skip to content

Instantly share code, notes, and snippets.

View htto's full-sized avatar

Heiko Przybyl htto

  • Berlin, Germany
View GitHub Profile
diff --git a/nightwatch.json b/nightwatch.json
index 4cb8313..36734bf 100644
--- a/nightwatch.json
+++ b/nightwatch.json
@@ -12,7 +12,7 @@
"log_path" : "",
"port" : 4444,
"cli_args" : {
- "webdriver.chrome.driver" : "3rdparty/chromedriver-darwin"
+ "webdriver.chrome.driver" : "/usr/bin/chromedriver"
@htto
htto / ue3DrawRangeElements.c
Created July 8, 2016 14:34
ue3 glDrawRangeElements fixup
/**
* gcc -o ue3DrawRangeElements.so ue3DrawRangeElements.c -shared -fPIC -Wall -Wextra -g
*/
#define _GNU_SOURCE
#include <dlfcn.h>
#include <GL/gl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@htto
htto / steam_sdk.h
Last active August 29, 2015 14:26
Deadly30 achievement binary
/**
*
* Steam SDK information
* (c) Valve
*
*/
#include <stdint.h>
/* The lowest user interface version I've encountered so far. */
#define STEAMUSER_INTERFACE_VERSION "SteamUser014"
@htto
htto / jordan-kernel_sched_schedulebug_fix.patch
Last active August 29, 2015 14:01
Sched: Remove the flaky BUG() call in __schedule_bug and backport an upstream fix
From 76386ebeec4622c86216084e4b779002edbea87d Mon Sep 17 00:00:00 2001
From: htto <htto@xda-developers.forum>
Date: Fri, 9 May 2014 21:52:54 +0200
Subject: Fix deadlock from BUG in __schedule_bug()
Change-Id: Ib7f33018c19fe08c251f23408ecacf1e929e8670
---
kernel/sched.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
@htto
htto / jordan-kernel_apanic_wdt_guard.patch
Created May 9, 2014 08:28
Properly guard watchdog access in apanic_mmc.c
diff --git a/drivers/misc/apanic_mmc.c b/drivers/misc/apanic_mmc.c
index 2286250..f5dfb42 100644
--- a/drivers/misc/apanic_mmc.c
+++ b/drivers/misc/apanic_mmc.c
@@ -601,7 +601,9 @@ static void apanic_mmc_memdump(void)
!memdump_ctx.mmc_memdump_ops->panic_probe)
return;
+#ifdef CONFIG_OMAP_WATCHDOG_CONTROL
memdump_wdt_disable();
@htto
htto / device-moto-jordan-common_cmdline.patch
Created May 6, 2014 22:18
Split kernel cmdline into separate one for recovery and system; enable kpanic mmpart for system
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 1016b86..dd6751a 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -197,8 +198,9 @@ WLAN_MODULES:
arm-linux-androideabi-strip --strip-unneeded $(KERNEL_MODULES_OUT)/*
hboot:
- mkdir -p $(PRODUCT_OUT)/system/bootstrap/2nd-boot
- echo "$(BOARD_KERNEL_CMDLINE)" > $(PRODUCT_OUT)/system//bootstrap/2nd-boot/cmdline
@htto
htto / jordan-kernel_lock_debug.patch
Last active August 29, 2015 14:01
Fix build with lock debugging
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index adf2068..770f407 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -755,6 +755,9 @@ extern void rtnl_unlock(void);
extern int rtnl_trylock(void);
extern int rtnl_is_locked(void);
+// Shortcut taken from backport-include/linux/rtnetlink.h
+static inline int lockdep_rtnl_is_held(void) { return 1; }
@htto
htto / jordan-kernel_cmdline_mmcpart.patch
Last active August 29, 2015 14:00
Fix mmcpart kernel cmdline option
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index a9133a1..3fccc20 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -164,7 +164,7 @@ static int split(char *string, char **index_array, char pattern,
* build to gurantee no parts have the same name
*/
#define MMCPARTS_STR_LEN 512
-static void __init mmcpart_setup(char **arg)
+static int __init mmcpart_setup(char *arg)
@htto
htto / statusbar_transparency.patch
Last active August 29, 2015 13:57
Make statusbar transparent on low_ram (setprop persist.sys.force_transbar true)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
index cb17ac6..0074159 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
@@ -48,7 +48,8 @@ public class BarTransitions {
private final String mTag;
private final View mView;
- private final boolean mSupportsTransitions = ActivityManager.isHighEndGfx();
+ private final boolean mSupportsTransitions = ActivityManager.isHighEndGfx()
@htto
htto / incallui.patch
Last active August 29, 2015 13:57
Speeding up IncallUI
project packages/apps/InCallUI/
diff --git a/packages/apps/InCallUI/src/com/android/incallui/ContactInfoCache.java b/packages/apps/InCallUI/src/com/android/incallui/ContactInfoCache.java
index 4bbf8fa..ede7cb7 100644
--- a/packages/apps/InCallUI/src/com/android/incallui/ContactInfoCache.java
+++ b/packages/apps/InCallUI/src/com/android/incallui/ContactInfoCache.java
@@ -389,6 +389,9 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete
Log.v(TAG, "personUri is null. Just use unknown picture.");
photo = context.getResources().getDrawable(R.drawable.picture_unknown);
} else {
+ if (info.cachedPhoto != null) {