Permalink
Browse files

initial commit

  • Loading branch information...
koush committed Apr 7, 2011
0 parents commit 7b4672e49db485cfd201ac66601994ea1085fce7
Showing with 1,131 additions and 0 deletions.
  1. +7 −0 .classpath
  2. +1 −0 .gitignore
  3. +33 −0 .project
  4. +21 −0 AndroidManifest.xml
  5. +19 −0 assets/backup.sh
  6. BIN assets/busybox
  7. BIN bin/TimeMachine.apk
  8. BIN bin/classes.dex
  9. BIN bin/com/koushikdutta/timemachine/ApplicationsActivity$1.class
  10. BIN bin/com/koushikdutta/timemachine/ApplicationsActivity$2.class
  11. BIN bin/com/koushikdutta/timemachine/ApplicationsActivity$3.class
  12. BIN bin/com/koushikdutta/timemachine/ApplicationsActivity$4.class
  13. BIN bin/com/koushikdutta/timemachine/ApplicationsActivity$5.class
  14. BIN bin/com/koushikdutta/timemachine/ApplicationsActivity$ApplicationBatch.class
  15. BIN bin/com/koushikdutta/timemachine/ApplicationsActivity$BackupEntryAdapter.class
  16. BIN bin/com/koushikdutta/timemachine/ApplicationsActivity$BackupItem.class
  17. BIN bin/com/koushikdutta/timemachine/ApplicationsActivity$SingleApplicationInfo.class
  18. BIN bin/com/koushikdutta/timemachine/ApplicationsActivity.class
  19. BIN bin/com/koushikdutta/timemachine/AssetExtractor.class
  20. BIN bin/com/koushikdutta/timemachine/BackupActivity$ApplicationInfoAdapter.class
  21. BIN bin/com/koushikdutta/timemachine/BackupActivity$SingleApplicationInfo.class
  22. BIN bin/com/koushikdutta/timemachine/BackupActivity.class
  23. BIN bin/com/koushikdutta/timemachine/Helper.class
  24. BIN bin/com/koushikdutta/timemachine/R$attr.class
  25. BIN bin/com/koushikdutta/timemachine/R$drawable.class
  26. BIN bin/com/koushikdutta/timemachine/R$id.class
  27. BIN bin/com/koushikdutta/timemachine/R$layout.class
  28. BIN bin/com/koushikdutta/timemachine/R$string.class
  29. BIN bin/com/koushikdutta/timemachine/R.class
  30. BIN bin/com/koushikdutta/timemachine/RestoreActivity.class
  31. BIN bin/com/koushikdutta/timemachine/SeparatedListAdapter.class
  32. BIN bin/com/koushikdutta/timemachine/Settings$1.class
  33. BIN bin/com/koushikdutta/timemachine/Settings.class
  34. BIN bin/com/koushikdutta/timemachine/SuRunner$1$1.class
  35. BIN bin/com/koushikdutta/timemachine/SuRunner$1.class
  36. BIN bin/com/koushikdutta/timemachine/SuRunner$SuCommandCallback.class
  37. BIN bin/com/koushikdutta/timemachine/SuRunner.class
  38. BIN bin/com/koushikdutta/timemachine/TimeMachineActivity.class
  39. BIN bin/com/koushikdutta/timemachine/TimeMachineApplication.class
  40. BIN bin/resources.ap_
  41. +11 −0 default.properties
  42. +58 −0 gen/com/koushikdutta/timemachine/R.java
  43. +36 −0 proguard.cfg
  44. BIN res/drawable-hdpi-v5/ic_tab_applications_selected.png
  45. BIN res/drawable-hdpi-v5/ic_tab_applications_unselected.png
  46. BIN res/drawable-hdpi/ic_tab_applications_selected.png
  47. BIN res/drawable-hdpi/ic_tab_applications_unselected.png
  48. BIN res/drawable-hdpi/icon.png
  49. BIN res/drawable-ldpi-v5/ic_tab_applications_selected.png
  50. BIN res/drawable-ldpi-v5/ic_tab_applications_unselected.png
  51. BIN res/drawable-ldpi/ic_tab_applications_selected.png
  52. BIN res/drawable-ldpi/ic_tab_applications_unselected.png
  53. BIN res/drawable-ldpi/icon.png
  54. BIN res/drawable-mdpi-v5/ic_tab_applications_selected.png
  55. BIN res/drawable-mdpi-v5/ic_tab_applications_unselected.png
  56. BIN res/drawable-mdpi/ic_tab_applications_selected.png
  57. BIN res/drawable-mdpi/ic_tab_applications_unselected.png
  58. BIN res/drawable-mdpi/icon.png
  59. BIN res/drawable/ic_launcher_games.png
  60. BIN res/drawable/ic_launcher_smsmms.png
  61. BIN res/drawable/ic_launcher_twitter.png
  62. +5 −0 res/drawable/ic_tab_applications.xml
  63. +11 −0 res/layout/appinfo.xml
  64. +11 −0 res/layout/applications.xml
  65. +26 −0 res/layout/backup.xml
  66. +11 −0 res/layout/confirm_appinfo.xml
  67. +10 −0 res/layout/list_header.xml
  68. +6 −0 res/layout/restore.xml
  69. +20 −0 res/layout/timemachine.xml
  70. +21 −0 res/values/strings.xml
  71. +227 −0 src/com/koushikdutta/timemachine/ApplicationsActivity.java
  72. +89 −0 src/com/koushikdutta/timemachine/AssetExtractor.java
  73. +82 −0 src/com/koushikdutta/timemachine/BackupActivity.java
  74. +57 −0 src/com/koushikdutta/timemachine/Helper.java
  75. +15 −0 src/com/koushikdutta/timemachine/RestoreActivity.java
  76. +107 −0 src/com/koushikdutta/timemachine/SeparatedListAdapter.java
  77. +119 −0 src/com/koushikdutta/timemachine/Settings.java
  78. +90 −0 src/com/koushikdutta/timemachine/SuRunner.java
  79. +26 −0 src/com/koushikdutta/timemachine/TimeMachineActivity.java
  80. +12 −0 src/com/koushikdutta/timemachine/TimeMachineApplication.java
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="output" path="bin"/>
</classpath>
@@ -0,0 +1 @@
bin
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>TimeMachine</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.koushikdutta.timemachine"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="4" />

<application android:icon="@drawable/icon" android:label="@string/app_name" android:name=".TimeMachineApplication">
<activity android:name=".TimeMachineActivity"
android:label="@string/app_name" android:configChanges="orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity android:name=".ApplicationsActivity" android:configChanges="orientation" />
<activity android:name=".RestoreActivity" android:configChanges="orientation" />
<activity android:name=".BackupActivity" android:configChanges="orientation" />
</application>
</manifest>
@@ -0,0 +1,19 @@
function fail
{
echo $1 > /data/data/com.koushikdutta.timemachine/error.txt
exit 1
}

if [ -z "$FILESDIR" ]
then
echo FILESDIR environment variable not set.
exit 1
fi

if [ -z "$BUSYBOX" ]
then
fail BUSYBOX environment varialbe not set.
fi

cd $($BUSYBOX dirname $0)

BIN +572 KB assets/busybox
Binary file not shown.
BIN +469 KB bin/TimeMachine.apk
Binary file not shown.
BIN +27.5 KB bin/classes.dex
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN +452 KB bin/resources.ap_
Binary file not shown.
@@ -0,0 +1,11 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.

# Project target.
target=android-11
@@ -0,0 +1,58 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/

package com.koushikdutta.timemachine;

public final class R {
public static final class attr {
}
public static final class drawable {
public static final int ic_launcher_games=0x7f020000;
public static final int ic_launcher_smsmms=0x7f020001;
public static final int ic_launcher_twitter=0x7f020002;
public static final int ic_tab_applications=0x7f020003;
public static final int ic_tab_applications_selected=0x7f020004;
public static final int ic_tab_applications_unselected=0x7f020005;
public static final int icon=0x7f020006;
}
public static final class id {
public static final int application_group_name=0x7f050006;
public static final int backup=0x7f050005;
public static final int checked=0x7f050000;
public static final int clear=0x7f050004;
public static final int icon=0x7f050001;
public static final int list=0x7f050003;
public static final int list_header_title=0x7f050008;
public static final int name=0x7f050002;
public static final int start_backup=0x7f050007;
}
public static final class layout {
public static final int appinfo=0x7f030000;
public static final int applications=0x7f030001;
public static final int backup=0x7f030002;
public static final int confirm_appinfo=0x7f030003;
public static final int list_header=0x7f030004;
public static final int restore=0x7f030005;
public static final int timemachine=0x7f030006;
}
public static final class string {
public static final int all_applications=0x7f040002;
public static final int app_name=0x7f040000;
public static final int application_group_name_hint=0x7f04000d;
public static final int application_groups=0x7f040009;
public static final int applications=0x7f040001;
public static final int backup=0x7f04000a;
public static final int clear=0x7f040004;
public static final int confirm_backup=0x7f04000c;
public static final int games=0x7f040007;
public static final int restore=0x7f040003;
public static final int select_an_application_to_backup=0x7f04000b;
public static final int sms_and_mms=0x7f040006;
public static final int social_networking=0x7f040008;
public static final int start_backup=0x7f040005;
}
}
@@ -0,0 +1,36 @@
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService

