├── README
├── repo
├── android-av-test
│ ├── libs
│ │ ├── dexmaker-1.0.jar
│ │ ├── mockito-core-1.9.5.jar
│ │ ├── dexmaker-mockito-1.0.jar
│ │ └── com.springsource.org.objenesis-1.0.0.jar
│ ├── res
│ │ ├── drawable-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── drawable-ldpi
│ │ │ └── ic_launcher.png
│ │ ├── drawable-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── values
│ │ │ └── strings.xml
│ │ └── layout
│ │ │ └── main.xml
│ ├── .settings
│ │ ├── org.eclipse.jdt.ui.prefs
│ │ └── org.eclipse.jdt.core.prefs
│ ├── project.properties
│ ├── .classpath
│ ├── AndroidManifest.xml
│ ├── ant.properties
│ ├── .project
│ ├── proguard.cfg
│ ├── src
│ │ └── com
│ │ │ └── steelthorn
│ │ │ └── android
│ │ │ └── av
│ │ │ ├── ScanTests.java
│ │ │ ├── DebugScanListener.java
│ │ │ └── StandardTests.java
│ ├── build.xml
│ └── license.txt
├── android-av
│ ├── res
│ │ ├── drawable-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── drawable-ldpi
│ │ │ └── ic_launcher.png
│ │ ├── drawable-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── values
│ │ │ └── strings.xml
│ │ └── layout
│ │ │ └── main.xml
│ ├── .settings
│ │ ├── org.eclipse.jdt.ui.prefs
│ │ └── org.eclipse.jdt.core.prefs
│ ├── src
│ │ └── com
│ │ │ └── steelthorn
│ │ │ └── android
│ │ │ └── av
│ │ │ ├── IScanEngine.java
│ │ │ ├── IScanDefinitionProvider.java
│ │ │ ├── IThreatInfo.java
│ │ │ ├── ITargetSource.java
│ │ │ ├── IScanTarget.java
│ │ │ ├── DevDefinitionProvider.java
│ │ │ ├── IScanDefinitionGroup.java
│ │ │ ├── BasicScanContext.java
│ │ │ ├── IScanListener.java
│ │ │ ├── BinaryNode.java
│ │ │ ├── SignatureDatabase.java
│ │ │ ├── ScanResult.java
│ │ │ ├── ScanManager.java
│ │ │ ├── ThreatInfo.java
│ │ │ ├── ScanContext.java
│ │ │ ├── ScanEngine.java
│ │ │ ├── PackageInfoTarget.java
│ │ │ ├── InstalledTargetSource.java
│ │ │ ├── DemoDefinition.java
│ │ │ ├── ContextTargetSource.java
│ │ │ ├── AbstractTarget.java
│ │ │ ├── IScanDefinition.java
│ │ │ ├── DefaultScanEngine.java
│ │ │ ├── DemoScanDefinitionProvider.java
│ │ │ ├── Util.java
│ │ │ ├── Base64InputStream.java
│ │ │ ├── Base64OutputStream.java
│ │ │ └── BinarySearchTree.java
│ ├── .classpath
│ ├── project.properties
│ ├── AndroidManifest.xml
│ ├── .project
│ ├── proguard.cfg
│ └── license.txt
└── android-av-ui
│ ├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── drawable-ldpi
│ │ └── ic_launcher.png
│ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ ├── values
│ │ └── strings.xml
│ └── layout
│ │ └── main.xml
│ ├── .classpath
│ ├── project.properties
│ ├── AndroidManifest.xml
│ ├── .project
│ ├── src
│ └── com
│ │ └── steelthorn
│ │ └── android
│ │ └── av
│ │ └── ui
│ │ └── TestActivity.java
│ ├── proguard.cfg
│ └── license.txt
└── .gitignore
/README:
--------------------------------------------------------------------------------
1 | A proof-of-concept framework for an Android anti-virus/security engine.
--------------------------------------------------------------------------------
/repo/android-av-test/libs/dexmaker-1.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zaventh/android-av/HEAD/repo/android-av-test/libs/dexmaker-1.0.jar
--------------------------------------------------------------------------------
/repo/android-av-test/libs/mockito-core-1.9.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zaventh/android-av/HEAD/repo/android-av-test/libs/mockito-core-1.9.5.jar
--------------------------------------------------------------------------------
/repo/android-av/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zaventh/android-av/HEAD/repo/android-av/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/repo/android-av/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zaventh/android-av/HEAD/repo/android-av/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/repo/android-av/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zaventh/android-av/HEAD/repo/android-av/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/repo/android-av-test/libs/dexmaker-mockito-1.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zaventh/android-av/HEAD/repo/android-av-test/libs/dexmaker-mockito-1.0.jar
--------------------------------------------------------------------------------
/repo/android-av-ui/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zaventh/android-av/HEAD/repo/android-av-ui/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/repo/android-av-ui/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zaventh/android-av/HEAD/repo/android-av-ui/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/repo/android-av-ui/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zaventh/android-av/HEAD/repo/android-av-ui/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/repo/android-av-test/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zaventh/android-av/HEAD/repo/android-av-test/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/repo/android-av-test/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zaventh/android-av/HEAD/repo/android-av-test/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/repo/android-av-test/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zaventh/android-av/HEAD/repo/android-av-test/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/repo/android-av-test/libs/com.springsource.org.objenesis-1.0.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zaventh/android-av/HEAD/repo/android-av-test/libs/com.springsource.org.objenesis-1.0.0.jar
--------------------------------------------------------------------------------
/repo/android-av/.settings/org.eclipse.jdt.ui.prefs:
--------------------------------------------------------------------------------
1 | #Tue Jan 05 15:00:31 EST 2010
2 | eclipse.preferences.version=1
3 | formatter_profile=_Steelthorn
4 | formatter_settings_version=11
5 |
--------------------------------------------------------------------------------
/repo/android-av-test/.settings/org.eclipse.jdt.ui.prefs:
--------------------------------------------------------------------------------
1 | #Tue Jan 05 15:00:31 EST 2010
2 | eclipse.preferences.version=1
3 | formatter_profile=_Steelthorn
4 | formatter_settings_version=11
5 |
--------------------------------------------------------------------------------
/repo/android-av/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello World!
5 | android-av
6 |
7 |
--------------------------------------------------------------------------------
/repo/android-av-test/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello World!
5 | Android-av-testTest
6 |
7 |
--------------------------------------------------------------------------------
/repo/android-av-ui/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello World, TestActivity!
5 | android-av-ui
6 |
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # built application files
2 | *.apk
3 | *.ap_
4 |
5 | # files for the dex VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # generated files
12 | bin/
13 | gen/
14 |
15 | # Local configuration file (sdk path, etc)
16 | local.properties
17 |
18 | .metadata/
19 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/IScanEngine.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.steelthorn.android.av;
5 |
6 | /**
7 | *
8 | */
9 | public interface IScanEngine
10 | {
11 | void scan(ScanContext ctx, IScanDefinitionProvider provider);
12 |
13 | IThreatInfo scanTarget(IScanTarget target, IScanDefinitionProvider provider);
14 |
15 | void cancel();
16 | }
17 |
--------------------------------------------------------------------------------
/repo/android-av-ui/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/repo/android-av/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/repo/android-av-ui/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-7
12 |
--------------------------------------------------------------------------------
/repo/android-av/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-7
12 |
--------------------------------------------------------------------------------
/repo/android-av-test/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-7
12 |
--------------------------------------------------------------------------------
/repo/android-av-ui/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/repo/android-av/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/repo/android-av-test/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/repo/android-av/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/repo/android-av-test/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/repo/android-av-test/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
12 |
13 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/repo/android-av-test/ant.properties:
--------------------------------------------------------------------------------
1 | # This file is used to override default values used by the Ant build system.
2 | #
3 | # This file must be checked in Version Control Systems, as it is
4 | # integral to the build system of your project.
5 |
6 | # This file is only used by the Ant script.
7 |
8 | # You can use this to override default values such as
9 | # 'source.dir' for the location of your java source folder and
10 | # 'out.dir' for the location of your output folder.
11 |
12 | # You can also use it define how the release builds are signed by declaring
13 | # the following properties:
14 | # 'key.store' for the location of your keystore and
15 | # 'key.alias' for the name of the key to use.
16 | # The password will be asked during the build when you use the 'release' target.
17 |
18 | tested.project.dir=..\\android-av-ui
19 |
--------------------------------------------------------------------------------
/repo/android-av-ui/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
12 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/IScanDefinitionProvider.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import java.util.List;
14 |
15 | public interface IScanDefinitionProvider
16 | {
17 | List getDefinitions();
18 | }
19 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/IThreatInfo.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | public interface IThreatInfo
14 | {
15 | public IScanTarget getTarget();
16 |
17 | public IScanDefinitionGroup getSignature();
18 |
19 | public double getConfidence();
20 | }
21 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/ITargetSource.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 |
14 | public interface ITargetSource extends Iterable
15 | {
16 | //Iterator getTargets();
17 | public String getName();
18 |
19 | public int getTargetCount();
20 | }
21 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/IScanTarget.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | public interface IScanTarget extends Comparable
14 | {
15 | byte getTargetType();
16 |
17 | String getName();
18 |
19 | long getSize();
20 |
21 | boolean checkThreat(IScanDefinition criteria);
22 | }
23 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/DevDefinitionProvider.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import java.util.List;
14 |
15 | class DevDefinitionProvider implements IScanDefinitionProvider
16 | {
17 |
18 | public List getDefinitions()
19 | {
20 | return Util.getDevDefinitions();
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/IScanDefinitionGroup.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import java.util.List;
14 |
15 |
16 | public interface IScanDefinitionGroup
17 | {
18 | public int getDefinitionGroupId();
19 |
20 | public byte getDefinitionType();
21 |
22 | public List getDefinitions();
23 | }
24 |
--------------------------------------------------------------------------------
/repo/android-av-ui/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | android-av-ui
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/repo/android-av/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | android-av
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/repo/android-av-test/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | android-av-test
4 |
5 |
6 | android-av
7 |
8 |
9 |
10 | com.android.ide.eclipse.adt.ResourceManagerBuilder
11 |
12 |
13 |
14 |
15 | com.android.ide.eclipse.adt.PreCompilerBuilder
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javabuilder
21 |
22 |
23 |
24 |
25 | com.android.ide.eclipse.adt.ApkBuilder
26 |
27 |
28 |
29 |
30 |
31 | com.android.ide.eclipse.adt.AndroidNature
32 | org.eclipse.jdt.core.javanature
33 |
34 |
35 |
--------------------------------------------------------------------------------
/repo/android-av-ui/src/com/steelthorn/android/av/ui/TestActivity.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av.ui;
12 |
13 | import android.app.Activity;
14 | import android.os.Bundle;
15 |
16 | public class TestActivity extends Activity {
17 | /** Called when the activity is first created. */
18 | @Override
19 | public void onCreate(Bundle savedInstanceState) {
20 | super.onCreate(savedInstanceState);
21 | setContentView(R.layout.main);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/BasicScanContext.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import android.content.Context;
14 |
15 | class BasicScanContext extends ScanContext
16 | {
17 | protected BasicScanContext(Context androidContext, IScanListener listener)
18 | {
19 | super(androidContext, listener);
20 | }
21 |
22 | @Override
23 | public ITargetSource[] getSources()
24 | {
25 | return new ITargetSource[] { new InstalledTargetSource(getAndroidContext()) };
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/IScanListener.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | public interface IScanListener
14 | {
15 | void onTargetSourceSwitch(ITargetSource currentSource);
16 |
17 | void onTargetScanBegin(IScanTarget target);
18 | void onTargetScanComplete(IScanTarget target, IThreatInfo info);
19 |
20 | void onScanCompleted(ScanResult result);
21 | void onScanProgress(double progress);
22 | void onScanException(Exception error);
23 |
24 | void onScanCanceled(ScanResult result);
25 | }
26 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/BinaryNode.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | //Basic node stored in unbalanced binary search trees
14 | //Note that this class is not accessible outside
15 | //of this package.
16 |
17 | class BinaryNode>
18 | {
19 | // Constructors
20 | BinaryNode(T theElement)
21 | {
22 | element = theElement;
23 | left = right = null;
24 | }
25 |
26 | // Friendly data; accessible by other package routines
27 | T element; // The data in the node
28 | BinaryNode left; // Left child
29 | BinaryNode right; // Right child
30 | }
31 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/SignatureDatabase.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import android.database.sqlite.SQLiteDatabase;
14 | import android.database.sqlite.SQLiteOpenHelper;
15 |
16 | public class SignatureDatabase extends SQLiteOpenHelper
17 | {
18 | public SignatureDatabase()
19 | {
20 | super(null,null,null,1);
21 | }
22 |
23 | @Override
24 | public void onCreate(SQLiteDatabase arg0)
25 | {
26 | // TODO Auto-generated method stub
27 |
28 | }
29 |
30 | @Override
31 | public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2)
32 | {
33 | // TODO Auto-generated method stub
34 |
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/ScanResult.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import java.util.ArrayList;
14 | import java.util.List;
15 |
16 | public class ScanResult
17 | {
18 | private List _matchedTargets;
19 |
20 | protected ScanResult()
21 | {
22 | _matchedTargets = new ArrayList();
23 | }
24 |
25 | public Boolean getMatchesFound()
26 | {
27 | return (_matchedTargets != null && _matchedTargets.size() > 0);
28 | }
29 |
30 | protected void addMatchFound(IThreatInfo target)
31 | {
32 | _matchedTargets.add(target);
33 | }
34 |
35 | public List getMatchedTargets()
36 | {
37 | return _matchedTargets;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/ScanManager.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import android.content.Context;
14 |
15 | public class ScanManager
16 | {
17 | public void performBasicScan(Context appCtx, IScanListener listener)
18 | {
19 | ScanEngine engine = new DefaultScanEngine();
20 |
21 | ScanContext ctx = new BasicScanContext(appCtx, listener);
22 |
23 | // TODO: Abstract out, obviously
24 | engine.scan(ctx, new DevDefinitionProvider());
25 | }
26 |
27 | public void performBasicScanAsync(final Context appCtx, final IScanListener listener)
28 | {
29 | new Thread()
30 | {
31 | public void run()
32 | {
33 | performBasicScan(appCtx, listener);
34 | }
35 | }.start();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/ThreatInfo.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | public class ThreatInfo implements IThreatInfo
14 | {
15 | private final IScanTarget _target;
16 | private final IScanDefinitionGroup _sig;
17 | private final double _confidence;
18 |
19 | public ThreatInfo(IScanTarget target, IScanDefinitionGroup signature, double confidence)
20 | {
21 | _target = target;
22 | _sig = signature;
23 | _confidence = confidence;
24 | }
25 |
26 | public IScanTarget getTarget()
27 | {
28 | return _target;
29 | }
30 |
31 | public IScanDefinitionGroup getSignature()
32 | {
33 | return _sig;
34 | }
35 |
36 | public double getConfidence()
37 | {
38 | return _confidence;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/ScanContext.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import java.lang.ref.WeakReference;
14 |
15 | import android.content.Context;
16 |
17 | public abstract class ScanContext
18 | {
19 | final WeakReference _weakContext;
20 | final IScanListener _listener;
21 |
22 | protected ScanContext(Context androidContext, IScanListener listener)
23 | {
24 | _weakContext = new WeakReference(androidContext);
25 | _listener = listener;
26 | }
27 |
28 | public Context getAndroidContext()
29 | {
30 | return _weakContext.get();
31 | }
32 |
33 | protected IScanListener getListener()
34 | {
35 | return _listener;
36 | }
37 |
38 | public abstract ITargetSource[] getSources();
39 | }
40 |
--------------------------------------------------------------------------------
/repo/android-av/proguard.cfg:
--------------------------------------------------------------------------------
1 | -optimizationpasses 5
2 | -dontusemixedcaseclassnames
3 | -dontskipnonpubliclibraryclasses
4 | -dontpreverify
5 | -verbose
6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
7 |
8 | -keep public class * extends android.app.Activity
9 | -keep public class * extends android.app.Application
10 | -keep public class * extends android.app.Service
11 | -keep public class * extends android.content.BroadcastReceiver
12 | -keep public class * extends android.content.ContentProvider
13 | -keep public class * extends android.app.backup.BackupAgentHelper
14 | -keep public class * extends android.preference.Preference
15 | -keep public class com.android.vending.licensing.ILicensingService
16 |
17 | -keepclasseswithmembernames class * {
18 | native ;
19 | }
20 |
21 | -keepclasseswithmembers class * {
22 | public (android.content.Context, android.util.AttributeSet);
23 | }
24 |
25 | -keepclasseswithmembers class * {
26 | public (android.content.Context, android.util.AttributeSet, int);
27 | }
28 |
29 | -keepclassmembers class * extends android.app.Activity {
30 | public void *(android.view.View);
31 | }
32 |
33 | -keepclassmembers enum * {
34 | public static **[] values();
35 | public static ** valueOf(java.lang.String);
36 | }
37 |
38 | -keep class * implements android.os.Parcelable {
39 | public static final android.os.Parcelable$Creator *;
40 | }
41 |
--------------------------------------------------------------------------------
/repo/android-av-test/proguard.cfg:
--------------------------------------------------------------------------------
1 | -optimizationpasses 5
2 | -dontusemixedcaseclassnames
3 | -dontskipnonpubliclibraryclasses
4 | -dontpreverify
5 | -verbose
6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
7 |
8 | -keep public class * extends android.app.Activity
9 | -keep public class * extends android.app.Application
10 | -keep public class * extends android.app.Service
11 | -keep public class * extends android.content.BroadcastReceiver
12 | -keep public class * extends android.content.ContentProvider
13 | -keep public class * extends android.app.backup.BackupAgentHelper
14 | -keep public class * extends android.preference.Preference
15 | -keep public class com.android.vending.licensing.ILicensingService
16 |
17 | -keepclasseswithmembernames class * {
18 | native ;
19 | }
20 |
21 | -keepclasseswithmembers class * {
22 | public (android.content.Context, android.util.AttributeSet);
23 | }
24 |
25 | -keepclasseswithmembers class * {
26 | public (android.content.Context, android.util.AttributeSet, int);
27 | }
28 |
29 | -keepclassmembers class * extends android.app.Activity {
30 | public void *(android.view.View);
31 | }
32 |
33 | -keepclassmembers enum * {
34 | public static **[] values();
35 | public static ** valueOf(java.lang.String);
36 | }
37 |
38 | -keep class * implements android.os.Parcelable {
39 | public static final android.os.Parcelable$Creator *;
40 | }
41 |
--------------------------------------------------------------------------------
/repo/android-av-ui/proguard.cfg:
--------------------------------------------------------------------------------
1 | -optimizationpasses 5
2 | -dontusemixedcaseclassnames
3 | -dontskipnonpubliclibraryclasses
4 | -dontpreverify
5 | -verbose
6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
7 |
8 | -keep public class * extends android.app.Activity
9 | -keep public class * extends android.app.Application
10 | -keep public class * extends android.app.Service
11 | -keep public class * extends android.content.BroadcastReceiver
12 | -keep public class * extends android.content.ContentProvider
13 | -keep public class * extends android.app.backup.BackupAgentHelper
14 | -keep public class * extends android.preference.Preference
15 | -keep public class com.android.vending.licensing.ILicensingService
16 |
17 | -keepclasseswithmembernames class * {
18 | native ;
19 | }
20 |
21 | -keepclasseswithmembers class * {
22 | public (android.content.Context, android.util.AttributeSet);
23 | }
24 |
25 | -keepclasseswithmembers class * {
26 | public (android.content.Context, android.util.AttributeSet, int);
27 | }
28 |
29 | -keepclassmembers class * extends android.app.Activity {
30 | public void *(android.view.View);
31 | }
32 |
33 | -keepclassmembers enum * {
34 | public static **[] values();
35 | public static ** valueOf(java.lang.String);
36 | }
37 |
38 | -keep class * implements android.os.Parcelable {
39 | public static final android.os.Parcelable$Creator *;
40 | }
41 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/ScanEngine.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | public abstract class ScanEngine implements IScanEngine
14 | {
15 | protected boolean _cancel;
16 |
17 | public static ScanEngine getDefaultScanEngine()
18 | {
19 | return new DefaultScanEngine();
20 | }
21 |
22 | public void cancel()
23 | {
24 | _cancel = true;
25 | }
26 |
27 | // public void scanAsync(final IScanContext ctx, final IScanCallback callback)
28 | // {
29 | // new Thread()
30 | // {
31 | // public void run()
32 | // {
33 | // try
34 | // {
35 | // IScanResult result = scan(ctx);
36 | // if (callback != null)
37 | // callback.onScanCompleted(result);
38 | // }
39 | // catch (Exception e)
40 | // {
41 | // if (callback != null)
42 | // callback.onScanFailed(e);
43 | // }
44 | // }
45 | // }.start();
46 | // }
47 | }
48 |
--------------------------------------------------------------------------------
/repo/android-av-test/src/com/steelthorn/android/av/ScanTests.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import java.security.MessageDigest;
14 | import java.security.NoSuchAlgorithmException;
15 |
16 | import android.test.AndroidTestCase;
17 |
18 | abstract class ScanTests extends AndroidTestCase
19 | {
20 | @Override
21 | protected void setUp() throws Exception
22 | {
23 | super.setUp();
24 | Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
25 | }
26 |
27 | protected DemoDefinition createDefGroup(final String packageName)
28 | {
29 | try
30 | {
31 | MessageDigest md = MessageDigest.getInstance("SHA-1");
32 | md.update(packageName.getBytes());
33 | return new DemoDefinition(packageName, md.digest());
34 | }
35 | catch (NoSuchAlgorithmException e)
36 | {
37 | e.printStackTrace();
38 | }
39 | return null;
40 |
41 |
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/PackageInfoTarget.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import android.content.pm.PackageInfo;
14 | import android.util.Log;
15 |
16 | class PackageInfoTarget extends AbstractTarget
17 | {
18 | private static String TAG = "PackageInfoTarget";
19 |
20 | protected PackageInfoTarget(PackageInfo target)
21 | {
22 | super(target);
23 | }
24 |
25 | @Override
26 | protected byte[] getBytesToHash(long position, int length)
27 | {
28 | Log.d(TAG, "Begin calculating hash for " + _target.packageName);
29 |
30 | byte[] target = _target.packageName.substring((int) position).getBytes();
31 |
32 | if (target.length > length)
33 | target = Util.truncateArray(target, length);
34 |
35 | return target;
36 | }
37 |
38 | public String getName()
39 | {
40 | return _target.packageName;
41 | }
42 |
43 | public long getSize()
44 | {
45 | return _target.packageName.length();
46 | }
47 |
48 | public byte getTargetType()
49 | {
50 | return DefinitionType.ANDROID_PACKAGE;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/InstalledTargetSource.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import java.util.Iterator;
14 | import java.util.List;
15 |
16 | import android.content.Context;
17 | import android.content.pm.PackageInfo;
18 |
19 | class InstalledTargetSource extends ContextTargetSource
20 | {
21 | private List _packages;
22 |
23 | protected InstalledTargetSource(Context ctx)
24 | {
25 | super(ctx);
26 | }
27 |
28 | protected List getPackages()
29 | {
30 | // TODO: Don't preload all packages... iterate
31 | if (_packages == null)
32 | _packages = Util.getInstalledPackages(getContext());
33 | return _packages;
34 | }
35 |
36 | @Override
37 | protected Iterator getInternalIterator()
38 | {
39 | return getPackages().iterator();
40 | }
41 |
42 | @Override
43 | protected IScanTarget getTargetForT(PackageInfo rawTarget)
44 | {
45 | return new PackageInfoTarget(rawTarget);
46 | }
47 |
48 | public String getName()
49 | {
50 | return "Installed applications";
51 | }
52 |
53 | public int getTargetCount()
54 | {
55 | return getPackages().size();
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/DemoDefinition.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | class DemoDefinition implements IScanDefinition
14 | {
15 | private int _id;
16 | private byte[] _hashValue;
17 | private int _matchSize;
18 | private long _matchPos;
19 | private double _weight = 1;
20 |
21 | public DemoDefinition(String packageName, byte[] hash)
22 | {
23 | _id = packageName.hashCode();
24 | _matchSize = packageName.getBytes().length;
25 | _hashValue = hash;
26 | }
27 |
28 | @Override
29 | public int getDefinitionId()
30 | {
31 | return _id;
32 | }
33 |
34 | @Override
35 | public byte[] getHashValue()
36 | {
37 | return _hashValue;
38 | }
39 |
40 | @Override
41 | public int getMatchSize()
42 | {
43 | return _matchSize;
44 | }
45 |
46 | public void setMatchSize(int size)
47 | {
48 | _matchSize = size;
49 | }
50 |
51 | @Override
52 | public long getMatchPosition()
53 | {
54 | return _matchPos;
55 | }
56 |
57 | public void setMatchPos(long pos)
58 | {
59 | _matchPos = pos;
60 | }
61 |
62 | @Override
63 | public double getWeight()
64 | {
65 | return _weight;
66 | }
67 |
68 | public void setWeight(double weight)
69 | {
70 | _weight = weight;
71 | }
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/ContextTargetSource.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import java.lang.ref.WeakReference;
14 | import java.util.Iterator;
15 |
16 | import android.content.Context;
17 |
18 | abstract class ContextTargetSource implements ITargetSource
19 | {
20 | final WeakReference _weakContext;
21 |
22 | protected ContextTargetSource(Context ctx)
23 | {
24 | _weakContext = new WeakReference(ctx);
25 | }
26 |
27 | public Context getContext()
28 | {
29 | return _weakContext.get();
30 | }
31 |
32 | public Iterator iterator()
33 | {
34 | Iterator iter = getInternalIterator();
35 |
36 | return new ScanTargetIteratorWrapper(iter);
37 | }
38 |
39 | protected abstract Iterator getInternalIterator();
40 |
41 | protected abstract IScanTarget getTargetForT(T rawTarget);
42 |
43 | class ScanTargetIteratorWrapper implements Iterator
44 | {
45 | private final Iterator _iter;
46 |
47 | protected ScanTargetIteratorWrapper(Iterator iter)
48 | {
49 | _iter = iter;
50 | }
51 |
52 | public boolean hasNext()
53 | {
54 | return _iter.hasNext();
55 | }
56 |
57 | public IScanTarget next()
58 | {
59 | return getTargetForT(_iter.next());
60 | }
61 |
62 | public void remove()
63 | {
64 | _iter.remove();
65 | }
66 |
67 | }
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/repo/android-av-test/src/com/steelthorn/android/av/DebugScanListener.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import android.util.Log;
14 |
15 | import com.steelthorn.android.av.IScanListener;
16 | import com.steelthorn.android.av.IScanTarget;
17 | import com.steelthorn.android.av.ITargetSource;
18 | import com.steelthorn.android.av.IThreatInfo;
19 | import com.steelthorn.android.av.ScanResult;
20 |
21 | public class DebugScanListener implements IScanListener
22 | {
23 | private static final String TAG = "DebugScanListener";
24 |
25 | protected ScanResult _lastResult;
26 |
27 | public void onTargetSourceSwitch(ITargetSource currentSource)
28 | {
29 |
30 | Log.d(TAG, "Target switched to " + currentSource);
31 |
32 | }
33 |
34 | public void onTargetScanBegin(IScanTarget target)
35 | {
36 | Log.d(TAG, "Scanning " + target);
37 |
38 | }
39 |
40 | public void onTargetScanComplete(IScanTarget target, IThreatInfo info)
41 | {
42 | }
43 |
44 | public void onScanCompleted(ScanResult result)
45 | {
46 | Log.d(TAG, "Scan completed.");
47 | _lastResult = result;
48 |
49 | }
50 |
51 | public void onScanProgress(double progress)
52 | {
53 | Log.d(TAG, "Scan progress: " + (progress * 100));
54 | }
55 |
56 | public void onScanException(Exception error)
57 | {
58 | Log.d(TAG, "An error occurred while scanning: " + error.getMessage());
59 | }
60 |
61 | public void onScanCanceled(ScanResult result)
62 | {
63 | Log.d(TAG, "Scan canceled.");
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/AbstractTarget.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import java.security.MessageDigest;
14 | import java.security.NoSuchAlgorithmException;
15 | import java.util.Arrays;
16 |
17 | abstract class AbstractTarget implements IScanTarget
18 | {
19 | protected final T _target;
20 | private byte[] _hash;
21 |
22 | private long _lastPosition;
23 |
24 | protected AbstractTarget(T target)
25 | {
26 | _target = target;
27 | }
28 |
29 | protected abstract byte[] getBytesToHash(long position, int length);
30 |
31 | public T getIdentifier()
32 | {
33 | return _target;
34 | }
35 |
36 | @Override
37 | public String toString()
38 | {
39 | return getName();
40 | }
41 |
42 | protected byte[] getHashValue(long position, int length)
43 | {
44 | if (_hash == null || _lastPosition != position)
45 | {
46 | //TOOD: Abstract later
47 | try
48 | {
49 | MessageDigest md = MessageDigest.getInstance("SHA-1");
50 | md.update(getBytesToHash(position, length));
51 | _hash = md.digest();
52 | }
53 | catch (NoSuchAlgorithmException e)
54 | {
55 | e.printStackTrace();
56 | }
57 |
58 | _lastPosition = position;
59 |
60 | }
61 | return _hash;
62 | }
63 |
64 | public boolean checkThreat(IScanDefinition criteria)
65 | {
66 | if (Arrays.equals(criteria.getHashValue(), getHashValue(criteria.getMatchPosition(), criteria.getMatchSize())))
67 | return true;
68 | else
69 | return false;
70 | }
71 |
72 | public int compareTo(IScanTarget another)
73 | {
74 | return Double.compare(getSize(), another.getSize());
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/IScanDefinition.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | /**
14 | * Represents a single definition or signature of a known malicious package,
15 | * program, file, or other data structure. Each IScanDefinition is inert; that
16 | * is, the definitions themselves do not do the matching. They must be provided
17 | * to an IScanEngine which determines the scanning and matching
18 | * algorithms.
19 | *
20 | * @author Jeff Mixon
21 | * @see IScanDefinitionGroup
22 | */
23 | public interface IScanDefinition
24 | {
25 | /**
26 | * Uniquely identifies a definition
27 | *
28 | * @return the unique identifier for the definition
29 | */
30 | int getDefinitionId();
31 |
32 | /**
33 | * Gets the hashed bytes of the virus signature this definition represents.
34 | *
35 | * @return the hashed signature
36 | */
37 | byte[] getHashValue();
38 |
39 | /**
40 | * Gets the size of the non-hashed bytes that create a match. This can be
41 | * used for optimizing the definitions you need to search on without having
42 | * to do other calculations
43 | *
44 | * @return the size of the non-hashed matching portion
45 | */
46 | int getMatchSize();
47 |
48 | /**
49 | * Gets the contextual position of where this definition's signature is
50 | * found.
51 | *
52 | * @return the position in the source that this definition would be found
53 | */
54 | long getMatchPosition();
55 |
56 | /**
57 | * Get the match weight of this definition. This can be either positive or
58 | * negative to have the necessary effect on the overall scoring of a target
59 | * against several definitions. This only applies to
60 | * IScanDefinitionGroups which contain multiple
61 | * IScanDefinitions.
62 | *
63 | * @return the match weight
64 | * @see IScanDefinitionGroup
65 | */
66 | double getWeight();
67 | }
68 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/DefaultScanEngine.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import android.util.Log;
14 |
15 | public class DefaultScanEngine extends ScanEngine
16 | {
17 | private static final String TAG = "DefaultScanEngine";
18 |
19 | public void scan(ScanContext ctx, IScanDefinitionProvider provider)
20 | {
21 | if (ctx == null)
22 | throw new IllegalArgumentException("A scan context must be supplied");
23 |
24 | if (ctx.getListener() == null)
25 | throw new IllegalArgumentException("An IScanListener must be set on the context.");
26 |
27 | ScanResult result = new ScanResult();
28 |
29 | //TODO: Possibly move this to the ScanContext
30 | double totalCount = 0;
31 | for (ITargetSource source : ctx.getSources())
32 | {
33 | totalCount += source.getTargetCount();
34 | }
35 |
36 | Log.d(TAG, "Total of " + totalCount + " targets to scan.");
37 |
38 | double progressCount = 0;
39 | for (ITargetSource source : ctx.getSources())
40 | {
41 |
42 | ctx.getListener().onTargetSourceSwitch(source);
43 |
44 | for (IScanTarget target : source)
45 | {
46 | if (_cancel)
47 | {
48 | Log.i(TAG, "Scan canceled by user request.");
49 |
50 | ctx.getListener().onScanCanceled(result);
51 | return;
52 | }
53 |
54 | ctx.getListener().onTargetScanBegin(target);
55 |
56 | IThreatInfo ti = scanTarget(target, provider);
57 |
58 | progressCount++;
59 |
60 | ctx.getListener().onScanProgress(progressCount / totalCount);
61 |
62 | if (ti != null)
63 | result.addMatchFound(ti);
64 |
65 | ctx.getListener().onTargetScanComplete(target, ti);
66 | }
67 | }
68 |
69 | ctx.getListener().onScanCompleted(result);
70 |
71 | return;
72 | }
73 |
74 | public IThreatInfo scanTarget(IScanTarget target, IScanDefinitionProvider provider)
75 | {
76 | // O(n^2) scanning algorithm for now
77 | // TODO: BST engine based on size
78 | //List groups = Util.getDevDefinitions();
79 |
80 | for (IScanDefinitionGroup group : provider.getDefinitions())
81 | {
82 | if (!(target.getTargetType() == group.getDefinitionType()))
83 | continue;
84 |
85 | double confidence = 0;
86 | for (IScanDefinition def : group.getDefinitions())
87 | {
88 | if (target.checkThreat(def))
89 | {
90 | confidence += def.getWeight();
91 |
92 | Log.d(TAG, "Target " + target.getName() + " was a match for definition id " + def.getDefinitionId());
93 | }
94 |
95 | // Break if confidence is already > 1?
96 | }
97 |
98 | if (confidence >= 1)
99 | return new ThreatInfo(target, group, confidence);
100 | }
101 |
102 | return null;
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/repo/android-av-test/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
29 |
30 |
31 |
40 |
41 |
42 |
43 |
47 |
48 |
49 |
51 |
63 |
64 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/DemoScanDefinitionProvider.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.steelthorn.android.av;
5 |
6 | import java.security.MessageDigest;
7 | import java.security.NoSuchAlgorithmException;
8 | import java.util.ArrayList;
9 | import java.util.List;
10 |
11 | /**
12 | * @author Jeff Mixon
13 | *
14 | */
15 | public class DemoScanDefinitionProvider implements IScanDefinitionProvider
16 | {
17 | private static String[] droidDreamPackages = new String[] { "advanced.piano", "com.Funny.Face", "com.advanced.SoundManager",
18 | "com.advanced.scientific.calculator", "com.app.aun", "com.apps.tosd", "com.beauty.leg", "com.bubble", "com.dice.power", "com.dice.power.advanced",
19 | "com.dodge.game.fallingball", "com.droiddream.advancedtaskkiller1", "com.droiddream.android.afdvancedfm", "com.droiddream.barcodescanner",
20 | "com.droiddream.basketball", "com.droiddream.blueftp", "com.droiddream.bowlingtime", "com.droiddream.comparator", "com.droiddream.compasslevel",
21 | "com.droiddream.daltonismo", "com.droiddream.fallingball", "com.droiddream.game.omok", "com.droiddream.glowhockey", "com.droiddream.howtotie",
22 | "com.droiddream.lovePositions", "com.droiddream.musicbox", "com.droiddream.passwordsafe", "com.droiddream.pewpew", "com.droiddream.sexringtones",
23 | "com.droiddream.stopwatch", "com.droiddream.system.app.remover", "com.editor.photoenhance", "com.fall.down", "com.fall.soft.down",
24 | "com.free.chess", "com.free.game.finger", "com.hg.panzerpanic1", "com.hz.game.mrrunner1", "com.magic.spiral", "com.power.SuperSolo",
25 | "com.power.basketball", "com.power.demo.note", "com.power.magic.StrobeLight", "com.quick.Delete", "com.sex.japaneese.girls", "com.sexsound.hilton",
26 | "com.sexy.hotgirls", "com.sexy.legs", "com.spider.man", "com.super.mp3ringtone", "hot.goddchen.sexyvideos", "org.droiddream.yellow4",
27 | "power.nick.ypaint", "power.power.rate", "powerstudio.spiderman", "proscio.app.nick.ypaint", "super.sancron.ringtones.sexysb", "org.super.yellow4",
28 | "com.droid.publick.hotgirls", "com.super.free.sexringtones", "hot.goddchen.power.sexyvideos" };
29 |
30 | private List _groups;
31 |
32 | /* (non-Javadoc)
33 | * @see com.steelthorn.android.av.IScanDefinitionProvider#getDefinitions()
34 | */
35 | @Override
36 | public List getDefinitions()
37 | {
38 |
39 | if (_groups != null)
40 | return _groups;
41 |
42 | _groups = new ArrayList();
43 |
44 | for (int i = 0; i < droidDreamPackages.length; i++)
45 | {
46 | List defList = new ArrayList();
47 | try
48 | {
49 | MessageDigest md = MessageDigest.getInstance("SHA-1");
50 | md.update(droidDreamPackages[i].getBytes());
51 | DemoDefinition def = new DemoDefinition(droidDreamPackages[i], md.digest());
52 | defList.add(def);
53 |
54 | DemoDefinitionGroup group = new DemoDefinitionGroup(i, defList);
55 |
56 | _groups.add(group);
57 |
58 | }
59 | catch (NoSuchAlgorithmException e)
60 | {
61 | e.printStackTrace();
62 | }
63 | }
64 |
65 | return _groups;
66 | }
67 |
68 | private static class DemoDefinitionGroup implements IScanDefinitionGroup
69 | {
70 | private final int _id;
71 | private final List _defs;
72 |
73 | public DemoDefinitionGroup(int id, List definitions)
74 | {
75 | _id = id;
76 | _defs = definitions;
77 | }
78 |
79 | @Override
80 | public int getDefinitionGroupId()
81 | {
82 | return _id;
83 | }
84 |
85 | @Override
86 | public byte getDefinitionType()
87 | {
88 | return DefinitionType.ANDROID_PACKAGE;
89 | }
90 |
91 | @Override
92 | public List getDefinitions()
93 | {
94 | return _defs;
95 | }
96 |
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/Util.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import java.io.File;
14 | import java.util.ArrayList;
15 | import java.util.List;
16 |
17 | import android.content.Context;
18 | import android.content.pm.ApplicationInfo;
19 | import android.content.pm.PackageInfo;
20 | import android.os.Environment;
21 |
22 | class Util
23 | {
24 | public static List getInstalledPackages(Context ctx)
25 | {
26 | List packages = ctx.getPackageManager().getInstalledPackages(0);
27 |
28 | List nonSystemPackages = new ArrayList();
29 |
30 | for (PackageInfo pack : packages)
31 | {
32 | if ((pack.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) == ApplicationInfo.FLAG_SYSTEM)
33 | continue;
34 |
35 | nonSystemPackages.add(pack);
36 | }
37 |
38 | return nonSystemPackages;
39 | }
40 |
41 | public static List getAllFiles(Context ctx)
42 | {
43 | String base = Environment.getExternalStorageDirectory().toString();
44 | File baseFile = new File(base + "/external_sd");
45 |
46 | File[] files = baseFile.listFiles();
47 |
48 | List result = new ArrayList();
49 |
50 | for (int i = 0; i < files.length; i++)
51 | {
52 | if (!files[i].isDirectory())
53 | result.add(files[i]);
54 | }
55 |
56 | return result;
57 | }
58 |
59 | public static IScanDefinitionProvider getDevDefinitionProvider()
60 | {
61 | return new IScanDefinitionProvider()
62 | {
63 |
64 | @Override
65 | public List getDefinitions()
66 | {
67 | // TODO Auto-generated method stub
68 | return Util.getDevDefinitions();
69 | }
70 | };
71 | }
72 |
73 | public static List getDevDefinitions()
74 | {
75 | final List def = new ArrayList();
76 |
77 | def.add(new IScanDefinition()
78 | {
79 | public int getDefinitionId()
80 | {
81 | return 1;
82 | }
83 |
84 | public int getMatchSize()
85 | {
86 | return 23;
87 | }
88 |
89 | public byte[] getHashValue()
90 | {
91 |
92 | return Base64.decode("3YnpxrvKu5hZxi0m/FkpE+pUcwQ=", Base64.DEFAULT);
93 |
94 | }
95 |
96 | public double getWeight()
97 | {
98 | return 1;
99 | }
100 |
101 | public long getMatchPosition()
102 | {
103 | // TODO Auto-generated method stub
104 | return 0;
105 | }
106 |
107 | });
108 |
109 | IScanDefinitionGroup group = new IScanDefinitionGroup()
110 | {
111 |
112 | public List getDefinitions()
113 | {
114 | return def;
115 | }
116 |
117 | public byte getDefinitionType()
118 | {
119 | // TODO Auto-generated method stub
120 | return DefinitionType.ANDROID_PACKAGE;
121 | }
122 |
123 | public int getDefinitionGroupId()
124 | {
125 | // TODO Auto-generated method stub
126 | return 1;
127 | }
128 | };
129 |
130 | List allDefs = new ArrayList();
131 | allDefs.add(group);
132 |
133 | return allDefs;
134 | }
135 |
136 | public static byte[] truncateArray(byte[] original, int newLength)
137 | {
138 | byte[] smaller = new byte[newLength];
139 |
140 | for (int i = 0; i < newLength; i++)
141 | smaller[i] = original[i];
142 |
143 | return smaller;
144 | }
145 | }
146 |
147 | class DefinitionType
148 | {
149 | public static final byte ANDROID_PACKAGE = 1;
150 | }
151 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/Base64InputStream.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.steelthorn.android.av;
18 |
19 | import java.io.FilterInputStream;
20 | import java.io.IOException;
21 | import java.io.InputStream;
22 |
23 | /**
24 | * An InputStream that does Base64 decoding on the data read through
25 | * it.
26 | */
27 | class Base64InputStream extends FilterInputStream {
28 | private final Base64.Coder coder;
29 |
30 | private static byte[] EMPTY = new byte[0];
31 |
32 | private static final int BUFFER_SIZE = 2048;
33 | private boolean eof;
34 | private byte[] inputBuffer;
35 | private int outputStart;
36 | private int outputEnd;
37 |
38 | /**
39 | * An InputStream that performs Base64 decoding on the data read
40 | * from the wrapped stream.
41 | *
42 | * @param in the InputStream to read the source data from
43 | * @param flags bit flags for controlling the decoder; see the
44 | * constants in {@link Base64}
45 | */
46 | public Base64InputStream(InputStream in, int flags) {
47 | this(in, flags, false);
48 | }
49 |
50 | /**
51 | * Performs Base64 encoding or decoding on the data read from the
52 | * wrapped InputStream.
53 | *
54 | * @param in the InputStream to read the source data from
55 | * @param flags bit flags for controlling the decoder; see the
56 | * constants in {@link Base64}
57 | * @param encode true to encode, false to decode
58 | *
59 | * @hide
60 | */
61 | public Base64InputStream(InputStream in, int flags, boolean encode) {
62 | super(in);
63 | eof = false;
64 | inputBuffer = new byte[BUFFER_SIZE];
65 | if (encode) {
66 | coder = new Base64.Encoder(flags, null);
67 | } else {
68 | coder = new Base64.Decoder(flags, null);
69 | }
70 | coder.output = new byte[coder.maxOutputSize(BUFFER_SIZE)];
71 | outputStart = 0;
72 | outputEnd = 0;
73 | }
74 |
75 | public boolean markSupported() {
76 | return false;
77 | }
78 |
79 | public void mark(int readlimit) {
80 | throw new UnsupportedOperationException();
81 | }
82 |
83 | public void reset() {
84 | throw new UnsupportedOperationException();
85 | }
86 |
87 | public void close() throws IOException {
88 | in.close();
89 | inputBuffer = null;
90 | }
91 |
92 | public int available() {
93 | return outputEnd - outputStart;
94 | }
95 |
96 | public long skip(long n) throws IOException {
97 | if (outputStart >= outputEnd) {
98 | refill();
99 | }
100 | if (outputStart >= outputEnd) {
101 | return 0;
102 | }
103 | long bytes = Math.min(n, outputEnd-outputStart);
104 | outputStart += bytes;
105 | return bytes;
106 | }
107 |
108 | public int read() throws IOException {
109 | if (outputStart >= outputEnd) {
110 | refill();
111 | }
112 | if (outputStart >= outputEnd) {
113 | return -1;
114 | } else {
115 | return coder.output[outputStart++] & 0xff;
116 | }
117 | }
118 |
119 | public int read(byte[] b, int off, int len) throws IOException {
120 | if (outputStart >= outputEnd) {
121 | refill();
122 | }
123 | if (outputStart >= outputEnd) {
124 | return -1;
125 | }
126 | int bytes = Math.min(len, outputEnd-outputStart);
127 | System.arraycopy(coder.output, outputStart, b, off, bytes);
128 | outputStart += bytes;
129 | return bytes;
130 | }
131 |
132 | /**
133 | * Read data from the input stream into inputBuffer, then
134 | * decode/encode it into the empty coder.output, and reset the
135 | * outputStart and outputEnd pointers.
136 | */
137 | private void refill() throws IOException {
138 | if (eof) return;
139 | int bytesRead = in.read(inputBuffer);
140 | boolean success;
141 | if (bytesRead == -1) {
142 | eof = true;
143 | success = coder.process(EMPTY, 0, 0, true);
144 | } else {
145 | success = coder.process(inputBuffer, 0, bytesRead, false);
146 | }
147 | if (!success) {
148 | throw new IOException("bad base-64");
149 | }
150 | outputEnd = coder.op;
151 | outputStart = 0;
152 | }
153 | }
154 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/Base64OutputStream.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.steelthorn.android.av;
18 |
19 | import java.io.FilterOutputStream;
20 | import java.io.IOException;
21 | import java.io.OutputStream;
22 |
23 | /**
24 | * An OutputStream that does Base64 encoding on the data written to
25 | * it, writing the resulting data to another OutputStream.
26 | */
27 | class Base64OutputStream extends FilterOutputStream {
28 | private final Base64.Coder coder;
29 | private final int flags;
30 |
31 | private byte[] buffer = null;
32 | private int bpos = 0;
33 |
34 | private static byte[] EMPTY = new byte[0];
35 |
36 | /**
37 | * Performs Base64 encoding on the data written to the stream,
38 | * writing the encoded data to another OutputStream.
39 | *
40 | * @param out the OutputStream to write the encoded data to
41 | * @param flags bit flags for controlling the encoder; see the
42 | * constants in {@link Base64}
43 | */
44 | public Base64OutputStream(OutputStream out, int flags) {
45 | this(out, flags, true);
46 | }
47 |
48 | /**
49 | * Performs Base64 encoding or decoding on the data written to the
50 | * stream, writing the encoded/decoded data to another
51 | * OutputStream.
52 | *
53 | * @param out the OutputStream to write the encoded data to
54 | * @param flags bit flags for controlling the encoder; see the
55 | * constants in {@link Base64}
56 | * @param encode true to encode, false to decode
57 | *
58 | * @hide
59 | */
60 | public Base64OutputStream(OutputStream out, int flags, boolean encode) {
61 | super(out);
62 | this.flags = flags;
63 | if (encode) {
64 | coder = new Base64.Encoder(flags, null);
65 | } else {
66 | coder = new Base64.Decoder(flags, null);
67 | }
68 | }
69 |
70 | public void write(int b) throws IOException {
71 | // To avoid invoking the encoder/decoder routines for single
72 | // bytes, we buffer up calls to write(int) in an internal
73 | // byte array to transform them into writes of decently-sized
74 | // arrays.
75 |
76 | if (buffer == null) {
77 | buffer = new byte[1024];
78 | }
79 | if (bpos >= buffer.length) {
80 | // internal buffer full; write it out.
81 | internalWrite(buffer, 0, bpos, false);
82 | bpos = 0;
83 | }
84 | buffer[bpos++] = (byte) b;
85 | }
86 |
87 | /**
88 | * Flush any buffered data from calls to write(int). Needed
89 | * before doing a write(byte[], int, int) or a close().
90 | */
91 | private void flushBuffer() throws IOException {
92 | if (bpos > 0) {
93 | internalWrite(buffer, 0, bpos, false);
94 | bpos = 0;
95 | }
96 | }
97 |
98 | public void write(byte[] b, int off, int len) throws IOException {
99 | if (len <= 0) return;
100 | flushBuffer();
101 | internalWrite(b, off, len, false);
102 | }
103 |
104 | public void close() throws IOException {
105 | IOException thrown = null;
106 | try {
107 | flushBuffer();
108 | internalWrite(EMPTY, 0, 0, true);
109 | } catch (IOException e) {
110 | thrown = e;
111 | }
112 |
113 | try {
114 | if ((flags & Base64.NO_CLOSE) == 0) {
115 | out.close();
116 | } else {
117 | out.flush();
118 | }
119 | } catch (IOException e) {
120 | if (thrown != null) {
121 | thrown = e;
122 | }
123 | }
124 |
125 | if (thrown != null) {
126 | throw thrown;
127 | }
128 | }
129 |
130 | /**
131 | * Write the given bytes to the encoder/decoder.
132 | *
133 | * @param finish true if this is the last batch of input, to cause
134 | * encoder/decoder state to be finalized.
135 | */
136 | private void internalWrite(byte[] b, int off, int len, boolean finish) throws IOException {
137 | coder.output = embiggen(coder.output, coder.maxOutputSize(len));
138 | if (!coder.process(b, off, len, finish)) {
139 | throw new IOException("bad base-64");
140 | }
141 | out.write(coder.output, 0, coder.op);
142 | }
143 |
144 | /**
145 | * If b.length is at least len, return b. Otherwise return a new
146 | * byte array of length len.
147 | */
148 | private byte[] embiggen(byte[] b, int len) {
149 | if (b == null || b.length < len) {
150 | return new byte[len];
151 | } else {
152 | return b;
153 | }
154 | }
155 | }
156 |
--------------------------------------------------------------------------------
/repo/android-av/src/com/steelthorn/android/av/BinarySearchTree.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | // BinarySearchTree class
14 | //
15 | // CONSTRUCTION: with no initializer
16 | //
17 | // ******************PUBLIC OPERATIONS*********************
18 | // void insert( x ) --> Insert x
19 | // void remove( x ) --> Remove x
20 | // Comparable find( x ) --> Return item that matches x
21 | // Comparable findMin( ) --> Return smallest item
22 | // Comparable findMax( ) --> Return largest item
23 | // boolean isEmpty( ) --> Return true if empty; else false
24 | // void makeEmpty( ) --> Remove all items
25 | // void printTree( ) --> Print tree in sorted order
26 |
27 | /**
28 | * Implements an unbalanced binary search tree. Note that all "matching" is
29 | * based on the compareTo method.
30 | *
31 | * Extended to use generics and support duplicate node values.
32 | *
33 | * @author Mark Allen Weiss
34 | * @author Jeff Mixon
35 | */
36 | public class BinarySearchTree>
37 | {
38 | /**
39 | * Construct the tree.
40 | */
41 | public BinarySearchTree()
42 | {
43 | root = null;
44 | }
45 |
46 | /**
47 | * Insert into the tree; duplicates are ignored.
48 | *
49 | * @param x
50 | * the item to insert.
51 | */
52 | public void insert(T x)
53 | {
54 | root = insert(x, root);
55 | }
56 |
57 | /**
58 | * Remove from the tree. Nothing is done if x is not found.
59 | *
60 | * @param x
61 | * the item to remove.
62 | */
63 | public void remove(T x)
64 | {
65 | root = remove(x, root);
66 | }
67 |
68 | /**
69 | * Find the smallest item in the tree.
70 | *
71 | * @return smallest item or null if empty.
72 | */
73 | public T findMin()
74 | {
75 | return elementAt(findMin(root));
76 | }
77 |
78 | /**
79 | * Find the largest item in the tree.
80 | *
81 | * @return the largest item of null if empty.
82 | */
83 | public T findMax()
84 | {
85 | return elementAt(findMax(root));
86 | }
87 |
88 | /**
89 | * Find an item in the tree.
90 | *
91 | * @param x
92 | * the item to search for.
93 | * @return the matching item or null if not found.
94 | */
95 | public T find(T x)
96 | {
97 | return elementAt(find(x, root));
98 | }
99 |
100 | /**
101 | * Make the tree logically empty.
102 | */
103 | public void makeEmpty()
104 | {
105 | root = null;
106 | }
107 |
108 | /**
109 | * Test if the tree is logically empty.
110 | *
111 | * @return true if empty, false otherwise.
112 | */
113 | public boolean isEmpty()
114 | {
115 | return root == null;
116 | }
117 |
118 | /**
119 | * Print the tree contents in sorted order.
120 | */
121 | public void printTree()
122 | {
123 | if (isEmpty())
124 | System.out.println("Empty tree");
125 | else
126 | printTree(root);
127 | }
128 |
129 | /**
130 | * Internal method to get element field.
131 | *
132 | * @param t
133 | * the node.
134 | * @return the element field or null if t is null.
135 | */
136 | private T elementAt(BinaryNode t)
137 | {
138 | return t == null ? null : t.element;
139 | }
140 |
141 | /**
142 | * Internal method to insert into a subtree.
143 | *
144 | * @param x
145 | * the item to insert.
146 | * @param t
147 | * the node that roots the tree.
148 | * @return the new root.
149 | */
150 | private BinaryNode insert(T x, BinaryNode t)
151 | {
152 | /* 1*/if (t == null)
153 | /* 2*/t = new BinaryNode(x);
154 | /* 3*/else if (x.compareTo(t.element) < 0)
155 | /* 4*/t.left = insert(x, t.left);
156 | /* 5*/else if (x.compareTo(t.element) >= 0)
157 | /* 6*/t.right = insert(x, t.right);
158 | return t;
159 | }
160 |
161 | /**
162 | * Internal method to remove from a subtree.
163 | *
164 | * @param x
165 | * the item to remove.
166 | * @param t
167 | * the node that roots the tree.
168 | * @return the new root.
169 | */
170 | private BinaryNode remove(Comparable x, BinaryNode t)
171 | {
172 | if (t == null)
173 | return t; // Item not found; do nothing
174 | if (x.compareTo(t.element) < 0)
175 | t.left = remove(x, t.left);
176 | else if (x.compareTo(t.element) >= 0)
177 | t.right = remove(x, t.right);
178 | else if (t.left != null && t.right != null) // Two children
179 | {
180 | t.element = findMin(t.right).element;
181 | t.right = remove(t.element, t.right);
182 | }
183 | else
184 | t = (t.left != null) ? t.left : t.right;
185 | return t;
186 | }
187 |
188 | /**
189 | * Internal method to find the smallest item in a subtree.
190 | *
191 | * @param t
192 | * the node that roots the tree.
193 | * @return node containing the smallest item.
194 | */
195 | private BinaryNode findMin(BinaryNode t)
196 | {
197 | if (t == null)
198 | return null;
199 | else if (t.left == null)
200 | return t;
201 | return findMin(t.left);
202 | }
203 |
204 | /**
205 | * Internal method to find the largest item in a subtree.
206 | *
207 | * @param t
208 | * the node that roots the tree.
209 | * @return node containing the largest item.
210 | */
211 | private BinaryNode findMax(BinaryNode t)
212 | {
213 | if (t != null)
214 | while (t.right != null)
215 | t = t.right;
216 |
217 | return t;
218 | }
219 |
220 | /**
221 | * Internal method to find an item in a subtree.
222 | *
223 | * @param x
224 | * is item to search for.
225 | * @param t
226 | * the node that roots the tree.
227 | * @return node containing the matched item.
228 | */
229 | private BinaryNode find(T x, BinaryNode t)
230 | {
231 | if (t == null)
232 | return null;
233 | if (x.compareTo(t.element) < 0)
234 | return find(x, t.left);
235 | else if (x.compareTo(t.element) > 0)
236 | return find(x, t.right);
237 | else
238 | return t; // Match
239 | }
240 |
241 | /**
242 | * Internal method to print a subtree in sorted order.
243 | *
244 | * @param t
245 | * the node that roots the tree.
246 | */
247 | private void printTree(BinaryNode t)
248 | {
249 | if (t != null)
250 | {
251 | printTree(t.left);
252 | System.out.println(t.element);
253 | printTree(t.right);
254 | }
255 | }
256 |
257 | /** The tree root. */
258 | private BinaryNode root;
259 |
260 | }
261 |
--------------------------------------------------------------------------------
/repo/android-av-test/src/com/steelthorn/android/av/StandardTests.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Jeff Mixon.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v2.0
5 | * (or any later version, at your option) which accompanies this distribution,
6 | * and is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 | *
8 | * Contributors:
9 | * Jeff - initial API and implementation
10 | ******************************************************************************/
11 | package com.steelthorn.android.av;
12 |
13 | import static org.mockito.Matchers.any;
14 | import static org.mockito.Mockito.mock;
15 | import static org.mockito.Mockito.verify;
16 |
17 | import java.util.Arrays;
18 |
19 | import junit.framework.Assert;
20 |
21 | import org.junit.Test;
22 |
23 | public class StandardTests extends ScanTests
24 | {
25 | private static final String TEST_PACKAGE = "com.example.android.softkeyboard";
26 | //private static final String TEST_PACKAGE = "com.rdio.android.ui";
27 | private static final String TEST_PACKAGE_PARTIAL = "com.example.android.soft";
28 | //private static final String TEST_PACKAGE_PARTIAL = "com.rdio.android";
29 | //private static final String TEST_PARTIAL_WEIGHT1 = "com.example";
30 | //private static final String TEST_PARTIAL_WEIGHT1 = "com.rdio";
31 | //private static final String TEST_PARTIAL_WEIGHT2 = "android.softkeyboard";
32 | //private static final String TEST_PARTIAL_WEIGHT2 = "android.ui";
33 |
34 | @Override
35 | protected void setUp() throws Exception
36 | {
37 | super.setUp();
38 | Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
39 | }
40 |
41 | @Test
42 | public void testMatch() throws Exception
43 | {
44 | IScanTarget target = new IScanTarget()
45 | {
46 | public String getName()
47 | {
48 | return "Test";
49 | };
50 |
51 | public byte[] getHashValue()
52 | {
53 | return Base64.decode("3YnpxrvKu5hZxi0m/FkpE+pUcwQ=", Base64.DEFAULT);
54 | }
55 |
56 | public byte getTargetType()
57 | {
58 | return 1;
59 | }
60 |
61 | public boolean checkThreat(IScanDefinition criteria)
62 | {
63 |
64 | return Arrays.equals(getHashValue(), criteria.getHashValue());
65 | }
66 |
67 | @Override
68 | public int compareTo(IScanTarget another)
69 | {
70 | // TODO Auto-generated method stub
71 | return 0;
72 | }
73 |
74 | @Override
75 | public long getSize()
76 | {
77 | return getHashValue().length;
78 | }
79 | };
80 |
81 | IThreatInfo ti = ScanEngine.getDefaultScanEngine().scanTarget(target, new DevDefinitionProvider());
82 |
83 | Assert.assertNotNull(ti);
84 |
85 | Assert.assertTrue(ti.getConfidence() >= 1);
86 | }
87 |
88 | @Test
89 | public void testBasicScan() throws Exception
90 | {
91 | final DebugScanListener listener = new DebugScanListener();
92 |
93 | Thread t = new Thread()
94 | {
95 | public void run()
96 | {
97 | new ScanManager().performBasicScan(getContext(), listener);
98 | }
99 | };
100 |
101 | t.start();
102 | t.join();
103 |
104 | Assert.assertFalse(listener._lastResult.getMatchesFound());
105 | }
106 |
107 | @Test
108 | public void testPositivePackage() throws Exception
109 | {
110 | ITargetSource source = new InstalledTargetSource(getContext());
111 |
112 | DemoDefinition criteria = createDefGroup(TEST_PACKAGE);
113 |
114 | boolean matchFound = false;
115 | for (IScanTarget t : source)
116 | {
117 | matchFound = t.checkThreat(criteria);
118 |
119 | if (matchFound)
120 | break;
121 | }
122 |
123 | Assert.assertTrue(matchFound);
124 | }
125 |
126 | @Test
127 | public void testIncorrectPosition() throws Exception
128 | {
129 | ITargetSource source = new InstalledTargetSource(getContext());
130 |
131 | DemoDefinition criteria = createDefGroup(TEST_PACKAGE);
132 | criteria.setMatchPos(1);
133 |
134 | boolean matchFound = false;
135 | for (IScanTarget t : source)
136 | {
137 | matchFound = t.checkThreat(criteria);
138 |
139 | if (matchFound)
140 | break;
141 | }
142 |
143 | Assert.assertFalse(matchFound);
144 | }
145 |
146 | @Test
147 | public void testIncorrectLengthShallow() throws Exception
148 | {
149 | ITargetSource source = new InstalledTargetSource(getContext());
150 |
151 | DemoDefinition criteria = createDefGroup(TEST_PACKAGE);
152 | //criteria.setMatchPos(criteria.getMatchPosition()-1);
153 | criteria.setMatchSize(criteria.getMatchSize() - 1);
154 |
155 | boolean matchFound = false;
156 | for (IScanTarget t : source)
157 | {
158 | matchFound = t.checkThreat(criteria);
159 |
160 | if (matchFound)
161 | break;
162 | }
163 |
164 | Assert.assertFalse(matchFound);
165 | }
166 |
167 | @Test
168 | public void testIncorrectLengthDeepStillMatches() throws Exception
169 | {
170 | ITargetSource source = new InstalledTargetSource(getContext());
171 |
172 | DemoDefinition criteria = createDefGroup(TEST_PACKAGE);
173 | criteria.setMatchSize(criteria.getMatchSize() + 1);
174 |
175 | boolean matchFound = false;
176 | for (IScanTarget t : source)
177 | {
178 | matchFound = t.checkThreat(criteria);
179 |
180 | if (matchFound)
181 | break;
182 | }
183 |
184 | Assert.assertTrue(matchFound);
185 | }
186 |
187 | @Test
188 | public void testPartialPositive() throws Exception
189 | {
190 | ITargetSource source = new InstalledTargetSource(getContext());
191 |
192 | DemoDefinition criteria = createDefGroup(TEST_PACKAGE_PARTIAL);
193 |
194 | boolean matchFound = false;
195 | for (IScanTarget t : source)
196 | {
197 | matchFound = t.checkThreat(criteria);
198 |
199 | if (matchFound)
200 | break;
201 | }
202 |
203 | Assert.assertTrue(matchFound);
204 | }
205 |
206 | @Test
207 | public void testPartialIncorrectLength() throws Exception
208 | {
209 | ITargetSource source = new InstalledTargetSource(getContext());
210 |
211 | DemoDefinition criteria = createDefGroup(TEST_PACKAGE_PARTIAL);
212 | criteria.setMatchSize(criteria.getMatchSize() + 1);
213 |
214 | boolean matchFound = false;
215 | for (IScanTarget t : source)
216 | {
217 | matchFound = t.checkThreat(criteria);
218 |
219 | if (matchFound)
220 | break;
221 | }
222 |
223 | Assert.assertFalse(matchFound);
224 | }
225 |
226 | @Test
227 | public void testPartialIncorrectLengthShallow() throws Exception
228 | {
229 | ITargetSource source = new InstalledTargetSource(getContext());
230 |
231 | DemoDefinition criteria = createDefGroup(TEST_PACKAGE_PARTIAL);
232 | criteria.setMatchSize(criteria.getMatchSize() - 1);
233 |
234 | boolean matchFound = false;
235 | for (IScanTarget t : source)
236 | {
237 | matchFound = t.checkThreat(criteria);
238 |
239 | if (matchFound)
240 | break;
241 | }
242 |
243 | Assert.assertFalse(matchFound);
244 | }
245 |
246 | @Test
247 | public void testScanCancel() throws Exception
248 | {
249 | final IScanListener listenMock = mock(IScanListener.class);
250 |
251 | final ScanEngine engine = ScanEngine.getDefaultScanEngine();
252 |
253 | new Thread()
254 | {
255 | public void run()
256 | {
257 | engine.scan(new BasicScanContext(getContext(), listenMock), new DevDefinitionProvider());
258 | }
259 | }.start();
260 |
261 | engine.cancel();
262 |
263 | Thread.sleep(250);
264 |
265 | verify(listenMock).onScanCanceled(any(ScanResult.class));
266 | }
267 | }
268 |
--------------------------------------------------------------------------------
/repo/android-av/license.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 |
294 | Copyright (C)
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | , 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
--------------------------------------------------------------------------------
/repo/android-av-test/license.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 |
294 | Copyright (C)
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | , 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
--------------------------------------------------------------------------------
/repo/android-av-ui/license.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 |
294 | Copyright (C)
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | , 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
--------------------------------------------------------------------------------
/repo/android-av/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=1.6
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11 | org.eclipse.jdt.core.compiler.source=1.5
12 | org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
13 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
14 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
15 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
16 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
17 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
18 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
19 | org.eclipse.jdt.core.formatter.alignment_for_assignment=0
20 | org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
21 | org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
22 | org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
23 | org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
24 | org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
25 | org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
26 | org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
27 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
28 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
29 | org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
30 | org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
31 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
32 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
33 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
34 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
35 | org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
36 | org.eclipse.jdt.core.formatter.blank_lines_after_package=1
37 | org.eclipse.jdt.core.formatter.blank_lines_before_field=0
38 | org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
39 | org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
40 | org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
41 | org.eclipse.jdt.core.formatter.blank_lines_before_method=1
42 | org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
43 | org.eclipse.jdt.core.formatter.blank_lines_before_package=0
44 | org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
45 | org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
46 | org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
47 | org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
48 | org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
49 | org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
50 | org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line_shifted
51 | org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
52 | org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
53 | org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
54 | org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
55 | org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line_shifted
56 | org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
57 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
58 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
59 | org.eclipse.jdt.core.formatter.comment.format_block_comments=false
60 | org.eclipse.jdt.core.formatter.comment.format_header=false
61 | org.eclipse.jdt.core.formatter.comment.format_html=true
62 | org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
63 | org.eclipse.jdt.core.formatter.comment.format_line_comments=false
64 | org.eclipse.jdt.core.formatter.comment.format_source_code=true
65 | org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
66 | org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
67 | org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
68 | org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
69 | org.eclipse.jdt.core.formatter.comment.line_length=80
70 | org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
71 | org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
72 | org.eclipse.jdt.core.formatter.compact_else_if=true
73 | org.eclipse.jdt.core.formatter.continuation_indentation=2
74 | org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
75 | org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
76 | org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
77 | org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
78 | org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
79 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
80 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
81 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
82 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
83 | org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
84 | org.eclipse.jdt.core.formatter.indent_empty_lines=false
85 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
86 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
87 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
88 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
89 | org.eclipse.jdt.core.formatter.indentation.size=4
90 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
91 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
92 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
93 | org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
94 | org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
95 | org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
96 | org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
97 | org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
98 | org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
99 | org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
100 | org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
101 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
102 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
103 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
104 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
105 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
106 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
107 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
108 | org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
109 | org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
110 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
111 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
112 | org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
113 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
114 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
115 | org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
116 | org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
117 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
118 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
119 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
120 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
121 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
122 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
123 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
124 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
125 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
126 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
127 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
128 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
129 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
130 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
131 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
132 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
133 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
134 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
135 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
136 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
137 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
138 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
139 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
140 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
141 | org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
142 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
143 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
144 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
145 | org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
146 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
147 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
148 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
149 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
150 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
151 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
152 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
153 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
154 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
155 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
156 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
157 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
158 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
159 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
160 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
161 | org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
162 | org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
163 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
164 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
165 | org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
166 | org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
167 | org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
168 | org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
169 | org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
170 | org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
171 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
172 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
173 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
174 | org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
175 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
176 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
177 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
178 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
179 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
180 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
181 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
182 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
183 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
184 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
185 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
186 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
187 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
188 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
189 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
190 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
191 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
192 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
193 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
194 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
195 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
196 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
197 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
198 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
199 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
200 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
201 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
202 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
203 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
204 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
205 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
206 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
207 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
208 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
209 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
210 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
211 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
212 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
213 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
214 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
215 | org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
216 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
217 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
218 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
219 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
220 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
221 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
222 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
223 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
224 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
225 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
226 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
227 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
228 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
229 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
230 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
231 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
232 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
233 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
234 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
235 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
236 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
237 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
238 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
239 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
240 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
241 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
242 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
243 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
244 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
245 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
246 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
247 | org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
248 | org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
249 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
250 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
251 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
252 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
253 | org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
254 | org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
255 | org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
256 | org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
257 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
258 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
259 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
260 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
261 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
262 | org.eclipse.jdt.core.formatter.join_lines_in_comments=true
263 | org.eclipse.jdt.core.formatter.join_wrapped_lines=true
264 | org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
265 | org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=true
266 | org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
267 | org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
268 | org.eclipse.jdt.core.formatter.lineSplit=160
269 | org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
270 | org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
271 | org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
272 | org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
273 | org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
274 | org.eclipse.jdt.core.formatter.tabulation.char=tab
275 | org.eclipse.jdt.core.formatter.tabulation.size=4
276 | org.eclipse.jdt.core.formatter.use_on_off_tags=false
277 | org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
278 | org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
279 | org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
280 |
--------------------------------------------------------------------------------
/repo/android-av-test/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=1.6
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11 | org.eclipse.jdt.core.compiler.processAnnotations=disabled
12 | org.eclipse.jdt.core.compiler.source=1.6
13 | org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
14 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
15 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
16 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
17 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
18 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
19 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
20 | org.eclipse.jdt.core.formatter.alignment_for_assignment=0
21 | org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
22 | org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
23 | org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
24 | org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
25 | org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
26 | org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
27 | org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
28 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
29 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
30 | org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
31 | org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
32 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
33 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
34 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
35 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
36 | org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
37 | org.eclipse.jdt.core.formatter.blank_lines_after_package=1
38 | org.eclipse.jdt.core.formatter.blank_lines_before_field=0
39 | org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
40 | org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
41 | org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
42 | org.eclipse.jdt.core.formatter.blank_lines_before_method=1
43 | org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
44 | org.eclipse.jdt.core.formatter.blank_lines_before_package=0
45 | org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
46 | org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
47 | org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
48 | org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
49 | org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
50 | org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
51 | org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line_shifted
52 | org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
53 | org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
54 | org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
55 | org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
56 | org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line_shifted
57 | org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
58 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
59 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
60 | org.eclipse.jdt.core.formatter.comment.format_block_comments=false
61 | org.eclipse.jdt.core.formatter.comment.format_header=false
62 | org.eclipse.jdt.core.formatter.comment.format_html=true
63 | org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
64 | org.eclipse.jdt.core.formatter.comment.format_line_comments=false
65 | org.eclipse.jdt.core.formatter.comment.format_source_code=true
66 | org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
67 | org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
68 | org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
69 | org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
70 | org.eclipse.jdt.core.formatter.comment.line_length=80
71 | org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
72 | org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
73 | org.eclipse.jdt.core.formatter.compact_else_if=true
74 | org.eclipse.jdt.core.formatter.continuation_indentation=2
75 | org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
76 | org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
77 | org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
78 | org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
79 | org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
80 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
81 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
82 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
83 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
84 | org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
85 | org.eclipse.jdt.core.formatter.indent_empty_lines=false
86 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
87 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
88 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
89 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
90 | org.eclipse.jdt.core.formatter.indentation.size=4
91 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
92 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
93 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
94 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
95 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
96 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
97 | org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
98 | org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
99 | org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
100 | org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
101 | org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
102 | org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
103 | org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
104 | org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
105 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
106 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
107 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
108 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
109 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
110 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
111 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
112 | org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
113 | org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
114 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
115 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
116 | org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
117 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
118 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
119 | org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
120 | org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
121 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
122 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
123 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
124 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
125 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
126 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
127 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
128 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
129 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
130 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
131 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
132 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
133 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
134 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
135 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
136 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
137 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
138 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
139 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
140 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
141 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
142 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
143 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
144 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
145 | org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
146 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
147 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
148 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
149 | org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
150 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
151 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
152 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
153 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
154 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
155 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
156 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
157 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
158 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
159 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
160 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
161 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
162 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
163 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
164 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
165 | org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
166 | org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
167 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
168 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
169 | org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
170 | org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
171 | org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
172 | org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
173 | org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
174 | org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
175 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
176 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
177 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
178 | org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
179 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
180 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
181 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
182 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
183 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
184 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
185 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
186 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
187 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
188 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
189 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
190 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
191 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
192 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
193 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
194 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
195 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
196 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
197 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
198 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
199 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
200 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
201 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
202 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
203 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
204 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
205 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
206 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
207 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
208 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
209 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
210 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
211 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
212 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
213 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
214 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
215 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
216 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
217 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
218 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
219 | org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
220 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
221 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
222 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
223 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
224 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
225 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
226 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
227 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
228 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
229 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
230 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
231 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
232 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
233 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
234 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
235 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
236 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
237 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
238 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
239 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
240 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
241 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
242 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
243 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
244 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
245 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
246 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
247 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
248 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
249 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
250 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
251 | org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
252 | org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
253 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
254 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
255 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
256 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
257 | org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
258 | org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
259 | org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
260 | org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
261 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
262 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
263 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
264 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
265 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
266 | org.eclipse.jdt.core.formatter.join_lines_in_comments=true
267 | org.eclipse.jdt.core.formatter.join_wrapped_lines=true
268 | org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
269 | org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=true
270 | org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
271 | org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
272 | org.eclipse.jdt.core.formatter.lineSplit=160
273 | org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
274 | org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
275 | org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
276 | org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
277 | org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
278 | org.eclipse.jdt.core.formatter.tabulation.char=tab
279 | org.eclipse.jdt.core.formatter.tabulation.size=4
280 | org.eclipse.jdt.core.formatter.use_on_off_tags=false
281 | org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
282 | org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
283 | org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
284 |
--------------------------------------------------------------------------------