Coolpad F1 8297W: ROM Update Guide








  1. First, you need to root your coolpad F1 8297W mobile phone.
  2. Install Custom Recovery. You can install eitherCWM or TWRP.
  3. Copy the ROM zip file to your 8297W mobile's SD card.
  4. Turn off the phone.
  5. Hold Volume Up and Power buttons to get into recovery mode.
  6. In the main menu of the recovery mode, select "wipe data/factory reset" to clear all user data.
  7. In the main menu of the recovery mode, select "wipe cache partition" to clear cache.
  8. In the main menu of the recovery mode, select "install zip from sdcard" then select the ROM zip file from SD card to install.
  9. Complete flashing. First reboot may take a while.







see also




rsync script to mirror files/directories








#!/bin/bash

rsync -avx --progress -e ssh "$@"




Python: calculate crc32 checksum for a file








def crc32(path):
    from zlib import crc32
    with open(path, 'r') as f:
        crc = crc32('')
        while True:
            data = f.read(BUFFER_SIZE)
            if not data:
                break
            crc = crc32(data, crc)
    return crc

def main():
    csum = crc32('/tmp/123.dat')
    print(str(hex(csum)))

if __name__ == '__main__'
    main()



Flash Chess Game












Generate a self-signed multiple domain (UCC) SSL certificate








  • Option 1: using openssl
    • Find openssl.cnf
      sudo find / | grep openssl.cnf
      • On Mac OS X, it is /System/Library/OpenSSL/openssl.cnf
      • On Ubuntu Linux, it is /usr/lib/ssl/openssl.cnf
    • Make a copy of openssl.cnf to /tmp/openssl.cnf
      cp /usr/lib/ssl/openssl.cnf /tmp/openssl.cnf
    • Edit /tmp/openssl.cnf and append following line in [v3_ca] section:
      [v3_ca]
      ... ... ...
      subjectAltName = @alternate_names
      
      then append [alternate_names] section:
      [alternate_names]
      DNS.1 = mediaflux.localhost
      DNS.2 = daris.localhost
      
      Also, modify
      copy_extensions = copy
      
      It ensures the SANs are copied into the certificate.
    • Generate private key:
      openssl genrsa -out private.key 3072 -nodes openssl req -new -x509 -key private.key -sha256 -config /tmp/openssl.cnf -out public.crt -days 730 -subj "/C=AU/ST=Victoria/L=Melbourne/O=W/OU=WL/CN=localhost"
  • Option 2: using Java keytool
    • keytool -selfcert -genkeypair -keystore /tmp/certs -alias mflux -storepass password -keyalg "RSA" -validity 3650 -dname "cn=localhost, ou=WL, o=W, l=Melbourne, st=Victoria, c=AU" -ext san=dns:daris.localhost,dns:mediaflux.localhost

see also