-keepclasseswithmembernames class * {
native <methods>;
}

-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/ic_tab_applications_selected" />
<item android:drawable="@drawable/ic_tab_applications_unselected" />
</selector>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal">
<CheckBox android:layout_width="wrap_content" android:padding="4sp"
android:layout_height="wrap_content" android:layout_gravity="center" android:id="@+id/checked" android:focusable="false"
android:focusableInTouchMode="false" />
<ImageView android:layout_width="48sp" android:padding="4sp"
android:layout_height="48sp" android:id="@+id/icon" android:layout_gravity="center" android:scaleType="fitXY" />
<TextView android:layout_width="wrap_content" android:padding="4sp"
android:layout_height="wrap_content" android:id="@+id/name" android:layout_gravity="center" android:textSize="20sp" android:textStyle="bold" />
</LinearLayout>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical">
<ListView android:id="@+id/list" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:fastScrollEnabled="true" android:layout_weight="1" />
<LinearLayout android:layout_height="wrap_content" android:layout_width="fill_parent" android:orientation="horizontal">
<Button android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="@string/clear" android:layout_weight=".5" android:id="@+id/clear" />
<Button android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="@string/backup" android:layout_weight=".5" android:id="@+id/backup" />
</LinearLayout>
</LinearLayout>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical">
<!-- Focusable to prevent the edit text from spamming a keyboard. -->
<LinearLayout android:layout_height="wrap_content"
android:layout_width="fill_parent" android:orientation="vertical"
android:focusable="true" android:focusableInTouchMode="true" android:padding="6sp">
<EditText android:id="@+id/application_group_name"
android:layout_height="wrap_content" android:layout_width="fill_parent"
android:hint="@string/application_group_name_hint"
android:nextFocusUp="@+id/application_group_name"
android:nextFocusLeft="@+id/application_group_name" />
</LinearLayout>
<ListView android:id="@+id/list" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:fastScrollEnabled="true"
android:layout_weight="1" />
<LinearLayout android:layout_height="wrap_content" android:padding="5dp"
android:layout_width="fill_parent" android:orientation="horizontal">
<Button android:layout_height="wrap_content"
android:layout_width="fill_parent" android:text="@string/start_backup"
android:layout_weight=".5" android:id="@+id/start_backup">
<requestFocus />
</Button>
</LinearLayout>
</LinearLayout>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal">
<CheckBox android:layout_width="wrap_content" android:padding="4sp"
android:layout_height="wrap_content" android:layout_gravity="center" android:id="@+id/checked" android:focusable="false" android:visibility="invisible"
android:focusableInTouchMode="false" />
<ImageView android:layout_width="48sp" android:padding="4sp"
android:layout_height="48sp" android:id="@+id/icon" android:layout_gravity="center" android:scaleType="fitXY" />
<TextView android:layout_width="wrap_content" android:padding="4sp"
android:layout_height="wrap_content" android:id="@+id/name" android:layout_gravity="center" android:textSize="20sp" android:textStyle="bold" />
</LinearLayout>
@@ -0,0 +1,10 @@
<!-- list_header.xml -->
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/list_header_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="2dip"
android:paddingBottom="2dip"
android:paddingLeft="5dip"
style="?android:attr/listSeparatorTextViewStyle" />
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</LinearLayout>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
</TabHost>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Time Machine</string>

<string name="applications">Applications</string>
<string name="all_applications">All Applications</string>
<string name="restore">Restore</string>
<string name="clear">Clear</string>

<string name="start_backup">Start Backup</string>
<string name="sms_and_mms">SMS and MMS</string>
<string name="games">Games</string>
<string name="social_networking">Social Networking</string>
<string name="application_groups">Application Groups</string>

<string name="backup">Backup</string>
<string name="select_an_application_to_backup">You must select at least one application to backup.</string>

<string name="confirm_backup">Confirm Backup</string>
<string name="application_group_name_hint">Application Group Name (Optional)</string>
</resources>
Oops, something went wrong.

0 comments on commit 7b4672e

Please sign in to comment.