yashsingh1/xdaforums huggingface dataset:
[HTC One S] Jewcifer:
Strange seeing all of these failed attempts on newer bootloaders. I'm on 2.05 T-MoUS and while the bash script failed, running the strings command gave me the UN_Lock_code and my IMEI, right next to each other all convenient like. May possibly be because I'm S-Off? I haven't tested the rest of the method yet because I haven't switched carriers yet. Busybox version: 1.21.0, CM10.1 based ROM.
[HTC One S] ascot17:
This hack was first implemented 10 months ago. I was on an HBOOT of 1.06 at the time. As suggested above, most of the problems have been with newer HBOOTS.

For S-OFF users, it might be worth trying to downgrade the HBOOT and see if the 0p6 block can then be read (However I suspect that the answer will be 'no' - I have since upgraded to the 2.15 HBOOT - as far as I can see the contents of 0p6 are unchanged by the HBOOT).
[HTC One S] bankanidhi:
Awesome. A solution for those with newer hboot

you can always pull that file by dd but from a pc using adb shell. i tried emulator it didnot work but when used the adb shell from the pc it worked and u unlocked the phone successfully from the carrier. if people want i can put a step by step procedure.

thanks great work.
[HTC One S] NienorGT:
Worked successfully on my phone! :D
[HTC One S] ascot17:
OP edited with full method.
[HTC One S] invensmaster:
Worked

I had the steps as he stated it .. and it worked with no probs

Thanks again and keep up the good work
[HTC One S] mmdl1001:
This is why math is useful lol, going to try this once I pick mine up, thanks!
[HTC One S] frazzeld:
Well Done!
[HTC One S] TheRT14:
i think i´m retard but when i´m doing the second step in terminal emulator.. sh: Strings not found
[HTC One S] ascot17:
Are you rooted [required]?

Did you type su first?
[HTC One S] TheRT14:
yep i´m rooted, but later i doing succesfully, only need to download other terminal emulator and all it´s ok now

WORK for me!
[HTC One S] jh787:
Show your appreciation

Don't forget to say thanks to ascot for all his hard work by clicking on the "thanks" button on any of his posts or you can buy him a drink if you saved money by clicking here
[HTC One S] solracarevir:
this is great!

Im I the only one wondering, how in the world you found out how to do this?!

Great Job!
[HTC One S] jh787:
Hard work and determination by ascot17.
[HTC One S] blackhartct:
Just wondering is this is the same as the network unlock code CM9 asks for if we have sim lock on. I will test and let you guys know
[HTC One S] Wel1973:
PC App for Unlock ( Based on his Work!! )

The first thing, to congratulate them on the tutorial. It is fantastic.

Now, do I leave to you an application based on his work, so that it could use it also, because not??

The author of the application, does not raise it because it does not have sufficient Post, and cannot. Explained this:

The translation of the aplicascion is mine. JOSNARO is not on good terms with English. So that they all enjoy it in this Forum. Of which I feel proud to serve them...

I give to him thank you on his part for his Big Work.

Here the application:

View attachment 1110830

https://sourceforge.net/projects/josnaro/files/SIM%20Unlock_Eng.zip/download

This would be to automate the whole process of operations...

Greetings!!
[HTC One S] itsmikeramsay:
WHOA This was quick!! I think this can be added to the OP! This will make life much more easier!!
[HTC One S] Wel1973:
Yeeeah!!

Forget to say that this application, only it works in Windows. Sorry!! Mac and Linux may be is not supported.

Greetings!! Again..:;)
[HTC One S] ascot17:
Hi,

I was thinking of something like this myself, but don't have the programming skills.

I have checked the app and can confirm that it does work!

Released in Post 2
[HTC One S] MissingBonobo:
Worked great for me! Cut out an old AT&T sim card to make it fit, did the calculations, and now I'm unlocked! Way to go!

For reference, T-Mobile USA locked phone was unlocked with the OP's method.
[HTC One S] Wel1973:
Of course, its totally Free.

