sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- Download zsh-autosuggestions by
| if(window.jQuery){ | |
| //run when window ready | |
| $(window).ready(function(){ | |
| //detect item click | |
| $('body').on('click','.item.file>a',function(e){ | |
| var f=$(this); | |
| // Test the function, print the download/clicked file to console | |
| console.log("Downloading:"+f.context.href); | |
| ga('send', 'event', 'File Sharing', 'Download', f.context.href); | |
| }) |
| public String getTimestamp() { | |
| DateTime post = new DateTime(1468973396572); | |
| DateTime now = new DateTime(); | |
| Period period = new Period(post, now); | |
| PeriodFormatter formatter; | |
| if(period.getYears() != 0){ | |
| formatter = new PeriodFormatterBuilder().appendYears().appendSuffix("Y").printZeroNever().toFormatter(); | |
| }else if(period.getMonths() !=0){ |
JsonObject json;
try {
JsonElement element = new JsonParser().parse(
new InputStreamReader(responseEntity.getBody().getInputStream())
);
json = element.getAsJsonObject();
} catch (IOException e) {
throw new RuntimeException(e.getLocalizedMessage());
}Migrated with additional information to my blog: https://msfjarvis.dev/posts/understanding-and-resolving-selinux-denials-on-android/
Denial in question
avc: denied { read write } for pid=29059 comm="i.tetherservice" name="ipa" dev="tmpfs" ino=11991 scontext=u:r:system_app:s0 tcontext=u:object_r:ipa_dev:s0 tclass=chr_file permissive=0
sepolicy fix
| /* | |
| * Copyright (C) 2017 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| import android.annotation.SuppressLint | |
| import android.content.ContentUris | |
| import android.content.Context | |
| import android.content.CursorLoader | |
| import android.database.Cursor | |
| import android.net.Uri | |
| import android.os.Build | |
| import android.os.Environment | |
| import android.provider.DocumentsContract | |
| import android.provider.MediaStore |