Wednesday, March 27, 2019

Switch from Gmail to ProtonMail the easy way

Due to the increasing issues of data mining and privacy, I decided to switch to ProtonMail, a private oriented secure email solution. With ProtonMail's new import tool and Google Takeout this is possible quick and easy.

DISCLAIMER: I am not afflicted with ProtonMail, just a fan and user of their product.

Part 1: The big cleanup

Before using precious storage space and saving future time for searching through emails, I decided to do some email deleting first.

Big emails with attachments
First I started deleting big emails

Mailing lists
Then I targeted mails from mailing lists (such as old newsletters) and generally mails sent as part of updates/notifications (XX sent you a message on YYY, XX replied to a thread you follow on YYY etc) which you open "one-time" and never look at again.
This I did by first adding my Gmail account to a email client, in this case Outlook but it is probably also possible with other free clients. I chose Outlook because it has powerful tools to sort, filter and view emails for quick deleting and cleanup.
  1. Make sure IMAP is enabled in your Gmail settings.
  2. Connect Gmail to Outlook
  3. You now have more powerful tools to sort, but the one I wanted was missing: Group emails by sender's email address. This way you can see all emails sent from etc PayPal in one "group" instead of multiple groups consisting of various names. You need to add a custom form configuration file. Here's another guide.
  4. Once the form is added, you can group the emails. Here's a guide. See the second part of the page "Group items manually or create a custom group" and follow it until this step:
    1. "In the Group items by box, click a field to group by.
      If the field that you want is not in the Group items by box, click a different field set in the Select available fields from box."
    2. Here you need to add your new custom field. More help on how to do this here  in the superuser guide   
    3. This is how it looks:
  5. Now you have a view of all your emails grouped by sender, and you can select entire groups (for instance a newsletter email group), delete it, and scroll on. After a few hours i had reduced my emails with 50%, and deleted over 6000 emails.
Cleaning up hidden archived emails
Ever wondered what happens when you click the archive button, and where your archived emails go? Probably not, because Gmail hides these very well. There's no button to show them all. But you can use this smart search to show them.
I just deleted all emails that was in the archive. I also suspect that emails deleted through IMAP end in the archive, but did not investigate further.
-label:inbox -label:sent -label:drafts -label:notes
Now that I have a nicely clean inbox, I could move on.

Part 2: The big labeling party

I wanted to keep the structure I had in Gmail with the tabs "Primary, Social networks, Updates, Promotions and Forums". Unfortunately the emails in the before-mentioned categories are not labeled with the category name (accessible in Google Takeout, but it is very easy to do that. Simply open a tab, select all mails, and apply a new label to them.

I did this for the 5 categories/tabs and had 5 labels to work with.


Part 3: The big download

In Google Takeout, you can now select only Gmail, and choose your desired labels. I choose only the 5 I made for "Primary, Social networks, Updates, Promotions and Forums" and "Sent". You can download the data in various ways. And you will get one MBOX file per label.

Part 4: The big import

Using this tool, you can select a folder containing a MBOX file to import to ProtonMail.
https://protonmail.com/support/knowledge-base/export-import-emails/
Important: You should only have one MBOX file in the folder you choose, and no other files or folders in it! Otherwise you will import all your Gmails into one single folder on ProtonMail.

And that's it! Enjoy your new privacy.

Thursday, March 23, 2017

Can't connect to any Wi-Fi network on Windows 10? (Stuck on "Checking network requirements")

Hi,

Have you occurred this problem many times? Windows shows that there's available Wi-Fi networks, and you try to connect to one of them. This message appears:


And after some time, it says "Connecting..." then nothing happens.
I've figured a new solution to this problem, which I expect will solve it in the future too.

Solution 1

It is caused by the wireless adapter being disabled.
Go to network connections. This can be done quickly in probably Windows 7 and above versions by typing this into the search box in the start menu (Start button -> CTRL + V)

control.exe netconnections

Find the disabled Wi-Fi adapter, and enable it (eg by right clicking it).


Solution 2

Another solution I've had luck with was to start a network diagnostic. Right click the Wi-Fi/network icon in the progress bar. Then click "Troubleshoot problems"


Solution 3

Another good fix is to put your PC into sleep mode, wait a minute or so, then wake it up. Wait a minute again, and see if you can connect.

Solution 4

The last fix I've found that sometimes work, is to disable and then re-enable the network card under Device Manager.
This is a good guide (also covers solution 1).
https://www.eightforums.com/tutorials/37681-network-adapter-nic-enable-disable-windows.html

Thursday, March 16, 2017

How to pause Live TV on Sony smart TV (Android TV)

Hi,
Disclaimer: This was tested on a Sony KD-55XD8005 TV, Android 6.x - My guess is this will work on 2015+ Sony Android TV models and above, but may not work on your TV.

I bought a HDD for my Android TV, which is great for scheduling recording of TV programs.

Sony decided now to go the user-friendly way, and if you're looking for a way to pause your TV bad luck. I've yet to found any documentation on this, I've been looking on the website, in the manual, builtin help...

This is the way to do it:

  1. Record the current program that you want to pause (just click the record button when watching)
  2. Click the TITLE LIST button on your remote control, and wait a few seconds
  3. Find the program your currently watching, and select/watch it
  4. Click the pause button
You can now click the play button again later, in order to, well, play the content. You can also fast forward, and if you keep doing that you'll eventually reach the point of live TV.

How to download subtitles from Captiongenerator.com

Hi,
If you have created or just watched a video on Captiongenerator you can easily download the video subtitles in the .vtt format (Video Text Tracks). WebVTT is a W3C standard, used in HTML5.

You need the video ID from the URL. Here's an example:

http://www.captiongenerator.com/17520/1SG-Finds-Out-The-Medics-Are-Missing

In this case you can download/see the subtitles from:

http://www.captiongenerator.com/videos/17520.vtt

Sunday, December 4, 2016

On the DRIVER_POWER_STATE_FAILURE crash error, and the fix

Recently, my desktop (Windows 10) has sometimes shutted down a little while after going into standby mode.

Using WhoCrashed (nice little program to analyse dump files) I'm getting the following information:

This was probably caused by the following module: ntoskrnl.exe (nt+0x14A510)
Bugcheck code: 0x9F (0x3, 0xFFFFB50F12FF9E40, 0xFFFFF8014B530960, 0xFFFFB50F1C1A7010)
Error: DRIVER_POWER_STATE_FAILUREfile path: C:\WINDOWS\system32\ntoskrnl.exe
product: Microsoft® Windows® Operating Systemcompany: Microsoft Corporationdescription: NT Kernel & System
Bug check description: This bug check indicates that the driver is in an inconsistent or invalid power state.
This appears to be a typical software driver bug and is not likely to be caused by a hardware problem.
The crash took place in the Windows kernel. Possibly this problem is caused by another driver that cannot be identified at this time. 
After doing some research, I found someone who had a similar problem, and their solution was to remove old drivers for a USB device.
I have a cheap USB Bluetooth dongle which came with some driver software called
CSR Harmony Wireless Software Stack 4.0.

I uninstalled the driver software using Revo Uninstaller (Very useful to remove all, if not most of an application) and removed the device.

Haven't had issues since.

Wednesday, October 5, 2016

How to reset a Android API constant to it's default value

This was tested on a Galaxy S7 on Android 6 (Marshmallow), but should work on most Android versions that are not many many years old!

If you have accidentally changed a setting constant from the Android API you can reset it to NULL (not a string)
For example if you have changed the constant LOCATION_MODE_HIGH_ACCURACY using adb shell or just shell inside Android like this:

settings put secure location_mode_high_accuracy 5


You can reset it to NULL using this command:

settings delete secure location_mode_high_accuracy

Very handy if you play around with shell commands and accidentally change a constant to a invalid value!

Sunday, October 2, 2016

How to use your MicroSD card for both media files and apps on Galaxy S7

Tested on SM-930F (Galaxy S7 international model) but may be usable for other varients and models.


Samsung decided not to use the new feature in Android 6.0 Marshmallow which allows you to format external SD cards as "Portable Storage" (for media and general files) or "Adaptable Storage" (for "expanding" the internal storage of Android, which should have happened ages ago but...).
This means that your brand new 32 GB phone wont be able to have a lot of big applications like Google Maps with offline areas or Maps.me etc.

Solutions for getting more storage to apps 

Non-rooted users
Users who do not have a rooted phone are left with 2 options for getting more storage.

Solution 1:
Use the old method to free space on the built in storage; Androids native App2SD aka moving apps that allow it in settings. This is limited to apps that chose to allow it, and apps can also choose what they want to be able to be moved to the external SD card. 

In order to do this you need to format the SD card inside settings -> storage -> SD-card -> format 
Then for some apps, you can move some parts using the native Android App2SD method in settings. 

Solution 2:
You can actually use the new Marshmallow features, but it requires a computer with ADB (Android Debugging Tools) installed.
This will allow you to both have a partition for media files/general files (whatever you want basically) which will be visible (read-/writeable) in Windows or other OS, and on the phone.

In order to do this I recommend making sure there's no more than 1 partition on your MicroSD and it's empty. If the MicroSD card is in your phone, shut it down and take it out.
Then make sure there isn't a extra internal SD card under storage in your settings (which is highly unlikely, because then you probably wouldn't be reading this guide), if there is, disconnect it.

