Recently, I encountered shareduserid, So I collected some data and saved it for archival backup.
Each APK file installed on the device, and Android assigns a separate user space to each APK process, the USERID in its manifest is a Linux User that is assigned to a unified Linux User and creates a sandbox for it, to prevent impact on other applications (or other applications ). The User ID is assigned when the application is installed on the device and
How to preset Android APKThere are four premade APK cases:
1. How to preset the APK with source code into the system?2. How to preset the APK without source code into the system?3. How does one preset the APK so that users can uninstall it and cannot restore it when restoring the factory settings?4. How does one preset the APK so that users can unmount it and restore it when restoring the factory settings?
The method to implement the pre-fabricated AP
1. Modify the storage drive letter name of the Android device
(Note: tbdg1073 is my project name)
1. Modify the device/other/tbdg1073/system. Prop file.
2. Modify the Ro. Media. patition. Label attribute to ouyangpeng.
3. Re-compile after modification
4. Connect the mid to the computer via USB. The drive letter is ouyangpeng.
2. Modify the Android device model 1. Go ~ /Mx0831-0525/device/other/tbdg1073
"all" architecture as the targetBuild an application, verify whether it builds an x86 library, and test the application in the x86 simulator.
When we re-build the application, it will be built for all the supported abi in the ndk. Right-click Eclipse and choose "hello-jni" from the shortcut menu ". Eclipse will automatically call the NDK build and generate all native libraries. You can verify it in the library folder as follows.
Figure 9: Eclipse project resource manager displays the generated
, although not used in the NDK. h file, but it is better to use javah to generate the prototype. Otherwise, java will appear if you accidentally write the standard. lang. unsatisfiedLinkError: Native method not found class error.
D: \ AppWork \ XExample \ workspace \ jnidemo5 \ src> javah com. xcl. jnidemo5.MainActivityD: \ AppWork \ XExample \ workspace \ jnidemo5 \ src> the volume in the dir drive D is the Data volume serial number is 0EC2-012C D: \ AppWork \ XExample \ workspace \ jnidemo5 \
initiative. These tools are a huge help to developers.* The NDK integrates a cross compiler. and provides the corresponding MK file isolation CPU, platform, ABI and other differences. Developers simply need to make a simple change to the Mk file (stating "which files need to be compiled," "Compile feature requirements," etc.) and can create so.* The NDK is able to package the so and Java applications on it
The MAKEFILE file Android. mk of the android compilation system is written as follows:
(1)In the Android. mk file, you must specify the local_path variable to find the source file. Generally
Android.
folder.
Application. mk file:
App_project_path: = $ (call my-DIR)/Project
App_modules: = myjni
3. Create a JNI folder under the project folder, and then create Android. mk and myjni. C. You do not need to use javah to generate the corresponding. h file, but the function name must contain the complete package and class name.
4. Edit the content of the file.
connectivity
The platform offers new connectivity that developers can build on. API support for Bluetooth a2dp and MK profiles lets applications query Bluetooth profiles for connected devices, audio state, and more, then has y the user. for example, a music application can check connectivity and status and let the user know that music is playing through a stereo headset. applications can also register to receive System Broadcasts of pre-defined vendo
buttons will pop up, and satellite menu is an open source version of the menu.
For satellite menu, its project sponsor siyamed said that the menu structure is like a planet surrounded by many satellites, and that is why he named the project as satellite menu.
47. vitamiobundle
Vitamio is an all-around multimedia development framework on the Android platform. With its simple and easy-to-use API, vitamio has won the favor of many developers around the
-ubuntu:~/workspace/android-4.0.4_r1.2/external/yapp# cd tttapp/root@brantyou-ubuntu:~/workspace/android-4.0.4_r1.2/external/yapp/tttapp# gedit tttapp.c
The content of the tttapp. c file is as follows:
#include
Create the corresponding Android. mk configuration file:
root@brantyou-ubuntu:~/workspace/
Android SDK Android NDK android Studio officialIf the download speed is too slow, please use thunder, Baidu cloud offline and other methods to download.For Linux systems, if you cannot upgrade online, see belowsudo vi/etc/hostsAdd to74.125.206.93 dl-ssl.google.comHere are the various.
2014.7ADT BundleHttp://dl.google.com/
/Hello/directory. The content of Hello. C is of course the classic helloworld program:
# Include Int main (){Printf ("Hello world! /N ");Return 0;}
3. Write the Android. mk file in the $ (your_android)/external/Hello/directory. This is the standard name of Android makefile. Do not change it. For the format and content of the
VIB_ON:{Ioctl (fd, VIB_ON); // call the ioctrl interface in the driver and run VIB_ON to implement hardware operations.Break;}Case VIB_OFF:{Ioctl (fd, VIB_OFF); // call the ioctrl interface in the driver and run the VIB_OFF command to implement hardware operationsBreak;}Default: break;}Return 1;}
3. Create Android. mk in the same directory as follows:Android. mk
class:
CAdd. h
#ifndef JNI_TEST_ADD#define JNI_TEST_ADDclass CAdd{public:CAdd();~CAdd();int add(int x, int y);};#endif
CAdd. cpp
#include "Add.h" CAdd::CAdd(){ }CAdd::~CAdd(){ }int CAdd::add(int x, int y){return x+y;}
Then we will write com_example_jni_TestJNI.cpp to implement JNI:
#include
At this point, all the C/C ++ sections are implemented.
5. Create an mk File
After JNI is implemented, it is necessary to compile the C/C ++ code into a
You need to perform the following steps to re-compile Android. jar with your own API on the basis of successful android source code compilation.
1. add your own source code. Create a folder under the framework/base Directory of the Android source code to save the Code, such as TV. Name the path of the added file in the form of a package, for example,/TV/java/
shortcut list15.2.2 directly put the shortcut to the desktop 35115.3 LiveFolder 35115.4 summary of this Chapter 353Chapter 2 NDK programming 16th16.1 introduction to Android NDK 35416.2 install, configure, and test the NDK Development Environment 35516.2.1 system and software requirements 35516.2.2 download and install Android NDK 35516.2.3 download and install Cygwin 356.16.2.4 configure the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.