Skip to content

Instantly share code, notes, and snippets.

@checko
checko / GistTest
Created May 29, 2012 01:23
Gist Test ,中文
測試項目..
@checko
checko / gist:2822067
Created May 29, 2012 01:35
TEST sourcecode format,
/*
* Copyright 2004-2011 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
@checko
checko / log_enable_wifi_hotspot
Created May 30, 2012 09:19
logcat of enabling wifi hotspot
E/WifiService( 2407): ath: load Wi-Fi driver for AP mode.
set_cpu_freq, wp 0
I/wlan_tool( 3394): loadAPdriver+
I/wlan_tool( 3395): AP wifi loading
I/wlan_tool( 3399): Try to load AP driver with ifname=wlap0 devmode=ap
AR6000: configuration opcode 7 is only used for RTOS systems, not Linux systems
AR6K: ** HIF layer does not support scatter requests (17)
W/Netd ( 2328): action=5, ifawmi_control_rx() : Unknown id 0x101e
@checko
checko / gist:2835466
Created May 30, 2012 10:50
confis.xml -- tetherable wifi interface name
<string-array translatable="false" name="config_tether_wifi_regexs">
<item>"wlap0"</item>
</string-array>
@checko
checko / gist:2908714
Created June 11, 2012 06:18
Example : Android.mk -- build static & share library
# ========================================================
# libc.a
# ========================================================
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
$(libc_arch_static_src_files) \
$(libc_static_common_src_files) \
bionic/dlmalloc.c \
bionic/malloc_debug_common.c \
@checko
checko / gist:2908733
Created June 11, 2012 06:28
diff to buiild mke2fs static
diff --git a/e2fsck/Android.mk b/e2fsck/Android.mk
index e420740..6bcc87f 100644
--- a/e2fsck/Android.mk
+++ b/e2fsck/Android.mk
@@ -41,7 +41,7 @@ LOCAL_CFLAGS := -O2 -g -W -Wall \
LOCAL_PRELINK_MODULE := false
-include $(BUILD_SHARED_LIBRARY)
+include $(BUILD_STATIC_LIBRARY)
@checko
checko / gist:2909197
Created June 11, 2012 09:08
mount and run script on external sd
#include <sys/mount.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
int main(int argc,char **argv)
{
int fd;
struct stat s;
@checko
checko / gist:2969967
Created June 22, 2012 03:14
get repo from google
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ./repo
<string name="js_dialog_title" msgid="8143918455087008109">"「<xliff:g id="TITLE">%s</xliff:g>」的網頁指出:"</string>
private String getJsDialogTitle(String url) {
String title = url;
if (URLUtil.isDataUrl(url)) {
// For data: urls, we just display 'JavaScript' similar to Safari.
title = mContext.getString(R.string.js_dialog_title_default);
} else {
try {
URL aUrl = new URL(url);
// For example: "The page at 'http://www.mit.edu' says:"
title = mContext.getString(R.string.js_dialog_title,