Monday, 16 January 2017

Reflashing / Unbricking Chinese Smart Phone



I recently bought an Leagoo M5 for my father, my son already owns one of these phones are it certainly does the job for the price.

My father Leagoo bricked 1 hour after installing the latest system updates.

Being familiar with flashing phones (experience of Cyanogenmod), I thought I'd attempt to reflash the operating system. 

There's lots of misleading information on the internet about the subject so I'd thought I'd document my experiences.

Things you need for a  re-flash:

1. A copy of the stock operating system image, this can usually be downloaded from your Smart Phones support webpage.

2. Smart Phone Flash Tool aka SP_Flash_Tool, ensure the you get the latest one (I used 5.1648).

3. A copy of USBDeview.exe (Nirsoft's)


Instructions

a. Run USBDeview and remove any copies of the MediaTek USB port driver.

b. Switch your phone off and connect to the PC via USB, the driver should automatically install.

c. Unplug your phone and REMOVE the battery.

d. Run the SP_Flash_Tool 

1. Select Download Agent (This is bundled for with the SP_Flash_Tool).

2. Select the Scatter Loading File, this will be located in the same directory where the stock rom for your phone. If you get a check sum error when load this file, delete the checksum.ini from the stock rom directory.

3. Make sure download only is set.

4.Press the download button.

e. Remove the battery from the phone.

f. Hold Volume Up/ Volume Down on the phone and insert the USB cable.

If everything is done correctly the flashing should begin.



Friday, 9 September 2016

Broken Windows Spotlight

I recently install Windows 10 Pro and updated it to anniversary edition, after logging into our domain I noticed that Windows Spotlight had stopped working and the preview screen was grey.
Should this happen to you try the following solution:


  1. In Personalization->Lock Screen settings change Background to Picture.
  2. Delete everything from folder 
    C:\Users\<USERNAME>\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_<somerandomcharacters>\Settings
  3. In Personalization->Lock Screen settings change Background back to Windows Spotlight

Thursday, 19 November 2015

WPF Development for Windows 10

WPF Development for Windows 10

We are currently developing LOB applicatons for Windows 10, we have decided not to develop native Windows 10 applications due to the fact that the applications have to be loaded on each users machine in the App Container. So we have turned back to generic WPF desktop Applications.

My toolset so far is:

Mah Apps for UI
Caliburn.Micro for MVVM
ProperyChanged.FODY for Project Change Injections.

I will be amending this as new tools/frameworks as used.

Thursday, 17 September 2015

DOM 1084 WSearch

Ever had the dread black screen after boot on Windows 7,8 and 10 and the only thing you can do to get to the desktop is boot in Safe Mode?

You then look at the event viewer only to see thousands of
DCOM got error "1084" attempting to start the service WSearch with arguments "" in order to run the server:
{9E175B6D-F52A-11D8-B9A5-5050545030}

My solution was to remove the graphics driver and reboot, hope that helps.

Edit:
The problem is rectified by getting into Safe Mode creating a new user (as Administrator), rebooting and logging to the new user and removing the old user.
This seems to fix the problem and I have had this happening on 3 devices.

Friday, 3 July 2015

SSL and ServiceStack

SSL and ServiceStack

Ok now I have my ServiceStack working with Android using the native ServiceStack client (AndroidServiceClient). I have now implemented SSL. I've opted for Self Signed Certs at the moment.

My current setup is:


Desktop->Cisco Router->Android

The desktop requires the Self Signed Certificate creating, I'm using SelfSSL.exe for the job.
C:\ssl>selfssl /N:CN=YourSerivceName /V:9999

C:\MMC
Then Add Snap-In Certificate Manager running under Local Machine.
Copy your  YourSerivceName cert to the Trusted Root Certification Authorities

C:\netsh http add sslcert ipport=0.0.0.0:xxxx appid={yyyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyy} certhash=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

Where:
xxxx is the listening SSL port
{yyyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyy}  is the the assembky guid from AssemblyInfo.cs in your ServiceStack application.

zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz is the Thumbprint from your YourSerivceName certificate.

In may case the to allow port xxxx through on my desktop firewall.
On my cisco router I have forward the port:
ip nat inside source static tcp desktop.pc.address xxxx my.wan.addreess xxxx extendable

Then allow the port to be accessible on the inbound rule
access-list aaa permit tcp any host my.wan.address eq xxxx

To test the port is open, start your ServiceStack application
new AppHost().Init().Start("https://+:xxxx/");
then use a free online port checking tool to see if all in ok. I use ww.yougetsignal.com/tools/open_ports/  

Congratulations you created a ServiceStack SSL service! 
 

Wednesday, 1 July 2015

AndroidServiceClient with Authentication

I'm currently researching ServiceStack as a replacement to my own services for handling REST between Android and Windows.

I've got the client (Android) working using loopj's AsyncHttpClient. But I was looking for a more native library. Initially I was using Jsonserviceclient but decided on the AndroidServiceClient. The problem I had was setting up basic authentication on the connection. After a few hours of reading JsonServiceClient.java (which AndroidServiceClient extends). It transpired I have to implement my own request ConnectionFilter and set uo the request headers in the void exec(HttpURLConnection urlConnection) method.

After creating code I got the error "cannot set request property after connection is made".
Seems I needed to tweak the code to suppress this error.

CustomRequestFilter...
package com.jjoplc.pod.Views;

import android.util.Base64;
import net.servicestack.client.ConnectionFilter;
import java.net.HttpURLConnection;

/**
 * Created by norm on 01/07/2015.
 */
public class CustomRequestFilter implements ConnectionFilter {

    private String password = "";
    private String username = "";

    static  boolean done = false;
    public void exec(HttpURLConnection urlConnection) {
        if (done) {
            done = false;
            return;
        };

        done = true;

        String credentials = username + ":" + password;
        final String basicAuth = "Basic " + Base64.encodeToString(credentials.getBytes(), Base64.NO_WRAP);
        urlConnection.setRequestProperty("Authorization", basicAuth);
    }

    public void setUsername(String userName) {
        this.username = userName;
    }

    public void setPassword(String passWord) {
        this.password = passWord;
    }
}



Set up.


 _androidClient = new AndroidServiceClient("http://myservice:8088");
_requestFilter = new CustomRequestFilter();
_requestFilter.setUsername("User");
_requestFilter.setPassword("Password");
_androidClient.RequestFilter = _requestFilter;


And Test.


androidClient.getAsync(new dto.Hello().setName("Normski"), new AsyncResult<dto.HelloResponse>() {
    @Override
    public void success(dto.HelloResponse r) {
        view.setText(r.getResult());
    }

    @Override
    public void error(Exception ex) {
        view.setText(ex.toString());
    }
});

Friday, 13 February 2015

Realtime Probing

We have a Cisco 3945E as our WAN router as a test to see if we are vulnerable I added realtime log of denied access on the access rule associated with our WAN connection. The results were quite interesting. Here map below shows IP addresses being mapped in realtime over a 5 minute period.

Friday, 3 October 2014

Data Visualization and WPF

 I've been working on data visualization technigques in my spare time. My current project is Sunburst chart. In the example below I'm mapping the first 2 level of folders on my disk. Clicking a directory 'segment' drill down into the selected segment.



Wednesday, 1 October 2014

email 2 SMS for Android

I've just developed a Email SMS App for Android.

To summarise; you configure you app to look at your email inbox. The App then polls the inbox looking for an email with a specific subject line that the app knows about. Once it sees an email with the matching subject line it then parses the email body or a known structure i.e. SMS-MESSAGE SMS-PIN SMS-CONTACT  etc. If it manages to parse the information it validates the Pin code with a known pin code configured in the App. If the pin code matches it then sends the message to the list of parsed SMS contacts.So basically it's uses your mobile phone as a SMS relay. I'll be publishing the the App on Googles Play Store in the very near future.

For more information please visit Email 2 SMS

Tuesday, 30 September 2014

This sums up man



Reading this article reminds of this video. When are humans going to control their own population?

Wednesday, 22 January 2014

Office 365 Migration

I've just migrated our companies 150+ users from on premises Exchange 2010 to Office 365. I was responsible for managing and executing the migration. We have had to re-engineer our LOB Applications that generate business email to go through a new Email Gateway Application that I developed. On the whole the migration went to plan apart from Outlook 2010/outlook 2013 where port 443 was getting blocked by our Kaspersky anti-virus software. Just need to sort out Retention Policies, Password expiry and Email delegation. I need to address a few points with: Email Delegation Retention Policies Password Expiry

Wednesday, 13 November 2013

Building Hackintosh with Mavericks



A basic recipe for cooking up Mac OS X Mavericks on a PC.

Ingredients
1 8Gb or more USB
1 Mac OS Compatible PC
1 Copy of Myhack
1 Retail Copy of Mac OS X Mavericks
The ability to stomach kext files and unix.
1 Mac or Hackintosh already setup and running
1 Copy of Multibeast

Method
Carefully configure your PC Bios settings as follows.
  • Disable Quick Boot.  
  • Configure SATA as AHCI
  • Change boot order of drive make USB highest priority
 




















Now format you USB an a Mac using Disk Utility, make the 1 partition with Mac Journal settings.






Now copy your Retail Mac OS to the desktop.


Run MyHack 


Use Myhack to navigate to the copy of Mac OS on the desktop (Alternatively you can copy it to Applications).

After MyHack has finished creating the USB open the USB using finder navigate to System/Library/Extensions Remove files beginning with AppleIntelHD*
AppleIntelSNB*
ATI*
GeForce*
NVDA*

Place the USB in your new PC ready for Hackintosh and boot, select -v (verbose).
Hopefully all being well you should have a new hackintosh PC.

Use Multibeast to fix kext files for audio, video etc.

Tuesday, 1 October 2013

Android Development

I've been involved with Android development, it's a big change from Windows development and C#.
I'm using Google's Android Studio for the IDE and find it quite a good platform very different from Visual Studio IDE but just as good.

The project in detail is a rewrite of an existing Silver light application for Sales Reps and working right across most Android devices 4.0 and higher. The application is client/server or mobile cloud based ;)
Data is server from a WCF server running in our organisation and use RESTful web services to serve up the data.

