cat /sys/block/mmcblk0/../../cid
因為 /sys 這個 node 是 ln,所以用 ../../
ref: http://stackoverflow.com/questions/3348643/how-to-read-the-sd-card-id-number
ubuntu 在 R40e 上 還有 Debian 在 Sempron 2600 上
cat /sys/block/mmcblk0/../../cid
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index b0a3fa0..abaecba 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -150,7 +150,7 @@ static int fbcon_set_origin(struct vc_data *); #define CURSOR_DRAW_DELAY (1) static int vbl_cursor_cnt; -static int fbcon_cursor_noblink; +static int fbcon_cursor_noblink=1; #define divides(a, b) ((!(a) || (b)%(a)) ? 0 : 1)
diff --git a/core/java/android/net/http/RequestQueue.java b/core/java/android/net/http/RequestQueue.java
index a31639f..a1f8f1b 100644
--- a/core/java/android/net/http/RequestQueue.java
+++ b/core/java/android/net/http/RequestQueue.java
@@ -261,7 +261,8 @@ public class RequestQueue implements RequestFeeder {
      */
     private synchronized void setProxyConfig() {
         NetworkInfo info = mConnectivityManager.getActiveNetworkInfo();
-        if (info != null && info.getType() == ConnectivityManager.TYPE_WIFI) {
+        //if (info != null && info.getType() == ConnectivityManager.TYPE_WIFI) {
+       if (false) {
             mProxyHost = null;
         } else {
             String host = Proxy.getHost(mContext);
adb shell
#sqlite3 /data/data/com.android.providers.settings/database/settings.db
#sqlite > INSERT INTO secure VALUES(99,'http_proxy','192.168.147.242:3128');
#.quit
private static final boolean DEBUG = true;
static final public String getHost(Context ctx) {
        ContentResolver contentResolver = ctx.getContentResolver();
        Assert.assertNotNull(contentResolver);
        String host = Settings.Secure.getString(
                contentResolver,
                Settings.Secure.HTTP_PROXY);
        if (host != null) {
            int i = host.indexOf(':');
            if (i == -1) {
                if (DEBUG) {
                    Assert.assertTrue(host.length() == 0);
                }
                return null;
            }
            return host.substring(0, i);
        }
        return getDefaultHost();
    }
/extsd/mke2fs -t ext4 /dev/block/mmcblk0p5
/extsd/busybox sleep 1
diff --git a/init/init.c b/init/init.c
index 21ded0e..380ec54 100755
--- a/init/init.c
+++ b/init/init.c
@@ -170,7 +170,9 @@ int wait_for_service(char *filename) {
         sprintf(tmp, "%d,%d", dup(fd), sz);
         add_environment("ANDROID_PROPERTY_WORKSPACE", tmp);
        /* redirect stdio to null */
-        zap_stdio();
+        //zap_stdio();
+       setsid();
+       open_console();
 
         setpgid(0, getpid());
        /* execute */
這樣就可以把 stdio 傳給 exec 的 program。在 console 上看到結果了。diff --git a/sh/Android.mk b/sh/Android.mk
index b5e5c38..a342244 100644
--- a/sh/Android.mk
+++ b/sh/Android.mk
@@ -33,7 +33,9 @@ LOCAL_MODULE:= sh
 
 LOCAL_CFLAGS += -DSHELL -DWITH_LINENOISE
 
-LOCAL_STATIC_LIBRARIES := liblinenoise
+LOCAL_STATIC_LIBRARIES := liblinenoise libc
+
+LOCAL_FORCE_STATIC_EXECUTABLE := true
 
 LOCAL_C_INCLUDES += system/core/liblinenoise
TARGET_TS_DEVICE := "mxc_ts"
LOCAL_CFLAGS += -DTS_DEVICE=$(TARGET_TS_DEVICE)
#define TS_INPUT_DEV DEV_(TS_DEVICE)
...
static const char dev_name[] = TS_INPUT_DEV;
...
    sprintf(param_path,
     "/sys/module/%s/parameters/calibration", dev_name);
    fd = open(param_path, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
  calibration array refers to
  (delta_x[0], delta_x[1], delta_x[2], delta_y[0], delta_y[1], delta_y[2], delta).
  Which generated by calibration service.
  In this driver when we got touch pointer (x', y') from PMIC ADC,
  we calculate the display pointer (x,y) by:
  x = (delta_x[0] * x' + delta_x[1] * y' + delta_x[2]) / delta;
  y = (delta_y[0] * x' + delta_y[1] * y' + delta_y[2]) / delta;