LG G2x Update Stuck At 4%

I have  a rooted LG G2x phone.  Strangely, the update was stuck at %4.  I tried it a bunch of times and it continually was blocked at that point.  I thought I would read of more people having the problem.  What got me by was doing the following:

  • Shutdown the phone.
  • Rebooted holding down the VOLUME DOWN and POWER.
  • Release the power when you see the LG logo.
    • Note: This puts up a screen that says S/W Upgrade, Please wait while upgrading.
  • Then plug in the USB and waited for WIN7 to load the drivers.
  • Clicked restart on the Phone Updater
  • Done!

Hopefully this helps someone else out there!

Enjoy Android 2.3.3!

 

Branch is Currently Checked Out

We are running Gerrit and on our server we were trying to delete the ‘master’ branch since we no longer use it as the main stream.  In fact, we don’t want people pushing to it so we decided to delete it.  Then we got the following:

To ssh://git:29418/MyRepo
! [remote rejected] master (branch is currently checked out)
error: failed to push some refs to ‘ssh://git:29418/MyRepo’

The branch is currently checked out!?  It doesn’t sound like a gerrit failure.  Must be Git.

Thinking through, it’s a bare repository – how could the branch be checked out.  Then I logged onto the machine and did ‘git branch’:

* master
otherBranch

Sure enough the master is set as the HEAD.

This means we need to update HEAD to another branch.  Running the following command is necessary:

git symbolic-ref HEAD refs/heads/otherBranch

Now we look after running ‘git branch’

master
* otherBranch

Perfect!  The symbolic-ref command successfully updated the bare repo to be looking at another branch as it’s HEAD!

Hope that helps someone.

Posted in GIT

SharePoint Connect to DB

I am using the lite sharepoint version 2008 and the trickiest thing for me was figuring out how to connect to the database.  Figured out that Windows Sharepoint Services (WSS) 3.0 ship with SQL Server 2005 Embedded Edition. Now called the Windows Internal Database.

Steps for connecting to the internal SSEE database:

  • Open us Microsoft SQL Server Management Studio 2008
  • Server Name:   \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
  • Use Windows Authentication

 

More information can be found here.

Hiding Table of Contents on MediaWiki

Adding the following code into your wiki page to toggle the TOC links so that they are collapsed by default.  This is useful if you have a large page and thus a large TOC table.  Obviously you can turn off the TOC links but I find it sometimes useful to skim down the list, so having it collapsed makes it available but not expanded.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<php>
// Hiding the Table of Contents menu since MediaWiki does not provide a way to do it.
?>

<script type="text/javascript">function hideToc() {

var toc = document.getElementById('toc').getElementsByTagName('ul')[0];
var toggleLink = document.getElementById('togglelink');
changeText(toggleLink, tocShowText); toc.style.display = 'none'; } </script>

<script type="text/javascript">hideToc();</script>

<?php
</php>

fatal: C:\Program Files\Git/libexec/git-core/git-pull cannot be used without a working tree.

You might also see: git-pull cannot be used without a working tree

When executing a pull you see something like this:

1
fatal: C:\Program Files\Git/libexec/git-core/git-pull cannot be used without a working tree.

To Fix:

Check under:

1
\.git\config

Under the [CORE]

1
2
3
4
5
6
7
8
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
autocrlf = false
worktree = &lt;&lt;&lt;&lt;&lt;&lt; DELETE THIS LINE!!

Change GIT Editor

By default the git commands that require an editor would use ‘vi’, but if you can add an entry into your global git config to change the editor to Notepad++. To change to some other editor such as Notepad++ or Textpad you can add these lines to the global git config.  For example:

[core]
   editor = '/C/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin

OR

[core]
   editor = '/C/Program Files (x86)/TextPad 5/TextPad.exe' -m

Either edit the global config manually or you can run this git command

git config --global core.editor '/D/ProgramFiles/Notepad++/notepad++.exe -multiInst -notabbar -nosession -noPlugin'

NOTE: If your editor path contains spaces you could have trouble running the above git command. Recommend to just edit the global config directly in that case to ensure the editor gets added correctly.