Here are some screenshots:











Thursday, 18 April 2013

Postcode Areas UK

I've create a database to hold of the Postcode Areas in the UK, you can test the area and district by entering the Prefix Letter(s) and Number(s) of your post code here

Friday, 22 March 2013

Metro Controls

Finally developed version 1.0 Metro Controls for Windows Forms.

The initial control set will contains:

Button
Check Button
Combo Box
Form
List Box
Progress Bar
Progress Ring
Round Button
Slider
Tab Control
Tile Control
Toggle Switch


Dark Theme 
 
 

Light Theme 

Friday, 4 January 2013

Metro Themed Controls for Winforms

Just been pondering about styling a Windows Form application with Metro Controls. I can see there are a lot of costly 3rd Party controls and I'm thinking of creating a free Metro Library UI on CodePlex.

There seems to be a definitive list here. Real problem I would have would be skinning the Scrollbar at application level (Possibly could be done with Win32 Subclassing). Some controls could leverage WPF (Progress Ring, Progress Bar, Progress Intermittent Bar).

Just food for thought...

Wednesday, 19 December 2012

Exchange Studio

I recently rolled out Exchange 2010 server. After deployment I thought about an easy manangement console for everyday task because I perfer not to wrestle with the Exchnage ManagementShell (EMS). So I created Exchange Studio.


This exemplifies the use of the Metro design language, I'll will be able to execute the majority of day to day tasks thus making Exchange Administration easy.

Pirahna

After sucessfully deploying our Barracuda Spam and Firewall 300 appliance, I decided it would be time to produce some analytical information based on the network activity.

I hooked into the Barracuda and captured inbound messages and logged them to a database in realtime. With the information at hand and some IP geocoding I produced a realtime UI showing where spam originates.


This is first cut of the application future versions will be able to produce some information like:
a. Top IP Spammers
b. Top Country Spammers
c. Top Spam recepients

Also based on the frequency of the spam and IP I could dynamically block the IP address on our Cisco 2800 router using a telnet and IOS commands to apply access-list on the inbound interface now that would neat way to block persistent spammers.

Wednesday, 14 November 2012

The XAML Project

Seems there's a new boy in town to compete with The Noun Project and name is The XAML Project.
There's not many icons yet, but I'm sure the size will grow with age.

I've also discovered a new site called XAMALOT (luv the pun),