This document discusses the Dalvik virtual machine used in Android and how to decompile Dalvik bytecode using the Dedexer tool. It provides background on Android's use of Java and the Dalvik VM. Key points include: Dalvik uses its own bytecode format rather than Java bytecode and executes applications; the Dedexer tool can be used to disassemble DEX files back into Dalvik bytecode; and differences in Dalvik like its register-based rather than stack-based design are explained. Examples of Dalvik bytecode instructions and register usage are also provided.
(Presentation at HITcon 2011) This talk introduces how to do Android application reverse engineering by real example. And, it covers the advanced topics like optimized DEX and JNI.
Demo of how to dockerise and deploy your microservices application to the test environment, how to run selenium tests inside docker and how to put this all together to integrate your tests in your CI/CD pipeline using Jenkins.
Presented at ATA GTR 2016 in Pune.
What Is Docker? | What Is Docker And How It Works? | Docker Tutorial For Begi...Simplilearn
This presentation on Docker will help you understand DevOps tools, why Docker is needed, Docker vs Virtual Machine, what is Docker, how does a Docker work and components of Docker. Docker is a tool which is used to automate the deployment of the application in lightweight containers so that applications can work efficiently in different environments. A container is a software package that consists of all the dependencies required to run an application. Until now we have been running applications on virtual machines. Every virtual machine used to be the base of our application but now with the advent of Docker and containerization technologies, each application is run in a container like logical space. Now, let us get started and learn what exactly is Docker.
Below topics are explained in this Docker presentation:
1. DevOps and its tools
2. What is Docker?
3. How does Docker work?
4. What are the components of Docker?
Simplilearn's DevOps Certification Training Course will prepare you for a career in DevOps, the fast-growing field that bridges the gap between software developers and operations. You’ll become an expert in the principles of continuous development and deployment, automation of configuration management, inter-team collaboration and IT service agility, using modern DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios. DevOps jobs are highly paid and in great demand, so start on your path today.
Why learn DevOps?
Simplilearn’s DevOps training course is designed to help you become a DevOps practitioner and apply the latest in DevOps methodology to automate your software development lifecycle right out of the class. You will master configuration management; continuous integration deployment, delivery and monitoring using DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios in a practical, hands-on and interactive approach. The DevOps training course focuses heavily on the use of Docker containers, a technology that is revolutionizing the way apps are deployed in the cloud today and is a critical skillset to master in the cloud age.
Who should take this course?
DevOps career opportunities are thriving worldwide. DevOps was featured as one of the 11 best jobs in America for 2017, according to CBS News, and data from Payscale.com shows that DevOps Managers earn as much as $122,234 per year, with DevOps engineers making as much as $151,461. DevOps jobs are the third-highest tech role ranked by employer demand on Indeed.com but have the second-highest talent deficit.
1. This DevOps training course will be of benefit for the following professional roles:
2. Software Developers
3. Technical Project Managers
4. Architects
5. Operations Support
6. Deployment engineers
7. IT managers
8. Development managers
Learn more at: https://www.simplilearn.com/
(Presentation at HITcon 2011) This talk introduces how to do Android application reverse engineering by real example. And, it covers the advanced topics like optimized DEX and JNI.
Demo of how to dockerise and deploy your microservices application to the test environment, how to run selenium tests inside docker and how to put this all together to integrate your tests in your CI/CD pipeline using Jenkins.
Presented at ATA GTR 2016 in Pune.
What Is Docker? | What Is Docker And How It Works? | Docker Tutorial For Begi...Simplilearn
This presentation on Docker will help you understand DevOps tools, why Docker is needed, Docker vs Virtual Machine, what is Docker, how does a Docker work and components of Docker. Docker is a tool which is used to automate the deployment of the application in lightweight containers so that applications can work efficiently in different environments. A container is a software package that consists of all the dependencies required to run an application. Until now we have been running applications on virtual machines. Every virtual machine used to be the base of our application but now with the advent of Docker and containerization technologies, each application is run in a container like logical space. Now, let us get started and learn what exactly is Docker.
Below topics are explained in this Docker presentation:
1. DevOps and its tools
2. What is Docker?
3. How does Docker work?
4. What are the components of Docker?
Simplilearn's DevOps Certification Training Course will prepare you for a career in DevOps, the fast-growing field that bridges the gap between software developers and operations. You’ll become an expert in the principles of continuous development and deployment, automation of configuration management, inter-team collaboration and IT service agility, using modern DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios. DevOps jobs are highly paid and in great demand, so start on your path today.
Why learn DevOps?
Simplilearn’s DevOps training course is designed to help you become a DevOps practitioner and apply the latest in DevOps methodology to automate your software development lifecycle right out of the class. You will master configuration management; continuous integration deployment, delivery and monitoring using DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios in a practical, hands-on and interactive approach. The DevOps training course focuses heavily on the use of Docker containers, a technology that is revolutionizing the way apps are deployed in the cloud today and is a critical skillset to master in the cloud age.
Who should take this course?
DevOps career opportunities are thriving worldwide. DevOps was featured as one of the 11 best jobs in America for 2017, according to CBS News, and data from Payscale.com shows that DevOps Managers earn as much as $122,234 per year, with DevOps engineers making as much as $151,461. DevOps jobs are the third-highest tech role ranked by employer demand on Indeed.com but have the second-highest talent deficit.
1. This DevOps training course will be of benefit for the following professional roles:
2. Software Developers
3. Technical Project Managers
4. Architects
5. Operations Support
6. Deployment engineers
7. IT managers
8. Development managers
Learn more at: https://www.simplilearn.com/
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...Edureka!
This DevOps Docker Tutorial on what is docker ( Docker Tutorial Blog Series: https://goo.gl/32kupf ) will help you understand how to use Docker Hub, Docker Images, Docker Container & Docker Compose. This tutorial explains Docker's working Architecture and Docker Engine in detail. This Docker tutorial also includes a Hands-On session around Docker by the end of which you will learn to pull a centos Docker Image and spin your own Docker Container. You will also see how to launch multiple docker containers using Docker Compose. Finally, it will also tell you the role Docker plays in the DevOps life-cycle.
The Hands-On session is performed on an Ubuntu-64bit machine in which Docker is installed.
installation and configuration Android Studio provides the fastest tools for building apps on every type of Android device.
World-class code editing, debugging, performance tooling, a flexible build system, and an instant build/deploy system all allow you to focus on building unique and high quality apps.
Dart is the language that is used to write and code out Flutter Applications. It's the first step to building your own flutter app. So join us 5th March at 5 PM to learn all about Dart, the most popular language used for building Flutter Applications.
Agenda:
• Basic Syntax, Data Types and Variables
• Conditional Statements and loops
• Functions and Exception Handling
• Class, Objects, Reference and Instance Variables
• Inheritance and Method Overriding
• Arrays, Sets and HashSet, Maps and HashMaps
With growth in app market it is essential to guard our android apps against possible threats, in this presentation we will walk through various tools and techniques which some one can use to reverse engineer an android app, we will see how some one can get access to APP DB, CODE, API, PREFERENCES.
We will also see different tools and techniques to guard our app against possible threats from code obfuscation with tools like dexgaurd to newer methods like verification of api calls using google play services.
This session was taken in Barcamp 13 bangalore http://barcampbangalore.org/bcb/bcb13/reverse-engineering-an-android-app-securing-your-android-apps-against-attacks
and bangalore android user group meetup Jan meetup http://www.meetup.com/blrdroid/events/100360682/
Android Studio is the official IDE for Android application development, based on IntelliJ IDEA. In this presentation we tried to show overall structure of android studio.
Comment débuter en devops et apprendre à réaliser son premier pipeline. Très facilement et en toute simplicité.
Une formation gratuite pour s'initier au devops.
https://youtu.be/tiSfXCM8VTw
https://gitlab.com/xavki/pipeline-saison-1
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Simplilearn
This presentation about Docker tutorial will help you understand what is Docker, advantages of Docker, how does Docker work, components of Docker, virtual machine vs Docker, advanced concepts in Docker, basic Docker commands along with a demo. A Docker is an OS-level virtualization software that enables developers and IT administrators to create, deploy and run applications in a Docker container with all their dependencies. It is said to be a very light-weight software container and containerization platform. Docker engine or Docker is a client-server application that builds and executes using Docker components. Rapid deployment, portability, better efficiency, faster configuration, scalability, security are some of the advantages you get by using Docker.
Below topics are explained in this Docker presentation:
1. Virtual machine vs Docker
2. What is Docker?
3. Advantages of Docker
4. How does Docker work?
5. Components of Docker
6. Advanced concepts in Docker
7. Basic Docker commands
Why learn DevOps?
Simplilearn’s DevOps training course is designed to help you become a DevOps practitioner and apply the latest in DevOps methodology to automate your software development lifecycle right out of the class. You will master configuration management; continuous integration deployment, delivery and monitoring using DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios in a practical, hands-on and interactive approach. The DevOps training course focuses heavily on the use of Docker containers, a technology that is revolutionizing the way apps are deployed in the cloud today and is a critical skillset to master in the cloud age.
After completing the DevOps training course you will achieve hands-on expertise in various aspects of the DevOps delivery model. The practical learning outcomes of this Devops training course are:
An understanding of DevOps and the modern DevOps toolsets
The ability to automate all aspects of a modern code delivery and deployment pipeline using:
1. Source code management tools
2. Build tools
3. Test automation tools
4. Containerization through Docker
5. Configuration management tools
6. Monitoring tools
Who should take this course?
DevOps career opportunities are thriving worldwide. DevOps was featured as one of the 11 best jobs in America for 2017, according to CBS News, and data from Payscale.com shows that DevOps Managers earn as much as $122,234 per year, with DevOps engineers making as much as $151,461. DevOps jobs are the third-highest tech role ranked by employer demand on Indeed.com but have the second-highest talent deficit.
This DevOps training course will be of benefit the following professional roles:
1. Software Developers
2. Technical Project Managers
3. Architects
4. Operations Support
5. Deployment engineers
6. IT managers
7. Development managers
You can learn more at https://www.simplilearn.com/cloud-computing/devops-practitioner-certification-training
Presented Docker in 15 minutes with two of my classmates at school.
Presentation covering topics:
Virtualization
Virtual Machines
Container Technology (Docker)
Docker Compose
Docker Swarm
The demo can be found at:
https://github.com/DanishKhakwani/SimpleDockerDemo
Core Java Tutorial. In case you want to get trained in Spring Framework you can refer here:
<a href="https://www.emexotechnologies.com/courses/java-development-training/core-java-training/">Java Training</a>
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...Edureka!
This DevOps Docker Tutorial on what is docker ( Docker Tutorial Blog Series: https://goo.gl/32kupf ) will help you understand how to use Docker Hub, Docker Images, Docker Container & Docker Compose. This tutorial explains Docker's working Architecture and Docker Engine in detail. This Docker tutorial also includes a Hands-On session around Docker by the end of which you will learn to pull a centos Docker Image and spin your own Docker Container. You will also see how to launch multiple docker containers using Docker Compose. Finally, it will also tell you the role Docker plays in the DevOps life-cycle.
The Hands-On session is performed on an Ubuntu-64bit machine in which Docker is installed.
installation and configuration Android Studio provides the fastest tools for building apps on every type of Android device.
World-class code editing, debugging, performance tooling, a flexible build system, and an instant build/deploy system all allow you to focus on building unique and high quality apps.
Dart is the language that is used to write and code out Flutter Applications. It's the first step to building your own flutter app. So join us 5th March at 5 PM to learn all about Dart, the most popular language used for building Flutter Applications.
Agenda:
• Basic Syntax, Data Types and Variables
• Conditional Statements and loops
• Functions and Exception Handling
• Class, Objects, Reference and Instance Variables
• Inheritance and Method Overriding
• Arrays, Sets and HashSet, Maps and HashMaps
With growth in app market it is essential to guard our android apps against possible threats, in this presentation we will walk through various tools and techniques which some one can use to reverse engineer an android app, we will see how some one can get access to APP DB, CODE, API, PREFERENCES.
We will also see different tools and techniques to guard our app against possible threats from code obfuscation with tools like dexgaurd to newer methods like verification of api calls using google play services.
This session was taken in Barcamp 13 bangalore http://barcampbangalore.org/bcb/bcb13/reverse-engineering-an-android-app-securing-your-android-apps-against-attacks
and bangalore android user group meetup Jan meetup http://www.meetup.com/blrdroid/events/100360682/
Android Studio is the official IDE for Android application development, based on IntelliJ IDEA. In this presentation we tried to show overall structure of android studio.
Comment débuter en devops et apprendre à réaliser son premier pipeline. Très facilement et en toute simplicité.
Une formation gratuite pour s'initier au devops.
https://youtu.be/tiSfXCM8VTw
https://gitlab.com/xavki/pipeline-saison-1
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...Simplilearn
This presentation about Docker tutorial will help you understand what is Docker, advantages of Docker, how does Docker work, components of Docker, virtual machine vs Docker, advanced concepts in Docker, basic Docker commands along with a demo. A Docker is an OS-level virtualization software that enables developers and IT administrators to create, deploy and run applications in a Docker container with all their dependencies. It is said to be a very light-weight software container and containerization platform. Docker engine or Docker is a client-server application that builds and executes using Docker components. Rapid deployment, portability, better efficiency, faster configuration, scalability, security are some of the advantages you get by using Docker.
Below topics are explained in this Docker presentation:
1. Virtual machine vs Docker
2. What is Docker?
3. Advantages of Docker
4. How does Docker work?
5. Components of Docker
6. Advanced concepts in Docker
7. Basic Docker commands
Why learn DevOps?
Simplilearn’s DevOps training course is designed to help you become a DevOps practitioner and apply the latest in DevOps methodology to automate your software development lifecycle right out of the class. You will master configuration management; continuous integration deployment, delivery and monitoring using DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios in a practical, hands-on and interactive approach. The DevOps training course focuses heavily on the use of Docker containers, a technology that is revolutionizing the way apps are deployed in the cloud today and is a critical skillset to master in the cloud age.
After completing the DevOps training course you will achieve hands-on expertise in various aspects of the DevOps delivery model. The practical learning outcomes of this Devops training course are:
An understanding of DevOps and the modern DevOps toolsets
The ability to automate all aspects of a modern code delivery and deployment pipeline using:
1. Source code management tools
2. Build tools
3. Test automation tools
4. Containerization through Docker
5. Configuration management tools
6. Monitoring tools
Who should take this course?
DevOps career opportunities are thriving worldwide. DevOps was featured as one of the 11 best jobs in America for 2017, according to CBS News, and data from Payscale.com shows that DevOps Managers earn as much as $122,234 per year, with DevOps engineers making as much as $151,461. DevOps jobs are the third-highest tech role ranked by employer demand on Indeed.com but have the second-highest talent deficit.
This DevOps training course will be of benefit the following professional roles:
1. Software Developers
2. Technical Project Managers
3. Architects
4. Operations Support
5. Deployment engineers
6. IT managers
7. Development managers
You can learn more at https://www.simplilearn.com/cloud-computing/devops-practitioner-certification-training
Presented Docker in 15 minutes with two of my classmates at school.
Presentation covering topics:
Virtualization
Virtual Machines
Container Technology (Docker)
Docker Compose
Docker Swarm
The demo can be found at:
https://github.com/DanishKhakwani/SimpleDockerDemo
Core Java Tutorial. In case you want to get trained in Spring Framework you can refer here:
<a href="https://www.emexotechnologies.com/courses/java-development-training/core-java-training/">Java Training</a>
This is a beginner-level programming session where you will learn the fundamentals of Java. Between each lesson, you'll have skill testing in the form of quizzes, as well as hands-on experience in the field.
Dart is a new language for the web, enabling you to write JavaScript on a secure and manageable way. No need to worry about "JavaScript: The bad parts".
This presentation concentrates on the developer experience converting from the Java based GWT to Dart.
Golang becomes more and more popular: new projects are developed in this language and the old ones migrate to it. Why is Go loved by developers, wanted by clients and preferred by architects? Find the answers in this video.
This presentation was held by Sergii Shapoval (Senior Software Engineer, Consultant, GlobalLogic) at GlobalLogic Kyiv Java Career Day #2 on December 1, 2018.
Video: https://youtu.be/wSSgY_Du9zY
Learn more: https://www.globallogic.com/ua/events/globallogic-kyiv-java-career-day-2-summary
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.
How do we go from your Java code to the CPU assembly that actually runs it? Using high level constructs has made us forget what happens behind the scenes, which is however key to write efficient code.
Starting from a few lines of Java, we explore the different layers that constribute to running your code: JRE, byte code, structure of the OpenJDK virtual machine, HotSpot, intrinsic methds, benchmarking.
An introductory presentation to these low-level concerns, based on the practical use case of optimizing 6 lines of code, so that hopefully you to want to explore further!
Presentation given at the Toulouse (FR) Java User Group.
Video (in french) at https://www.youtube.com/watch?v=rB0ElXf05nU
Slideshow with animations at https://docs.google.com/presentation/d/1eIcROfLpdTU2_Z_IKiMG-AwqZGZgbN1Bs2E0nGShpbk/pub?start=true&loop=false&delayms=60000
What is Java Technology (An introduction with comparision of .net coding)Shaharyar khan
A introductory slides for those who want to learn and know some basics of Java.Also for those persons who want to compare coding difference between Java and .net
Java is a general-purpose computer-programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible
Dataflow-based heterogeneous code generator for IoT applicationsGabor Paller
This is the presentation of our conference paper, https://www.researchgate.net/publication/331319887_Dataflow-based_heterogeneous_code_generator_for_IoT_applications
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
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
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
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/
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Understanding the Dalvik bytecode with the Dedexer tool
1. Understanding the Dalvik bytecode with the
Dedexer tool
Gabor Paller
gaborpaller@gmail.com
2009.12.02
2. Background
● As we all know, Android is a Linux-Java
platform.
● The underlying operating system is a version of
Linux
● The application model exposed to the developer is
Java-based
● Android is not Java
● Google does not use the Java logo in relation with
Android
● Android application model has no relationship with
any Java standard (JSR)
3. Dalvik
● At the core of Android, there is the proprietary
Dalvik virtual machine executing Android
programs.
● Some interesting Dalvik properties
● It lives in symbiosis with the Linux process/access
right system to provide application separation
● It has its own bytecode format which is in distant
relationship with the Java bytecode format
4. Life of a Java application in Android
● Java is just a front-end
● Developer codes in Java
● The source code is compiled by the Java compiler
into .class files
● Then the dx (dexer) tool which is part of the Android
SDK processes the .class files into Dalvik's
proprietary format
● The result of a proprietary file format called DEX
that contains Dalvik bytecode.
● The format has only distant relationship with the
Java bytecode
5. Why should you care?
● Well, you shouldn't
● You have to dig very deep to find discrepancies
between the execution environment projected by
Dalvik and JVM (dynamic code generation,
classloading).
● If you develop your own language (like Simple), you
may compile directly to Dalvik bytecode. Even in
this case there is an option of compiling to Java
bytecode first and leave the Dalvik bytecode to dx.
● Big exception: reverse engineering
7. Disassembly options
● For binary XML files, use a binary-to-textual
XML converter like AXMLPrinter2
● For the DEX file, use dedexer
● Alternative products:
– Dexdump – comes with the Android SDK, less convenient
to use than dedexer because e.g. it does not support
labels, produces one large file, etc.
– Baksmali – a competing open-source DEX disassembler.
Comes with a Dalvik bytecode assembler (smali)
● In any case, you have to live with Dalvik
bytecode disassembly – there's no way back to
Java presently!
8. Using dedexer
● Download ddx.jar from
http://dedexer.sourceforge.net
● Unpack the DEX file from the APK file.
● Issue:
java -jar ddx.jar -d target_dir source_dex_file
● The decompiled files will be produced in
target_dir with .ddx extension. We will learn,
how to read those files.
9. The DEX format
● Main difference between the standard Java
.class and DEX is that all the classes of the
application are packed into one file.
● This is not just packing, all the classes in the same
DEX file share the same field, method, etc. tables.
● In Dalvik, classes from the same DEX file are
loaded by the same class loader instance.
10. Single DEX file vs. many .class files
● Let's see the numbers
● Example class set: total of 11 .class files, sum of
sizes: 21395 bytes.
● Converted into DEX: 17664 bytes, 17% gain.
● Zipping both (JAR packing and APK packing does
this):
– 13685 bytes (.class)
– 9148 bytes (DEX)
– 33% gain!
● The DEX format is more suitable for mobile
computing due to its more dense encoding.
11. Register- and stack-based VMs
● Standard JVM is stack-based. Operations remove
inputs from the stack and put result(s) back onto the
stack.
– One stack level can hold any type (char to float).
– Double and long values need two consecutive stack
levels.
● Dalvik is register-based.
– Virtual registers – up to 64k registers although most
instructions can use only the first 256.
– One register can hold any type (char to float)
– Double and long values need two consecutive registers.
12. Register vs. stack example:
Java original
public int method( int i1,int i2 ) {
int i3 = i1*i2;
return i3*2;
}
13. Register vs. stack example:
Java bytecode
.method public method(II)I
.limit locals 4
.var 0 is this LTest2; from Label0 to Label1 ; “this”
.var 1 is arg0 I from Label0 to Label1 ; argument #1
.var 2 is arg1 I from Label0 to Label1 ; argument #2
Label0:
iload_1 ; load local variable #1 onto the stack
iload_2 ; load local variable #2 onto the stack
imul ; pop the two topmost stack level, multiply
them, push the result back onto the stack
istore_3 ; store into local variable #3
iload_3 ; load local variable #3 onto the stack
iconst_2 ; push constant 2 onto the stack
imul ; multiply, push back the result
Label1:
ireturn
.end method
15. Dalvik register frames
● Dalvik registers behave more like local
variables
● Each method has a fresh set of registers.
● Invoked methods don't affect the registers of
invoking methods.
16. Which one is better?
● Current processors are register-based
● Register-based bytecode is easier to map
● Stack needs memory access
● Stack is slower than registers.
● Eventually it all depends on the JIT compiler
which turns stack operations into register
operations.
● However, if the bytecode is register-based, JIT
compiler may be simpler-> smaller ROM
footprint!
17. Types
● No surprises for those who know Java bytecode.
● Base types
● I – int
● J – long
● Z – boolean
● D – double
● F – float
● S – short
● C – char
● V – void (when return value)
● Classes: Ljava/lang/Object;
● Arrays: [I, [Ljava/lang/Object;, [[I
● List of types: simple concatenation
● obtainStyledAttributes(Landroid/util/AttributeSet;[III)
18. Methods
● Rich meta-information is assigned to Dalvik
methods (just like in Java VM)
● Method meta-information:
● Signature
● Try-catch information
● Annotations
● Number of registers used
● Debug information
– Line numbers
– Local variable lifetime
19. Method head example
.method private callEnumValues()[Ljava/lang/Object;
.annotation systemVisibility
Ldalvik/annotation/Signature;
value [Ljava/lang/String; = { "()[TT;" }
.end annotation
.limit registers 6
; this: v5 (Ljava/lang/ClassCache;)
.catch java/lang/IllegalAccessException from lbc5b4 to
lbc5ce using lbc5e0
.catch java/lang/reflect/InvocationTargetException from
lbc5b4 to lbc5ce using lbc5f0
.catch java/lang/NoSuchMethodException from lbc58c to
lbc5b0 using lbc5d0
.var 5 is this Ljava/lang/ClassCache; from lbc58c to
lbc59e
20. Method invocations
● Methods are
● Static if the “this” argument is not implicitly provided
as the first argument.
● Direct if they cannot be overridden
– In this case they are invoked directly, without involving
vtable
– private methods, constructors
● Virtual if they can be overridden in child classes
– In this case they are invoked using a vtable associated to
the class.
21. Method invocations, 2.
● invoke-virtual
{v1,v2},java/lang/StringBuilder/append
;append(Ljava/lang/String;)Ljava/lang/StringBui
der;
; v1 : Ljava/lang/StringBuilder; , v2 :
Ljava/langString;
move-result-object v1
; v1 : Ljava/lang/StringBuilder;
● Observe:
● That the first argument of the method invocation is “this” as
this is a non-static method.
● That invoked method does not corrupt the invoking method's
registers.
● That the method return value must be obtained by a special
instruction family (move-result-*)
31. Solution 4.
private int read( InputStream is ) {
int c = 0;
try {
c = is.read();
} catch( IOException ex ) {
c = -1;
}
return c;
}
32. DEX optimization
● Before execution, DEX files are optimized.
● Normally it happens before the first execution of code from the DEX file
● Combined with the bytecode verification
● In case of DEX files from APKs, when the application is launched for the
first time.
● Process
● The dexopt process (which is actually a backdoor to the Dalvik VM)
loads the DEX, replaces certain instructions with their optimized
counterparts
● Then writes the resulting optimized DEX (ODEX) file into the
/data/dalvik-cache directory
● It is assumed that the optimized DEX file will be executed on the same
VM that optimized it! ODEX files are not portable across VMs.
34. The role of optimization
● Sets byte ordering and structure alignment
(remember the data-array in exercise 3.)
● Aligns the member variables to 4/8 byte
boundary (the structures in the DEX/ODEX file
itself are 32-bit aligned)
● Significant optimizations because of the
elimination of symbolic field/method lookup at
runtime.
● Helps the JIT compiler making it simpler and
faster
35. Dependencies
● In order to guarantee integrity of the field
offsets/vtable indexes, Dalvik must make sure
that the same set of dependent ODEX files
(ODEX files from which the current ODEX file
uses a class) is used for execution and for the
optimization.
● The list of dependent ODEX files are stored in
the ODEX file, along with their hash.
● If the ODEX file is digitally signed, this prevents
tampering.
36. ODEX disassembly
● If the dependency files are available, Dedexer
can disassemble an ODEX file back to symbolic
format.
● Go to /dalvik/dalvik-cache on the system the ODEX
file comes from.
● Fetch the files you find there into a directory of your
development machine.
● Use the -e flag when you invoke the disassembler.
38. Conclusion
● Dalvik is a clever compromise between
preserving the developer's knowledge of Java
and a proprietary, mobile-optimized VM
● Except for deep system programming (e.g. juggling
with classloaders), the developer is not aware that
Dalvik is not a JVM.
● The DEX format can be up to 30% more
efficient when it comes to compressed size.
39. Conclusions 2.
● The register-based bytecode can be interpreted
with sufficiently high speed after some simple
optimizations.
● When JIT is used, JIT compiler may be simpler
hence needing less memory.
● Biggest gap: Dalvik (as released today) has
only mark&sweep GC.
● On the importance of GC: G. Paller: Increasing Java Performance in
Memory-Constrained Environments by Using Explicit Memory
Deallocation,
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.59.9268