Skip to content

Instantly share code, notes, and snippets.

@xiaolu
xiaolu / Android.mk
Created August 23, 2012 13:54
Screen snap for cwm recovery
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_SRC_FILES := \
gsnap.c
LOCAL_C_INCLUDES += \
external/libpng \
@xiaolu
xiaolu / events.c
Last active December 18, 2015 00:19
ui.c, minui/events.c /res/images/virtual_keys.png
/*
* Copyright (C) 2007 The Android Open Source 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
@xiaolu
xiaolu / graphics.c
Created August 19, 2013 07:30
i9505 graphics.c
/*
* Copyright (C) 2007 The Android Open Source 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
@xiaolu
xiaolu / 1.diff
Last active April 27, 2017 14:21
Use exfat modules for mount.
diff --git a/Android.mk b/Android.mk
index 26c441e..5d11f24 100644
--- a/Android.mk
+++ b/Android.mk
@@ -28,6 +28,10 @@ ifneq ($(TARGET_USE_CUSTOM_SECOND_LUN_NUM),)
common_cflags += -DCUSTOM_SECOND_LUN_NUM=$(TARGET_USE_CUSTOM_SECOND_LUN_NUM)
endif
+ifneq ($(KERNEL_EXFAT_MODULE_NAME),)
+ common_cflags += -DEXFAT_MODULE_NAME=\"$(KERNEL_EXFAT_MODULE_NAME)\"
@xiaolu
xiaolu / make_ext4fs.c
Created November 13, 2013 17:41
Fix lost+found directory selinux context for make_ext4fs().
/*
* Copyright (C) 2010 The Android Open Source 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
@xiaolu
xiaolu / Android.mk
Created December 6, 2013 08:50
gsnap static
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_SRC_FILES := \
gsnap.c
LOCAL_C_INCLUDES += \
external/jpeg \
@xiaolu
xiaolu / report.txt
Created April 30, 2014 17:51
Libtar & busybox tar compare
left(libtar): E:\123\1
right(busybox tar): E:\123\2xl
name (N) size (Z) CRC (C) mt (M) name (N) size (Z) CRC (C) mt (M)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
data.ext4.tar 2,323,406,848 96901A6C 2014/5/1 1:35:06 = data.ext4.tar 2,297,610,752 43897EF9 2014/5/1 1:35:42
\data 2,278,083,023 2014/4/30 21:48:28 \data 2,278,109,009 201
@xiaolu
xiaolu / mem.txt
Created May 1, 2014 16:05
Memory use libtar
E:\>adb shell busybox free
total used free shared buffers
Mem: 2909192 82720 2826472 0 1188
-/+ buffers: 81532 2827660
Swap: 0 0 0
-----------------------------------------------------------------------------------------
Start backup:
E:\>adb shell busybox free
@xiaolu
xiaolu / libpng_test.c
Last active August 29, 2015 14:21 — forked from niw/libpng_test.c
/*
* A simple libpng example program
* http://zarb.org/~gc/html/libpng.html
*
* Modified by Yoshimasa Niwa to make it much simpler
* and support all defined color_type.
*
* To build, use the next instruction on OS X.
* $ brew install libpng
* $ clang -lz -lpng15 libpng_test.c