How to fix "ADB.exe has stopped working"? - android-studio

I cannot test the Android Studio app with help of USB connection to my phone. The single issue is: "ADB.exe has stopped working".
After that I've tried to change something in System properties of Windows 10 that I use. I went to: System properties -> Advanced -> Performance -> Settings -> Data Execution Prevention -> Add. At the moment I had found the file named as adb.exe and found out that "This program must run with data execution prevention DEP enabled".
I tried to correct this with the command inputed in command prompt as administrator. I had inputed: "bcdedit.exe /set {current} nx AlwaysOn" and the operation completed successfully, but I cannot still add that file in those settings and as a result, I have no opportunity to test my application with USB connection.
What should I do in this case?

Related

Trigger event with RDP login

I'm running Win 10 without running explorer.exe
At startup windows runs my default app, but I need to run explorer.exe whenever a RDP connection is done to the machine.
I'm been trying to find the RDP success login event to use in Task Scheduler, but have no look.
How to find the event to fill the fields Log:, Source: and Event ID: on Task Scheduler?
Thanks
Found it, actually its kind of simple.
Using Computer Management -> Event Viewer -> Applications and Services Logs -> Microsoft -> Windows -> TerminalServices-RemoteConnectionManager -> Admin and here you can see the last events, ID 20521 seems to be RDP login, not sure about this.
Right click and select Attach Task To This Event, from here configure Task Scheduler accordingly with your needs.
Don't know if there is a better way do do this, but it works for me.

AdroidStudio 2.2.2 Empty Activity Error on phone

I just started learning about Android development, so this one is a serious issue for me: I launch Android Studio (2.2.2, but had the issue since 2.2.1) on Win10, make a New project, just keep clicking Next without changing anything (selecting Empty Activity as the template), Finish, try to Run 'app' on my phone and consistently get this error:
Error while executing: am start -n "com.example.android.myapplication/com.example.android.myapplication.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.android.myapplication/.MainActivity }
Error type 3
Error: Activity class {com.example.android.myapplication/com.example.android.myapplication.MainActivity} does not exist.
Error while Launching activity
Being a complete newbie who was just supposed to change some text in XML and run the app on a phone, I have no idea what to do or edit to make a pregenerated app actually work. I searched StackOverflow for a more general approach to these errors and tried:
Restarting AS/computer
Disabling InstantRun
Messing with Clean/Rebuild/Synchronize/Sync with Gradle
Deleting .gradle and .idea folders and Syncing with Gradle
Some other obscure shenanigans with build.gradle and AndroidManifest
Various combinations of the above.
... None of which worked (or affected the problem in any way, in fact).
Other observations:
The app isn't even installed (checked All apps, there isn't any com.example.android.myapplication or MyApplication app on my device)
On the development course forum, it was suggested that com.example.android.myapplication/com.example.android.myapplication.MainActivity should only read com.example.android.myapplication/MainActivity. So far I haven't been able to figure out how to change that.
Update 1 New attempted fixes (neither of which worked):
Specified activity directy in Run/Debug window.
Specified no activity whatsoever (doesn't show that error, but doesn't run anything either).
Did File/Invalidate Caches
Changed android.intent.category.MAIN to all-lowercase and back.
Added "category android:name="android.intent.category.DEFAULT"/" to Manifest
Update 2 Managed to run the app on emulator. It seems to be working there, so the error will likely be somewhere between AS and the phone (Android 5.1.1, API 22).
Developer options and USB debugging are on (confirmed the pop-up message, too)
Driver is up to date (AS can see the phone without problem)
Phone is on (and not asleep) while I'm trying to run the app
Any suggestions why the phone won't download and run the app?
In your manifest file edit
with android:name="com.example.android.myapplication.MainActivity"
Make sure that your code doesn't mean any nonsense and that it wouldn't cause the app to crash, which is sometimes the problem. Try finding a problem in code which could crash the app. Maybe in your crash log you can find what causes the crash. Good luck fixing that.
According with your error log I suppose you did not delete previously installed app. See my accepted answer on the same question for details.

