導航:首頁 > 操作系統 > androidriljava

androidriljava

發布時間:2024-10-26 10:42:40

A. android系統開發要用哪些知識

android 技術內幕系統卷
第1章 准備工作 /1 1.1 深入認識android /2 1.1.1 android的系統構架 /2 1.1.2 android的初始化流程 /5 1.1.3 各個層次之間的相互關系 /8 1.1.4 android系統開發(移植)和應用開發 /11 1.2 獲取和編譯android的源碼 /13 1.2.1 環境配置 /13 1.2.2 獲取android源碼 /14 1.2.3 編譯android的源碼及其工具包 /16 1.2.4 運行android系統 /21 1.3 開發環境搭建 /23 1.3.1 應用開發環境搭建 /23 1.3.2 源碼開發環境搭建 /26 1.4 android源碼結構 /32 1.5 小結 /33 第2章 android的內核機制和結構剖析 /34 2.1 linux與android的關系 /35 .2.1.1 為什麼會選擇linux /35 2.1.2 android不是linux /35 2.2 android對linux內核的改動 /37 2.2.1 goldfish /37 2.2.2 yaffs2 /38 2.2.3 藍牙 /39 2.2.4 調度器(scheler)/39 2.2.5 android新增的驅動 /40 2.2.6 電源管理 /41 2.2.7 雜項 /41 2.3 android對linux內核的增強 /42 2.3.1 alarm(硬體時鍾)/43 2.3.2 ashmem(匿名內存共享)/46 2.3.3 low memory killer(低內存管理)/52 2.3.4 logger(日誌設備)/56 2.3.5 android pmem /65 2.3.6 switch /79 2.3.7 timed gpio /88 2.3.8 android ram console /94 2.4 小結 /99 第3章 android的ipc機制--binder /100 3.1 binder概述 /101 3.1.1 為什麼選擇binder /101 3.1.2 初識binder /102 3.2 binder驅動的原理和實現 /102 3.2.1 binder驅動的原理 /102 3.2.2 binder驅動的實現 /103 3.3 binder的構架與實現 /132 3.3.1 binder的系統構架 /132 3.3.2 binder的機制和原理 /133 3.4 小結 /150 第4章 電源管理 /151 4.1 電源管理概述 /152 4.2 電源管理結構 /152 4.3 android的電源管理機制 /153 4.4 android電源管理機制的實現 /154 4.5 小結 /187 第5章 驅動的工作原理及實現機制 /188 5.1 顯示驅動(framebuffer)/189 5.1.1 framebuffer的工作原理 /189 5.1.2 framebuffer的構架 /190 5.1.3 framebuffer驅動的實現機制 /190 5.2 視頻驅動(v4l和v4l2)/201 5.2.1 v4l2介紹 /201 5.2.2 v4l2的原理和構架 /201 5.2.3 v4l2的實現 /202 5.3 音頻驅動(oss和alsa)/208 5.3.1 oss與alsa介紹 /208 5.3.2 oss的構架與實現 /209 5.3.3 alsa的構架與實現 /213 5.4 mtd驅動 /214 5.4.1 mtd驅動的功能 /214 5.4.2 mtd驅動的構架 /215 5.4.3 mtd驅動的原理及實現 /215 5.5 event輸入設備驅動 /223 5.5.1 input的系統構架 /223 5.5.2 event輸入驅動的構架 /224 5.5.3 event輸入驅動的原理 /224 5.5.4 event輸入驅動的實現 /225 5.6 藍牙驅動(bluetooth)/235 5.6.1 bluetooth驅動的構架 /235 5.6.2 bluez的原理及實現 /237 5.7 wlan驅動(wi-fi)/244 5.7.1 wlan構架 /244 5.7.2 wi-fi驅動的實現原理 /245 5.8 小結 /245 第6章 原生庫的原理及實現 /246 6.1 系統c庫(bionic libc)/247 6.1.1 bionic libc功能概述 /247 6.1.2 bionic libc實現原理 /248 6.2 功能庫 /258 6.2.1 webkit構架與實現 /258 6.2.2 多媒體框架與實現 /275 6.2.3 android sqlite框架及原理 /285 6.3 擴展庫 /289 6.3.1 skia底層庫分析 /289 6.3.2 opengl底層庫分析 /299 6.3.3 android-openssl實現及運用 /306 6.3.4 freetype及font engine manager /317 6.3.5 freetype結構體系和渲染流程 /317 6.4 原生服務 /328 6.4.1 audioflinger實現 /328 6.4.2 surfaceflinger實現 /341 6.5 小結 /353 第7章 硬體抽象層的原理與實現 /354 7.1 硬體抽象層的實現原理 /355 7.1.1 android hal構架 /355 7.1.2 android hal的實現 /357 7.2 android overlay構架與實現 /361 7.2.1 android overlay系統構架 /361 7.2.2 overlay hal框架與實現 /362 7.2.3 overlay與surfacefinger /369 7.3 android camera 構架與實現 /375 7.3.1 android camera系統構架 /375 7.3.2 camera hal框架與實現 /377 7.3.3 camera本地實現 /385 7.4 android audio hal實現 /394 7.4.1 audio hal框架 /395 7.4.2 android默認的audio hal實現 /398 7.4.3 mp功能的audio hal實現 /400 7.4.4 基於a2dp的藍牙音頻設備hal實現 /402 7.4.5 模擬器上的audio hal實現 /403 7.5 android ril實現 /404 7.5.1 android ril構架 /404 7.5.2 radiooptiongs實現 /407 7.5.3 libril庫實現 /409 7.5.4 reference-ril庫實現 /415 7.5.5 rild守護進程實現 /418 7.5.6 request流程分析 /423 7.5.7 response流程分析 /427 7.6 android sensor hal實現 /434 7.6.1 android sensor構建 /434 7.6.2 sensor hal介面 /435 7.6.3 sensor hal實現 /438 7.7 android wifi hal實現 /441 7.7.1 android wifi系統構架 /441 7.7.2 wpa_supplicant框架 /442 7.7.3 wifi hal實現 /444 7.8 android藍牙本地實現 /447 7.8.1 android藍牙構架 /447 7.8.2 bluez結構體系 /448 7.8.3 bluez適配層 /452 7.9 android 定位實現 /453 7.9.1 定位系統構架 /453 7.9.2 gps hal實現 /454 7.10 android power hal實現 /459 7.11 android vibrator hal實現 /461 7.12 小結 /462 第8章 dalvik虛擬機的構架、原理與實現 /463 8.1 dalvik虛擬機概述 /464 8.1.1 什麼是dalvik虛擬機 /464 8.1.2 dalvik虛擬機的功能 /464 8.1.3 dalvik虛擬機與java虛擬機的區別 /465 8.2 dalvik構架與實現 /466 8.2.1 dalvik系統構架 /466 8.2.2 dx和dexmp工具 /468 8.2.3 .dex文件格式解析 /470 8.2.4 dalvik內部機制 /487 8.2.5 dalvik進程管理 /492 8.2.6 dalvik內存管理 /501 8.2.7 dalvik載入器 /509 8.2.8 dalvik解釋器 /517 8.2.9 dalvik jit /519 8.3 jni的構架與實現 /523 8.3.1 jni構架 /523 8.3.2 jni實現 /524 8.4 小結 /526 第9章 android 核心庫 /527 9.1 android核心庫簡介 /528 9.2 android系統api /529 9.2.1 android包 /529 9.2.2 android資源包 /529 9.2.3 apicheck機制 /529 9.3 小結 /532 後記 /533

