原创 shell_android存儲設備測試

1.編輯腳本DdTest4Android.sh;用於測試存儲設備可靠性。 # !/bin/bash # file name: DdTest4Android.sh # for inand test; # use like: # DdTes

原创 javascript_漢諾塔

save as hanoi.html; then run in your web brewer <!DOCTYPE html> <html> <body> <script> document.write("<h1>Javascript

原创 android_ubuntu使用adb

1.下載android-sdk:http://developer.android.com/sdk/index.html 2.進入:sdk/platform-tools;可以看到adb 3.lsusb 4.設備打開調試模式,連接pc 5.l

原创 android_繪製鼠標

不需要修改framework直接java繪製。 package com.example.hellocursor; import android.os.Bundle; import android.os.Handler; import a

原创 android_mingw編譯ndk

1.下載mingw:http://sourceforge.net/projects/mingw/ 2.安裝mingw:1.建議默認位置,否則注意不要有空格;2.在Basic Setup中勾選除mingw32-gcc-ada和mingw32

原创 misc_VirtualBox共享剪貼板,拖放文件

1.設備-》安裝增強功能 2.如果ubuntu等,需要sudo執行,否則不成功。 3.控制-》設置-》共享文件夾 4.共享剪貼板:設置-》常規-》高級-》共享粘貼板,設置爲雙向(window host-》ubuntu device測試OK

原创 c_漢諾塔真相

輸出圖形的漢諾塔,蠻有意思。 其中的list.h是我從linux中提取的,參見:c_提取linux鏈表 #include "stdio.h" #include "stdlib.h" #include "list.h" ////////

原创 misc_測試磁盤cmd工具

1.目的:pc文件夾和u盤文件夾批量拷貝測試。運行環境:windows的cmd 2.配置文件:config.bat rem 文件名:config.bat rem 作用:配置路徑和次數 rem sour:設置原文件夾路徑 rem dest:

原创 android_移植memtester

1.下載memtester:http://pyropus.ca/software/memtester/ 2.解壓到android源代碼external目錄下。 3.使用下述Android.mk文件: # used to gen: mem

原创 android_手機住手

前提:基本會玩android source code 1.類似360手機助手/qq手機助手的pc端工具總自動彈出,非常反感 2.source code 中vi system/core/adb/adb.h #if ADB_HOST_ON_

原创 linux_隨機數

#include "stdio.h" #include "errno.h" #include <fcntl.h> int GetRandom(void *buf, int bytes) { int fd; int ret; fd

原创 git_合併幾個commit

合併最新n份提交 git rebase -i HEAD~n 例如合併最近5份提交 git rebase -i HEAD~5 合併從提交commit:  123456...到最新提交 git rebase -i 123456... 執

原创 python_漢諾塔

save as hanoi.py,; then run: #python hanoi.py 4 #!/bin/env python import sys import string def hanoi(floor, towerA, t

原创 ruby_漢諾塔

test in mac: save as hanoi.rb;then run: #ruby hanoi.rb 4 #! /usr/bin/ruby def hanoi(floor, towerA, towerB, towerC) i

原创 android_添加服務給應用使用

增加fakeled服務玩(aosp-4.4) 1.mkdir -p frameworks/base/bigbird/java/android/fakeled/ 2.vi frameworks/base/bigbird/java/andro