Help with how to use FFmpeg - Samsung Galaxy Nexus

Hello Guys
I'm not a developer i'm just trying to do some tutorials in my website and the subject is TWRP on the Galaxy Nexus
i want to take screenshots so i did some searching and found the command adb pull /dev/graphics/fb0
which is pulling the current frame from the recovery in file called fb0 and it's size is 16mb
the next command to turn that file to a jpg pic is ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgba -s 720x1280 -i fb0 -f image2 -vcodec mjpeg fb%d.jpg
which is converting the fb0 to image .. at first it was giving me no such command because the ffmpeg file wasn't there so i did more search and got the files and put the ffmpeg.exe in the fastboot/adb folder and tried the command again but it gives 4 images 3 of them all black and the 4th one with purple color everywhere
the command result was like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
so what do i do wrong ?

I'm actually trying to figure this out right now too. Did you work it out?
I had a bit more luck with
ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt bgra -s 720x1280 -i fb0 -f image2 -vcodec mjpeg fb0.jpg
and the pic looks like the color is correct, just garbled. Testing all this out in CWM. Also tried the command with png that I've seen posted elsewhere, but jpg so far looks much closer, just like the resolution is off.
Edit: bgr0 seems to work for both jpg and png, just still seems like a res issue.

Figured it out by plugging away at dewarping the resolution of the raw fb0 in irfanview.
Apparently on the GN (at least in CWM) the frames in fb0 have an extra 16px tacked on the right-hand side.
adb pull /dev/graphics/fb0 fb0
ffmpeg -loglevel panic -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt bgr0 -s 736x1280 -i fb0 -vcodec png -f image2 fb0-%d.png
mogrify -crop -16 fb0-*.png
That does the trick for me in CWM. Let me know how it goes for TWRP.
Edit: K. Unsubscribing. PM me if you have any questions.

Thanks a lot, worked for me on Razr HD with TWRP. 736 was the key!!!
Though I had a problem with the colors this made the final trick for me:
adb pull /dev/graphics/fb0
ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgba -s 736x1280 -i fb0 -f image2 -vcodec mjpeg fbd.jpg

Yeah finding the correct pix_fmt for a specific device definitely seems to be the tricky part; total needle in a haystack.
Either way, for the full list you can type: ffmpeg -pix_fmts
I've just posted up a little automation batch script for the GN over in my "Odds and Ends" thread, so if someone also wants to mod that for their devices, feel free provided you credit me somewhere. :good:

Related

[Q] Why cmd show # instead of $ after I typed "adb shell" then "su"

[Q] Why cmd show # instead of $ after I typed "adb shell" then "su"
Hi, I am not good at command writing, but recently I would like to use "androidscreencast.jnlp" which I need to use cmd in desktop windows to configure for keyboard and mouse control over the android phone.
When I type adb shell, it doesn't show "$", it shows "[email protected]:/ #".
What does that mean??
I probably need the "$" sign to do the configuration...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Can anyone help??
Thank you very much!!
# is the symbol for you having root access.
Indeed.
Sent from my Galaxy Nexus using xda app-developers app
Op, use google
Sent from my i9250
Zepius said:
# is the symbol for you having root access.
Click to expand...
Click to collapse
Thanks Zepius,
but I have been trying the following codes in cmd for several times in order to allow using desktop keyboard and mouse to control my nexus through AndroidScreenCast.jnlp. It seems unsuccessful. It's supposed that the code is fine. Just wondering does that "[email protected]:/ #" the obstacle ...
{
su
chmod 777 /data/dalvik-cache
cd /data/dalvik-cache
exit
exit
}
francis1212 said:
Thanks Zepius,
but I have been trying the following codes in cmd for several times in order to allow using desktop keyboard and mouse to control my nexus through AndroidScreenCast.jnlp. It seems unsuccessful. It's supposed that the code is fine. Just wondering does that "[email protected]:/ #" the obstacle ...
{
su
chmod 777 /data/dalvik-cache
cd /data/dalvik-cache
exit
exit
}
Click to expand...
Click to collapse
Not sure what those commands have to do with getting a keyboard to work, but you certainly would no be able to execute them without the # prompt...
Sent from my Galaxy Nexus using Tapatalk 2
francis1212 said:
Thanks Zepius,
but I have been trying the following codes in cmd for several times in order to allow using desktop keyboard and mouse to control my nexus through AndroidScreenCast.jnlp. It seems unsuccessful. It's supposed that the code is fine. Just wondering does that "[email protected]:/ #" the obstacle ...
{
su
chmod 777 /data/dalvik-cache
cd /data/dalvik-cache
exit
exit
}
Click to expand...
Click to collapse
What does the cache have to do with the keyboard?
Beamed from my Maguro.

(HELP) Can't sync correctly CM9 sources

