Controlling Mac's front led - macos

For a project of mine, I'd like to control (i.e. dim, set on or off) the little LED that sits in front of macbooks (and maybe other Macs, I don't know).
Unfortunately there's no API nor help about this on the internet - the only thing I could find was about dimming the keyboard LED. Apart from that, I only know that it would for sure use the SMC chip.
I'm OK if it needs root.

First thing, I must agree it is duplicate. But things have changed since 2010, and now it is possible to control this LED !
Take a look at xline. It's a project of mine, and it' s able to control the LED, through the SMC.
Just take a look at the source code.
BTW, I'm first opening a connection to the AppleSMC IOService using IOKit, then I'm setting the LSOO key in the SMC to 01. 00 shuts the LED down. And I use LSSB key to make it breathe, like when the MacBook is sleeping.

Related

Disable Windows from intercepting Windows-W key

I use Windows-W for something else. For over 20 years now. The muscle memory is strong.
Enter Windows 10: Now, that key is intercepted.
I don't know by what, but my application (which i think is irrelevant to name) isn't receiving it. It's not even a new install, it's one of those programs that you can run out of a folder without installing, carrying it from computer to computer over the yeras. without any behavior ever being disturbed
Windows 10 has grabbed several keys this way.
It seems most solutions out there are about DISABLING the windows key entirely, or DISABLING a specific keystroke (like windows-w in my case).
I don't want it disabled. I want whatever windows is doing to it to stop, and let it pass through the way it did in Windows 7/2K/98/ME [yes going back that far].
A lot of time already spent on this unfortunately.

AutoHotKey permanently changed my keyboard keys, even at the bios level

Recently installed AutoHotKey to remap some keys in order to play a video game. It seemed simple/attractive enough at first. Was not really sure of how it worked but found the .chm file in the download which states in the first line of Usage & Syntax/Using the program:
AutoHotkey doesn't do anything on its own; it needs a script to tell it what to do.
Sounds 'secure' enough to me. Seems like mature software. Maybe overkill (now I know it certainly was overkill) but let's just see how it works.
My remapping was simple enough: change the AWSD keys for the LEFT-UP-DOWN-RIGHT keys. Script syntax is simple enough, just used an example that comes with the install files. Works essentially as expected. Got an annoying pop up after playing the game for a bit from AutoHotKey saying "you've pressed mapped keys 600 times" or something like that. Which was only a little annoying, so I ignored it the first few times. The game I play is real time so getting a even a 5 second interruption while in a match would mean certain loss, so I decided to just disable the script and uninstall.
Lo and behold: when I stop the script, the keys continue to be remapped. Was there some background process running? Maybe. I rebooted only to find that on my Windows login screen my keys continue to be remapped. Huh? Did AHK mess with some registry bindings or something?
I do not know that much about how Windows works, but my vague recollection is that registry bindings is something is active once the OS is active. I search on the web for say 1 hour before I give up for the time being and I end up activating the script again in order to write normally. This works as expected and I literally forget about it until any time I have to reboot.
Honestly a minor annoyance, but due to the world changing very quickly I lately have very few precious minutes that I can actually sit down on my desktop, whereas I used to be able to spend hours on this type of computer issue in order to get to the bottom of it. In other words, my current solution felt good enough. But not anymore. I think something more serious and possibly nefarious may have occurred. I don't want to seem dramatic but I just discovered something else a few minutes ago.
I have a Linux installation on another drive and I just happened to want to load it up after my last Windows blue screen (have gotten a couple of those lately, literally 2 in the space of 2 days and this had maybe only ever happened once before, like 2 years ago, so I am a already concerned about a possible deeper issue). My firmware/bios has a password and guess what I found when I tried inputting it: the keys were still remapped.
At this point I am at a complete loss. I didn't even think this sort of thing was possible. Some OS level software caused a change that was able to be reflected on the bios? Did it affect the keyboard driver? A driver that both windows and the motherboard bios use?
What else have I tried or looked at:
Device Manager claims my Keyboard has 3 instances of "HID Keyboard device". Not entirely sure why it shows 3. Properties show it has 2 driver files: kbdclass.sys and kbdhid.sys, which I suppose are some standard drivers. Not sure how to proceed.
My keyboard is inland (cheapest i could find at microcenter) i am not sure why I cannot find the website for that company. Found some drivers on reddit but they are on some sysadmin's google drive. I will download that exe when i am desperate...
UPDATE
I 'solved' the issue bye getting another keyboard (an old IBM KB-0225) and everything is now in order. I tried disconnecting the Inland keyboard and reconnecting, but after reconnecting I was still experiencing the same issue.
I don't know if I should close this question as there is no longer an issue, but I would like to see if anyone has any other additional theory as to why some software/driver changed occurred inside a keyboard device. As far as I knew, these devices have not internal memory other than possibly some logic gates.
There must be a background process running.
to check that:
note : For windows 10
On your taskbar, click on the ^ button (skip this step if there is no such button)
right-click on the sign.
click on "exit"
If the above steps do not work, try keeping a watch all the time, to see if you notice something uncommon.

bootloader unlock not allowed : NO?

