Skip to content

Commit

Permalink
version 0.2 and full arm support
Browse files Browse the repository at this point in the history
  • Loading branch information
julianwi committed Apr 14, 2014
1 parent 27ee33d commit 4d66055
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="julianwi.javainstaller"
android:versionCode="1"
android:versionName="0.1" >
android:versionCode="2"
android:versionName="0.2" >

<uses-sdk
android:minSdkVersion="1"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

Java installer is an android app to install a full Java runtime on the phone

only x86 devices are supported now but I am working on an arm version.
x86 devices and arm devices are supported.

the app downloads the required files from a HTTP server unpacks them and copies them to the right directory.
5 changes: 3 additions & 2 deletions src/julianwi/javainstaller/Install.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class Install implements OnClickListener, Runnable, OnCancelListener{
private Handler handler = new Handler();
private URL url;
private String[] tmp = new String[]{"terminal.apk", "busybox", "libc.tar.gz", "java.tar.gz"};
public static String[] arm = new String[]{null, "http://borcteam.bplaced.net/Daten/java/arm/busybox"};
public static String[] arm = new String[]{null, "http://borcteam.bplaced.net/Daten/java/arm/busybox", "http://borcteam.bplaced.net/Daten/java/arm/libc.tar.gz", "http://borcteam.bplaced.net/Daten/java/arm/java.tar.gz"};

public Install(CheckPoint check){
mcheck = check;
Expand Down Expand Up @@ -120,6 +120,7 @@ else if(mcheck.id == 2 || mcheck.id == 3){
writer.write("echo \"#!/system/bin/sh\" > "+mcheck.getPath()+"/java\n"
+ "echo \"export LD_LIBRARY_PATH="+mcheck.getPath()+"/lib:"+MainActivity.checks[2].getPath()+"\" >> "+mcheck.getPath()+"/java\n"
+ "echo \""+mcheck.getPath()+"/jamvm -Xbootclasspath:"+mcheck.getPath()+"/lib/classes.zip:"+mcheck.getPath()+"/lib/glibj.zip \\$@\" >> "+mcheck.getPath()+"/java\n");
writer.write("$bbdir chmod 0755 "+mcheck.getPath()+"/java\n");
writer.write("$bbdir chmod 0755 "+mcheck.getPath()+"/lib/*\n");
}
writer.write("echo installation complete\n");
Expand Down Expand Up @@ -169,7 +170,7 @@ public static String getArch() {
// Returns the value of uname -m
String machine = System.getProperty("os.arch");
// Convert machine name to arch identifier
if (machine.matches("armv[0-9]+(tej?)?l")) {
if (machine.matches("armv[0-9]+(tej?)?l") || machine.equals("OS_ARCH")) {
return "arm";
} else {
return "x86";
Expand Down

0 comments on commit 4d66055

Please sign in to comment.