I Just Wanted Clean HDMI on a Note 10+ (Telephoto)

This week's obsession came when I decided I wanted to repurpose my recently repaired Samsung Galaxy Note S10+ as an overhead camera for the workbench. Its image sensors vastly outperform any ordinary webcam, including my $200 Razer Kio Pro. The distance from my homemade ceiling mount to the workbench tabletop makes the 2x optical zoom of the Note 10+ a perfect fit. But in all the years I owned this phone, I never realized that only the native Samsung Camera app allowed use of its telephoto lens. All other applications, free or paid, are only able to interface with the front-facing cameras, wide angle and standard 1x back lens.

Unlucky for me but fortunately for everyone with slightly newer models, Samsung finally introduced clean HDMI out with their native Samsung Camera app as part of the One UI 5.0 release. Note 10+ and lower are ineligible for the upgrade. My Note 10+ is currently running One UI 4.1 and Android OS 12 with kernel 4.14, all of which are pretty much end-of-life for the phone beyond security patches. Read Full Article

SAMSUNG Remote Test Lab: Test Android Apps on Real Devices for Free

For the past couple of months, I've been working on a much-delayed update to my Android application Scribblify.  The original Android version was released back in early 2013 and hadn't been updated on Google Play since then. Although it paled in comparison to the iOS counterpart, the first Android version still received positive reviews and was downloaded 200,000 times. Having released a major 4.0 update to the iOS version earlier this year, it was time to bring the Android version up-to-speed.

One of the greater challenges experienced with Android development occurs when it comes time to test. I previously wrote about the increasingly fragmented iOS platform, but even with a handful of different iOS devices sporting different resolutions and technical specs, nothing quite compares to Android device dispersion. In my updated Android app, for instance, I support all Android devices from API Level 15 (Android 4.0.3) up. According to Google Play, this makes the app compatible with 9,098 Google-certified devices. This list encompasses at least four years of devices including phones, tablets, phablets and more. Understandably, with such a large range of devices comes an equally large range of technical specs.

So, when it comes time to test an Android app, the more devices available to experiment with the merrier. It is particularly worth testing against the multitude of different device resolutions and DPI specifications to ensure that all assets scale appropriately, as well as testing against various OS versions to ensure nothing breaks. Google provides the Android Virtual Device (AVD) Manager, available through Eclipse, Android Studio and as a standalone tool. AVD Manager allows you to create custom-tailored virtual devices spanning the entire core spectrum of Android units, provided you've installed the necessary packages via SDK Manager.  However, Android emulation via AVD is traditionally sluggish and will not always behave as expected. There are also more dedicated and responsive Android emulators for testing including Bluestacks, which I wrote a tutorial about previously (other popular Android emulators include Andy, Xamarin, and YouWave).

Testing on Physical Devices using SAMSUNG Remote Test Lab

For more assured Android app testing than software emulation can reasonably provide, it is always favorable to test on physical devices where available. Basic Google-certified tablets with the latest Android OS can now be purchased for as little as $30-$75 at many retailers and work wonderfully for testing.  Even some of the more high-end phones and tablets can be affordable when bought used online at sites like eBay. As long as the device is Google-certified and supports Google Play, it is ripe for app testing.

Still, there is another avenue for development testing against an assortment of popular and new Android-powered products–without having to deplete your life's savings while amassing a mountain of test devices. Cloud-based device testing is a growing way to test your app on physical Android units around the world. Popular players in this field include Keynote by Dynatrace, Sauce Labs and Remote TestKit. These and other related services are generally subscription-based but offer free trial periods.

Sometimes though, as the saying goes, the best things in life are free. One free cloud-based testing service that I've grown to love is the SAMSUNG Remote Test Lab. This completely free service, provided by SAMSUNG, allows you to interface with a couple dozen different phones and tablets of diverse specifications.

Getting Started

To get started, you will need to register a free account in the SAMSUNG Developer Portal. After registering and verifying your email address, you can make your way over to the Remote Test Lab landing page. The testing application has a few minimal technical requirements including JavaScript, Java Web Start and a browser from this decade. If any of the configuration is missing the page will alert you.

