Skip to content

Instantly share code, notes, and snippets.

@drhuffman12
Last active February 6, 2018 05:54
Show Gist options
  • Save drhuffman12/f2a72870fe32c39cb913 to your computer and use it in GitHub Desktop.
Save drhuffman12/f2a72870fe32c39cb913 to your computer and use it in GitHub Desktop.
Upgrade gnuroot wheezyX on android ARM to jessie and add java and jruby
# Download Oracle Jdk 8 for Linux 32bit from:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-arm-downloads-2187472.html
# ... The download should be a file like: jdk-8u33-linux-arm-vfp-hflt.tar.gz
# Download JRuby from: http://www.jruby.org/download
# ... The download should be a file like: jruby-bin-1.7.18.tar.gz, jruby-bin-9.0.0.0.pre1.tar.gz
# Install 'GNURoot' and 'GNURoot Wheezy x86' from app store, see:
# [gnuroot app](https://play.google.com/store/apps/details?id=champion.gnuroot&hl=en)
# [gnuroot repo](https://github.com/corbinlc)
# Launch GNURoot, create Wheezy x86 image, and launch wheezy as 'fake root'
# Upgrade to Jessie [will take a while]:
sed -i 's/wheezy/jessie/g' /etc/apt/sources.list
apt-get update && apt-get dist-upgrade
# Verify version:
cat /etc/debian_version
# jessie/sid
# Prep dev folder:
mkdir /_dev_
cd /_dev_
# Pull in JDK:
cp /sdcard/Download/jdk-8u33-linux-arm-vfp-hflt.tar.gz .
tar -zxvf jdk-8u33-linux-arm-vfp-hflt.tar.gz
# chmod 777 jdk1.8.0_33/bin/*
# Pull in JRuby:
cp /sdcard/Download/jruby-complete-1.7.18.jar .
cp /sdcard/Download/jruby-complete-9.0.0.0.pre1.jar .
cp /sdcard/Download/jruby-bin-1.7.18.tar.gz .
tar -zxvf jruby-bin-1.7.18.tar.gz
# chmod 777 jruby-1.7.18/bin/*
cp /sdcard/Download/jruby-bin-9.0.0.0.pre1.tar.gz .
tar -zxvf jruby-bin-9.0.0.0.pre1.tar.gz
# chmod 777 jruby-9.0.0.0.pre1/bin/*
# TO_DO...:
# verify Java:
/_dev_/jdk1.8.0_33/bin/java -version
# Verify JRuby:
/_dev_/jdk1.8.0_33/bin/java -jar jruby-complete-1.7.18.jar -v
# .. should be like ..
# jruby 1.7.16 (1.9.3p392) 2014-09-25 575b395 on Java HotSpot(TM) Server VM 1.8.0_20-b26 +jit [linux-i386]
# Append path variables:
# /etc/environment
echo "DEV_HOME=/_dev_" >> /etc/environment
echo "JAVA_HOME=\$DEV_HOME/jdk1.8.0_33" >> /etc/environment
echo "JRUBY_HOME=\$DEV_HOME/jruby-1.7.18" >> /etc/environment
#echo "JRUBY_HOME=\$DEV_HOME/jruby-9.0.0.0.pre1" >> /etc/environment
echo "PATH=\$PATH:\$JAVA_HOME/bin:\$JRUBY_HOME/bin" >> /etc/environment
#... doesn't seem to work, so set your terminal's intial command to:
DEV_HOME=/_dev_ && JAVA_HOME=$DEV_HOME/jdk1.8.0_33 && JRUBY_HOME=$DEV_HOME/jruby-1.7.18 && PATH=$PATH:$JAVA_HOME/bin:$JRUBY_HOME/bin && export DEV_HOME && export JAVA_HOME && export JRUBY_HOME && export PATH
# log out and log back in
# Verify Java:
# cd jdk1.8.0_33/bin
# ./java -version
java -version
# bash: /_dev_/jdk1.8.0_33/bin/java: No such file or directory
# .. should be like ..
# java version "1.8.0_33"
# Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
# Java HotSpot(TM) Server VM (build 25.20-b23, mixed mode)
# Verify JRuby
jruby -v --2.0
# jruby 1.7.16 (2.0.0p195) 2014-09-25 575b395 on Java HotSpot(TM) Server VM 1.8.0_33-b26 +jit [linux-i386]
# Verify RubyGems version:
jgem -v
# 2.1.9
@GenArx
Copy link

GenArx commented Feb 6, 2018

i can't continue on this part:

Pull in JDK:

cp /sdcard/....

i know my smartphone's dir is " /SD Card/.... "

how to correct this.. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment