Tuesday, October 21, 2014

LSD-based Conky for Linux

LSD-molecule based Conky
>> make sure to have a look to how to install and use Conky <<


I used to like Manjaro Openbox edition Conky : 

But, some points were not fitting my needs : 
  • i didn't want that slighlty modified lysergic acid picture with M.A.N.J.A.R.O letters added to it.
  • No need of SWAP and /home use in my case
  • Better need % per CPU and acpitemp.

So, here is the re-worked picture (made to be displayed on dark background) : 

Paste the picture in ~/conky/conkypic/lsd.png (or edit the last line of the script to point where you placed the file)

And here is the reworked .conkyrc content : 
Code:
#Conky widget by m@, based on Manjaro Openbox edition conky
update_interval 1
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1
imlib_cache_size 0
double_buffer yes
no_buffers yes
use_xft yes
xftfont Droid Sans:size=9
override_utf8_locale yes
text_buffer_size 2048
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,sticky,skip_taskbar,skip_pager
alignment top_right
gap_x 10
gap_y 60
minimum_size 280 0
default_bar_size 30 8
draw_shades no
default_color c5c5c5
default_shade_color 000000
color0 8DBC68
color1 c5c5c5
color2 c5c5c5
own_window_argb_visual yes
own_window_colour 000000
own_window_argb_value 0

TEXT
${goto 180}${color0}${font Droid Sans:style=bold:size=13}${voffset 40}${exec whoami}
${voffset -30}${font Droid Sans:style=Bold:size=12}${color}${goto 40}${uptime}
${goto 80}${color1}${font Droid Sans:style=Bold:size=12}${color1}${sysname}${color}${font}
${voffset 90}${goto 20}${font Droid Sans:style=bold:size=30}${time %H:%M}${font}${goto 175}${font Droid Sans:style=Bold:size=11}T°C
${goto 175}${font Droid Sans:style=Bold:size=11}${color1}${acpitemp}°C
${voffset 40}${goto 35}CPU0-1${color1}${goto 128}CPU2-3
${goto 38}${font Droid Sans:style=Bold:size=10}${cpu cpu0}-${cpu cpu1}%${goto 134}${font Droid Sans:style=Bold:size=11}${cpu cpu2}-${cpu cpu3}%${font Droid Sans:style=Bold:size=11}${color1}${font}
${font Droid Sans:style=Bold:size=11}${font}
${voffset 10}${goto 90}${font Droid Sans:style=Bold:size=11}RAM
${goto 90}${font Droid Sans:style=Bold:size=11}${memperc}%

${image ~/conky/conkypic/lsd.png -p 10,0}

















.
This Conky displays the following : 

  • username
  • system uptime
  • time
  • acpitemp
  • cpu0 to cpu3 % use
  • RAM % use


>>> Dedicated git is now available <<<

Saturday, October 18, 2014

Motorola Moto G (Falcon) Unlocking Bootloader

Unlocking Bootloader
This tutorial is made for Motorola Moto G (Falcon); general FAQ available here 
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed.
* YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
>>> Unlocking Bootloader will overwrite any data stored on your device, backup your files before proceeding <<<


For 4.4.2, an updated guide is available here

For real GPe devices (not ones with a GPe ROM added on it after the purchase), NO code is needed, simply skip to "3. Unlock"



1- Register to Motorola website

2- get your Device ID
  • Put your device in fastboot mode (power off, then press the power and volume down buttons simultaneously).
  • On your desktop, open a command prompt or terminal, and go to the directory where you installed the Android SDK tools (or make sure fastboot is in your $PATH)
  • At the prompt, type
Code:
$ fastboot oem get_unlock_data
  • The returned string will be used to retrieve your unlock key.
Example: On a Windows Desktop, the returned string format would be
Code:
$ fastboot oem get_unlock_data
 (bootloader) 0A40040192024205#4C4D3556313230
 (bootloader) 30373731363031303332323239#BD00
 (bootloader) 8A672BA4746C2CE02328A2AC0C39F95
 (bootloader) 1A3E5#1F53280002000000000000000
 (bootloader) 0000000
On a Mac OS Desktop, the returned string format would be
Code:
INFO0A40040192024205#4C4D3556313230
 INFO30373731363031303332323239#BD00
 INFO8A672BA4746C2CE02328A2AC0C39F95
 INFO1A3E5#1F53280002000000000000000
 INFO0000000