from France !
I just want to know if there is a tip for my old xperia s (LT 26i) to change this status ( bootloader unlock not allowed : NO !) to YES then i can unlock my bootloader at the end to install custom rom because there is more and more apps who didn't work at all !
i found old topics in xda (testpoint method, wotan and omnius server but it was only for 2011 smartphones). Now i was wondering if it's possible (if i find one with good status) to flash a TA partition ? In this case maybe you can send me one...
Anyway, i've never told about that when i've bought my phone, so my operator would be agree if you have to fix the phone...
I'm a tech guy with developper abilities so i can follow any procedure
Thanks for answering me because from now no one was able to give me a clear answer
Have a good day ( excuse my french, hope it's understandable ! )
Mr Niederlender
I have some experience with the Xperia bootloader, having an Xperia SP myself and messing with it.
Not so long ago, I stupidly flashed the simlock.ta file included in an .ftf file in Flashtool, thinking it would resolve my SIM-card reader issues. I've had an unlockable/unlocked bootloader up until that point. Upon booting the phone up again, the bootloader was locked, and the service menu said "Bootloader unlock allowed: NO".
I've tried messing with my TA partition and all kinds of simlock.ta files, but I've figured out with a friend of mine with an SP aswell, the TA seems to have a value, a sort of hash it checks the simlock section of the TA, and if it doesn't match, it activates a lockdown, disabling the SIM-card reading ability, disabling fastboot completely (booting normally to Android when volup + power or adb reboot bootloader). Literally changing the TA file and flashing it back won't work, the phone will be hard-bricked at that point and you'll need to use the testpoint found by taking the device's back apart, a hard-to-find tool to convert your TA backup into a SETool2-workable file and SETool2 to restore a backup of the TA you've made before doing any of the changes. (if you forget the backup, dead device)
Now I have done some research and found that 2011 Xperia devices had in their TAs a "Security Unit" section, which basically holds to-your-device-exclusive numbers that determine whether the TA is truly yours and whether the device boots. I'd assume the same holds true today, or at least for the Xperia SP, and if we could get an Xperia SP TA backup with an unlockable/unlocked bootloader, we could patch this TA file to have our own unique Security Unit inside and possibly have a bootable device with an unlockable bootloader with fastboot back, even if the SIM-card reading is gone.
This is, of course, definitely against what Sony would want us to do, and also not an answer that is a solution, but considering our warranties are over, the device has reached its end of support by Sony, and I've taken the device apart to be able to use its testpoint, I think this "hacky" method is still a theoretical solution.
Hope this helped you understand the situation better, and I'm also hoping there'll be someone that can help us in the future. This is such a great device with a custom ROM (specifically StryFlex Marshmallow is a beast on this device) and I'm hoping I'll one day see it working with it again.
TL;DR: Purely flashing a TA partition of another device hard-bricks the phone, possible (theoretical) workaround to hard-brick by patching the new TA to have our old Security Units section.
Simlock afterall does correspond to bootloader-unlockability, flashing a simlock file activates a sortof "lockdown" to SIM-reading, fastboot and bootloader-unlockability.

VS2010: Loading symbols from dlls very slow

I have a program which I am working on my Dell Laptop XPS 502X. At work, I usually have another monitor plugged in my DVI port and everything is fine. When I work from home, I only have the laptop screen. When I start the program in VS2010, it is very slow and I notice in the bottom of the screen Loading symbols for ...\NVIDIA Corporation\coprocmanager\detourel.dll... which takes around 10-20 seconds every time. Any idea on why this is happening ?
EDIT:
I thought it was a drivers problem, but now it happens again.
I tried the ideas posted in similar questions
-DeleteAllBreakpoints stuff, didn't work.
-No remote symbols fetch or network path
-Enabled Just My Code
Looks like a hook DLL injected by the graphics drivers... driving me crazy!
EDIT 2:
The problem happens on and off, today everything seems find, yesterday, I even noticed it was slow loading the GROOVEEX.dll while the program was running when I was starting a CFileDialog. So it might not just be something related to the graphics drivers.
It looks like nVidia's use of the Detours library from Microsoft. Hopefully this will help...
http://forums.nvidia.com/index.php?showtopic=212704
and
http://research.microsoft.com/en-us/projects/detours/
Run the msconfig tool that is built into Windows to take a look at some of the things that nVidia launches at startup. You may want to try disabling some of the startup items temporarily, but you'll want to research what each item you disable is before doing so, or you may have to go into safe mode to get back to a good state.

Change MAC-Address in iOS5

I Used to change my Mac Adress in Open Networks with the command:
ifconfig eth0 ether 00:11:22:33:44:55
in iOS4 this was no Problem, i remember there was even an App on Cydia for that. For ifconfig i instaklled network-tools from BigBoss Source.
Since iOS5 the Command is going thru Terminal without any error, however the MAC-Address isnt changing anymore... Someone a Idea on how to change it?
It's possible. For some reason, spoofing it in iOS 5 won't work (either via command line or MacX4), but you could always rewrite it in hardware. There are several cons to this and this is not worth during unless you absolutely have to: it will break your music player (so you have to use VLC or the like), is permanent even after reboot, and effectively changes your UDID (so betas will not work and the device will be unregistered).
nvram wifiaddr="XX:XX:XX:XX:XX"
Again, the cons definitely outweigh the pros here. I'm sure eventually someone will come up with the software to do a spoof, not a total rewrite.
It can be done. My iPad running 5.01 has an arbitrary MAC. There are no restrictions as far as playing music, and I am still able to access Apple services (at least those that I use personally) without hindrance. It's a moderately tedious process, but after a bunch of failed attempts I was able to successfully (and permanently unless I decide to repeat the process using my originals) change the values with a combination of terminal commands, DFU/recovery cycles, OSX apps, and a clean restore via iTunes. If anyone is still interested, I would be willing to outline the process. I would do so now, but I have to hash out some specifics concerning the iTunes host file.
Because the MAC address is unchangeable for a reason?

Resources