Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guilhermefilippo/60935c9bcaf91340392551519b9c409a to your computer and use it in GitHub Desktop.
Save guilhermefilippo/60935c9bcaf91340392551519b9c409a to your computer and use it in GitHub Desktop.
Fix deezer, spotify and other players with flash plugin required on Chrome OS or Chromium OS - 2017
#!/bin/bash
# Fix deezer, spotify and other players with flash plugin required on Chrome OS or Chromium OS - 2017
# Based on: https://gist.github.com/shagr4th/6178203
# Contact: guilherme@macromind.com.br
#
# How to use
# Run as root:
# Open the terminal: > Ctrl + T
# Open the shell: > shell
# Login as root: > sudo su
# Download the script: wget https://gist.githubusercontent.com/guilhermefilippo/411d01207319adc6a8280a3f24624bc8/raw/bbae17c839a3aad6186aee8789fffbe3d55c0e84/ChromiumOS_-_fix_flashplayer_plugin.sh
# Add permission to execute: > chmod 700 ChromiumOS_-_fix_flashplayer_plugin.sh
# Run the script: > bash ChromiumOS_-_fix_flashplayer_plugin.sh
# Bin dir
base="$(dirname "$(readlink -f "${0}")")"
# Tmp dir
tmpDir=/opt/tmp
mkdir -p $tmpDir
# Clear the screen
clear
# Are we root?
if (( $EUID != 0 )); then
echo - "You need to run this script as root!"
exit
fi
# Make sure the filesystem is RW
mount -o remount,rw /
#
# Download the appropriate files (based on arch)
#
# Check 32 vs 64-bit and set paths accordingly
if [ `uname -m` == 'x86_64' ]; then
echo -e "64-bit system\n"
baseurl="https://www.dropbox.com/s/sop0hm7itkrr9oj/chromeos_x64.tar.gz?dl=1"
elif [ `uname -m` == 'i686' ]; then
echo -e "32-bit system\n"
baseurl="https://www.dropbox.com/s/zxukryn2xr21m59/chromeos_x86.tar.gz?dl=1"
else
echo -e "Sorry, only x86 compatible CPUs are supported\n"
exit
fi
# Do the downloading...
echo -e "\nDownloading pepper-flash libraries and codecs...\n \n"
wget -qnv --show-progress "$baseurl" -O $tmpDir/data.tar.gz
tar xzf $tmpDir/data.tar.gz -C $tmpDir
# Create directories (create all regardless of architecture - let's be lazy)
echo -e "Creating folders...\n"
mkdir -p /usr/lib/mozilla/plugins/
mkdir -p /usr/lib64/mozilla/plugins/
mkdir -p /usr/lib/cromo/
mkdir -p /usr/lib64/cromo/
mkdir -p /opt/google/chrome/pepper/
# Media Codecs (all arch)
echo -e "Copying codec file...\n"
cp $tmpDir/libffmpegsumo.so /usr/lib/cromo/ -f
cp $tmpDir/libffmpegsumo.so /usr/lib64/cromo/ -f
cp $tmpDir/libffmpegsumo.so /usr/lib/mozilla/plugins/ -f
cp $tmpDir/libffmpegsumo.so /usr/lib64/mozilla/plugins/ -f
# Flash player
echo -e "Copying Flash files...\n"
cp $tmpDir/PepperFlash/* /opt/google/chrome/pepper/ -f
# Delete temp files
echo -e "Cleanup time!\n"
rm -rf $tmpDir
# Remount the filesystem as RO
echo -e "Remounting the filesystem as read-only...\n"
mount -o remount,ro /
# All done
echo -e "All done. You should restart the user interface by running 'restart ui' as root"
# Note: If you are using deezer and spotify, for example, add [*.]deezer.com and [*.]spotify.com
# on: Configurations > Advanced > Content Config > Protected Content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment