I am developing an application in C # that creates and sends an SQLite database for the device. I use the Madbee library to send files to the device. It happens that the application sends the file without problems, even if we open the database on the device we see that the data is updated.
But when accessing the data of the device from the PC the file is not listed. It appears only after restarting the equipment.
I believe it is a bug or something WPD. I tried using the command "remount" adb, but was not successful.
Does anyone have an idea how I can fix this?
PC: Windows 7 Professional.
Device: Motorola Razor D3
Visual Studio 2010. +. NET Framework 4
I suspect that the problem might be with MadBee library according to your statement.
First, "adb remount" will not help anything related with the internal SDCARD. This command only works for the debug-dev-devices, on which the ADB daemon is running in root user and thus could remount system partition from ro to rw.
Second, when you say that 'the app works well when send files to devices but cannot list the files on the device', I suppose that you are referring the problem happens when you are trying to perform r/w via MadBee library. So, please make sure by executing "adb shell ls -l /path/of/your/file" command to check if the file is OK. If the file is there, it is 99% that your library does not work correctly. If the file cannot be seen by adb shell, there are many potential reasons.
P.S. If I remember correctly, ADB shell does nothing to do with the "MTP" or "SDCARD" mode.
Very easy, try another device! Can be security options!
Related
I am currently running with a portable device running Ubuntu 15.10. The idea is that this unit will have no screen (a secondary device will be optionally connected to it, but standalone, it's for data recording out in the field), and read from a list of SSIDs and Wifi-Passwords to connect to them when available.
We are currently using Mono C# on the device, but hitting a snag when it comes to wifi.
My question is this: Is there a class or DLL I need to implement inside of the C# environment to get the Access Points, and connect using a password, or alternatively, a terminal tool that will A) return a list of APs available and B) can take in an SSID and Password and attempt a connection?
Thank you for your help.
Current Solution:
I run a process of nmcli, attempting to parse the incoming stream (not good at this on Linux yet), to get a list of SSIDs.
After some comparison, I run another process, calling "nmcli dev wifi connect password " based on a text file.
This is currently working, but I'm wondering if there are better solutions.
Edit 2: The major issue with the above is that, if a bad password is provided, it launches the Password Required window and locks up the system.
Edit 3: After messing around with the nm-applet, killing it to stop the pop up, a series of 802.1X errors appeared, though not every time. If I attempt the connection enough times, it succeeds eventually.
Edit 4: Re-installing network-manager seems to have fixed a few problems, but still buggy.
Edit 5: In regards to iwConfig, I tried that, but I found that when I used iwlist wlan0 scan | grep ESSID, it only returned the current connected network 9/10 times.
You basically want to implement a C# API for NetworkManager's D-Bus API.
To scan the available wireless networks, you should connect to NetworkManager's D-Bus, call the getDevices method, and call its getNetworks.
See dbus-sharp for a D-Bus API for mono/C#. Read more about NetworkManager's D-Bus API in here. See here an example for an implementation of an interaction between dbus-sharp and NetworkManager.
Keep in mind that this will only work on Linux systems that use NetworkManager (Almost all major Linux distributions, including Ubuntu).
Note : I'm using VS2008 and I'm working on windows 7.
I'm developping a Windows CE application which will run on a Motorola MC3000 device with a WinCE 5.0 like OS .
I tried to use ActiveSync in order to make the test with the selected device possible but it doesn't work on win7, so I tried to find another tool and I found Windows Mobile Device Center based on this discussion .
So Now I can browse with the device but unfortunately I can not test with it : The device have a "santech" application installed and can not kill the app. (even when I reboot the machine, the autorun lunch the app. automatically). Also when I try to deploy my application on the device it return error reports ; sometimes "no disc space" sometimes "the .exe can not be found".
I'm really stucked.
Can some one help me with this, I will be really gratefull.
Sounds like the debugger is attaching just fine, it's just unable to either fully copy the app and dependencies, or there's not enough memory to execute it.
If you can browse the device, you can stop the "santech" app from running. You just have to determine what is launching it. It might be a shortcut in the \Windows\Startup folder. It might be through a registry entry at \[HKLM\Init\]. IIRC, Symbol devices also support a *.run file in the \Application\Startup folder, so check that as well.
One of those is launching the app, so you can eliminate that if you desire.
Next, check the available memory on the device by looking in the Control Panel under System->Memory and adjusting the slider to provide more storage space. If there's not enough Storage Memory to store your app, you might try changing the deployment directory (under Project Properties->Device) to push the app binaries to non-volatile storage of some sort (on-board Flash, SD card, etc), if the device has it.
If you don't have enough Program Memory to run your app, you might be out of luck. Try killing processes to free up some space and playing with the memory allocation slider.
You can debug from inside VS2008 as well. You'll need to tell it to connect to a device as it automatically sends it to a emulator. To do that you need to select Windows CE Device from the dropdown list found in the "Devices" toolbar (To enable go to View, Toolbars and select Devices). Then hit F5 and it should start up on your device. You might get a couple of pop-up boxes that contain a list of devices; make sure these are set to Windows CE Device as well.
This handy page on MSDN should provide the information you need also.
I've been given the task of running a program that relies on a MySQL database, specifically, the 3.23.42 version. I have to install MySQL, run a .batch file that reads an SQL file (to create the required tables and such), then run the program. Seems simple enough.
I got as far as installing MySQL. I was expecting it to ask username and passwords and such, as was my experience with installing SQL Server and MySQL version 5 (and later), but it needed nothing from me. Attempts to run the .batch file, however, yields the error:
"MySQL Error 2003: Can't connect to MySQL server on 'localhost' "
So I ran Command prompt as an administrator, went to the MySQL directory, and ran "mysql". It gave me the same error as above.
Running the commands "mysqld-nt" or "mysqld" didn't do anything, so I'm assuming there's another problem at work here. Neither did I find any 'mysql' in the running services or process.
At this point, it doesn't matter if the program runs or not. I need the database up and running first.
Although I've used MySQL before, I can't say I have that much experience with it, and it had always been up and running already; this is the first time I'm deploying it myself.
Of note is that:
I haven't tried to reinstall the program yet, although I'm not sure if it will fix anything.
I've installed MyODBC-3.15.05, if it means anything (part of the instructions).
I'm using Windows 7, 32-bit (I have heard MySQL doesn't like to play nice with Windows 7).
I'm using this setup as both the server and the client; had the entire process been successful, I was to do the same thing on another computer. No computer actually uses another as a server.
I don't exactly know what services to look for in the services list.
Is there anything I can do to fix this problem?
Early versions of the MySQL installer didn't set up the windows service at all.
You might have to do it by hand.
http://dev.mysql.com/doc/refman/5.1/en/windows-start-service.html
When the service is installed you should be able to enter the following command to start the service.
net start mysql
Then all you need is to open a command window and type the following to get you into the MySQL command line where you can start writing your own queries.
mysql -uroot
I'm not terribly up on Microsoft SQL Server's flavour of SQL but I think that if you are used to using it then you might find it difficult to "get into" MySQL.
Here's a simple tutorial that gives an overview of MySQL and creating queries.
http://www.bigsoft.co.uk/blog/index.php/2012/10/04/sql-for-beginners
Check in Task Manager that mysql server is started.
Check if you can connect to the server, run telnet <hostname> <portnumber>, e.g.:
telnet localhost 3306
If you could not connect, try to find server properties (check port number), also check your firewall.
Look for the file my.ini and add bind-address = 0.0.0.0 in the [mysqld] stanza.
Well, I don't exactly know what caused this issue in the first place, but I was able to find a way to solve it. A helpful, if old - perfect in this case - tutorial I found on the web, that hopefully can help others with the same problem.
Tutorial: Install MySQL 4.0 - Windows, by Dr. Thomas E. Hicks
Computer Science Department
Trinity University
Link Here
I'm not sure if the services application is on other windows or not but if you use Windows 7, you are lucky. The easiest method is to open Start panel,in the search box,type services and hit enter.Now scroll down till you find the mysql service.In the latest version, it is named MySQL57. Right click on it and click on start.
Now you are good to use MySQL. However,you will have to perform this step every time the windows starts.
Open the MySQL Installer and click on where it says "reconfigure" next to "MySQL Server"
if it is showing error 2003 (HY000): Can't connect to MySQL server on localhost (10061) than
1.search services.msc in run
2.goto mysql properties
3.copy the mysql service name
4.start cmd as administrator
5.write: net start mysqlservicename .i.e mysql57 or etc
it will show mysql is starting.
I am looking into making a c# program that will read in the logcat output from an android device and read it in to the c# program.
Initially it should do this while the phone is connected and it shouldn't require a specific app on the phone to be installed for the c# program to be able to retrieve the logcat output. Also the phone shouldn't require root access.
Is this something that is possible, I can't find anything on Google that says its possible but thought I'd ask on here in case someone has some useful information.
Thanks for any help you can provide
The most practical answer is to execute the shell command 'adb logcat' from your C# program and capture its output.
The only requirement for the device is that USB debugging be enabled in the settings menu.
The host PC will require that the android developer tools and appropriate USB driver for the device be installed. This can, unfortunately involve a substantial amount of hassle, especially finding the right drivers for windows hosts.
More complicated approaches would be to duplicate the functionality of the adb program (it is open source) and/or USB driver in your program, or to install an app on the device with the read logs permission which sends them to you - or even run an ssh server under the app userid so you can connect in and obtain them.
I'd like to know how to restart a computer in such a way that once restarted it will log in using given credentials via a command-line command or perhaps using some other method perhaps in C# code.
To give context, I'm going to need to run this remotely on Windows XP, Vista, And Windows 7 and I am attempting to form a large list of commands to be given to psexec in the command line in a consecutive order. At given points, it may be necessary to restart and log in and resume executing the commands, and I am wondering how I can accomplish this. I know PsShutdown exists and it handles restarting, but how about logging in? How will I know when the machine haqs fully restarted so I can give the login command? C# code will work as well but it's not preferrable.
So main issues:
how to restart a machine (I already pretty much know)
how to know when a machine has restarted
how to log in as soon as it is capable
how to know when it is fully logged in and ready to execute commands
If you have access to the registry on the target PCs, you can set the DefaultPassword, DefaultUserName and (optionally) DefaultDomain.
http://support.microsoft.com/kb/315231
This definitely works with XP. I think it is the same withe Vista/Windows 7.
Once this is set, you can reboot the PC using PsShutdown.