Skip to content

Instantly share code, notes, and snippets.

@DomeDan DomeDan/ forked from dz0ny/99java
Last active Aug 29, 2015

What would you like to do?

#Flash, java, mp3 and mp4 and pdf support for Chromium OS builds by hexxeh

This script downloads and installs libraries needed for Chromium, so that you can actually "TEST" multimedia experience.

##How to use?

Simply run as root user

curl -L | bash

or if you prefer wget

wget -qO- | bash

Then reboot computer!

##You don't know how to become root user?

$ chronos   (user)
$ facepunch (password)
$ sudo su

That's it, enjoy!

No sound?

Login as root

$ mount -o remount, rw /
$ alsaconf

Choose your sound card, then reboot!

Bugs was the hardest thing to do here, it should have a lot of bugs (probably) and might only work for this version.

Domedan Notes

Have tried i386 on a default build using the sdk 20140321, flashplayer and pdf viewer worked, but not mp3/mp4 and java

#based on
if [ `uname -m` == 'x86_64' ]; then
# 64-bit
export CHROME=""
export TALK=""
export JAVA=""
# 32-bit
export CHROME=""
export TALK=""
export JAVA=""
#clean stuff
mount -o remount, rw /
cd /opt/
rm "/opt/"
curl -o "/opt/" ""
mkdir -p /usr/lib/mozilla/plugins/
#Flash, pdf
echo "Downloading Google Chrome"
curl -z "/opt/chrome-bin.deb" -o "/opt/chrome-bin.deb" -L $CHROME
python /opt/ /opt/chrome-bin.deb /opt/chrome.tar.lzma
rm -rf chrome-unstable
mkdir chrome-unstable
tar -xvf /opt/chrome.tar.lzma -C chrome-unstable ./opt/google/chrome/ ./opt/google/chrome/ ./opt/google/chrome/PepperFlash/ ./opt/google/chrome/PepperFlash/manifest.json
mkdir /usr/lib/cromo/
cp /opt/chrome-unstable/opt/google/chrome/ /usr/lib/cromo/ -f
cp /opt/chrome-unstable/opt/google/chrome/ /opt/google/chrome/ -f
cp /opt/chrome-unstable/opt/google/chrome/ /usr/lib/mozilla/plugins/ -f
cp /opt/chrome-unstable/opt/google/chrome/ /opt/google/chrome/ -f
mkdir /opt/google/chrome/pepper/
cp /opt/chrome-unstable/opt/google/chrome/PepperFlash/ /opt/google/chrome/pepper/ -f
cp /opt/chrome-unstable/opt/google/chrome/PepperFlash/manifest.json /opt/google/chrome/pepper/ -f
curl -L > /opt/google/chrome/pepper/
rm -rf chrome-unstable/
rm /opt/chrome.tar.lzma
rm /opt/chrome-bin.deb
## Google Talk
echo "Downloading Google Talk plugin"
curl -z "/opt/talk-bin.deb" -o "/opt/talk-bin.deb" -L $TALK
python /opt/ /opt/talk-bin.deb /opt/talk.tar.gz
rm -rf /opt/google/talkplugin
tar -xvf /opt/talk.tar.gz -C /
rm /opt/google/chrome/pepper/
ln -s /opt/google/talkplugin/ /opt/google/chrome/pepper/
rm /opt/google/chrome/pepper/
ln -s /opt/google/talkplugin/ /opt/google/chrome/pepper/
rm /opt/talk.tar.gz
rm /opt/talk-bin.deb
echo "Downloading Oracle Java"
curl -z "/opt/java-bin.tar.gz" -o "/opt/java-bin.tar.gz" -L $JAVA
rm -rf /usr/lib/jvm/java-8-oracle/jre/
mkdir -p /usr/lib/jvm/java-8-oracle/jre/
tar -xvf /opt/java-bin.tar.gz -C /usr/lib/jvm/java-8-oracle/jre/ --strip-components 1
rm /usr/lib/cromo/
rm /opt/google/chrome/
if [ `uname -m` == 'x86_64' ]; then
rm /usr/lib64/cromo/
rm /usr/lib64/mozilla/plugins/
rm /usr/lib64/
ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/ /usr/lib64/cromo/
ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/ /usr/lib64/mozilla/plugins/
ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/ /usr/lib64/
ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/ /opt/google/chrome/
echo "PATH=\"/usr/lib64/jvm/java-8-oracle/jre/bin/\"" > /etc/env.d/99java
echo "JAVA_HOME=\"/usr/lib64/jvm/java-8-oracle/\"" >> /etc/env.d/99java
rm /usr/lib/cromo/
rm /usr/lib/mozilla/plugins/
rm /usr/lib/
ln -s /usr/lib/jvm/java-8-oracle/jre/lib/i386/ /usr/lib/cromo/
ln -s /usr/lib/jvm/java-8-oracle/jre/lib/i386/ /usr/lib/mozilla/plugins/
ln -s /usr/lib/jvm/java-8-oracle/jre/lib/i386/ /usr/lib/
ln -s /usr/lib/jvm/java-8-oracle/jre/lib/i386/ /opt/google/chrome/
echo "PATH=\"/usr/lib/jvm/java-8-oracle/jre/bin/\"" > /etc/env.d/99java
echo "JAVA_HOME=\"/usr/lib/jvm/java-8-oracle/\"" >> /etc/env.d/99java
chmod a+x /etc/env.d/99java
rm /opt/java-bin.tar.gz
restart ui
# -*- coding: utf-8 -*-
# deb2tar - convert a Debian Linux .deb file to a .tar
# First line -- file header: "!<arch>" or similar
# Multiple blocks -- each one, a header line followed by data
# Header line -- <filename> <num1> <num2> <num3> <mode> <len>
# Data -- <len> bytes of data
# We want the block called "data.tar.*"
import shlex
import os
import sys
def copypart(
bufsize=1024 * 1024,
Binary copy
in_file = open(src, 'rb')
out_file = open(dest, 'wb')
pointer = start
chunk = False
amount = bufsize
while pointer < length:
if length - pointer < amount:
amount = length - pointer
chunk =
pointer += len(chunk)
def main(file_open, file_write):
Copy tar data block
print 'Source file:', file_open
print 'Destination file:', file_write
zacetek = 0
konec = 0
file_name = ''
with open(file_open, 'r', 1024 * 1024) as in_file:
for (pointer, line) in enumerate(in_file):
zacetek += len(line)
if 'data.tar' in line:
meta = shlex.split(line[line.find('data.tar'):len(line)])
konec = int(meta[5])
file_name = str(meta[0])
statinfo = os.stat(file_open)
if statinfo.st_size - konec == zacetek:
copypart(file_open, file_write, int(zacetek), int(konec) + int(zacetek))
print '----DEBUG----'
print 'start block', zacetek
print 'end block', konec
print 'end deb', statinfo.st_size
print 'diff', statinfo.st_size - konec
print 'Internal filename is ' + file_name
print 'meta', meta
print 'Failed parsing file! Internal meta mismatch, please report this to author!'
print '----DEBUG----'
if __name__ == '__main__':
main(sys.argv[1], sys.argv[2])
except Exception, e:
print e
print 'Usage:', sys.argv[0], 'debian_file.deb', 'tar_file.tar.lzma or gz'
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Registration file for Pepper Flash player.
PLUGIN_NAME="Shockwave Flash"
VISIBLE_VERSION="17.0 r13844"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.