Ubuntu Upgrade 8.10 to 10.04 – Brain Dump

Update Ubuntu from 8.10 to 10.04

Had IT clone the production VM to have test VM for trying the Ubuntu upgrade. Had trouble getting cloned VM connected to the network.

Upgrade 8.10 to 9.04

Instructions from EOLUpgrades and EOLUpgrades Intrepid pages.

*Be sure to have all the 8.10 updates before upgrading

sudo apt-get update
sudo apt-get upgrade
  • From version 6.06 and up you will need to install the update-manager and update-manager-core packages.
sudo aptitude install update-manager-core update-manager
  • Also make sure that the update manager is correctly configured to upgrade any release:
sudo perl -pi -e 's/^Prompt=.*/Prompt=normal/' /etc/update-manager/release-upgrades
  • Kernel update
sudo aptitude install linux-image-virtual linux-headers-virtual
  • Update the package list and upgrade all the installed packages
sudo aptitude update && sudo aptitude safe-upgrade
  • Perform the release upgrade.
sudo do-release-upgrade

As upgrade runs…

  • Important note for NIS/YP users â
      â                                                                                          â
      â To use MySQL, the following entries for users and groups should be added to the system:  â
      â                                                                                          â
      â  /etc/passwd   : mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false                  â
      â  /etc/group    : mysql:x:101:                                                            â
      â                                                                                          â
      â                                                                                          â
      â You should also check the permissions and the owner of the /var/lib/mysql directory:     â
      â                                                                                          â
      â  /var/lib/mysql: drwxr-xr-x   mysql    mysql                                             â

When the upgrade runs it will prompt that certain files have changed. Accept the new version and manually make changes to it :

  • /etc/security/limits.conf
-* soft nofile 5536
-* hard nofile 5536
-
-
-#cainteg                 hard    nofile         5000
  • /etc/exports
  â --- /etc/exports 2010-12-30 14:09:04.000000000 -0600                                   â
  â +++ /usr/share/nfs-kernel-server/conffiles/etc.exports 2008-12-04 16:43:12.000000000   â
  â -0600                                                                                  â
  â @@ -2,11 +2,9 @@                                                                       â
  â  # to NFS clients. See exports(5).                                                     â
  â  #                                                                                     â
  â  # Example for NFSv2 and NFSv3:                                                        â
  â -# /srv/homes hostname1(rw,sync) hostname2(ro,sync)                                    â
  â +# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)  â
  â  #                                                                                     â
  â  # Example for NFSv4:                                                                  â
  â -# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt)                                        â
  â -# /srv/nfs4/homes gss/krb5i(rw,sync)                                                  â
  â +# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)                       â
  â +# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)                                 â
  â  #                                                                                     â
  â -/mnt/disk1 *(rw,sync,no_root_squash)                                                  â
  â -/srv/git *(rw,sync,no_root_squash)
  • /etc/apache2/ports.conf
--- /etc/apache2/ports.conf     2009-03-16 16:59:14.000000000 -0500
+++ /etc/apache2/ports.conf.dpkg-new    2010-08-16 12:44:05.000000000 -0500
@@ -1,11 +1,12 @@
 # If you just change the port or add more ports here, you will likely also
 # have to change the VirtualHost statement in
 # /etc/apache2/sites-enabled/000-default
+# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
+# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
+# README.Debian.gz 

 NameVirtualHost *:80
 Listen 80
-Listen 10200
-Listen 3000
  • /etc/apache2/sites-available/default
  • Prompt about phpmyadmin. Auto configure db? said ‘OK’
  • /etc/phppgadmin/apache.conf
--- /etc/phppgadmin/apache.conf 2009-03-13 08:46:40.000000000 -0500
+++ /etc/phppgadmin/apache.conf.dpkg-new        2009-02-09 08:23:37.000000000 -0600
@@ -10,12 +10,11 @@
order deny,allow
deny from all
allow from 127.0.0.0/255.0.0.0 ::1/128
-allow from all
+# allow from all

<IfModule mod_php5.c>
  php_flag magic_quotes_gpc Off
  php_flag track_vars On
-  php_flag register_globals On
  php_value include_path .
</IfModule>
  • Remove obsolete packages?
2 packages are going to be removed.
Continue [yN]  Details [d]d
Continue [yN]  Details [d]y

After upgrade completes…

  • When the upgrade completes it will prompt that a restart is required. After the restart, run lsb_release -a to check the new version of Ubuntu.
lsb_release -a
  • Cleanup to have more disk space
sudo apt-get clean
  • Take a snapshot, then upgrade from 9.04 to 9.10
sudo shutdown now

Upgrade 9.04 to 9.10

Instructions from EOLUpgrades Jaunty page.

  • sources.list should have jaunty in it
vi /etc/apt/sources.list
  • Update the package list and upgrade all the installed packages
sudo aptitude update && sudo aptitude safe-upgrade
  • Perform the release upgrade.
sudo do-release-upgrade

As Upgrade Runs

  • SSH
If you continue, a additional ssh daemon will be started at port '9004'.
Do you want to continue?
Continue [yN] y
  • Prompted :
  ââââââââââââââââââââââââââââââââ⤠Configuring mysql-server-5.1 ââââââââââââââââââââââââââââââââââ
   â                                                                                               â
   â Important note for NIS/YP users                                                               â
   â                                                                                               â
   â Using MySQL under NIS/YP requires a mysql user account to be added on the local system with:  â
   â                                                                                               â
   â  adduser --system --group --home /var/lib/mysql mysql                                         â
   â                                                                                               â
   â                                                                                               â
   â You should also check the permissions and ownership of the /var/lib/mysql directory:          â
   â                                                                                               â
   â  /var/lib/mysql: drwxr-xr-x   mysql    mysql                                                  â
   â                                                                                               â
   â                                            <Ok>                                               â
   â                                                                                               â
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
  • Override local changes to /etc/pam.d/common-*?
sudo cp /etc/pam.d/common-* .
  • libpam-runtime files modified. Made copies and accepted new versions – may need to diff those to find what changes we need to copy/paste back in.
  • Prompted
  âââââââââââââââââââââââââââââââââ⤠Configuring postgresql-common âââââââââââââââââââââââââââââââââââ
  â                                                                                                  â
  â Obsolete major version 8.3                                                                       â
  â                                                                                                  â
  â The PostgreSQL version 8.3 is obsolete, but the server or client packages are still installed.   â
  â Please install the latest packages (postgresql-8.4 and postgresql-client-8.4) and upgrade the    â
  â existing  clusters with pg_upgradecluster (see manpage).                                         â
  â                                                                                                  â
  â Please be aware that the installation of postgresql-8.4 will automatically create a default      â
  â cluster 8.4/main. If you want to upgrade the 8.3/main cluster, you need to remove the already    â
  â existing 8.4 cluster (pg_dropcluster --stop 8.4 main, see manpage for details).                  â
  â                                                                                                  â
  â The old server and client packages are no longer supported. After the existing clusters are      â
  â upgraded, the postgresql-8.3 and postgresql-client-8.3 packages should be removed.               â
  â                                                                                                  â
  â Please see /usr/share/doc/postgresql-common/README.Debian.gz for details.                        â
  â                                                                                                  â
  â                                              <Ok>                                                â
  â                                                                                                  â
  ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
  • /etc/apache2/apache2.conf changed – loglevel to warn instead of info, changed logging format. Kept new version.

After upgrade completes…

  • When the upgrade completes it will prompt that a restart is required. After the restart, run lsb_release -a to check the new version of Ubuntu.
lsb_release -a
  • Cleanup to have more disk space
sudo apt-get clean
  • Take a snapshot, then upgrade from 9.10 to 10.04
sudo shutdown now

Upgrade from 9.10 to 10.04

Instructions from Lucid page.

  • Install update-manager-core if it is not already installed:
sudo apt-get install update-manager-core
  • edit /etc/update-manager/release-upgrades and set Prompt=normal (was already normal)
  • Launch the upgrade tool:
sudo do-release-upgrade
  • Follow the on-screen instructions.

