[MOD] SGS4G Carrier Unlocker (Nov 7)

Status
Not open for further replies.
Search This thread

dragon5944

Member
Mar 7, 2011
23
1
hi im a newb i used your gb ext starter pack to flash my phone but when i run this app i get this error
/mnt/sdcard/sgs4g_unlocker_v06.sh: line 63: syntax error: unexpected "then"
 

quailallstar

Senior Member
Jan 22, 2007
1,072
109
Google Pixel 8 Pro
Followed all the instructions to the T. Yes I have the OP's busybox installed and I get the following error.


Command:
'/mnt/sdcard/sgs4g_unlocker_v0.6.sh'
-------------
Out:
$ /sdcard/sgs4g_unlocker_v0.6.sh'
mkdir failed for /sdcard/unlocker_temporary/, File exists
/mnt/sdcard/sgs4g_unlocker_v0.6.sh: line 63: syntax error: unexpected "then"
 

FBis251

Senior Member
Mar 21, 2011
3,418
3,716
www.fernandobarillas.com
I'm probably going to push an update to the unlocker script this weekend. It'll be fairly easy to port to an aroma based zip file that you can just flash via recovery in case people find that easier and I think it'll be easier that way.

Anyway, I hadn't tried to do this via recovery since before we didn't have a proper gui for cwm zips when I first made this script. This will give you a gui in AROMA that will pop up with the resulting unlock code and will have a confirmation dialog asking you to copy down the code somewhere.

Anyway be on the lookout for this. I'll probably need a few testers eventually on #teamacid ;).

PS: People who were having problems, please try this new script with the same instructions on the OP and tell me if it works:
https://raw.github.com/fbis251/SGS4G-Unlocker/master/sgs4g_unlocker.sh
 
  • Like
Reactions: serialteg

gregcapps

Senior Member
May 6, 2011
2,871
981
Demorest, GA
Samsung Galaxy Note 20
I'm probably going to push an update to the unlocker script this weekend. It'll be fairly easy to port to an aroma based zip file that you can just flash via recovery in case people find that easier and I think it'll be easier that way.

Anyway, I hadn't tried to do this via recovery since before we didn't have a proper gui for cwm zips when I first made this script. This will give you a gui in AROMA that will pop up with the resulting unlock code and will have a confirmation dialog asking you to copy down the code somewhere.

Anyway be on the lookout for this. I'll probably need a few testers eventually on #teamacid ;).

PS: People who were having problems, please try this new script with the same instructions on the OP and tell me if it works:
https://raw.github.com/fbis251/SGS4G-Unlocker/master/sgs4g_unlocker.sh

I was able to get my unlock code using the new script.

Sent from my SGH-T959V using xda premium
 
  • Like
Reactions: FBis251

RiCeRyDa

New member
Feb 28, 2012
4
0
Hello, I was trying to unlock my SGS4G today

The first script of the thread 0.6 didn't work I got:
Unlock code not found

The updated script gives me a Busybox is not installed correctly! error

I'm on CM 9.1.0 just the stock Kernel that came with it too.
 

gregcapps

Senior Member
May 6, 2011
2,871
981
Demorest, GA
Samsung Galaxy Note 20
Hello, I was trying to unlock my SGS4G today

The first script of the thread 0.6 didn't work I got:
Unlock code not found

The updated script gives me a Busybox is not installed correctly! error

I'm on CM 9.1.0 just the stock Kernel that came with it too.

initially, I got the same error with the new script. I downloaded FB's cwm busy box installer to fix it. then it worked.

Sent from my SGH-T959V using xda premium
 
  • Like
Reactions: RiCeRyDa

FBis251

Senior Member
Mar 21, 2011
3,418
3,716
www.fernandobarillas.com
Yeah I kind of figured people weren't following the OP so I decided to add that error message. Can you guys please list which roms you test this on? I'd like some people to test on gb roms in particular.
 

gregcapps

Senior Member
May 6, 2011
2,871
981
Demorest, GA
Samsung Galaxy Note 20
Thank you that worked!

Glad to help.

Sent from my SGH-T959V using xda premium

---------- Post added at 09:40 PM ---------- Previous post was at 08:59 PM ----------

Yeah I kind of figured people weren't following the OP so I decided to add that error message. Can you guys please list which roms you test this on? I'd like some people to test on gb roms in particular.

I actually did it from the latest release of AOKP.

Sent from my SGH-T959V using xda premium
 

eollie

Senior Member
Mar 30, 2011
1,875
754
Once unlocked always unlocked.
If I remember correctly you have to unlock on a stock based rom for this to be true. For some reason I swear Ive seen either max or fb say this somewhere. But yeah once you unlock the only reason it will have to be done again is if you flash back to stock with bootloaders. It might also revert from a regular flash without bootloaders.
 

ReelFiles

Senior Member
Jan 29, 2012
1,005
466
Wrong Island
Google Pixel 7 Pro
If I remember correctly you have to unlock on a stock based rom for this to be true. For some reason I swear Ive seen either max or fb say this somewhere. But yeah once you unlock the only reason it will have to be done again is if you flash back to stock with bootloaders. It might also revert from a regular flash without bootloaders.


