yashsingh1/xdaforums huggingface dataset:
[HTC One S] ascot17:
Thanks for the feedback. I have asked WCCobra to have a look at the script. Will update the OP if necessary.

I am using Leedroid's ROM so did not get any problems...

As far as I am aware, all 3 methods work for all SIM-locked versions of the One S on all carriers.

You need to use a micro-SIM from a DIFFERENT carrier to your own to be prompted for the unlock code.

I don't know of any way to unlock without another SIM card. I'm sure somebody will post a method if they know one!
[HTC One S] WCCobra:
Did you try executing the script after installing BusyBox and without changing permissions? From what I've noticed, the script still executes with 075 permissions.
[HTC One S] ascot17:
I have added a note about Busybox at the beginning of the OP.

Feedback on this issue would be welcomed.
[HTC One S] viper2000:
Hello Ascot17,

For my AT&T One S is a brand new one, which has not been root yet. So, just wonder your kindly advise how I shall do to unlock my phone without AT&T SIM card. It seem only method #3 working without root? Please kindly advise, thank.
[HTC One S] ascot17:
Root is required for all 3 methods. We do not yet have a method for unlocking non-rooted phoned.

You will also need a [micro] SIM card from a different network. If you do not have a SIM from another network you have little to gain by unlocking!
[HTC One S] itsmikeramsay:
You need to be rooted.

Posted using HTC One S using TapaTalk...
[HTC One S] smb282:
Exactly what I was looking for...thanks!
[HTC One S] h4xdaplanet:
For some reason, the busybox installer doesn't create the symlinks. So if you install busybox and the strings command still won't work, try:

cd /system/xbin

./busybox strings -n 8 /dev/block/mmcblk0p6

I also did this all from ADB Shell, made doing the math a little easier and the typing a little faster :)
[HTC One S] enemyrex:
this worked a treat my 3uk Htc one s is now unlocked
[HTC One S] thaitung36:
can you show me how? i have put it in fastboot and i opened the cmd on pc.

then i type adb shell but it not found. and i tried to type "cd c:\sdk android\tools\adb shell" its not found either

Im newbie so can you tell me how to do it?

---------- Post added at 07:25 AM ---------- Previous post was at 07:12 AM ----------

my phone have been rooted and i have tried method 1 and 3 but it said strings not found. can you guys help me please?
[HTC One S] WCCobra:
You must have BusyBox installed for any of the methods to work (check the app store). If you are not using a custom rom with BusyBox built in, you will need to run:

/system/xbin/busybox strings -n 8 /dev/block/mmcblk0p6

The 3rd method is not setup to point to busybox itself, but you can modify the script to do that:

replace

strings -n 8 /dev/block/mmcblk0p6

with

/system/xbin/busybox strings -n 8 /dev/block/mmcblk0p6
[HTC One S] ascot17:
Finding UN_Lock-code using adb

1) You do not need to be in fastboot to use adb. Leave your phone booted into android

2) The adb command is normally found in the /platform-tools/ folder of android-sdk, not the tools folder.

3) On your PC, navigate to the /platform-tools/ folder. Check that adb.exe is in this folder.

4) Use [Shift] Right-click on your mouse in this folder

5) Select the 'Open command window here' option

6) Connect your phone via USB (leave it in 'charge-only')

7) Type adb devices [return]

8) You should see something like:

List of devices attached

HT23VW123456 device

9) In the command window, type adb shell [return]. You should see:

root@android:/ #

10) Now type strings -n 8 /dev/block/mmcblk0p6
[HTC One S] thaitung36:
i did that and it got the error "permission denied" how about method 3?
[HTC One S] WCCobra:
You must run everything as root. If you are using the adb shell, follow ascot17's instructions.

Otherwise, follow the instructions in my initial post here. In my post, I am referring the the terminal on your phone (not on your computer). There's an app for that.
[HTC One S] thaitung36:
thanks i got it :D
[HTC One S] fabiane79:
will give this a try, if not will do the long and old way. Call tmobile and tell them your travelling give them the IMEI and in 72 hrs you get an email with the unlock code.

