Sysprep a Surface Pro 4 and create the WIM image

Par défaut

First you have to install Windows 10 on your Surface Pro 4 (maybe it’s already the case for you)
Then you will have to install what ever you want on that Surface Pro 4 but if you install a program make sure you check the box (if there is one) « Install for ALL users ».

 

Create WinPE Bootable USB Key

Install Windows ADK

Download the Windows Assessment and Deployment Kit here
Launch adksetup.exe
Click Next
Select « No » and click Next
Click Accept
Keep only Deployment Tools and Windows Preinstallation Environment (Windows PE)
adk

Generate WinPE ISO

Press CTRL + R and type « cmd »
Type the following commands in the CMD
cd C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment
For 64 bits:
copype amd64 C:\winpe64
MakeWinPEMedia /ISO C:\winpe64 C:\winpe64\winpe64.iso
For 32 bits:
copype x86 C:\winpe32
MakeWinPEMedia /ISO C:\winpe32 C:\winpe32\winpe32.iso
cmd

USB Key

Now you can download a little tool I use a lot, named Rufus. This tool is useful to create a bootable USB device from an image file like an ISO.
Launch Rufus > Select the ISO > Then change the file system in FAT32.

/!\ You must format the USB key in FAT32 because the UEFI BIOS of the Surface Pro 4 don’t support NTFS (strange right?)

Since we are limited to 5 sysprep maximum per installation I recommend you to try to boot on your freshly created USB Key just to be sure you will not missed the start after the sysprep.

Sysprep the Surface Pro 4

In Windows now go in C:\Windows\System32\sysprep\
And launch sysprep.exe
Check the box « Generalize » and change the Shutdown Options to « Shutdown »
sysprep
Now you can click « OK ».

If you are lucky it will work at the first try. If not, you are like me.

The error

Sysprep was not able to validate your Windows installation. Review the log file at %WINDIR%\System32\Sysprep\Panther\setupact.log for details. After resolving the issue, use Sysprep to validate your installation again.

Go check the log file

First error log

Bitlocker-Sysprep: Bitlocker is on for the OS volume. Turn Bitlocker off to run Sysprep.

It means that Bitlocker is active for a part of the OS. (Even if you didn’t turned it on)

Fix:

  1. In the Start menu search for « Powershell »
  2. Click right on it and « Run as Administrator »
  3. manage-bde -off C:
  4. Wait for Bitlocker to finish to decrypt the drive
  5. Try the Sysprep again

Second error log

Package king.com.CandyCrushSodaSaga_1.62.900.0_x86__kgqvnymyfvs32 was installed for a user […]

Again even if you didn’t installed the application you have it in the retail Windows 10 iso.

Fix:

  1. In the Start menu search for « Powershell »
  2. Click right on it and « Run As Administrator »
  3. Import-Module Appx
  4. Import-Module Dism
  5. Get-AppxPackge -AllUser | Where PublisherId -eq kgqvnymyfvs32 | Format-List -Property PackageFullName,PackageUserInformation
  6. Copy the PackageFullName
  7. Remove-AppxPackage -Package PackageFullName
  8. Try the Sysprep again

In my case I had to do this step again for com.Twitter_5.0.0.0_x86__wgeqdkkx372wm

Fetch the Windows 10 WIM image

Now your Surface Pro 4 is shutdown (don’t start it yet or you will have to do the sysprep again!). Plug-in the WinPE USB Key to the Surface Pro 4 or to his Microsoft Dock (both works).

Press the Volume-Down key and press the power button. Once you see the Surface logo you can release the Power button but keep the Volume-Down pressed. Then the surface is starting WinPE. You should see a command line interpreter.

At that moment X: is your currently running WinPE and C: is your Surface Pro 4 system drive.

In my case I plugged-in a second USB Key (E:) formatted in NTFS (to not be blocked by the 4GB size per file of the FAT32)

Type:
dism /capture-image /imagefile:E:\Surface.wim /capturedir:C:\ /name:Windows

Wait for the end of the capture and type exit

Now you have a beautiful Surface Pro 4 image and you can use it with SCCM for example and it will works perfectly 😀

Update your rooted Nexus from Android 5.1.1 to new 5.1.1 without losing data

Par défaut

I did the manipulation on a Nexus 5 (2013) who was on Android 5.1.1 (LMY48B) rooted.
Now my phone have Android 5.1.1 (LMY48I) rooted and I didn’t loose data during the process.
I used Windows but you can do it on linux and Mac OS the same way.

This procedure works for LMY48M too.

Please note that I will not be responsible if you loose data or brick your phone. Please do a backup BEFORE the procedure just in case of.

Download the new android image for your Nexus here

Download the Android SDK, it will provide the tools (adb and fastboot command) we need.

Extract the Android SDK archive
Go on the extracted folder tools/ and launch android.bat (for Windows) or open a terminal on linux and Mac OS and execute in the same folder the commande ./android