There is no bussines on this.

Its only a present for comunity, ok.?? Based on your Great Work...

Sorry, if i cant explaint that....

Greetings....

Enviado desde mi HTC One S usando Tapatalk 2
[HTC One S] ascot17:
Hi,

I have edited my post above. The link did not work for me initially. Now seems ok!
[HTC One S] ascot17:
The initial inspiration came from jh787 who already had an unlock code and thought to compare it with the UN_Lock code from the partition. He discovered the 7 digits of the IMEI number when he subtracted the 2 numbers.

We then just needed a way of working out the value of the 4th digit. This was discussed in a thread in Q&A with frazzeld . I bought an unlock code to give us some more data and once a couple more people had volunteered their own numbers, I had enough data to find a pattern in the 4th digit.
[HTC One S] BilboSwaggins:
Everything works up to the point where I type in the unlock code, then this happens. I have followed every step on the manual method.
[HTC One S] ascot17:
What ROM are you on?

Many users have reported failures on CM-based ROMs.

Changing to a Sense-based ROM usually works.
[HTC One S] BilboSwaggins:
And thank you for the answer. CyanogenMod 10.1. I'll run an RUU tomorrow.
[HTC One S] jimmyport:
need help

Method 1 and 2 loads up numbers. number 3 i cant get it to work. Method 1 and 2 add up the same code. but it dose not work. please someone help me. i really want my phone unlocked. my phone is rooted. maybe someone can jump in my computer and get this to work. thanks.

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

same here
[HTC One S] BilboSwaggins:
The OP said to me if you are running CyanogenMod or anything that is based on CyanogenMod then it often doesn't work. I'm just downloading an RUU now so I'll let you know if you should do that.
[HTC One S] jimmyport:
can you send me the link to the RUU? i been looking everwhere its crazy. And please let me know if it worked for you.
[HTC One S] ilostchild:
just putting this out there why do a RUU? when you can find a stock rooted rom and flash that? it will/should be the same, you can do a nandroid of current rom flash a stock odex/deodex rom then input code and once unlocked nand restore back..?

---------- Post added at 10:50 PM ---------- Previous post was at 10:47 PM ----------

been looking crazy? have you tried http://androidfiles.org/ruu/, this is posted the sticky too just click on the Ville should have every RUU released for the Htc one S Ville /Villec2/VIlle Plus
[HTC One S] imanoid:
Removed dumb from the comment.
[HTC One S] pjd007:
I don't seem to be able to get my UN_Lock_code as the line doesn't appear when I run the string command.

Anyone know how I can obtain it ?
[HTC One S] bilalwiggles:
hboot 2.15.0000

radio 1.13.50.05.31

my unlock code location mblkp06 or whatever it is , doesnt show the code. in fact it only shows a piece of the mac address and some other garble.

have done this unlock successfully 3 times on other htc one s's, but this time is a fail.

not sure why other than the hboot is so high?

cellunlocker.net is 14.99... anyone know a bit cheaper site ?
[HTC One S] imanoid:
Either you don't have root and busybox, or it's in a different partition than the one you looked in.
[HTC One S] pjd007:
I've installed busybox and I've run the root check app which confirms I have root access.

Ok so I've run the command again and have a date rather than an unlock code.
[HTC One S] pjd007:
Ok so I got S-Off now but still the strings command shows a date.

Busybox is installed yet if I use method 3 the script says it can't find /system/xbin/busybox and sure enough I can't see it in ES File explorer.

Will see if the install has moved and amend the script if there's no other suggestions.

Amending the script didn't work and I tried to copy busybox into the xbin folder, anyone know why this isn't working ?

Edit: All sorted by following this link:

http://xdaforums.com/showpost.php?p=27813767&postcount=531
[HTC One S] jona196313:
help

how do you press enter on keypad?

---------- Post added at 10:55 AM ---------- Previous post was at 10:49 AM ----------

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

