How can I copy a file from some Android app's assets folder, to somewhere off the device?
Alternatively, how can I move or copy an app so that it is installed on the sd card, not the main rom?
Peter
Easiest way is to learn about the adb push and pull commands: adb
I do not believe there is any straightforward way to copy a file out of an installed app's asset folder without either rooting the device, or the cooperation of the app itself.
As well, files can be copied using DDMS
Related
I have installed Laravel on my Android mobile phone using Termux. The problem is that I do not know where it is installed and therefore I can't put the project files into a text editor on the mobile phone. Also, I can't find the project folder when I connect the mobile to my laptop and use search(through hidden files as well). I have tried to go up in folder structure using $cd .. in terminux, up to a point where the permission was restricted, so I didn't figured out where those folders would possibly be. Any suggestion would be appreciated :).
OK, so I found the answer. You need to change the current folder in which Termux is installed(data/data/com.termux/files/) to a folder where you can access your files with a file explorer(in my case I used sdcard) like so:
$cd /sdcard
Then, if u run Android 6 or higher, you need to allow termux to create new directories using the command:
$termux-setup-storage
After that you are able to create a new directory in sdcard with
$mkdir YourDirectory
and you are able to access it. Good luck!
Is it possible to access the files inside
file:///android_assets/
of an installed android application(in emulator or actual device) through DDMS or any other tool?
If yes, how?
That folder is inside the .APK, therefore you need to find it, download it into your computer and unzip it.
Yes, you can do it trough DDMS or trough adb, but you probably need to have the device rooted first.
I created wave files on my virtual device. (genymotion)
Now I want them to add to my computer, how can I do this?
You can do it on many ways.
For example, ADB allows you to download a file from an Android device:
adb pull path/to/your/wav/source/file your/computer/target/folder/
Or you can use a shared folder as described here.
You will just need to copy your wave file into the device's shared folder and it will be automatically copied to you computer's target folder.
Yea this might seem like a noob question, but how do you open .apk files? I can't get to open using the AVD manager. Thanks.
APK files are meant to be used by the Android OS to install an application. If you want to use one on an android phone/simulator, use "adb install something.apk" from the terminal/command line. Alternatively, you could email the apk to yourself, then open your email on the device and open the attachment.
APK files are basically just a wrapper around an app, you can also open one in a program like WinRAR or some other unzipping/decompression program on your computer to view their contents.
On Windows you have to rename it to ZIP and extract.
On Linux just right click on APK and extract it. Linux recognizes it as an archive file by default.
On Mac, I had issues with renaming so I extract file via Terminal by using the command unzip xyz.apk -d apkDir (it will extract into apkDir directory)
You will then see encrypted Java and XML files which you cannot open (without some extra effort). But you will be able to see and open files from /assets.
Rename your .apk file to .zip file.. and try to extract the file... If you are using windows,mac,ubuntu you can follow this method
NOTE: Extracting an .apk will help you to find the images used in their app.
You can use Bluestack or Geny motion as APK Simulator
I've created an app on Android 2.2 and used emulator to to test the app. Also the app needs two files to be pushed, file A.xml onto data/data/com.android.myApp/files/A.xml and a sqlite database B.db onto data/data/com.android.myApp/databases/B.db.
Now I'm trying to test the app on a Galaxy S2 running Android 4.0.3 where I can't find any of those familiar folders. There are four folders: data, mnt, system, tmp. The data folder is empty and to add to my problem I can't find my application on the File explorer.
How can I find my app and push these files?
You don't have read permission on data folder.
you can follow this
First, put A.xml and B.db to assets folder
then open by
InputStream is = c.getAssets().open("A.xml");
The folder structure is no different than on earlier emulator versions. It might be that you need to be root in order to be allowed to list the contents of the /data directory.
One cannot see the contents of the /data directory of an actual device due to security reasons. Maybe you could use the PackageManager to seek more details on the packages installed.