2013/4: Android JB 之後,不需要特別修改即可搭配 gcc 4.6
今年中出的 Ubuntu 11.10 把 gcc 升級到 4.6,這會讓不少人的 Android build 不出來 :Xhuenlil 發表在 痞客邦 留言(3) 人氣(3,152)
Adb 全名是 Android Debug Bridge,是開發或使用 Android 時很常用到的工具。使用者可以從Android 官方站下載 SDK,在其中的 platform-tools (原本在 \Tools) 中找到。
當機器上有打開 USB debug mode 時,使用者即可通過adb 進行各種 debug 、底層(linux user space)的 Android 功能。比較常用的功能:
huenlil 發表在 痞客邦 留言(1) 人氣(231,123)
最近發布的Android Honeycomb ,其中一項新功能是支援了 MTP/PTP。
Digital media file transfer
The platform includes built-in support for Media/Picture Transfer Protocol (MTP/PTP) over USB, which lets users easily transfer any type of media files between devices and to a host computer. Developers can build on this support, creating applications that let users create or manage media files that they may want to transfer or share across devices.
|
MTP/PTP簡單來說就是支援多媒體傳輸的協定,同時支援一般的 UMS 功能。這兩項功能分別由兩間廠商所提出,MTP 是微軟為了搭配 Windows Media Player 所提出的、而PTP由 Kodak 為了數位照片所提出。市場上,其實 Samsung 早就在 Galaxy S 就使用 MTP 取代傳統的 UMS,而 Nokia 在 Symbian 也有 support MTP。
Google 在 Android 3.0 會採用 MTP 作為標準,其實有一大部分是為了DRM (Digital Rights Management) 而作的,因為MTP原本就是為了 DRM 所設計出來的協定。如同MS當初提出MTP的原因,Google目前面臨的也是如何處理數位內容的問題,才能替Android 取得更多的數位內容,其實更是為了解決 Android App 太容易被散佈問題鋪路。
huenlil 發表在 痞客邦 留言(0) 人氣(13,773)
追一個關於 open gl 的 display 問題,摘錄 error list 原因,方便以後查找 XD
來源: http://blog.chinaunix.net/u3/111072/showart_2273346.html
huenlil 發表在 痞客邦 留言(0) 人氣(609)
先參考 這篇Android 的 uid 了解概念,再來是系統預設的 uid list,實際上是定義在
system/core/include/private/android_filesystem_config.h
包括 root, system, :
huenlil 發表在 痞客邦 留言(0) 人氣(5,960)
前言:
Android 的 build system 已經大幅將build的過程簡單化、自動化,所以可以在執行 envsetup.sh 之後使用各種方便
的指令,以下列出目前支援的功能:
Invoke ". build/envsetup.sh" from your shell to add the following functions to your environment:
huenlil 發表在 痞客邦 留言(0) 人氣(11,608)
引言:
ASHMEM = Android shared memory, 由Goolge 設計的一種記憶體分享、分配機制,主要用於 Google 設計給 Android 使用的 IPC Binder。
主要的driver 可在 aosp 的 kernel/mm/ashmem.c 找到實作,user space 的部份則是主要在 IMemory 裡面處理。
下面是從網路上收集的資訊:
huenlil 發表在 痞客邦 留言(0) 人氣(7,706)
huenlil 發表在 痞客邦 留言(0) 人氣(2,138)
新功能:http://developer.android.com/sdk/android-2.2-highlights.html
SDK: http://developer.android.com/sdk/android-2.2.html
Demo: http://www.engadget.com/2010/05/20/android-2-2-froyo-beta-hands-on-flash-10-1-wifi-hotspots-an/
huenlil 發表在 痞客邦 留言(0) 人氣(636)
來源: http://freepine.blogspot.com/2010/02/analyze-memory-leak-of-android-native.htmlAndroid libc_debug.so has a built-in function to dump all heap allocations with its backtrace, which is very useful to debug memory leaks of native processes. Below are the steps summarized during my investigation of mediaserver process:
apply the
patch in ./frameworks/base, which registers a memory dumper service in mediaserver process, then rebuild
flash new system.img, replace libc.so with libc_debug.so, then reboot
- $ adb remount
- $ adb shell mv /system/lib/libc_debug.so /system/lib/libc.so
- $ adb reboot
run memorydumper to get the initial heap allocations of mediaserver process
- $ adb shell /system/bin/memorydumper
play several files, save the process maps during playback, then get the memory dump again
- $ adb shell pull /proc/<mediaserver_pid>/maps .
- $ adb shell /system/bin/memorydumper
get the diff file of memory allocations
- $ adb pull /data/memstatus_1136.0 .
- $ adb pull /data/memstatus_1136.1 .
- $ diff memstatus_1136.0 memstatus_1136.1 >diff_0_1
run the
script to resolve symbols from the backtrace addresses in the diff file
- $ ./addr2func.py --root-dir=../ --maps-file=./maps diff_0_1
huenlil 發表在 痞客邦 留言(0) 人氣(3,268)