From this page, you can browse through the various devices or narrow down the results by category using the tabs across the top.  Most of the test devices are available in multiple different OS versions,making them ideal for testing against OS changes that may affect particular features of an app. The range is substantial, from the now archaic 2.3.3 through 5.1.1 at the time of this writing. When you have arrived at an attractive device that you wish to test against, select the appropriate parameters from the drop-down lists (OS Version, Device List [Location], Reserve Time).

The free testing system works using Credits. Every day that you login to the SAMSUNG developer portal, you will receive 20 additional credits towards testing. These credits accrue so if you sign-in three different days you will accumulate 60 credits. Each credit is good for 15 minutes of physical device testing, and you have to commit to 30 minute minimum sessions (you can also cancel device reservations early to receive unused credits back). In any case you are not likely to run out of testing time too quickly, considering each day of logging in buys you another five hours of testing time.

When you are ready to launch the test device, just hit the Start button.

Running the Hardware Simulator

After starting a device simulator from the SAMSUNG Test Lab, a Java applet will launch. Depending on your browser and OS configuration, you may be prompted a couple of times to open and run the script (say Open / Yes / Run where appropriate). If you are currently not signed in you will still be able to do a 5-minute Pre-Test, which is a good idea to ensure the selected device is functional and usable on the simulator.

When the device first launches, hit OK after reviewing the terms and then choose the device's language (a great way to test translations, but it is generally not changeable until you start a new session). Basically, SAMSUNG asks that you clean up any of your test files and data from the device before exiting so that they do not get cluttered with test content or interfere with other users. The devices are not reset after each session so it is relatively common to find remnants of past testers when connected, including their own signed-in accounts at times.

From here out, you can interact with the device's screen using your mouse to simulate touch. Some devices may support alternative touch simulators such as the use of a stylus. In my test cases, I did come across a couple devices that would not respond to mouse control due to various causes including a prior tester changing the unlock method (another reason why trying them without being signed-in first is a fine idea).

Uploading and Installing your App

The SAMSUNG simulator software uses right-click context menus to configure its setup and manage applications.

  • Right-click on the device's screen to adjust screen properties including device orientation, and to capture screenshots and video.
  • Right-click on the device's frame (chrome) to access test-related controls including app management and logs.

To easily upload, install and run your app to the device, do as follows:

  1. Right-click on the device's frame (i.e., on the SAMSUNG logo in the screenshot above).
  2. From the context menu, select Manage > Application to load the Application Manager.
  3. From the Application Manager view, click New and then double-click on your desired APK to upload it.
  4. With your uploaded app selected in the Application Manager list, click Install.
  5. Once installed, make sure the test device is unlocked and that your app is selected in Application Manager, then click Start.
    1. You can alternatively browse to the application directly on the device, once installed, to launch it.

    If all was successful, your app should then launch and you will be able to interact with it as if using a real device. If the device does not have working WiFi connectivity, simply right-click on the frame and select Manage > Reset WiFi. You can switch the orientation to landscape by right-clicking the screen and selecting Orientation > Landscape.

    Advanced Tools

    The test device environment supports device logging akin to LogCat in Eclipse / ADB. To view the logs, you can right-click the device frame and select Test > Logs. All of the logs will then appear in a new window and can be filtered by log level and/or string. You can also clear the log or save the data to a file just as you could from Eclipse. In addition, the SAMSUNG devices support remote debugging by selecting Test > Remote Debug Bridge and then connecting to it from your local ADB shell (this is the same manner described in my BlueStacks tutorial).

    When you have completed your tests, you can uninstall your app(s) from the Application Manager by selecting it and clicking Uninstall. To exit the emulator, right-click the frame and select Exit. Finally, it is a polite gesture to then cancel the reservation in the SAMSUNG Test Lab site (under "My Reservations") so that the device can be used by other parties before the entire duration is up.

    This free service is tailored to SAMSUNG devices and does not have nearly the number of available devices as some of the paid services mentioned previously. Even so, it offers a wide-enough spectrum of test devices to rather adequately test most of the problem areas of device. Another very promising and free cloud testing service on the horizon is Google's Cloud Test Lab, which promises to offer virtual access to many devices as well as advanced automated tests. This service is not yet available publicly but is certainly worth keeping tabs on.

Using Bluestacks for Fast Android Emulation

