Skip to content

Instantly share code, notes, and snippets.

$ for f in $(ls); do echo $$f; done
98204f
98204f
98204f
98204f
98204f
98204f
98204f
98204f
98204f
V/SetupWizard( 2835): BaseActivity.onPause() com.google.android.setupwizard.SimMissingActivity
V/SetupWizard( 2835): BaseActivity.onCreate(null) com.google.android.setupwizard.WifiSettingsActivity
D/SetupWizard( 2835): BaseActivity.onCreate() mIsFirstRun=true mIsSecondaryUser=false
D/AndroidRuntime( 2835): Shutting down VM
W/dalvikvm( 2835): threadid=1: thread exiting with uncaught exception (group=0x415e6db8)
E/AndroidRuntime( 2835): FATAL EXCEPTION: main
E/AndroidRuntime( 2835): Process: com.google.android.setupwizard, PID: 2835
E/AndroidRuntime( 2835): java.lang.NoSuchMethodError: android.net.wifi.IWifiManager.setWifiEnabled
E/AndroidRuntime( 2835): at com.google.android.setupwizard.BaseActivity.tryEnablingWifi(BaseActivity.java:1526)
E/AndroidRuntime( 2835): at com.google.android.setupwizard.WifiSettingsActivity.launchWifiSettingsPanel(WifiSettingsActivity.java:103)
package com.sarbs.tinker;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
# Copyright (C) 2010 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
# distributed under the License is distributed on an "AS IS" BASIS,
@tophyr
tophyr / BasePlugin.groovy
Last active August 29, 2015 14:07
ButterKnifeProcessor + Optimizing Proguard workaround
// from <aosp_root>/tools/base/build-system/gradle/src/main/groovy/com/android/build/gradle/BasePlugin.groovy
// here just for context, unmodified
/**
* Creates the proguarding task for the given Variant.
* @param variantData the variant data.
* @param testedVariantData optional. variant data representing the tested variant, null if the
* variant is not a test variant
* @return outFile file outputted by proguard
*/
alias ls='ls -G'
export LSCOLORS=gxfxcxdxbxegedabagacad
alias ..='cd ..'
export ANDROID_HOME="~/android-sdk-linux"
export PATH="~/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$JAVA_HOME/bin:$PATH"
# set the number of open files to be 1024
package com.cyngn.gradleplugin
import org.gradle.api.Task
public class AppExtension {
private String appName
private boolean system
private boolean privileged
CREATE TABLE app(aid integer primary key asc);
CREATE TABLE event (eid integer primary key asc, aid integer not null);
INSERT INTO app (aid) values (1);
INSERT INTO app (aid) values (2);
INSERT INTO app (aid) values (3);
INSERT INTO event (eid, aid) values (1, 1);
INSERT INTO event (eid, aid) values (2, 1);
INSERT INTO event (eid, aid) values (3, 1);
pom.withXml {
def newDep = asNode().dependencies[0].appendNode 'dependency'
def g = newDep.appendNode 'groupId'
g.setValue(project.group)
def a = newDep.appendNode 'artifactId'
a.setValue('version_plugin')
def v = newDep.appendNode 'version'
v.setValue(project.version)
def s = newDep.appendNode 'scope'
s.setValue('runtime')
apply plugin: 'java'
repositories {
maven { url "https://maven.cyngn.com/artifactory/repo" }
jcenter()
mavenLocal()
}
dependencies {
def firstAndroidVariant = project(':core').android.applicationVariants.toList().first()