Paste together the 5 lines of output into one continuous string without (bootloader) or ‘INFO’ or white spaces. Your string needs to look like this:
Code:
0A40040192024205#4C4D355631323030373731363031303332323239#BD008A672BA4746C2CE02328A2AC0C39F951A3E5#1F532800020000000000000000000000
3- Unlock
  • Check if your device can be unlocked by pasting this string in the pecific field on the Motorola website, and clicking “Can my device be unlocked?”
  • NOTE: If your device is unlockable, a "REQUEST UNLOCK KEY" button will now appear at the bottom of that page.
  • after you got the code type the following :
    Code:
    fastboot oem unlock <code>
    or for GPe devices :
    Code:
    fastboot oem unlock
    and wait your device to reboot !


4- Enjoy 


5- to relock, (pointless, isn't it?)
Code:
$ fastboot oem lock

Tuesday, October 14, 2014

Orzly Premium Tempered Glass : Screen Protector

Orzly Premium Tempered Glass : 
Screen Protector for Moto G (Falcon/Peregrine)


Ordered two screen protectors (one for my Falcon, and one for a Peregrine : same Screen, so same Protector)




Features (as claimed on the box)

  • Oleophobic Coating (Orzly Tempered Glass Screen Protectors have an oleophobic coating, this hels prevent fingerprints and other contaminants as well as making it easy to clean).
  • Whole Transparency (The silicone adhesive surface ensures there are no gaps between the screen protector and your screen. This helps to ensure the clarity of your screen is not reduced).
  • 8-9H Surface Hardness (Stronger than PET film screen protectors).
  • 0.24mm thickness (Made from chemically treated, transparent tempered glass, the screen protector is only 0.24mm thick, making it ultra thin and light).
  • Sensitive Touch (Highly responsive with your device's touch screen).
  • Shatter Proof (If shattered, the screen protector breaks into small pieces that do not have sharp edges. This makes them safe to use).


What's in the Box?
  1. Tempered Glass Protector
  2. Alcohol cleaning cloth (wet)
  3. Cleaning cloth (dry)
  4. Applicator card
  5. Dust remover stickers (x2)
  6. How-to
After opening the main box : 
Alcohol cloth, dry cloth and small applicator card, paper box
In the paper box (click to enlarge the pictures and read the How-to) :
Tempered Glasse Screen Protector, 2 stickers, How-to



How to apply?
  1. Go somewhere there is NO dust (a wet atmosphere is recommended, since dust won't fly freely ==> i didn't applied in this conditions, consequently, some dust came in the process (see below)
  2. Remove the previous screen protector used if any
  3. Use  the alcohol cloth to clean the screen surface
  4. Dry the screen with the microfibre (dry) cloth
  5. Use Dust removing stickers to eliminate any residual dust
  6. Pull back the plastic layer (labelled "(1) Please peel off this mask BEFORE application)
  7. Carefully position the screen protector onto the device's screen. Make sure to align correctly the speaker cut out with the screen's one. /!\ at this time, any single piece of dust hanging around in the room will come simply to take your work down /!\
  8. Press down gently at the center of the screen so that the protector's adhesive will spread (mostly no need to press much, positioning on the screen will start spreading)
  9. Use the applicator card to push out the edges (it is said that small bubbles will disappear in 1~2 days ... we'll see... 
  10. Clean the Screen Protector and enjoy :D


Result?
Looks as if there were nothing on the screen ...


But i failed somewhat and a little piece of dust got stuck (creating the small bubbles on the bottom right of the pic, near power button): 
    
Edit : looks like the bubbles are slowly vanishing (silicone layer in action) ... only little light deviation/diffraction due to the very small piece of dust stuck, but it is now so small that only an attentive look allows to see it, no impact on user experience anymore.

Pros & cons
Pros : 

  • Won't get scratched easily as a PET (plastic) film would be
  • Better screen protection than PET film?
  • Better transparency than PET film (and should not get yellowish with time passing)
  • User cannot say if there is a protector or not by finger feeling
  • If well applied, user cannot say there is something on the screen (by sight)
  • regarding package : it is great to have a good looking package AND all accessories needed to perform the application.
Cons :
  • Will break on shock where a PET screen would get slightly deformed but resist.
  • Fingerprints will stick despite Oleophobic coating (not more than with PET film though) 
  • Expensive (got it for 10€ when a PET film costs 1) ==> But worth the price!
  • Thickness is low, but it was nearly too thick to correctly cohabit with my protection case, make sure your case will accept this extra thickness before purchasing!

NB : Application is quite tricky, as much as it is to correctly apply PET film, simply different : so no way to compare both on this side.

Moto G (2013 non-LTE : Falcon) FAQ

Frequently Asked Questions
Motorola Moto G



Read Before Asking Please

This a short list of frequently asked questions in this device forum and the answers often given as a response. It should serve as a starting point for gathering knowledge and finding solutions to many common problems.

This post is a fork of my own FAQ thread available on XDA forums.

To Browse quickly the FAQ and find what you need, Ctrl+F is the key feature
You may search in Motorola help topics too
Table of content :
Refer to :

Q1: What are Moto G (Falcon) tech specs ?
The Motorola Moto G is named XT1032/XT1033/XT1034/XT1035/... aka Falcon

XT1028: Verizon US CDMA - 8GB/16GB
XT1031: Boost US CDMA - 8GB/16GB
XT1032: EU/Global GSM/GPe - 8GB/16GB. (GPe = Google Play edition) 
XT1033: Brazil - 8GB/16GB (Colors Edition) (Dual Sim) + Moto G (Music edition) (Dual Sim) (16GB Only)
XT1034: US GSM - 8GB/16GB. 
XT1035: Brazil - 8GB/16GB (Colors Edition) (Unconfirmed)

Moto G 4G/LTE aka peregrine : ==> /!\ Roms made for standard edition (non-4G) are not compatible with these devices!
XT1045: Moto 4G - 8GB 
XT1039: Moto 4G - 8GB UK/EU
XT1040: Moto 4G - 8GB Brazil

Complete specifications available in Mr hOaX Tips and Tricks thread

Q2: What is the .................................................. .................................................. ....?
[...]
Q3: Why doesn't the LED work ?
maybe you disabled LED on you older device (or it didn't even have one) setting up you google account disabled the LED on you new Motot G use Notification Light Widget From Motorola to fix this issue (more info)
Q4: How to access Fastboot?
Hold PowerButton and VolDown during boot.
Q5: How to unlock Bootloader?
Boot to Fastboot and follow this guide
or Motorola guide on Motorola's website
Q6: How do i get adb and fastboot drivers ?
For windows, follow this guide or this one
although, it seems Motorola Device Manager works ok for win7x86-32 (but not for win7x64-64?) i cannot answer this i'm under linux
other USB drivers if first method failed, source
For Linux, get fastboot files here also, adb and fastboot can be installed using repos for ubuntu-based distros packages needed are : android-tools-adb and android-tools-fastboot (android-tools-fsutils may be useful too)
eg:
Code:
sudo apt-get install android-tools-fastboot
Q7: How to flash Stock Firmware?
For windows, follow this guide or this video
The above is for non-4G devices, for Moto G 4G version refer to this thread
Q8: How to Root my device ?
Until now,you first need to unkock your bootloader,
Option 1 : then follow this guide [original thread - on MoDaCo]
Option 2 : via a customized recovery [original thread, on MoDaCo]
Quote:
Originally Posted by paulobrien 
The first method is recommended as it doesn't mess with the recovery. But the second is there as a backup. 
==> Option 1 seems not to work properly for some users, in that case : Try Both.
After you get root, please read Q19
Q9: Why dosen't my .apk get installed manually?

Until i get a better solution, here are some workaround :
  1. Check you've enabled Unknown sources (settings>security>unknown sources)

    If you did so, there are some workaround :
  2. At the phone first set-up (you may need to factory-reset to get that) - When Motorola assistant asks for data safety (just before the Google accounts question comes up), don't click accept, but tap on "data safety guidelines" and tick both settings to off. Then accept.
  3. Use adb :
    Code:
    adb install packagename.apk
  4. Use google drive to download the app (gdrive has an antivirus scanner that checks the app, since then it is considered as "safe" for the device and is correctly installed
  5. other workaround
Q10: Where can i find a Custom recovery ?
Q11: How to access bootloader?
- Via ADB :
Code:
adb reboot bootloader
- The hard(ware) way :
  1. With the phone powered off, press the VOL DOWN KEY for 2-3 seconds then POWER key then release.
  2. The device will display different BOOT OPTIONS
  3. Use the VOL DOWN Key to SCROLL to Recovery and VOL UP Key to select
Q12: How to access recovery?
  1. using terminal, if the device is already rooted
    Code:
    su
    reboot recovery
  2. via adb
    Code:
    adb reboot recovery
  3. via bootloader
    boot to bootloader (see Q11) and select recovery (use Use the VOL DOWN Key to SCROLL to Recovery and VOL UP Key to select)
  4. via external app
Q13: How to force reboot my frozen device?
  • Press and hold the Power button for 10 - 20 seconds, the device will restart and go through the boot-up sequence [source]
  • (VOL DOWN hold + a quick tap on POWER should force reboot when in bootloader) [source]
Q14: How to charge my device and extend battery life?
Follow Motorola tips:
Q15: Does rooting/unlocking your phone invalidate its warranty? (In EU)
In short: No. Just the fact that you modified or changed the software of your device, is not a sufficient reason to void your statutory warranty. As long as you have bought the device as a consumer in the European Union.
[source]
Q16: What to do if my battery is fully discharged and not re-charging?
Quote:
Originally Posted by Motorola
If your battery is completely discharged, it may take several minutes for the device to begin charging. The battery needs to charge to a minimum voltage before the system can boot up, and this may take a few moments to achieve.
You may have experienced the 'sudden battery drop' : go to Q25 [source]
Also refer to Moto G will not power up (Q28)
Q17: OMG i really bricked my device... Any chance getting it back to life ?
If your device is apparently dead, and does not look like a phone when connected to PC, then have a look at this guideby @Boss442
Q18: How to flash Stock Radio (aka Baseband) / Kernel and why?
Flashing the latest Radio may help if you have problems with poor signal or wifi coverage. Flashing the SS (Single Sim) radio on a Dual Sim device may cause one or both Sims to stop working. Likewise, flashing the radio from a non-CDMA device to a CDMA one, is a very bad idea.

Flashing a newer / different Radio or Kernel may improve battery-life and general performance

ClockWorkMod Recovery or TWRP is required to flash these images.
http://forum.xda-developers.com/show....php?t=2649763
Q19: Lost IMEI ? : How to backup / restore PDS partition and why?
On Motorola devices the 'pds' partition contains information specific to your machine: IMEI, MAC address, serial number, etc. This partition can be lost by accidental format or over time due to filesystem corruption. If you have made a backup, there is a good chance you can bring your handset back to life.

==> PDS backup will help to restore lost IMEI. It is a situation when the phone reports that the IMEI is unknown. ;This works like a vaccine, apply before having issue with IMEI, after it will be too late !

Instructions:
**Root Required**

Using ADB you can make a copy of the partition and move it to a safe place (Google Drive?):
adb shell
su
dd if=/dev/block/platform/msm_sdcc.1/by-name/pds of=/sdcard/pds.img
To restore in the event of corruption or loss:
adb shell
su
dd if=/sdcard/pds.img of=/dev/block/platform/msm_sdcc.1/by-name/pds
(assuming you've pushed pds.img to internal SDcard storage first)

If for some reason this doesn't work, maybe your IMEI isn't destroyed but only not "readable" by system (file system issue? misread cluster reading frame ? no idea), in that case you may read the following story : http://forum.xda-developers.com/show...php?p=52648789

Q20: How to disable/enable auto On/Off screen with Flip Shell?
  • for stock rom : (disabling, since it's enabled by default)
  • for CM11: (enabling, since it doesn't work by default)
Follow this FAQ
Q21: how to remove the 'unlocked warning' message?
Follow @ffosilva method and default Motorola logo will be back 
Q22: Why and How convert Moto G GPe to non-GPe ?
GPe uses EXT4 for it's 'userdata' filesystem, non-GPe uses f2fs. The GPe kernel expects an EXT4 partition and gives an encryption error if there isn't one. So just flashing a custom ROM won't work on GPe.
Converting a GPe MOTO G to a non-GPe Moto G:
(we would need someone to approve this method, and if you made it a different way, please, tell us)
1) Fastboot flash retail US XT1032 stock firmware found here:
http://sbf.droid-developers.org/phone.php?device=14
2) This will wipe the device, replace GPe kernel and radio with stock non-GPe versions and create a new partition table with f2fs filesystem for 'userdata.'

3) Custom ROMs will now work and as will all Motorola Moto G apps.

Q23: How to reboot into 'safe mode'?

Press power button, on the pop up, either keep pressing 'shut down' [stock] or 'reboot' [AOSP based]
more infos about this feature
Q24: How to keep backups on my 8GB device without loosing space?

To backup :
  • Use a micro USB-OTG adapter and a USB-storage
  • boot to recovery
  • go to backup and storage > backup to /storage/usbdisk
  • wait (it is really slower than when done to /sdcard ==> especially when generating md5sum!)
  • reboot your system
To restore your backup :
  • Use a micro USB-OTG adapter and the USB-storage where the backup is located
  • boot to recovery
  • go to backup and storage > restore from /storage/usbdisk
  • wait (it is really slower than when done to /sdcard)
  • reboot your system

Enjoy !
You now have a way to keep all your backups, without over flooding your device's storage ! (make sure you won't loose the external storage and keep it safe!)
Q25: Abrupt Drop Battery Issue (Battery suddenly drops to 0%)

Description: This issue appears to affect all versions of Moto G; while some people never experience it, others have it frequently. Most likely to occur when tethering / using USB cable. Android versions 4.3 and 4.4.2 are vulnerable.

Solution: Issue fixed in Android 4.4.3.

Quote:
Originally Posted by Kirk Stromberg
If anyone else experiences this abrupt drop on your Moto G *after* updating to 4.4.3, we'll need your serial number/IMEI for further investigation and may need to be in more direct contact. Please send an email to:

supportforums@motorola.com

- with the title "Abrupt Drop" and
-include your serial number (Settings>About Phone>Status) and
- note to please forward to me (Kirk Stromberg).

We'll obviously keep working this here in the forums as well but want to isolate anyone still having this on 4.4.3, especially if it is repeats with some frequency. I know it is reproducible fairly reliably for some of you (tethering/USB cable).
https://forums.motorola.com/comment/785885
Q26: Isssues with MMS on boost mobile with Moto G ?

Apply the following changes :
apns-config.xml
Code:
<apn carrier="Boost Mobile" mcc="311" mnc="870" apn="n.boost.ispsn"
mmsproxy="68.28.31.7" mmsport="80" mmsc="http://mm.myboostmobile.com"
type="default,supl,mms,fota,dun" carrier_enabled="false" protocol="IPV4V6"
roaming_protocol="IPV4V6" bearer="13" />
build.prop
Code:
ro.cdma.home.operator.numeric=311870
ro.cdma.home.operator.alpha=Boost Mobile
ro.telephony.default_network=13
telephony.slteOnCdmaDevice=1
get more here
Q27: Miracast / TV Screen-mirroring / DNLA app not working?

Description: Android 4.4.2 added a 'Settings > Display > Cast screen' (Miracast) option, but it does not function - missing settings menu.

Solution: (Root Required)
This feature now works correctly with Android 4.4.3. However, you still need to enable the 'Cast screen' settings menu by adding the following line (if not already present) to /system/build.prop:
persist.debug.wfd.enable=1
For quick access to the feature, install: Miracast Widget.

Additionally, 4.4.3 improves compatibility with Allcast and BubbleUPnP, along with other DNLA apps that did not operate correctly in 4.4.2

Simultaneous Internet connection and Screen-mirroring is not possible in Stock Motorola Firmware 4.4.3 or 4.4.4. This may change with a future update or with the release of Android 'L.' Most Custom ROMs do however support this ability.

The utility SecondScreen (root required) allows Moto G's screen resolution to be easily changed when Screen-mirroring - e.g. 720p or 1080p. The app has several additional features such as turning the phone's screen off and disabling haptic feedback in order to save battery usage while Screen-mirroring.
Q28: Moto G will not power up (addition to Q16 and Q25)
  1. Plug it into the charger
  2. Hold the VOL DOWN key
  3. While still holding the VOL DOWN key, press and hold the POWER key
  4. Hold both keys down for over 120 seconds. This is more than two minutes and will seem like a long time. You might want to time yourself to make sure you hold it longer than two minutes.
  5. After holding the keys down for more than two minutes, release them.
  6. The Flash Boot screen will display, and the Normal Reboot option will be highlighted
  7. Press the VOL UP key and the device will start a normal reboot.

If you have tried the above and it didn't work, try this:
  • Plug in the phone for 15 minutes.
  • Proceed to Step 2 above.
Source: https://forums.motorola.com/posts/3d5eadc25d
Q29: 4.4.3 / 4.4.4 update issues
If after getting the update to 4.4.3 / 4.4.4 you encounter some problem, there are several options:

App-specific issues: Some apps may simply not be compatible with the latest version of Android and you have to wait until they are. You could always mention it to the App developer via Google Play.

Anything else: Could be solved be doing a Factory reset: (Back up anything important!)
Setting > Backup & reset > Factory data reset (erase all data on phone)
The best and cleanest way to get to 4.4.4 from a previous version of Android; is to Fastboot flash a Motorola Stock Factory Firmware Image. This can avoid any potential issues that may arise when upgrading via an Over the Air (OTA) update. Also see: "Q7: How to flash Stock Firmware?" in this FAQ.

Stock Factory Firmware Images are available here:
http://sbf.droid-developers.org/phone.php?device=14
When new images are available they are announced here:
http://forum.xda-developers.com/show....php?t=2546251
Q30: i encounter '(bootloader) Preflash validation failed' error message when flashing Firmware Image
You may have updated to Android 4.4.4 via firmware image or OTA update. In this case you now also have the latest version of the Bootloader. That is why you get the above output when attempting to flash a 4.4.2 firmware image. ==> simply flash 4.4.4 images instead.
If the error still occurs, even with a 4.4.4 firmware image, then unlocking bootloader will be necessary.

Sunday, October 12, 2014

AdBlock : Use with Caution

AdBlock : Use with Caution
The following article is not about how i'll be paid by ads since i have too few readers to get consistent rewards with AdSense (and that's not to get money that i tried it, but only to understand its mechanism).
This is more about how big websites need advertisement to survive without the need of creating "premium accounts".



Advertisement is the way Internet content is kept free to browse: 
There are mainly two types of system : 

  • Either you pay to get things 
  • Or the creator needs another option to get rewards even if the user pay nothing.
Advertisement is the second option. The reader don't have to pay anything, but as a drawback he has to stand ads all other the articles.


All is a matter of compromise
  • Blog writer shouldn't apply intrusive ads not to clutter up the blog
  • Blog reader should stand non-invasive ads and only blocks big ones that destroy user-experience.


To support websites make sure you don't block ads on them or that you correctly setup AdBlock to allow "acceptable ads" ==> this is enabled by default, and NEEDS to be kept like this : 


Why is this feature enabled by default?

Unfortunately, this is the only way to accomplish the goals described above. But if the majority of Adblock Plus users have this function activated, advertisers will have the incentive to produce better ads.


This doesn't work correctly on Youtube since all ads are blocked there.
a 30 seconds ads at the beginning of a 20 minutes video is nothing bad. Stand with it and enjoy the video supporting the youtuber !
Here is an excellent video (in French) about Ads and Adblock on youtube :


I might write an article about how AdSense works on my blog as soon as i better understand its mechanism...

Saturday, October 11, 2014

Recycling an old VHS-recorder Power Supply

Recycling an old VHS-recorder Power Supply

A week ago an old broken VHS-recorder came home, driving belts were Out of Order, the 3.7V battery was leaked and the board partially burnt : nothing to get out of this?

In fact many things can be recovered : 

  • Screws
  • Springs
  • Metal housing
  • Motors

But that's not all, since Power Supply didn't looked destroyed, maybe we can find another life for it?

   

First there is a need to know which outputs are common, and then which Voltages are used.



Common outputs (pins):

A quick look to the PCB shows a lot of common wires, a closer look shows the following (verified using a multimeter : 0Ω indicates that the wires are common.)
Numbers are counted from left to right when looking to the port like this :

==> The two groups of pins that are in grey are common.
==> There is a 2Ω resistivity between pins 1 and 2, so i'm not sure they could be considered as common.

Assuming that Antenna blocks are linked to ground and that there is a 0Ω result between Antenna, pins 7:10;17:18, and a large amount of 'open' places on MotherBoard : pins 7:10;17:18 can be considered as ground (i hope so).

Now, Voltages

So there are a large range of Voltages available, but i'll mostly use 12V pins to power PC Fans and a future project i have  :