B. 有人知道Android緊急呼叫RIL流程么

撥出電話流程:

1在系統源碼這個路徑下/packages/apps/Phone/src/com/android/phone/DialtactsActivity.java

contacts的androidmanifest.xmlandroid:process="android.process.acore"說明此應用程序運行在acore進程中。DialtactsActivity的intent-filter的action屬性設置為main,catelog屬性設置為launcher,所以此activity能出現,首先啟動的就是這個activity在主菜單中,並且是點擊此應用程序的第一個界面。dialtactsactivity包含四個tab,分別由TwelveKeyDialer、RecentCallsListActivity,兩個activity-和分別表示聯系人和收藏tab,但是正真的聯系人列表和收藏是由ContactsListActivity負責。

2

進入TwelveKeyDialer OnClick方法,按住的按鈕id為:R.id.digits,執行

詳細

C. Android怎麼判斷是雙卡雙待

Android怎麼判斷是雙卡雙待的具體方法為:

1、Android平台是一個多樣型的平台,不同的手機獲取ITelephony介面不同,用一種方法實現雙卡雙待管理是不可取的。只有針對不同的手機分析出一套管理的方案,該方案實現難度大,因為需要各個廠家的SDK的資料。為了實現該功能,需要整合各個廠家的SDK的資料。

