原创 Android Soong

1.Android.bp 幫助文檔 out/soong/docs/soong_build.html  2.通過androidmk 將Android.mk 轉Android.bp  3. 源碼幫助文檔:android/build/soong

原创 native statck

Native C++層加堆棧打印: 1. 包含頭文件 #include "utils/CallStack.h" 2. 引用動態庫 Andorid P Android.mk: LOCAL_SHARED_LIBRARIES裏包含libutil

原创 1. Linux 內存的meminfo 獲取過程

1. Linux 內存的大小獲取過程 硬件:tiny4412 軟件:linux3.0.86,uboot-tiny4412 目的:梳理linux start-kernel階段,獲取內核大小的過程,並將內存bank個數,start ,size

原创 github 顯示圖片失敗

處理github 圖片顯示失敗的方法,更新dns . 在 https://www.ipaddress.com/ 網站上,獲得一下 網址的ip地址 192.30.253.112 github.com 199.232.28.133  raw.

原创 Mosquitto 使用

參考鏈接 https://blog.csdn.net/dancer__sky/article/details/77855249  

原创 Handler Looper ,如何查handlermessage 沒有執行問題

1.   import android.util.LogPrinter; Looper.prepare(); LogPrinter lp = new LogPrinter(Log.VERBOSE, TAG);Looper.getMainL

原创 python中的optionParser模塊

Python 有兩個內建的模塊用於處理命令行參數: 一個是 getopt,《Deep in python》一書中也有提到,只能簡單處理 命令行參數; 另一個是 optparse,它功能強大,而且易於使用,可以方便地生成標準的、符合Unix

原创 linux驅動開發 --miscdevice

前言 在linux驅動中,需要提供主設備號和次設備號號,通常使用的主設備號是從 0到 255之間的數,僅僅使用主設備號,還是不叫緊張的,因此需要利用次設備號。 linux中,提供了miscdevice這種雜項設備,指定主設備號爲

原创 repo sync error

info: A new version of repo is available warning: project 'repo' branch 'stable' is not signed warning: Skipped upgrade

原创 linux驅動開發之字符設備--私有數據和container_of

前言 驅動開發中通常爲設備定義一個設備相關的設備結構體,其包含該設備的cdev 、私有數據、信號量、irq等這些信息。 驅動開發中通常將文件的私有數據private_data指向設備結構體,在read()、write()、io

原创 pcm_get_htimestamp fail

在獲取pcm的時間戳用於音頻同步, 第一次使用pcm_get_htimestamp的時候,提示fail.導致無法獲取時間,和可用的幀數.  分析:由於在pcm_start()後,直接使用pcm_get_htimestamp 進行了獲取,

原创 ubuntu16.04 64bit編譯android5.1錯誤

之前使用ubuntu12.04 64bit編譯Android時並沒有出現較大的錯誤,將平臺更換到16.04時編譯出錯,且該錯誤並不好查找,因此特意記錄下來。 libnativehelper/JniConstants.cpp:103

原创 Selinux type 編寫示例

以下是從aosp 中,分析如何定義的type 和allow 規則 1.定義type (domain) hal_light 這個type的定義 type hal_light_default, domain; hal_server_domai

原创 Selinux 總結

Selinux 總結 總結 1.Selinux  是MAC(強制訪問控制)的一種實現方式。 2.Selinux 有兩種模式     Enforcing模式,強制模式。不符合selinux要求的訪問,將會被阻止      Permissiv

原创 從清華網站下載Android代碼

wget -c https://mirrors.tuna.tsinghua.edu.cn/aosp-monthly/aosp-latest.tar # 下載初始化包 tar xvf aosp-latest.tar cd AOSP rep