Deselect every boxes and select Android SDK Platform-tools
Click on Install 1 package…
Accept the license and launch the install

Extract the Android image of your Nexus (on Windows you can use the program 7-zip to extract the .tgz) (for me it is named hammerhead-lmy48i-factory-a38c3441.tgz)
Open the extracted folder and extract again the zip file (for me it is named image-hammerhead-lmy48i.zip)
Copy the following files in android-sdk-windows\platform-tools (or equivalent for linux and Mac OS) :
– boot.img
– system.img
– recovery.img
– radio-hammerhead-m8974a-2.0.50.2.26.img (or equivalent depending of your Nexus)

Restart your Nexus in the Bootloader
To do this, power off your Nexus and hold VolUp, VolDown and Power button until you see the bootloader
Or activate the USB debugging and type ./adb reboot bootloader

Now open a terminal (for Windows press WINDOWS + R keys and type cmd)
Go on the android-sdk-windows\platform-tools (or equivalent for linux and Mac OS)
Type the following commands:
fastboot flash radio radio-hammerhead-m8974a-2.0.50.2.26.img
./fastboot reboot-bootloader
./fastboot flash recovery recovery.img
./fastboot flash boot boot.img
./fastboot flash system system.img

! Keep the terminal open, you will need it after !

Restart your Nexus (use the VolUp/VolDown buttons to select restart in the bootloader and push the Power button to select)

Now you have to download the custom recovery (here I used Clockworkmod but you can use another one, it’s relatively the same procedure)
Download Clockworkmod for your Nexus
Extract the archive and put the .img (here recovery-clockwork-6.0.4.5-hammerhead.img) file in the android-sdk-windows\platform-tools (or equivalent for linux and Mac OS)

Download SuperSU (to root your Nexus)
And copy the file on your Nexus

Restart your Nexus on the bootloader again
On the terminal, enter the following:
./fastboot flash recovery recovery-clockwork-6.0.4.5-hammerhead.img
./fastboot reboot-bootloader

Select the Recovery option of the bootloader
You should now see the custom recovery menu

Select install from zip
Select the UPDATE-SuperSU-v2.46.zip file
Install it and reboot your phone (you don’t need to select « Fix root » option)

Done.

Based on the article of Aaronhastings.me

How to upgrade OwnCloud when it’s stuck on maintenance message ?

Par défaut

The message :

This ownCloud instance is currently being updated, which may take a while.

This page will refresh itself when the ownCloud instance is available again.

Contact your system administrator if this message persists or appeared unexpectedly.

Thank you for your patience.

Solution :

If you have a console access, go to your owncloud directory (eg. /var/www/owncloud/)

Execute the following command :

# su -c "php occ upgrade" www-data

If you don’t have a console access, the only bad solution is to edit the configuration file config/config.php and to change the value of maintenance to false

'maintenance' => true,

Become :

'maintenance' => false,

Having a WordPress blog behind a Nginx reverse proxy secured with SSL

Par défaut

Add to your wp-config.php file on the backend server the following lines :

if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
       $_SERVER['HTTPS']='on';

And add to your Nginx reverse proxy config file this line :

proxy_set_header X-Forwarded-Proto https;

P.S. if you have some mixed content (insecure) just install the plugin WordPress HTTPS (SSL)

Source: WordPress

SJCAM SJ1000 SJ2000 SJ3000 SJ4000 WiFi Firmware Update

Par défaut

SJ1000

Download link : 20140424.zip (latest)

SJ2000

Download link : 20131104.zip (latest)

SJ3000

Download link : 20140423.zip (latest)

SJ4000 WITHOUT WiFi

Download link : 20140424V01.zip
Download link : N201405270ZV01.zip
Download link : N20140714V05.zip
Download link : N20140729V02.zip
Download link : N20140819V01.zip (aka. N20140820V01)
Download link : N20140929V01.zip (latest)

SJ4000 WITH WiFi

Download link : W20140811V02.zip
Download link : W20140915V02.zip
Download link : W20140918V02.zip
Download link : W20140928V02.zip (latest)

You can share firmware by leaving a comment under this post !

Un problème de locales

Par défaut
perl: warning: Setting locale failed.    
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LANG = (unset)
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

Solution:

1. Ajouter la locale au système
root@hostname ~ # dpkg-reconfigure locales

2. Sélectionnez, avec la barre d’espace, la/les locale(s) que vous désirez (ici je vais prendre en_US pour l’anglais). Finissez par la toucher « Enter ».

3. Ajouter la ligne suivante au fichier .bashrc avec votre éditeur de texte préféré
root@hostname ~ # vi ~/.bashrc
export LC_ALL="en_US.UTF-8"
4. Chargez!
root@hostname ~ # source ~/.bashrc

Done. 😀