I have built cyanogenmod lollipop source for odroid-xu4 SBC and resulted into separate image files like system.img, boot.img, cache.img, kernel, ramdisk.img, ramdisk-recovery.img, recovery.img, userdata.img and other folders like install, root, system etc.
How do I make bootable sd card from these images? There are methods where we can write image to sd card using dd in linux or Win32DiskImager in windows but these tools require single image files and these tools might be extracting system, boot kernel images etc from single .img file. But since I am directly having extracted images, how do I achieve it?
Is the process board dependent, I mean do I need to worry about where exactly in memory space different images are written? There is guide given at write image to odroid-xu4 but it talks about pushing images to sdcard using adb. This means I need other android image previously flashed?
Related
I have a Sony Z5 Compact phone with a brand new, Sandisk UHS-I U3 32GB SD card.
The card used to work for a while (like 3 weeks), but now something happened to that.
Phone is not able to write onto the card at all.
I tried formatting that from the Android, from Windows, nothing works.
Symptoms:
1.) after formatting, I can create folders and copy files onto the sd card on Windows.
2.) after formatting, I can create folders on the card on android.
3.) if I copy anything, really, anything from Windows to Android (to the card), the card will deny the next file write operations.
4.) seems like if it gets readonly, but mount shows sdcard1 as rw.
5.) after this, putting the card to Windows, it works okay (without formatting)
Question:
I want to format the SD card, and put back in the phone, and put some music onto that. (without having it corrupted).
Thank you.
Ps.: I hope this is some right forum for this.
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 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!
When I build the Android sources, I end up with 3 images. They are ramdisk.img, system.img and userdata.img.
I'm trying to understand what these are made of and how they are used by Android. I came across articles which say "/system" is a yaffs2 file system.
1) If I want to make use of this on a real board, should the file system be yaffs2 or can it be any?
2) If I want to get the 3 images for another file system(say ext2), how do I do that?
You can modify the kernel to accept basically any filesystem you want (ext2 and ext4 are two examples), if you can make it compile. Then, it's just a matter of mounting and formatting the volume with the corresponding filesystem.
There are patches for different kernels in github and xda-developers. You will need to browse around to find the patch for your particular device. Unfortunately this is not something you can sole for all devices with a single hack.
I've managed to simulate a fake sdcard on Android 2.2, so that when I don't have a real sdcard, applications that need sdcard will still work. To achieve this, I borrowed some code from the Android-x86 project's extended version of `vold', and did the following:
# dd if=/dev/zero of=/data/sdcard.img bs=1024 count=1 seek=1000000 (1GB image, a sparse file)
# busybox losetup /dev/block/loop7 /data/sdcard.img
# newfs_msdos /dev/block/loop7
The problem is, when a real sdcard is inserted, I wish to use both of them without switching back and forth between them - namely, a `dual sdcard setup' on a system which only allows one sdcard. How can this be achieved?
Personally I'm not quite familiar with the Android system (actually today is my second day working on an Android project). I was told that the 2.2 version only supports one sdcard mounted on "/mnt/sdcard", applications that read/write sdcard will follow this path. I'm not quite sure about this. Can someone please shed me some light on the Android sdcard limitations and how its presence affects applications?