mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
More cleanup
This commit is contained in:
parent
62cba6a878
commit
293c386322
@ -1,42 +0,0 @@
|
|||||||
diff --git a/init.common.usb.rc b/init.common.usb.rc
|
|
||||||
index 632b6495..23bdb19f 100644
|
|
||||||
--- a/init.common.usb.rc
|
|
||||||
+++ b/init.common.usb.rc
|
|
||||||
@@ -12,18 +12,13 @@ on boot
|
|
||||||
write /sys/class/android_usb/android0/f_rndis_qc/rndis_transports BAM2BAM_IPA
|
|
||||||
write /sys/module/g_android/parameters/mtp_tx_req_len 131072
|
|
||||||
write /sys/module/g_android/parameters/mtp_rx_req_len 131072
|
|
||||||
- setprop sys.usb.ffs.max_write 524288
|
|
||||||
- setprop sys.usb.ffs.max_read 524288
|
|
||||||
- setprop sys.usb.mtp.device_type 3
|
|
||||||
setprop sys.usb.rps_mask 0
|
|
||||||
|
|
||||||
on post-fs
|
|
||||||
- write /sys/class/android_usb/android0/f_ffs/aliases adb,mtp
|
|
||||||
+ write /sys/class/android_usb/android0/f_ffs/aliases adb
|
|
||||||
mkdir /dev/usb-ffs 0775 shell shell
|
|
||||||
mkdir /dev/usb-ffs/adb 0770 shell shell
|
|
||||||
mount functionfs adb /dev/usb-ffs/adb noatime uid=2000,gid=2000,no_disconnect=1
|
|
||||||
- mkdir /dev/usb-ffs/mtp 0770 mtp mtp
|
|
||||||
- mount functionfs mtp /dev/usb-ffs/mtp noatime rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
|
|
||||||
|
|
||||||
on property:sys.usb.config=mtp
|
|
||||||
stop adbd
|
|
||||||
@@ -81,7 +76,7 @@ on property:sys.usb.config=ptp
|
|
||||||
write /sys/class/android_usb/android0/bDeviceClass 0
|
|
||||||
write /sys/class/android_usb/android0/bDeviceSubClass 0
|
|
||||||
write /sys/class/android_usb/android0/bDeviceProtocol 0
|
|
||||||
- write /sys/class/android_usb/android0/functions mtp
|
|
||||||
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
|
||||||
write /sys/class/android_usb/android0/enable 1
|
|
||||||
setprop sys.usb.state ${sys.usb.config}
|
|
||||||
|
|
||||||
@@ -92,7 +87,7 @@ on property:sys.usb.config=ptp,adb
|
|
||||||
write /sys/class/android_usb/android0/bDeviceClass 0
|
|
||||||
write /sys/class/android_usb/android0/bDeviceSubClass 0
|
|
||||||
write /sys/class/android_usb/android0/bDeviceProtocol 0
|
|
||||||
- write /sys/class/android_usb/android0/functions mtp,adb
|
|
||||||
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
|
||||||
write /sys/class/android_usb/android0/enable 1
|
|
||||||
start adbd
|
|
||||||
setprop sys.usb.state ${sys.usb.config}
|
|
@ -1,44 +0,0 @@
|
|||||||
diff --git a/init.common.usb.rc b/init.common.usb.rc
|
|
||||||
index 58743917..23bdb19f 100644
|
|
||||||
--- a/init.common.usb.rc
|
|
||||||
+++ b/init.common.usb.rc
|
|
||||||
@@ -10,18 +10,15 @@ on boot
|
|
||||||
write /sys/class/android_usb/f_mass_storage/lun/nofua 1
|
|
||||||
|
|
||||||
write /sys/class/android_usb/android0/f_rndis_qc/rndis_transports BAM2BAM_IPA
|
|
||||||
- setprop sys.usb.mtp.device_type 3
|
|
||||||
+ write /sys/module/g_android/parameters/mtp_tx_req_len 131072
|
|
||||||
+ write /sys/module/g_android/parameters/mtp_rx_req_len 131072
|
|
||||||
setprop sys.usb.rps_mask 0
|
|
||||||
|
|
||||||
on post-fs
|
|
||||||
- write /sys/class/android_usb/android0/f_ffs/aliases adb,mtp,ptp
|
|
||||||
+ write /sys/class/android_usb/android0/f_ffs/aliases adb
|
|
||||||
mkdir /dev/usb-ffs 0775 shell shell
|
|
||||||
mkdir /dev/usb-ffs/adb 0770 shell shell
|
|
||||||
mount functionfs adb /dev/usb-ffs/adb noatime uid=2000,gid=2000,no_disconnect=1
|
|
||||||
- mkdir /dev/usb-ffs/mtp 0770 mtp mtp
|
|
||||||
- mkdir /dev/usb-ffs/ptp 0770 mtp mtp
|
|
||||||
- mount functionfs mtp /dev/usb-ffs/mtp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
|
|
||||||
- mount functionfs ptp /dev/usb-ffs/ptp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
|
|
||||||
|
|
||||||
on property:sys.usb.config=mtp
|
|
||||||
stop adbd
|
|
||||||
@@ -79,7 +76,7 @@ on property:sys.usb.config=ptp
|
|
||||||
write /sys/class/android_usb/android0/bDeviceClass 0
|
|
||||||
write /sys/class/android_usb/android0/bDeviceSubClass 0
|
|
||||||
write /sys/class/android_usb/android0/bDeviceProtocol 0
|
|
||||||
- write /sys/class/android_usb/android0/functions ptp
|
|
||||||
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
|
||||||
write /sys/class/android_usb/android0/enable 1
|
|
||||||
setprop sys.usb.state ${sys.usb.config}
|
|
||||||
|
|
||||||
@@ -90,7 +87,7 @@ on property:sys.usb.config=ptp,adb
|
|
||||||
write /sys/class/android_usb/android0/bDeviceClass 0
|
|
||||||
write /sys/class/android_usb/android0/bDeviceSubClass 0
|
|
||||||
write /sys/class/android_usb/android0/bDeviceProtocol 0
|
|
||||||
- write /sys/class/android_usb/android0/functions ptp,adb
|
|
||||||
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
|
||||||
write /sys/class/android_usb/android0/enable 1
|
|
||||||
start adbd
|
|
||||||
setprop sys.usb.state ${sys.usb.config}
|
|
@ -1,44 +0,0 @@
|
|||||||
From 2a85ab00b30f1d3a3212fecfad1138cc2d54af3b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Zhao Wei Liew <zhaoweiliew@gmail.com>
|
|
||||||
Date: Wed, 31 Oct 2018 14:05:57 +0000
|
|
||||||
Subject: [PATCH] liblight: Fix potential fd leak
|
|
||||||
|
|
||||||
Currently, when the value to be written to an LED file does not
|
|
||||||
fit into the buffer, the opened file descriptor is not closed,
|
|
||||||
leaking the file descriptor.
|
|
||||||
|
|
||||||
Fix it by closing the file descriptor before returning.
|
|
||||||
|
|
||||||
Change-Id: I1c46fcc35f560358b1f60e0fac45f4c5a42cd484
|
|
||||||
---
|
|
||||||
liblight/lights.c | 10 ++++++++--
|
|
||||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/liblight/lights.c b/liblight/lights.c
|
|
||||||
index d5717488..9f605270 100644
|
|
||||||
--- a/liblight/lights.c
|
|
||||||
+++ b/liblight/lights.c
|
|
||||||
@@ -123,7 +123,10 @@ write_int(char const* path, int value)
|
|
||||||
if (fd >= 0) {
|
|
||||||
char buffer[20];
|
|
||||||
size_t bytes = snprintf(buffer, sizeof(buffer), "%d\n", value);
|
|
||||||
- if(bytes >= sizeof(buffer)) return -EINVAL;
|
|
||||||
+ if (bytes >= sizeof(buffer)) {
|
|
||||||
+ close(fd);
|
|
||||||
+ return -EINVAL;
|
|
||||||
+ }
|
|
||||||
ssize_t amt = write(fd, buffer, bytes);
|
|
||||||
close(fd);
|
|
||||||
return amt == -1 ? -errno : 0;
|
|
||||||
@@ -146,7 +149,10 @@ write_double_int(char const* path, int value1, int value2)
|
|
||||||
if (fd >= 0) {
|
|
||||||
char buffer[20];
|
|
||||||
size_t bytes = snprintf(buffer, sizeof(buffer), "%d %d\n", value1, value2);
|
|
||||||
- if(bytes >= sizeof(buffer)) return -EINVAL;
|
|
||||||
+ if (bytes >= sizeof(buffer)) {
|
|
||||||
+ close(fd);
|
|
||||||
+ return -EINVAL;
|
|
||||||
+ }
|
|
||||||
ssize_t amt = write(fd, buffer, bytes);
|
|
||||||
close(fd);
|
|
||||||
return amt == -1 ? -errno : 0;
|
|
@ -1,21 +0,0 @@
|
|||||||
From c8614262845ee9a0c096ca7da3ec66b9d3e3ce7d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Aleksander Gencel <johnnylittleplanet@gmail.com>
|
|
||||||
Date: Thu, 22 Aug 2019 21:07:47 +0200
|
|
||||||
Subject: [PATCH] g3-common: Add NFC HAL to proprietary-files
|
|
||||||
|
|
||||||
Change-Id: I00397ccd3377ec3da3ac7efce70d417a6c5bf8e3
|
|
||||||
---
|
|
||||||
proprietary-files.txt | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/proprietary-files.txt b/proprietary-files.txt
|
|
||||||
index 9511cf21..cc580f89 100644
|
|
||||||
--- a/proprietary-files.txt
|
|
||||||
+++ b/proprietary-files.txt
|
|
||||||
@@ -216,3 +216,6 @@ vendor/firmware/wcnss.mdt
|
|
||||||
|
|
||||||
# Widevine - from angler - OPR6.170623.017 factory image
|
|
||||||
vendor/lib/mediadrm/libwvdrmengine.so|66ba66d047044f92eb0eada1faf6a5799ded90ab
|
|
||||||
+
|
|
||||||
+# NFC
|
|
||||||
+vendor/lib/hw/nfc_nci.msm8974.so|7dcb79a385dd1155cb9b6310a3e7b85b7dc8db13
|
|
Loading…
Reference in New Issue
Block a user