Testing Android applications on PC or Mac without a physical device can be quite a burden. The configurable Android virtual machines in Eclipse/Android Studio are notably sluggish and don't work well with many third party frameworks, especially those powered by C++. If your development machine has Intel-based hardware you can accelerate the emulation process by using Intel® HAXM technology, but AMD users are not yet so lucky.

The fastest and easiest way I've found to test Android applications is via the BlueStacks app player. BlueStacks is a free, ad-supported product for PC and Mac that enables you to download and run Android applications from your PC, as if using an Android device itself. BlueStacks isn't the only product on the market of its kind, but it does boast higher compatibility and a greater feature set than the competitors. According to BlueStack's feature chart, it supports up to 96% of all apps and 86% of all games on the Android market. Furthermore, BlueStacks offers streamlined emulation of the Android device's camera, microphone, multitouch and more which makes it ideal for testing in-development apps.

Installing Android Debug Bridge (ADB)

To use BlueStacks for debugging Android apps, you'll want to make sure you have the Android Debug Bridge (ADB) installed and operational. Some unofficial packages exist to get ADB in a hurry, but I have not tested said packages personally and it is easy enough to get it up and running through official means.

  1. If you haven't already done so, download and install the Android SDK Tools package from Google. ZIP files are offered for Windows, Mac and Linux; extract the contents to a dedicated directory.
  2. From the extracted file location, launch SDK Manager.exe. Under Tools, check the box to install "Android SDK Platform-tools" and press the Install button. You will then have to click "Accept License" and then "Install" to download and install these components.
  1. Once installed, you will find ADB.exe within the "platform-tools" subfolder of the location you extracted the original files to. You can run this file from the command prompt without any parameters, or visit its official page on Google, to review the multitude of available settings. I recommend that you also append the ADB location to the PATH environmental variable [assuming it is a Windows install] so that it can be ran from any command line prompt without having to navigate into the folder directly.
    1. Press Windows Key + Pause/Break on your keyboard to get to the System Information screen.
    2. Click on Advanced System Settings in the left menu.
    3. Click the Environment Variables button.
    4. Double click the Path entry under System Variables.
    5. Go to the end of the field and make sure there is a semicolon (), then insert the full platform-tools path (i.e., C:\android-sdk\platform-tools\)
    6. Click OK three times to close out of the dialog windows.

    Now if you have a physical Android device attached to your computer (with USB Debugging enabled), you should be able to type ADB devices from the command prompt to see a list of available devices for testing [the ADB daemon will start automatically with this command if it is not already started].

    Installing BlueStacks App Player

    Installing and configuring BlueStacks is as easy as installing any computer application.

    1. Head on over to http://www.bluestacks.com/ and click the Download button, which will match your target platform (Mac or Windows).
    2. Once downloaded, launch the EXE and follow standard install procedure on Windows, or double-click/drag the app file to your Applications folder on Mac.
    3. When you first launch BlueStacks, you will be taken through an initial configuration screen much like when booting a new Android tablet.
    4. You will want to sign-in using a Google account in order to access the Google Play store and synchronize app data and settings.
    5. When all is said and done, you'll be at a landing page with easy access to your Android applications.

    Running Development Apps Through BlueStacks

    With ADB and BlueStacks installed, all that remains is to connect ADB to the BlueStacks player and send your Android app to it. Note that the free version of BlueStacks is ad/app supported so you may occasionally be prompted to install promoted apps before continuing. Alternatively, you can buy a year-long license for $24, the full version can also enhance performance.

    1. Launch BlueStacks so that the main dashboard screen is visible.
    2. Open a command prompt (or terminal on Mac) and enter: adb connect 127.0.0.1 then press Enter. This will connect the BlueStacks player as a device on port 5555 by default.  If the ADB command does not work, chances are you didn't set your path variable correctly; you can navigate to the platform-tools folder and run the adb command from there instead.
    3. From within Eclipse or Android Studio, click the Run or Debug button. This should open up the Android Device Chooser window where you will see the BlueStacks player and any other physical devices connected to the computer. Select the correct option and hit OK. The app should transfer to BlueStacks very quickly and will run much more fluidly than the default virtual machines!

    Happy coding!

Verizon Ellipsis 7 (QMV7A) Development Woes

