Guest glossywhite Posted November 16, 2011 Report Posted November 16, 2011 (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 November 16, 2011 by glossywhite
Guest Chris_67 Posted November 17, 2011 Report Posted November 17, 2011 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 November 17, 2011 Report Posted November 17, 2011 (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 November 17, 2011 by glossywhite
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now