does this have spaces in ?
[HTC One S] ryanshew:
It will be a keyboard so it's pretty self explanatory and yes there are spaces, 3 of them.

HTC_One_S | S-OFF | ViperOneS_2.2.0 | Black-Blue_Sense_Theme | Bulletproof_1.3
[HTC One S] jona196313:
root

why do you need root ?
[HTC One S] Roundtableprez:
Worked beautifully using the first method. The app in the second method provided the wrong unlock code. And the bash script didn't work at all. Despite meeting all requirements
[HTC One S] Murdhie:
I have a similar problem. When I run the string it says there is no such string. This is a 3UK pone which I have debranded with a HTC European firmware. I have root, installed busybox and I have s off. Any ideas?

SOLVED : Went back to busybox and used the 'install advanced' function. Once busybox finished installing the extras, I re-ran the SU strings and it worked.

Will try the code once I get my hands on a sim.
[HTC One S] Electriccars:
WOW! Thanks! The 1st and 2nd methods provided the same code and it worked perfectly! Now my One S is carrier unlocked. :D

However, I couldn't get the bash script to work.
[HTC One S] blu422:
is the code permanent, like can you calculate the code and then a month later enter it as long as it is the same phone
[HTC One S] mohzim:
Alternative SIM on CM 10.1

I have unlocked HTC ONE S and currently on CM 10.1. Recently I had to replace my lcd and earlier tried multiple SIMs.

Now when my phone is up and running, on inserting old SIM it says SIM CARD is not Valid and need to restart. On restart, I seem to be getting the same prompt to restart.

My question is does inserting new SIM on Unlocked HTC ONE S with CM 10.1 will cause any issue?
[HTC One S] ascot17:
The issue here is more likely to be with your SIM card than the phone.

Once the phone is unlocked, it stays unlocked.
[HTC One S] machoman1337:
Yes. Unlock codes are permanent. There is only one code per phone. However, there's not much point in "waiting" if you intend to flash a custom ROM, since you need to be on stock (whether rooted or not) to enter the unlock code.
[HTC One S] mrpickem:
This is what I get when running this command... Is the 20121215 the number I need because it does not work.
[HTC One S] 31ken31:
If this works on the one S would it work on the one XL from att??
[HTC One S] muayyadf1:
is there any different file other than mmcblk0p6 to find the unlock code?

That file on mine has a different IMEI and the unlock code doesn't work. I wonder where the phone gets the right IMEI?
[HTC One S] sinco54:
I'm attempting now.
[HTC One S] cc101:
Thank you for freeing my phone!!!

---------- Post added at 03:17 AM ---------- Previous post was at 03:15 AM ----------

Does it say Unlock_Code infront of that number?
[HTC One S] mrpickem:
No it doesn't say unlock code anywhere.
[HTC One S] RadarZgin:
is this gonna work on other devices aswell?
[HTC One S] guillaumetell:
Hi Guys,

I have try to get the unlock code from the different method but nothing.

1st method, i got the script on terminal but there are no unlock code even no imei number

2nd i have run the unlock.sh and this is what i got

su

sh-3.2# /system/unlock.sh

/system/unlock.sh

/system/unlock.sh: line 1: ∩╗┐#!/system/bin/sh: No such file or directory

This script will calculate the SIM Network Unlock Code for the HTC One S.

\t*You must run this script as root

\t*You must have BusyBox installed (free from the Google Play Store)

Full credit goes to ascot17 and jh787 for their work in breaking the code.

IMEI:

UN_Lock_code:

/system/unlock.sh: line 34: + + : syntax error: operand expected (error token i

s " ")

sh-3.2#

My HTC is S-OFF,hboot 2.03,Unlock bootloader, busybox install, rooted.

