SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
Android Storage –
StorageManager & OBB
William.L
wiliwe@gmail.com
Date: 2011-11-08
Outline
Introduction
Usage of OBB
Good Point of OBB
Introduction
What is StorageManager?
Since Android Gingerbread 2.3
The interface to the system’s storage service,
MountService, for Android applications
Handle storage-related items such as Opaque Binary Blobs
(OBB)
Code
AndroidSrc/frameworks/base/core/java/android/os/storage/St
orageManager.java
Usage
By calling getService(Context.STORAGE_SERVICE)
STORAGE_SERVICE represents “storage”
Ex : StorageManager stMgr =
(StorageManager)getService(Context.STORAGE_SERVIC
E)
What is OBB? (1/3)
Opaque Binary Blob, since Gingerbread 2.3
A file contains a filesystem that maybe be
encrypted on disk and mounted on-demand from
an application
A good way of providing large amounts of binary
assets without packaging them into APKs as
they may be multiple gigabytes
What is OBB? (2/3)
Other names
Disk Image / Virtual Drive / Virtual Disk Image /
Virtual Optical Drive file (虛擬光碟虛擬光碟虛擬光碟虛擬光碟)
Mount on the Linux LOOP device(total 7 devices)
Ex : sudo losetup /dev/loop0 Virtual-Disk-File
sudo mount /dev/loop0 /mnt/Mount-Point
What is OBB? (3/3)
……….
File
File
File
Folder
File
File
File
An OBB File
Usage (1/6)
The following steps are steps to create an OBB
file
Based on Androind Honeycomb 3.2
environment and its tools
Load needed modules :
sudo modprobe cryptoloop
sudo modprobe twofish
sudo modprobe vfat
Under your home directory, create a folder
named "obbdir“
Usage (2/6)
Enter "obbdir" folder and create some files
Here are hello321test.txt, hello.txt, test123.txt for example
Create an OBB file using the command
sudo AndroidSrc/frameworks/base/tools/obbtool/mkobb.sh -d OBB-Directory -k
Password -o ObbFile
Ex :
sudo AndroidSrc/frameworks/base/tools/obbtool/mkobb.sh -d ~/obbdir/ -k 1234 -o
obbtest.obb
“1234” is the password / key used by an OBB application
to open this OBB file
Usage (3/6)
The output messages after executing "mkobb.sh“ may look
like:
“3c7150b91013237e” of the last line is the salt key and
need to write down for later OBB file signing process
Usage (4/6)
Cause to the identity to execute “mkobb.sh” is root,
the created OBB file's owner is root
So we change the owner of "obbtest.obb" before doing next
step
sudo chown YourName:YourName obbtest.obb
Sign the created OBB file using "obbtool“ tool
AndroidSrc/out/host/linux-x86/bin/obbtool a -n APK-Package-Name -v 1 ObbFile -s
SaltKeyFrom-mkobb.sh
Ex :
AndroidSrc/out/host/linux-x86/bin/obbtool a -n com.example.android.obbapp -v 1
obbtest.obb -s 3c7150b91013237e
Usage (5/6)
obbtool Parameters
-n with "package name" of your application (APK)
-v with user defined version number of the OBB file
-s with the salt key generated by "mkobb.sh"
Output messages after executing "obbtool" will look like
If you want to REMOVE signature, do :
AndroidSrc/out/host/linux-x86/bin/obbtool r ObbFile
Ex : AndroidSrc/out/host/linux-x86/bin/obbtool r obbtest.obb
Usage (6/6)
Now, you can use the OBB file with corresponding
OBB APKs with the valid key(assigned when using
mkobb.sh) and Package-Name (assigned when
using obbtool)
Good Point of OBB
Security
Only the APK with the valid key and matched
package name could open the signed OBB file
containing private or important files
An OBB APK Example (1/3)
An OBB APK Example (2/3)
An OBB APK Example (3/3)
Mounted OBB file
OBB Testing File Source (GitHub)
https://github.com/wiliwe/android-obb-example.git
Reference
http://julianshen.blogspot.com/2011/01/android-
gingerbread-storagemanager-and.html
http://stackoverflow.com/questions/4524981/what-is-
obbopaque-binary-blob-in-android-develop-site
http://developer.android.com/reference/android/os/st
orage/StorageManager.html
http://en.wikipedia.org/wiki/Opaque_binary_blob

Más contenido relacionado

La actualidad más candente

Android technology- Advantages & Limitations
Android technology- Advantages & LimitationsAndroid technology- Advantages & Limitations
Android technology- Advantages & Limitations
Vaibhav Dixit
 
