android N 版本问题

代码编译报错:

Jack server

从搜索到的信息得知,可以在设备的BoardConfig.mk中加入“ANDROID_COMPILE_WITH_JACK := false”切换到openjdk编译。

权限问题:

APK获得系统权限,但是还是不能访问system/bin下面文件,关闭android安全检查:给系统加一条属性: ro.boot.selinux=disable

selinux权限问题


kernel side:

a) make sure the CONFIG_SECURITY_SELINUX_BOOTPARAM is open, two options:
   
 i) config the CONFIG_SECUIRTY_SELINUX_BOOTPARAM_VALUE to 0
 ii) append selinux=0 in kernel command line.
iii) if the CONFIG_SECURITY_SELINUX_BOOTPARAM not open, change the selinux_enabled variable to 0 is kernel/security/seclinux/hooks.c
Above will disable SELinux, but some dependency issue possible still take effect. A clear solution is to revert following git:
https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10/commit/?id=88f23ae69a376686d81cd17ed06a7b2860fc51f9

b) change the SELinux mode.

  i) running mode, you can use adb shell setenforce 0/1 to change it as permissive/enforcing mode.
ii)  when build, open the CONFIG_SECURITY_SELINUX_DEVELOP, add then append the "enforcing=0" in commandline.
    or in device/qcom/msmxxxx/system.prop, add 
       ro.boot.selinux=disable

高通关闭SELinux mode:自己验证过,OK,添加 androidboot.selinux=permissive

device/qcom/msm8937_64/BoardConfig.mk
BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78B0000 androidboot.selinux=permissive
快速编译fastboot烧手机
mk r aboot;mk r k;mk update_common_info;mk custom_release;


假如关闭了还报,请手动添加文件执行权限:
下面是别人的文章:

二、解决方法

1.在devices/qcom/sepolicy/common/目录下新增ro_isn.te文件,内容如下:

type ro_isn, domain; 

type ro_isn_exec, exec_type, file_type; 

 

2.在devices/qcom/sepolicy/Android.mk中添加ro_isn.te文件,内容如下:

BOARD_SEPOLICY_UNION := 

... 

        hostapd.te 

        ro_isn.te

 

3.在devices/qcom/sepolicy/common/file_contexts中增加如下内容:

###################################

# System files

#

...

/system/vendor/bin/slim_ap_daemon               u:object_r:location_exec:s0

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值