Sunday, April 06, 2014

Android Debug Bridge (ADB) LS & pull commands to list files on Android device

Find base info here: http://developer.android.com/tools/help/adb.html

This is presuming you've already got visibility of your device using the adb (Android Debug Bridge).

ls command

Usage examples:

C:\Users\Toby>adb ls /data/data/mobi.tobyrichards.mylists/files
000041f9 00001000 533c5ce6 .
000041e9 00001000 531e0fce ..
000081b0 00000190 53243c60 listdata.dat
000081b0 00000216 531cc5fb List 1.dat
000081b0 00000193 53243c40 Zach.dat
00008180 00000000 53276e97 testinputdata.dat
00008180 000001bc 53410ded test.dat

pull command

Usage example for all files in a folder.

Files will be in d:\remli in the example below.

C:\Users\trichards>adb pull /data/data/mobi.tobyrichards.mylists/files/ d:\remli

pull: building file list...
pull: /data/data/mobi.tobyrichards.mylists/files/List 3.dat -> d:\remli/List 3.dat
pull: /data/data/mobi.tobyrichards.mylists/files/List 2.dat -> d:\remli/List 2.dat
pull: /data/data/mobi.tobyrichards.mylists/files/List 1.dat -> d:\remli/List 1.dat
pull: /data/data/mobi.tobyrichards.mylists/files/listdata.dat -> d:\remli/listdata.dat

4 files pulled. 0 files skipped.

8 KB/s (1172 bytes in 0.139s)

push command

Usage example for all files in a folder.

C:\Users\trichards>adb push d:\remli /data/data/mobi.tobyrichards.mylists/files/

push: d:\remli/listdata.dat -> /data/data/mobi.tobyrichards.mylists/files/listdata.dat
push: d:\remli/List 3.dat -> /data/data/mobi.tobyrichards.mylists/files/List 3.dat
push: d:\remli/List 2.dat -> /data/data/mobi.tobyrichards.mylists/files/List 2.dat
push: d:\remli/List 1.dat -> /data/data/mobi.tobyrichards.mylists/files/List 1.dat
4 files pushed. 0 files skipped.
23 KB/s (1172 bytes in 0.049s)


Tuesday, February 17, 2009

Getting 'The Settlers 6: Rise of an Empire' to work on Windows 7 (Tages problem)

  1. Install Settlers 6 from the game DVD
  2. Install the Patch The Settlers: Rise of an Empire v1.6 link
  3. Settlers will not run due to the Tages driver being incompatible.
  4. Download and install this Tages driver from here (choose 32 or 64 bit) link
  5. Make sure the game DVD is NOT in the drive
  6. Start Settlers 6, it will ask if you want to activate.
  7. Activate the game with your key from your manual.
  8. Setters 6 should now work fine! (You might not even need the DVD in the drive to play)

Wednesday, February 11, 2009

.NET How to merge FileInfo arrays with Linq

using System;

using System.IO;

using System.Linq;

 

[assembly: CLSCompliant(true)]

namespace SuperFastSearch

{

    internal class FileSearch : IFileSearch

    {

        #region IFileSearch Members

 

        public string _Path { get; set; }

        public string _SearchPattern { get; set; }

        public bool _Recursive { get; set; }

 

        public FileInfo[] Search()

        {

            //List lSearchResults = new List();

            FileInfo[] fiResults = null;

            DirectoryInfo[] diResults = null;

 

            SearchOption so = new SearchOption();

 

            if (_Recursive)

            {

                so = SearchOption.AllDirectories;

            }

            else

            {

                so = SearchOption.TopDirectoryOnly;

            }

 

            //check that the class variables have been set up

            if (string.IsNullOrEmpty(_Path) || string.IsNullOrEmpty(_SearchPattern))

            {

                //do not perform the search as the nessescary params have not been supplied

            }

            else

            {

                //perform the search

                DirectoryInfo di = new DirectoryInfo(_Path);

 

                //check if we are searching the 'root' directory

                if (_Path.Length == 3)

                {

                    //_Path is like "C:\" or 'root'

                    //build a list of the root directories to use later when collating file info

                    diResults = di.GetDirectories(_SearchPattern, SearchOption.TopDirectoryOnly);

                   

                    //create a temp array for use in the loop below

                    FileInfo[] tempFi = null;

                   

                    foreach (DirectoryInfo dirInfo in diResults)

                    {

                        //ignore the system volume information directory as we

                        //will get an UnauthorizsedAccessException if we try

                        if (dirInfo.Name != ("System Volume Information"))

                        {

                            tempFi = dirInfo.GetFiles(_SearchPattern, so);

 

                            //check if we have some files before adding them to the array

                            if (tempFi.Length > 0)

                            {

                                if (fiResults != null)

                                {

                                    fiResults = fiResults.Concat(tempFi).ToArray();

                                }

                                else

                                {

                                    fiResults = tempFi;

                                }

                            }

                        }

                    }

 

                }

                else

                {

                    fiResults = di.GetFiles(_SearchPattern, so);

                }

            }

 

            return fiResults;

        }

 

        #endregion

    }

}

 

Friday, April 13, 2007

Corey Myers Drums 13 Years old

If you're not impressed by this dude then there's something wring with you.

Thursday, April 12, 2007

Thin Lizzy

i grew up on this stuff and I love it. I'm going to see Rush in October and i am looking forward to that. :-)

Thin Lizzy 1983 Part 2

Thin Lizzy 1983 Part 1

Sunday, January 14, 2007

Avon Gorge Cliff Face

Charity Abseil down Avon Gorge




I feel the need to prove that I actually did the abseil today so here are a few pictures to show any non believers....

The first picture is so you can see the clothes I'm wearing.

The second, if you look hard enough you'll find a little blue dot with a white helmet about 1/3 of the way down the cliff face.

The third, so you can see I've acutally moved!

To tell you the truth, I enjoyed it and would do it again. I only enjoyed it though because I never looked down once.

I'll see if I can dig out some more photo's.