Read protected directory or similar - directory

I have a GPS car system. The GPS software is on an SD card. The supplier of the software is no longer doing updates so I'm either looking at updating the maps manually or simulating the software with another GPS package.
The problem is that I can see the card and its one directory, \Primo but if I try and open the directory I get the following message.
I have 'recovered' the files to my hard disk (470 files) with some software but I get the same message when I try and open \Primo so the lock or what ever has been transferred to my drive.
I tried reading with Linux but that just shows one small file.
Any suggestions as how to 'unlock' the directory.

Related

Programmatically access files in a device showing up in 'This PC'

I am on Windows 10. I want to write a function (in R) to copy the files stored in a camera (actually in the SD of the camera, but I cannot just read the memory card in the PC), to a different storage unit (say, the pc or an external HDD).
The camera is connected to the PC via an USB cable.
The problem I am facing is that, when opening the File Explorer, the camera is showing up as a link under "This PC" with no letter to indicate the drive (e.g., 'G:/').
While I can see the files using the file explorer window, I cannot find a way to get to those file from a cli type of interface (e.g., the command prompt, or the R console).
Googling, I found that 'This PC' is not a folder but rather a link to something in the registry called CLSID for which the identifier should be {20D04FE0-3AEA-1069-A2D8-08002B30309D}. However this is very confusing to me and I cannot figure out how to use this information.
Is there a way to do it? And if so: how?
Please consider I do not know much of commands from prompt (way better off in R).
A CLSID is just a GUID. My computer is a implementation of IShellFolder.
My Computer is part of the shell namespace. Several entries in the shell namespace are virtual (Control panel, scheduled tasks etc.) and cannot be accessed with low-level file functions nor cmd.exe.
While it would be possible to develop a tool that does something like shellcopy Computer\MyCamera\*.jpg x:\backup, I'm not aware of any existing tools that do this. You might have to code it yourself.
In the old days you would call SHGetDesktopFolder to get the root and then use the returned IShellFolder to navigate but these days it is simpler to use IShellItem instead.
To do this it is crucial to understand how IShellFolder and PIDLs work. See Introduction to the Shell Namespace for more information...

Using GPS as external editor for AdaMULTI

I'm trying to use GPS (version 19.1) as an external editor for Greenhills AdaMULTI.
I entered -P<myproject.gpr> +%LINE %FILE0 %FILES into the "command line arguments" and also the correct path to GPS for "AdaMULTI Other Editor Configuration".
So far this works as expected, i.e. when pressing CTRL+E in the AdaMULTI Project Manager GPS opens with the file to be edited. Also, when a bug is encountered while compiling GPS opens at the proper line and file.
But ... when configured this way, always a new instance of GPS is opened, which is some kind of annoying because you'll have several instances running all with a single file opened after a while.
Is there a way (option, environment variable or whatever) to tell GPS to use an already running instance?
I have read both the AdaMULTI documentation and GPS User'S Guide to find anything relevant, but to no avail.
you can write some Python plugin for GPS to watch some file for changes, then read a "command" from it to open a file at a given position. Or some other kind of IPC.
What OS do you use? Windows?
I wonder whether you could treat the GPS system as "running on a remote server", see GPS documentation chapter 14, Using GPS for Remote Development, where the "remote" server is in fact the local machine.

Code secure protection

I wrote an R script on an institutional computer. I saved it on an external device (USB PenDrive) and tested it on a computer not of my institution. When I run it to test it using R from Terminal and from GUI I never saved it on the host computer.
This because it has to remain secret until it will be published. I simply would like to know if R or Unix itself saved it elsewhere while running although I load it directly giving the path of Volumes and so on.
In other words the question is does running an R script off a USB leave any trace of it on the host computer.
P.S.: I checked the R history to look for it but it seems not to be saved.

RStudio R File Corruption

I had a R script open in RStudio. The file was saved many times over the course of several weeks and worked perfectly fine when RStudio was opened and closed. However, today, I restarted my computer and when I opened RStudio and more specifically the script that I mentioned, all of the R code vanished, leaving a single long row of "....." with red highlighting.
When I tried to open the R file in other text processors such as Sublime Text and Notepad++, only a line of zeroes was visible. None of my other R files were affected. I'm currently running Windows 8.1 and have the latest version of R and RStudio. What can I do to recover the code in the file and prevent something like this from happening again?
It might be an old thread and it might have been covered in 'user4458796' answer in suggestion #1 ("Use the history..."), but:
My friend had the same problem and we managed to recover the code from a 'history_database' files located on Windows at:
'C:\Users\%user%\AppData\Local\RStudio-Desktop\'
I assume there is an equivalent location in Linux in general.
Hopefully I won't get downvoted, just sharing my 2cents.
Ben.
It's not clear what happened to corrupt your file (and thus how to fix it if possible) and it is kind of ominous that you're just seeing 0's in other text editors, but I'll give you my best suggestion and some tips.
Suggestions for Attempting Recovery
Since your other R files were unaffected, you should have a messy record of your code in the history. Use the history to reconstruct your code.
Access a copy of your file from any version control, cloud, or offline backup you may have used -- git, SVN, iCloud, SugarSync, Dropbox, etc (I realize you probably wouldn't have posted this question if that were an option, but I had to throw it out there).
Use a Hex or sector editor to try to recover the data.
Use a data recover program to find an old version of your file.
Inspect your trash or recycling bin to see if it has an old version. Depending on your OS and the settings of how you (insecurely or securely) delete files, then you may be able to undelete a deleted version, even if it's not immediately available.
Try different methods of recovering text data from corrupted text files like OpenOffice's and Microsoft's suggestions.
Tips for the Future
I know that hindsight is 20/20, but a few quick tips for good measure:
Use version control. Git is supported in RStudio's GUI interface.
Have more than one version of your file. Many professors and professionals recommend writing/storing code in a text editor and using your IDE only for the working copy.
Make backups. Distinct from #2, you should backup your files to a hard drive, flash drive, or cloud service like Dropbox or Spideroak.

Android USB Accessory JAR copy to system folders, does it need the odex file too?

I am trying to get my phone to accept USB Accessory mode and run the DemoKit connected to the Arduino ADK. My ROM did not contain the appropriate files so, I decided to do it myself.
First the specs
My phone: Samsung GT-I9100
My ROM: 2.6.35.7-I9000XWJVZ (rooted)
Firmware: 2.3.6
I've succeeded before in copying the .jar .odex and .xml file to the appropriate folders. Although it completely bricked my phone and was stuck in a boot loop. Now, recovered, I want to give it a second try.
What is this .odex file that every other .jar file has in the /system/framework folder?
Do I need to build/copy the .odex file myself (read something that Dalvik does JIT compiling)?
Is it possible that in my previous attempt, the copying of the .odex (that I got from another phone I9100), bricked mine?
I know I was careless in my previous attempt. Now, I want to approach the subject with a bit more knowledge...

Resources