Other fingerprint debugging problems

Source: Internet
Author: User

Other fingerprint debugging problems
Other problems encountered during fingerprint debugging 1. SELinux

The android 8.0 SELinux has undergone a big change. Currently, The SELinux compilation is generated in two directories:

1. system/etc/sepolicy
2. vendor/etc/sepolicy

Compilation of SELinux cannot only compile bootimage as before. Currently, compilation of bootimage cannot generate the Selinux file,
Currently, you can only think of all the compilation methods.

How to check whether SeLinux is compiled:

1. Before android 8.0, check whether the out/project/obj/sepolicy_interdaiates/policy. conf file contains
Self-written selinux rules

2. After android 8.0, check whether the system/etc/sepolicy or vendor/etc/sepolicy has self-written selinux rules.

2. Disable SELinux security policy from source code

Code Location:/system/core/init. cpp

Modify the selinux_is_enforcing () function as follows:

static bool selinux_is_enforcing(void){    return false; //force set selinux permissive.    if (ALLOW_PERMISSIVE_SELINUX) {        return selinux_status_from_cmdline() == SELINUX_ENFORCING;    }    return true;}
3. An error is reported when the app loads the. so compiled by jni.

If your app is compiled in the system and you install it, it is easy to see this problem.

1. The error message is as follows:

java.lang.UnsatisfiedLinkError: dlopen failed: library "xx.so"("/system/lib/xx.so") needed or dlopened by"/system/lib/libnativeloader.so" is not accessible for the namespace"classloader-namespace"at java.lang.Runtime.loadLibrary0(Runtime.java:977) at java.lang.System.loadLibrary(System.java:1602)

Cause: In android 7.0, some behavior changes occur, and the app cannot call the private. so file of the system. Only public. so of the system can be called.

Solution:

Put the. so generated by jni in/system/etc/public.libraries.txt or/vendor/etc/public.libraries.txt.

Then, push public.libraries.txt.


Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.