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 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.