Hi, I'm trying to sync CM9 sources. I've set up my Ubuntu 11.10 from differents pages of xda, like the guide of Rom2Maru.
So, all libs are intalled, jdk6 is also installed ,etc. So, yesteray I started to start to sync, using the instructions of the PecanCM's github:
Code:
repo init -u git://github.com/PecanCM/android.git -b ics
repo sync -j16
And I don't know why but after 4 hours it stucks. I have tried 3 times and in the 3 times it stucks at the final. I've got a lot of memory left on my hard drive so I don't know why it stucks.
I have run a log and nothing special, here you have a Screenshot:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
In the first terminal, here is my sync stucked. In the second one, Here is the log. So, in the thirst I did a "repo sync", but it stucks too.
So, please, can anyone help me? I'm really interested in learn about android and can compile it.
Thanks a lot
hi, try this
from root of source
Code:
cd .repo
rm -rf manifest*
rm -rf repo
cd ..
mv .repo ../.repo
cd ..
rm -rf {name of source folder}
mkdir cm9
mv .repo cm9/.repo
cd cm9
repo init -u git://github.com/PecanCM/android.git -b ics
repo sync -f
hope this works for you
Thanks for your help, but it's stucked in:
Fetching projects: 100% (258/258), done.
I don't know what can I do. Do you have another idea?
And, Which version of ubuntu are you using? Are you using wubi? And what post do you use to set up your ubuntu (jdk, libs,etc)?
Thanks
Some time it happens with me too but i fix it by repo sync -f ! try only repo sync -f I hope it will work for you
Ok, I've done what you said, I restarted to sync again, and I have some news problems:
First, It stucks agains here:
Then, It said that I have to use repo sync -f --force-broken, so I did:
But It said that can't sync, and there isn't git in bootloader.
Any one can help me please? thanks
repo sync -f should work bro !

[Q] N7100 Lock Screen and Power Button Problem Help!!

my N7100 lock screen not working and always stuck a information pic. on screen
here is screenshot
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
i tried this method and not working for Note 2:
su
echo -n ON > /efs/imei/keystr
sync
reboot
how can i solve this problem ? Thanks..
depape said:
my N7100 lock screen not working and always stuck a information pic. on screen
here is screenshot
View attachment 1636109
i tried this method and not working for Note 2:
su
echo -n ON > /efs/imei/keystr
sync
reboot
how can i solve this problem ? Thanks..
Click to expand...
Click to collapse
Hi,
you're probably in factory mode. You could get rid of it by putting ON (of OFF, I am mot sure) in /efs/FactoryApp/factorymode:
su
echo -n ON > /efs/FactoryApp/factorymode (or echo -n OFF > /efs/FactoryApp/factorymode)
sync
Perhaps, it should also be necessary to:
chown 1001:1001 /efs/FactoryApp/factorymode
chown 1001:1001 /efs/imei/keystr
Hope that helps.
ohtoulouz said:
Hi,
you're probably in factory mode. You could get rid of it by putting ON (of OFF, I am mot sure) in /efs/FactoryApp/factorymode:
su
echo -n ON > /efs/FactoryApp/factorymode (or echo -n OFF > /efs/FactoryApp/factorymode)
sync
Perhaps, it should also be necessary to:
chown 1001:1001 /efs/FactoryApp/factorymode
chown 1001:1001 /efs/imei/keystr
Hope that helps.
Click to expand...
Click to collapse
thats commands are solve my problem
adb shell su -c "rm /efs/FactoryApp/keystr"
adb shell su -c "rm /efs/FactoryApp/factorymode"
adb shell su -c "echo -n ON >> /efs/FactoryApp/keystr"
adb shell su -c "echo -n ON >> /efs/FactoryApp/factorymode"
adb shell su -c "chown 1000.1000 /efs/FactoryApp/keystr"
adb shell su -c "chown 1000.1000 /efs/FactoryApp/factorymode"
adb shell su -c "chmod 0744 /efs/FactoryApp/keystr"
adb shell su -c "chmod 0744 /efs/FactoryApp/factorymode"
device must be rooted !!
hi, I have problem too, with every rom i use and after many wipe, factory reset, dalvik clean, if i lock the screen can't use anymore even if the phone lock the screen by it self.... what can i do?
thanks

Compiling Custom Kernel for Samsung Galaxy S5 G900F Kernel

