How to force-stop a protected package? - adb

I know the commands am force-stop com.my.app and am kill com.my.app that should stop a running app through the root terminal (using su command)
But know I have an app that refuse to stop after I kill her because she is a protected package And I get the following error:
java.lang.SecurityException: Cannot disable a protected package: com.my.app
If you know how to kill a 'protected' app or to disable this protection I would like to get some help.

Related

Uiautomatorviewer Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist

i can launch Uiautomatorviewer sucessfully, inspect any page/app at personal profile.
Once phone at work profile/launching any app installed under work profile then Uiautomatorviewer throws error:
Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!
i am not sure why it behave like this suddenly, it used to work regardless personal / work profile last week.
i don't remember i change any configuration...
please help to give me clues why? i have followed many previous post suggestion to restart adb server, kill appium server, restart phone/laptop, disable enable developer options...etc. none works....
I tried to inspect personal profile now, the same error occurred:
Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!
updated: i used appium studio inspector and it works. I still not sure what happened to adb or uiautomator via command line? how do i debug it?
found an answer
com.android.ddmlib.SyncException: Is a directory
try doing adb shell rm -rf /data/local/tmp and rebooting the phone first. it's ok if you get rm: /data/local/tmp: Permission denied. ignore it - it's for the tmp folder itself after its content was already removed (that's what you need anyway)

ClickOnce shortcut doesn't start application

I have created a WPF application in VS 2017 that installs with ClickOnce. After deploying the solution to a network location, I am able to install on my 64-bit Windows 10 computer by visiting the .application link.
However, the application does not run on my machine after it is installed. When I attempt to use the .appref-ms shortcut from the Start menu, nothing happens. I have added code to launch a debugger when the application starts, but it doesn't get hit. I see nothing getting logged in the clickonce log when running the application from here. I have set the logging to Verbose in the registry.
If I attempt to run the application from the %userprofile%\AppData\Local\Apps\2.0\ install location, it runs fine and launches the debugger. However, I can't use this location because it will then use the config file from this location rather than the config stored in %userprofile%\AppData\Local\, which allows new versions to continue using the same configuration. It's also inconvenient for users.
If I go back to the .application link on the server, I am able to install new versions when they are deployed, but it still does not launch the application or log any issues with running the application.
The .appref-ms looks like this, and Launcher.manifest does exist in the install location, along with the file listed in the manifest:
file://192.168.10.11/Projects/Launcher.application#Launcher.application, Culture=neutral, PublicKeyToken=0000000000000000, processorArchitecture=msil
How do I track down the problem with my ClickOnce shortcut?
Edit: Someone mentioned looking in the Event Viewer, and I found a SecurityException, which only occurs when running from the shortcut. Debugger.Launch() is the first line in the MainWindow Constructor on the partial class, but it is not getting hit. Here is the exception from Event Viewer:
Application: applaunch.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Security.SecurityException
at System.Security.CodeAccessSecurityEngine.Check(System.Object, System.Threading.StackCrawlMark ByRef, Boolean)
at System.Security.CodeAccessPermission.Demand()
at MS.Internal.SecurityHelper.DemandUnmanagedCode()
at System.Windows.Window..ctor()
at Launcher.MainWindow..ctor()
This helps in my case (had the same problem):
Project -> Properties
Security: Change from partial trust to full trust
Changes marked yellow:

Mesosphere installation PermissionError:/genconf/config.yaml

I got a Mesosphere-EE, and install on fedora 23 server (kernel 4.4)with:
$bash dcos_generate_config.ee.sh --web –v
then output:
Running mesosphere/dcos-genconf docker with BUILD_DIR set to/home/mesos-ee/genconf
Usage of loopback devices is strongly discouraged for production use.Either use `--storage-opt dm.thinpooldev` or use `--storage-opt
dm.no_warn_on_loop_devices=true` to suppress this warning.
07:53:46:: Logger set to DEBUG
07:53:46:: ====> Starting DCOS installer in web mode
07:53:46:: DCOS Installer v1
07:53:46:: Starting server ('0.0.0.0', 9000)
Then I start firefox though vnc, the vnc is on root. then:
07:53:57:: Root page requested. 07:53:57:: Serving/usr/local/lib/python3.4/site-packages/dcos_installer/templates/index.html
07:53:58:: Request for configuration type made.
07:53:58::Configuration file not found, /genconf/config.yaml. Writing new onewith all defaults.
07:53:58:: Error handling request
PermissionError: [Errno 13] Permission denied: '/genconf/config.yaml'
But I already have a genconf/config.yaml, it look like:
bootstrap_url: http://<bootstrap_public_ip>:<your_port>
cluster_name: '<cluster-name>'
exhibitor_storage_backend: zookeeper
exhibitor_zk_hosts: <host1>:2181,<host2>:2181,<host3>:2181
exhibitor_zk_path: /dcos
master_discovery: static
master_list:
- <master-private-ip-1>
- <master-private-ip-2>
- <master-private-ip-3>
superuser_username: <username>
superuser_password_hash: <hashed-password>
resolvers:
- 8.8.8.8
- 8.8.4.4
I do not know what’s going on. If you have any idear, please let me know, thank you very much!
Disable Selinux!
Configure SELINUX=disabled in the /etc/selinux/config file and then reboot!
Be ensure the selinux is disabled by the command getenforce.
$ getenforce
Disabled
zhe.
Correctly installing the enterprise edition depends on the correct system prerequisites. Anyway I suppose you're still on the bootstrap node so I will give you some path to succed in your current task.
Run the script as root or as a user issuing sudo dcos_generate_config.ee.sh
The script will also generate the config file automatically; if you want to use your own configuration file then create a folder named genconf and put it inside before running the script. You should changes the values inside <> with your specific configuration. If you need more help for your specific case send me an email to infofs2 at gmail.com

Glide/Gaelyk/Groovy: Error deploying to Google App Engine: Can’t enter oauth2 token

As part of the deployment process of a Glide project (http://glide-gae.appspot.com/docs/intro step 3 of 2nd section) you need to authenticate using oauth2. My browser popped up with the token as expected but the process didn’t wait for me to copy the code in, it just carried on with the following error...
22:30:12.713 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] Daemon is busy, sleeping until state changes.
22:30:12.733 [INFO] [org.gradle.launcher.daemon.server.exec.LogToClient] About to start relaying all logs to the client via the connection.
22:30:12.734 [INFO] [org.gradle.launcher.daemon.server.exec.LogToClient] The client will now receive all logging from the daemon (pid: 12557). The daemon log file: /.gradle/daemon/1.8/daemon-12557.out.log
22:30:12.739 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 14: received class org.gradle.launcher.daemon.protocol.CloseInput
22:30:12.740 [DEBUG] [org.gradle.launcher.daemon.server.DefaultDaemonConnection] Received IO message from client: CloseInput[id=069864b2-2948-4a9d-abea-0705274136a1.2]
22:30:12.741 [INFO] [org.gradle.launcher.daemon.server.exec.ForwardClientInput] Closing daemon's stdin at end of input.
22:30:12.742 [INFO] [org.gradle.launcher.daemon.server.exec.ForwardClientInput] The daemon will no longer process any standard input.
22:30:12.747 [INFO] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] Executing build with daemon context: DefaultDaemonContext[uid=3901cff0-8d50-41b6-9459-e31f7b78f1e3,javaHome=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home,daemonRegistryDir=.gradle/daemon,pid=12557,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-Xmx512m,-Dfile.encoding=UTF-8]
Please enter code: Encountered a problem: No line found
Please see the logs [/var/folders/c8/vx2jf50j68x1z3_pysy6kxjm0000gp/T/appcfg2389447403250678065.log] for further information.
Daemon vm is shutting down... The daemon has exited normally or was terminated in response to a user interrupt.
----- End of the daemon log -----
org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.8-bin.zip'.
What can I do to be able to deploy my application? How can I force the process to wait for me to enter the code?
If that's (glide deploy) not working for you, the easiest option is to export the app as a standard gradle project and then execute the gaeUpdate task.
glide -a somedir/yourapp -o where/you/want/to/export/app export
Note that the export is command at the end, -o tell the location where it should be exported.
Then from the exported project run: gradle gaeUpdate
A work around is to manually set your credentials in the GAE build.gradle file.
Update the following file:
/glide/install/generated/app-name/build.gradle
appcfg {
email = ‘email-address'
password = ‘password'
app {
id = ‘app-id'
}
}
This means that the values from the __glide.groovy file are ignored, but at least you can get the application deployed

X11: Start desktop manager inside daemon

What I'm trying to do:
Make screenshots of desktop and running program (Firefox Webdriver with Selenium, if it's important) in daemon (celeryd) in auto mode.
And I need desktop manager to be running, this is mandatory requirement. Currently I'm trying to use Fluxbox but I can switch to any other manager.
Current progress:
I can start X-server (Xvfb) in daemon and start Selenium Webdriver. Fluxbox start succeeds when I try to make it from terminal, but fails in daemon with following errors in log:
Can't create directory
Failed to load database:
Failed to load database:/init
Retrying with: /etc/X11/fluxbox/init
I tried to specify init-file directly, but Can't create directory error still exists and Fluxbox fails to start.
This might be daemon-mode restriction.
Question:
Is it possible to run any desktop manager inside daemon?
If yes, then how can I do this?

Resources