Upload
jorge-barroso
View
379
Download
2
Embed Size (px)
Citation preview
Learning Android with AOSPJorge Juan Barroso Carmona
[email protected] @flipper83 +JorgeJBarroso
Android expert
We embark on every project with a commitment to create something elegant, enduring and effective. That is our heartbeat.
Our approach is uniquely simple and honest, we are a small dedicated software studio, delivering outstanding work.
Karumi is the Rock Solid code software development studio.
Android Open Source Project
+450 projects40Gb free space
16 Gb RAMA lot of patience
Linux Kernel Warelocks / Lowmem / Binder / Logger / Ram Console / …
Libraries Bionic / OpenGL / WebKit …
Native Daemons HAL Init / toolbox
Dalvik / Android Runtime / Zygote
System Services Power Manager / Package Manager / Windows Manager /…
android.*
Stock Android App Launcher3 / Camera2 / Calculator…
java.* Apache
Harmony
Your Apps / Market Apps
App API
Binder
JNI
platform/packages/apps
Samples: Calculator Camera2 Dialer Launcher3
Review Manifests<application android:icon="@mipmap/ic_launcher_calculator" android:label="@string/app_name" android:theme="@style/CalculatorTheme"> <activity android:name=".Calculator" android:label="@string/app_name" android:windowSoftInputMode="stateAlwaysHidden"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <category android:name=“android.intent.category.APP_CALCULATOR"/> </intent-filter> </activity> </application>
Review Manifests
Contacts/manifest:
android:supportsRtl=“true” android:taskAffinity=“android.task.contacts"
<activity-alias/> <data android:mimeType=“…” />
<original-package/> !!
Review Manifests
Permissions:normal
dangerous signature
signatureOrSystem
android.permission.DELETE_PACKAGES: Allows an application to delete packages. Not for use by third-party applications.
Review ManifestsPermissions:
android:sharedUserId=“android.uid.system" android:sharedUserId="android.uid.shared"
Apps in the /system folder. System is not mount for write by default. cat /proc/mounts mount -o rw,remount -t ext4 <block-name> /system
Signed with the same Certificate
Review Manifests
Fun:
android.intent.category.TEST android.intent.category.MONKEY
!android.intent.action.DEVICE_INITIALIZATION_WIZARD
intent priority !!!
Review CodeSample Calculator Reveal:
Review CodeSample Calculator Reveal:
private void reveal(View sourceView, int colorRes, AnimatorListener listener) {
… final Animator revealAnimator = ViewAnimationUtils.createCircularReveal (revealView,revealCenterX, revealCenterY, 0.0f, revealRadius);
… !}
!!
Review CodeUsing the framework:
new ChooseLockSettingsHelper(getActivity(), this) .launchConfirmationActivity(KEYGUARD_REQUEST,"","");
if (resultCode == Activity.RESULT_OK && data != null) { String password = data.getStringExtra (ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD); }
Review Code/*hide*/ :
smClass = Class.forName(“android.os.ServiceManager"); Method getService = smClass.getMethod("getService", String.class); IBinder binder = (IBinder) getService.invoke(null, “power"); IPowerManager powerStub = IPowerManager.Stub. asInterface(binder); powerStub.shutdown(false, true);
provided files('providedLibs/layoutlib.jar')
!