Hi guys,
I'm trying to compile a kernel, so far I have come upto generating the zimage, but now I'm stuck at this step.
Please help. Thanks a lot.
What do I do with the warning? and how can I repack the new zImage with the initframs extracted from the stock kernel.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hve you tried asking @wanam and @ktoonsez they are kernel building experts
Sock12345 said:
Hve you tried asking @wanam and @ktoonsez they are kernel building experts
Click to expand...
Click to collapse
well I tried asking @wanam quite a few times, but could not get a reply
I will try speaking with @ktoonsez and @wanam
Download the file below from my github @ https://github.com/ktoonsez/KTSGS5
1. mkbootfs (place in root folder of your kernel source)
Then execute these after zImage is made
Change the text "YOUR_RAMDISK_FOLDER" and "YOUR_PACKAGE_FOLDER" to proper folders.
cp arch/arm/boot/zImage YOUR_PACKAGE_FOLDER/zImage
./mkbootfs YOUR_RAMDISK_FOLDER | gzip > YOUR_PACKAGE_FOLDER/ramdisk.gz
tools/dtbTool -o arch/arm/boot/dt.img -s 2048 -p scripts/dtc/ arch/arm/boot/
chmod a+r arch/arm/boot/dt.img
tools/mkbootimg --cmdline 'console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3' --kernel YOUR_PACKAGE_FOLDER/zImage --ramdisk YOUR_PACKAGE_FOLDER/ramdisk.gz --base 0x00000000 --pagesize 2048 --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --dt arch/arm/boot/dt.img --output YOUR_PACKAGE_FOLDER/boot.img
ktoonsez said:
Download the file below from my github @ https://github.com/ktoonsez/KTSGS5
1. mkbootfs (place in root folder of your kernel source)
Then execute these after zImage is made
Change the text "YOUR_RAMDISK_FOLDER" and "YOUR_PACKAGE_FOLDER" to proper folders.
cp arch/arm/boot/zImage YOUR_PACKAGE_FOLDER/zImage
./mkbootfs YOUR_RAMDISK_FOLDER | gzip > YOUR_PACKAGE_FOLDER/ramdisk.gz
tools/dtbTool -o arch/arm/boot/dt.img -s 2048 -p scripts/dtc/ arch/arm/boot/
chmod a+r arch/arm/boot/dt.img
tools/mkbootimg --cmdline 'console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3' --kernel YOUR_PACKAGE_FOLDER/zImage --ramdisk YOUR_PACKAGE_FOLDER/ramdisk.gz --base 0x00000000 --pagesize 2048 --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --dt arch/arm/boot/dt.img --output YOUR_PACKAGE_FOLDER/boot.img
Click to expand...
Click to collapse
I have to say Ktoonez, I love your work, but where do you start building kernels for android?, ive been meaning to compile one for my NVidia shield for everyone to use, but I don't know where to start, also all the whole thread is dead in terms of development which is sad.
mudflap2.0 said:
I have to say Ktoonez, I love your work, but where do you start building kernels for android?, ive been meaning to compile one for my NVidia shield for everyone to use, but I don't know where to start, also all the whole thread is dead in terms of development which is sad.
Click to expand...
Click to collapse
Im already a developer for work so I already knew "C" code, all I did was search internet and follow github to see how it all worked. :good:

Stuck when building LOS17.1, what is $(PATH_OVERRIDE_SOONG)

Hello everyone!
I am quite a newbie to build the LineageOS, earlier this week I was trying to write my own device tree files, I had prepared most of the files needed and was managed to add my device to the lunch menu.
However when I was trying to building my twrp recovery image following peter9811's tutorial(link), the compilation was always failed with
Code:
[100% 140/140] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp
error: vendor/lineage/build/soong/Android.bp:30:8: module "generated_kernel_includes": cmd: unknown variable '$(PATH_OVERRIDE_SOONG)'
16:47:35 soong bootstrap failed with: exit status 1
1.I looked up the 'vendor/lineage/build/soong/Android.bp' and found $(PATH_OVERRIDE_SOONG) is defined somewhere else, possibly in my Android.mk.
2.I tried google the problem but got nothing except an unresolved post.
3.I tried to lunch aosp_arm-eng or aosp_arm64-eng and it gives the same error, however, lineage_arm64-userdebug works just fine.
As far as I know the aosp is switch from makefile to soong, my wild guess is this process makes some of those tutorials outdated, if that so, could somebody post some up-to-date instructions?
Could anyone please tell me what is going on there, which file should I modify to avoid this kind of problems.
Thanks for reading my post, and any possible solution will be much appreciated.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
hi man!
not sure if you still interested in solving this. This occurs because the config files inside vendor/lineage isn't being included in some build/*.mk files. This is weird because you're using LOS repo, so it should already have the commit where it does this inclusion. Repo sync might help you in there.
If it doesn't, take a look at this commit. It's a lineage-18.1 commit, but you should compare it and see what still needed on your side.
Did you find any solution to this? i am facing similar issue while building cafex and still cant find any solution. M from sources is up to date.
akshatpro said:
Did you find any solution to this? i am facing similar issue while building cafex and still cant find any solution. M from sources is up to date.
Click to expand...
Click to collapse
I had the same issue and solved it by using the breakfast command before building rom. No extra editing required.
Relevant XDA post/thread
Source
eatmyriceboi69420 said:
I had the same issue and solved it by using the breakfast command before building rom. No extra editing required.
Click to expand...
Click to collapse
Ohhh how I wish that fixed it for me. Lunch, bacon, refreshmod, clobber. Nothing works
Vinnom said:
If it doesn't, take a look at this commit. It's a lineage-18.1 commit, but you should compare it and see what still needed on your side.
Click to expand...
Click to collapse
Thank you sir! These look exactly like the droids I have been looking for!
EDIT: soooo that just created new errors (vendor/lineage/build/soong/soong_config.mk doesn't exist)
Had a brain spark, deleted the entire local/working folder. (not .repo of course).
Then a simple repo sync -l and now I'm at least building.
Fingers crossed

Categories

Resources