Posts

Showing posts from 2019

file contexts and .te files

selinux-implementation good-question-SO visual_guide_to_sepolicy Policy files Files that end with *.te are SELinux policy source files, which define domains and their labels. You may need to create new policy files in /device/ manufacturer / device-name /sepolicy , but you should try to update existing files where possible.  Context files Context files are where you specify labels for your objects. file_contexts assigns labels to files and is used by various userspace components. As you create new policies, create or update this file to assign new labels to files. To apply new file_contexts , rebuild the filesystem image or run restorecon on the file to be relabeled. On upgrades, changes to file_contexts are automatically applied to the system and userdata partitions as part of the upgrade. Changes can also be automatically applied on upgrade to other partitions by adding restorecon_recursive calls to your init. board .rc file afte...

Ubuntu power user tricks

#All these command tested on, Ubuntu 16.04 LTS till date of this blog post. GNU/Linux, 4.15.0-47-generic, x86_64, #50~16.04.1-Ubuntu SMP machine. 1. To increase opened recent files in gedit on terminal type, gsettings set org.gnome.gedit.preferences.ui max-recents "uint32 60" 2. Mail from command line, you need, sponge , mailutils and ssmtp . To install sponge on a Debian-like system: apt-get install moreutils sudo apt install mailutils sudo apt-get install ssmtp open, sudo vim /etc/ssmtp/ssmtp.conf And add the following to the file: AuthUser= <user>@gmail.com AuthPass= Your-Gmail-Password mailhub= smtp.gmail.com:587 UseSTARTTLS= YES test it # cat some-text-file | mail -s "Test" my.user@gmail.com 3. Test with building android, do envsetup.sh and lunch # make -j4 showcommands &> build.log ; tail -n 100 build.log | sponge build_aosp8-tail.log | mail -s "Test log" my.user@gmail.com 4. A better command termina...