Jump to content

Testers needed for automatic QCN WiFi MAC patcher for Ubuntu/Linux


Recommended Posts

Guest glossywhite
Posted (edited)

I've written a simple script to automate the patching of the *QCN backup, taken from OMCs *AFTER* unlocking.

#### THIS PATCH RELIES ON FINDING "112233445566" place-holder MAC address inside the *.QCN, and will not work if you are attempting to patch a *.QCN backup which, instead of "112233445566" placeholder, contains your ORIGINAL MAC addresss (that would make this script pointless!) ####

IF YOU DO NOT KNOW WHAT YOU ARE DOING ON THE COMMAND LINE, YOU ARE RISKING BRICKING YOUR HANDSET!

So, in a nut shell, you are going to need a *.QCN backup of your phone, taken AFTER the unlock process was carried out. This is how you use the script (tested using Ubuntu Linux):



$ ./omc_mac_patcher.sh unmodifiedQCNfile.qcn F0AADEFFA8D9 desiredOutputName.qcn


Ensure you have typed in EXACTLY six hex pairs, NO SPACES, NO EXTRA CHARACTERS! The example above Shows a random WiFi MAC address that you'd like the OMC to adopt. Change that to what you desire to be your MAC. Also, you replace 'unmodifiedQCNfile.qcn' with whatever name you gave your *.QCN, and 'desiredOutputName.qcn' with whatever you want your PATCHED, MAC-fixed *.QCN to be called (this is the one you will flash back with QPST). I have no idea how to code this for Windows, sorry! Try and see if it works... if you're brave! Hex editor shows the bytes are replaced perfectly, in the correct locations. God bless you! SOURCE:


#!/bin/bash

## syntax: ./omc_mac_patcher.sh <inputfile.qcn> <desired MAC address> <outputfile.qcn>

xxd -g8 $1 | sed s/112233445566/$2/ | xxd -r > $3

ALTERNATE SOURCE (proposed for new version)



[/color][/color][/b][b]#!/bin/bash

## syntax: ./omc_mac_patcher.sh <inputfile.qcn> <known MAC in input QCN file> <desired MAC address> <outputfile.qcn>

xxd -g8 $1 | sed s/$2/$3/ | xxd -r > $4

omc_mac_patcher.sh.zip

Edited by glossywhite
Guest Chris_67
Posted

Verified your code. This will work. No need to test, because I write far more complex shell-scripts than that on my daily business.

But:

- The first script would not work for me because there was no 112233445566 in my (unpatched) .qcn.

- It will not output any error message if it does not find the pattern. It just does: nothing :)

- Please mention that xxd should be installed. I don't know if it is installed by default on all distributions, but on my IBM AIX for example, it is not :rolleyes:

- Please remove the color- and bold-tags in your 2nd code

Guest glossywhite
Posted (edited)

Verified your code. This will work. No need to test, because I write far more complex shell-scripts than that on my daily business.

But:

- The first script would not work for me because there was no 112233445566 in my (unpatched) .qcn.

- It will not output any error message if it does not find the pattern. It just does: nothing :)

- Please mention that xxd should be installed. I don't know if it is installed by default on all distributions, but on my IBM AIX for example, it is not :rolleyes:

- Please remove the color- and bold-tags in your 2nd code

You may fix it, if you like...

Edited by glossywhite

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.