- Log in to netacad.com (or register first, it's free)
- Go to Resources->Download Packet Tracer
- Click the link for "64 Bit Download" under Linux Desktop Version 7.2 English
- Move the downloaded file to the folder of your choice and extract it. Note that sudo is required to avoid permission problems (I know, this shouldn't be needed if the file was created properly).
sudo tar xvzf Packet\ Tracer\ 7.2\ for\ Linux\ 64\ bit.tar.gz
- Run the install script
sudo ./install
- Read the EULA and, if you agree to it, accept it by pressing "Y"
- Press "Enter" for the default installation directory
- Press "Y" to create a symbolic link to run Packet Tracer
- As requested, restart the computer (NOTE: logging out and back in may work instead of a reboot)
- At this point, Packet Trace is installed, but it is missing a dependency. If you try to run it, it will print "Starting Packet Tracer 7.2" and just drop you back to a prompt and nothing will happen. The "packettracer" command is a script that actually runs /opt/pt/bin/PacketTracer7. When running this directly, it complains about not finding libpng12.
- Get the libpng12 package
wget http://ftp.debian.org/debian/pool/main/libp/libpng/libpng12-0_1.2.50-2+deb8u3_amd64.deb
- Install the libpng12 package
sudo dpkg -i libpng12-0_1.2.50-2+deb8u3_amd64.deb
- Type "packettracer" and Packet Tracer should start up normally
Thursday, October 4, 2018
Installing Cisco Packet Tracer 7.2 in Ubuntu 18.04
There are a few problems that occur when installing Cisco's Packet Tracer in Ubuntu 18.04, mainly permission issues and a missing dependency. Here are the steps I took to get it up and running.
Labels:
18.04,
Cisco,
libpng12,
packet tracer,
packettracer,
ubuntu
Monday, December 29, 2014
Extract Locally Stored MP3s From Google Music On Android
I needed a way to copy the music that is stored locally on my Android device. I couldn't just copy the files over since they have nondescript names like 153.mp3, 214.mp3, etc. Well, I could have just copied them, but I didn't want to have to listen to all of them and then rename them appropriately. I could have downloaded them with Google Music Manager but there is a limit to the number of times you can download them (two, I think). But more importantly to me, I have a data cap and I have already downloaded them by selecting "Keep on device" and didn't want to download them again. What I did was use the music database to gather information and use that to copy and rename the files.
What is needed:
-a rooted device in order to access the music files
-adb installed on the PC (see here for info on adb)
-Python installed on the PC (although I imagine this could be done in a Bash script too)
-the Android device connected to the PC so adb can access it
A few notes:
-The music is copied to the current folder as Artist/Album/Tracks.
-Copying the MP3 files from the device can take a while. Patience is a virtue.
-The paths created are *nix style, i.e. uses forward slashes. Windows users might need to change to back slashes
-There isn't any error checking, so if adb fails or sqlite3 isn't installed, who knows what will happen?
Finally, here is the python script.
#!/usr/bin/python
# Extract locally stored music from Google Music and rename the files properly
# 12-08-2014 Created by Bill Blankenship
import subprocess
import sqlite3
import os
# Get a copy of the music database
subprocess.check_call(["adb", "pull", "/data/data/com.google.android.music/databases/music.db"])
subprocess.check_call(["adb", "pull", "/data/data/com.google.android.music/databases/music.db-journal"])
# Get the mp3 files
raw_input("Getting ready to copy mp3 files from the device. This can take a while.\nPress Ctl-C to abort or Enter to continue...")
subprocess.check_call(["adb", "pull", "/data/data/com.google.android.music/files/music/"])
# Get needed info from the database
db = sqlite3.connect("music.db")
cursor = db.cursor()
cursor.execute('''select Id, LocalCopyPath, Title, Album, Artist, TrackNumber from MUSIC where LocalCopyPath is not NULL''')
all_rows = cursor.fetchall()
# Iterate through each song
for row in all_rows:
# Replace "/" with "-" in track names 'cause they're trouble
# Apparently tuples are immutable, so create more variables
LocalPath = row[1].replace("/","-")
Title = row[2].replace("/","-")
Album = row[3].replace("/","-")
Artist = row[4].replace("/","-")
TrackNumber = row[5]
# Make TrackNumber two digits (and a string)
if TrackNumber < 10:
TrackNumber = "0"+str(TrackNumber)
else:
TrackNumber = str(TrackNumber)
# Create Artist folder if needed
if not os.path.isdir(Artist):
os.makedirs(Artist)
# Create Album folder if needed
if not os.path.isdir(Artist+"/"+Album):
os.makedirs(Artist+"/"+Album)
# Move and rename tracks
print("Copying "+LocalPath+" to "+Artist+"/"+Album+"/"+TrackNumber+"-"+Title+".mp3")
os.rename(LocalPath, Artist+"/"+Album+"/"+TrackNumber+"-"+Title+".mp3")
db.close()
# Remove the music database files
os.remove("music.db")
os.remove("music.db-journal")
What is needed:
-a rooted device in order to access the music files
-adb installed on the PC (see here for info on adb)
-Python installed on the PC (although I imagine this could be done in a Bash script too)
-the Android device connected to the PC so adb can access it
A few notes:
-The music is copied to the current folder as Artist/Album/Tracks.
-Copying the MP3 files from the device can take a while. Patience is a virtue.
-The paths created are *nix style, i.e. uses forward slashes. Windows users might need to change to back slashes
-There isn't any error checking, so if adb fails or sqlite3 isn't installed, who knows what will happen?
Finally, here is the python script.
#!/usr/bin/python
# Extract locally stored music from Google Music and rename the files properly
# 12-08-2014 Created by Bill Blankenship
import subprocess
import sqlite3
import os
# Get a copy of the music database
subprocess.check_call(["adb", "pull", "/data/data/com.google.android.music/databases/music.db"])
subprocess.check_call(["adb", "pull", "/data/data/com.google.android.music/databases/music.db-journal"])
# Get the mp3 files
raw_input("Getting ready to copy mp3 files from the device. This can take a while.\nPress Ctl-C to abort or Enter to continue...")
subprocess.check_call(["adb", "pull", "/data/data/com.google.android.music/files/music/"])
# Get needed info from the database
db = sqlite3.connect("music.db")
cursor = db.cursor()
cursor.execute('''select Id, LocalCopyPath, Title, Album, Artist, TrackNumber from MUSIC where LocalCopyPath is not NULL''')
all_rows = cursor.fetchall()
# Iterate through each song
for row in all_rows:
# Replace "/" with "-" in track names 'cause they're trouble
# Apparently tuples are immutable, so create more variables
LocalPath = row[1].replace("/","-")
Title = row[2].replace("/","-")
Album = row[3].replace("/","-")
Artist = row[4].replace("/","-")
TrackNumber = row[5]
# Make TrackNumber two digits (and a string)
if TrackNumber < 10:
TrackNumber = "0"+str(TrackNumber)
else:
TrackNumber = str(TrackNumber)
# Create Artist folder if needed
if not os.path.isdir(Artist):
os.makedirs(Artist)
# Create Album folder if needed
if not os.path.isdir(Artist+"/"+Album):
os.makedirs(Artist+"/"+Album)
# Move and rename tracks
print("Copying "+LocalPath+" to "+Artist+"/"+Album+"/"+TrackNumber+"-"+Title+".mp3")
os.rename(LocalPath, Artist+"/"+Album+"/"+TrackNumber+"-"+Title+".mp3")
db.close()
# Remove the music database files
os.remove("music.db")
os.remove("music.db-journal")
Tuesday, September 16, 2014
Video Capture from a Hauppauge USBLive 2 Using ffmpeg
I haven't had much luck using my Hauppauge USBLive 2 capture device in Linux. The device works OK, but the quality is terrible whenever I use mencoder or VLC to capture. As a result, I have to boot Windows and use Hauppauge's software whenever I want to capture video. I find this annoying, so I thought I would see if ffmpeg would do the job in Linux.
My goal was to produce an output file that had the same properties as the file created in Windows. This means some of the options I used might not be the best ones. I used mediainfo to compare the properties of the files produced with ffmpeg and the Windows software.
So, here is the command line I came up with (this is a single line):
Looks complicated and scary, but it really isn't. Here are the options:
I spent way too much time searching for the "channel" option. ffmpeg kept insisting on using input 0 (composite). Even when I used v4l2-ctl to set the input to S-video, ffmpeg would change it back. I knew there had to be a way to set this, but I couldn't find it any of the documentation I read. I finally found it in some archived post about ffmpeg.
The output files created with the Windows software had a constant bitrate of 9000 kbits. The bitrate settings above try to simulate a constant bitrate. For whatever reason, using 9000k resulted in the bitrate being too high. Trial and error allowed me to settle on 8200k to give approximately 9000k in the output file.
I kept interlaced mode because that's what the Windows software creates. Anyway, I use Handbrake to crop, deinterlace (or more precisely decomb), and convert to MP4.
The ffmpeg results seemed washed out compared to the Windows results. Reducing the brightness a bit seems to help (the -vf option above).
There is one problem with the above command. There isn't any way to view the video as it is being captured. There are two possible solutions. If you know how long you want to capture and don't need to view the video stream, then just add the -t option, as -t #secs or -t hh:mm:ss. If you do need view the video, then another output must be added to the ffmpeg command (ffmpeg can handle multiple outputs, and inputs). I do this by adding the following right before the output file name:
So far the results have been pretty good. I might eventually try to convert directly to mp4, but I'll have to find some way to autocrop.
So what ffmpeg options would you use instead of the above?
What do you use to capture video in Linux?
My goal was to produce an output file that had the same properties as the file created in Windows. This means some of the options I used might not be the best ones. I used mediainfo to compare the properties of the files produced with ffmpeg and the Windows software.
So, here is the command line I came up with (this is a single line):
ffmpeg -f alsa -i hw:1 -f v4l2 -channel 1 -i /dev/video1 -c:a mp2 -b:v 8500k -minrate:v 8500k -maxrate:v 8500k -bufsize:v 2M -pix_fmt yuv420p -flags +ilme -bf 2 -vf mp=eq2=1:1:-0.05 -aspect 3:2 outputfile.ts
Looks complicated and scary, but it really isn't. Here are the options:
-f alsa (set alsa format for the audio input) -i hw:1 (use audio input #1, #0 is the microphone on my laptop) -f v4l2 (set v4l2 format for the video input) -channel 1 (set capture input: 0=composite, 1=S-video) -i /dev/video1 (use video1 for video input, video0 is the camera on my laptop) -c:a mp2 (set the audio codec to mp2) -b:v 8200k (set the video bitrate to 8200k) -minrate:v 8200k (set min video bitrate to 8200k) -maxrate:v 8200k (set max video bitrate to 8200k) -bufsize:v 2M (set video bufsize to 2M) -pix_fmt yuv420p (set chroma format) -flags +ilme (set interlace mode) -bf 2 (set B frame rate) -vf mp=eq2=1:1:-0.05 (video filter to adjust gamma:contrast:brightness: default= 1:1:0) -aspect 3:2 (set aspect since -vf mp=eq2... causes aspect error on playback)
I spent way too much time searching for the "channel" option. ffmpeg kept insisting on using input 0 (composite). Even when I used v4l2-ctl to set the input to S-video, ffmpeg would change it back. I knew there had to be a way to set this, but I couldn't find it any of the documentation I read. I finally found it in some archived post about ffmpeg.
The output files created with the Windows software had a constant bitrate of 9000 kbits. The bitrate settings above try to simulate a constant bitrate. For whatever reason, using 9000k resulted in the bitrate being too high. Trial and error allowed me to settle on 8200k to give approximately 9000k in the output file.
I kept interlaced mode because that's what the Windows software creates. Anyway, I use Handbrake to crop, deinterlace (or more precisely decomb), and convert to MP4.
The ffmpeg results seemed washed out compared to the Windows results. Reducing the brightness a bit seems to help (the -vf option above).
There is one problem with the above command. There isn't any way to view the video as it is being captured. There are two possible solutions. If you know how long you want to capture and don't need to view the video stream, then just add the -t option, as -t #secs or -t hh:mm:ss. If you do need view the video, then another output must be added to the ffmpeg command (ffmpeg can handle multiple outputs, and inputs). I do this by adding the following right before the output file name:
-f mpegts -b:v 1M udp://ipaddress:9999You can then view the video using:
ffplay udp://ipaddress:9999
So far the results have been pretty good. I might eventually try to convert directly to mp4, but I'll have to find some way to autocrop.
So what ffmpeg options would you use instead of the above?
What do you use to capture video in Linux?
Friday, June 20, 2014
FIX: Android device doesn't show up in Google Play Store device list
Somewhere along the way while flashing updates to the AOKP ROM to my Nexus 7 (2012), the Nexus stopped showing up in the device list on the web version of the Google Play store. But the Play store functioned properly on the Nexus: I could install new apps, got updates for existing apps, etc.
Since I saw the problem on the Play website and Play worked great on the Nexus itself, I thought the problem was "Google-wide". I cleared cache and data for Google Play services on the Nexus. No luck. I went to the Google dashboard and deleted the duplicate entries for my N7 (duplicates are a result of flashing ROMs to my device). Didn't work.
It turns out my assumption that the problem was Google-wide was wrong. The fix turned out to be easy.
This fixed the problem for me:
Since I saw the problem on the Play website and Play worked great on the Nexus itself, I thought the problem was "Google-wide". I cleared cache and data for Google Play services on the Nexus. No luck. I went to the Google dashboard and deleted the duplicate entries for my N7 (duplicates are a result of flashing ROMs to my device). Didn't work.
It turns out my assumption that the problem was Google-wide was wrong. The fix turned out to be easy.
This fixed the problem for me:
- Clear Play Store data. Go to Settings->Apps and scroll down until you see Google Play Store and tap it. Tap Clear Cache and then Clear Data.
- Reboot device
- Wait a few minutes
- Check the Play store website
- Do a happy dance
Thursday, January 23, 2014
Python Script to Remove Unbreakable Blocks in Robominer
Basically, when you save a game, it saves the entire map too. This includes the types and locations of all of the blocks. The save file can be modified to remove the unbreakable blocks.
I have SL4A and Python installed on my Android device, so I wrote a Python script I can run on my device to make the changes for me. If needed, you can also copy the file to a PC, run the script, and then copy it back. Note, however, that the script has to be run on every new level. Being able to run the script on the device is a lot more convenient.
Here is the script. It assumes your saved game file is on the SD card. I don't think you can modify the save file in the "Phone" slot unless your device is rooted.
#!/usr/bin/python
# Replace gray blocks with regular blocks on Android app Robominer
#
# 01-15-2013: Created by BitJunkie
# 01-16-2013: For gray blocks, generate random mineral type
# 01-22-2013: Block info starts 3 bytes before 0x3f80, adjust file pointer info
import random
count=0
random.seed()
# Open the file in binary mode for reading and writing
fh=open("/sdcard/Android/data/com.rnet.robominer/files/last_1.sav","rb+")
# Go to the beginning of the block info +3 bytes, from the beginning of the file
fh.seek(0x30, 0)
header = fh.read(2)
while header == b"\x3f\x80":
fh.seek(-4,1) # Move file pointer to start of block info
blk = fh.read(1)
if blk == b"\x01": # if block is gray
fh.seek(-1,1)
fh.write(b"\x02") # Make it regular
r = random.sample(["\x01","\x02","\x03","\x04","\x05","\x06","\x07","\x08","\x09","\x0a","\x0b","\x0c","\x0d","\x0e","\x0f","\x10","\x11","\x12"],1)
fh.write(r[0]) # Add random mineral/element
fh.seek(13,1) # Go to next block
count+=1 # Count how many blocks are changed
else:
# Go to next block header
fh.seek(14,1)
header = fh.read(2)
print "Blocks changed: %d" % count
I have only used this for games on the "Easy" level. I'm sure the script would have to be modified for the higher difficulties.
Have fun!
Thursday, January 9, 2014
Gift Codes for Despicable Me: Minion Rush
Updated 5/14/2015. See below.
Updated 3/28/2015. See below.
Updated 2/11/2015. See below.
Updated 12/10/2014. See below.
Etc., etc.
NOTE: Comments are moderated, so it might take a while for posted comments to show up.
Despicable Me: Minion Rush is a running game for Android (maybe other OSes too). If you select Options from the main screen and press the gift icon, you can enter codes here to get some goodies. Here are the codes I've found so far.
Use the up and down arrows to select different minion types. The different types are: classic, baby, maid, golfer, dancer, firefighter, and dad.
classic, firefighter, baby: Unlock Baby minion
baby, dancer, golfer: Unlock x5 score perks
baby, firefighter, maid: Unlock x5 banana points
maid, classic, golfer: Unlock loser taunt
dancer, firefighter, dad: Unlock x3 minion launcher
----------------------------------------------------------------------------
May 14, 2015 Update: Version 2.8.0k; Content Version 421 (also Version 2.8.1d)
Looks like gift codes have been removed in this update.
----------------------------------------------------------------------------
March 28, 2015 Update: Version 2.7.1c; Content Version 412
This update adds an April Fools Day special mission. But I didn't find any new gift codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
February 11, 2015 Update: Version 2.6.2c; Content Version 398
This update adds a Valentine's Day special mission. But I didn't find any new gift codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
December 10, 2014 Update: Version 2.5.0p; Content Version 383
This update adds special missions, in particular the Arctic Base mission. But I didn't find any new gift codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
November 10, 2014 Update: Version 2.3.1a; Content Version 370
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
November 8, 2014 Update: Version 2.3.0f; Content Version 370
No surprise, I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
October 21, 2014 Update: Version 2.2.1f; Content Version 367
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
September 18, 2014 Update: Version 2.1.0m; Content Version 343
I didn't find any new codes in this update. I'm starting to think this feature isn't used anymore. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
August 20, 2014 Update: Version 2.0.3b; Content Version 326
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
July 30, 2014 Update: Version 2.0.2e; Content Version 325
Big update. The game mechanics have changed, but gameplay is about the same. But I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
May 26, 2014 Update: Version 1.8.1g; Content Version 294
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
May 14, 2014 Update: Version 1.8.0u; Content Version 289
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
March 22, 2014 Update: Version 1.7.2; Content Version 227
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
February 10, 2014 Update: Version 1.6.1b; Content Version 202
I didn't find any new codes in this update. :( If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
January 2014 Update: Version 1.6.0u; Content Version 200
Golfer, golfer, baby: x3 Score Perks
Golfer, dancer, dad: 20 Tokens
Dancer, maid, baby: x3 Banana Perks
Dad, baby, dancer: 1500 Bananas
Enjoy!
Updated 3/28/2015. See below.
Updated 2/11/2015. See below.
Updated 12/10/2014. See below.
Etc., etc.
NOTE: Comments are moderated, so it might take a while for posted comments to show up.
Despicable Me: Minion Rush is a running game for Android (maybe other OSes too). If you select Options from the main screen and press the gift icon, you can enter codes here to get some goodies. Here are the codes I've found so far.
Use the up and down arrows to select different minion types. The different types are: classic, baby, maid, golfer, dancer, firefighter, and dad.
classic, firefighter, baby: Unlock Baby minion
baby, dancer, golfer: Unlock x5 score perks
baby, firefighter, maid: Unlock x5 banana points
maid, classic, golfer: Unlock loser taunt
dancer, firefighter, dad: Unlock x3 minion launcher
----------------------------------------------------------------------------
May 14, 2015 Update: Version 2.8.0k; Content Version 421 (also Version 2.8.1d)
Looks like gift codes have been removed in this update.
----------------------------------------------------------------------------
March 28, 2015 Update: Version 2.7.1c; Content Version 412
This update adds an April Fools Day special mission. But I didn't find any new gift codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
February 11, 2015 Update: Version 2.6.2c; Content Version 398
This update adds a Valentine's Day special mission. But I didn't find any new gift codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
December 10, 2014 Update: Version 2.5.0p; Content Version 383
This update adds special missions, in particular the Arctic Base mission. But I didn't find any new gift codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
November 10, 2014 Update: Version 2.3.1a; Content Version 370
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
November 8, 2014 Update: Version 2.3.0f; Content Version 370
No surprise, I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
October 21, 2014 Update: Version 2.2.1f; Content Version 367
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
September 18, 2014 Update: Version 2.1.0m; Content Version 343
I didn't find any new codes in this update. I'm starting to think this feature isn't used anymore. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
August 20, 2014 Update: Version 2.0.3b; Content Version 326
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
July 30, 2014 Update: Version 2.0.2e; Content Version 325
Big update. The game mechanics have changed, but gameplay is about the same. But I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
May 26, 2014 Update: Version 1.8.1g; Content Version 294
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
May 14, 2014 Update: Version 1.8.0u; Content Version 289
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
March 22, 2014 Update: Version 1.7.2; Content Version 227
I didn't find any new codes in this update. If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
February 10, 2014 Update: Version 1.6.1b; Content Version 202
I didn't find any new codes in this update. :( If you find any, please leave a comment to let me know.
----------------------------------------------------------------------------
January 2014 Update: Version 1.6.0u; Content Version 200
Golfer, golfer, baby: x3 Score Perks
Golfer, dancer, dad: 20 Tokens
Dancer, maid, baby: x3 Banana Perks
Dad, baby, dancer: 1500 Bananas
Enjoy!
Thursday, November 7, 2013
Colors and Split Screens in Vim
Here is some info on vim that I put here mainly for my reference. Maybe someone else will find them useful.
Color schemes
Set the color scheme in .vimrc, e.g. add a line like "colorscheme ron"
In vim, you can list the color schemes with ":colo <TAB>" (space after "colo")
If no colors after setting the color scheme, make sure syntax is enabled. In .vimrc add the line "syntax on".
Editing Multiple Files
:ls - List open files
:n or :bn - Go to next file
:p or :bp - Go to previous file
:b10 - Go to 10th file
:b foo - Go to file named "foo"
:b <TAB-KEY> - Cycle through open files (space after ":b")
CTRL-w v - Split screen vertically
CTRL-w s - Split screen horizontally
CTRL-w h and CTRL-w l - Switch through vertical windows
CTRL-w k and CTRL-w j - Switch through horizontal windows
Color schemes
Set the color scheme in .vimrc, e.g. add a line like "colorscheme ron"
In vim, you can list the color schemes with ":colo <TAB>" (space after "colo")
If no colors after setting the color scheme, make sure syntax is enabled. In .vimrc add the line "syntax on".
Editing Multiple Files
:ls - List open files
:n or :bn - Go to next file
:p or :bp - Go to previous file
:b10 - Go to 10th file
:b foo - Go to file named "foo"
:b <TAB-KEY> - Cycle through open files (space after ":b")
CTRL-w v - Split screen vertically
CTRL-w s - Split screen horizontally
CTRL-w h and CTRL-w l - Switch through vertical windows
CTRL-w k and CTRL-w j - Switch through horizontal windows
Wednesday, September 4, 2013
Android Google Services Data Usage is Huge
If you have a Nexus device running a custom ROM, you better check your data usage. A lot of people have noticed a huge spike in data usage on these platforms. The problem might not be limited to Nexus devices, but it is a problem with custom ROMs based on Android 4.2.2 and earlier. It seems to have started around the end of August. Some speculate that Google Services is downloading the Android 4.3 update, which fails since the ROM is custom, and then downloads the update again, etc.
I ran into this problem on my Nexus 7 (2012) running AOKP. This is how I fixed mine (hopefully, so far so good). Note that your device must be rooted, but if you're running a custom ROM, I assume it is.
I ran into this problem on my Nexus 7 (2012) running AOKP. This is how I fixed mine (hopefully, so far so good). Note that your device must be rooted, but if you're running a custom ROM, I assume it is.
- Download FOTAKill.apk from CyanogenMod or from XDA
- Move the APK to the /system/app folder (remember to remount /system read-write)
- Change owner/group to root/root and change permissions to 0644 (not sure if this is needed, but I did it to match existing apps)
- Reboot to recovery and wipe the cache
- Reboot and done
Labels:
android,
AOKP,
data usage,
fotakill,
google,
google services,
nexus,
ROM
Monday, August 19, 2013
Disable the Touchpad and Trackpoint Pointer in Linux
The mouse pointer on my Arch Linux system was going crazy. It was drifting badly and my mouse was unusable most of the time. Very frustrating. I thought I narrowed the problem down to a hardware issue on the touchpad. I have a USB mouse, so I don't really need the touchpad. I came across this script to toggle the touchpad on and off.
#!/bin/bash synclient TouchpadOff=$(synclient -l | grep -c 'TouchpadOff.*=.*0')This does indeed toggle the touchpad, but my problem still remained. So, the touchpad wasn't the problem. Then I saw the Trackpoint pointer sitting in the middle of my keyboard (otherwise known as an eraser pointer or the colorfully nicknamed clit mouse). So I dug around and found I could disable it easily enough. First, get the name of the device by running:
xinputIn my case the name is "TPPS/2 IBM TrackPoint". Then disable it with this:
xinput set-prop "TPPS/2 IBM TrackPoint" "Device Enabled" 0Problem solved. Hopefully someone else will find this useful.
Tuesday, August 13, 2013
Setting up a Gogo6 / Freenet6 IPv6 tunnel in Linux
It's 2013....where's my IPV6? IPv6 was introduced to alleviate some of the problems with IPv4. It's been available for well over 10 years, but the internet is slow to adopt the new format. I wanted to start using IPv6 to become familiar with it but, like most ISPs, mine doesn't offer native IPv6.
When native IPv6 isn't available, one option is to use a tunnel broker. Basically a broker sets up a tunnel between your device and an endpoint at the broker. IPv6 is encapsulated in an IPv4 packet, sent through the tunnel to the broker, then sent out from there as IPv6. I looked at three brokers: Hurricane Electric, SixXS, and Gogo6 (which owns Freenet6). I chose Gogo6 for several reasons: it allows NAT traversal, it allows anonymous connections (the other two require registration), and it is touted as the easiest to set up. One of the down sides of using Gogo6 is that it currently appears to only have two Points of Presence (PoP), Montreal Canada and Amsterdam Netherlands. This is the location of the broker server, so your IPv6 traffic will appear to come from one of these areas.
To install the Gogo6 client in Ubuntu, run the following:
To install the Gogo6 client in Arch, install it from the AUR. Since this is Arch, I'll assume you know how to install a package from the AUR. To create the tunnel and start using IPv6, run (as root)
Anonymous connections are fine to play with but the IPv6 address will change when your IPv4 address changes. I suggest registering for an authenticated tunnel at Gogo6. This will get you a static IPv6 address, a DNS entry (e.g. username.broker.freenet6.net), and a /56 prefix (so you can set up a router and give out IPv6 addresses to the devices on your network if you want). If you do register, you'll have to edit the /etc/gogoc/gogoc.conf file and enter your username and password, and change the server to the authenticated one.
A couple of notes: IPv6 addresses are globally accessible, so make sure you have a firewall and that it is properly configured. And since traffic is going through a tunnel, speed will be impacted somewhat. Here are some of my speedtest results. Top bar (green) is IPv4 and bottom bar is IPv6.
Finally, here are some sites that might be of interest.
ipv6test.google.com
ipv6-test.com
ip6.me/
www.subnetonline.com/pages/ipv6-network-tools/online-ipv6-traceroute.php
When native IPv6 isn't available, one option is to use a tunnel broker. Basically a broker sets up a tunnel between your device and an endpoint at the broker. IPv6 is encapsulated in an IPv4 packet, sent through the tunnel to the broker, then sent out from there as IPv6. I looked at three brokers: Hurricane Electric, SixXS, and Gogo6 (which owns Freenet6). I chose Gogo6 for several reasons: it allows NAT traversal, it allows anonymous connections (the other two require registration), and it is touted as the easiest to set up. One of the down sides of using Gogo6 is that it currently appears to only have two Points of Presence (PoP), Montreal Canada and Amsterdam Netherlands. This is the location of the broker server, so your IPv6 traffic will appear to come from one of these areas.
To install the Gogo6 client in Ubuntu, run the following:
sudo apt-get install gogocThis will install both gogoc and radvd. The radvd package is only needed if you plan on routing IPv6 from your PC. All done! You should now have an anonymous tunnel up and running. Test it by running
ping6 -c 5 ipv6.google.comThe tunnel will start when the system starts. If you don't want this, run
sudo mv /etc/rc5.d/S20gogoc /etc/rc5.d/s20gogocThen you can start and stop the tunnel with
sudo /etc/init.d/gogoc start sudo /etc/init.d/gogoc stop
To install the Gogo6 client in Arch, install it from the AUR. Since this is Arch, I'll assume you know how to install a package from the AUR. To create the tunnel and start using IPv6, run (as root)
systemctl start gogocWait a few seconds for the tunnel to come up and try pinging ipv6.google.com as above. If there are no problems and you want to create a tunnel when the system starts, run
systemctl enable gogoc
Anonymous connections are fine to play with but the IPv6 address will change when your IPv4 address changes. I suggest registering for an authenticated tunnel at Gogo6. This will get you a static IPv6 address, a DNS entry (e.g. username.broker.freenet6.net), and a /56 prefix (so you can set up a router and give out IPv6 addresses to the devices on your network if you want). If you do register, you'll have to edit the /etc/gogoc/gogoc.conf file and enter your username and password, and change the server to the authenticated one.
A couple of notes: IPv6 addresses are globally accessible, so make sure you have a firewall and that it is properly configured. And since traffic is going through a tunnel, speed will be impacted somewhat. Here are some of my speedtest results. Top bar (green) is IPv4 and bottom bar is IPv6.
Finally, here are some sites that might be of interest.
ipv6test.google.com
ipv6-test.com
ip6.me/
www.subnetonline.com/pages/ipv6-network-tools/online-ipv6-traceroute.php
Wednesday, August 7, 2013
Boot Multiple OSes Using Your Android Device and DriveDroid
DriveDroid is a neat app that allows you to boot ISO and IMG files that are stored on your Android device, just like you are booting from a USB drive. You can download a lot of images from within the app. You can also create blank images, but I haven't used this feature.
Your device must be rooted to use this app, so if it's not then this app isn't for you.
The process is quite simple. Start DriveDroid and press the "+" button and select "Download image" to get a list of available images. Select a distribution and then select the file you want. For the first time, I suggest trying Slitaz, since it is only about 35MB. Once it is downloaded, it will show up on DriveDroid's main screen.
To boot from an image, select it in DriveDroid, and select the host mode (e.g. Writable USB, etc). Then, connect the Android device to a PC using a USB cable and boot the PC. The PC will boot the selected image. If the image doesn't boot, check the PC's BIOS settings and make sure "Boot from USB" is set as the first boot device.
To stop hosting, just tap the DriveDroid icon in the Android notification area.
Your device must be rooted to use this app, so if it's not then this app isn't for you.
The process is quite simple. Start DriveDroid and press the "+" button and select "Download image" to get a list of available images. Select a distribution and then select the file you want. For the first time, I suggest trying Slitaz, since it is only about 35MB. Once it is downloaded, it will show up on DriveDroid's main screen.
To boot from an image, select it in DriveDroid, and select the host mode (e.g. Writable USB, etc). Then, connect the Android device to a PC using a USB cable and boot the PC. The PC will boot the selected image. If the image doesn't boot, check the PC's BIOS settings and make sure "Boot from USB" is set as the first boot device.
To stop hosting, just tap the DriveDroid icon in the Android notification area.
One requirement for the ISO images is that they must be in hybrid format. To check an ISO, type
DriveDroid makes it easy to try out new distributions. And with the right tools, your Android device can be an invaluable recovery tool.
fdisk -l file.isoIf no partition table is found, the ISO is not in hybrid format. One of my favorite tools, SystemRescueCd, isn't in this format. To make it work, all I had to do was download the ISO and run
isohybrid file.isoThis changes the file to the correct format and then it works with DriveDroid just fine.
DriveDroid makes it easy to try out new distributions. And with the right tools, your Android device can be an invaluable recovery tool.
Thursday, February 14, 2013
ADB Shows Device Offline after Android 4.2.2 Update
If you have upgraded to Android 4.2.2 and you can no longer connect to your device with ADB, the problem may be an outdated ADB executable on your PC. If ADB shows your device as "Offline", update your Android SDK to get the latest ADB and see if it helps. I ran into this problem with my Nexus 7. I know version 1.0.31 works. You can check the version with "adb version".
Android 4.2.2 introduces a "whitelist" for ADB connections. When you plug the device in to a PC, a screen opens on the device that gives you the option to allow or deny the ADB connection. If you have an old version of ADB, this screen doesn't appear and the device shows as "Offline" on the PC.
If ADB isn't the issue, then you can try the following:
Android 4.2.2 introduces a "whitelist" for ADB connections. When you plug the device in to a PC, a screen opens on the device that gives you the option to allow or deny the ADB connection. If you have an old version of ADB, this screen doesn't appear and the device shows as "Offline" on the PC.
If ADB isn't the issue, then you can try the following:
- Unplug the device and run "adb kill-server" on the PC and plug it back in. Or,
- Reboot the Android device. Or,
- Plug the device into a different USB port
Friday, January 11, 2013
My Nexus 7 (2012) and its Headphone Problem
I bought a Nexus 7 tablet a few weeks ago as my first tablet. I got the 32GB wifi-only model. So far I have been impressed. The speed, display, and battery life are great.
I did run into one problem though. The headphone jack didn't seem to work properly. When I inserted my headphones, I would either get sound out of the tablet speaker or only one of my headphone speakers. And it would switch between these two, kinda like a bad connection. I tried two different sets of headphones and both behaved the same. I was disappointed in my shiny new tablet.
Thankfully, the solution (for me, at least) was simple. It turns out that the headphone jack is a tight fit and I just had to push the headphones in a little harder until I heard it click. Problem solved!
I have heard of a lot of other people with this problem that were returning their Nexus 7s. Hopefully this will help someone and save them from having to return their Nexus 7.
I did run into one problem though. The headphone jack didn't seem to work properly. When I inserted my headphones, I would either get sound out of the tablet speaker or only one of my headphone speakers. And it would switch between these two, kinda like a bad connection. I tried two different sets of headphones and both behaved the same. I was disappointed in my shiny new tablet.
Thankfully, the solution (for me, at least) was simple. It turns out that the headphone jack is a tight fit and I just had to push the headphones in a little harder until I heard it click. Problem solved!
I have heard of a lot of other people with this problem that were returning their Nexus 7s. Hopefully this will help someone and save them from having to return their Nexus 7.
Thursday, October 18, 2012
Two ICS ROMS for the LG Vortex (and other Optimus One phones)
I came across the Quattrimus site which has both CM9 and AOKP Ice Cream Sandwich ROMs for the LG Vortex and other LG Optimus One phones. The ROMs are in the beta stage so there are a few issues. Most notably, the sensors don't work (e.g. screen does not auto rotate) and there is a low mic/speakerphone issue. Also, international data roaming must be enabled for data to work. These seem to be the same issues that affected the CM7 ROM. More information can be found in this thread.
I loaded both ROMs on my Vortex and used them for a couple of days. While I only tested for a short time, the performance and functionality of both ROMs was very good. If the sensor and mic issues get resolved, I will definitely keep one of these installed.
The developer is also working on a Jelly Bean ROM. I'm keeping my fingers crossed,
I loaded both ROMs on my Vortex and used them for a couple of days. While I only tested for a short time, the performance and functionality of both ROMs was very good. If the sensor and mic issues get resolved, I will definitely keep one of these installed.
The developer is also working on a Jelly Bean ROM. I'm keeping my fingers crossed,
Labels:
AOKP,
CM9,
Ice Cream Sandwich,
ICS,
lg,
Optimus One,
ROM,
vortex
Saturday, April 21, 2012
The Fabulous Arduino
If you like to tinker with electronics, you should definitely check out the Arduino website. It is an open source electronic prototyping system that is very easy to use. It is based on the Atmel ATmega microcontrollers.
I have been looking for something like this for a long time. I chose the Arduino Uno because of its low price and ease of programming (and favorable reviews). I picked up an Arduino Uno starter kit from Amazon for about the same price as just the Uno board at Radioshack. The starter kit includes the Arduino Uno R3 board, a USB cable, a small breadboard for prototyping, a tray for holding the Uno and the breadboard, and some hookup wires.
You can also get Arduino "shields", which are purpose-specific boards that plug into the Arduino. Some shield examples are for ethernet, wireless, and motor control. I haven't tried any of the shields yet.
The Arduino software is java-based and therefore cross-platform. It works well on my Linux machine. Just load up your program and click the Upload button. The program will automatically compile and upload to the Arduino, which will then run it.
Finally, here is my Arduino driving an LCD module. It only took a few minutes to modify an example program to get it to display what I wanted.
I have been looking for something like this for a long time. I chose the Arduino Uno because of its low price and ease of programming (and favorable reviews). I picked up an Arduino Uno starter kit from Amazon for about the same price as just the Uno board at Radioshack. The starter kit includes the Arduino Uno R3 board, a USB cable, a small breadboard for prototyping, a tray for holding the Uno and the breadboard, and some hookup wires.
You can also get Arduino "shields", which are purpose-specific boards that plug into the Arduino. Some shield examples are for ethernet, wireless, and motor control. I haven't tried any of the shields yet.
The Arduino software is java-based and therefore cross-platform. It works well on my Linux machine. Just load up your program and click the Upload button. The program will automatically compile and upload to the Arduino, which will then run it.
Finally, here is my Arduino driving an LCD module. It only took a few minutes to modify an example program to get it to display what I wanted.
I encourage anyone looking for this sort of thing to give the Arduino a try. Happy tinkering!
Sunday, February 5, 2012
Finally! CyanogenMod on the LG Vortex!
After waiting patiently for many months, I finally came across a CyanogenMod port for my LG Vortex. Over at Android Forums, bobZhome has released a CyanogenMod 7 ROM for the Vortex. There are some issues with the 12/2 release (the latest at the time I wrote this) so I recommend following the instructions in this post and installing the 11/9 release along with the listed fixes. There are a couple of things to note about the 11/9 release. First, the screen animations must be disabled in the CyanogenMod settings. Otherwise the unlock screen will be black. Also, you must enable international roaming to get data to work. So far it hasn't caused any extra charges to show up on my bill.
I have been running it for several weeks now and I am very happy with it. I am using the smartass governor, bfq scheduler, and have it overclocked to 768MHz. The kernel can be overclocked to 864MHz but my phone can't handle it. Note that using the GINM kernel requires a 3rd party app to set the governor, scheduler, and clock speed, such as Voltage Control or SetCPU.
Everything is smooth and fast and battery life is great. I have seen a couple of seemingly random reboots, but I suspect overclocking is partly responsible.
So head on over to Android Forums and grab this fantastic ROM. Of course, do a nandroid backup first and don't blame me if you brick your phone.
I have been running it for several weeks now and I am very happy with it. I am using the smartass governor, bfq scheduler, and have it overclocked to 768MHz. The kernel can be overclocked to 864MHz but my phone can't handle it. Note that using the GINM kernel requires a 3rd party app to set the governor, scheduler, and clock speed, such as Voltage Control or SetCPU.
Everything is smooth and fast and battery life is great. I have seen a couple of seemingly random reboots, but I suspect overclocking is partly responsible.
So head on over to Android Forums and grab this fantastic ROM. Of course, do a nandroid backup first and don't blame me if you brick your phone.
Friday, December 16, 2011
Some Interesting Android build.prop Parameters
The /system/build.prop file on Android devices contains parameters that control various functions and information on the device. Here are some that are of interest. Note: to make changes to this file, your phone must be rooted.
Increase the VM heap size, probably not a good idea on low end phones with limited memory:
dalvik.vm.heapsize=48m
Draw the UI using the GPU instead of the CPU
debug.sf.hw=1
Decrease dial out delay
ro.telephony.call_ring.delay=0
Increase scrolling responsiveness
windowsmgr.max_events_per_sec=180
Increase scan time for wifi APs (saves battery)
wifi.supplicant_scan_interval=120
Save battery
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
Disable debugging icon on statusbar
persist.adb.notify=0
Disable boot animation for faster boot
debug.sf.nobootanimation=1
Force launcher into memory
ro.HOME_APP_ADJ=1
Prefix "3g" on lock screen
ro.ril.enable.3g.prefix=1
Some of these didn't work on my LG Vortex or had no noticeable effect. Specifically,
dalvik.vm.heapsize=48m (I have limited RAM so I didn't try it)
ro.telephony.call_ring.delay=0 (I had no need to try this one either)
ro.ril.enable.3g.prefix=1
If the parameters are not in the build.prop file, just add them. You must reboot the device for the changes to take effect.
Increase the VM heap size, probably not a good idea on low end phones with limited memory:
dalvik.vm.heapsize=48m
Draw the UI using the GPU instead of the CPU
debug.sf.hw=1
Decrease dial out delay
ro.telephony.call_ring.delay=0
Increase scrolling responsiveness
windowsmgr.max_events_per_sec=180
Increase scan time for wifi APs (saves battery)
wifi.supplicant_scan_interval=120
Save battery
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
Disable debugging icon on statusbar
persist.adb.notify=0
Disable boot animation for faster boot
debug.sf.nobootanimation=1
Force launcher into memory
ro.HOME_APP_ADJ=1
Prefix "3g" on lock screen
ro.ril.enable.3g.prefix=1
Some of these didn't work on my LG Vortex or had no noticeable effect. Specifically,
dalvik.vm.heapsize=48m (I have limited RAM so I didn't try it)
ro.telephony.call_ring.delay=0 (I had no need to try this one either)
ro.ril.enable.3g.prefix=1
If the parameters are not in the build.prop file, just add them. You must reboot the device for the changes to take effect.
Thursday, November 3, 2011
Playing Encrypted DVDs in Ubuntu
By default, Ubuntu doesn't install the necessary software to play encrypted DVDs for legal reasons. In order to play them, install the following software:
You might also need the following if they are not already installed:
After this, run:
Enjoy your DVDs!!
sudo apt-get install libdvdnav4 libdvdread4
You might also need the following if they are not already installed:
sudo apt-get install gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly
After this, run:
sudo /usr/share/doc/libdvdread4/install-css.sh
Enjoy your DVDs!!
Monday, October 17, 2011
Making Tab Completion Case Insensitive in Bash
When using the bash command line, I prefer to be able to type "cd dow" and then hit Tab and have bash fill in Downloads. By default, in order to access Downloads, I would have to type an uppercase "D" ("cd Dow") and hit Tab. Luckily, this is very easy to change.
Simply type the following at the prompt:
set completion-ignore-case on
To make it permanent, add the line to either /etc/inputrc or $HOME/.inputrc. The next time you log in this will be set automatically.
Simply type the following at the prompt:
set completion-ignore-case on
To make it permanent, add the line to either /etc/inputrc or $HOME/.inputrc. The next time you log in this will be set automatically.
Wednesday, October 5, 2011
My Top 10 Android Utilities
I thought I would share some of my favorite Android utilities. All are available in the Market and all are free or have a free version. Here goes.
1. Zeam Launcher - Free: A lightweight launcher replacement with scrolling application bar. Double tapping the screen provides a quick way to select a screen.
2. ES File Explorer - Free: A fantastic file explorer. It can work with SMB shares, FTP servers, and Dropbox.
3. Dropbox - Free: Sync your files with Dropbox and use this app to access them wherever you are. Sign up using this link and get yourself (and me) an extra 250MB for free: http://db.tt/kH58cVw
4. Advanced Task Killer - Free w/ ads: Use this to end battery draining programs that run in the background. Also has an ignore list that won't kill apps you select.
5. Sparse RSS Reader - Free: Simple and lightweight RSS reader without all of the bloat.
6. OS Monitor - Free: Check CPU usage, memory usage, network connections, log files, etc.
7. KeePassDroid - Free: Access your passwords on the go. Keep it synced with Dropbox and your passwords will always be up to date. Unfortunately, it is read only for .kdbx (2.x) databases.
8. ZDBox - Free: Monitor battery usage, data usage, task killer, app lock, uninstaller, and cache cleaner.
9. Miren Browser - Free: Fast web browser to replace the default browser. Includes tabbed browsing, flash support and bookmark management.
10. Speedtest - Free w/ ads: Who doesn't like to check their connection speed occasionally?
1. Zeam Launcher - Free: A lightweight launcher replacement with scrolling application bar. Double tapping the screen provides a quick way to select a screen.
2. ES File Explorer - Free: A fantastic file explorer. It can work with SMB shares, FTP servers, and Dropbox.
3. Dropbox - Free: Sync your files with Dropbox and use this app to access them wherever you are. Sign up using this link and get yourself (and me) an extra 250MB for free: http://db.tt/kH58cVw
4. Advanced Task Killer - Free w/ ads: Use this to end battery draining programs that run in the background. Also has an ignore list that won't kill apps you select.
5. Sparse RSS Reader - Free: Simple and lightweight RSS reader without all of the bloat.
6. OS Monitor - Free: Check CPU usage, memory usage, network connections, log files, etc.
7. KeePassDroid - Free: Access your passwords on the go. Keep it synced with Dropbox and your passwords will always be up to date. Unfortunately, it is read only for .kdbx (2.x) databases.
8. ZDBox - Free: Monitor battery usage, data usage, task killer, app lock, uninstaller, and cache cleaner.
9. Miren Browser - Free: Fast web browser to replace the default browser. Includes tabbed browsing, flash support and bookmark management.
10. Speedtest - Free w/ ads: Who doesn't like to check their connection speed occasionally?
Subscribe to:
Posts (Atom)






