Please help
[HTC One S] nise_07:
Is there a way to unlock the phone without putting another sim card in it?
[HTC One S] asdfasdfvful:
I was wondering that too. Upon searching, the answer is sadly no.
[HTC One S] jangy22xx:
what is the procedure to be followed for the version s3?
[HTC One S] usaff22:
There's no exploit for the S3 at this time
[HTC One S] jangy22xx:
how come there are sites that offer to unlock this phone via imei code? for example cellunlocker.net

how get this code?

I followed the procedure on s3 but I get this error: string not found
[HTC One S] jangy22xx:
help me
[HTC One S] alltubetone:
Really?! Usaff22 just said there isn't a way to unlock the s3 model with this exploit yet.

You can either pay for the imei unlock code, or you can wait indefinitely for someone to come up with a similar exploit for the S3.
[HTC One S] jangy22xx:
yes but i have paiiiid for the code to unlock my htc one s, but the code not working :( how is possible?

352762056674756 IMEI

CODE UNLOCK THAT I HAVE PAID : 79946434

but not working :(

help me
[HTC One S] alltubetone:
Ask for help from the site you got the code from. They may have sent you the wrong code.
[HTC One S] jangy22xx:
i have paid the unlock of the phone from 2 service, www.cellunlocker.net and freeunlocks.com and both gave me the same code, but the code not working, how it possible? i have paid for nothing

help me
[HTC One S] alltubetone:
Here: http://www.cellunlocker.net/contactus.php go to that page and contact them. Either ask for their help, or ask for a refund.

This isn't a support thread for every cell unlocking service on the internet.
[HTC One S] raff25c:
Is it working for i9505 variant of S4? Thanks!
[HTC One S] Roundtableprez:
I9505? As in a Samsung phone? Lmao

Edit.. Actually it does work buddy. I just did it on mine :)
[HTC One S] raff25c:
Lmao?? The title says S4.. Does the S4 means for Samsung Galaxy S4 or not?
[HTC One S] ryanshew:
Lol..no, it's in the one s forum, so it's the s4 snapdragon processor version of one s. Just read the thread...not hard to figure out.

hTConeS | SoFF | DarKSeNsE | BuLLetprOOf

Dark Sense 5 Theme+Mods_Click Me

Inverted Sense 4+_Click Me
[HTC One S] solidus636:
confirmed working on T-Mobile HTC One S [S4]
[HTC One S] WiiR0cKz:
I'm trying to unlock my wifes phone after successfully unlocking my One S with the same setup. But on her phone all I get is the following and no Unlock_Code....
[HTC One S] Pip513:
I'm having some issues if someone wants to help me out

last 7 IMEI 7803062

Un_lock 109915751

Math:

7803 062

062x 7803

0628 7803

109915751-06287803= 1036279948. Am I doing something wrong?

The program spits out 1036 2794, which does not work.

And the executable file does nothing. In root explorer it just says executing script endlessly.

It's a HTC One S S4 from Cincinnati Bell
[HTC One S] WiiR0cKz:
1036 2794 is what I also got... =\
[HTC One S] ryanshew:
Use terminal to do it. I just ran it for the hell of it since I already did this almost a year ago. Remember to put the unlock.sh script in /system/

hTConeS | SoFF | ChaRmAnDrOiD | BuLLetprOOf

Inverted Sense 5 Theme Updates+Tweaks

Inverted Sense 4+
[HTC One S] Pip513:
It just does this. Think I might have to buy the code online.
[HTC One S] ryanshew:
Let me see what you entered in terminal.

During that output, hold volume - and then press c on keyboard, then scroll to top.

Make sure you have busy box installed.

And re download just to be sure.

hTConeS | SoFF | ChaRmAnDrOiD | BuLLetprOOf

Inverted Sense 5 Theme Updates+Tweaks

Inverted Sense 4+

---------- Post added at 07:29 AM ---------- Previous post was at 07:14 AM ----------

You know, I just noticed your on asop. Install a sense ROM just for the hell of it. I remember people having trouble while not on sense.

hTConeS | SoFF | ChaRmAnDrOiD | BuLLetprOOf

Inverted Sense 5 Theme Updates+Tweaks

Inverted Sense 4+

---------- Post added at 07:38 AM ---------- Previous post was at 07:29 AM ----------

^^^^^ well what do you know, i was right. I knew i saw that somewhere. Flash sense and enter unlock code again.
[HTC One S] Pip513:
Is there anyway to enter the unlock code without the sim? Because I'm trying to switch to T-Mobile, and I won't be able to go back to the store to try if it works for a few days.
[HTC One S] ryanshew:
Don't think so, but any old sim will work. If it's a bigger one, just cut it down, I've done it a coupe times. Doesn't need to be exact, but closer the better.

hTConeS | SoFF | ChaRmAnDrOiD | BuLLetprOOf

Inverted Sense 5 Theme Updates+Tweaks

Inverted Sense 4+
[HTC One S] fzurita:
I Was having the same problem as you with this script in CM10.1 so I modified it to make it work. I have attached the modified version, can you let me know if it works for you?
[HTC One S] theonlysamiam:
This is completely a noob question, but for step 4 when I need to insert an alternate sim car, does it matter if I use a T-Mobile or AT&T card? I mean I understand that to verify that the unlock method worked, I should use an AT&T card, but I don't have one.
[HTC One S] ryanshew:
Once you have the code, you need to put a sim that usually does not work on your phone so that you are prompted to enter your unlock code and actually unlock your phone. You're phone is not unlocked until that point.

hTConeS | SoFF | CharmAnDroiD | eleMeNtal

*INveRTeD sENsE 5 ROM+ThEmE+TwEAkS*

*INveRTeD sENsE 4+ ThEmE *
[HTC One S] theonlysamiam:
Ok. That's what I thought. Thank you!
[HTC One S] Pip513:
It seems to have. I'll let you know if the code works on Tuesday. It spat out a completely different code so fingers crossed.
[HTC One S] JEANRIVERA:
how can i make the batch script work on HTC One?
[HTC One S] Pip513:
No luck. Going to try it on sense later today.
[HTC One S] Pip513:
Nope. Ordered a code from unlockforcheap.com and they gave me a completly different code compared to every attemp tried through this. And it worked. I guess there are just rare exceptions to this. I compared the unlock code to the UN_lock code and it is completely different.
[HTC One S] ryanshew:
You need to file the instructions and decide the UN_lock code. Of course it's different. There is even an app that does it for you. Look at the big picture in the post right above yours. Just type your code, them type the end of your imei and click the button. Do it, you'll get that same code you paid for.

hTConeS | SoFF | CharmAnDroiD | eleMeNtal

*INveRTeD sENsE 5 ROM+ThEmE+TwEAkS*

*CharmAnDroiD 3.0 FULL ROM UPDATE*
[HTC One S] bikerabhinav:
Thanks a ton! Just unlocked a HTC One S locked to T-Mobile USA via Method 2. I was initially stuck at strings not found error but later realized it's a busybox issue. Flashed a busybox zip via CWM and it enabled the strings command after which I ran the Windows app to grab the unlock code.

Cheers!
[HTC One S] Pip513:
IMEI: 7803062

UN_Lock: 109915751

Program spits out: 1036 2794

sim_unlock_code.txt on the sd card: 8754 5347

Code that I ordered and WORKED was 6427 3017

It simply didn't work in my case.
[HTC One S] muayyadf1:
need your help

Hi,

My phone was bricked and got serviced by HTC . They relocked the phone and changed the imei#.

I tried all the methods and they didn't work because the unlock code in the sys file belongs to the old imei#.

I can not find the file for the new imei.

Please help.
[HTC One S] ryanshew:
What file are you looking at? You need to do the whole process over.

Have you tried the script that you place in system? Use terminal right on your phone for it.

Or...

Call your provider, a lot of times they will give it to you. Tell them you travel and sometimes that requires you to use other sim cards while overseas.

Say you paid for an unlock code before, but when you got your phone back, it was locked.
[HTC One S] AlienSexGod:
This currently still works?
[HTC One S] asdfasdfvful:
You could always try...

Sent from my One S
[HTC One S] 31ken31:
This is one a att one xl.. is this the correct area for unlock?
[HTC One S] mscofield991:
didn't work on CM 4.2.2, i did managed to grab the UN_Lock_code while on CM, but couldn't grab it with the stock Sense ROM. went to unlock phone, it wouldn't accept with the 4.2.2 ROM, restored from a Nandroid backup to the original ROM, same code work, thanks.
[HTC One S] nashwing:
sh-4.2# strings -n 8 /dev/block/mmcblk0p6
strings -n 8 /dev/block/mmcblk0p6
macaddr=1C:B0:94:C3:XX:XX
20130130
41AD531N0XXXX
FA29YW40XXXX
1.75.997.5
EBR_Update

Same here... I guess the newer HBOOTs don't work with this method...

I've gone through the thread, but I couldn't find any replies to any questions with the same issue.
[HTC One S] 31ken31:
Me too I gave up and bought one
[HTC One S] CaptainMaki:
Works perfectly.

Don't forget to install busybox for the Strings function to work properly. After that it worked like a charm.
[HTC One S] 31ken31:
Does anyone have the skills to compare the blocks I dumped before my SIM was unlocked vs after unlock or a way to compare the files with software for differences? This is on a att one xl.
[HTC One S] kaalatittar:
I am having the same problem,

But cannot install busy box form Play ( tried both installers, it just fails )

then tried flashing with TWRP using 2 diferent zips but get an error that MD5 file doesnt exist or something like that

what am I doing wrong ?

I think my zip file is not authentic.... ( i got it form generic websites ) can someone pls post a link to a working busybox flashable zip ? thank you in advance

---------- Post added at 04:25 PM ---------- Previous post was at 03:55 PM ----------

how did you get busybox to install ?

---------- Post added at 04:32 PM ---------- Previous post was at 04:25 PM ----------

hey.. where did u install the bsy box from ? i am having a really hard time ..... ( see above)
[HTC One S] CaptainMaki:
What ROM are you using?
[HTC One S] asdfasdfvful:
I have a few questions with this.

Firstly, I'm guessing the rom I'm using won't affect the unlock? And if the code happens to be wrong, nothing will happen to the sum and phone right? And lastly, is there a limited number of tries to unlock the sim?

Sent from my One S
[HTC One S] CaptainMaki:
No affect on the ROM. If you get the code from the phone right, why the unlock code would be wrong? I think there are usually 5 attempts for unlocking, but there should'nt be a problem the method here works flawlessly. Use the calculator app and you won't miss anything.
[HTC One S] dynamite1985:
didn't work.

Tried the bash script, and method 1, no luck. Just keep says my PUK code is wrong. Started with 8 tries, down to 5. Seemed a little weird that the unlock code that I get through calculations was not the same as I got through the script.

Running Venom Rom (current release) with busybox and rooted.
[HTC One S] CaptainMaki:
You can always buy an unlock code.
[HTC One S] asdfasdfvful:
Didn't work for me. I tried twice so I'm probably busy going to get the code. What happens after you have reached the max number of tries?

Sent from my One S
[HTC One S] CaptainMaki:
What error do you get?
[HTC One S] asdfasdfvful:
I think it said connection failed or something but the code wasn't correct

Sent from my One S
[HTC One S] simo_scorpion:
hello

i have ville c2 s3

un_lock_code : 148767145

last 7 imei : 2065515

sim unlock code : 97255080

incorrect password

same unlock code via setool and ir-key and xtc dongle

any help
[HTC One S] dsstest:
My code calculated does not work: network unlock request unsuccessful

I bought a code from fireunlocks, it was the same code as the one I calculated and does not work.

I would appreciate advice, help.

Thanks
[HTC One S] mscofield991:
what ROM are u on? stock? try the original ROM.