Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

device-generic-common: Commit

device/generic/common


Commit MetaInfo

Révisiona5d3c6d2a763e4207de2de0227a1e635df5cc81a (tree)
l'heure2019-10-07 12:49:19
AuteurChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Message de Log

Merge remote-tracking branch 'x86/oreo-x86' into pie-x86

Change Summary

  • modified: BoardConfig.mk (diff)
  • modified: app/TermOnePlus.apk (diff)
  • modified: nativebridge/bin/enable_nativebridge (diff)
  • add: sepolicy/plat_private/file_contexts (diff)
  • add: sepolicy/plat_private/surfaceflinger.te (diff)
  • add: sepolicy/plat_private/zygote.te (diff)
  • delete: sepolicy/{ => nonplat}/adbd.te
  • delete: sepolicy/{ => nonplat}/audioserver.te
  • delete: sepolicy/{ => nonplat}/bootanim.te
  • delete: sepolicy/{ => nonplat}/cameraserver.te
  • delete: sepolicy/{ => nonplat}/device.te
  • delete: sepolicy/{ => nonplat}/domain.te
  • delete: sepolicy/{ => nonplat}/file.te
  • delete: sepolicy/{ => nonplat}/file_contexts
  • delete: sepolicy/{ => nonplat}/hal_camera_default.te
  • delete: sepolicy/{ => nonplat}/hal_cas_default.te
  • delete: sepolicy/{ => nonplat}/hal_drm_default.te
  • delete: sepolicy/{ => nonplat}/hal_drm_widevine.te
  • delete: sepolicy/{ => nonplat}/hal_gnss_default.te
  • delete: sepolicy/{ => nonplat}/hal_graphics_composer_default.te
  • delete: sepolicy/{ => nonplat}/healthd.te
  • delete: sepolicy/{ => nonplat}/init.te
  • delete: sepolicy/{ => nonplat}/installd.te
  • delete: sepolicy/{ => nonplat}/logpersist.te
  • delete: sepolicy/{ => nonplat}/mediacodec.te
  • delete: sepolicy/{ => nonplat}/netd.te
  • delete: sepolicy/{ => nonplat}/priv_app.te
  • delete: sepolicy/{ => nonplat}/property.te
  • delete: sepolicy/{ => nonplat}/property_contexts
  • delete: sepolicy/{ => nonplat}/shell.te
  • delete: sepolicy/{ => nonplat}/surfaceflinger.te
  • delete: sepolicy/{ => nonplat}/system_server.te
  • delete: sepolicy/{ => nonplat}/vold.te
  • delete: sepolicy/{ => nonplat}/zygote.te

Modification

--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -87,5 +87,7 @@ ZIP_OPTIMIZATION_NO_INTEGRITY := true
8787
8888 DEVICE_MANIFEST_FILE := device/generic/common/manifest.xml
8989
90-BOARD_SEPOLICY_DIRS += device/generic/common/sepolicy \
90+BOARD_SEPOLICY_DIRS += device/generic/common/sepolicy/nonplat \
9191 system/bt/vendor_libs/linux/sepolicy \
92+
93+BOARD_PLAT_PRIVATE_SEPOLICY_DIR := device/generic/common/sepolicy/plat_private
Binary files a/app/TermOnePlus.apk and b/app/TermOnePlus.apk differ
--- a/nativebridge/bin/enable_nativebridge
+++ b/nativebridge/bin/enable_nativebridge
@@ -13,6 +13,11 @@ urls[3]=http://tinyurl.com/y3nagyza
1313 urls[4]=http://tinyurl.com/y6azmjas
1414 urls[5]=http://tinyurl.com/y6g6cx27
1515
16+mount_sfs()
17+{
18+ mount -o 'context="u:object_r:system_file:s0"' $1 $2
19+}
20+
1621 if [ -z "$1" ]; then
1722 v=9_y
1823 u=1
@@ -24,7 +29,7 @@ fi
2429 if [ -s /system/lib$1/libhoudini.so ]; then
2530 log -pi -thoudini "found /system/lib$1/libhoudini.so"
2631 elif [ -e /system/etc/houdini$v.sfs ]; then
27- mount /system/etc/houdini$v.sfs $dest_dir
32+ mount_sfs /system/etc/houdini$v.sfs $dest_dir
2833 else
2934 if mountpoint -q $dest_dir; then
3035 kill -9 `fuser -m $dest_dir`
@@ -32,7 +37,7 @@ else
3237 fi
3338 mkdir -p /data/arm
3439 cd /data/arm
35- while ! mount houdini$v.sfs $dest_dir; do
40+ while ! mount_sfs houdini$v.sfs $dest_dir; do
3641 while [ "$(getprop net.dns1)" = "" ]; do
3742 sleep 10
3843 done
--- /dev/null
+++ b/sepolicy/plat_private/file_contexts
@@ -0,0 +1,3 @@
1+# surfaceflinger
2+/dev/dri(/.*)? u:object_r:gpu_device:s0
3+/dev/tty0 u:object_r:gpu_device:s0
--- /dev/null
+++ b/sepolicy/plat_private/surfaceflinger.te
@@ -0,0 +1,24 @@
1+allow surfaceflinger surfaceflinger_tmpfs:file { map };
2+allow surfaceflinger tmpfs:lnk_file { read };
3+allow surfaceflinger self:capability { sys_tty_config };
4+
5+allowxperm surfaceflinger gpu_device:chr_file ioctl {
6+ 0x5605
7+ 0x6409
8+ 0x640a
9+ 0x640b
10+ 0x641e
11+ 0x641f
12+ 0x6457
13+ 0x6458
14+ 0x645b
15+ 0x645e
16+ 0x645f
17+ 0x6461
18+ 0x6462
19+ 0x6469
20+ 0x6466
21+ 0x646c
22+ 0x64a2
23+ 0x64b0
24+};
--- /dev/null
+++ b/sepolicy/plat_private/zygote.te
@@ -0,0 +1,2 @@
1+allow zygote surfaceflinger:binder call;
2+allow zygote surfaceflinger:unix_stream_socket { read };
Afficher sur ancien navigateur de dépôt.