Really? I have definitely used back-to-stock one-clicks on this phone. :/

How do I check if it's still unlocked? I don't have a standard size at&t SIM in the house anymore.

Dialing *#7465625# just returns "Connection problem or invalid MMI code".
 
Last edited:

FBis251

Senior Member
Mar 21, 2011
3,418
3,716
www.fernandobarillas.com
Unlocking modifies nv_data.bin which is stored in /efs. Normal flashes never modify efs and upgrading to mtd makes an efs backup.

In simple terms if you didn't do an efs restore to a backup you had before you unlocked, you're still unlocked.
 
  • Like
Reactions: ReelFiles
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 39
    I have released my paid app that will let you easily unlock your phone with a native Android app at the touch of a button! If you have trouble using my free unlock methods the app will be able to unlock your phone even if the unlock code did not work.
    Check the app thread for more info: http://xdaforums.com/showthread.php?t=3005777




    I recently did a carrier unlock on my SGS4G and thought it was too much of a hassle to have to use hex editors to find your code so I decided to make this tool.

    unlocker_news.png

    November 7, 2012
    Hopefully fixed all the bugs related to sh syntax (needs testing and confirmation)

    unlocker_features.png

    * Gets your carrier unlock code
    * Easy to run script, no more using hex editors!

    unlocker_notes.png

    * You will need to boot up your phone without a sim card in it, though you might need to get on Wifi.

    unlocker_prerequisites.png

    * Root
    * Busybox. You can use my CWM Busybox Installer

    unlocker_instructions.png

    1) Download the script file, save it on the SD card
    2) Download Script Manager from the market
    3) Open Script Manager and run the script from the SD card
    4) When the dialog comes up asking you to run the script, tap Run
    5) Your unlock code will be shown on the screen and will be saved as unlock_code.txt on your sd card
    6) You can now use the unlock code when you put in the non-T-Mobile sim into your phone and unlock your phone. You can check the unlock status by dialling *#7465625#. All the locks should say "OFF".

    unlocker_downloads.png

    Script Manager (Android Market)
    sgs4g_unlocker.sh
    CWM Busybox Installer

    unlocker_source.png

    Unlocker on GitHub

    unlocker_screenshots.png

    unlocker1.png
    unlocker2.png


    unlocker_changelog.png

    Here's the changelog:
    November 7, 2012
    Hopefully fixed all the bugs related to sh syntax (needs testing and confirmation)

    October 10, 2012
    Updated busybox checking (for people who refuse to read the OP and instructions)
    Made the script more SH-like
    Made sure that the programs/commands the script use are the ones provided by busybox
    Fixed a derp with a then clause

    January 30, 2012
    Updated screenshots in OP to reflect the script's output
    The script no longer requires superuser access (though you will still need it to install busybox)
    Added debug output for dd command
    Added ERROR function and error code to catch when nv_data.bin is not found.

    January 22, 2012
    Changed script's working directory
    Added version number and creator info to the top of the script
    Added a message in case the unlock code is not found (added by stephen_w)
    -- Adapted to sh instead of bash
    Cleaned up the script to only show debug messages when wanted.

    January 22, 2012
    Added a link to the git repository holding the script's source code:
    https://sourceforge.net/p/teamacid/unlocker/

    January 14, 2012
    * Vastly increased performance gain. Now copies nv_data.bin instead of doing a bml3 dump so you get your code in around 1 second after running the script.
    * Should now find your unlock code even if you unlocked your phone already.

    December 31, 2011
    Updated to version 0.3
    * Added a switch to the grep command (provided by stephen_w) to hopefully eliminate the duplicate code bug.

    December 30, 2011
    Updated to version 0.2
    * Fixed the duplicate unlock code bug thanks to a bml dump from bswann

    December 30, 2011
    Initial release

    unlocker_credits.png

    sanfranx415 and SS2006 for the steps to unlock
    stephen_w for his contributions to the project
    ultimakillz, bhundven and raverx3x for testing
    bswann for providing a bml dump to find a duplicate code bug
    6
    If you haven't noticed, this has been posted on the XDA Portal! Thanks FB, i haven't been here that long but that's the first time i've seen our phone on there! :D
    6
    I got pretty excited. :) Thanks for the heads up.

    Of course man!

    Sent from my SGH-T959V using xda premium
    6
    :). Pretty soon I'm going to release the app I'm working on to make unlocking a matter of just having root. It'll work on Froyo/GB and ICS ROMs. Initially it will only support the same features as this script (displaying your unlock code).

    The next version will support unlocking by editing the nv_data.bin file in addition to support making and restoring backups of the efs partition.

    Note that it will be a paid app.
    5
    Thanks. I was so sleepy yesterday that I hadn't realized how easy it was to finish the script. I had a mental block deciding on how to convert the hex codes back to ascii using only programs available on busybox.