Skip to content

Instantly share code, notes, and snippets.

View Vandalko's full-sized avatar

Oleksandr Tereshchuk Vandalko

View GitHub Profile
@Vandalko
Vandalko / AndroidManifest.xml
Created August 5, 2017 16:22
DynamiteModule issue
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.example.gms.customrenderingexample">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
@Vandalko
Vandalko / init.gradle
Created July 30, 2017 21:41
Prints name and class of each executed task.
// Example use: gradle -I init.gradle clean assembleDebug
useLogger(new CustomEventLogger())
class CustomEventLogger extends BuildAdapter implements TaskExecutionListener {
public void beforeExecute(Task task) {
println task + " " + task.class
}
public void afterExecute(Task task, TaskState state) {
}
public void buildFinished(BuildResult result) {
@Vandalko
Vandalko / hash.groovy
Last active August 29, 2015 14:07
Android device password hashing
/**
* Simple script to check hashed device password values.
* Primary user file located at /data/system/password.key
* Other users: /data/system/users/{user-id}/password.key
* You may also check device_policies.xml file for password type and complexity hint
*
* @see DevicePolicyManagerService
* @see LockPatternUtils
* @see LockSettingsService
*/
@Vandalko
Vandalko / build.gradle
Created December 17, 2013 13:05
Android Studio (Gradle) NDK support
//////////////
// NDK Support
//////////////
task buildNative(type: Exec) {
if (System.env.ANDROID_NDK != null) {
def ndkBuild = null
if (System.properties['os.name'].toLowerCase().contains('windows')) {
ndkBuild = new File(System.env.ANDROID_NDK, 'ndk-build.cmd')
} else {