How can I run a performance and diagnostics session on a Surface RT machine?

I am trying to launch a remote performance and diagnostics session on my Surface RT machine in Visual Studio Express 2013 by selecting Debug -> Performance and Diagnostics. However, I get the following message:
Diagnostics session failed to start.
Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named '192.168.11.43:4018 (< device name >)'. Connection request was rejected by the remote debugger. Ensure that the remote debugger is running in 'Windows Authentication' mode.
OK, fair enough, so I change the remote debugger to Windows Authentication mode, but no matter what I do I can't authenticate because my PC and tablet are on different domains (that is the way it seems anyway). The tablet is running Windows RT, of course, so it is impossible to change the domain. I have tried to start the remote debugger from the command line using the -u switch with the username and domain from my PC but that was no good either since the tablet can't authenticate it. I also tried to join the tablet's domain on my PC using the script from this answer but I don't get a successful return value (the return value is 5).
Most of the blogs I have come across say "just save yourself the trouble and switch to 'No Authentication' mode" which is what I did in the first place, but the diagnostics session refuses to run this way. What hoops do I have to jump through to get this to work?
Unfortunately I don't think you can get this to work on an RT. Our team has Pros for exactly this reason. Not being able to join a domain is the killer. :(

session microsoft security client oobe stopped

i use Windows Server 2008 R2. I connect the server by remote desktop connection. But nowadays the server closes my remote desktop session randomly and all my application running during the session are closed. Simply, my remote desktop connection is forcely logged off by windows.
When i reconnect, i open event viewer and see that following error:
session 'microsoft security client' oobe stopped due to the following error: 0xC000000D
What can be reason which makes the server behave like that?
OOBE problem SOLVED ?
IT'S A SECURITY COUNTER
YOU MUST, again, MUST shutdown the security counter.
This is the reason that everyone says to delete the C:\ProgramData\Microsoft\Microsoft Security Client\Support\EppOobe.etl file. This file is used and created by this counter.
DON'T DELETE THE EppOobe.etl file instead
You MUST go into into Computer Management by these steps
-> control panel -> administrative tools -> computer management and drill down into:
System Tools -> Performance -> Data Collector Sets -> Startup Event Tracing Sessions
Then, in the frame to the right on that window, select Microsoft Security Client OOBE, right click on it and select Properties.
Click on the tab Trace Session and
Then DISABLE it (uncheck the Enabled box). Then, you select OK.
Disabling the MS Security Client Counter as I listed above, will not stop the
Security Esssentials- will run fine without it.
theses steps are for windows 7

Problem in registering a 32 bit C++ COM/ATL Service on Windows7 64 bit

My product have a ATL/COM based C++ service (32 bit). It get registered and run fine on XP 32 bit and Vista 32 bit.
But now I want to run the same on Windows7 64 bit also. I tried to register the service the following way:
1 I did Copy MyService.exe at C:\Windows\SysWOW64.
2 Then executing "C:\Windows\SysWOW64\MyService.exe" -RegServer from Start->Run
3 Then executing "C:\Windows\SysWOW64\MyService.exe" -Service from Start->Run
But my service is not getting registered. While registering it, I don't get any error message. Also I didn't find any entry in event viewer (I saw event viewer first time. Don't know where to see the log about registration of my service). And I didn't find entry for my service at Control Panel\Administrative Tools\Services.
Please advise me how can I register my service?
Thanks in Advance
Regards
If UAC is enabled on the machine then registering it via Start -> Run is unlikely to work as it would almost certainly need full administrator rights to register its objects and create its service.
Open an Administrator command prompt and try registering it from there.
(Find Command Prompt in the start menu, right-click it and select Run as Administrator.)
Alternatively, instead of using Start -> Run, type the command directly into the Windows 7 start menu and then push Ctrl-Shift-Return to run it as Administrator.
Try commands at cmd running at administrator rights.

Resources