2、為了更好的管理雙卡雙待的問題,新建一個雙卡雙待模塊靜態庫,其它項目引用便是,項目如圖:

3、AbsSim是抽象類,負責實現手機操作的類。不同的廠家繼承該類實現各自的介面。AbsSim信息如下:

public abstract class AbsSim implements IDualDetector { //抽象基類

protected final String TAG = getClass().getSimpleName();

protected ArrayList<SimSlot> mSimSlots = new ArrayList<SimSlot>();

protected boolean mIsDualSimPhone = false;

protected String mCallLogExtraField = "";


public abstract String getSimPhoneNumber(int paramInt); // 返回手機號碼


public abstract int getDataState(int paramInt);// 返回數據狀態


public abstract String getIMSI(int paramInt);// 返回手機標識


public abstract String getIMSI(int paramInt, Context paramContext);// 返回手機標識


public abstract int getPhoneState(int paramInt);// 返回手機狀態


public abstract boolean isServiceAvaliable(int paramInt);// 服務是否可用


public abstract boolean isSimStateIsReady(int paramInt);// 卡是否在使用


public abstract int getSimOperator(int paramInt);// 服務商(電信、移動、聯通)


protected abstract Object getITelephonyMSim(int paramInt);// 獲取操作介面


protected abstract Object getMSimTelephonyManager(int paramInt);// 獲取操作介面


}

4、這是利用java 反射機制操作Android隱藏的類,很好的解決了雙卡雙待的問題。

D. 如何修改android模擬器上的IMEI,IMSI,SIM card serial number

手機使用IMEI和IMSI登錄到GSM網路的,由GSM網路側負責將IMSI和映射成手機號(MSISDN),以及執行相反方向的映射。

