is there a way to regulate the UMS-mode? I would like to implement a feature, that lets the user select which files he wants to share with a pc. Say you only want the pc see the picture subfolder, but not all the other folders on your sd. I am not sure if this is possible and most likely I will require root access when possible.
I know this will bring no real security, because you can always remove the sd card and read all the files on it. I thought of this feature mainly because of my crappy car radio. It can read mp3 files from a usb stick. But the many different folders and strange files on a android sd card seems to kill it. Furthermore I think there are a lot of other situation when you would prefer only to show a smaller part of your sd memory to a pc.
Can you imagine any other way to simulate the described behaviour? Can I generate completely new usb modes and implement my own UMS?
Every idea is welcome.
Sincerely Erik
is there a way to regulate the UMS-mode?
Not from an SDK application. Also, bear in mind that UMS mode is being deprecated in favor of MTP.
I am not sure if this is possible and most likely I will require root access when possible.
No, you will need to write your own custom firmware.
Can I generate completely new usb modes and implement my own UMS?
By writing your own firmware, presumably, yes.
Related
So, I have being thinking a software that can outlive a total OS wipe. Is it possible to create a software of this nature?
If you had software installed on a ROM (Read Only Memory) then it cannot be deleted save hardware failure of some sort. And assuming the reinstalled OS was configured to read it properly it would work perfectly fine, that is what the purpose of the BIOS is for. Although, there are ROM chips that are erasable (EEPROM) and modern BIOS chips nowadays are flashable for convenience purposes.
If you could get it into their data backup (onedrive, external personal server, etc.), then you could regain access as soon as they load their backup.
Assuming they clear all their temporary memory (RAM, graphics card, etc.) and reset their OS with a clean copy, I don't think there is a way to survive on that device.
I rooted my phone and unrooted it. However several apps show me that i have a rooted phone. The warranty bit is 0x0 and the flash counter also.
Could there be any files which were not deleted?
Agree on the comment about this question being off-topic, but on the development part of it, root detection is done by heuristics detecting specific files commonly used for this purpose and not present in stock Android versions. So, in your case, that's probably what's happening.
For example, you can read this article for an overview of such techniques: https://blog.netspi.com/android-root-detection-techniques/
Is it possible to know whether an android phone has OTG support without rooting? If so how? I am asked to check some information before developing an app for android.
Yes, you can download a USB On-The-Go checking application from Google Play.
This one below for instance doesn't require root, although it does require that you follow the exact plugging and unplugging steps.
Before I give you the link thought, I must warn you that this app asks for way too many permissions and can display very intrusive ads that can draw themselves on top of other apps. If you install this, definitely uninstall it and get rid of it as soon as you're done with it.
Another thing you could do is just google for the exact model name. That kind of information is usually included in the specs, in the pdf specs, in wikipedia, or in some tear-down blog. If the specs won't even tell you the usb version number at the very least, then you'll know to keep on looking.
Some of the newer devices coming out from Google do not include an sd card, and it appears they are moving towards this direction.
My question: Is there a way to declare the sd card as a uses-feature to prevent people without an external storage from seeing/downloading the app from Google Play?
I realize this is not the correct way to address the issue, but until i can re-code my apps to anticipate this, I am hoping there is a filtering option in the manifest?
There is no <uses-feature> which does what you want.
What you could do is manually select the devices within your developer dashboard on Google Play. I know this is very inefficient and will probably take a lot of time but it's the only way of achieving exactly what you want.
If you don't want to bother with that then i would recommend that you include this information in your app's description on Google Play and on top of that handle the situation when your application is started up for the first time (for example inform the user that the device is not supported because it has no external storage).
I don't know if such a feature exists, and even if it did it would be difficult to use. I have a Samsung Galaxy Nexus, and while it doesn't have an SD card per-say, it does have 16GB of internal storage. I have seen other phones that say "Internal SD Card" so it really depends on whether that feature (if it exists) can tell the difference between the two. Some devices also have an actual SD card that's hidden from the user, and so they aren't able to tell it's there. Most devices now also have a decent amount of internal storage, so I'm not sure why it's an issue. Do you even need to re-code your application for that? I would think that android would realize that you're requesting storage space that's unavailable and would tell notify the user that they need more storage. All android phones have some amount of internal storage available to the user.
I suspect that I already know the answer to this question, but I wanted to ask the experts anyway.
Would it be possible to use the FileObserver class to monitor changes to files belonging to other apps (i.e. things in the /data directory that don't belong to the app implementing the FileObserver)?
It seems that even if I had a rooted device, there isn't a way to have my monitoring application run as root.
The only possible (and unappealing) solution I've come up with, is having a rooted device, and changing the privileges on all the files on the device so that they would be accessible by the monitoring app.
Thanks,
Jarabek
This would almost certainly have to be done in native code, and would only work on rooted devices.
You should look into inotify.