so many operating systems, so little time

Sometimes you need to do many things with the same hardware. Say, for example, you might need both Windows 10 and a Linux-type of operating system on the same computer. Here are some of your options for this.

You might say, “why would I want that?” There are times when you want to try out something new. You might need to test software compatibility with something you don’t have currently. You might purchase some new software or a printer which isn’t compatible with your current setup. Or, like me, you might be endlessly curious about the possibilities. You might want to create a smartphone app and need to see how that looks on a variety of phones.

Boot from a “Live” media

In this case, you have Ubuntu on a CD or on a USB thumb drive. You boot to this media and select the live option from the menu (“Try Ubuntu without installing”). You then get a Desktop experience running Ubuntu (Linux) on your existing hardware and you don’t even have to install it in the classical sense. Once you shutdown this system and remove the media, nothing whatsoever has changed on your original hard drive.

TryUbuntu

I’ve used both methods (CD and USB) and will attest that the latter will boot up faster than anything you’ve seen before, I’d guess.

Pros:

  • It’s very fast to boot this way from the USB drive.
  • You can try another operating system without making any changes whatsoever to your existing computer.
  • It makes short work of hacking a Windows-based computer if you don’t know the password(s) and accessing the files on its partitions.
  • It seems to be wonderfully compatible with a variety of computers and laptops without fussing with drivers.
  • Each session takes advantage of all the available RAM.

Cons:

  • Unless you change the defaults, any changes to your Desktop and configuration are lost upon restarting this session.

Set up two partitions and select one upon startup

In this case, you shrink the size of your existing hard drive’s partition to make room for another operating system.  You then install the new operating system to this second partition.

Upon restarting the computer, you then select which partition (operating system) you’d prefer.

GRUB

This technique is often called “dual booting”.

Pros:

  • The settings you change will be saved from one session to the next.
  • In many cases, you can access files on the other partition(s) if you know where to look.
  • You can take advantage of fast hardware like that on an Apple computer to use other operating systems like Linux.
  • Technically, you could install Windows 7 on one partition and Windows 10 on another.
  • This technique can be extended to many operating systems on many partitions.
  • Each session gets all the available RAM.

Cons:

  • You have to reboot in order to get back to the other operating system to use its tools and software.
  • In the case of OS X, major version upgrades usually try to overwrite the menu at the beginning which would normally allow you to select the other partitions. It’s almost as if Apple doesn’t want you to do this and breaks things on purpose, of course. If you’re technically-minded, you can fix this each time however.

Set up a virtual manager (VM) and “spin up” an operating system

This seems to be the preferred and newest method these days. You run a virtual machine manager, create a virtual computer using this technique and then install the new operating system to this.

QEMU

You then boot up the virtual computer and you see this as a window on your Desktop.

XP

Pros:

  • You can copy/paste from a Windows application into a Linux session’s Terminal session or any similar combination of from/to.
  • For demonstrations, you can easily show that something works with multiple operating systems (without rebooting or bringing multiple laptops).
  • Depending upon how much hard drive space, RAM and processor speed you have, you could potentially run several virtual machines at once.

Cons:

  • Technically, it’s the most challenging of the various options and the learning curve is steep.
  • It may require more RAM memory than what you currently have for this to run well.

Progress so far

I have plenty of experience using the first two methods above (live- and dual-boot) but have recently been working with the VM option, as described below.

Dual-boot MacBook

I’ve setup my MacBook Pro to boot both OS X and Ubuntu. It seems to work great so far. I hope to next setup a VM so that I can emulate a Raspberry Pi computer within the MacBook itself (for development purposes).

HP Laptop

I’ve setup my HP laptop to boot Ubuntu and have added a VM which has Windows 10 loaded in it. Remarkably, the Windows 10 install actually works better than the original (native) installation on this laptop.

Multi-boot Raspberry Pi computers (IoT re-purposing)

Since the Raspberry Pi (3 and Zero) computers have an easily-replaceable microSD card in them, I now have a small library of different images with which I may boot any individual computer. It’s just important to label each to avoid confusion.

So I might pull the microSD card for the robotic tank project out of a Raspberry Pi, replace it with the card for the closed ecosystem or for a different project altogether. Once it boots, it’s now a completely different computer, if you will.

microSD

Multi-boot 3D printer

Technically, the Robo C2 printer has a Raspberry Pi computer inside so it makes it easy to boot to different versions of the software. This is useful when you’re modifying things to add on new features, for example.

Smartphone software on a workstation

I’ve also had the opportunity of installing Android on a standard Dell Vostro 200 desktop computer. (It’s good for testing software and websites.)

Cloud-based alternatives

There are entire services available at Microsoft, Amazon and presumably Google in which you “spin up” a virtual computer and remote into it.

Amazon’s offering is called EC2 and I’ve had the opportunity to use it in the past. In the span of two hours, I was able to spin up or “instantiate” a virtual SQL Server in a datacenter somewhere, to upload a corrupt database, fix it there and then to download it back to me. I then killed that virtual server. The total cost was something like $4 to “borrow” their virtual hardware for a couple of hours. Compare this to the cost of purchasing an actual server, paying for Microsoft licensing, waiting for everything to arrive, setting it up, etc. I literally saved thousands of dollars with a service like this.

Microsoft’s offering is called Azure. I can’t say that I’ve used it yet but it works essentially in the same way that EC2 does: define an instance, spin it up and remote into it.