Android audio system(audioflinger)
Android audio system(audioflinger)Android audio system(audioflinger)
Android audio system(audioflinger)
fefe7270
 

La actualidad más candente (20)

Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
Android security in depth
Android security in depthAndroid security in depth
Android security in depth
 
Broadcast Receiver
Broadcast ReceiverBroadcast Receiver
Broadcast Receiver
 
android phone ppt
android phone pptandroid phone ppt
android phone ppt
 
Android Security
Android SecurityAndroid Security
Android Security
 
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEMDATA PERSISTENCE IN ANDROID OPERATING SYSTEM
DATA PERSISTENCE IN ANDROID OPERATING SYSTEM
 
Page cache in Linux kernel
Page cache in Linux kernelPage cache in Linux kernel
Page cache in Linux kernel
 
Unix - An Introduction
Unix - An IntroductionUnix - An Introduction
Unix - An Introduction
 
Android technology- Advantages & Limitations
Android technology- Advantages & LimitationsAndroid technology- Advantages & Limitations
Android technology- Advantages & Limitations
 
Android 10
Android 10Android 10
Android 10
 
Avro introduction
Avro introductionAvro introduction
Avro introduction
 
Android Automotive
Android AutomotiveAndroid Automotive
Android Automotive
 
Giới thiệu Nuxt.js
Giới thiệu Nuxt.jsGiới thiệu Nuxt.js
Giới thiệu Nuxt.js
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Evolution of android operating system
Evolution of android operating systemEvolution of android operating system
Evolution of android operating system
 
OWASP - Dependency Check
OWASP - Dependency CheckOWASP - Dependency Check
OWASP - Dependency Check
 
Container security
Container securityContainer security
Container security
 
Android audio system(audioflinger)
Android audio system(audioflinger)Android audio system(audioflinger)
Android audio system(audioflinger)
 
Binder: Android IPC
Binder: Android IPCBinder: Android IPC
Binder: Android IPC
 
Android malware presentation
Android malware presentationAndroid malware presentation
Android malware presentation
 

Destacado

GNOME GeoClue - The Geolocation Service in Gnome
GNOME GeoClue - The Geolocation Service in GnomeGNOME GeoClue - The Geolocation Service in Gnome
GNOME GeoClue - The Geolocation Service in Gnome
William Lee
 
Introdunction To Network Management Protocols SNMP & TR-069
Introdunction To Network Management Protocols SNMP & TR-069Introdunction To Network Management Protocols SNMP & TR-069
Introdunction To Network Management Protocols SNMP & TR-069
William Lee
 
CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)
William Lee
 
Qt Development Tools
Qt Development ToolsQt Development Tools
Qt Development Tools
William Lee
 

Destacado (19)

Android Storage - Internal and External Storages
Android Storage - Internal and External StoragesAndroid Storage - Internal and External Storages
Android Storage - Internal and External Storages
 
MGCP Overview
MGCP OverviewMGCP Overview
MGCP Overview
 
Introduction to SIP(Session Initiation Protocol)
Introduction to SIP(Session Initiation Protocol)Introduction to SIP(Session Initiation Protocol)
Introduction to SIP(Session Initiation Protocol)
 
MTP & PTP
MTP & PTPMTP & PTP
MTP & PTP
 
Usage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesUsage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP Languages
 
[Android] Data Storage
[Android] Data Storage[Android] Data Storage
[Android] Data Storage
 
Android GDB Debugging (Chinese)
Android GDB Debugging (Chinese)Android GDB Debugging (Chinese)
Android GDB Debugging (Chinese)
 
Android Debugging (Chinese)
Android Debugging (Chinese)Android Debugging (Chinese)
Android Debugging (Chinese)
 
Android Services and Managers Basic
Android Services and Managers BasicAndroid Services and Managers Basic
Android Services and Managers Basic
 
GNOME GeoClue - The Geolocation Service in Gnome
GNOME GeoClue - The Geolocation Service in GnomeGNOME GeoClue - The Geolocation Service in Gnome
GNOME GeoClue - The Geolocation Service in Gnome
 
Moblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) PluginMoblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) Plugin
 
Usage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxUsage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on Linux
 
Introdunction To Network Management Protocols SNMP & TR-069
Introdunction To Network Management Protocols SNMP & TR-069Introdunction To Network Management Protocols SNMP & TR-069
Introdunction To Network Management Protocols SNMP & TR-069
 
CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)
 
Qt Animation
Qt AnimationQt Animation
Qt Animation
 
Qt Development Tools
Qt Development ToolsQt Development Tools
Qt Development Tools
 
Android Logging System
Android Logging SystemAndroid Logging System
Android Logging System
 
Asterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log RotationAsterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log Rotation
 
IPv6 Overview
IPv6 OverviewIPv6 Overview
IPv6 Overview
 

Similar a Android Storage - StorageManager & OBB

Building services using windows azure
Building services using windows azureBuilding services using windows azure
Building services using windows azure
Suliman AlBattat
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
NAVER D2
 
upload.txt
upload.txtupload.txt
upload.txt
IshNexus
 

Similar a Android Storage - StorageManager & OBB (20)

Mdb dn 2016_07_elastic_search
Mdb dn 2016_07_elastic_searchMdb dn 2016_07_elastic_search
Mdb dn 2016_07_elastic_search
 
Building services using windows azure
Building services using windows azureBuilding services using windows azure
Building services using windows azure
 
Mdb dn 2016_06_query_primer
Mdb dn 2016_06_query_primerMdb dn 2016_06_query_primer
Mdb dn 2016_06_query_primer
 
Spring Boot with Microsoft Azure Integration.pdf
Spring Boot with Microsoft Azure Integration.pdfSpring Boot with Microsoft Azure Integration.pdf
Spring Boot with Microsoft Azure Integration.pdf
 
uploaded at 10:56
uploaded at 10:56uploaded at 10:56
uploaded at 10:56
 
upload.txt
upload.txtupload.txt
upload.txt
 
Docker as an every day work tool
Docker as an every day work toolDocker as an every day work tool
Docker as an every day work tool
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in description
 
Mongo db
Mongo dbMongo db
Mongo db
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
 
How to Build & Use OpenCL on OpenCV & Android NDK
How to Build & Use OpenCL on OpenCV & Android NDKHow to Build & Use OpenCL on OpenCV & Android NDK
How to Build & Use OpenCL on OpenCV & Android NDK
 
Mdb dn 2016_09_34_features
Mdb dn 2016_09_34_featuresMdb dn 2016_09_34_features
Mdb dn 2016_09_34_features
 
edit and approve 2
edit and approve 2edit and approve 2
edit and approve 2
 
upload.txt
upload.txtupload.txt
upload.txt
 
upload.txt
upload.txtupload.txt
upload.txt
 
upload.txt
upload.txtupload.txt
upload.txt
 
MongoDB Developer's Notebook, March 2016 -- MongoDB Connector for Business In...
MongoDB Developer's Notebook, March 2016 -- MongoDB Connector for Business In...MongoDB Developer's Notebook, March 2016 -- MongoDB Connector for Business In...
MongoDB Developer's Notebook, March 2016 -- MongoDB Connector for Business In...
 
Introduction to mongodb
Introduction to mongodbIntroduction to mongodb
Introduction to mongodb
 
Plone FSR
Plone FSRPlone FSR
Plone FSR
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 

Más de William Lee

Study of Chromium OS
Study of Chromium OSStudy of Chromium OS
Study of Chromium OS
William Lee
 
More Details about TR-069 (CPE WAN Management Protocol)
More Details about TR-069 (CPE WAN Management Protocol)More Details about TR-069 (CPE WAN Management Protocol)
More Details about TR-069 (CPE WAN Management Protocol)
William Lee
 
Introdunction to Network Management Protocols - SNMP & TR-069
Introdunction to Network Management Protocols - SNMP & TR-069Introdunction to Network Management Protocols - SNMP & TR-069
Introdunction to Network Management Protocols - SNMP & TR-069
William Lee
 

Más de William Lee (18)

Usage Note of SWIG for PHP
Usage Note of SWIG for PHPUsage Note of SWIG for PHP
Usage Note of SWIG for PHP
 
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
 
Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3
 
Viewing Android Source Files in Eclipse (Chinese)
Viewing Android Source Files in Eclipse  (Chinese)Viewing Android Source Files in Eclipse  (Chinese)
Viewing Android Source Files in Eclipse (Chinese)
 
Usage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency WalkerUsage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency Walker
 
Usage Note of PlayCap
Usage Note of PlayCapUsage Note of PlayCap
Usage Note of PlayCap
 
Qt4 App - Sliding Window
Qt4 App - Sliding WindowQt4 App - Sliding Window
Qt4 App - Sliding Window
 
GTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App ChooserGTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App Chooser
 
GTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon ChooserGTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon Chooser
 
Note of CGI and ASP
Note of CGI and ASPNote of CGI and ASP
Note of CGI and ASP
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5
 
C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)
 
Internationalization(i18n) of Web Page
Internationalization(i18n) of Web PageInternationalization(i18n) of Web Page
Internationalization(i18n) of Web Page
 
Notes for SQLite3 Usage
Notes for SQLite3 UsageNotes for SQLite3 Usage
Notes for SQLite3 Usage
 
Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)
 
Study of Chromium OS
Study of Chromium OSStudy of Chromium OS
Study of Chromium OS
 
More Details about TR-069 (CPE WAN Management Protocol)
More Details about TR-069 (CPE WAN Management Protocol)More Details about TR-069 (CPE WAN Management Protocol)
More Details about TR-069 (CPE WAN Management Protocol)
 
Introdunction to Network Management Protocols - SNMP & TR-069
Introdunction to Network Management Protocols - SNMP & TR-069Introdunction to Network Management Protocols - SNMP & TR-069
Introdunction to Network Management Protocols - SNMP & TR-069
 

Último

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Último (20)

A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 

Android Storage - StorageManager & OBB

  • 1. Android Storage – StorageManager & OBB William.L wiliwe@gmail.com Date: 2011-11-08
  • 4. What is StorageManager? Since Android Gingerbread 2.3 The interface to the system’s storage service, MountService, for Android applications Handle storage-related items such as Opaque Binary Blobs (OBB) Code AndroidSrc/frameworks/base/core/java/android/os/storage/St orageManager.java Usage By calling getService(Context.STORAGE_SERVICE) STORAGE_SERVICE represents “storage” Ex : StorageManager stMgr = (StorageManager)getService(Context.STORAGE_SERVIC E)
  • 5. What is OBB? (1/3) Opaque Binary Blob, since Gingerbread 2.3 A file contains a filesystem that maybe be encrypted on disk and mounted on-demand from an application A good way of providing large amounts of binary assets without packaging them into APKs as they may be multiple gigabytes
  • 6. What is OBB? (2/3) Other names Disk Image / Virtual Drive / Virtual Disk Image / Virtual Optical Drive file (虛擬光碟虛擬光碟虛擬光碟虛擬光碟) Mount on the Linux LOOP device(total 7 devices) Ex : sudo losetup /dev/loop0 Virtual-Disk-File sudo mount /dev/loop0 /mnt/Mount-Point
  • 7. What is OBB? (3/3) ………. File File File Folder File File File An OBB File
  • 8. Usage (1/6) The following steps are steps to create an OBB file Based on Androind Honeycomb 3.2 environment and its tools Load needed modules : sudo modprobe cryptoloop sudo modprobe twofish sudo modprobe vfat Under your home directory, create a folder named "obbdir“
  • 9. Usage (2/6) Enter "obbdir" folder and create some files Here are hello321test.txt, hello.txt, test123.txt for example Create an OBB file using the command sudo AndroidSrc/frameworks/base/tools/obbtool/mkobb.sh -d OBB-Directory -k Password -o ObbFile Ex : sudo AndroidSrc/frameworks/base/tools/obbtool/mkobb.sh -d ~/obbdir/ -k 1234 -o obbtest.obb “1234” is the password / key used by an OBB application to open this OBB file
  • 10. Usage (3/6) The output messages after executing "mkobb.sh“ may look like: “3c7150b91013237e” of the last line is the salt key and need to write down for later OBB file signing process
  • 11. Usage (4/6) Cause to the identity to execute “mkobb.sh” is root, the created OBB file's owner is root So we change the owner of "obbtest.obb" before doing next step sudo chown YourName:YourName obbtest.obb Sign the created OBB file using "obbtool“ tool AndroidSrc/out/host/linux-x86/bin/obbtool a -n APK-Package-Name -v 1 ObbFile -s SaltKeyFrom-mkobb.sh Ex : AndroidSrc/out/host/linux-x86/bin/obbtool a -n com.example.android.obbapp -v 1 obbtest.obb -s 3c7150b91013237e
  • 12. Usage (5/6) obbtool Parameters -n with "package name" of your application (APK) -v with user defined version number of the OBB file -s with the salt key generated by "mkobb.sh" Output messages after executing "obbtool" will look like If you want to REMOVE signature, do : AndroidSrc/out/host/linux-x86/bin/obbtool r ObbFile Ex : AndroidSrc/out/host/linux-x86/bin/obbtool r obbtest.obb
  • 13. Usage (6/6) Now, you can use the OBB file with corresponding OBB APKs with the valid key(assigned when using mkobb.sh) and Package-Name (assigned when using obbtool)
  • 14. Good Point of OBB Security Only the APK with the valid key and matched package name could open the signed OBB file containing private or important files
  • 15. An OBB APK Example (1/3)
  • 16. An OBB APK Example (2/3)
  • 17. An OBB APK Example (3/3) Mounted OBB file OBB Testing File Source (GitHub) https://github.com/wiliwe/android-obb-example.git