A couple years  ago I decided to switch my cellphone provider.  On Black Friday, Verizon Wireless offered a "free tablet" deal upon activation.  It was the same sort of persuasive deal many carriers offer throughout the year, almost always requiring a two-year activation commitment for the tablet itself, on top of the regular cellphone contract.  The tablet was their own branded Ellipsis QMV7A 7" (by Quanta) with so-so hardware specs. (I had, in fact, just been gifted the all new 7" Kindle Fire HDX a week prior as part of an Amazon promotion, and the QMV7A was light-years behind it in resolution, technical specs and overall build quality.)

As I sat waiting for hours on end for the recently hired Verizon staff to activate my service, I checked the going rate of the QMV7A tablet online; $130 at most. Verizon promoted it as a $250 tablet, and with the two-year contract this "free" tablet would actually cost me about that much given the $10+ a month service charge.  The data plan was shared with the main phone as well, so there was no extra data allowance.  Still, I saw some value in owning another Android tablet for development purposes and agreed to the commitment.

I did not use the Ellipsis tablet much in any capacity. I switched carriers again this past fall and paid the hefty early termination fee to retain the tablet (wifi only) and absolve myself completely of Verizon's services.  This week I found renewed interest in using the QMV7A for development testing. Apart from the mediocre hardware, it turns out the QMV7A also suffers from the same disastrous firmware-driven issue I've seen in other extremely low-end Android tablets. This flawed design relates to how the internal storage space is partitioned and allocated.  Of the 8GB of internal space, over 3GB is used on the OS itself, another 4GB is reserved exclusively for photo and video storage and an absurdly low 1GB is all that is available for all applications including the fixed applications that come as part of the OS.

I have encountered the same ludicrous app storage limitations on other low-end tablets including the Nextbook 8. Unfortunately, there is no way to delegate all app storage to external memory, at least on the vast majority of existing Android OS implementations, so the available space will always fill up quickly.  In the case of the Ellipsis, Verizon eventually offered a firmware update to fix it but they required sending the whole device back to them.  For someone like myself who paid for the full price of the tablet but is no longer a customer of Verizon's, support is non-existent. Essentially with these restrictions I can install the Google line of apps and other core essentials, and a few small third party apps before the allocated space is entirely consumed.

Ellipsis 7 USB Drivers and Windows 8

The software-imposed storage limitation for apps was not even my greatest frustration with this tablet.  It turns out that the USB driver required for development testing was even more of a pain to get configured, in part due to a sloppy installation script and unsigned drivers.

The USB drivers are not available on the support site but are included on the tablet itself.  When connected to the PC, the connection must be adjusted on the device so that it is connected as a "Built-in CD-ROM".  After doing so, a 'toolkit' drive will be accessible from the PC containing 32-bit and 64-bit drivers and nothing more.

As soon as I ran the included batch file for installing the drivers on Windows 8.1, I was presented with the Engrish notice: "Do Not support Win NT earlier version." A quick analysis of the installation batch file revealed the culprit:

Checking Specific Version Numbers for Compatibility, Don't Do That!

Despite Windows 8 being commercially available for well over a year before the Ellipse tablet was introduced, the Ellipse developers didn't bother to include it as a compatible OS in the batch file. The drivers themselves actually work perfectly well on Windows 8+, but the included install script prevents it from installing since it explicitly checks against specific OS version numbers.

This type of checking against a very specific list of version numbers is certain to cause problems in the future and will quickly become a nightmare to maintain. Perhaps the most memorable and agitating personal experience with such criteria was when I attempted to complete an application on the official Federal Student Aid (FAFSA) website several years ago.  Although the government website boasted that they adhered to web standards in developing the site, they still parsed the user agent string to allow or deny access to the application depending on their browser version.

At the time this notice was displayed to me, every browser version listed as compatible was already outdated.  both Chrome and Firefox were pushing out rapid version updates and IE was on 9.0 stable. As such, it was impossible for me to complete the application using any of my installed browsers without some jiggery-pokery.  For instance, you would receive this notice if using IE 9+, Firefox 4+ or Chrome 9+.  When I pointed out the technical dilemma to their support hotline, I was advised to try going to a library or to downgrade my browser to one that was supported. Much in the same way the Ellipse driver was compatible with Windows 8+ but the install script was not, the FAFSA site in fact worked perfectly fine in any browser just by spoofing the user agent string to one of the compatible versions.