Then follow this guide on how to use ADB to split the SD card into 2 partitions (technically 3). Below is a video on how to do that, and an alternative text guide.
As I talked about earlier, you can have a partition for media files ("Portable Storage" partition) and one for apps ("Internal Storage" partition), which is very neat, so make sure to use the mixed command when following this guide.
Otherwise you will end up with only 1 partition on your MicroSD card which is encrypted and can only be used for internal apps, and can only be used on one phone!



For instance this command will make 78% of your SD card into the FAT32/exFAT (not sure exactly what Samsung chooses, but one of these) partition which can contain media files, and the remaining 22% will be for internal data (applications)
sm partition disk:179,0 mixed 78
Alternative text guide:
http://bgr.com/2016/03/11/galaxy-s7-edge-tips-microsd-adoptable-storage/

After this I recommend using a tool to rename your SD card's FAT32/exFAT partition (the one for media files and not apps, the one which is visible in Windows). If you don't do that, you will be presented with 2 identical names when using the native App2SD (which also works with this method). It'll look like this screenshot:

Shut down the phone, take the MicroSD cart out, and connect it to Windows (you will need some kind of SD card reader/adapter, I own a cheap one bought from china). You can ex use Windows Explorer to rename it by right clicking the disk (it should be the only one visible) and give it a label like something like PortableM.
Apply changes, and put the card back into the phone.
Now you can see the difference between the internal SD card partition, and the "media" SD card partition.

You can now choose to migrate/move some installed apps if you go to settings -> storage, click on the internal (MicroSD) SD card storage, and then click on the top right corner to get the dropdown list, click Migrate data.
Screenshot:

Now you have the option to use App2SD, or the new Marshmallow method to move apps into your MicroSD card AND you can still use it as a normal SD card for files visible in Windows!

Rooted users
If you wish, you can used the pre-Marshmallow method, Link2SD to aquire the maximum of freedom to choose what you want on your SD card. However the most popular app (Link2SD) for that is not updated yet for Marshmallow, and requires a workaround.

Bonus info: The storage when looking at it from Windows

When using solution 1 you can put pictures, videos, text files etc into the external storage (your MicroSD card) and you will be able to see these files when your phone is connected through a MicroUSB cable to your computer.
You can not, however, see the folder containing the application files you may have moved with the native App2SD method. 

If you connect the SD card directly to the computer with a SD card reader, you won't be able to see the card, nor the data inside, as it is encrypted (or running some odd file system). You can still see and format the card using MiniTool Partition Wizard Free Edition though, but that won't be useful if you wished to copy the application files for backups etc.

If using solution 2 and formatted into 2 partitions as described above:
It will show the "Portable Storage" partition in Windows (The FAT32 one which can be used for media files etc) when phone the is connected with SD card inside. It doesn't show applications which is moved (using App2SD or with the Migrate data to the "Internal Storage" partition). 

You can however see the .android_secure folder, which contains the application files you moved to the Portable Storage using the native App2SD. 

Switching/upgrading SD cards
If you later want to switch your SD card with a bigger or just another one, there's a good chance you'll loose some data. To switch to another SD card, the general technique is to move all data from the SD card to the phone using Android's built in tools and the apps settings.

Moving data from the Adaptable Storage partition is only possible by manually moving all apps that's on the partition in the android application settings to the phone. You can use a program like AppMgr III to see which apps is on the SD card (the Adaptable Storage partition), and move them one by one.

The Portable Storage partition may also contain app data, which some apps like Spotify uses. In some of the apps' settings you can choose where it puts its data like Spotify and Maps.me, and you can move the data to the phone. The rest of the files is just "flatfiles" (like images, documents etc) and you can back them up by putting the SD card into a SD card reader (possibly more safe than connecting the phone with USB and copying that way) in a computer, and copy them as usual

When you have moved all the app data from the 
Adaptable Storage and Portable Storage to the phone, and taken out the old SD card, the phone will come with a notification saying the SD card can't be found, and you can deregister it.
WARNING: When deregistering, there's no turning back! You can't get the encrypted data from the Adaptable Storage recovered, and if there's app data left on the Portable Storage it's very much likely impossible to "reconnect" to its app on the phone. Some apps like Spotify and Google Maps are smart enough to recognize that there's a new SD card and find the old data, but most apps are not.
You can then shut down the phone, and put the new SD card. Then follow the above guide to format the new SD card. When that's done, transfer the backed up flatfiles to the Portable Storage partition on the new SD card, and you can start moving apps to the Adaptable Storage as before.


This was my first guide, feel free to leave a comment containing feedback. Or if you have found a mistake, feel free to point that out too!