Looks like Google’s offering is their Compute Engine. It sounds like they’re trying to play “catch up” to both Amazon/Microsoft on this one.

There’s another player in this space, MacInCloud.com appears to be offering remote sessions into what are likely discreet/physical Apple computers. For all practical purposes, it would likely behave like a virtual computer might.

Private cloud

And finally, I had the opportunity to re-purpose about eight Dell Vostro 200 computers from work into a MaaS (metal as a service) private cloud. The underlying layer of software which did the cloud part is called OpenStack which allows you—like Amazon itself perhaps—to be the host for spinning up virtual servers.

It takes a lot of work to get the initial one or two computers running for this. But then, using a concept called Juju charms, you select what are essentially recipes of things to install which have complicated inter-dependencies and it seems to make it all work for you. Seeing these things run is pretty impressive given that this is in the free, open-space world.

The future

It’s hard to guess what’s next in this series of events. We may soon be running a VM with Windows 10 on a wearable single-board computer like the Raspberry Pi 3 or similar. In theory, then, you might wear a pair of Google Glass(es) or the Microsoft HoloLens which would interface with the Pi computer via Bluetooth. Given the lack of a keyboard, presumably the interface might be like the Amazon Echo/Alexa service: you ask for something, the system must recognize the command, submit it to a server and display the results or iterate through them via voice.

And yet, given the augmented reality (AR) side of things, you might say “keyboard” and a virtual reality keyboard could appear on the physical horizontal space in front of you and you just “type” on an imaginary keyboard to input data.

The interfaces could evolve to project these virtual keyboard-type interfaces onto an imaginary glass wall in front of you, much the same as you see in sci-fi movies these days. These glass-like devices probably would incorporate an outward-facing camera to catch and interpret your hand movements into discreet commands like typing, page-forward, scroll-down, dismiss window, etc.

GoogleGlassHololens

Advertisements

the rise and fall of the microsoft empire

1975-1980

Our historical timeline begins in 1975 when an unlikely duo—Paul Allen as Batman and Bill Gates as his awkward “Boy Wonder”—started Microsoft Corporation.  I’m guessing that ro-sham-bo was involved in this decision but incredibly somehow Bill was made the CEO when the company got its start.  Maybe dropping out of Harvard gives you that kind of confidence.

1981BillPaul

1981-2000

Nothing really significant happened until they managed to modify an existing operating system for the IBM PC in 1981 from another company and rename this to MS-DOS. Significant sales of the IBM series of computers and those of their competitors then launched a thirty-year stretch of dominance in the business world in the area of operating systems, software and development platforms.

For most of us, we reasonably dismissed Apple’s hardware and the MacIntosh operating systems as nothing we could seriously use in business outside of the marketing department.

Consumers bought new versions of software and that license was good for life.  It could often be transferred from one computer to the next as long as the last one was de-registered first.  If you built software for Windows, you likely used a Microsoft compiler to do so and you paid for that.  In fact, the Microsoft Technet collection of CDs was quite expensive.

2001

About six years into the “Internet Tidal Wave” as Bill would call it, Microsoft was starting to lose its way.  They tried to dominate in the browser wars but never quite managed to quash the competition.  Others saw their efforts in this area as annoying.  Their software for creating programs, Visual Studio, first hit the scene about four years prior to this.

Google was founded some five years prior and was just beginning to get attention from an investor before they had anything real yet.  In 1999 they moved from their garage to an actual building in Palo Alto.  Yahoo’s popularity as a search engine from a decade ago was waning.  Google’s ad-based revenue from keywords was paying off; they’d planted a money tree which eventually created an entire forest of money trees for them.  It wouldn’t be long until Microsoft’s executives behind closed doors would consider Google their biggest threat.

About this time Apple created a very clever method of provisioning content for one-and-only-one device within the music-delivery space.  The iTunes store would turn out to be the goose that laid the golden egg, as seen in the following revenues.  And yet, it would take years for either Microsoft or Google to realize the beauty in this fulfillment model and to come up with their own versions.

showmethemoney

The “Internet of Things” concept started gaining in popularity at this time.

2009

Microsoft’s attempts at copying Google’s success (MSN Search, Windows Live Search, Live Search) now culminated in the introduction of Bing as their default search engine destination for all things Microsoft.

Apple introduced the first iPhone and the first iPad about this time, noting that the same provisioning model from iTunes was incorporated into both via iOS.  The subscription model of sofware licensing was born with this, if you think about it.  If you wanted to write a program for either, you needed to use Apple’s software to do so.

Google has just introduced Chrome as a browser and would begin their campaign to slowly break Internet Explorer.  The same was true of the Android phone and its related operating system.  It would take a few years for Microsoft to catch up to either the iPhone or the Android before releasing their own app-savvy smartphone offering.

Amazon some three years prior had introduced the beginning of what would be a full complement of cloud-based services to support web development.  It would take Microsoft two full years to realize that they needed to be in this space and they didn’t have their offering ready for a few years more, too late to effectively compete.

Github.com had just celebrated their first year online, hosting over 46,000 repositories by then.  The world of open source was the very antonym to the way that software had been developed prior to this.

The free Ubuntu operating system was released about four years prior to this, backed by the well-funded company Canonical.

2015

Microsoft releases Windows 10, “the last version of Windows” (they claimed).  Rumors suggested that Windows would eventually go from a version-based license model to an annual-subscription model with respect to pricing.  I think it’s safe to say that the market hasn’t really embraced either Windows 8 or Windows 10.

The subscription-based model for Office 365 was introduced four years prior to this so the writing was definitely on the wall:  Microsoft wanted to depart from their former methods of making money and to chase the monthly subscription model.

2015-popular-coding-languages

The world of open source was offering new programmers a wealth of free code.  All they had to do was to take it and make it their own.  Formerly, Microsoft-friendly coding languages like C, C++, C#, VB and .NET dominated the playing field but this graphic shows how the game had changed.

2017

And here we are, present-day.  That curious number 42 now describes the number of years that Microsoft has been around.

Yesterday evening, I attended a very geeky meetup of perhaps fifty or sixty coders and only saw one Windows-based laptop.  Almost everyone had a MacBook of some kind.

I just spent about two hours today installing the free Visual Studio Community 2017 software so that I could—in theory, anyway—alter a free copy of the source code for TightVNC software.  Out of the box, so-to-speak, Visual Studio doesn’t want me to build this project since it uses an earlier target platform (Windows 7 or 8, one would assume).

Microsoft only wants me to make things for Windows 10.

So rather than making it easy for me to build a program that will happily work with Windows 7, they’re forcing me to jump through hoops in order to add the necessary pieces for this to happen.

Add two more hours to this and I find that my installation does not want to download the earlier pieces to allow this to happen.  I’m forced to then upgrade the code to Windows 10 compatibility mode… only to find that the build fails with 528 errors.

The main crux of all these errors appear to be:  “we can’t find common files”.  It’s a very amateur sort of error from a company that’s been providing compilers for several decades now.

I have to think that Microsoft doesn’t want me to do anything with Visual Studio unless it benefits Microsoft.  And this is the core of the reason why I suggest that they’re doomed.

Every time a coder like myself runs into obstacles like these, the usual seed that’s planted inside their head is “this would be easier with another free compiler or another language from someone else”.

2022

Fast-forward another five years and Microsoft will have lost ground on many fronts.  New software development here, there and everywhere will be via some language which wasn’t popularized by Microsoft on computers which aren’t Windows and with browsers which aren’t Internet Explorer or Edge.  Our toasters and refrigerators and our cars will be powered by the Ubuntu operating system or perhaps Debian, a similar free Linux flavor.  These appliances will be connected to our wi-fi and even to the Internet but there won’t be a scrap of anything Microsoft about them.  They’ll be coded up with something that isn’t C#, doesn’t use .NET and doesn’t need Visual Studio in order to compile it.

The only thing with a Microsoft pedigree with some staying power could be some of the websites and services currently served up at Microsoft’s datacenters via Azure.  But Amazon or Google could kill that by simply lowering their own prices for cloud-based services.

the sophistication of phishers

Phishing is an activity where you try to con someone out of their private information (like credentials) and these people are too darn clever. I just got a perfect rendition of Apple’s classic email notification that my Apple ID had been used on a Windows 10 computer with Chrome over an IP address in Israel and that my account is now locked. It’s enough to make you panic and click the link they provided.

The Psychology of Fear

Of course, fear is a prime motivator. “ONOZ! I’ve been hacked!” No, actually. Someone just has your email, which you could have seen from the “Undisclosed Recipients” distribution list.

And yet, it was enough to make me go to a different computer, visit Apple’s website and confirm that my Apple ID wasn’t locked out and it’s only being used on my own devices.

Apple’s Lack of Customer Support

For a company that makes as much money each year as Microsoft, Oracle, Google and Adobe combined, you’d think that there would be room in the budget to support their customers.

showmethemoney

In fact, I just spent many moments trying to let Apple know of the sophistication of this phishing attempt, to identify the culprit(s), their website(s), email address(es), etc. No dice. Apple’s doing such a good job of blocking customer requests that I decided that the best way to get the information out there was to blog it. Pretty sad, really.

windows 10 from vm on ubuntu

If you’ve been reading my blog for any time whatsoever, you know that I have been irritated with Microsoft lately. I purchased a new HP laptop with Windows 8, upgraded it immediately to 8.1 Pro and then took advantage of the free upgrade to Windows 10 Pro.

Things seem to work out okay for a bit. I must admit my frustration at Microsoft for trying to be just like Apple. The Microsoft Store mentality, the logging in via Internet-based credentials rather than local credentials, the inability to innovate rather than to just copy. It’s a little sad, actually. There was a time when Microsoft led the industry and now they can’t make a move unless they’re mimicking something that Apple’s already done.

And yet, Microsoft is still the leader in business applications for the moment.

Ubuntu 16.04 LTS

After some ugly automated update that left my laptop is a non-working status, I decided after three months of this that I needed something else. I reformatted the hard drive completely and installed the free operating system Ubuntu Desktop. It’s nearly bullet-proof at this point. There is a manageable glitch regarding the ethernet adapter after a Restart but I’ve got a work-around. (And I’ve installed it on many other computers without this issue—it seems to be related to the wi-fi adapter only.)

Virtual Machine Manager

I was playing around with its features today and remembered that it includes a working VM solution. You can create a virtual machine, spin it up and run it from Ubuntu. I wondered if I could then run Windows 10 Pro again in a VM session on this same laptop.