A much more reasonable solution in such circumstances is to check against a minimum version number when necessary and display a non-intrusive disclaimer for all platform versions that exceed what the product was officially tested against.  This way, users on future untested platforms will be aware that the platform used is not formally supported, but they will still be allowed to use it at their own discretion.  In most cases (depending on the type of product), the product will function just fine, as was the case with the Ellipse USB driver and FAFSA website.

I revised the Ellipsis USB Driver install batch file to accommodate Windows 8+, and the installer went through without a hitch.  Instead of checking explicitly against the OS version numbers that the driver supports, the script should instead check against the few OS versions that it positively does not support and then display a notice of what OS versions it has been tested against while letting the user of subsequent versions proceed at their own risk.

Well, Almost Without a Hitch

Unfortunately, the provided Ellipsis drivers were also shipped unsigned. This means that to install them successfully you have to first reboot Windows with driver signature enforcement disabled.  In Windows 7 you can simply tap F8 when booting to trigger this option, in Windows 8 the easiest way is to go through the Change PC Settings / Repair screen as detailed here. I found it a bit more of a hassle with my PCs configuration given a dual boot setup across several hard drives, whereby I had to reorder my boot sequence and change the boot drive to get into these Windows 8 advanced options to activate. Alas, I finally had the USB drivers for this pretty dismal tablet working for me.

Synchronizing Local Databases and Web Content via Dropbox (MySQL, Apache, WAMP)

When working on web-based projects locally, developers are often faced with the burden of transferring the data across multiple development machines for one reason or another. In my case, I develop primarily on a desktop machine in my office but occasionally require access to the project files from a laptop or mobile device; this is especially true when working remotely or if needing to demonstrate a WIP to a client.

A typical web project consists of many static assets, dynamic scripts powered by a server-side language like PHP, and database-driven content powered by an engine like MySQL. Due to these interconnected components, constantly exporting and importing the databases from one machine to the next while also carrying over all of the updated page scripts and static assets immediately becomes a tedious and time-intensive commitment. Database synchronization can be especially cumbersome when needing to mirror user accounts, table and database privileges and other lower level details.

By utilizing a cloud storage service like Dropbox, the entire data synchronization process can be automated across devices to ease developer woes. This approach carries several other added benefits as well, including:

  • Previous versions of files can be restored as needed in most cloud services. With Dropbox, for instance, the history of each file is preserved for 30 days on its standard plan, or a full year on its extended plan. This acts as a safeguard against accidental deletion or catastrophic programmer error.
  • The project folder(s) can instantly be shared with other internal and external team members to streamline the development workflow. Of course, when dealing with complex team projects you will want to use a more apt solution that manages advanced source control and revisioning.
  • By fully isolating the content from the applications, there no longer exists any concerns over OS formats and forgotten backups. By default, the SQL and website data gets nestled inside the Apache/MySQL installation folders commonly placed on the root OS drive, making it a ripe candidate for forgetfulness upon format (speaking from several bouts of personal experience).

NOTE: The tutorial that follows uses WAMP (Apache/MySQL) and Dropbox on a Windows machine, but the same general concepts will apply regardless of cloud service provider, web software or operating system.

Installing the Required Software

To get started, you'll want to install the server software and cloud storage software on each device you plan to use during development. Again, this tutorial uses WampServer and Dropbox.

  1. Download and install WampServer. At the time of this writing, the latest available version is WAMP 2.5, which includes Apache 2.4.9, MySQL 5.6.17 and PHP 5.5.12. You are free to install these packages manually or use an alternative package like XAAMP; I have grown to appreciate the quick-access options of WAMP for server configuration and service management.  The installation process is straight-forward, with the only customizable options being the installation directory, desktop icon and quick launch icon.  The default path of c:\wamp\ is a smart choice.  If you do change it, I encourage you to refrain from using any directories with spaces, which can sometimes muddy up path referencing and complicate navigation. You will also want to avoid installing it to any protected directories (i.e., 'Program Files') which can cause read/write issues.

    Note that there is a 32-bit and 64-bit version of WAMP.  You do not have to install the 64-bit version to match your operating system.  In almost every common scenario the 32-bit version is perfectly sufficient and in some instances provides better plugin and extension support as not every 32-bit component has been built for 64-bit architecture.  There's also another small blunder in the 64-bit version of MySQL distributed with WAMP as I will note later on.
  1. Download and install Dropbox. At the time of this writing, the latest available version is Dropbox 3.4.4.  The install process is quick and effortless.  Once installed and running, you may wish to change your default Dropbox folder location.  To do this, click on the Drobox icon in taskbar, click the Gear icon in the top-right and select Preferences.  On the Account tab, click the "Move..." button to specify a new location and then select OK.

    My preference of choice is to keep the Dropbox location on a separate hard drive to avoid having to backup or re-download all of the Dropbox storage after a format. This way after installing a new operating system I simply update the storage location to my external path created previously and it is all set.

