The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,856 other followers

Archive for January 10th, 2017

Ever wanted to download adb or fastboot without having to download the whole of Android Studio?

Posted by jpluimers on 2017/01/10

Quotes from [WayBack] Ever wanted to download adb or fastboot without having to download the whole of Android Studio?…but didn’t want to download executables from some‚Ķ – Elliott Hughes – Google+


These links will always return the adb/fastboot binaries currently shipping with Android Studio. No need to guess what the current version is, or update your own links: just follow these and get the latest binaries, direct from the source.


A package manager is overkill. `wget -O ¬† – && unzip -d ~/bin/ && export PATH=”$PATH;~/bin/platform tools”` should let you call `adb devices` and you can add the export to your .bashrc if you want it always available without changing into ~/bin/platform tools.
+Elliott Hughes Any chance we can get something to tell us when it is updated? I know you probably don’t care about bandwitdh, but would be nice to know when updates are pushed.

+dragon788 dragon_788 Or, you can install adb & fastboot from the repo’s then run this script every once in awhile to stay up to date:

unzip \
sudo cp platform-tools/adb /usr/bin/adb
sudo cp platform-tools/fastboot /usr/bin/fastboot


via: [WayBack] finally.gif… РKoushik Dutta (Koush) РGoogle+

Posted in Android, Development, Mobile Development, Software Development | Leave a Comment »

Batch file to get a (non-sorted non-unique) list of units from a Delphi compiled map file

Posted by jpluimers on 2017/01/10

A few weeks ago in¬†When you get ‚ÄúTfsScript.Execute‚ÄĚ throwing a ‚ÄúUnregistered version of FastScript.‚Ä̬†I wrote about “a process that explains any modules in the MAP file not resulting in DCU files”.

The below batch file aids in that process.

It takes a MAP file from your Delphi compiled executable that has debug information in text format which means you need to set your project linker options to generate detailed MAP files.

The Map Debug File (*.map) – RAD Studio¬†documentation hasn’t much information but points to¬†Detailed-Segments Map File – RAD Studio¬†which has a bit more. Neither contain information on Delphi units as they focus too much on the C++ side of things. Then there is a tiny bit information in¬†Understanding Delphi MAP File – Stack Overflow.

So I did some spelunking and came up with this batch-file which will likely work back until about the Delphi 7 era:

Read the rest of this entry »

Posted in Delphi, Delphi 10 Seattle, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 1 Comment »

whatismylocalip alias (actually more like whataremylocalips) and some sed links

Posted by jpluimers on 2017/01/10

Getting the local IP (actually IPs, but most hosts only have a single IP):

# OS X:
alias whatismylocalip='ifconfig | sed -En '\''s/;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'\'''
# Linux:
alias whatismylocalip='ip a | sed -En '\''s/;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'\'''

I got them via bash РHow to I get the primary IP address of the local machine on Linux and OS X? РStack Overflow

Mac OS X and BSD have ifconfig, but most Linux distributions don’t use ifconfig any more¬†in favour of iproute2, so you use ip a (which is shorthand for ip address show) there.

Their output is similar enough for the sed to work, though. Which surprised be because I didn’t know about the -E option (it lacks in the manual Linux page but it is in the Mac OS X one) which enables POSIX extended regular expressions. In Linux this is documented as -r, but -E also works.

I learned this through the Sed РAn Introduction and Tutorial which compares the various versions of sed which also explains about the -n doing no printing.


Posted in *nix, *nix-tools, Apple, bash, bash, Development, Linux, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, openSuSE, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User, Scripting, Software Development, SuSE Linux, Tumbleweed | Leave a Comment »

%d bloggers like this: