Shared uid
Every androidpackage (.apk) installed on the device is assigned to a unified Linux User ID and a sandbox is created for it to prevent other applications (or other applications) from being affected ). The User ID is assigned when the application is installed on the device and remains permanently on the device.
With the shared user ID, multiple APK with the same user ID can be configured to run in the same process. by default, the system can access any data from each other. you can also
system can access any data from each other. you can also configure to run different processes and access the databases and files in the data directory of other APK files. just like accessing the data of this program.
For an APK, to use a shared uid, you must take three steps:
1. Add the Android: shareduserid attribute to the manifest node.
2. Add the local_certificate definition in Android.
I have been working with the Android AOSP source code for some time now and spent endless hours searching the internet for Problems that arose on different occasions. Today I decided to note them off, on the one hand it's convenient for me to just look it up on my own blog, on the other Hand you might find some of these notes useful.What I-ran into today is upgrading from Android 4.0.3 to 4.2.2. I didn ' t
is created is invalid), and then upload the so file to compile the project.
Ii. Use NDK to generate a local method (ubuntu and windows)
1. Install NDK: unzip, then enter the directory after NDK unzipping, run build/host-setup.sh (Make 3.81 and awk required). If there is something wrong, modify the host-setup.sh file: Will #! /Bin/sh #! /Bin/bash: Run it again.
2. Create your own project folder under the apps folder, and then create the Application. mk
Mobile phone Bluetooth control relay wireless lock Iot Android source code android development Android WIFI control detailed annotation test stability no bug, android Android
I. functions:
1. Connect and disconnect Android WIFI, a
file in the $ (your_android)/development/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)/development/Hello/directory. This is the standard name of
-r6b/samples/STLport-5.2.1/JNI/src/dll_main.cpp: 49:/Home/android-ndk-r6b/samples/STLport-5.2.1/JNI/stlport/STL/_ exception. h: 56: 34: Error: exception: no such file or directory
Compile the android SDK of stlport. the contents of the MK file are listed as follows. I don't know why the above error is reported. I didn't find a solution. If any hero finds the caus
following format:
Java _ packagename _ classname _ methodname,
Example: Java _ com_jpf_myjni _ myjni _ stringfromjni
Create the JNI/Android. mk file. This file is the makefile of our local C code. The file content is as follows:
Local_path: = $ (call my-DIR)
Include $ (clear_vars)
Local_module: = myjni
Local_src_files: = myjni. c
Local_ldlibs + =-llog
Include $ (build_shared_library)
Describes the make
Android knowledge point and android Knowledge System
Android knowledge point summary1. Four Widgets
ActivityServiceContentProviderBroadCastReceiver
2. Layout
Common Layout: LinearLayout, RelativeLayout, and FrameLayoutLayout Optimization ,,Custom Controls
3. Internationalization
International Resource values-language code-Country CodeModify the PRODUC
dependency library for Android:
The official documentation is as follows:
(Note this might not be the same as the previous section, but you can do it by navigating to the proj. android directory and run thebuild_native.py scripts .)
The general meaning is that when you create an empty cocos2d-x project first to compile its library, how to compile this library, can enter proj. run the build_native.py scr
. Talk about the Android IPC Mechanism:
A: IPC is short for internal process communication. It is a resource sharing "named Pipeline. The IPC Mechanism in Android is used to allow interaction between Activity and Service at any time. Therefore, in Android, this mechanism is only applicable to communication between Activity and Service, similar to remote method ca
Android Android-build an android development environment, android-android
Android official website address: http://developer.android.com/, download and install AndroidSDK following the steps below:
Download ADT and SDK: http://dev
, which must be defined by yourself, is not open to the upper layer.
Because it is compiled in linux, you need to write an Android. mk file. You can copy the file of another apk and make some modifications.
Copy code
LOCAL_PATH: = $ (call my-dir)
Include $ (CLEAR_VARS)
LOCAL_MODULE_TAGS: = optional
# Only compile source java files in this apk.
LOCAL_SRC_FILES: = $ (call all-java-files-under, src)
LOCAL_SDK_
,int in_len,Char *out_hash); # ifdef __cplusplus}# endif #endif /* ssl_hash_h */The following SSL_HASH.C implementation file#include"ssl_hash.h"#include"openssl/sha.h"intSSL_SHA256 (Const Char*in_data,intIn_len,Char*Out_hash) { if(!in_data) { return- -; } if(! SHA256 ((ConstUnsignedChar*) In_data, In_len, (unsignedChar*) (Out_hash)) {return-1001; } return 1;}The same two files are also placed in the same directory as the. Mk;3. S
a program execution viewer in which thread and stack information can be seen. traceview is a Program Performance Analyzer.
20. Talk about the android IPC Mechanism:
A: IPC is short for internal process communication. It is a resource sharing "named Pipeline. The IPC Mechanism in Android is used to allow interaction between activity and service at any time. Therefore, in
applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */#include
The hello-jni.c file has been compiled, now you can delete the com_example_hellojni_hellojni.h file, of course, keep it, but I am still used to clean up unnecessary files.
Compile the
multiple loops, minimize the correlation between the previous loop and the next loop when writing code, and reduce unnecessary code computations;4. Set a reasonable cache. For the Android platform of the Target Platform for FFMPEG transplantation, set the cache size suitable for this platform ;.Here we will not repeat the modifications to specific codes.3.2 FFMPEG TransplantationThe android.
for it and modify Android Source Code accordingly.7. Provide a firmware if your module needs it.8. Make your driver work with Android custom wpa_supplicant commands and siocsiwpriv IOCTL
Now onto details.
0. Understand how Android wifi works.Android uses a modifiedWpa_supplicant(External/wpa_supplicant) daemon for WiFi support which is controlled through a socke
Reference: http://blog.csdn.net/belyxiong/article/details/5875993 adds underlying core services for Android
The information in the blog post is incomplete and has a small problem. This article will make some preparations for the entire process and complete and correct the content.
User @ Ubuntu:/$ sudo ADB Shell
Root @ Android:/# cd system/lib --> service library file
Root @
configurations, But it supports resumable data transfer.
2. Compile the android source code
Before compiling the android source code, you need to modify several files.
1. Because the android source code is compiled on a 64-bit PC by default, You need to modify the following files:
/External/clearsilver/cgi/Android.
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.