I've compiled a working ffmpeg for Android, but I'm not stuck at being able to record the screen of my device. I've tried using
Code:
./ffmpeg -f fbdev -i /dev/graphics/fb0 -vcodec libx264 out.mp4
but this just returned
Code:
[fbdev @ 0x1b1ece0] Framebuffer pixel format not supported.
/dev/graphics/fb0: Invalid argument
Is there any other way to capture the screen on Android? This is on ffmpeg and x264 git.
Related
What types of video files does it play out of the box and are there any apps in the marketplace to expand the range of video files it will play?
-------------------------------------
Sent via the XDA Tapatalk App
Your answer can be found on the Android Developer page. http://developer.android.com/guide/appendix/media-formats.html
regarding recoding to Android, someone has posted on their blog the exact command line for ffmpeg
$ ffmpeg -i [inputfile] -threads 0 -vcodec libx264 \
-vpre slow_firstpass -vpre baseline -b 480k -r 13 \
-acodec aac -ab 128k -sameq \
-pass 1 -f rawvideo -an -y /dev/null && \
ffmpeg -i [inputfile] -threads 0 -vcodec libx264 \
-vpre slow -vpre baseline -b 480k -r 13 \
-acodec aac -ab 128k -ac 2 -sameq -pass 2 [outputfile].mp4
Click to expand...
Click to collapse
Found Here
If you deal with subtitles at all (i.e. OGM/MKV files), I highly suggest you check out this thread. It has some good info one how to resize video for best results as well.
1080p H264 hardware accelerated playback goodness. And the CPUFreq ondemand governor doesn’t even raise the CPU frequency from the minimum as everything is properly accelerated.
Tuomas Kulve has ported all the main subsystems to the OUYA hardware, meaning that there is now a build, although it is still risky to tinker with it.
At this point. The kernel is booted from RAM and OS is running from SD or USB. So no flashing is involved at the moment, making it a great deal safer due to the missing hardware to boot into recovery.
From:
http://tuomas.kulve.fi/blog/2013/09/12/debian-on-ouya-all-systems-go/
Binaries:
http://tuomas.kulve.fi/tmp/ouya-debian/
instructions from Github:
INSTALLING DEBIAN WHEEZY TO OUYA
This is tested on Debian Wheezy and mostly adapted from http://linux-sunxi.org/Debian
OUYA IS EASILY BRICKABLE. READ NO FURTHER
That said, the goal is not to flash anything on Ouya. Kernel is booted from memory and Debian from USB stick or SD card.
Known issues
Not properly tested, so there is a bunch unknown issues.
Low-power core doesn't work (kernel crash)
CPUfreq with ondemand governer works though.
Gstreamer usually assumes xvimagesink as the video sink, but nvxvimagesink must be used.
Totem obeys gconf: gconftool-2 -s /system/gstreamer/0.10/default/videosink nvxvimagesink --type=string
Wifi firmware binaries not included, they need to be copied from the Android rootfs.
Setting up the rootfs
Prepare a USB stick
Partition an USB stick (I used SD card in a small USB reader) and give e.g. 512M for swap, the rest for EXT4. I recommend using at least 4GB stick.
Use mkswap and mkfs.ext4 to initialise the partitions. If your system is properly set you shouldn't need even sudo for that while you would need sudo to format your actual root partition.
Mount the USB stick:
Change the sdX2 below to match your setup.
export TARGET=/mnt/rootfs
sudo mkdir -p $TARGET
sudo mount /dev/sdX2 $TARGET
Extract base system packages to the USB stick:
sudo debootstrap --verbose --arch armhf --foreign wheezy $TARGET http://ftp.debian.org/debian
Prepare for chroot:
sudo apt-get install qemu-user-static binfmt-support
sudo cp /usr/bin/qemu-arm-static $TARGET/usr/bin
sudo mkdir $TARGET/dev/pts
sudo modprobe binfmt_misc
sudo mount -t devpts devpts $TARGET/dev/pts
sudo mount -t proc proc $TARGET/proc
Finish the base system installation:
sudo chroot $TARGET
You should see I have no [email protected]:/#
/debootstrap/debootstrap --second-stage
At the end, you should see I: Base system installed successfully.
Configuring rootfs while still in chroot
Setup sources.list:
cat <<END > /etc/apt/sources.list
deb http://ftp.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.debian.org/debian/ wheezy main contrib non-free
END
apt-get update
Configure language:
export LANG=C
apt-get install apt-utils dialog locales
dpkg-reconfigure locales
Choose en_US.UTF-8 for both prompts, or whatever you want.
export LANG=en_US.UTF-8
Install some important stuff:
apt-get install dhcp3-client udev netbase ifupdown iproute openssh-server iputils-ping wget \
net-tools ntpdate ntp vim nano less tzdata console-tools module-init-tools mc
Configure ethernet with dhcp and set hostname:
cat <<END > /etc/network/interfaces
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp
END
echo ouya > /etc/hostname
Create filesystem mounts:
cat <<END > /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/root / ext4 noatime,errors=remount-ro 0 1
tmpfs /tmp tmpfs defaults 0 0
/dev/sda1 none swap sw 0 0
END
Activate remote console and disable some local consoles:
echo 'T0:2345:respawn:/sbin/getty -L ttyS0 115200 linux' >> /etc/inittab
sed -i 's/^\([3-6]:.* tty[3-6]\)/#\1/' /etc/inittab
Set root passwd:
passwd
Add normal user:
adduser ouya
adduser ouya video
adduser ouya audio
adduser ouya plugdev
Install XFCE and Slim login manager:
apt-get install xfce4 xfce4-goodies totem midori slim
Add "vt1" to xserver_arguments in /etc/slim.conf
Install Tegra 3 proprietary binaries, configs, headers and pkgconfig files:
dpkg -i tegra30-r16_3-*_armhf.deb
Finish up with the chroot:
Log out from the chroot, kill any process started in the chroot (lsof $TARGET) and sudo umount $TARGET.
Extract kernel modules:
tar zxf modules-3.1.10-tk*.tar.gz -C $TARGET/lib/modules/
Install adb and fastboot to the host Debian:
sudo dpkg -i android-tools*deb
Booting Ouya
Reboot Ouya to fastboot:
adb reboot-bootloader
Boot Ouya with the kernel:
WARNING: NEVER EVER FLASH THE KERNEL, JUST BOOT FROM RAM
fastboot boot zImage-3.1.10-tk*
Wifi
The BCM firmware binaries may not be redistributable so they need to be copied from the Android rootfs after booting to Debian:
mount -o ro /dev/mmcblk0p3 /mnt/
mkdir /lib/firmware/bcm4330/
cp /mnt/etc/firmware/nvram_4330.txt /lib/firmware/
cp /mnt/vendor/firmware/bcm4330/fw_bcmdhd.bin /lib/firmware/bcm4330/
# Not sure where BT firmware should be in
cp /mnt/etc/firmware/bcm4330.hcd /lib/firmware/
cp /mnt/etc/firmware/bcm4330.hcd /lib/firmware/bcm4330/
umount /mnt
Click to expand...
Click to collapse
https://github.com/kulve/tegra-debian
I've tried that and got into login screen.
Unfortunately due to Debian being boot from USB, and my USB hub not working properly with ouya I have no way of logging into the system (bt is not useful, as at that stage nothing is paired with os).
Sent from my iPad using Tapatalk - now Free
dexter84 said:
I've tried that and got into login screen.
Unfortunately due to Debian being boot from USB, and my USB hub not working properly with ouya I have no way of logging into the system (bt is not useful, as at that stage nothing is paired with os).
Sent from my iPad using Tapatalk - now Free
Click to expand...
Click to collapse
I haven't had a change to play with this yet so I could be completely wrong, but if you plug in an ethernet cable there is a good chance that you will be able to SSH in. From there you might be able to work something out depending on how strong your command line skills are.
I'm somewhat familiar with command line in Linux. The problem is that it wasn't answering to ssh connection attempts, my router didn't even record dhcp request from ouya so I assume it didn't get any IP address. I must try with different USB hub.
Sent from my iPad using Tapatalk - now Free
Is this still valid or is there a better option to install a Linux on Ouya? I am actually only interested in python so if there's a way to run python in Ouya's Android 4.1 it works for me also.
I want compile bsdiff for my Nexus 4 but i have some issue.
- I have download bspatch source from here https://code.google.com/p/android-source-browsing/source/browse/bspatch.c?repo=platform--external--bsdiff
- I use this command to compile under Ubuntu
> arm-linux-gnueabi-cpp bspatch.c -o bspatch -lbz2
and
> arm-linux-gnueabi-cpp -static -march=armv7 bspatch.c -o bspatch -lbz2
but the result file is a text and not a binary, the shell does not output errors.
Thanks
I am trying to port SailfishOS to the Asus Zenfone 2 (Z00A) which has an x86 cpu.
I got up to point 7.2.1 in this: https://sailfishos.org/wp-content/uploads/2016/10/SailfishOS-HardwareAdaptationDevelopmentKit-1.1.2.pdf
Running rpm/dhd/helpers/build_packages.sh gives me the following error:
Code:
Exit reason and status: signal 6 (core dumped)
Exit reason and status: signal 6 (core dumped)
!! command failed at Tue Nov 22 19:23:06 UTC 2016, dying...
Looking through the files, I found out it was caused by the following command:
Code:
mb2 -t $VENDOR-$DEVICE-$ARCH -s rpm/droid-hal-$DEVICE.spec build
which gives the first 2 lines of the error above.
From there something lead me to believe that it was related to sb2.
I set up sb2 using the following command:
Code:
sb2-init -d -L "--sysroot=/" -C "--sysroot=/" \
-m sdk-build \
-n -N -t / $VENDOR-$DEVICE-$PORT_ARCH \
/opt/cross/bin/i486-meego-linux-gnu-gcc
I use i486 as PORT_ARCH
EDIT: installing the i486 toolchain using
Code:
sdk-manage --toolchain --install Mer-SB2-i486
and then changing the toolchain from
/usr/bin/gcc
to
/opt/cross/bin/i486-meego-linux-gnu-gcc fixed it.
My questions are:
--How do I properly set-up sb2 for x86?
--How do I solve the error?
--Where can I get more information related to porting SailfishOS to x86 hardware?
emmcdl is a command line utility allowing all sorts of manipulations in EDL mode using Sahara/Firehose protocol and a device-specific "programmer" file :
Code:
$ emmcdl
Version 2.10
Usage: emmcdl <option> <value>
Options:
-l List available mass storage devices
-info List HW information about device attached to COM (eg -p COM8 -info)
-MaxPayloadSizeToTargetInBytes The max bytes in firehose mode (DDR or large IMEM use 16384, default=8192)
-SkipWrite Do not write actual data to disk (use this for UFS provisioning)
-SkipStorageInit Do not initialize storage device (use this for UFS provisioning)
-MemoryName <ufs/emmc> Memory type default to emmc if none is specified
-SetActivePartition <num> Set the specified partition active for booting
-disk_sector_size <int> Dump from start sector to end sector to file
-d <start> <end> Dump from start sector to end sector to file
-d <PartName> Dump entire partition based on partition name
-d [email protected]<start> <size> Dump size of logbuf to the console
-e <start> <num> Erase disk from start sector for number of sectors
-e <PartName> Erase the entire partition specified
-s <sectors> Number of sectors in disk image
-p <port or disk> Port or disk to program to (eg COM8, for PhysicalDrive1 use 1)
-o <filename> Output filename
[<-x <*.xml> [-xd <imgdir>]>...] Program XML file to output type -o (output) -p (port or disk)
-f <flash programmer> Flash programmer to load to IMEM eg MPRG8960.hex
-i <singleimage> Single image to load at offset 0 eg 8960_msimage.mbn
-t Run performance tests
-b <prtname> <binfile> Write <binfile> to GPT <prtname>
-g GPP1 GPP2 GPP3 GPP4 Create GPP partitions with sizes in MB
-gq Do not prompt when creating GPP (quiet)
-r Reset device
-ffu <*.ffu> Download FFU image to device in emergency download need -o and -p
-splitffu <*.ffu> -o <xmlfile> Split FFU into binary chunks and create rawprogram0.xml to output location
-protocol <s|f> Can be <s>(STREAMING), default is <f>(FIREHOSE)
-gpt Dump the GPT from the connected device
-raw Send and receive RAW data to serial port 0x75 0x25 0x10
-wimei <imei> Write IMEI <imei>
-v Enable verbose output
Examples: emmcdl -p ttyUSB0 -info
emmcdl -p ttyUSB0 -gpt
emmcdl -p ttyUSB0 -SkipWrite -SkipStorageInit -MemoryName ufs -f prog_emmc_firehose_8994_lite.mbn -x memory_configure.xml
emmcdl -p ttyUSB0 -f prog_emmc_firehose_8994_lite.mbn -x rawprogram0.xml -SetActivePartition 0
emmcdl -p ttyUSB0 -f prog_emmc_firehose_8994_lite.mbn -x rawprogram0.xml -xd imagedir -SetActivePartition 0
emmcdl -p ttyUSB0 -f prog_emmc_firehose_8994_lite.mbn -ffu wp8.ffu
emmcdl -p ttyUSB0 -f prog_emmc_firehose_8994_lite.mbn -d 0 1000 -o dump_1_1000.bin
emmcdl -p ttyUSB0 -f prog_emmc_firehose_8994_lite.mbn -d SVRawDump -o svrawdump.bin
emmcdl -p ttyUSB0 -f prog_emmc_firehose_8994_lite.mbn -b SBL1 c:\temp\sbl1.mbn
emmcdl -p ttyUSB0 -f prog_emmc_firehose_8994_lite.mbn -e 0 100
emmcdl -p ttyUSB0 -f prog_emmc_firehose_8994_lite.mbn -e MODEM_FSG
emmcdl -p ttyUSB0 -f prog_emmc_firehose_8994_lite.mbn -raw 0x75 0x25 0x10
Checking in tools/ subdirectory Sugar QCT_SP v11.1.2 (after installation), there are Idol35_5_NPRG7627.bin and Idol34_7_NPRG7627.bin files (among many other models). Trying :
Code:
emmcdl -p ttyUSB0 -f Idol35_5_NPRG7627.bin -b recovery twrp-3.2.1-0-idol3.img
indeed installed TWRP 3.2.1
It also works for dumping partitions (didn't try restore) :
Code:
emmcdl -p ttyUSB0 -f Idol35_5_NPRG7627.bin -d recovery -o backup-recovery.img
I guess it should be possible to even replace MobileUpgradeQ if we can catch the files and write an Sahara XML file.
The OTUUpgrade log made by MUQ could help a lot for this...
GNU+Linux :
The latest revision from the linked Git repo above won't build (missing files) I had to use previous revision :
Code:
git checkout 05a9615a5b70334d14f95fd194b0f34d482d3803
and correct symlinks for newer automake and probably running "autoreconf".
Windows :
I don't know what the primary download site would be, there are emmcdl.exe around the Net...
And there's this Sahara GUI tool, but seems to require writing a XML file just for writing a partition...
By the way, one can use adb to switch the phone to EDL (no more crushing volume buttons while inserting USB cable) :
Code:
sudo adb reboot edl
after flashing recovery i want the phone to boot to system again. i get Status: 6 then handle is invalid when i add -r.
my vivo v9 bootloader is lock and until now, no one manage to unlock it. i have even send to repair shop to unlock bootloader. they using mrt dongle, but unsuccessful
if i obtained firehose for my phone and dump the boot.image using emmcdl,
can i modify the boot.img using magisk and flash back using emmcdl.
will it work?
i have tried to dump devinfo.img successfully.
ahhl said:
my vivo v9 bootloader is lock and until now, no one manage to unlock it. i have even send to repair shop to unlock bootloader. they using mrt dongle, but unsuccessful
if i obtained firehose for my phone and dump the boot.image using emmcdl,
can i modify the boot.img using magisk and flash back using emmcdl.
will it work?
i have tried to dump devinfo.img successfully.
Click to expand...
Click to collapse
If the bootloader accepts the modified boot.img I guess it could work.
Switching between SailfishOS and LineageOS works here by writing their respective boot.img without requiring fastboot, rooting or unlocking OEM in Android.
Difficult to say in advance what will work on each specific device...
Make sure you backup first, and have a way to reset/reinstall the phone if things go wrong.
Could i read and write any qualcomm phone with emmcdl..??
emmcdl (or more modern and maintained edl tool) should be able to flash any qcom device for which you have a suitable "flash programmer" file.
"Suitable" meaning that the device recognizes it as correctly signed by the OEM/vendor, or that signature verification is disabled in which case you can use a generic programmer file adapted to the SoC of the device.
Hi all, I wrote a 2022 update on how to put the phone into a fastboot state using the edl tool mentioned by vknecht above (btw, thank you so much for all your hard work over the years!)
You can find it here:
[TOOL] Sahara & Firehose Test (Alcatel Flasher oncoming ...)
Let me introduce some new tool for you. This is my first practice in learning and understanding "How to work with Sahara & Firehose?" and as an owner of Alcatel Idol 3 4.7" firsts test of this app were made on my Idol 3 6039Y. What is this...
forum.xda-developers.com