Getting Synchronized

With the software up and running on all necessary devices, we now get to the meat of the procedure by altering various server paths to point to the cloud storage location.

Before starting, make sure all services are STOPPED in WAMP and exit WAMP Manager, if you had previously opened it.

  1. Create a new parent folder in your Dropbox storage location to house the web data (e.g., 'wamp'). Within this folder, create two subfolders to house the database store (e.g., 'db') and web assets (e.g., 'www').   To keep things tidy, I keep the 'wamp' folder and its subfolders in an 'appdata' folder on Dropbox, which is where I also house data for other developer tools and applications including Sublime Text Editor.
  1. Navigate to the Apache Configuration folder and open the file httpd.conf  in Notepad++ or your favorite plain text editor (try to avoid using the default Windows Notepad; it may not render the linebreaks properly and instead appear a garbled mess). The default location of this file when installed via WAMP 2.5 is: C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf .
  2. Locate the DocumentRoot declaration around line 230.  Change the path to the 'www' folder you created within your Dropbox storage in step #1.  Always use forward slashes here and include the trailing slash at the end.  Save the file and close the document. This will now point all http web requests to the new Dropbox-based 'www' location. My line appears as:

  1. After this line and past the first <Directory /> clause, you will see another <Directory...> entry around line 252 with the original 'www' path within it.  Change this line to match the same as entered for the DocumentRoot above:

  1. Now, navigate to the MySQL root folder and open the file my.ini in a plain text editor.  The default location of this file when installed via WAMP 2.5 is: C:\wamp\bin\mysql\mysql5.6.17\my.ini.
  2. Locate the datadir declaration around line 38.  Change the path to the 'db' folder you created within your Dropbox storage in step #1.  Always use forward slashes here and omit the trailing slash. Save the file and close the document.  This will now point all SQL requests to the new Dropbox-based 'db' location.

WARNING: If you installed the 64-bit version of MySQL using WAMP, you MUST change line 26 of my.ini from [wampmysqld] to [wampmysqld64]. This is an apparent oversight in their 64-bit release and without changing that value to match the 64-bit daemon, the personalized settings will never be applied and it will continue reading database information from the MySQL install directory.

  1. If using WAMP, open config.inc.php from the Scripts directory of the WAMP install with a plain text editor and change the $wwwDir variable declaration around line 61 to the 'www' folder you created within your Dropbox storage in step #1 (you must also remove the '$c_installDir.' portion so it resembles below). Save the file and exit.  This will update the quick-access shortcut from the WAMP icon to open your web directory contents.

  1. Now, copy all of the contents of the wamp/bin/mysql/mysql5.6.17/data directory to the 'db' directory created in the Dropbox storage folder, and copy all of the contents of the wamp\www directory to the 'www' directory created in the Dropbox storage folder.
  2. Open the copied 'index.php' file from the 'www' Dropbox folder in a plain text editor.  Change the $server_dir variable around line 40 to reflect your root WAMP install. Save the file and exit.  This will enable you to access the default WAMP index page with quick access to useful tools like phpMyAdmin and general server information.

  1. Finally, launch WAMP and start (or restart) all services.  You should now be able to access your local server via http://localhost/ and perform all database operations through phpMyAdmin or custom scripts.  All of the data will now be saved to the Dropbox location and accessible from the other machines, automatically syncing between them.

You will have to repeat all of the steps above for each device you wish to synchronize with.  But once configured, you will be able to edit databases and site files on any given machine and all changes will be applied on the other machines with no other user intervention required. Read Full Article