WindowsOnUbuntu

Windows 10 Pro in a Virtual Machine

Why yes I can. (As in “been there, done that”.) The actual download of the ISO image of Windows 10 took more time than the actual installation itself. Here’s the overview of that install.

  1. Download an ISO image for Windows 10 and indicate your language choice
  2. In Ubuntu, select the Search item and look for Virtual Machine, selecting Virtual Machine Manager
  3. Create a new virtual machine, selecting the ISO file from the first step
  4. Give it at least 20248 RAM and at least 16GB hard drive space (I initially selected 3072 and 80 for these)
  5. Go with the defaults and give your VM a name, I chose Win10Pro for this
  6. Watch it go through the standard Windows 10 Pro installation and at the Product Key entry screen choose the option to do that later
  7. It will quickly run through the installation (much faster than it normally would or so it would seem)

Activating It On-the-Cheap

I followed the prompts afterwards to see what Microsoft wanted to charge on their Store for a legitimate Product Key. Microsoft wanted $199.99 for this.

So I searched on Google for anything less than this and wasn’t disappointed. eCrater just sold me the same thing for $10. They provided the Product Key, I entered it in and it’s now activated without any hassle.

Oddities

Since this is one of my first forays into VM on Ubuntu, I’ll note a couple of strange things which I saw.

  • Choosing the full-screen option seems to select a more squarish/middle part of the laptop’s screen rather than using its entirety.  I will likely have to research this or just ignore it.
  • Once in full-screen mode it’s not apparent how one gets out of that and back to Ubuntu.  It looks like pressing Ctl-Alt may bring down an upper menu. I’ve also heard that Ctl-Alt-F seems to toggle the cursor out of the VM window’s control. I was ultimately able to toggle from full-screen AND be able to move the cursor from its window, (a major breakthrough).

That said, I was able to finish up a session running Windows 10 Pro and then within that window, shut it down as you might normally do. The Virtual Machine Manager then informed me that this VM was down.  It’s possible then to alter the VM’s device settings, say, to change the available amount of RAM.

And the next time I need Windows, I can just spin up the virtual machine image again. I’m thinking that this is better than multi-booting, as I’ve done in the past. (I’m looking at my dual-boot MacBook with Ubuntu on it.)

Believe It Or Not…

The original Windows 10 Pro networking bug isn’t seen in this Windows-on-Ubuntu setup. It actually works… better?

I guess I’ll need to use it more to find out but it somehow seems faster than I remember. How is that even possible? Before, the native-mode Windows 10 Pro had access to all 6MB of RAM and now, it has only 3MB. Granted, I haven’t tried to run several programs at once on it and I haven’t installed Office 365, for example. We’ll see. I’ll keep an eye on it and let you know.

iphone without itunes

You know how Apple can be sometimes; they feel the need to control everything. So for a Windows-based computer, they want to force you to install the entire iTunes collection of software just so that you can get to your files on your iPhone. As an I.T. person, to me that’s just way too much software to be adding to someone’s computer setup.

Why not?

You might just ask “why not?”  Why not just install iTunes? One of the subtle changes that iTunes makes in terraforming your Microsoft computer for its own needs is to install a variety of software to make things more Apple-friendly.

For example, in an Apple-based network the Bonjour service allows lookups for printers normally but allows for almost any device to broadcast its existence on your network. The downside to adding a different printer lookup service is that you might have a number of printers already which broadcast via Bonjour and can now be seen by your computer this way.  And yet, you might not have a working Microsoft driver installed to make all this happy. The printer when added simply doesn’t work and yet it seems to work for everyone else on the network who didn’t install iTunes. Rule of thumb for success: don’t arbitrarily add services and things unless you exactly know the ramifications for doing so.

Rule of thumb for success: don’t arbitrarily add services and things unless you exactly know the ramifications for doing so.

The problem

If you simply plug in your iPhone into a Windows 7—based workstation you’ll see it download and install a default driver. Unfortunately, the Internal Storage section of this device won’t show anything in it.

iphone-no-driver-yet

The fix

Unbelievably, the fix is much easier than I’d imagined. Immediately upon tethering the iPhone the very first time to the Windows computer the iPhone will buzz twice (telling you not that it’s now charging but it’s trying to tell you that it’s displaying a notification).  The message is crucial to your success but Apple in its infinite wisdom doesn’t decide to wake the phone up for you.  You need to manually wake it up first to see it:

allowthisdevice

Select the Allow option here and suddenly Explorer will now present you with a DCIM folder, below this a 100APPLE folder which contains your images.

iphone-after-allow

Why is this considered a smartphone?

That’s a good question to ask. Why would Apple decide to block access to the phone on a Windows computer by burying its head in the sand when an important access message is being hidden behind a sleep state? I suppose they could suggest that if the phone is sleeping then the rightful owner may not be in control of it and that nobody should have access as a result.

But why not simply bubble that information up to Explorer with a dialog box so that the user will know the status? It just silently doesn’t see anything at all for the device.

If you read the many support threads on the Apple site nobody ever mentions such an easy solution. The reason of course is that Apple wants you to install all of their software on your Windows-based computer, too. The biggest reason is that the iTunes application is a shopping cart and you’re a consumer to them.

does that make me a pi baker?

