Looking for a workaroud in order to get rid of the N/A screen on a Moto G5 (cedric)

Hello,

This is a friendly follow to people who tried to help me here.

I’ve been trying to compile FFmpeg for windowsXP, without success.
I was able to install bash and docker on my latest Ubuntu linux machine (in the older one, the processor wasn’t handled correctly), but couldn’t compile for 32bit windows. Some bcrypt.dll was missing and could’t find a workaround. Abandoned.
Later i’ve found compiled version for supposedly winXP and Win32, but either I didn’t knew how to install them or they weren’t suitable for my old XP.
Long story short, I gave up this possibility.
But I enjoyed the journey (even if it was sometime hard) and managed to learn new things :smiley:

My next option is to follow @smu44 idea.
Let’s study this

!!!

your other idea : windows .bat → linux bash
this could be more simple.

@echo off
set /p input=INPUT file name (example.bmp):
ffmpeg -i %input% -f rawvideo -s 720x1280 -pix_fmt bgr24 temp.raw
perl compress.pl
DEL temp.raw
::append compressed image to modified bin file
copy /b logo.bin+logo-moto.raw logo.bin
pause

what do you think about this ?

#!/bin/bash 
read -p "INPUT file name (example.bmp):" input
ffmpeg -i $input -f rawvideo -s 720x1280 -pix_fmt bgr24 temp.raw 
perl compress.pl
unlink temp.raw
#append compressed image to modified bin file
cp -b logo.bin+logo-moto.raw logo.bin

Not so sure about the last line …

Anyway, here an output :

didou@L-indispensable-HP-Pavilion-dv5-Notebook-PC:~/Bureau/MotoG5Cedric/motorun$ #!/bin/bash 
didou@L-indispensable-HP-Pavilion-dv5-Notebook-PC:~/Bureau/MotoG5Cedric/motorun$ read -p "INPUT file name (example.bmp):" input
INPUT file name (example.bmp):ac6d5344d58ebd8a407685cd050bb411.bmp
didou@L-indispensable-HP-Pavilion-dv5-Notebook-PC:~/Bureau/MotoG5Cedric/motorun$ ffmpeg -i $input -f rawvideo -s 720x1280 -pix_fmt bgr24 temp.raw 
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, bmp_pipe, from 'ac6d5344d58ebd8a407685cd050bb411.bmp':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: bmp, bgr24, 720x1280, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (bmp (native) -> rawvideo (native))
Press [q] to stop, [?] for help
Output #0, rawvideo, to 'temp.raw':
  Metadata:
    encoder         : Lavf58.76.100
  Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24(progressive), 720x1280, q=2-31, 552960 kb/s, 25 fps, 25 tbn
    Metadata:
      encoder         : Lavc58.134.100 rawvideo
frame=    1 fps=0.0 q=-0.0 Lsize=    2700kB time=00:00:00.04 bitrate=552960.0kbits/s speed=0.303x    
video:2700kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
didou@L-indispensable-HP-Pavilion-dv5-Notebook-PC:~/Bureau/MotoG5Cedric/motorun$ perl compress.pl
Use of uninitialized value in string eq at compress.pl line 55.
didou@L-indispensable-HP-Pavilion-dv5-Notebook-PC:~/Bureau/MotoG5Cedric/motorun$ 

[fr]Le compress.sh serait à améliorer ?
là je ne voit pas, la ligne 55 c’est :

if(($max+1)>=$xres)

et les deux sont définies (ligne 6 et ligne 20)

Bon, ben au lit, le soleil se lève demain …[/fr]

Could the compress.sh be improved?
I can’t see, line 55 is :

if(($max+1)>=$xres)

and both are defined (line 6 and line 20)

Well, off to bed, the sun rises tomorrow …

[fr]La nuit porte conseil[/fr]

Sleep on it

Looked for the append command and found this maybe more suitable syntaxt

cat file1 file2 > file3

Here is better proposition to the bash conversion of the batch command :

#!/bin/bash 
read -p "INPUT file name (example.bmp):" input
ffmpeg -i $input -f rawvideo -s 720x1280 -pix_fmt bgr24 temp.raw 
perl compress.pl
unlink temp.raw
#append compressed image to modified bin file
cat logo.bin logo-moto.raw > modified_logo.bin

Before running this new version of the carock’s script, I tried to run the decompress.pl followed by a ffmpeg commande as described in the .bat file.

It gave me my image back, so despite the Use of uninitialized value in string eq at compress.pl line 55. message, it ran perfect yesterday night !

Let’s finish the job !

\o/

1 Like

I achieved to copy the logo.bin from my e-1.17 moto G5 to my laptop :slight_smile:

I did it without beeing root.

I also achieved to get root privilege via magisk.

This is going to be my next step, before flashing any self modified logo.bin to my device, even the cheaper one :slight_smile:

But I should pause getting focused on this and do my home chore before !

Congratulations, you made it :smile_cat:

Please find the link here: Looking for a workaroud in order to get rid of the N/A screen on a Moto G5 (cedric) - #16 by smu44

you are right, I should follow the

it would have same me some time :slight_smile:

1 Like

I can sense a little confusion here: the link I was referring to is https://www.cloudbik.com/resources/blog/create-windows-virtual-machine-azure/, about getting an Azure VM.
So, it’s about the other solution: running the .bat file on a cloud VM :wink:

Apologies if it wasn’t clear :confused:

Ha ! I leave this as my last option.

(going off-topic here)
I strongly advise to give it a try: with a Pavilion DV5 and 32b XP you will, sooner or later, bump into a similar problem again.

Can you explain further ? My Pavilion DV5 is Ubuntu 22.04.3 LTS 64b and the 32b XP is a samsung NC10, FYI

Here is a video of my achievement :
year \o/

2 Likes

Sorry, I messed up :confused: But Samsung NC10 is not better :wink: