Friday, May 25, 2018

Where to Start When You've Broken Your Android Phone Screen? Here's a number of strategies you can try.

There's a great number of ways to interact with a phone but being able to see what it's displaying is probably the most important.  Unfortunately, smashing a screen is an all too common occurrence and with the poor state of voice assistance, and strengthened security across Android, it's become harder to get into a phone that's been smashed.  Although the regular backup system with Google Cloud and other apps with backup capabilities has improved, sometimes you just really want to get back onto that phone to rescue data.

Listed below are a number of strategies you can try to gain increased access to your broken phone.

  1. If your phone has MHL capable USB-C port or a Micro-HDMI port, then you could get a cable and output to a monitor or TV.  Some phones have DisplayPort Alt Mode which works like Apple MacBooks and allows the use of a USB-C hub with DVI ports, DisplayPort, or HDMI port. (https://www.quora.com/Can-I-hook-up-my-USB-type-C-phone-to-my-monitor-using-a-USB-C-to-VGA-adapter)
  2. If your phone is not capable of the above, you might try other tech like a DisplayLink dock (https://forum.xda-developers.com/oneplus-5/themes/wired-tv-one-plus-5-makes-displaylink-t3667974https://www.youtube.com/watch?v=QXhPvW-aOtY) or dongles like Chromecast and Miracast.  Keep in mind, most of these require a step or two of setup on the phone, so it would be tough to know where to press if your screen is broken.
  3. If you have a good idea of where to press and what dialog boxes will pop-up on the phone, then you might be able to use your fingers or a mouse connected via a USB host dongle.  I used a USB-C to USB-A female cable to allow mouse input.
    1. If you're lucky and have access to another identical phone with the same version of Android, then figuring out where to press will be easier.
    2. YouTube videos and screenshots will be helpful.
    3. Tactile feedback and click tones being enabled will assist with navigating blindly.
    4. If your digitizer is also broken and don't have a USB adapter, try a finding a compatible bluetooth mouse. My Surface Arc Touch mouse didn't work.  Might be necessary for unlocking the phone since fingerprint authentication doesn't last forever.
  4. Use voice control "Ok Google" Open Display Settings, etc. You'll need to be connected to the internet for this...
  5. Enable Google TalkBack.  I was unsuccessful enabling this feature blindly, but it would've been a huge step in the right direction.
  6. Connect your phone to your PC and use adb commands from your PC. 
    1. Or, provided you're rooted, use adb from Terminal Emulator on the broken phone using a physical keyboard attached via USB.
  7. Remotely install apps like Screen Mirror (https://play.google.com/store/apps/details?id=com.ajungg.screenmirror) from Google Play via your PC.  This is the solution that ultimately worked for me because it required very few screen presses to enable and I was logged into my private WiFi network already.  Just a fantastic app!
  8. From step 7, I was able to copy over an adb_keys file that was authorized with the adb installation on my PC.  I needed to place the adb_keys files in /data/misc/adb to allow adb to work with the broken device, otherwise the adbd server kept saying $ADB_VENDOR_KEYS is not set.  This allows USB debugging with my PC (I already enabled USB debugging mode long ago).  Since I was rooted, it was simple for me to place the file in that directory, otherwise it might be possible to do it via adb while in Recovery mode. (Boot to recovery with phone-specific key combination)
  9. I was able to get Vysor working which has a very simple setup and automatically installs Vysor to the phone via the desktop app, but requires that USB debugging (Step 8) is allowed.
  10. I also enabled WiFi Direct/Miracast screen mirroring on the phone and my Windows 10 laptop as a back-up measure.  This may be the best tactic to try if you know where to press, since it's at the bottom of the Display settings in most versions of Android... just hope you don't have too many neighbours with Miracast capable devices.
Other strategies and tools in links:


Pre-emptive measures, in case you smash your phone.

Enable USB debugging mode through developer options (tap build number 7 times to enable dev. options)

Install Screen Mirror app
Install Airdroid app
Get a Roku with the Roku screen casting app.
Get Chromecast (limited mirroring capability)

Root your phone, though there are drawbacks to this. Some phones can not be rooted.  Once rooted, install Terminal Emulator.
Bootloader unlock your phone, also drawbacks to this. Most phones can not be bootloader unlocked.

Setup Vysor (PC and on phone) which will ask to authorize USB debugging mode and create an adb_keys file on your phone. Backup the set of files created when first allowing USB debugging when Vysor makes the confirmation pop-up: adb_keys (on phone) and adbkey.pub, adbkey (on PC)

Setup screen casting (place check in tick box Enable wireless display from Display -> Cast settings) to project to your Windows PC.  I believe this is Wi-Fi Direct/Miracast technology that is supported in Windows 10 on modern wireless chips through the "Projecting to this PC" settings.  This is called Screen Mirroring on Samsung phones.

Set default Media Transfer Protocol (MTP) mode when USB cable connected.

Memorize and/or screenshot the positions of toggle buttons when two-finger pull down the notification shade.

Don't encrypt your phone.

Tuesday, October 24, 2017

Google Services (Products) annoyances

I'm rather furious that my photos captioned with specific words (scientific names of plants) are not returned when I search my photos; rather Google is returning a bunch of my photos that look like the plants but are 90% of the time incorrect identifications.  This is absolutely bonkers.  How hard is it to index my captions and return the photos that have the search terms in those captions rather than doing a piss poor job of image recognition?  I know for a fact Google is already indexing my photos based upon my captions because when I add a correct species ID, the search results improve to about 15 to 20% correct "similar-looking" plants, but still missing many of the photos I manually captioned with the scientific name.

Ludicrous and infuriating!

Wednesday, January 4, 2017

Review of apps capable of backing up text messages.

MessageSync is still the best, right through to Nougat. All messages backed up and restored along with conversations that have more than one participant and significantly: MMS too!! But it has problems with emoji's. Also, the function within the app, "Synchronize" messages with backup file or "merge" with backup file is funky *see reviews for the app on Google Play Store.
JS Backup - Restore & Migrate seems good but has problems with MMS; emoji's and group conversations seem okay. Also, JS Backup tells you how many SMS and MMS items to backup before you actually run the backup.
Titanium Backup Root is excellent but requires root. Also, due to a change in the location of the com.android.providers.telephony folder with Nougat, TiBu has problems restoring to the folder. Method to make it work is as follows:
Recommend adding your Google accounts and Whatsapp accounts so that all your contacts are restored and conversations have proper names prior to following the steps below.
1. Device must be rooted and install something like ES File Explorer v4.0.2.2-systemless or use Terminal Emulator and use the 'su' command.
2. Navigate to the new Nougat SMS/MMS folder in /data/user_de/0/com.android.providers.telephony.
3. Make sure radio:radio owns the app_parts, databases, and shared_prefs folder and permissions are drwxrwx--x. Erase all files within these folders.
4. Reboot.
6. Open Titanium Backup and go to the Phone and Messaging Storage 7.0 (SMS/MMS/APN) item. Run restore from your TiBu backup files (.properties file and the large timestamped .tar.gz file) which you've placed into /storage/emulated/0/TitaniumBackup.
7. Move attachment files and databases from /data/data/com.android.providers.telephony subfolders to the corresponding folders in /data/user/0/com.android.providers.telephony. Make sure to move contents of app_parts first, and then contents of databases while replacing the existing files in that folder.
8. Make sure to reboot before opening Messaging app!
9. Wait a few minutes for Messaging app to catch up with restored messages.

I haven't yet tried the XML function of TiBu which requires pro version.

If you want TiBu to be able to see the folder location in Nougat, you can Symbolic link ln -s /data/data folder to the /data/user_de/0 folder. This only lets you Explore but the wipe data and restore functions will replace the symbolic link and make a new folder in /data/data unfortunately.

If all else fails, was thinking of trying to combine restores from both Message Sync and JS Backup apps. First go into messagesync XML file created from the backup process and removing all the SMS's. Then restoring just the remaining MMS from the edited XML. Then restoring only the SMS from JS Backup.

Thursday, October 13, 2016

Some differences when opening georeferenced imagery between QGIS and ArcGIS

Just did some minor testing after trying the Georeferencing toolbar in ArcGIS to create some world files (.jpgw, .pngw, .ecww, .tfw, etc.) and wanted to see how these two GIS suites treat the result. Normally I use MapWindow GIS to georeference aerial photos but it's very slow and has some strange bugs that might deserve another blog post.

The aerial photos were received from the provincial agency as MrSID files and were converted to ecw using IrfanView. Neither the original SID files or the ECW files had embedded projection information. In ArcGIS, I used the georeferencing toolbar and added five control points then chose Projective Transformation rather than the default Affine 1st Order Polynomial method to transform the raster. Upon clicking Update Georeferencing (Save the current warp to the dataset) from the toolbar, two files are created with the same name prefix as the .ecw file but with different extensions. They are photoname.ecw.aux.xml, and photoname.ewwx. The .ewwx file contains the image-to-world file transformation parameters using 1st Order Polynomial. The original ecw image file was untouched by this process.

I also made a copy of the photoname.ewwx file and renamed the extension to ecww so there was a file named photoname.ecww that QGIS and MapWindow can use.

It seems that although QGIS can read the ecw.aux.xml for the projection information (so it doesn't need a .prj file), it can not read this auxiliary file's contents for the higher order polynomial transformation. Thus there is a difference in the accuracy of the georeferenced raster when loaded, between ArcGIS and QGIS. In ArcGIS, if a more complex transform higher than 1st order polynomial was used to create the aux.xml and ewwx files, then it will show the raster with the higher order transformation method applied. If one decides to load the raster into QGIS, then QGIS will only use the world file (.ecww) and perform affine transformation on it.


Thursday, June 30, 2016

Friday, April 8, 2016

A list of "All-Weather" tires with the Mountain/Snowflake symbol and where to get them

Though the design and compounds have been around a few years now, it was surprisingly difficult to find tires that are truly All-Weather (good for every season) per Transport Canada standards and meet or exceed the Rubber Association of Canada performance requirements. Since my tires need replacing and I'm not looking for soft winter-specific tires, I have compiled a list of tires that have the mountain/snowflake rating based upon my search. Perhaps you'll find this list useful and that it saves you time.

Nokian pioneered this class of tires and was the first to market but there are now a number of brands with a limited selection.
http://www.wheels.ca/news/all-weather-tires-are-not-the-same-as-all-season-and-heres-why/

These makes include: Kumho, Toyo, Falken, Michelin, Vredestein, Hankook, Yokohama, and Nankang, Michelin, Multi-Mile, and Muteki.  Additionally, some are exclusively sold at certain retailers.



Tires that have the 3PMSF icon and are all-weather capable
Manufacturer Model Retailer Size Limits/ Tire diameter
Nokian Nordman WR & WR SUV Kal Tire (Exclusive) Smallest size: 155/70R13 = 21.5", Largest size: 225/55R17 = 26.7"
Nokian WRG3 & WRG3 SUV Kal Tire (Exclusive) Smallest: 175/65R14, Largest: 255/40R19,
SUV Smallest size: 235/75R15 = 28.9", SUV Largest size: 275/40R21 = 29.7"
Nankang SV-2 Kal Tire Smallest size: 175/70R13 = 22.6", Largest size: 235/75R15 = 28.9"
Kumho The Road Venture SAT (KL61) Mopar Dealers (Dodge/Jeep/Fiat),
OK Tire,
, http://www.1010tires.com/
Smallest size: 225/75R15 = 28.3", Largest size: 265/50R20 = 30.4"
Kumho Solus HA31 Mopar Dealers (Dodge/Jeep/Fiat), http://www.1010tires.com/ Smallest size: 145/80R13 = , Largest size: 225/45R17 =
Toyo Celsius & Celsius CUV OK Tire,
http://www.1010tires.com/,
https://pmctire.com/
Smallest size: 185/65R14
Largest size: 265/50R20
Vredestein Quatrac 3 & Quatrac 3 SUV http://www.1010tires.com/
https://pmctire.com/
Smallest size: 155/70 R 13
Largest size: 255/55 R 19
Vredestein Quatrac 5 https://pmctire.com/ 2
Hankook Optimo 4S Canadian Tire (Exclusive) Smallest size: 175/65R14 = , Largest size: 225/50R17 =
Yokohama Geolandar A/T G015 https://pmctire.com/
http://www.tirerack.com/
Smallest size: 215/75R15 = Largest sizes: 305/55R20 = , 35X12.50R20 = 35"
Falken Wildpeak A/T3W https://pmctire.com/ Smallest size: 235/75R15 = , Largest size: 325/60R20 =
BFGoodrich All-Terrain T/A® KO2 Mopar Dealers (Dodge/Jeep/Fiat),
https://pmctire.com/
Smallest size: 235/75R15 = , Largest size: 325/60R20 =
Michelin Pilot Alpin PA3 Canadian Tire
https://pmctire.com/
http://www.tirerack.com/
Smallest size: = 205/55R16, Largest size: = 285/40R19
Michelin Pilot Alpin PA4 Canadian Tire
http://www.tirerack.com/
Smallest size: 225/40R18 = , Largest size: = 315/35R20
Michelin Primacy Alpin PA3 Canadian Tire
http://www.tirerack.com/
Smallest size: = , Largest size: = 225/45R17
Minerva Emizero 4s https://pmctire.com/ Smallest size: = , Largest size: =
Muteki Trail Hog Kal Tire Smallest size: 265/75R16
Largest sizes:
325/60R20 = 35.4",
37X12.5R20 = 37"
Multi-Mile Wild Country XTX Sport Kal Tire 275/65R20 = 34.1"
Nitto EXO Grappler AWT Kal Tire, http://www.1010tires.com/ Smallest size:
235/80R17
Largest sizes:
305/55R20
35X12.50R20
Nokian Rotiva AT Plus Kal Tire ?

With respect to other tire models that do not have the 3-peaked mountain/snowflake rating yet might actually deliver, however subjective, sufficient or excellent performance in diverse weather conditions including snow, they are not listed here but may be numerous.  Besides reading reviews, it's worth looking at Quebec's Bill 42 (an Act to Amend the Highway Safety Code) passed in 2008 and lists the following as acceptable tires for winter driving: Tires on which one of the following inscriptions appears: Alaska | Arctic | A/T or AT | Blizzard | Ice | LT | Nordic | Snow (but not Mud & Snow) | Stud | Ultratraction | Winter.  Note that after December 15, 2014, in Quebec, these inscriptions on tires were no longer compliant with the statute and only those tires that have the 3-peaked mountain/snowflake
icon are in compliance for winter driving.  
Of course, the class of winter-dedicated tires are probably compliant with Quebec's law but that is not the topic of this blog post.
Source: https://www.caaquebec.com/en/on-the-road/advice/tips-and-tricks/tip-and-trick/show/sujet/mandatory-winter-tires-important-clarifications/

Wednesday, March 16, 2016

A simple way to view Shadow Copies on Windows 8.1 without installing or downloading software

Upon pressing "undo" accidentally in File Explorer on my Surface Pro 3, Windows 8.1 performs bad behaviour.  See details and frustration others have had here: answers.microsoft.com thread

It seems Windows 8.1 made all the contents of the folder disappear as a consequence of undoing a previous rename of the folder from "New Folder".  That is, the file entry in the Master File Table was lost. Hopefully the entries were deleted and the space is reusable (I'm not sure what how Windows manipulates the MFT in this case).

So, I wanted to recover the files from that folder.  I first found out that Windows 8 has two kinds of "backup" systems, one called File History that is intended to make regular replicas of the tracked Libraries to a separate physical disk or to a network share.  Since this File History wasn't configured and not turned on by default on my SP3, I looked toward Volume Shadow Copy, which appears to be enabled by default on the C: drive.  You can check your "System Protection" tab in System Properties to see if this is the case for you by following the first part of this tutorial: https://www.youtube.com/watch?v=jsIDfyNg7KE
In fact, you can follow the entire video if you feel you want to try the software he mentions, ShadowExplorer.

Alternatively, if you don't want to download any software and happen to have a Windows 7 Pro machine at your disposal on your network, then you can just navigate to the Windows 8.1 machine and right click the folder of interest to see Previous Versions.  This is how I recovered my files and viewed the snapshots of my Documents folder on my SP3.

Interestingly, if you try navigating to \\localhost\C$ on the Windows 8.1 computer without any software installed, you'll be able to see the Previous Versions tab, but it will be empty.  So in my case, from the Windows 7 Pro machine, I navigated to \\SP3\Users\name\Documents\ and right-clicked properties on the folder of interest.  This showed me Previous Versions with a list of snapshots and their dates.

I was afraid at first that I didn't have any shadow copies to restore because checking the Services tab in Task Manager on my SP3 indicated the VSS (Volume Shadow Copy) service was Stopped.  Also, this article says that Volume Shadow Copy Service in Windows 8 is set to manual and does not run on system startup.  Lucky for me, Shadow Copies were being made and I was able to use a Windows 7 computer on the same network to browse the "Previous Versions" of the folders on the SP3 running Windows 8.1 without even downloading other software such as ShadowExplorer mentioned above or Z-VSScopy.