# vim:syntax=apparmor # ------------------------------------------------------------------ # # Copyright (C) 2020 Mikhail Morfikov # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License published by the Free Software Foundation. # # ------------------------------------------------------------------ #abi , #include @{exec_path} = /opt/SPFlashTool/flash_tool{,.sh} profile spflashtool @{exec_path} { #include #include #include #include @{exec_path} mrix, # SPFlashTool installation files /opt/SPFlashTool/{,**} r, /opt/SPFlashTool/lib*.so mr, /opt/SPFlashTool/lib/lib*.so.[0-9]* mr, /opt/SPFlashTool/*.ini rk, # Session logs owner /tmp/SP_FT_Logs/ rw, owner /tmp/SP_FT_Logs/SP_FT_Dump_*/ rw, owner /tmp/SP_FT_Logs/SP_FT_Dump_*1/QT_FLASH_TOOL.log w, owner /tmp/SP_FT_Logs/SP_FT_Dump_*/BROM_DLL_V[0-9]*.log w, owner /tmp/SP_FT_Logs/SP_FT_Dump_*/GLB_[0-9]*-[0-9]*_[0-9]*.log w, owner /tmp/SP_FT_Logs/SP_FT_Dump_*/QT_FLASH_TOOL.log w, owner /tmp/SP_FT_Logs/SP_FT_Dump_*/ADPT_[0-9]*-[0-9]*_[0-9]*.log w, # For reading the scatter.txt file / r, /media/ r, owner /media/Android/{,**/} r, owner /media/Android/**scatter.txt r, # For backups owner /media/Android/smartphones_flash_backup/ r, owner /media/Android/smartphones_flash_backup/** rw, owner @{HOME}/.config/Trolltech.conf rwk, owner @{HOME}/.config/MTK/ rw, owner @{HOME}/.config/MTK/Clipper.conf rwk, owner @{HOME}/.Xauthority r, owner @{HOME}/.icons/default/index.theme r, /etc/X11/cursors/*.theme r, /usr/share/icons/*/cursors/default r, /usr/share/icons/*/index.theme rk, /usr/share/icons/*/cursors/* r, /dev/ r, # For reading/writing from/to phone flash memory /dev/ttyACM[0-9]* rw, /sys/devices/pci[0-9]*/**/{idVendor,idProduct} r, # Silence the noise /opt/SPFlashTool/** w, #include if exists }