As Upgrade Runs…

  • /etc/dbconfig – accepted new version
  • /etc/auto.master
              â -# $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $                         â
              â -#                                                                                â
              â  # Sample auto.master file                                                        â
              â  # This is an automounter map and it has the following format                     â
              â  # key [ -mount-options-separated-by-comma ] location                             â
              â  # For details of the format look at autofs(5).                                   â
              â -#/misc /etc/auto.misc --timeout=60                                               â
              â -#/smb /etc/auto.smb                                                              â
              â +#                                                                                â
              â  #/misc /etc/auto.misc                                                            â
              â -/net /etc/auto.net                                                               â
              â +#                                                                                â
              â +# NOTE: mounts done from a hosts map will be mounted with the                    â
              â +# "nosuid" and "nodev" options unless the "suid" and "dev"                       â
              â +# options are explicitly given.                                                  â
              â +#                                                                                â
              â +#/net -hosts                                                                     â
              â +#                                                                                â
              â +# Include central master map if it can be found using                            â
              â +# nsswitch sources.                                                              â
              â +#                                                                                â
              â +# Note that if there are entries for /net or /misc (as                           â
              â +# above) in the included master map any keys that are the                        â
              â +# same will not be seen as the first read key seen takes                         â
              â +# precedence.                                                                    â
              â +#                                                                                â
              â ++auto.master
  • /etc/gitweb.conf
--- /etc/gitweb.conf    2009-11-23 09:23:40.000000000 -0600
+++ /etc/gitweb.conf.dpkg-new   2010-12-17 18:57:49.000000000 -0600
@@ -1,16 +1,11 @@
-#Ryan's added
-$my_uri = "http://ah-git/gitweb";
-$site_name = "ah-git/gitweb";
-$project_list_description_width = 40;
-
 # path to git projects (<project>.git)
-$projectroot = "/srv/git";
+$projectroot = "/var/cache/git";

 # directory to use for temp files
 $git_temp = "/tmp";

 # target of the home link on top of all pages
-$home_link = $my_uri || "/";
+#$home_link = $my_uri || "/";

 # html text to include at home page
 $home_text = "indextext.html";
@@ -19,10 +14,10 @@
 $projects_list = $projectroot;

 # stylesheet to use
-$stylesheet = "gitweb.css";
+$stylesheet = "/gitweb/gitweb.css";

 # logo to use
-$logo = "/git-logo.png";
+$logo = "/gitweb/git-logo.png";

 # the 'favicon'
-$favicon = "/git-favicon.png";
+$favicon = "/gitweb/git-favicon.png";
  • RPM db cleaned up – chose OK
 ââââââââââââââââââââââââââââââââââââââââââââââ⤠Configuring rpm âââââââââââââââââââââââââââââââââââââââââââââââ
 â                                                                                                             â
 â Package information database for rpm cleaned up                                                             â
 â                                                                                                             â
 â The database which rpm keeps about installed packages is not usable with the new version.                   â
 â                                                                                                             â
 â The old database has been moved to /var/backups. Please read /usr/share/doc/rpm/README.Debian for details.  â

After upgrade completes…

  • When the upgrade completes it will prompt that a restart is required. After the restart, run lsb_release -a to check the new version of Ubuntu.
lsb_release -a
  • Cleanup to have more disk space
sudo apt-get clean
  • Take a snapshot

Using Beyond Compare in QGIT

You can configure these tools to do diffs using Beyond Compare (or some other favorite diff tool)

  • Open QGIT
    • Either – right-click on a folder in the repo and select “Git GUI Here”
    • Or – launch QGIT.exe and choose the repo folder
  • Go to Edit->Settings…->General tab->External diff tool. You cannot have spaces in the path, so you’ll need to enter it manually in a format like:
1
2
"C:\PROGRA~2\BEYOND~1\BC2.exe" //c:/Program Files(x86)/Beyond Compare/BC2.exe - Windows 7
"C:\PROGRA~1\BEYOND~1\BC2.exe" //c:/Program Files/Beyond Compare/BC2.exe - older Windows

Microsoft SQL Server Express & WSS_Content

