How to understand the Android Architecture

Android Architecture

Application Layer

เป็นส่วนที่ “Application” แต่ละ “Application” ที่พัฒนาขึ้นมาถูกติดตั้งและเรียกใช้งานเช่น โปรแกรม “Facebook” หรือ “Line” เป็นต้น ซึ่ง “Application” จะมีนามสกุลคือ “.apk” ซึ่งเมื่อติดตั้งเป็นที่เรียบร้อยแล้วจะอยู่ในโฟลเดอร์ “/data/app” และส่วนข้อมูลของ “Application” จะอยู่ที่ “/data/data”

Application Framework Layer

เป็นส่วนของ “System API” (Application Programming Interface) ที่ “Application” พัฒนาและติดตั้งสามารถเรียกใช้งาน โดยที่ส่วนของ “Application Framework” จะช่วยอำนวยความสะดวกของนักพัฒนา “Application” ไม่จำเป็นเป็นต้องเขียนโปรแกรมเพิ่มเติมที่มีความสลับซับซ้อน แต่สามารถเรียกใช้งานผ่าน “API” ได้ทันที โดยแบ่งได้ดังต่อไปนี้

  • Activities Manager “API” สำหรับจัดการ “Activity” หรือหน้าจอแสดงผลต่อผู้ใช้งาน
  • Content Provider “API” สำหรับจัดการเข้าถึงข้อมูลโดยจากโปรแกรมอื่น เหมาะสำหรับการแชร์ข้อมูลระหว่าง “Application”
  • View System “API” สำหรับจัดการโครงสร้างหรือส่วนประกอบส่วนติดต่อผู้ใช้ (Controls) เช่น “button” “text box” หรือ “web browser” ใช้งานร่วมกับ Activities Manager
  • Telephony Manager “API” จัดการเข้าถึงข้อมูลโทรศัพท์
  • Resource Manager “API” จัดการข้อมูลอื่น ๆ ที่ไม่เกี่ยวกับส่วนการเขียนโปรแกรม (Programming) “strings” “layout” หน้าจอ ซึ่งจะอยู่ในไดเร็คทอรี “res/”
  • Location Manager “API” จัดการตำแหน่งทางภูมิศาตร์ของเครื่อง “Android”
  • Notification Manager “API” เกี่ยวข้องกับเหตุการณ์ที่เกิดขึ้นกับเครื่อง “Android” จากนั้นแสดงผลแก่ผู้ใช้งาน เช่น “Miss call” เป็นต้น

Libraries Layer

เป็นส่วนที่ไลบารีของ “C” และ “C++” ไลบรารี ในระดับ “Low-level process” เช่น

  • Surface Manager เป็นไลบราลีสำหรับการวาดหน้าจอ หรือการแสดงผล
  • Media Framework เป็นไลบราลีสำหรับงานมัลติมีเดีย ภาพ วีดีโอ เสียง
  • SQLite เป็นไลบราลีสำหรับใช้งานข้อมูล “SQLite” ที่มีขนาดเล็ก เราสามารถเก็บข้อมูลต่าง ๆ ของ “Application” ไว้ในฐานข้อมูลนี้
  • Open GL | ES เป็นไลบรารีสำหรับภาพ 2 หรือ 3 มิติ
  • FreeType เป็นไลบรารีสำหรับการแสดงผลภาพทั้ง “Bitmap” และ “Vector”
  • WebKit เป็นไลบรารีสำหรับการแสดงผลบนเว็บบราวเซอร์ สามารถศึกษาเพิ่มเติมได้ที่ https://developer.android.com/reference/android/webkit/package-summary.html
  • libc เป็นไลบรารีของภาษา “C”

Android Run-times

เป็นส่วนหนึ่งของไลบรารีประกบไปด้วย 2 ส่วน ที่จัดการโดย “Android OS” ดังนี้

  • Core Java Libraries เป็นไลบรารีรวบรวมคำสั่ง โดยเขียนด้วยภาษา “Java”
  • Dalvik Virtual Machine เป็น ไลบรารีใช้ประมวลไฟล์ “.dex” โดยไฟล์นี้คือโปรแกรมที่เราเขียนขึ้นมาเพื่อติดตั้งบนเครื่อง “Android” โดย “compile” มาจาก “.class” โดยไฟล์ “.dex” จะมีขนาดเล็ก

Linux Kernel Layer

ระดับชั้นนี้จะทำงานร่วมกับ “Layer” ข้างบนทั้งหลาย เพื่อจัดการเกี่ยวกับ “hardware” หรือ “device driver” ต่าง ๆ รวมถึง หน่วยความจำ หน่วยประมวลผล และ “power” โดย “Android” ใช้ระบบปฏิบัติการลินุกซ์ “version” 2.6

Posted in Java application, Mobile — Android, Penetration test and tagged Activities Manager, Android, API, Application Framework Layer, Architecture, class, Content Provider, Core Java Libraries, Dalvik Virtual Machine, DEX, FreeType, libc, Libraries Layer, Linux Kernel Layer, Location Manager, Media Framework, Notification Manager, Open GL | ES, Resource Manager, sqlite, Surface Manager, Telephony Manager, View System, WebKit.

สามารถติดตามเพิ่มเติมได้ที่

Introduction

)
IT SELECT LAB .,LTD

Written by

Vulnerability and Penetration Test Company — Blend our passion and your satisfaction together

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade