android system secure,怎么将应用安装到/system/app下

在 Android 中,如果要使用系统限制的权限(比如 android.permission.WRITE_SECURE_SETTINGS),我们需要把程序安装到 /system/app/ 下。

一般手机/system目录是mount成只读的,所以需要重新mount成读写的

以 SecureSetting.apk 为例,演示操作。

需要准备一台已经获得 Root 权限的手机。

1、通过 USB 连接手机和电脑。

2、使用 adb 控制手机。

$ adb push SecureSetting.apk /sdcard/ // 上传要安装的文件,为安装做准备。

nbsp;$ adb shell $ su // 切换到 root 用户。如果没有获得 Root 权限,这一步不会成功。

# mount //显示当前mount情况

nbsp;# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system // 让分区可写。

# cat /sdcard/SecureSetting.apk > /system/app/SecureSetting.apk // 这一步可以用 cp 实现,但一般设备中没有包含该命令。如果使用 mv 会出现错误:failed on '/sdcard/NetWork.apk' - Cross-device link。

# mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system // 还原分区属性,只读。

# exit $ exit

重启,SecureSetting 已经安装好。

取消

评论

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Hello Android (3rd Edition),英文书籍,适用于android入门 ! Android is an open source software toolkit for mobile phones that was created by Google and the Open Handset Alliance. It’s inside millions of cell phones and other mobile devices, making Android a major platform for application developers. Whether you’re a hobbyist or a professional programmer, whether you are doing it for fun or for profit, it’s time to learn more about developing for Android. This book will help you get started. Contents Acknowledgments 9 Preface 10 What Makes Android Special?.... . . 10 Who Should Read This Book?....11 What’s in This Book?...... 12 What’s New in the Third Edition?.... . 12 Online Resources...... . . 14 Fast-Forward >>...... . . 14 I Introducing Android 16 1 Quick Start 17 1.1 Installing the Tools..... . 17 1.2 Creating Your First Program.... 23 1.3 Running on the Emulator.... . 23 1.4 Running on a Real Phone.... . 28 1.5 Fast-Forward >>.....29 2 Key Concepts 30 2.1 The Big Picture.....30 2.2 It’s Alive!......35 2.3 Building Blocks.....39 2.4 Using Resources..... . . 40 2.5 Safe and Secure.....40 2.6 Fast-Forward >>.....41 CONTENTS 6 II Android Basics 42 3 Designing the User Interface 43 3.1 Introducing the Sudoku Example... . 43 3.2 Designing by Declaration.... . 44 3.3 Creating the Opening Screen...45 3.4 Using Alternate Resources.... . 55 3.5 Implementing an About Box.... 57 3.6 Applying a Theme..... . . 61 3.7 Adding a Menu.....64 3.8 Adding Settings.....65 3.9 Starting a New Game..... 66 3.10 Debugging...... . . 69 3.11 Exiting the Game..... . . 71 3.12 Fast-Forward >>.....71 4 Exploring 2D Graphics 73 4.1 Learning the Basics..... . 73 4.2 Adding Graphics to Sudoku.... 78 4.3 Handling Input.....87 4.4 The Rest of the Story..... 93 4.5 Making More Improvements.... 103 4.6 Fast-Forward >>.....103 5 Multimedia 105 5.1 Playing Audio...... 105 5.2 Playing Video...... 112 5.3 Adding Sounds to Sudoku.... . 115 5.4 Fast-Forward >>.....119 6 Storing Local Data 120 6.1 Adding Options to Sudoku.... . 120 6.2 Continuing an Old Game.... . 122 6.3 Remembering the Current Position... 124 6.4 Accessing the Internal File System... 126 6.5 Accessing SD Cards..... 127 6.6 Fast-Forward >>.....128 CONTENTS 7 III Beyond the Basics 129 7 The Connected World 130 7.1 Browsing by Intent..... . 131 7.2 Web with a View.....135 7.3 From JavaScript to Java and Back... 140 7.4 Using Web Services..... . 147 7.5 Fast-Forward >>.....160 8 Locating and Sensing 161 8.1 Location, Location, Location.... 161 8.2 Set Sensors to Maximum.... . 168 8.3 Bird’s-Eye View.....172 8.4 Fast-Forward >>.....177 9 Putting SQL to Work 178 9.1 Introducing SQLite..... . 178 9.2 SQL 101......179 9.3 Hello, Database.....181 9.4 Data Binding...... . 189 9.5 Using a ContentProvider.... . . 192 9.6 Implementing a ContentProvider... . 195 9.7 Fast-Forward >>.....196 10 3D Graphics in OpenGL 198 10.1 Understanding 3D Graphics.... 198 10.2 Introducing OpenGL..... 199 10.3 Building an OpenGL Program...200 10.4 Rendering the Scene..... 202 10.5 Building a Model..... . . 206 10.6 Lights, Camera, ........ . 209 10.7 Action!....... 212 10.8 Applying Texture..... . . 212 10.9 Peekaboo......216 10.10 Measuring Smoothness.... . . 217 10.11 Fast-Forward >>.....218 CONTENTS 8 IV The Next Generation 219 11 Multi-Touch 220 11.1 Introducing Multi-Touch.... . . 220 11.2 Building the Touch Example...222 11.3 Understanding Touch Events...225 11.4 Setting Up for Image Transformation.. . . 228 11.5 Implementing the Drag Gesture... . . 229 11.6 Implementing the Pinch Zoom Gesture.. . 230 11.7 Fast-Forward >>.....232 12 There’s No Place Like Home 233 12.1 Hello, Widget...... . 233 12.2 Live Wallpaper...... 242 12.3 Fast-Forward >>.....254 13 Write Once, Test Everywhere 256 13.1 Gentlemen, Start Your Emulators... 257 13.2 Building for Multiple Versions...257 13.3 Evolving with Android APIs.... 259 13.4 Bug on Parade...... 265 13.5 All Screens Great and Small.... 267 13.6 Installing on the SD Card.... . 268 13.7 Fast-Forward >>.....270 14 Publishing to the Android Market 271 14.1 Preparing......271 14.2 Signing....... 272 14.3 Publishing...... . . 273 14.4 Updating......275 14.5 Closing Thoughts..... . . 276 V Appendixes 277 A Java vs. the Android Language and APIs 278 A.1 Language Subset..... . . 278 A.2 Standard Library Subset.... . . 280 A.3 Third-Party Libraries..... 281 B Bibliography 282 Index 283
1. Introduction 1.1 Document Structure 1.1.1. Requirements by Device Type 1.1.2. Requirement ID 1.1.3. Requirement ID in Section 2 2. Device Types 2.1 Device Configurations 2.2. Handheld Requirements 2.2.1. Hardware 2.2.2. Multimedia 2.2.3. Software 2.2.4. Performance and Power 2.2.5. Security Model 2.3. Television Requirements 2.3.1. Hardware 2.3.2. Multimedia 2.3.3. Software 2.2.4. Performance and Power 2.4. Watch Requirements 2.4.1. Hardware 2.4.2. Multimedia 2.4.3. Software 2.5. Automotive Requirements 2.5.1. Hardware 2.5.2. Multimedia 2.5.3. Software 2.2.4. Performance and Power 2.2.5. Security Model 2.6. Tablet Requirements 2.4.1. Hardware 3. Software 3.1. Managed API Compatibility 3.1.1. Android Extensions 3.2. Soft API Compatibility 3.2.1. Permissions 3.2.2. Build Parameters 3.2.3. Intent Compatibility 3.2.3.1. Core Application Intents 3.2.3.2. Intent Resolution 3.2.3.3. Intent Namespaces 3.2.3.4. Broadcast Intents 3.2.3.5. Default App Settings 3.2.4. Activities on secondary displays 3.3. Native API Compatibility 3.3.1. Application Binary Interfaces 3.3.2. 32-bit ARM Native Code Compatibility 3.4. Web Compatibility 3.4.1. WebView Compatibility 3.4.2. Browser Compatibility 3.5. API Behavioral Compatibility 3.6. API Namespaces 3.7. Runtime Compatibility 3.8. User Interface Compatibility 3.8.1. Launcher (Home Screen) 3.8.2. Widgets 3.8.3. Notifications 3.8.3.1. Presentation of Notifications 3.8.3.2. Notification Listener Service 3.8.3.3. DND (Do not Disturb) 3.8.4. Search 3.8.5. Alerts and Toasts 3.8.6. Themes 3.8.7. Live Wallpapers 3.8.8. Activity Switching 3.8.9. Input Management 3.8.10. Lock Screen Media Control 3.8.11. Screen savers (previously Dreams) 3.8.12. Location 3.8.13. Unicode and Font 3.8.14. Multi-windows 3.9. Device Administration 3.9.1 Device Provisioning 3.9.1.1 Device owner provisioning 3.9.1.2 Managed profile provisioning 3.9.2 Managed Profile Support 3.10. Accessibility 3.11. Text-to-Speech 3.12. TV Input Framework 3.12.1. TV App 3.12.1.1. Electronic Program Guide 3.12.1.2. Navigation 3.12.1.3. TV input app linking 3.12.1.4. Time shifting 3.12.1.5. TV recording 3.13. Quick Settings 3.14. Media UI 3.15. Instant Apps 3.16. Companion Device Pairing 4. Application Packaging Compatibility 5. Multimedia Compatibility 5.1. Media Codecs 5.1.1. Audio Encoding 5.1.2. Audio Decoding 5.1.3. Audio Codecs Details 5.1.4. Image Encoding 5.1.5. Image Decoding 5.1.6. Image Codecs Details 5.1.7. Video Codecs 5.1.8. Video Codecs List 5.2. Video Encoding 5.2.1. H.263 5.2.2. H-264 5.2.3. VP8 5.2.4. VP9 5.3. Video Decoding 5.3.1. MPEG-2 5.3.2. H.263 5.3.3. MPEG-4 5.3.4. H.264 5.3.5. H.265 (HEVC) 5.3.6. VP8 5.3.7. VP9 5.4. Audio Recording 5.4.1. Raw Audio Capture 5.4.2. Capture for Voice Recognition 5.4.3. Capture for Rerouting of Playback 5.5. Audio Playback 5.5.1. Raw Audio Playback 5.5.2. Audio Effects 5.5.3. Audio Output Volume 5.6. Audio Latency 5.7. Network Protocols 5.8. Secure Media 5.9. Musical Instrument Digital Interface (MIDI) 5.10. Professional Audio 5.11. Capture for Unprocessed 6. Developer Tools and Options Compatibility 6.1. Developer Tools 6.2. Developer Options 7. Hardware Compatibility 7.1. Display and Graphics 7.1.1. Screen Configuration 7.1.1.1. Screen Size 7.1.1.2. Screen Aspect Ratio 7.1.1.3. Screen Density 7.1.2. Display Metrics 7.1.3. Screen Orientation 7.1.4. 2D and 3D Graphics Acceleration 7.1.4.1 OpenGL ES 7.1.4.2 Vulkan 7.1.4.3 RenderScript 7.1.4.4 2D Graphics Acceleration 7.1.4.5 Wide-gamut Displays 7.1.5. Legacy Application Compatibility Mode 7.1.6. Screen Technology 7.1.7. Secondary Displays 7.2. Input Devices 7.2.1. Keyboard 7.2.2. Non-touch Navigation 7.2.3. Navigation Keys 7.2.4. Touchscreen Input 7.2.5. Fake Touch Input 7.2.6. Game Controller Support 7.2.6.1. Button Mappings 7.2.7. Remote Control 7.3. Sensors 7.3.1. Accelerometer 7.3.2. Magnetometer 7.3.3. GPS 7.3.4. Gyroscope 7.3.5. Barometer 7.3.6. Thermometer 7.3.7. Photometer 7.3.8. Proximity Sensor 7.3.9. High Fidelity Sensors 7.3.10. Fingerprint Sensor 7.3.11. Android Automotive-only sensors 7.3.11.1. Current Gear 7.3.11.2. Day Night Mode 7.3.11.3. Driving Status 7.3.11.4. Wheel Speed 7.3.12. Pose Sensor 7.4. Data Connectivity 7.4.1. Telephony 7.4.1.1. Number Blocking Compatibility 7.4.2. IEEE 802.11 (Wi-Fi) 7.4.2.1. Wi-Fi Direct 7.4.2.2. Wi-Fi Tunneled Direct Link Setup 7.4.2.3. Wi-Fi Aware 7.4.2.4. Wi-Fi Passpoint 7.4.3. Bluetooth 7.4.4. Near-Field Communications 7.4.5. Minimum Network Capability 7.4.6. Sync Settings 7.4.7. Data Saver 7.5. Cameras 7.5.1. Rear-Facing Camera 7.5.2. Front-Facing Camera 7.5.3. External Camera 7.5.4. Camera API Behavior 7.5.5. Camera Orientation 7.6. Memory and Storage 7.6.1. Minimum Memory and Storage 7.6.2. Application Shared Storage 7.6.3. Adoptable Storage 7.7. USB 7.7.1. USB peripheral mode 7.7.2. USB host mode 7.8. Audio 7.8.1. Microphone 7.8.2. Audio Output 7.8.2.1. Analog Audio Ports 7.8.3. Near-Ultrasound 7.9. Virtual Reality 7.9.1. Virtual Reality Mode 7.9.2. Virtual Reality High Performance 8. Performance and Power 8.1. User Experience Consistency 8.2. File I/O Access Performance 8.3. Power-Saving Modes 8.4. Power Consumption Accounting 8.5. Consistent Performance 9. Security Model Compatibility 9.1. Permissions 9.2. UID and Process Isolation 9.3. Filesystem Permissions 9.4. Alternate Execution Environments 9.5. Multi-User Support 9.6. Premium SMS Warning 9.7. Kernel Security Features 9.8. Privacy 9.8.1. Usage History 9.8.2. Recording 9.8.3. Connectivity 9.8.4. Network Traffic 9.9. Data Storage Encryption 9.9.1. Direct Boot 9.9.2. File Based Encryption 9.9.3. Full Disk Encryption 9.10. Device Integrity 9.11. Keys and Credentials 9.11.1. Secure Lock Screen 9.12. Data Deletion 9.13. Safe Boot Mode 9.14. Automotive Vehicle System Isolation 10. Software Compatibility Testing 10.1. Compatibility Test Suite 10.2. CTS Verifier 11. Updatable Software 12. Document Changelog 12.1. Changelog Viewing Tips 13. Contact Us
308 pages Publisher: Wrox; 1 edition (April 22, 2013) Language: English ISBN-10: 1118380096 ISBN-13: 978-1118380093 A practical guide to developing and deploying Near Field Communication (NFC) applications There has been little practical guidance available on NFC programming, until now. If you're a programmer or developer, get this unique and detailed book and start creating apps for this exciting technology. NFC enables contactless mobile communication between two NFC-compatible devices. It's what allows customers to pay for purchases by swiping their smartphones with Google Wallet, for example. This book shows you how to develop NFC applications for Android, for all NFC operating modes: reader/writer, peer-to-peer, and card emulation. The book starts with the basics of NFC technology, an overview of the Android OS, and what you need to know about the SDK tools. It then walks you through all aspects of NFC app development, including SE programming. You'll find all you need to create an app, including functioning, downloadable code and a companion website with additional content. Valuable case studies help you understand each operating mode in clear, practical detail. Shows programmers and developers how to develop Near Field Communication (NFC) applications for Android, including Secure Element (SE) programming Expert authors are NFC researchers who have a deep knowledge of the subject Covers app development in all NFC operating modes: reader/writer, peer-to-peer, and card emulation Includes valuable case studies that showcase several system design and analysis methods, such as activity diagram, class diagram, UML, and others Professional NFC Application Development for Android offers the clear, concise advice you need to create great applications for this emerging and exciting technology.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值