Custom Anbox installation files & patches, including patched Android OS image file.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

213 lines
8.6 KiB

4 years ago
  1. --- a/system/core/rootdir/init.rc 2020-06-06 23:23:27.105286979 +0300
  2. +++ b/system/core/rootdir/init.rc 2020-06-06 23:23:53.165287009 +0300
  3. @@ -42,28 +42,28 @@
  4. # Link /vendor to /system/vendor for devices without a vendor partition.
  5. symlink /system/vendor /vendor
  6. - # Mount cgroup mount point for cpu accounting
  7. - mount cgroup none /acct cpuacct
  8. - mkdir /acct/uid
  9. -
  10. - # Create energy-aware scheduler tuning nodes
  11. - mkdir /dev/stune
  12. - mount cgroup none /dev/stune schedtune
  13. - mkdir /dev/stune/foreground
  14. - mkdir /dev/stune/background
  15. - mkdir /dev/stune/top-app
  16. - chown system system /dev/stune
  17. - chown system system /dev/stune/foreground
  18. - chown system system /dev/stune/background
  19. - chown system system /dev/stune/top-app
  20. - chown system system /dev/stune/tasks
  21. - chown system system /dev/stune/foreground/tasks
  22. - chown system system /dev/stune/background/tasks
  23. - chown system system /dev/stune/top-app/tasks
  24. - chmod 0664 /dev/stune/tasks
  25. - chmod 0664 /dev/stune/foreground/tasks
  26. - chmod 0664 /dev/stune/background/tasks
  27. - chmod 0664 /dev/stune/top-app/tasks
  28. +# # Mount cgroup mount point for cpu accounting
  29. +# mount cgroup none /acct cpuacct
  30. +# mkdir /acct/uid
  31. +
  32. +# # Create energy-aware scheduler tuning nodes
  33. +# mkdir /dev/stune
  34. +# mount cgroup none /dev/stune schedtune
  35. +# mkdir /dev/stune/foreground
  36. +# mkdir /dev/stune/background
  37. +# mkdir /dev/stune/top-app
  38. +# chown system system /dev/stune
  39. +# chown system system /dev/stune/foreground
  40. +# chown system system /dev/stune/background
  41. +# chown system system /dev/stune/top-app
  42. +# chown system system /dev/stune/tasks
  43. +# chown system system /dev/stune/foreground/tasks
  44. +# chown system system /dev/stune/background/tasks
  45. +# chown system system /dev/stune/top-app/tasks
  46. +# chmod 0664 /dev/stune/tasks
  47. +# chmod 0664 /dev/stune/foreground/tasks
  48. +# chmod 0664 /dev/stune/background/tasks
  49. +# chmod 0664 /dev/stune/top-app/tasks
  50. # Mount staging areas for devices managed by vold
  51. # See storage config details at http://source.android.com/tech/storage/
  52. @@ -98,11 +98,11 @@
  53. symlink /storage/self/primary /mnt/sdcard
  54. symlink /mnt/user/0/primary /mnt/runtime/default/self/primary
  55. - # root memory control cgroup, used by lmkd
  56. - mkdir /dev/memcg 0700 root system
  57. - mount cgroup none /dev/memcg memory
  58. - # app mem cgroups, used by activity manager, lmkd and zygote
  59. - mkdir /dev/memcg/apps/ 0755 system system
  60. +# # root memory control cgroup, used by lmkd
  61. +# mkdir /dev/memcg 0700 root system
  62. +# mount cgroup none /dev/memcg memory
  63. +# # app mem cgroups, used by activity manager, lmkd and zygote
  64. +# mkdir /dev/memcg/apps/ 0755 system system
  65. write /proc/sys/kernel/panic_on_oops 1
  66. write /proc/sys/kernel/hung_task_timeout_secs 0
  67. @@ -136,74 +136,74 @@
  68. write /proc/sys/net/ipv4/conf/all/accept_redirects 0
  69. write /proc/sys/net/ipv6/conf/all/accept_redirects 0
  70. - # Create cgroup mount points for process groups
  71. - mkdir /dev/cpuctl
  72. - mount cgroup none /dev/cpuctl cpu
  73. - chown system system /dev/cpuctl
  74. - chown system system /dev/cpuctl/tasks
  75. - chmod 0666 /dev/cpuctl/tasks
  76. - write /dev/cpuctl/cpu.rt_period_us 1000000
  77. - write /dev/cpuctl/cpu.rt_runtime_us 950000
  78. -
  79. - mkdir /dev/cpuctl/bg_non_interactive
  80. - chown system system /dev/cpuctl/bg_non_interactive/tasks
  81. - chmod 0666 /dev/cpuctl/bg_non_interactive/tasks
  82. - # 5.0 %
  83. - write /dev/cpuctl/bg_non_interactive/cpu.shares 52
  84. - write /dev/cpuctl/bg_non_interactive/cpu.rt_period_us 1000000
  85. - # active FIFO threads will never be in BG
  86. - write /dev/cpuctl/bg_non_interactive/cpu.rt_runtime_us 10000
  87. -
  88. - # sets up initial cpusets for ActivityManager
  89. - mkdir /dev/cpuset
  90. - mount cpuset none /dev/cpuset
  91. -
  92. - # this ensures that the cpusets are present and usable, but the device's
  93. - # init.rc must actually set the correct cpus
  94. - mkdir /dev/cpuset/foreground
  95. - write /dev/cpuset/foreground/cpus 0
  96. - write /dev/cpuset/foreground/mems 0
  97. - mkdir /dev/cpuset/foreground/boost
  98. - write /dev/cpuset/foreground/boost/cpus 0
  99. - write /dev/cpuset/foreground/boost/mems 0
  100. - mkdir /dev/cpuset/background
  101. - write /dev/cpuset/background/cpus 0
  102. - write /dev/cpuset/background/mems 0
  103. -
  104. - # system-background is for system tasks that should only run on
  105. - # little cores, not on bigs
  106. - # to be used only by init, so don't change system-bg permissions
  107. - mkdir /dev/cpuset/system-background
  108. - write /dev/cpuset/system-background/cpus 0
  109. - write /dev/cpuset/system-background/mems 0
  110. -
  111. - mkdir /dev/cpuset/top-app
  112. - write /dev/cpuset/top-app/cpus 0
  113. - write /dev/cpuset/top-app/mems 0
  114. -
  115. - # change permissions for all cpusets we'll touch at runtime
  116. - chown system system /dev/cpuset
  117. - chown system system /dev/cpuset/foreground
  118. - chown system system /dev/cpuset/foreground/boost
  119. - chown system system /dev/cpuset/background
  120. - chown system system /dev/cpuset/system-background
  121. - chown system system /dev/cpuset/top-app
  122. - chown system system /dev/cpuset/tasks
  123. - chown system system /dev/cpuset/foreground/tasks
  124. - chown system system /dev/cpuset/foreground/boost/tasks
  125. - chown system system /dev/cpuset/background/tasks
  126. - chown system system /dev/cpuset/system-background/tasks
  127. - chown system system /dev/cpuset/top-app/tasks
  128. -
  129. - # set system-background to 0775 so SurfaceFlinger can touch it
  130. - chmod 0775 /dev/cpuset/system-background
  131. -
  132. - chmod 0664 /dev/cpuset/foreground/tasks
  133. - chmod 0664 /dev/cpuset/foreground/boost/tasks
  134. - chmod 0664 /dev/cpuset/background/tasks
  135. - chmod 0664 /dev/cpuset/system-background/tasks
  136. - chmod 0664 /dev/cpuset/top-app/tasks
  137. - chmod 0664 /dev/cpuset/tasks
  138. +# # Create cgroup mount points for process groups
  139. +# mkdir /dev/cpuctl
  140. +# mount cgroup none /dev/cpuctl cpu
  141. +# chown system system /dev/cpuctl
  142. +# chown system system /dev/cpuctl/tasks
  143. +# chmod 0666 /dev/cpuctl/tasks
  144. +# write /dev/cpuctl/cpu.rt_period_us 1000000
  145. +# write /dev/cpuctl/cpu.rt_runtime_us 950000
  146. +#
  147. +# mkdir /dev/cpuctl/bg_non_interactive
  148. +# chown system system /dev/cpuctl/bg_non_interactive/tasks
  149. +# chmod 0666 /dev/cpuctl/bg_non_interactive/tasks
  150. +# # 5.0 %
  151. +# write /dev/cpuctl/bg_non_interactive/cpu.shares 52
  152. +# write /dev/cpuctl/bg_non_interactive/cpu.rt_period_us 1000000
  153. +# # active FIFO threads will never be in BG
  154. +# write /dev/cpuctl/bg_non_interactive/cpu.rt_runtime_us 10000
  155. +
  156. +# # sets up initial cpusets for ActivityManager
  157. +# mkdir /dev/cpuset
  158. +# mount cpuset none /dev/cpuset
  159. +#
  160. +# # this ensures that the cpusets are present and usable, but the device's
  161. +# # init.rc must actually set the correct cpus
  162. +# mkdir /dev/cpuset/foreground
  163. +# write /dev/cpuset/foreground/cpus 0
  164. +# write /dev/cpuset/foreground/mems 0
  165. +# mkdir /dev/cpuset/foreground/boost
  166. +# write /dev/cpuset/foreground/boost/cpus 0
  167. +# write /dev/cpuset/foreground/boost/mems 0
  168. +# mkdir /dev/cpuset/background
  169. +# write /dev/cpuset/background/cpus 0
  170. +# write /dev/cpuset/background/mems 0
  171. +#
  172. +# # system-background is for system tasks that should only run on
  173. +# # little cores, not on bigs
  174. +# # to be used only by init, so don't change system-bg permissions
  175. +# mkdir /dev/cpuset/system-background
  176. +# write /dev/cpuset/system-background/cpus 0
  177. +# write /dev/cpuset/system-background/mems 0
  178. +#
  179. +# mkdir /dev/cpuset/top-app
  180. +# write /dev/cpuset/top-app/cpus 0
  181. +# write /dev/cpuset/top-app/mems 0
  182. +#
  183. +# # change permissions for all cpusets we'll touch at runtime
  184. +# chown system system /dev/cpuset
  185. +# chown system system /dev/cpuset/foreground
  186. +# chown system system /dev/cpuset/foreground/boost
  187. +# chown system system /dev/cpuset/background
  188. +# chown system system /dev/cpuset/system-background
  189. +# chown system system /dev/cpuset/top-app
  190. +# chown system system /dev/cpuset/tasks
  191. +# chown system system /dev/cpuset/foreground/tasks
  192. +# chown system system /dev/cpuset/foreground/boost/tasks
  193. +# chown system system /dev/cpuset/background/tasks
  194. +# chown system system /dev/cpuset/system-background/tasks
  195. +# chown system system /dev/cpuset/top-app/tasks
  196. +#
  197. +# # set system-background to 0775 so SurfaceFlinger can touch it
  198. +# chmod 0775 /dev/cpuset/system-background
  199. +#
  200. +# chmod 0664 /dev/cpuset/foreground/tasks
  201. +# chmod 0664 /dev/cpuset/foreground/boost/tasks
  202. +# chmod 0664 /dev/cpuset/background/tasks
  203. +# chmod 0664 /dev/cpuset/system-background/tasks
  204. +# chmod 0664 /dev/cpuset/top-app/tasks
  205. +# chmod 0664 /dev/cpuset/tasks
  206. # qtaguid will limit access to specific data based on group memberships.