I have to copy some external files from my pc to my AVD. It seems that's possible, specifically through the ADB using this command: > adb push "C:/_tmp_filestocopy" "/sdcard", and it's copying right now, but at a rather slow speed, and when I say rather slow, I mean extremely slow. For example, a 50MB file cost me slightly less than 20 minutes. My question, therefore, is: is any faster method available to transfer files from PC to AVD? I've read somewhere that you can mount the sdcard.img from the AVD in Linux. Unfortunately, I'm running Windows. Perhaps I can try VirtualBox or VMWare now or then. Also, I've seen Quick ADB Pusher, but I suspect it just uses the ADB commandline, but with a GUI. Is it actually quicker, or is it just commandline behind a GUI?
You can try the following:
1) Create an sdcard image file when setting up the android emulator. Make sure the file is big enough to store all the data you want the emulator to access.
2) Mount the sdcard image file on Windows ( just like you would mount a ISO image ). Check this link http://heatware.net/windows-xp/how-to-mount-an-isobinuifimg-image-in-windows/
3) After doing this, you should have some sort of external or virtual disk accessible from your file browser.
4) Copy all your stuff to the virtual image.
5) Unmount the image from the system.
6) Fire up the emulator. It should see all the data on the sdcard.
On GNU/Linux would be much easier, since you can mount/unmount the img with one command.
Good luck!
Related
I am using Windows (I don't know how to do it... I don't have linux, so I can't do it myself) and I need help, to convert this file (Alcatel) - http://sourceforge.net/projects/alcatel/files/OT_5020D_20130606.tar.xz/download into a flashable image. If anyone can help me, or can compile it, I will be glad.
P.S. This is the content of that ZIP file - http://i.imgur.com/H9Qmbdx.png (my PHONE'S system files are lost, and can't do anything, just frozen on startup ALCATEL message screen. ALCATEL support told me to compile the flashable image from the link I provided above.)
If the only problem is that you cannot install Linux as your main operating system, put the Linux into virtual machine and do the work there.
You can use some free virtual machine like Oracle Virtual Box, for instance that only takes minutes to set up. You will get the internal IP address, visible from your workstation only, that is enough for your task. You can use usual SSH and SFTP to communicate with it and the virtual machine itself will provide shell access for the initial setup. If necessary, it is also possible to configure such a virtual machine to connect the outside Internet.
As said from my comment, you can try flashing the custom recovery on to the phone first http://theunlockr.com/2013/12/23/flash-custom-recovery-alcatel-one-touch-mpop-ot-5020x/
With the custom recovery, you can try to flash the zip file that you extracted from the .tar.xz file. If you are unable to flash the zip file, I suggest you to download a CyanogenMod zip file from here http://forum.xda-developers.com/general/general/rom-mod-alcatel-5020-t3060346/post59584683#post59584683 and see what is inside. And then you tailor your zip file's structure accordingly.
Btw, your zip file is not a kernel. From the size, I believe it should be the entire ROM. Kernel should be less than 10MB AFAIK.
Your file above is likely your android operating system, not your kernel. I recently flash a new kernel to my Samsung Galaxy Centura, it was less than 20mb. I don't know what you did to your phone, but you may not need to do anything with the kernel. You said your system files were missing, so if you could get someone to convert you file to a flashable zip then you could probably fix your phone.
What you essentially need is a ROM image for your phone model. I guess building it from sources is the hardest way to get it, and probably will take a lot of time for you to figure out how to do it properly(like weeks,and there is big chance to kill your phone for good by flashing bad ROM). So I suggest to find already compiled ROM for your phone with stock or some custom firmware (I suggest to check if there is CyanogenMod port for your phone) and flash this.
I’m new to android´s app development; so far I was able to create text files on my device. The problem is when I try move the file to my PC I cannot find it. After research I now know that files saved in the internal memory are only available to the app and the external storage can be use to share files, but my device (moto G 1° gen) only have internal memory.
So the question is, is there a way to share files on my smartphone with my pc.?
Typically, devices with internal memory still have a partition set aside that emulates external storage. On any Android device I've had, the internal memory is mounted to /sdcard/ and if you insert an actual sdcard, it gets mounted to /sdcard2/. Anything you save in /sdcard/ should appear in Windows explorer when plugging the device in over USB.
Alternatively, you can also use adb to retrieve files outside of the /sdcard/ partition by using the command "adb.exe pull [source file] [destination directory(optional)]"
We have to set up a number of android devices for a project we are working on... What we have to do is actually edit the iptables of the device. Rather then doing each one by one I'm curious if there is a way to set up one device then clone the image so that we have an exact replica of that image?
We would then perhaps use PhonixCard to reinstall that image on all of the other devices...
Not sure it matters much but the device is running 4.0.1... all of the devices that we want to replicate the image on are exactly the same device.
from a previous SO answer:
Make a nandroid backup from recovery.
Make sure that the backup is located on the sdcard.
Mount the sdcard on a computer and copy it's contents to a folder on a pc.
Copy the entire contents of the folder you made above to the target device.
Root the device than install a custom recovery if you didn't do this already.
In recovery restore the nandroid backup.
Reboot the device. Now everything should be exactly the same as on the original.
Repeat steps 4-7 for every device.
If there're lots of small files that need to be transferred, another possibility is zip them up copy to the phone and than unzip it using
adb shell unzip path/to/file.zip
Once the command is launched you can disconnect the device the process will continue as long as there're no conflicting files or folders.
So answer cloning android OS images
I have an application that writes important data to the SDCard and encrypts it using AES, which later will be used by a desktop application. I have noticed that if I do not unmount the SDCard from the Settings menu sometimes the files don't get written at all, or are corrupted.
Is there anyway in Android 2.1 that I can unmount the SDCard programmatically? Because I'm pretty sure that from time to time the users will forget to do this, and I'll be the one fixing the problems and I really don't want this.
If this is not possible,what Linux command should I use to unmount the SDCard? Since the application will run on some tablets that have a rooted OS.
You should unmount what's using the sdcard in the proper order, for example
umount /mnt/sdcard/.android_secure
umount /mnt/sdcard
or, probably synchronizing the buffers with the filesystem would be enough
sync; sync
On the emulator, I can unmount the SD card from the Settings.
I can then mount it on my OS, then unmount it normally.
I haven't been able to figure out how to re-mount it then on the emulator (without rebooting it).
hints:
the adb command remount is unrelated: it's about /system
the emulator command is unrelated: it's only about starting the emulator
mounting the SD card in two places of course messing everything up (I tried)
more:
mount outputs the following:
/dev/block//vold/179:0 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
trying to mount again from the shell after unmounting it, using the same options as above, gives a segfault
no idea why the double slash in block//vold, I guess it's just a typo
The developers guide suggests that this isn't possible:
SD Card Emulation
You can create a disk image and then
load it to the emulator at startup, to
simulate the presence of a user's SD
card in the device. To do this, you
can use the android tool to create a
new SD card image with a new AVD, or
you can use the mksdcard utility
included in the SDK.
The sections below describe how to
create an SD card disk image, how to
copy files to it, and how to load it
in the emulator at startup.
Note that you can only load disk image
at emulator startup. Similarly, you
can not remove a simulated SD card
from a running emulator. However, you
can browse, send files to, and
copy/remove files from a simulated SD
card either with adb or the emulator.
The emulator supports emulated SDHC
cards, so you can create an SD card
image of any size up to 128 gigabytes.
While Android will unmount the SD card, the emulator process keeps the backing file open.
$ ls -go /proc/`pidof emulator`/fd | grep sdcard.img
lrwx------ 1 64 2010-05-13 01:50 10 -> /home/x/.android/avd/WithSD.avd/sdcard.img
Someone more familiar with QEMU may be able to provide further insight but, if I were you, I would just try to use NFS to solve this problem.
I tried going to Settings and unmounting the SD card and this worked fine. Give it a try; remounting it is quite simple.
Doesn't seem like this can be done via adb/cli though.