From faabf404ec6064956a08e825bed5d91e51fbdbbb Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 11 Jun 2014 01:25:53 +1000 Subject: Roughed out a skeleton of the UI. --- .classpath | 8 +++++ .gitignore | 2 ++ .project | 33 +++++++++++++++++ AndroidManifest.xml | 25 +++++++++++++ README | 29 +++++++++++---- assets/Placitas_Green_pillow.jpg | Bin 0 -> 8225 bytes assets/Placitas_Green_pillow_512.jpg | Bin 0 -> 31789 bytes proguard.cfg | 40 +++++++++++++++++++++ project.properties | 12 +++++++ .../ic_launch_placitas_green_pillow.jpg | Bin 0 -> 6226 bytes res/layout/main.xml | 39 ++++++++++++++++++++ res/values/strings.xml | 17 +++++++++ src/net/onefang/toyboxInstaller/MainActivity.java | 37 +++++++++++++++++++ 13 files changed, 236 insertions(+), 6 deletions(-) create mode 100644 .classpath create mode 100644 .project create mode 100644 AndroidManifest.xml create mode 100644 assets/Placitas_Green_pillow.jpg create mode 100644 assets/Placitas_Green_pillow_512.jpg create mode 100644 proguard.cfg create mode 100644 project.properties create mode 100644 res/drawable-xxhdpi/ic_launch_placitas_green_pillow.jpg create mode 100644 res/layout/main.xml create mode 100644 res/values/strings.xml create mode 100644 src/net/onefang/toyboxInstaller/MainActivity.java diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..a4763d1 --- /dev/null +++ b/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/.gitignore b/.gitignore index e69de29..0da929c 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +gen/ +# project.properties is generated, but includes a comment that it should be included in source control. shrugs diff --git a/.project b/.project new file mode 100644 index 0000000..d1e8424 --- /dev/null +++ b/.project @@ -0,0 +1,33 @@ + + + AppTemplate + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/AndroidManifest.xml b/AndroidManifest.xml new file mode 100644 index 0000000..d48beef --- /dev/null +++ b/AndroidManifest.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + diff --git a/README b/README index e9b5dc8..66aacc6 100644 --- a/README +++ b/README @@ -1,7 +1,14 @@ -This is an Android installer for Rob Landley's toybox. +This is an Android installer for Rob Landley's toybox. Toybox combines +common Linux command line utilities together into a single BSD-licensed +executable that's simple, small, fast, reasonably standards-compliant, +and powerful enough to turn Android into a development environment. http://landley.net/code/toybox/ +In general I'll follow toybox's version number, even if there is no need +to change this code. Currently that's 0.4.8. If I ever have to change +the code between toybox versions, I'll add another point. + Design. ======= @@ -10,14 +17,19 @@ My initial design thoughts are to download a recent binary of toybox from Rob's web site that is suitable for what ever CPU we are running on. -http://landley.net/code/toybox/bin/ +http://landley.net/code/toybox/downloads/binaries/ + +java.lang.System.getProperty("os.arch"); returns things like "armv7l". +Currently the latests toybox binaries download only provides ARM 4, 5, +and 6 versions. So would need some massaging to get the closest match. Then provide a list of the folders in the current PATH, so the user can select where to install it. Likely root will be needed, though I think -there are non root ways of running things like toybox. I dunno yet if -access to the PATH is possible, or the CPU type. We shall see. +there are non root ways of running things like toybox. -A fall back option is to use some sort of directory picker. +A fall back option is to use some sort of directory picker. Might just +provide that anyway, for extra flexibility. One more option might be to +allow a choice of versions to install. About the logo. @@ -33,6 +45,12 @@ image for the toybox logo. So the Placitas_Green_pillow.jpg image, and all derivations of it, are used with permission from Bruce Gardner. Thank you Bruce. +Original image size is 176x176, Android requires MDPI 48x48, HDPI 72x72, +XHDPI 96x96, XXHDPI 144x144, XXXHDPI 192x192, and Google Play logo at +512x512. LDPI is also supported, but that gets the HDPI scaled down to +36x36 automatically. Actually Android in general takes what it has and +tries to scale it as best it can. Cropping it to 144 works OK. + Authors. ======== @@ -48,4 +66,3 @@ License. ToyboxInstaller is licensed under the same BSD style license that toybox is licensed under. See the toybox web site above for details. - diff --git a/assets/Placitas_Green_pillow.jpg b/assets/Placitas_Green_pillow.jpg new file mode 100644 index 0000000..3e38abb Binary files /dev/null and b/assets/Placitas_Green_pillow.jpg differ diff --git a/assets/Placitas_Green_pillow_512.jpg b/assets/Placitas_Green_pillow_512.jpg new file mode 100644 index 0000000..ae097b8 Binary files /dev/null and b/assets/Placitas_Green_pillow_512.jpg differ diff --git a/proguard.cfg b/proguard.cfg new file mode 100644 index 0000000..b1cdf17 --- /dev/null +++ b/proguard.cfg @@ -0,0 +1,40 @@ +-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 ; +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet); +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet, int); +} + +-keepclassmembers class * extends android.app.Activity { + public void *(android.view.View); +} + +-keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +-keep class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} diff --git a/project.properties b/project.properties new file mode 100644 index 0000000..b160b17 --- /dev/null +++ b/project.properties @@ -0,0 +1,12 @@ +# 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, +# "ant.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-16 + diff --git a/res/drawable-xxhdpi/ic_launch_placitas_green_pillow.jpg b/res/drawable-xxhdpi/ic_launch_placitas_green_pillow.jpg new file mode 100644 index 0000000..eedf7dc Binary files /dev/null and b/res/drawable-xxhdpi/ic_launch_placitas_green_pillow.jpg differ diff --git a/res/layout/main.xml b/res/layout/main.xml new file mode 100644 index 0000000..7136eb1 --- /dev/null +++ b/res/layout/main.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + +