It may seem strange, but I wonder is an android app able to make the SD Card inside the device windows bootable? I thought of making the SD bootable and write ultimatebootcd to it. I did it through windows, but it would be so great if android can do it!
To make the SD card bootable, you have to modify the boot sector of the card. This can not be done from a standard Android application. If the Android device is rooted, it can almost certainly be done from a native Linux program, or an NDK program.
If the device is not rooted, you can probably not do what you want. As Chris Stratton commented, if the card is already made bootable, you could probably then change for instance what OS is booted up and how.
Say, there is startup code which loads and boots an OS, then you can change the configuration file for the bootloader. A starter: http://www.syslinux.org/wiki/index.php/Boot_an_Iso_image
I used Rufus and installed a syslynux on the SdCard from a PC running window 10.then I put the card back into the Moto phone. It's receiving files that I have moved from the internal storage to the card how ever I have not a chance to find out whether they Will open up In the PC or not.
Related
I am learning Android. I have the latest, as of today, Android Studio and SDK.
I have gone through the tutorial on "Saving Data" at developer.android.com. I have perused StackOverflow for a couple hours and can't seem to find precisely what I am looking for; so here goes.
My app will have a need to read and write from a directory on the Android device. This directory needs to be accessible when connected to my PC via Windows Explorer. I must admit I am confused by getExternalFilesDir(), getExternalStoragePublicDirectory() and all the other getFilesDir() methods.
Question 1: How do I create, access, read/write a simple text file to such a directory. It would be fine if this directory goes away if the user uninstalls the App. But the directory must be accessible to my App on the phone, and to Windows Explorer when connected to my PC via USB cable. Those are the only requirements.
Question 2: In trying to figure this out, I am using an AVD virtual device. When querying getExternalStorageState(), it says "Removed". Can I access such a directory when debugging using the AVD virtual device; and if so, what am I missing? I have the "WRITE_EXTERNAL_STORAGE" permission in my manifest file. I have also set my AVD with the "SD Card" set to "Studio-managed" and "200 MB".
Thanks.
Oh my. It turns out I was doing this correctly, but had updated my code and settings without restarting the AVD.
Once I restarted my AVD, the external storage (SD Card) showed as Mounted and I was able to read/write to the "Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS);" directory.
I believe that this directory will be accessible from Windows Explorer when the device is connected to my PC.
Is there some utility available that will display all the files on an android phone, including local memory and sd card, even if the phone is not rooted?
It could be either some Android app or some PC-based utility that would display the files on a phone connected via USB.
Also, for those of you who develop on android phones, do you do your development and testing on rooted phones?
There's the Android Device Monitor that ships with the SDK. It's integrated into Android Studio and Eclipse.
Let's you inspect the file system and a lot more. I've only ever used it with simulators. Non rooted phones won't display their /data/data directory, from the ones I have. You'd have to root them for that, I believe.
Is there a way to write a driver for android phone, so that when i plug it in the computer it's going to install it with the default usb drivers? I want to make a application that needs a driver to be installed on the computer to use it.
You could have your Android App download or contain the installer for your driver and then copy it to the SD card storage area. There is no way to get the installer to autorun because Android connects either with MPT or PTP. These can be used to access a file from the SD card, but it does not mount as an ordinary storage device. You will need to have instructions in the app to tell the user how to access it.
Honestly, it will probably be easier to have them download it separately and install it.
I am currently making an app that needs to be able to read from and write to a USB flash drive connected via a USB OTG adapter. Is there an easy way to access this storage via standard Java.io.File APIs? This app is only going to be run on a rooted Motorola Xoom running Android 4.2.2. Any suggestions would be appreciated.
USB Drives get mounted to your device just like an SDCard does essentially*.
The mount path usually resides at:
/storage/usb0/
I have not used this on many devices other then my Droid running CyanogenMod, your device may very. You can smiply use a file manager to explore this path. The directories will still exist even if there is no mount path, so you will be able to determine the path.
What is the difference for installed application's list in device and emulator. In emulator i can see the installed apps in location of /data/app
But, i can't see the installed application on my real device. Where it is stored. I can see the default application from here /system/app But i can't see installed application whatever i downloaded and my own application. Anyone guide me?
On the emulator, you have root access.
On your phone, you do not have root access (unless you root it). And each application gets its own private folder with its own linux userid, so that one application can not look into the folder of another application. This is but only one aspect of the Android security model. There are many more.
Are you looking for anything in particular in those folders? If so, there are workarounds. For instance, if you're trying to look at your sqlite.db file, one workaround is to have your own application (since it has the permission to do so) programmatically read the database file and reconstitute it on the SD card (every time you want to manually check it).
In my device (Samsung Galaxy Tab 10.1, Android 3.1) installed apps are in /data/data.
EDIT: If you want to get absolute path of your directory at runtime, you can use this trick:
getApplicationContext().getFilesDir().getAbsolutePath().replaceFirst("/file.*$", "");