본문 바로가기

개발 개발/Android

git diff 보다 편리하게 git change 보기 출처 : http://blog.daum.net/bluebread/15 안드로이드에서 git을 사용하는데 적응이 안되는 부분이 변경사항을 보는 것입니다.(물론 gerrit을 사용하는 환경이라면 또다른 이야기입니다.) araxis merge 나 beyond compare 와 같은 디렉토리 비교툴에 익숙하시다면, git diff의 결과물이 낮설겁니다. git diff 의 표시형식은 다음과 같이 - + 로 추가 삭제된 내용을 표시합니다. 이런 diff 형식이 낮선 분들은 git difftool을 사용하여 다음과 같은 좌우로 비교창을 열어 볼 수도 있습니다. (vimdiff를 사용한 예) 위에서는 vimdiff를 사용하였지만, git difftool은 실행할 파일을 지정할 수가 있습니다. 이 기능을 이용하여 (g.. 더보기
fb2png fb를 png로 32bit framebuffer를 png로 바꾸는 perl scriptex) cat /dev/graphics/fb0 > /sdcard/fb0.dat./fb2png 768 1024 screen3.png#!/usr/bin/perl -w $w = shift || 240; $h = shift || 320; $pixels = $w * $h; open OUT, "|pnmtopng" or die "Can't pipe pnmtopng: $!\n"; printf OUT "P6%d %d\n255\n", $w, $h; while ((read STDIN, $raw, 4) and $pixels--) { $long = unpack('L', $raw); print OUT pack("C3", ($long & 0x000.. 더보기
ioctl shell command in system bin $ ioctl -h ioctl -h ioctl [-l ] [-a ] [-rdh] -l Length of io buffer -a Size of each argument (1-8) -r Open device in read only mode -d Direct argument (no iobuffer) -h Print help I tried on Tiny6410. Using ioctl one can turn on and off the leds To turn on led3 # ioctl -d /dev/leds 1 3sending ioctl 0x1 0x03 0x00 0x00 0x00return buf: 03 00 00 00 To tun off led3 # ioctl -d /dev/leds 0 3sending ioct.. 더보기
안드로이드 로그뷰어(LogViewer for android) 로그 보는데 이만한게 없다.커널로그도 되고 ini 파일을 편집해서 자기가 원하는데로 커맨드를 추가 할수도 있다.하기 주소에서 받으면 된다.http://blog.naver.com/iookill/140135139931 하기는 내가 쓰는 LogFilterCmd.ini 내용CMD_COUNT=10CMD_0=shell cat /proc/kmsgCMD_1=logcat -v time -b mainCMD_2=logcat -v time -b radioCMD_3=logcat -v time -b eventsCMD_4=logcat -v time -b systemCMD_5=logcat -v time -b main -b radio -b system -b eventsCMD_6=logcat -v time -b main -b syste.. 더보기
recovery 디버그 메세지를 커널 메세지로 보고 싶을때 기본적으로 리커버리 종료시 "/cache/recovery/log" 에 저장된다.만약 recovery 디버그 메세지를 커널 메세지로 실시간으로 보고 싶을때 하기처럼 바꿔주면 된다.static const char *TEMPORARY_LOG_FILE = "/tmp/recovery.log"; 를static const char *TEMPORARY_LOG_FILE = "/dev/kmsg"; 로 Tip) user 영역에서 커널 메세지를 찍고 싶을땐 /dev/kmsg에 써주면 된다. 더보기
Android New Gingerbread API: StrictMod http://www.androidpub.com/1123776 Android New Gingerbread API: StrictModehttp://android-developers.blogspot.com/2010/12/new-gingerbread-api-strictmode.html[이 포스트는 어플리케이션 반응 속도에 광적으로 집착하는 Brad Fitzpatrick 에 의해 작성되었습니다. - Tim Bray] 배경 이야기 구글의 장점 중 하나는 바로 '20% 시간' 제도 입니다. 20%의 시간 만큼 여러분이 원하는 프로젝트를 진행할 수 있는 제도이지요. 처음 구글에 입사했을 때, 여기 저기 돌아다니며, 저는 7개의 20% 프로젝트를 진행하고 있다고 농담을 하곤 했습니다. 그리고 그 중 하나가 바로 안드로이.. 더보기
android reboot http://source-android.frandroid.com/system/core/libcutils/android_reboot.c 특별히 셋팅하지 않는 이상 sync()와 remount_ro()를 수행한뒤 리부팅을 한다. int android_reboot(int cmd, int flags, char *arg) { int ret; if (!(flags & ANDROID_RB_FLAG_NO_SYNC)) sync(); if (!(flags & ANDROID_RB_FLAG_NO_REMOUNT_RO)) remount_ro(); switch (cmd) { case ANDROID_RB_RESTART: ret = reboot(RB_AUTOBOOT); break; case ANDROID_RB_POWEROFF: ret.. 더보기
Bootchart on Android 1. export INIT_BOOTCHART=true 경우에 따라 하기 디파인을 강제로 바꿔야 할때가 있다. android/app/mydroid/system/core/init/bootchart.h # define BOOTCHART 0 -> 12. touch system/core/init/*3. build 한다.이미지 다운로드후4. adb shell 로 접속한다.5. 쉘 프롬프트가 뜨면 아래 문구를 치고 리부팅한다. 120 은 120초 동안 로그를 남기겠다는 뜻. echo 120 > /data/bootchart-start재부팅 한후 120초 지나면6. 하기 커맨드를 입력하면 header / kernel_pacct / proc_diskstats.log / proc_ps.log / proc_stat.log 파.. 더보기