(一)、SIM card 號的修改:
SIM card號就是印製在SIM上的一串數字。
讀SIM card號的AT命令為:AT+CRSM=176,12258,0,0,10
因此在andorid模擬其源碼中找到該AT命令——在sim_card.c中:
const char*
asimcard_io( ASimCard sim, const char* cmd )
{
int nn;
#if ENABLE_DYNAMIC_RECORDS
int command, id, p1, p2, p3;
#endif
static const struct { const char* cmd; const char* answer; } answers[] =
{
{ "+CRSM=192,28436,0,0,15", "+CRSM: 144,0," },
{ "+CRSM=176,28436,0,0,20", "+CRSM: 144,0," },

{ "+CRSM=192,28433,0,0,15", "+CRSM: 144,0," },
{ "+CRSM=176,28433,0,0,1", "+CRSM: 144,0,55" },

{ "+CRSM=192,12258,0,0,15", "+CRSM: 144,0," },
{ "+CRSM=176,12258,0,0,10", "+CRSM: 144,0,98101430121181157002" },

...

...

因此用UE二進制方式打開emulator-arm.exe 或 emulator-x86.exe,並搜索字元串「98101430121181157002」,然後將其修改成需要的SIM card號。
比如:
00209a00h: 31 30 00 00 2B 43 52 53 4D 3A 20 31 34 34 2C 30 ; 10..+CRSM: 144,0
00209a10h: 2C 39 38 31 30 31 34 33 30 31 32 31 31 38 31 31 ; ,981014301211811
00209a20h: 35 37 30 30 32 00 2B 43 52 53 4D 3D 31 39 32 2C ; 57002.+CRSM=192,

(二)、IMEI、IMSI號的修改:

Java代碼中獲取手機的IMEI號與ISMI號途徑為:

TelephonyManager manager = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
String imei = manager.getDeviceId();
String imsi = manager.getSubscriberId();

在android的源碼樹中找到類TelephonyManager的實現:
成員函數getDeviceId:
/**
* Returns the unique device ID, for example, the IMEI for GSM and the MEID
* or ESN for CDMA phones. Return null if device ID is not available.
*
* <p>Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
*/
public String getDeviceId() {
try {
return getSubscriberInfo().getDeviceId();
} catch (RemoteException ex) {
return null;
} catch (NullPointerException ex) {
return null;
}
}

成員函數getSubscriberId:
/**
* Returns the unique subscriber ID, for example, the IMSI for a GSM phone.
* Return null if it is unavailable.
* <p>
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
*/
public String getSubscriberId() {
try {
return getSubscriberInfo().getSubscriberId();
} catch (RemoteException ex) {
return null;
} catch (NullPointerException ex) {
// This could happen before phone restarts e to crashing
return null;
}
}

上面兩個成員函數最終調用共同的一個私有成員函數getSubscriberInfo():
private IPhoneSubInfo getSubscriberInfo() {
// get it each time because that process crashes a lot
return IPhoneSubInfo.Stub.asInterface(ServiceManager.getService("iphonesubinfo"));
}

而上面私有函數getSubscriberInfo獲取的手機IMSI和IMEI號被硬編碼在文件android_modem.c中:
/* the Android GSM stack checks that the operator's name has changed
* when roaming is on. If not, it will not update the Roaming status icon
*
* this means that we need to emulate two distinct operators:
* - the first one for the 'home' registration state, must also correspond
* to the emulated user's IMEI
*
* - the second one for the 'roaming' registration state, must have a
* different name and MCC/MNC
*/

#define OPERATOR_HOME_INDEX 0
#define OPERATOR_HOME_MCC 310
#define OPERATOR_HOME_MNC 260
#define OPERATOR_HOME_NAME "Android"
#define OPERATOR_HOME_MCCMNC STRINGIFY(OPERATOR_HOME_MCC) \
STRINGIFY(OPERATOR_HOME_MNC)

#define OPERATOR_ROAMING_INDEX 1
#define OPERATOR_ROAMING_MCC 310
#define OPERATOR_ROAMING_MNC 295
#define OPERATOR_ROAMING_NAME "TelKila"
#define OPERATOR_ROAMING_MCCMNC STRINGIFY(OPERATOR_ROAMING_MCC) \
STRINGIFY(OPERATOR_ROAMING_MNC)
/* a function used to deal with a non-trivial request */
typedef const char* (*ResponseHandler)(const char* cmd, AModem modem);

static const struct {
const char* cmd; /* command coming from libreference-ril.so, if first
character is '!', then the rest is a prefix only */

const char* answer; /* default answer, NULL if needs specific handling or
if OK is good enough */

ResponseHandler handler; /* specific handler, ignored if 'answer' is not NULL,
NULL if OK is good enough */
} sDefaultResponses[] =
{
/* see onRadioPowerOn() */
{ "%CPHS=1", NULL, NULL },
{ "%CTZV=1", NULL, NULL },

...

{ "!+VTS=", NULL, handleSetDialTone },
{ "+CIMI", OPERATOR_HOME_MCCMNC "000000000", NULL }, /* request internation subscriber identification number */
{ "+CGSN", "000000000000000", NULL }, /* request model version */
{ "+CUSD=2",NULL, NULL }, /* Cancel USSD */

...

/* end of list */
{NULL, NULL, NULL}

};

因此用UE二進制方式打開emulator-arm.exe 或 emulator-x86.exe,並搜索字元串"+CGSN"修改為需要的IMEI號;搜索"+CIMI"修改為需要的IMSI號。需要注意的是 IMSI 號的頭六個數字"310260"不能修改,否則模擬器無法與網路連接。
例如:
001fc700h: 33 00 41 00 48 00 21 2B 56 54 53 3D 00 2B 43 49 ; 3.A.H.!+VTS=.+CI
001fc710h: 4D 49 00 33 31 30 32 36 30 30 30 30 30 30 30 30 ; MI.3102600000000
001fc720h: 30 30 00 2B 43 47 53 4E 00 30 30 30 30 30 30 30 ; 00.+CGSN.0000000
001fc730h: 30 30 30 30 30 30 30 30 00 2B 43 55 53 44 3D 32 ; 00000000.+CUSD=2

閱讀全文

與androidriljava相關的資料

熱點內容
文件預覽java實現 瀏覽:982
青島少兒編程 瀏覽:399
蜘蛛5音箱安卓軟體怎麼用 瀏覽:587
前公司源碼可以用嗎 瀏覽:125
單片機初始化程序編程 瀏覽:195
app流失率指什麼 瀏覽:805
抗震等級梁的加密 瀏覽:919
液壓機解壓教學視頻 瀏覽:991
fmm推薦演算法 瀏覽:849
醫保加密卡的功能 瀏覽:101
64位linux匯編 瀏覽:153
重慶差額保函演算法 瀏覽:318
android清空剪切板 瀏覽:669
word不可編輯pdf 瀏覽:7
phphttppost請求 瀏覽:608
安卓手機怎麼調手機幀數 瀏覽:176
python程序員電腦軟體 瀏覽:428
java多客服 瀏覽:606
web智能演算法 瀏覽:687
androidintentapi 瀏覽:925