欢迎来到天天文库
浏览记录
ID:45769548
大小:52.66 KB
页数:32页
时间:2019-11-17
《安桌应用基础》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、英语原文AndroidApplicationFundamentalsAndroidapplicationsarewrittenintheJavaprogramminglanguage.TheAndroidSDKtoolscompilethecode—alongwithanydataandresourcefiles—intoanAndroidpackage^anarchivefilewithan.apksuffix.Allthecodeinasingle.apkfileisconsideredtobeoneapplicationandisthefilethatAndroid-powered
2、devicesusetoinstalltheapplication.Onceinstalledonadevice,eachAndroidapplicationlivesinitsownsecuritysandbox:•TheAndroidoperatingsystemisamulti-userLinuxsysteminwhicheachapplicationisadifferentuser.•Bydefault,thesystemassignseachapplicationauniqueLinuxuserID(theIDisusedonlybythesystemandisunknownt
3、otheapplication).ThesystemsetspermissionsforallthefilesinanapplicationsothatonlytheuserIDassignedtothatapplicationcanaccessthem.•Eachprocesshasitsownvirtualmachine(VM),soanapplication^coderunsinisolationfromotherapplications.口•Bydefault,everyapplicationrunsinitsownLinuxprocess.Androidstartsthepro
4、cesswhenanyoftheapplication^componentsneedtobeexecuted,thenshutsdowntheprocesswhenitfsnolongerneededorwhenthesystemmustrecovermemoryforotherapplications.Inthisway,theAndroidsystemimplementstheprincipleofleastprivilege.Thatis,eachapplication,bydefault,hasaccessonlytothecomponentsthatitrequirestodo
5、itsworkandnomore.Thiscreatesaverysecureenvironmentinwhichanapplicationcannotaccesspartsofthesystemforwhichitisnotgivenpermission.However,therearewaystoranapplicationtosharedatawithotherapplicationsandtoranapplicationtoaccesssystemservices:•Il'spossibletoarrangefortwoapplicationstosharethesameLinu
6、xuserID、inwhichcasetheyareabletoaccesseacholherfstiles.Toconservesystemresources,applicationswiththesameuserIDcanalsoarrangetoruninthesameLinuxprocessandsharethesameVM(theapplicationsmustalsobesignedwiththesamecertificate)-•Anapplicationcanrequestpermissiontoaccessdevicedatasuchastheuser'scontact
7、s,SMSmessages,themountablestorage(SOcard),camera.Bluetooth,andmore.Allapplicationpermissionsmustbegrantedbytheuseratinstalltime.ThatcoversthebasicsregardinghowanAndroidapplicationexistswithinthesystem.Therestofthisdocu
此文档下载收益归作者所有