• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Pjproject su Android: uno scontro su più livelli
 

Pjproject su Android: uno scontro su più livelli

on

  • 908 views

Bachelor's degree thesis

Bachelor's degree thesis

Statistics

Views

Total Views
908
Views on SlideShare
902
Embed Views
6

Actions

Likes
0
Downloads
5
Comments
0

1 Embed 6

https://www.linkedin.com 6

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Pjproject su Android: uno scontro su più livelli Pjproject su Android: uno scontro su più livelli Presentation Transcript

    • Pjproject su Android Uno scontro su più livelli Giacomo Bergami Alma Mater Studiorum - Università di Bologna November 13th , 2012Giacomo Bergami (Univ. Bologna) Pjproject su Android November 13th , 2012 1/9
    • Table of Contents1 Main Goals and Subproblems Main Goals Subproblems2 Android Architecture Overview Service Interaction Audio Management3 Outcomes Giacomo Bergami (Univ. Bologna) Pjproject su Android November 13th , 2012 2/9
    • Main Goals Can a pjsip-based VoIP application (pjsua) run on Android? The question “seems legitimate”, as pjsua is a non-standard Java-Android application. It’s a C-native app. Can I crosscompile a GNU/Linux application to Android? Does a native application directly interact with the Kernel? How does Android know that I want to gain access to the microphone? How can I dodge Android’s controls?Giacomo Bergami (Univ. Bologna) Pjproject su Android November 13th , 2012 3/9
    • Subproblems Android SDK Emulator Communication between emulators. Audio hardware emulation is not provided. Olivetti Olitab (Medion Life Tab) No factory image No sourcecode support Non standard “rooting” procedure (nvflash) ⇒ Samsung Galaxy Nexus.Giacomo Bergami (Univ. Bologna) Pjproject su Android November 13th , 2012 4/9
    • Android ArchitectureSome terminology Rooting Upsyscall Java/Java with JNI/Native Application. Kernel Android/AOSP source/Android Middleware Giacomo Bergami (Univ. Bologna) Pjproject su Android November 13th , 2012 5/9
    • Overview Native Apps (pjsua) 1 2 Pjproject (pjsip) ModificationsAndroid Architecture Overview (Kernel+AOSP) 1 Redefinition of entry-point Permission Controller _start inside Android NDK. 2 Resizing “Conference” Buffer for DVM previous overflow. JNI+libs media_server + services Android Audio Libraries 3 Removal of the access limit to GNU/Linux audio sampling to a client only. Windows 4 Data obtainer Permission Checker Code Analysis HW audio libs 3 4 Analysis on the IPC Buffer for /dev/binder 5 sampled audio. Android Kernel 5 Client/Service Interaction. Hardware Giacomo Bergami (Univ. Bologna) Pjproject su Android November 13th , 2012 6/9
    • Service Interaction Java App+Framework ZygoteInit SystemServer Permission ControllerNative Apps media_server app_processJNI/Native AndroidRuntime (DVM) SystemServer Binder JNI AudioPolicy AudioFlinger Service libhardware _legacy libbinder Kernel /dev/binder
    • Service Interaction Java App+Framework ServerThread.run() ZygoteInit SystemServer Permission fork() ControllerNative Apps SystemServer.main() start/join- executeTransact() ThreadPool() media_server app_processJNI/Native runtime->start() startVm() Call Java AndroidRuntime (DVM) ::istantiate() startReg() ZygoteInit.main() init1() SystemServer Binder JNI AudioPolicy AudioFlinger start/join- ::transact() Service ThreadPool() ::onTransact() publish() libhardware _legacy libbinder Kernel /dev/binder Giacomo Bergami (Univ. Bologna) Pjproject su Android November 13th , 2012 7/9
    • Audio Management Wilhelm AudioPolicyService AudioFlinger AudioRecord ClientThread RecordHandle RecordThread libnbaiolibhardware AudioPolicy libbinder & /dev/binder _legacy ManagerBase
    • Audio Management Wilhelm Realize Start set() AudioPolicyService AudioFlinger AudioRecord getInput() openRecord() re run()getInput() openInput() co rd i ng Al lo we ClientThread RecordHandle d () RecordThread libnbaio checkPermission() getActiveInput()libhardware AudioPolicy libbinder & /dev/binder _legacy ManagerBaseGiacomo Bergami (Univ. Bologna) Pjproject su Android November 13th , 2012 8/9
    • OutcomesAs a final result, porting has been successful: Multi Android-host testing (Galaxy Nexus + Olivetti Olipad + WLAN) VoIP calls through SIP and Pjproject/pjsipOutcomes: Modify wilhelm and extend AOSP with a service as a mediator. Avoiding rooting and upsyscalls with libraries modification. Relation between Java Applications services’ and IPCThreadState. Giacomo Bergami (Univ. Bologna) Pjproject su Android November 13th , 2012 9/9