I discovered an awesome tool for cloning micro-SD cards like those used in the Raspberry Pi 3 computers for the project I’m working on.  It’s called ApplePi-Baker and it’s doing a fantastic job of speeding up that process.  Too bad it doesn’t work on operating systems other than OS X.

I’m guessing that it’s using the underlying/poorly-documented drive devices on the Apple like /dev/rdisk1 rather than /dev/disk1 (subtle, I know), but it’s blazingly fast by comparison and it seems to work.  And when I say “work” I mean:  you don’t have to go research all the many ways of using the dd command, for example.

Note that you’ll want a few available gigabytes on the destination drive you’re backing up to.  But the program has several compression options.  For example, backing up a 16GB image to a ZIP file only needed about 3.5GB when finished so it’s good when your space is limited.

It’s a little scary at first since it boldly asks for your Admin password as it gets started, as combined with the fact that it isn’t digitally-signed with an authorized Apple Developer key.  That said, you should be able to trust it since it does what it says it does and nothing else.  Note that after you download it, you can’t immediately run it.  You’ll need to open Finder, go to Downloads and then Ctrl-click it and choose Open the first time, then click the Open button.  Having done this once, you may then drag it to your Applications folder and then run it normally after that.

ubuntu core on the raspberry pi 3

The fun just never stops here as I begin with a new operating system on a second microSD for my newly-purchased Raspberry Pi 3. This time, it’s Ubuntu Core. This operating system from Ubuntu appears to be a big departure from the Ubuntu server or desktop versions I’m used to. In case you were wondering, I managed to install the new operating system with little trouble. It’s different, though, I’ll be the first to admit it.

Goodbye apt-get, hello snap…

Gone is the usual apt or apt-get interface for fetching code. It’s been replaced completely by snap. Honestly, apt has been the mainstay command for managing Ubuntu (and Linux) for a while now so this is quite the departure from the norm. Snap, in theory, will be a cross-Linux way of deploying code. From my initial research, it appears to be a lot like the Juju Charms for deploying services on a Metal-as-a-Service (MaaS) system. Like Charms, Snaps appear to have an up-stream and down-stream component to them, providers and consumers, if you will.

On the positive side of things, a Snap that you create would work on many different systems. In this way, it works a bit like Java or .net (somewhere, there’s an interpretive layer for the particular hardware but you don’t have to worry about that). Presumably, you mostly just worry about the interface you’re providing and the packaging requirements to create a Snap for submission to the store.

Since Snaps get digitally signed this makes them more like the Apple iTunes store metaphor that Microsoft, Google and everyone else seems to be going with these days. Digitally signing your programs both lowers the risk of rogue/evil code out there but it also puts a middleman into your money stream—someone like Apple will be there to charge the publisher a fee for making money on the store and for signing your developer’s certificate each year. At the moment, Canonical (the maker of Ubuntu) doesn’t charge for a Single-Sign On account but maybe if this becomes popular they will in the future.

Honestly, the entire concept of Snaps appears to be a watered-down clone of Apple’s iTunes distribution model.

Fee Structure for their Store

Not that this information is easily available, I managed to finally find it. From this page on Canonical’s website:

4. Pricing, fees and payment

  1. If you elect to distribute an App without charge, the payment terms of this Agreement will not apply with respect to the free App.

  2. If you set a price for your App we will collect fees from end users that purchase your App at the price you set. Within 30 days of the end of each calendar quarter, we will provide you with a report of the number of copies of each of your Apps sold and the amount of any payment due, which shall be the fee multiplied by the number of copies sold less any applicable taxes and our commission. Our commission is 20% of the total fees charged for the sale of your App, less any applicable taxes.

So they’re charging 20% commission for brokering your Snap. Compare this to Google’s flat 30% commission, Apple’s flat 30% commission plus $100/year developer license and Microsoft’s 30% commission plus $49/year developer license. Note that there are precious few Snaps available. Specifically, only one Snap has a price of $1 at this time and the remaining 547 are free. So until others are charging for their Snaps, don’t expect to make a dime selling yours, in other words. In a free world, nobody will open their wallet nor expect to.

The Future of Snaps

It’s difficult to say whether this entire concept will get traction. Linux has been the free alternative. The people who run Ubuntu, for example, like that aspect about the community. Will these people easily change their stripes and embrace a payment system in the future in which we pay for code? Remember, we’re talking about people who’d rather build from source instead of paying for a binary file. My gut tells me that they’re never going to go for it.

Should I Invest Time in Developing Snaps?

As a developer, having a variety of experience looks good on your résumé so yes, by all means, develop a Snap. And since we developers often communicate our value via our github page I’d suggest that these Snaps be free and open-source if possible.

digital inflation

I spent most of the morning retiring an old Compaq Presario server; it’s perhaps fifteen years old. It was in with some things in storage and I thought I’d get rid of it since the hardware wasn’t even compatible with an Ubuntu server install attempt.

Less Was More

I realize in going through the motions of archiving all my many coding projects from years ago just how much bloat we’ve taken into our computers and our computer languages these days. I think the laptop I’m on right now has 8GB of RAM and this NT 4.0 Server only had 384MB of RAM, running instances of IIS, SQL Server, NT Server, WINS, DNS Server as well as a VSS server. It also hosted QuickBooks Pro 99, Adobe Photoshop 5.0 LE and Visual Studio. Come to think of it, it also easily ran my own NT services, custom-made IIS ISAPI filters and custom SQL Server extended stored procedures that I’d written. It had Microsoft Office, Adobe Acrobat and Illustrator, Flash-development tools by Macromedia.

