原创 ARM指令如何在thumb和arm模式切換

根據arm spec, 跳轉地址最低位( lsb ) 爲0表示 arm 指令;最低位爲1表示thumb指令。 一、絕對地址跳轉進入 thumb模式 如下指令可以切換到thumb模式。 LDR R6, =0x24000 ADD R6,

原创 android自動測試

爲了自動測試撥打電話功能,自動化腳本需要使用相關的接口。   方法之一:AT command   1) adb shell 2) enter AT command mode ( platform specific ) 3) atd112;

原创 推輓(Push-Pull) vs 開漏(Open-Drain)

作者:crifan (http://bbs.chinaunix.net) 郵箱:[email protected] 【Open-Drain與Pu

原创 斷點和PC地址

Breakpoints and Program Counter Hardware data breakpoint 如果硬件數據斷點被命中, PC指針地址取決於被調試處理器。 對於 ARM 處理器, 當數據斷點命中時,一條或兩條指令的“

原创 Linux kernel crash analysis example

Issue reported: When USB is connected as Mass Storage mode, copy file from external sdcard to clipboard. The disconnect

原创 Linux ioctl command

Excepted from kernel/include/asm-generic/ioctl.h   /* ioctl command encoding: 32 bits total, command in lower 16 bits,

原创 Linux kernel crash analysis example (2)

Issue: Android monkey test assertion. Assertion log: <0>[50281.798919] C0 [ swapper/0] Internal error: Oops - un

原创 Android monkey監視系統狀態

When monkey tests are running in android phones, phones have memory leakage and are difficult to trace system status, a

原创 怎樣使一個Android應用不被殺死?

From: http://blog.sina.com.cn/s/blog_3e3fcadd0100yjo2.html方法:對於一個service,可

原创 ARM Processor Exception

ARM Processor Exception 雖然依賴於硬件實現,當一個給定的預定義事件發生時, 大多數ARM處理器都提供了專用硬件來進入調試模式。 大多數較新的ARM處理器提供了捕捉異常的硬件單元。 如果使能該硬件單元,其效果類似

原创 Android procrank

Android procrank  (/system/xbin/procrank) 工具,能夠列出進程所佔用的內存使用情況。順序爲從高到低。 每個進程佔用內存大小以 VSS,  RSS , PSS, USS 的形式列出。 爲了簡化描述,內

原创 ARM Hardware Breakpoint vs Software Breakpoint

對於ARM debugger工具,常用的有兩種breakpoint.  Hardware vs Software 類型。 ARM 文檔給出的相關定義如下。 Hardware breakpoints: 1) 依賴於目標processor

原创 u-boot memory layout

近期對於u-boot memory layout的一個分析圖。 記錄一下以被後用。    

原创 ARM CPSR/SPSR 的示意圖

ENTRY EXPORT __main __main SVC_Stack Mode_SVC EQU 0x13 I_Bit EQU 0x80 F_Bit EQ

原创 Linux kernel crash and analysis example (3)

BUG: Randomly, ARMv7 mobile crashed when USB OTG operations are executed. Context: [ 30.648925] C0 [m.android.phone