I done this many times as I sale my phone to get a new one
[HTC One S] ascot17:
This might work in the US, however in the UK they will charge you £15 for the code!
[HTC One S] jh787:
You are correct ascot17 but if you are prepared to wait a few days then it is free from tmobile if you put the request in the post.

I have done it recently many times with success

a template letter can be downloaded here

Just complete the information that is in bold for your own info and post to the address on template.

This may be useful for the people that cannot get this method to work.
[HTC One S] ascot17:
Interesting! I have 3 other phones in the family which are all on T-Mobile. I will give this a try. Thanks for the info.
[HTC One S] Zolor23:
Is there anyway to put inthe unlock code without a different SIM? My whole household only has T-Mo...
[HTC One S] dwny:
It Works....!

Thank you for the info...your instructions work

I'm now SIM Unlocked, rooted on a factory ROM...go figure

I put an AT&T sim in my TMo device, typed in code, all good. APN settings are definitely needed so have them ready
[HTC One S] x1tyme:
There no way. You need a different provider sim card.
[HTC One S] WorldIRC:
Thanks for this! Worked great
[HTC One S] trock62:
This worked fantastic and very easy. Much appriciated:D:D:D:D
[HTC One S] unk2009:
Excellent work, thank you for this...

---------- Post added at 12:36 AM ---------- Previous post was at 12:08 AM ----------

Just an FYI you can also(on tmous) get the IMEI number by going to menu> system settings> about> phone identity and there is your IMEI number...

If I have been of any help, please hit the thanks button
[HTC One S] mycomputerisjunk:
Works like a charm.
[HTC One S] compta5:
The Fully Automatic Method Worked Perfect For Me Thanks A Whole Lot :good::good:
[HTC One S] killeen1980:
im runing stock rom, rooted, open terminal and type

su "enter"

grant supper user permission

strings -n 8 /dev/block/mmcblk0p6 "enter"

strings not found

please help
[HTC One S] ascot17:
If you are on rooted stock you probably do not have Busybox installed.

First install Busybox from the market (link in OP).

You may then need to run the command detailed in post #30
[HTC One S] mdiaz33685:
I actually bought one on ebay for simple mobile for 99 cent... with free shipping, then my cousin came by yesterday he has the One X, i took out his sim and unlocked it.... borrow any micro sim....
[HTC One S] killeen1980:
Thank guys, I just needed to install busy box from android market and it work.
[HTC One S] plocri:
guys I have an HTC ONE S with blocked network... can I use this procedure to unlock it?
[HTC One S] WCCobra:
What do you mean by a blocked network?
[HTC One S] plocri:
it was a branded vodafone version bought with a contract; the person who made this contract doesn't pay it anymore and vodafone locked the network... you know... no signal with any sim card
[HTC One S] ascot17:
This method might still remove the network lock, however it is likely that the IMEI number has been blocked. In this case the phone will probably only work in another country.
[HTC One S] plocri:
What of I change the imei?
[HTC One S] ascot17:
That is probably illegal.
[HTC One S] el_smurfo:
That's crazy...over here they just charge you an early termination fee. Are you sure the phone actually isn't reported stolen? That's the only reason an IMEI gets blacklisted in the US.
[HTC One S] jh787:
They dont block phone for none payment/fulfillment of contract.

Definitely been reported lost/stolen/not received
[HTC One S] ChaseMDuffin:
Receiving a "strings not found" error. Followed all other instructions including install of BusyBox
[HTC One S] PrinceFX:
Any old, even expired sim card will work. (You will probably have to cut it to micro sim size though, which is easy).

Simple Mobile runs on T-mobile's network and so the phone will run with it, even if it is locked to the T-Mobile network. (For data you may need to input Simple Mobile's APN settings)
[HTC One S] ascot17:
Have a read of the whole thread. There are several posts which may help.

Try post numbers:

#46

#61

#70

#71
[HTC One S] csabav:
Thanks to Paul from modaco the models with the S3 procesor can be rooted, but the SIM unlock doesn't work :( I have tried all the 3 methods. On the phone appear "Ïncorrect password" :( Any ideas?
[HTC One S] WCCobra:
1) Do you have busybox installed and are you running as root?

2) If you run "strings -n 8 /dev/block/mmcblk0p6" do you get the IMEI number and UN_lock_code?
[HTC One S] csabav:
I tried all the 3 methods and all the 3 methods are working and I got the same unlock code, but it seems the code is not working on One S with the S3 processor. I think the code calculation algorithm is different like to the One S with the S4 processor :(
[HTC One S] nativesmiley:
the "strings -n 8 /dev/block/mmcblk0p6" cmd isnt running for me. i says "no such file or directory"
[HTC One S] ascot17:
OK you may be right.

It would probably need a few people with the S3 processor to buy a code from ebay so that we could compare the UN_lock_code with the actual unlock code and IMEI number to find a method for the S3 version.

Are you rooted?
[HTC One S] nativesmiley:
yes im rooted. im running CM9 on HTC HD2 and just installed busybox
[HTC One S] ascot17:
This hack is for the HTC One S, not the HD2.........
[HTC One S] csabav:
I have buyed my One S with S3 from Vodafone, but never inserted a Vodafone simcard because I don't have. Can be a problem that when i try to unlock? I think no but...
[HTC One S] ascot17:
No I don't think that should make any difference.
[HTC One S] csabav:
Today I have inserted a vodafone sim card in my One S with S3 and I bought a sim unlock code from htcsimunlock.com. They sent to me the same code wich I got yesterday with all the 3 methods :( Now I think is 100% that the One S with S3 processor have a totally different method to unlock. Any ideas? What can I do now?
[HTC One S] rumdada:
Just to let you guys know i successfully unlocked my my htc one s that was branded to t-mobile. My at&t 4g/hspa is working too so glad to get rid of that iPhone :D:D:D
[HTC One S] ascot17:
What messages did you get when you put a non-Vodafone sim card in the phone and after you entered the code....?
[HTC One S] csabav:
After entered the code and pressed the OK i receied the same message, than yesterday: Incorrect password
[HTC One S] ascot17:
Strange - I have no idea!

I would get back to htcsimunlock.com and report that the code is not working.

Tell them that you have an S3 version and ask if that makes any difference.

They get their codes from an HTC database so they should be correct.

It might also be worth contacting HTC directly.

You are the first user who has reported this problem (perhaps the 1st S3 user to try unlocking)?

I have added a note to the OP to say that the method is only for the S4 version [for now]....
[HTC One S] csabav:
Thank you for helping me askot17!

I think I am the first, because till 2 days can be rooted this model :)

I have sent an e-mail to htcsimunlock.com, with all the specifications after they sent the code.

After your message I was contacted HTC, but they can't help. I think it's very sad that they have 2 different models(the data transfer speed is different, the preocessor is different maybe the chipset also) under the same name and the same design, and on the box of phone, where is the CPU specifitaion is written only this:"Dual Core" and nothing else :(
[HTC One S] baseballfanz:
Are you running stock ROM? Someone just reported they couldn't get it to unlock but after going back to the stock RUU it work.
[HTC One S] csabav:
Yes, stock ROM. Tried with rooted stock rom, with relocked and unlocked bootloder and with stock RUU also but the same error :(
[HTC One S] csabav:
Today I bought the SIM unlock code from vodafone. It was 50EUR :( If anyone can use my code to determinate the unlock algorithm, than send me a PM
[HTC One S] jamiphar:
Worked for my T-Mobile One S! Thanks!
[HTC One S] Mr Troop:
Worked unlocked my O2 using method 3 bash script :D:D

Thanks
[HTC One S] suhailtheboss:
thanks for this!

can't seem to get it working on AOKP though. i was able to generate my unlock code with no problems, but when placing my ATT micro-sim into my One-S it will not prompt me for the unlock code. Just says "Emergency Calls Only"

not that i really need to unlock. just wanted to because it's out there. :P
[HTC One S] WCCobra:
That's a known cm9 issue.
[HTC One S] baseballfanz:
you need to be on the stock firmware for it to work
[HTC One S] CephiroX:
Is it possible to get the SIM Unlock app re-uploaded from Method 2? I got my Unlock code from strings but wanted to use method 2 to calculate it since my math sucks and dropbox is saying the file is missing.

Thanks.
[HTC One S] scufutz:
also having the same problem , i already unlock it on stock rom , manage to install Trickdroid 5.1 (every time was rebooting my phone , on the status bar apears voice call restrected , but was having signal,3g and able to make call) now i instaled aokp milestone vers 6 and it asking me for the unlock code (buyt already entered on different network and also having 3g ...)

so? i am unlock shell i redo the unlock method?
[HTC One S] dami_cool:
guys,

I am doing exactly what has been said but when the command is run there is no imei number or unlock code i even pulled out the file had a look on computer this that information does exist.

Any suggestions
[HTC One S] WCCobra:
Do you have busybox installed? What do you get when you run strings -n 8 /dev/block/mmcblk0p6
[HTC One S] dami_cool:
this is the output

strings -n 8 /dev/block/mmcblk0p6

macaddr=1C:B0:84:D0:0D:26

20120417

481L143Y12763

HT24VW477281

1.51.997.1

EBR_Update

1.51.997.1

EBR_Update
[HTC One S] WCCobra:
Do you have the HTC one S with an S4 or S3?
[HTC One S] dami_cool:
sure s4 as the processor is 8960
[HTC One S] BL4zD:
after a successful unlock is there any possible circumstance where one would have to do this again or retain the unlock code (or this is permanent except with a device swap)?
[HTC One S] x1tyme:
No. Youre permanent unlock until you get new device
[HTC One S] plasmid09:
Is there any similar method for Xperia S?

In case of Xperia S ICS:

su [Enter]

strings -n 8 dev/block/mmcblk0p6 [Enter]

give some information but i didn't find anything in my file except some encrypted thing which change each time I run the code. But I when run mmcblk0p1 it gives me IMEI, S/N, Operator and many other code from Marlin DRM codes, octpus codes, X509 certificates etc.

Is there any clue in this file about sim lock?
[HTC One S] malimal:
Unlocked while on stock. Accepted the code and can make calls on att.

Now since I restarted the phone I get prompted for a network unlock password. I can dismiss the page and all is well.

I am on CM10 now. Is this just a CM issue. Not a major problem but annoying.

I did this with a different One S before and was not prompted after reboots.
[HTC One S] plasmid09:
I follow the method in Xperia S but it generate too many lines. I did this:

su [Enter]

strings -n 8 dev/block/mmcblk0p6 [Enter]

give some information but i didn't find anything in my file except some encrypted thing which change each time I run the code. But I when run mmcblk0p1 it gives me IMEI, S/N, Operator and many other kode from Marlin DRM codes, octpus codes, X509 certificates etc.

Is there any clue in this file about sim lock?
[HTC One S] orbitus:
I just migrated to CM10 too and am now getting random prompts for my unlock code as well. Weird thing is that when I try to run the bash script I get "length: applet not found" over and over again until I cancel the script.
[HTC One S] WCCobra:
is the length command working in the terminal? You might need to reinstall busybox
[HTC One S] cartmanotfat:
Me too, now on every rom I need the unlock code. But when I launch the script with the terminal emulator, it shows "FAILED TO GET IMEI".

I can't get the network anymore.

EDIT : Also when I type "stings-n 8[...]" it shows "strings-n 8" not found.
[HTC One S] harpreet1988:
Go to play store and install busybox app by Stericson, open it and install busybox from the app then try again.

Also there's a space between strings and -n. I used this to unlock two phones.
[HTC One S] controlpete:
problem with permission

HIYA,

I HAVE PROBLEM WITH TERMINAL/PERMISSION:

1 IN TERMINAL ON KEYBOARD IVE GOT ONLY CAPITAL LETTERS,

2 WHEN I TYPE /SYSTEM/UNLOCK.SH IS PERMISSION DENIED(BUT WHEN I TYPE SU IT WORK I MEAN NOTHING IS HAPPENING JUST POP OUT ANOTHER LINE WITH SUPER USER WHERE I CAN TYPE ANOTHER COMMEND.

ANYONE HAD THAT ISSUE?

CHEERS IN ADVANCE FOR HELP

:confused:
[HTC One S] babymatteo:
Hey guys, I've searched thru 13 pages already and still can't the answer to my question...Will this hack work to unlock the AT&T HTC One X? Thanks in advanced.
[HTC One S] WCCobra:
No, it will not work with the One X or V. Some of the parameters are not found in any of the /dev/block files for those devices.

---------- Post added at 07:04 PM ---------- Previous post was at 07:02 PM ----------

Check the permissions on /system/unlock.sh. Set it to 777 (rwxrwxrwx) and try running it again. Not sure why you only get caps in the terminal though.
[HTC One S] KShatzkes:
After a bit of troubleshooting, finally got this to work. For those having trouble, here are the idiotic mistakes I was doing that you may also be doing:

1. Make sure you are on the Stock ROM that came installed initially on your device.

2. If switching SIM card does not bring up the prompt, restart the phone with the other carrier's SIM card already in it.

3. If using the bash script, remember the UN_lock code is NOT the SIM Unlock code.

Yeah, I'm dumb. Took me forever to figure out number 3. But my phone is now unlocked! Thanks guys!
[HTC One S] ascot17:
You do not have to be on Stock. It is actually preferable to be on a custom ROM that already has Busybox built in.
[HTC One S] KShatzkes:
I could not get the prompt to come up when on Cyanogen 9. Had to go back to Stock to get it to work.
[HTC One S] WCCobra:
AOSP/AOKP both have known issues with this prompt not working properly. Since they are still in Alpha, I am not surprised.
[HTC One S] harpreet1988:
You can't use this on a non-rooted stock rom, it has to be a stock rooted rom with busybox installed.
[HTC One S] Dj!pOner:
Hi All, :)

I'm trying to unlock y HTC One S but it seems to fail: :mad:

My phone (S4) is bootloader unlocked, rooted, busybox is installed and is running "HTC_Europe_1.78.401.2" Stock ROM" (debranded)

With "Method 1" i get:

With "Method 3" i get:

So i cannot extract the UN_Lock_code of my HTC One S (same things with ADB instead of Android Terminal Emulator)

Thank You :o

PS: Sorry for my poor english
[HTC One S] dev997:
FOR ALL THOSE WHO ARE FACING ISSUES RUNNING SCRIPT/COMMANDS THRU TERMINAL EMULATOR :

I was also facing the same issue with different kind if permission denied and script not found kinda errors when running the script and entering commands manually. I tried all three methods provided and no go.

Finally I thought if I can do all process manually. So I just installed the ES File manager (better than root explorer in my opinion) gave it root and mount R/w rights and browsed thru internal memory(/)->system->dev->block->mmcblk0p6. Opened the file as text and found a line saying

Un_lock_code = XXXXXXXX(eight digits).

USing this you can use method 1 provided and get the unlock code. Worked for me. Give it a try once.

The guys with ATT One X can also try and see if this works and there are no risks of messing up anything when you do it all manually !!!

Hope this helps.

@Dj!pOne For you Un_lock_code is 20120614 that you got using method 1.
[HTC One S] Dj!pOner:
When i try to use SIMUnlock.exe (methode 2) with the "20120614" UN_Lock_Code he says: UN_Lock_code, it must have 9 digits

When i add a 0 before or after the UN_Lock_code, the provided SIM Unlock code doesnt work

When i calculate manually my SIM Unlock code (with methode 1)i found -36787218 but he also dosent work :(

When i search in /system manually with "Root explorer" or "EStrongs" with root permission and "acces to /" i dosent find any dev/ folder :(
[HTC One S] ascot17:
Can you send me a pm with the UN_lock_code obtained from method 1 and the last 7 digits of your IMEI (just to check your numbers)?
[HTC One S] WCCobra:
If dev997 is right, you should find the /dev folder in /system/dev. In that case, you can modify the script to point to that directory instead... or you can create a soft link in / by typing this command :

ln -s /system/dev dev
[HTC One S] Dj!pOner:
Hi!

Last night i have flashed stock recovery, relocked my bootloader and flashed latest RUU (HTC_Europe_2.21.401.10)

Now i unlock my bootloader. Flash TWRP 2.2.1 and Root my One S and i retry

Edit: My phone is now rooted. I have extracted mmcblk0p6 in /dev/block/ but there no UN_Lock_code inside :( (file in attachement)
[HTC One S] dev997:
Please PM me ur IMEI last 7 digits. I will also give it a try .. From the attached file it seems like its overwritten and doesn't contain any relevant data anymore..

If nothing goes your way try searching for paid unlock code options on ebay.. Its just 2-5 bucks i think..
[HTC One S] Dj!pOner:
PM send!

I have already searched for unlock code via paid website but no succes, this unlock code is unaivable :crying:

I'cant use my One S anymore

EDIT: I have succesfully unlocked my phone via paid website

Thank you for your help

Sorry for my english
[HTC One S] srsriharsha:
I am trying to unlock and the 1st method isn't giving me correct code. I tried twice already, how many times do I have?

This is the code I got from Method 1: 88013479

Method 3 is giving me "/system/unlock.sh[65]: length: not found"

Please help

Last 7 digits of IMEI = 2056 238

UN_lock_code=111845985

Can someone help with the unlock code?
[HTC One S] WCCobra:
You must have full BusyBox installed. I got the following code: 88013929
[HTC One S] srsriharsha:
Thanks a ton for such quick response. That worked, dont know where I went wrong.

Darn I copied the number wrong, silly me.
[HTC One S] kaiser347:
Found the easiest way to obtain the Un_Lock_code:

I used ESFile Explorer some other file explorers might work but didn't test.

- grant root access in settings

- navigate to phone directory (tap on Favorites icon then on phone icon)

- navigate to "dev" directory then to "block" directory

- find mmcblk0p6 file tap on it and open with ES text editor.

- scroll down and you will find the information under your IMEI

Used Sim UNlock application to get Unlock code works and works great

thanks to OP and Creator of the application!
[HTC One S] s10shane:
this method worked great for me, method 2 - semi automatic. once i got the unlock code from the terminal emulator it worked great and easy. but my number is 9 digits not 8. i didnt have to add a zero. then i put my last 7 numbers in from my IMEI number and hit ok. got my unlock code and put in a micro at&t sim card. i put in the code that program gave me and it said unlock successful rebooting. thank u very much.
[HTC One S] cbgti:
Thanks a lot Guy !!! :good:
[HTC One S] ThaPirato:
Hi I'm trying to download your app so i can run the script but your Dropbox gives me error 404 :( can someone please upload it for me? Thanks in advance.
[HTC One S] ascot17:
Thanks for letting me know. Have re-uploaded the app.
[HTC One S] thecoby:
Will this work on S3 version? S3 now have root.
[HTC One S] srsriharsha:
Can you also add the stock recovery to the main post. It will help many
[HTC One S] ascot17:
No. There is no UN_Lock_code stored on S3 versions

Why would it help many? Stock recovery is not required.
[HTC One S] srsriharsha:
Sorry, wrong thread
[HTC One S] Merkes:
Thank you very much for this tutorial!!! Works like a charm! I can finally use my One S
[HTC One S] kancherlapraneeth:
does this work for AT&T one x as that also have same snapdragon s4 processor?
[HTC One S] WCCobra:
No, it is for the One S only