I had setup a SharePoint site about two years ago.  It been so easy to manage.  Every once in a while I will need to fix a thing or two.  That’s been about it, until now!  I should mention that managing this sharepoint server is not really part of my job and thus I end up putting very little time against managing it on a regular basis.  For my particular installation, I had WSS 3.0 and SSEE installed with all the defaults.

The only reason I looked at it this time was another web server on the box stopped working.  Come to find out, I was running out of hard drive space on that box.  Looking a little bit closer and became quickly aware that the issues was in the WSS_Content_log.  I am not as familiar with SQL server as I am Oracle, Postgres or MySQL.  The issue was obvious.  It wasn’t until doing some quick google searches that I came to realize that SQL was storing every transaction in this file so that you could go back to any point in time if there were db issues.

First things first, I need to connect to the db using SQL Server Management Studio.  It was strange because I could easily connect to <machine>\MICROSOFT##SSEE but the SharePoint database didn’t exist there.  I was so confused and eventually I talked to a SharePoint expert in our company. He gave me the following to log into the SharePoint database instance:

1
\\.\pipe\MSSQL$MICROSOFT##SSEE\SQL\query

Truncate and Shrink

Next thing I needed to do was update figure out how to truncate and shrink the WSS_Content_log file since it has become out of control.

  • Open Microsoft SQL Server Management Studio. Expand Databases. Right click on the WSS_Content database, go to PropertiesOptions, and change Recovery model: to Simple. Click OK.
  • This will truncate the log file. We must do this step first before we can shrink the file.

1
BACKUP LOG WSS_Content WITH TRUNCATE_ONLY

  • Confirm the name of the log file that you will be shrinking

1
SELECT * FROM sys.sysfiles

  • Shrink the log file

1
DBCC SHRINKFILE(WSS_Content_log, 1)
1
DBCC SHRINKFILE(&lt;NAME OF LOG FILE&gt;, 1)

That took my 16gig log file back down to a reasonable size.  Remember that doing this process will mean that you cannot revert your database to any point in time.  You either need to do backups on your own.  In my case, doing regular backups of the database is sufficient and that is what I have outlined above.

 

 

 

LG G2x Phone

I entered the world of smart phones yesterday. Took the plunge and bought a slightly used Android LG G2x. Why used? I wanted the option of being able to switch cell phone providers when my contract is up with TMO. I bought it off CraigsList a little weary about whether it would completely work or not. I also wanted to make sure to check the phone for the recent bad batch of G2x phones now emerging with screen problems. I ended up getting the phone and checked it over. Made sure to factory reset the device.

After restarting I found out that the wireless was not working! Umm… now what!?! I opened the browser and went to a bunch of sites.  Nothing worked!  Crap… it’s hardware.  Then I randomly went to my router (192.168.1.1). Strange, it worked! What the!?! So wireless works going to a direct IP address but not to google.com. Now it’s time to google (using my computer this time 🙂 and I came across this solution on this thread which had an answer for me:

  1. Factory Reset
  2. Skip initial setup
  3. Turn on airplane mode (hold down Power button for 3 sec)
  4. Turn on Wifi
  5. Setup Google Account/Market
  6. Shutdown phone/Reboot ( Don’t know if you need this)

Bingo!  Phone working great ever since!

UPDATE:  That didn’t work completely.  The problem came back.  I ended up removing the “My Account” problem and now it actually has been working all week!  Finally… now just to wait for the Android 2.3.3 Ginger update!

—–

This phone as a great 8mp camera and wanted to compare it against my Exilim.

Let’s compare the pictures:

G2x (Left) and the Exilim (Right)

Interesting.  This is a zoomed up picture on both the G2x and the Exilim.  The 7.2 mp Exilim point and shoot does better at brightness. This is just my first pic on the G2x so there may be some settings that could be tweaked to clean the picture up as well.  Notice though that you can almost read the words with the G2x whereas not so much with the Exilim.

Now onto rooting the phone 🙂  Maybe I can remove some of this TMO pre-installed apps.  They locked it down so you can’t uninstall without super user access.