How to Network Unlock Samsung Galaxy Ace Via ADB

Improved method:
Note: first check if your phone is locked at all. Obvious, but some forget it.
Goto dialer and type: *#7465625#
Just found another way of doing it Someone needs to do it. Thanks.
In a DOS box (phone does! need to be routed)
See for temporary rooting EDIT2 below!
- adb shell
- su
- cat /dev/bml5>/sdcard/bml5.img (BE-EM-EL-FIVE is about 25 Mb)
- exit (2x)
- adb pull /sdcard/bml5.img
- now open in hex editor on PC (like xvi32)
- find the proper block with hex search:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 FF FF FF FF FF FF FF FF FF FF FF FF FF FF (2 times)
Scroll a few pages of FF's down until you see the first number (unlock code)
- my unlock code is at #1282C0A
- put locked sim in phone, boot and enter code from above
I did reboot twice without any problems. Also checked other bml5 images found on xda.
All have the unlock code in it !!! If your phone is not SP locked you will have 000000
instead of provider code in the same block
Dunno where to hex search for in bml5. Perhaps FF FF FF FF FF FF FF FF 30 30 30 30 30 30
30 30 ?
EDIT: find the proper block with hex search:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 FF FF FF FF FF FF FF FF FF FF FF FF FF FF (2 times)
Scroll a few pages of FF's down until you see the first number (unlock code)
Let me know.
Cheers
EDIT:
The img file starts with FSR_STL. The STL5 VFAT BLOCK is in here but not accessible as
VFAT. Only by stl5 device. But that is dangerous as we have seen before.
You can find the start of the VFAT table (MSWIN4.1) in the FSR_STL (offset #153000)
Alst the size of the FRS_STL is 25 Mb, the STL/VFAT image is only 7.4 Mb.
So for now you have to do with the FSR_STL file and search in it for your unlock code.
EDIT2:
For getting BML5 container you must root your phone. But you can easily do a temporarily root with these instructions. You do need adb.exe
- download RageAndAdb.zip from attachement and unpack
- put rageagainstthecage ELF executable in user writeable part of your phone:
1) adb push rageagainstthecage /data/local/tmp
2) adb shell
3) cd /data/local/tmp
4) chmod 777 rageagainstthecage
5) ./rageagainstthecage
- back at your pc open windows task manager (Ctrl+Shft+Esc) and kill adb process
- start adb shell again
- now you are superuser on your phone
- continue with bml5 dump as written above
Hi Everybody,
Ok ill start with the Requirements.
You Will Need:
Your Samsung Galaxy Ace (obviously)
The original Usb Cable that comes with the phone.
Your Computer (I will use Windows XP for the demonstration, because i dont know how to do it with other O.S)
Your Phone has to be Rooted
Samsung Kies Installed Wich can be found HERE
ADB wich comes with Android SDK and can be found HERE
Ok Once you have all that stuff we can continue.
I will not teach how to Root your device because custom roms are already rooted and if you have a stock rom there are plenty tutorialn on hou to root it, and also i will not teach you how to install Kies because its realle easy and anyone can do it, i will only teach you how to install Andoid SDK and the specific ADB Package OK lets start.
Once you have downloaded the Android SDK Run the Installer trough all the steps to install it, I recomend to Install it in "C:" disk so it makes easier to make al the further steps, if it ask for the Java SDK just download and install, restart the Android SDK Installer and continue, Once its Fully Installed open it and do this next steps:
1-Go to the "Available Packages" Option on your left Menu
2-Click on the "Refresh" Button ond the bottom Right and wait until it finish
3-From Items select the "Andoid SDK platform-tools, revision 6" Item
4-Click the "Install Selected" button on the botton right and wait until it finish
5-Now you can either close the SDK or leave it open.
Image:
Now that you installed the SDK and the ADB its time to set the Path so the cmd.exe recognizes the ADB, there are two methods, One With cmd.exe (console) and one with the My PC Properties, i will explain bot of them.
Cmd.exe (console) Method.
Click on your start button and select "Run" from the Start Menu, type cmd.exe on the box and press enter.
Once the CMD its open write the next Text: set PATH=%PATH%;C:\android\android-sdk-windows\platform-tools
The text Write in Bold means your SDK Installation Directory, thats why i told you to Installa the sdk In C: Disk, just check that your Installation Directory is the same as mine or modify the line according to your needs.
My PC Properties Method.
Open My PC, and Right click on a blank space,
Select "Properties" from the just opened contextual menu,
On My PC Properties select the "Advanced Options" Tab
On the "Advanced Options" tab click on the "Environment Variables" button.
Now Mark the "Path" Variable and click the "Edit" Button.
At the end of the line add this text:
;C:\android\android-sdk-windows\platform-tools
Remember that The text Write in Bold means your SDK Installation Directory, thats why i told you to Install the SDK In C: Disk, just check that your Installation Directory is the same as mine or modify the line according to your needs.
Ok now you have completly installed the android SDK and the ADB (Android Debugging Bridge) and you can now do the final steps to Unlock or Get the Unlock Code for Your Samsung Galaxy Ace.
Ok now that you have Installed all the necessary programs:
Connect your SGA to your Computer via the included USB Cable. (the drivers should be installed by now, Kies installs them automaticaly)
Click on you start button and open the "Run" option, on Run type cmd.exe and press enter.
Now on Cmd.exe type the next text to acces the ADB Shell:
cd C:\android\android-sdk-windows\platform-tools
Remember that this means your Android SDK Installation directory, so if you get an error, check that the route is well writed and if you installed it in a diferent directory just modify the line so it fits to your needs, just remeber to pur - instead of spaces and \ (not / ) to indicate folders.
Image:
Now that you are in "C:\android\android-sdk-windows\platform-tools" type: adb shell
Image:
Now That you are in adb shell type the next command: su
At this point you have to give root premission to adb shell on you Phone
Image:
Ok now that adb shell has root premission and its inside you phone, type the next line:
cd /
Now be carefull and notice that there are spaces in the line and that we are using / instead of \
Image:
Ok now that you typed cd / type the next line: mount -o remount rw /
Image:
Ok Now type: mkdir /efs
Image:
And now type: mount -o nosuid,ro,nodev -t vfat /dev/block/stl5 /efs
Image:
And now type: cat /efs/mits/perso.txt
And you will get some strange characters on the screen and a 8 digit number, thats your unlock code, copy it in paper or in a Notepad file, but check it twice so you get the correct number, also the number provided is unique so dont try to use your number with other phones or use my number with yours.
Image:
Ok Now that you Have your Code just type: umount /efs
And disconnect your phone from your computer, turn off your Phone and insert a SIM from another company, it will ask for the Unlock Code, just type the code that you just get and you are done, your phone is now unlocked and without brick risk.
Image:
Now you can check that your cellphone is unlocked by typing the next code on your numeric keyboard, like if you where doing a call: *#7465625#
Image:
And thats it, its really easy, and its really safe if you read everything, and clear your doubts.
All the images are mine and i learned this from a friend of my, but its tested in 15 Samsung Galaxy Ace Phones an none get hurt
Well thats it, remember to comment and ask as many times you need, im glad to answer all of your questions, se you later