It ran all this on 384MB of memory.  And those fifteen prolific years’ worth of accumulated everything only resulted in about 4GB of storage, perhaps the equivalent of a mere three movies on my laptop now. I almost have to laugh as I store it on a terabyte external drive.

Digital Inflation

graph

Seriously, though, what have we gained by making everything so heavy? I recall being able to accomplish anything I needed to do in that older version of Adobe Photoshop and using a fraction of that 384MB of memory. Just now, it took Adobe Photoshop CC about five minutes to load up so that I could paste this graphic in and start to work on it. I select the Spot Healing tool and begin clicking.  One, two, three… and then I wait as the tool freezes up and I have to wait for the spinning cursor to resolve itself. I then Step Backward to remove the garbage that the tool added and try to repeat, only this time slower. This sucks. I know that older version from over ten years ago didn’t do this.

So now, every day we get faster and faster microprocessors with multiple cores. But that Windows 10 upgrade from this year demanded that we have no less than 4GB of RAM just to install it. Why?

The answer is that we’re under a form of inflation that’s taken over the digital world. The same resources we had last year just aren’t good enough.

Back in this post I suggested that open source projects are suffering from this bloat, too. Big companies like Google believe that programs have to be big to be good. I disagree. Sometimes quality and project size are in direct opposition with each other. The more code you have, the more code that could be potentially bad.

Who Do We Blame?

Is it the microprocessor manufacturers who are behind this? I don’t think so. How about the operating system makers like Microsoft and Apple? Probably. I do know that .Net is a huge, bloated layer of code that’s supposed to be Microsoft’s version of Java. But the reason for both Java and .Net is to write machine-independent code. And since nobody really writes .Net code to run on an Apple computer or on a Unix box then what’s the point?

And now that .Net has seen its heyday Microsoft is ready to do the “new, new thing” which is to chase Apple’s app-based iTunes-delivered store. So we as consumers picked up this thick layer of code in the form of .Net which honestly does little for us. And yet most of the software written for a Windows-based computer has to use this foundation. No wonder it takes so much to do so little.

I’d like to blame Adobe’s bloat on all the code which is designed to permission their new subscription-based model. Try to buy Adobe Acrobat now and you’re left with the choice of paying $500 or something like $20-per-month. Neither option is worth it, in my humble opinion. Much of that startup lag I mentioned before could be the client app talking to mothership Adobe to see if my licensing this month is paid.

Predictions

Honestly, the pendulum has to swing back the other way. Consumers will reject subscription-based pricing models, will turn in greater numbers to open source operating systems and desktop tools and eventually the big players will come back with their apologies and revised ideas about how to win back their former customers.

In earlier times you couldn’t expect an average computer person to use a command line interface. But younger computer users are trained in public school and they’re not so timid. Strangely enough, Microsoft is turning to a similar mechanism to do advanced things in their software using PowerShell commands. And there is even an option to install their server software without a GUI environment at all… like a UNIX server, if you think about it.

The original IBM PC didn’t have a Windows interface since that didn’t come until many years later. The very popular (free) Ubuntu server software now does the same. You’d be surprised how much work the computer can do when it’s not unnecessarily displaying graphics.

I believe that we’ll eventually build simpler interfaces. The Windows 10 “Metro” menu and those of smartphones now are visually simpler if you think about it. They’re essentially flat squares that you can push with your finger rather than the fussy-little, 3D-styled buttons from twenty years ago in Windows 95.

Hardware like Google Glass may remove the need for such specialized interfaces. Since this hardware doesn’t include a keyboard your ability to interact with the interface is limited to pointing your head toward a spot on the screen and holding it until it’s selected. When they add voice commands to this interface we’ll see yet another revolution in how we expect software to behave. Hopefully we’ll get to the point where there are no more buttons to push—all commands would be accomplished verbally in your own language of choice.

Back to simpler interfaces, however, must we have all the visual candy? Could we not focus on the work to be done, the spoken commands to trigger that work and remove everything else but the text-based status? On today’s hardware we could do that now if we really wanted to. But since companies like Apple/Microsoft/Google want their store-like delivery model we’ll likely not get what we want unless we build it ourselves.

apple: hiding the truth

One business dictionary defines transparency as “a lack of hidden agendas or conditions, accompanied by the availability of full information required for collaboration, cooperation and collective decision-making”. Perhaps Apple could do well by re-reading that statement and the two emails that they sent me this week, in reverse order (since it’s funnier that way).

Screen Shot 2016-07-16 at 8.23.54 PMScreen Shot 2016-07-16 at 8.23.01 PM

My New (Used) iPhone 5

I’d recently purchased a used iPhone 5 from a co-worker. He’d indicated that it had a problem with phone calls and had decided to upgrade to the latest phone Apple makes. So he was left with the iPhone 5 and I offered to buy it from him on the cheap since I do phone development and I knew that I could put it to good use.

Fast-forward a few weeks and I decided that my Android-based phone was really churning through the battery at a fair rate (compared to the iPhone) and so I thought I’d get a cellphone plan switch. I paid a few months in advance without thinking twice about it only to find that later when I’d gotten home, the iPhone 5’s microphone and speakers all worked great except during a phone call. Obviously, the phone had a problem of some kind.

