Android is NOT just 'Java on Linux'.
Android uses Linux kernel. But only kernel. I show you how different Android is from normal Linux systems.
Visit this page.
http://kobablog.wordpress.com/2011/05/22/android-is-not-just-java-on-linux/
I have tried to present maximum detail on android booting sequence in a very abstract way. I hope it would be useful. If you find any correction needed please mention it on comments. Happy Coding :)
I have tried to present maximum detail on android booting sequence in a very abstract way. I hope it would be useful. If you find any correction needed please mention it on comments. Happy Coding :)
In this presentation we will provide in-depth knowledge about the Unity runtime. The first part will focus on memory and how to deal with fragmentation and garbage collection. The second part on performance profiling and optimizations. Finally, there will be an overview of debugging and profiling improvements in the newly announced Unity 5.0.
There are many books, articles and paper publications about Android and related applications but only a few are related to how Android operating system works internally.In this talk we will see how android boots up , an overview of zygote , how system server and package manager works. This talk will be extremely helpful to foster understanding among android developers about Android Internals as well as everybody else who desires a general understanding of the internal working of Android powered devices.
binder-for-linux is an experimental project to evaluate the feasibility of porting Android Binder IPC subsystem to Ubuntu Linux.
GitHub: https://github.com/hungys/binder-for-linux
Slides from Android Builder's Summit 2014 in San Jose, CA
The 4.4 KitKat release includes the results of “Project Svelte”: a set of tweaks to the operating system to make it run more easily on devices with around 512 MiB RAM. This is likely to be especially important for people working with “Embedded Android”, that is, implementing Android on devices that are not smart phones or tablets.
This presentation covers the working model about Process, Thread, system call, Memory operations, Binder IPC, and interactions with Android frameworks.
In this presentation we will provide in-depth knowledge about the Unity runtime. The first part will focus on memory and how to deal with fragmentation and garbage collection. The second part on performance profiling and optimizations. Finally, there will be an overview of debugging and profiling improvements in the newly announced Unity 5.0.
There are many books, articles and paper publications about Android and related applications but only a few are related to how Android operating system works internally.In this talk we will see how android boots up , an overview of zygote , how system server and package manager works. This talk will be extremely helpful to foster understanding among android developers about Android Internals as well as everybody else who desires a general understanding of the internal working of Android powered devices.
binder-for-linux is an experimental project to evaluate the feasibility of porting Android Binder IPC subsystem to Ubuntu Linux.
GitHub: https://github.com/hungys/binder-for-linux
Slides from Android Builder's Summit 2014 in San Jose, CA
The 4.4 KitKat release includes the results of “Project Svelte”: a set of tweaks to the operating system to make it run more easily on devices with around 512 MiB RAM. This is likely to be especially important for people working with “Embedded Android”, that is, implementing Android on devices that are not smart phones or tablets.
This presentation covers the working model about Process, Thread, system call, Memory operations, Binder IPC, and interactions with Android frameworks.
At LinkedIn we run lots of Java services on Linux boxes. Java and Linux are a perfect pair. Except when they're not; then there's fireworks. This talk describes 5 situations we encountered where Java interacted with normal Linux behavior to create stunningly sub-optimal application behavior like minutes-long GC pauses. We'll deep dive to show What Java Got Wrong, why Linux behaves the way it does, and how the two can conspire to ruin your day. Finally we'll examine actual code samples showing how we fixed or hid the problems.
Internal presentation of Docker, Lightweight Virtualization, and linux Containers; at Spotify NYC offices, featuring engineers from Yandex, LinkedIn, Criteo, and NASA!
Docker and Containers are proven solutions, but are they ready to replace your current deployment? And more importantly, are you aware of the changes you'll have to make to accommodate them? Are there any risks involved? This talk will answer these questions and talk about how to plan, automate, build, deploy, and orchestrate the whole process.
My session in Wearable DevCon 2014, Burlingame, CA
[Note: now the conference is called "Wearable Tech Con" ]
The session gives an introduction to using the Java Native Interface (JNI) in Java, and in particular in the Android Platform. The session then covers the use of the Native Development Kit (NDK) for developing Android applications.
This is an old presentation salvaged from archive.
http://tree.celinuxforum.org/CelfPubWiki/JapanTechnicalJamboree13
This is English translated version. Japanese version is here.
http://www.slideshare.net/tetsu.koba/basic-of-virtual-memory-of-linux
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Android is NOT just 'Java on Linux'
1. Android is
NOT just
'Java on Linux'
2011.5.22
2011.10.26 updated
Tetsuyuki Kobayashi
1
2. Let's talk about inside of Android.
http://www.kmckk.co.jp/eng/kzma9/ 2
http://www.kmckk.co.jp/eng/jet_index.html
3. Who am I?
20+ years involved in embedded systems
10 years in real time OS, such as iTRON
10 years in embedded Java Virtual Machine
Now GCC, Linux, QEMU, Android, …
Blogs
http://d.hatena.ne.jp/embedded/ (Personal)
http://blog.kmckk.com/ (Corporate)
http://kobablog.wordpress.com/(English)
Twitter
@tetsu_koba
3
4. Android is NOT just
'Java on Linux'
Android uses Linux kernel. Only kernel.
User land is totally different from usual Linux
system.
Android applications are written in Java
language.
Class libraries are similar to Java SE but not
equal.
Dalvik VM eats only dex code
need to translate from Java byte code in
advance 4
5. Let's explore inside of Android
Assuming you know Linux and Java
very well :)
5
6. Today's topic
Android system architecture
Init – runtime – Zygoto
Dalvik VM
Android specific kernel
drivers
How to build Android
6
7. Today's topic
Android system architecture
Init – runtime – Zygoto
Dalvik VM
Android specific kernel drivers
How to build Android
7
9. Java is the first class citizen in
Android
Dalvik VM is the center of Android
runtime.
Almost all daemon services are written in
Java.
Application life cycle is described by
Java API
9
10. Java is the first class citizen in
Android
NDK
native library called from Java via JNI
This is just a library. Application life
cycle is the same as Java.
Native activity
Only C/C++ to make Apps. (just hidden
JNI part into system.)
not short-cut for C/C++
10
11. Typical Directory Tree of Android
ro: mounted as read only
/ /(root)
(root) initrd (ro)
rw: mounted as read and write
yaffs2 (ro)
/system
/system bin
etc
lib
/data yaffs2 (rw)
/data
usr
/cache yaffs2 (rw)
/cache
/mnt/sdcard removable storage (rw)
/mnt/sdcard
cf. Usual Linux system assumes all file system are read/writable. 11
12. Today's topic
Android system architecture
Init – runtime – Zygoto
Dalvik VM
Android specific kernel
drivers
How to build Android
12
13. Boot sequence
13
quoted from http://hmtsay.blogspot.com/2010/10/android-startup.html
14. init
located on /init
need kernel boot parameter to add
“init=/init”
Static linked.
cf. typical linux init is dynamic
linked.
Doesn't affect even dynamic link
system collapsed.
http://blog.kmckk.com/archives/3137191.html 14
15. Bionic
The standard libraries
libc, libm, pthread, dynamic linker
linker has implicit crash dump function
http://kobablog.wordpress.com/2011/05/12/debuggerd-of-android/
Came from *BSD, not glibc
Currently, doesn't support C++ exception
and RTTI.
latest NDK supports these by static linking.
15
16. Prelinking
Locate dynamic link libraries ahead of
time.
'apriori' command. Different from 'prelink'
command from Red Hat.
Optimized for small embedded system
Allocate fixed address to libraries .
Assume 3GB memory space is large enough
to put all libraries together.
Assume not adding/removing libraries. 16
19. Zygote
fork
Zygote process Child process
classes classes classes classes
classes classes
dynamic link classes classes
dynamic link
Dalvik VM classes libraries Dalvik VM classes libraries
classes classes
classes classes
dynamic link
Dalvik VM classes libraries
Physical memory space (Actually these are mapped by pages.)
19
20. Zygote
Zygote process preloads typical (approx. 1800)
classes and dynamic link libraries so that
childlen start quickly.
Copy-on-write
Only when new process writes page, new page is
allocated.
All pages not be written are shared among all
zygote children.
Exec system call is not used in zygote.
Exec wipes the page mapping table of the process.
It means exec discards zygote cache. 20
21. UID, GID of Applications
UID(user id) and GID(group id) is used for
managing multi-user in usual Linux
system.
Android use this mechanism to isolate
applications.
Each application has unique UID.
Can not read/write other application's files.
Zygote is running as UID=0 (root). After
forking child process, its UID is changed
by setuid system call. 21
22. Today's topic
Android system architecture
Init – runtime – Zygoto
Dalvik VM
Android specific kernel
drivers
How to build Android
22
23. Dalvik VM
executes dex code, which is translated
from Java byte code
16bit, register based
cf. Java bytecode is 8bit, stack based
has JIT from Android 2.2 (Froyo)
http://blog.kmckk.com/archives/2691473.html
has concurrent GC from Android 2.3
(Gingerbread)
http://source.android.com/tech/dalvik/
23
24. Java class libraries
Different from Java ME, which is used in
traditional Japanese phone.
Similar to Java SE. But not equal.
Different window/graphics. No AWT, No
Swing.
No RMI.
Take care to use user defined class loader
dynamic generated classes doesn't work
because Dalvik VM doesn't eat Java class
files but Dex files. 24
25. Caveats of NDK programming
Dynamic libraries built by NDK are linked
with application process.
forked from Zygote but UID != 0 (root).
consider about permissions.
Don't use fork & exec system calls.
Back ground process should be made as
android .app.Service.
Don't use GCC's TLS extension (__thread).
Simple Android dynamic linker does not support it.
java.lang.ThreadLocal is available in Java. 25
26. 3 commands to invoke Dalvik VM
/system/bin/app_process
This is the 'Zygote' process.
/system/bin/dalvikvm
Similar to usual 'java' command.
Try 'dalvikvm -h' to show command line help.
/system/bin/dvz
Send request to Zygote process.
See my blog (Sorry in Japanese)
http://blog.kmckk.com/archives/3551546.html
26
27. Today's topic
Android system architecture
Init – runtime – Zygoto
Dalvik VM
Android specific kernel
drivers
How to build Android
27
28. Linux kernel
Many common Linux device drivers are
available.
Android specific kernel drivers
binder
ashmem
wake lock
logger
…
http://elinux.org/Android_Kernel_Features
These source code is not yet merged to
kernel main line repository. 28
29. Binder
/dev/binder
Base of Inter Process Method Invocation
Not for general purpose. Tuned for specific
transaction.
Multi-thread aware
Have internal data per thread
(CF. Socket have internal data per fd.)
Doesn't use ”write” and ”read” system calls.
Write and read at once by ”ioctl”.
http://blog.kmckk.com/archives/3676340.html 29
30. Ashmem
Android / Anonymous SHared MEMory
subsystem
$(TOP)/system/core/cutils/ashmem.h
int ashmem_create_region(const char *name, size_t size)
→ returns fd
int ashmem_set_prot_region(int fd, int prot)
int ashmem_pin_region(int fd, size_t offset, size_t len)
int ashmem_unpin_region(int fd, size_t offset, size_t len)
Kernel reclaims not ‘pin’ ed memory
Similar to weak reference of Java. Useful to
implement cache.
android.os.MemoryFile from Java program
30
31. Wake lock
Lock to prevent entering sleep mode.
My memos
http://blog.kmckk.com/archives/3298375.html
http://blog.kmckk.com/archives/3304836.html
eLinux wiki
http://elinux.org/Android_Power_Management
31
32. Alarm
kernel implementation to support
Android's AlarmManager.
Wake up even when it was in sleep mode.
32
33. Low memory killer
At the shortage of memory, the kernel
select a process seems low priority and
kill it. (!!)
It's OK. because specification in the
Android application life cycle, application
should be preserve its own status.
http://blog.kmckk.com/archives/2795577.html
33
34. Logger
Android has unique system-wide log
system
http://blog.kmckk.com/archives/2936958.html
http://elinux.org/Android_Logging_System
34
35. Overview of Android Logging System
Target
Java program
Java program System.out
/System.err
com.android.internal.os
Native program android.util.Log com.android.internal.os Host
Native program android.util.Log AndroidPrintStream
AndroidPrintStream
DDMS
stdout
logcat
logcat
stdout liblog
/stderr liblog adbserver
adbd
adbd adbserver
User
Kernel adb logcat
main 64KB radio
logger
logger 64KB
/dev/log/main /dev/log/main
/dev/log/radio event /dev/log/radio
system
/dev/log/event 256KB /dev/log/event
/dev/log/system 64KB /dev/log/system 35
36. Today's topic
Android system architecture
Init – runtime – Zygoto
Dalvik VM
Android specific kernel
drivers
How to build Android
36
37. How to build Android
All source code is available for download
except Google specific services (Google
map, Android market, … )
Easy to download source and build them
See AOSP web site
http://source.android.com/
Or, my blog
http://blog.kmckk.com/archives/3722957.html
37
38. Conclusion
Android system architecture is totally
different from normal Linux systems.
Android uses Linux kernel only,
further more, adding android specific
kernel drivers.
Designed for Java applications.
Tuned for small system.
38