21 May, 2024

My Xiaomi 11T Phone Unlocked!

So today past noon, 1.00 pm, after the 72 hours of required waiting time, my Xiaomi phone was unlocked!

There.

This proves that this Mi account registration method really works.

1. Register an account using 'US' as your region; 

2. Use an e-mail that is fresh (or new) > not used before; and

3. A new phone number for recovery

Then you wait for 30 days at least to be granted 'rights' to unlock bootloader.

Afterwhich you add your account in Settings... Mi Unlock status.

Then wait for 72 hours.

Then unlock bootloader.

All done for me now, and my Xiaomi 11T phone's bootloader is unlocked, and all data erased.

I shall now proceed to flashing custom ROMs.

Hope you also succeed in doing Xiaomi phone unlock of bootloader.

Till then!


18 May, 2024

Unlock Xiaomi Phone

I got a phone, not new, so I want to unlock Xiaomi phone and test the Xiaomi 11T phone's capabilities.

So I did a registration using my country of residence, waited for 30 days and when I was granted the rights, I went to fire up the Mi Unlock program.

Simply, the program responded with me not having done the adding of my phone's unlock status something-something.

So I followed the text. Went to Settings > Additional settings > Developer options > Mi Unlock status to add my unlock status, and lo and behold, error came, it cannot be added, try again, and the same error message cycles one after another. Days trying, but no success.

I searched the web high and low, with many suggesting seemingly sensible solutions, but of course, just nonsense chatter, useless blabber. Sorry, I got fed up with these guys whose aim is to only get viewership and page view count.

Anyway, I found one that experienced the same issue, but also found how to do it right. Now, that is the key point here: 'do it right' from the start.

Apparently, only users whose region = 'US' will be allowed to unlock their phones, unless of course, yours is the China variant, which is allowed automatically as you are doing it within China. Outside of China, only 'US' users are allowed to unlock their Xiaomi phones.

These are the requirements:

1. e-mail

2. phone #

3. region = US

I used the same phone # which is in my country of residence, a different e-mail as some have tried using the same e-mail and ran into the same error after 30 days of waiting, and most importantly, region = US.

Well, this is how you should register for your Xiaomi account:

1. new e-mail

2. working phone # (as WiFi is supposed to be disabled)

3. region = US (no matter where in the world you are, except China, of course)

I did just that. And today is the 31st day, and once I was able to get the 'rights' to unlock my phone, did the unlock, and after being prompted that phone data will be erased and the phone will be less secure, etc., proceeded, and I got the 'wait for 72 hours' message.

Wait. Before I can attempt to unlock my phone using a laptop, I was told to add the unlock status in Settings > Additional settings > Developer options > Mi Unlock status. This is where the US region plays its part very well: this is the second account registered but with the US region, and it was a one-time attempt in adding my account.

So now, I am waiting. 3 days later, I will again try to unlock the phone, and see what awesomeness the Xiaomi 11T phone has to offer.

Again, here's how to simply get the rights to unlock Xiaomi phone and get an error-free additon of account in the Mi Unlock status page:

1. register using US as region (regardless of country of residence, except China-variant phone)

2. use a new e-mail (just to be sure)

3. have a working phone # (as WiFi need to be disabled)

I hope that this short article on how to unlock Xiaomi phone the right way is found first and foremost by those who need this. Happy rooting!

Till then!

15 April, 2022

Get Local or Remote Logon User Using Request.LogonUserIdentity.Name

Using Environment.UserName returned server name, then application pool name. That is what I encountered recently. And since I needed to know who is using that small web app, as it is logged into an Oracle table, I had to find out how to get this info correctly.

Searching the web usually and always gives a lot of answers. And you have to fish out what may work. But apparently, I had to really search for longer.

My goal is to get the logged-on user from a laptop, as well as the PC name. And aside from the failure of returning the server name, the application pool name, and even the IIS IUSR at one time, that is not what I wanted. It had to be the logged-on user, and also the machine used (Environment.MachineName).

Fortunately, I managed to piece together and make do 3 points:

1. In the server, you have to disable the Web Site's Anonymous Authentication setting.

2. Then, to get the logged-on user, use Request.LogonUserIdentity.Name.

3. Finally, get PC or computer name using System.Net.Dns.GetHostEntry(Request.ServerVariables("remote_addr")).HostName

1. Disable the Web Site's Anonymous Authentication Setting

In the server where your web application is published or deployed, select and double-click on your website. In the IIS section, double-click on Authentication. Right-click on Anonymous Authentication and select Disable if it is Enabled. Step one is done.

2. Capture Local UserName

Below is the code sample, where I employed redundancy. This will work only when step 1 is done.

Dim userName As String = Environment.UserName

Dim pcUser As String = Request.LogonUserIdentity.Name

If (pcUser.Trim.Length > 0) Then

userName = pcUser

End If

3. Capture Local Computer Name

Finally, use the below code to get the local PC or computer name. Again, this is employing redundancy.

Dim pcName As String = Environment.MachineName

Dim comp_name() As String = System.Net.Dns.GetHostEntry(Request.ServerVariables("remote_addr")).HostName.Split(New Char() {"."c})

pcName = comp_name(0).ToString()

There you go! 3 steps to capture the local user and local computer name. Nothing else, or if these steps don't work for you, then you need something else. Otherwise, you are all set. Hope this helps, how to get the local or remote logged-on user.

Till then!