Apple’s Support Forum

Here is the Apple support thread, in case you wanted to read along. It looks like countless people are having the same problem with their phones, too. At first I read all these and realized that nobody really knew what was going on with their phones. Like me, they were stuck with a mostly-useless piece of hardware with respect to making or receiving calls.

I took it to the cellphone carrier vendor and left it with him for an hour or two. He reset the phone and upgraded the firmware or similar but was unable to help out.

Someone on youtube had indicated that they’d thoroughly cleaned the microphone and speaker holes so of course I gave this a try. It didn’t help, of course.

I verified that all three speakers and the microphone all worked with other apps. I deduced that there might be a connectivity issue.

Inside the iPhone

Given that I have the proper tools for such a task, I decided to take it apart. Apple uses a pair of tiny “Pentalobe security screws” (Apple’s nomenclature) to secure the case of the iPhone series. I guess they think that the market won’t just make the appropriate screwdrivers and sell them to the public.

Once inside, I re-seated the various connections that could have caused the problem. I then re-tested but the problem still persisted. On a hunch I decided to twist the phone along its length and this immediately allowed the phone portion to work!

The Underlying Cause

Everything inside a phone like this is necessarily tiny and modular. As such, Apple relies upon each module to make an electrical ground connection against the outside of the case. A little twist and that connection is lost.

Another compounding problem is the nature of batteries of the type used in cellphones. They are prone to swelling and contracting over time and with each charging cycle. Apple appears to know all about this. In fact, it’s as if they’ve compensated inside the phone by allowing a fair amount of expansion room for the battery itself. One could suggest that there’s too much space since the sparcity inside just promotes more flexibility and this leads to losing electrical ground in those components I spoke about earlier.

The Fix

It occurred to me that a 3″x5″ card could be cut to fit and placed inside the iPhone’s body and should tighten everything enough so that those electrical connections would be made. Luckily, this was exactly what it wanted.

Letting the Community Know

As a good net citizen I decided to let others know what they could do to fix their own failing iPhones. I posted on that same Apple Support thread only to see that they don’t want you to know this.

Took my iPhone’s rear case off (carefully) and removed/replaced the three connectors that attach the screen itself, verifying absolutely that they were fully re-seated.  Then when putting everything back together I inserted a 3″x5″ index card (cut first to a 2-1/8″x3-1/2″ rectangle and then trimmed a portion from both long sides so that the outer snaps would clear it).

The thickness of the card is enough to tighten up everything inside so that all the connections mate up always.  It now works perfectly.  I have to think that the problem is due to occasional twisting of the phone along its length.  Old computer motherboards had the same problem, btw.

What I should have added to this on the Apple Support forum (but I can say this now) is that it appears that there is a systemic problem in the iPhone series with respect to electrical grounding.

Apple’s Response

Apple promptly deleted my post, citing that it contained “questionable advice”. Note that Apple themselves provide no advice for these users.

The problem here is that a good percentage of these users have no recourse but to purchase a new iPhone 6 ($550-$650). Apple decided that it’s in their best interest to hide a working fix to their older phones.

What Apple Should Have Done

Apple should have read the post, researched whether or not there was any validity in the claim and then should have posted something on the order of, “We are researching the issue and caution users that to open their phone would be to void the warranty. If we determine that there is an electrical grounding problem and you have registered your phone with us then we will contact you for a service call”.

If they had done something like this then they would have earned all our respect. The choice they made, however, just proves that Apple—for all their friendliness in their advertisements—are just a big corporation who doesn’t believe in transparency with their customers.

hacking agar.io

In an earlier post I described an addictive game called Agar.io, an interactive eat-or-be-eaten game involving graphical dots. In this series of posts, I’ll be attempting to hack the game to see what I can get away with.

Agar-top

Define:  hacking

I suppose there are several ways of interpreting the term hack here. In the movies, some character will “hack the mainframe” or some other nonsense. And we’re also familiar with someone who attempts to use techniques to hack a website, perhaps injecting SQL code into an innocent-looking HTML form. Here, I refer to one of the original uses of the word, to hack away at a problem until it is solved. I’m interested in the game itself, how it talks to the server and I’d like to go to school on their efforts. As a coder of smartphones myself I’d call that part of the learning curve.

Goals

Ultimately, I would like to learn how the game works behind-the-scenes. I do have some secondary goals though. It would be interesting to see if it is in fact possible to edit an existing iOS app and have it still work and all without the original coder’s digital certificate. If successful, I think the first order of business would be to remove the ads you might see during game play. Another personal goal would be to allow multiple friends on iOS devices to play the FFA (free-for-all) mode of the game with each other; this could be made possible with a proxy server, I’d propose.

The platform

Currently, I play the Agar.io game on an iPad II since I prefer the interface over a browser-based version that’s available. So I will be attempting to hack the Apple store app ultimately.

This may turn out to be impossible since an app that runs on iOS is supposed to be digitally signed to prevent tampering. And yet this is what I intend to do, nonetheless. I’ll be testing that assertion to see if a hacked app will still work.

Concepts

