I rooted android galaxy nexus. I don't see any video devices under dev folder checked through adb shell.
I am trying to use External USB camera http://brain.cc.kogakuin.ac.jp/research/usb-e.html.
Modified Kernel settings and build custom zImage , After unpacking boot.img and replacing zImage then repacked to new-boot.img. I flashed with new boot.img. Once i run sample camera app from above mentioned url cannot see any video frames. I think it could because there is no video device under /dev normally device should have /dev/video0,1 so on.
Any body can help or show some direction ?
Related
We have an development board that has been run Yocto system. and we want it to run android system, we already has compiled android image with Yocto kernel that has android's some patch.
We don't know how to flash the android image (such as system.img boot.img and recovery.img and so on) to the development board because of the Yocto system partition different with android system.
we can use fastboot tool to flash Yocto system to EVB.and we want to know:
How to partition eMMC that we can use fastboot tool to flash android system. Do we need to modify Little Kernel code ? and how to modify it in Yocto system.
How to we boot the android system up?
It would be appreciated if you offer any useful information.
Thanks
How to partition eMMC that we can use fastboot tool to flash android system.
You'll need a tool that can partition the eMMC. Considering you are using yocto your best bet is gptfdisk package. gptfdisk recipe is at path poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.0.bb. gptfdisk provides following text-mode partitioning tools
gdisk,
cgdisk,
sgdisk,
fixparts
You can use one of these tools to recreate the partitions in the partition table.
and how to modify it in Yocto system.
Do IMAGE_INSTALL_append = " gptfdisk " in conf file to make the tools of this package part of your image.
How to we boot the android system up?
You'll need 3 partitions
system.img - goes in partition named system
boot.img - goes in system named boot
and recovery.img - goes in system named recovery
Each tool has a man page on Linux. You can read the manuals using man sgdisk, man gdisk, man cgdisk and man fixparts. Some example usages of sgdisk
sgdisk -p </dev/sda> - To print all partitions on the disk
sgdisk --delete=partnum </dev/sda> - Delete a partition. This action deletes the entry from the partition table
There is a lot of way to partition the eMMC, it depends on your system: via USB, sdcard, nfs, uboot...
I think you can have a look at the meta-variscite, especially in the scripts folder. They have flash scripts for Yocto poky images, and android image (on the same boards). They flash from the SDcard to the eMMC.
I ported these scripts for a use with uboot: I run the command ums mmc 0 to start mass storage mode via USB OTG, and on my PC I run an install script which use dd for erasing partitions, fdisk for creating partitions, mkfs to format my device connected by USB.
You can also use mmc part in uboot, but I never tested this option.
I downloaded a third-party ROM, and I want to run it on the emulator first before flash it into the phone. Here is the contents of cm-11-20140911-NIGHTLY-p3110.zip:
1. boot.img
2. file_contexts
3. META-INF/
4. recovery/
5. system/
I unpacked boot.img using the script unpack-bootimg.pl and get boot.img-kernel, and boot.img-ramdisk.cpio.gz. Then I repacked the system using the make_ext4fs and got system.img.
I created an AVD and execute:
emulator -system ~/cm11/system_new.img -ramdisk ~/cm11/boot.img-ramdisk.cpio.gz -kernel ~/cm11/boot.img-kernel -avd and442
but all I got is nothing, the emulator screen is just black. There is no log message from adb -s emulator-5554.
Now I am confused:
can the third-party ROM be tested by the emulator?
Am I doing the right way?
Yeah, why not.
We can flash a third-party ROM on Android AVD. But first you must know the following things:
1. The Android Emulator is itself a device, like your Moto G or Xperia
2. Every ROM is device-specific (supports a device-specific Kernel)
(on many sites/blogs you got information like you have to replace system.img file from .android\avd\avdname.avd, but it is technically incorrect, because you also require ramdisk.img.)
To do this, you need to create your own AOSP repository by downloading the particular repository and have to build your own .img files)
You can do it in two ways:
replace files system.img and ramdisk.img from location .android\avd\avdname.avd
Build your own AOSP. Before... make in "lunch" select target as: Emulator (like: genericX86), i.e., generate all emulator specific .img files
I have tried many things. It's a bit critical, but interesting. The following links may help you:
To run your cooked ROM on Emulator (link down. Try this, from archive.org).
To Create AOSP Project
I compiled source code referring to http://source.android.com/source/building-running.html and downloaded apt binaries for my Nexus 4g s .I did following after building:
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash userdata userdata.img
fastboot erase userdata
fastboot erase cache
Now, I cannot see anything on my phone. What could be wrong? Wasn't the source I built suitable for my device? But, I am pretty sure I have downloaded correct source code and binaries.
To rescue your device back, use fast boot to flash the factory image back.
To check why you have this issue, please check:
If you did not see ANYTHING after reboot, your boot.img (contains kernel) is not correct
If you just see the boot animation but it goes on forever, your system.img is not correct
You should:
Make sure you have download the correct source code and switch to the correct branch
Make sure you are using the correct build configuration by lunch and select correct product
The AOSP does not contains everything, you have to download or pull out from your old system to get the proprietary binaries.
I am trying to bring up panda-board omap4430 with Android jellybean pre-built binaries, which I have downloaded from linaro.org (http://releases.linaro.org/12.12/android/panda/).
I am creating two partitions on SD card into file systems.
First is bootable FAT32 containing boot.tar.bz2 and u-boot.img and other ext3 partition is having userdata.tar.bz2 and system.tar.bz2.
After putting my SD card in panda board & connecting it through minicom on my Ubuntu pc, I am not able to see even a single charecter of untaring or something or any logs.
Am I missing something.
I have done Ubuntu porting on Beagle board earlier successfully.
you are flashing it first time on panda board then it has some other method, as they have given like below process
format sd card
copy MLO and u-boot.bin in fat 32 partitions
then follow the given process on OMAPpedia release nots.
I have a Sony Xperia P. It runs on 6_0_B_1_564 Kernel and Andriod 2.3.7. I have compiled a custom kernel from the source. I changed the extraversion etc. I have got the zImage. How do I install it on my phone?
I have already tried Anykernel.zip method. When I try to install it using Clockworkmod, I get-
--Installing: /sdcard/new_kernel.zip
Finding update package...
Opening update package...
Installing update...
AnyKernel Updater by Koush.
Extracting System Files...
Extracting Kernel files...
Changing device name...
Done!
Install from sdcard complete.
But when I start the phone its the same old kernel
When I when through the contents of the zip file, I found that there is no boot.img in it.
Can I flash the kernel using Fastboot?
Finally I did manage to install the custom kernel. Guess the procedure will work for all the Sony Xperia NXT series phones (Xperia U, Sola, P, S). This is how I did it -
Download the Stock Kernel from the following links -
Sony Xperia U
Sony Xperia Sola
Sony Xperia P
Sony Xperia S
These will be ELF format.
Download the Image generation script from here.
Unpack the Stock Kernel.
7z e kernel.elf
This yields three files -
0 - Kernel
1 - RAMDisk
2 - Resource Power Manager (only for Xperia S)
Replace the kernel with out custom compiled kernel(zImage). Note that zImage is renamed to 0. Since we intend to change only the kernel, keep the RAMDisk and Resource Power Manager(if any) as it is.
Generate the Kernel Image using the Script downloaded before
For Xperia U, Sola and P -
python mkelf.py -o new_kernel.elf 0#0x00200000 1#0x01200000,ramdisk
For Xperia S -
python mkelf.py -o new_kernel.elf 0#0x40208000 1#0x41200000,ramdisk 2#0x20000,rpm
This generates a new kernel new_kernel.elf
Reboot the phone into Fastboot mode by holding the Volume-Up button and then pressing the Power button in switched off state.
Flash the new kernel
android-sdk-linux/platform-tools/fastboot -i 0x0fce flash boot new_kernel.elf
Reboot the phone.
android-sdk-linux/platform-tools/fastboot -i 0x0fce reboot
When you use the anykernel updater, the following happens.
updater-script runs and extract the boot.img from your current ROM. It
unpacks the boot.img into kernel and ramdisk. It repacks newboot.img
with the new kernel and the same ramdisk. It flashes the newly created
boot image.
Now, your boot.img is the same as your old kernel's. Only your zImage has changed.
Now it is possible that the script is incompatible with your existing kernel.
Check uname -a from the console using something like Terminal Emulator to confirm kernel version with timestamp. Check the timestamp to see if the new zImage is in place.