Here, I’ll discuss some of the concepts of the approaches I’ll take.

  • Patching:  Patching is an old-school technique in which binary code, for example, is edited in place with a script. Individual characters or code is replaced in the original to create a new file. The patch program itself works together with another program called diff, used to calculate the differences between two files.
  • DNS:  This service is responsible for looking up a name like m.agar.io and replacing it with an IP address.
  • Redirection:  Using your own DNS server so that you can redirect requests to your own website instead of the intended one.
  • iOS app:  An iOS app might seem a little daunting if you’re not a coder. It’s actually a collection or manifest of files all rolled up into one .ipa file. I think it’s safe to say that the app was written in Apple’s Xcode using a computer language like Objective-C or Swift.
  • Ad-based add-ons:  It’s clear that Agar.io has many opportunities to display ads within the game itself. The programming interface to these (for the Agar.io developer) is almost always JavaScript-based.
  • Tethering:  Connecting a smartphone—or the iPad in this case—to a computer to allow for interaction (like development testing) to occur.

Throughout this series of posts keep in mind that if I’m indicating a command, it’s often being done on a MacBook with OS X 10.11.5 El Capitan at a shell prompt. Otherwise, I could be referring to something I’m doing on an iPad II with iOS 9.3.2 installed.

DNS server

I’ll be using the Dnsmasq easy-to-implement DNS server for redirecting Agar.io’s server requests to my own website. I’ll then configure my iPad to use this server first when doing DNS lookups.

Discovery website

And since I’m familiar with Node.js and Express I’ll be using this to mockup a website for those redirected app requests. When the iPad makes a request to what it thinks is the Agar.io website, I will see that request in my website’s logs.

This could be technically called a man-in-the-middle technique since I could then have my own website forward the request to Agar.io’s actual server and then answer the iPad with that response, adjusting it if I wanted to. I guess technically you could also call this a proxy approach.

Binary editor

I’ll likely also use Hex Fiend at least minimally to find the location within the main program app where I’ll be patching the code.

Installing a modified app

Normally, you would download an app directly to our iPad straight from the Apple iTunes store. Technically, I suppose, I could have taken advantage of the redirection concept from before to steer the iPad to my own website to deliver the edited content but it’s not that difficult. There appears to be a mechanism so that you can download iOS applications on an OS X computer and then, while tethered, install them remotely using iTunes. This actually allows us to use a MacBook in this case to snag the code package itself and to start all the fun. We’ll be taking advantage of this in order to then try to push a modified app package to the iPad.

If you’re on a standard OS X computer and you get the Agar.io app, it won’t seemingly do anything after the download; you’re not presented with the usual Open button after it has downloaded. It does, however, get silently copied to your hard drive under your user folder in /Users/username/Music/iTunes/iTunes Media/Mobile Applications. Having downloaded it, you should find a file called Agar.io 1.3.0.ipa which is the app (collection) itself.

Expanding the app

From here, you might not know that an .ipa file is little more than a .zip file. I’d suggest copying the Agar.io app file somewhere else (like creating a folder called AgarIO) and then open a shell so that you can decompress it.

MacBook:AgarIO$ unzip "Agar.io 1.3.0.ipa"

This command then will decompress the collection of files for you.

What’s inside the .ipa file

There are a lot of files inside this package, just like you’d find with most store apps. The first I’ll discuss is iTunesMetadata.plist which is perhaps the most aggravating of all. A .plist file is like a database for a coder, it usually stores configuration options. Opening it with TextEdit then shows me that this is the file responsible for knowing who downloaded it (myself) and how I’m then authorized to use it. I’m sure there’s a similar mechanism inside any music file you download from iTunes to prevent you from playing it on an unauthorized device. So in other words, I couldn’t just patch the Agar.io application and then make it available for download for others. Each person interested in this would need to go through the motions themselves.

Next, there is a META-INF folder which contains two files. I haven’t fully investigated them yet but the first is com.apple.FixedZipMetadata.bin which appears to again be a compressed collection of files. And the second is com.apple.ZipMetadata.plist. It appears to have some indication of how the actual program was zipped up into an .ipa file.

The final folder is Payload which includes what appears to be a single file, Agar.io. Or, is it a single file? Knowing what I do about making iOS apps, it’s actually another compressed file. In Finder, you’ll want to rename this Agar.io file to Agar.zip, for example. Back in your shell, then unzip it as you did before to expand its contents.

What’s inside the Payload file

So now we’re getting down to the actual programming itself. Everything we have seen up until now is just a wrapper so that iTunes and Apple can provision an app to you and just your device(s).

Surprisingly, there are a total of 1,111 .png graphic files inside. Most seem to represent the many skins that you’ll see in the game. There are 153 .plist files which are used to store anything from advertisement configuration information, to promotions, to language localization information and collections of available skins by category. With respect to my goals, I’m not really interested in these. And there is a single .db file for the Vundle advertising platform.

There is a folder called _CodeSignature which appears to include hashes of the collection of graphics, presumably to prevent them from being edited perhaps.

There are 65 .ccbi files which appear to be another form of .plist files. There are 15 .json files which appear to have different localized versions.

Finally, there is agar.io which is the actual program file itself. I’ll save the actual editing for a follow-up post to this one.

Status

That’s a good start so far. We’ve downloaded the Agar.io app and performed two decompression steps to get at the actual executable itself. Next, I think I’ll switch gears and build the discovery website and DNS server so that I can get at the app’s server interface.

Update

Skip to the final post in this six-part series if you’re looking for the code. Enjoy!