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

I’m actually trying to follow directive from the previously shared link to carock’s comment #140 on XDA post

it say :

You’ll need to install perl and ffmpeg and add them to your path for this to work properly

Am I misunderstanding this ? My path is C:\motorun

May be not much help, other than to identify if this is a $PATH issue, in general, regarding perl, if you type

perl -v

and the terminal responds with the version you know that perl is available to you.

Regarding ffmpeg, I found this https://forum.videohelp.com/threads/398963-How-do-you-install-FFMPEG-on-Windows-XP-or-Windows-10 which explains partly how this might be used.

As I don’t use Windows I cannot add more on $PATH, sorry, but I got many hits on a search.

It give me the same output.

I think I missed something in the install process of perl …

Thank you for all the feedback, I will continue to look for solutions and keep you informed of my progress here !

Indeed, copying folder from D: to C: wasn’t enough. I had to install perl again.

And now, perl is working.
This is FFmpeg that is still broken.

My XP laptop is a 32bit machine, I will have to compile the FFmpeg code for it.

The other laptop is ubuntu, it has bash but I have to install docker on it.

Edit :
INFO: Your CPU does not support KVM extensions KVM acceleration can NOT be used

Ho boy, this is a VERY long journey !

Enough for today.
tomorrow morning, sun will shine !

You may try it on a free cloud Windows VM, for example: https://www.cloudbik.com/resources/blog/create-windows-virtual-machine-azure/

Also, there is a ffmpeg for Ubuntu and the .bat file is very simple so you may be able to translate commands to bash. As usual, Internet is very helpful for that, for example https://tldp.org/LDP/abs/html/dosbatch.html.
Perl script should run as-is on Linux.

A big Hello for @smu44 \o/

I bet we could have this conversation in french, sylvain :wink:

thank you for the

idea, clever indeed !
I just don’t know where to begin at with …

I tried to interpret the bat file on my linux machine with help of wine, but it failed.

Here are the result / output of the commands :


didou@L-indispensable-HP-Pavilion-dv5-Notebook-PC:~$ wine cmd
Microsoft Windows 6.1.7601

Z:\home\didou>cd Z:\Bureau\MotoG5Cedric\motorun
Chemin introuvable.
# mauvaise syntaxe de commande ! on recommence

Z:\home\didou>cd Z:\home\didou\Bureau\MotoG5Cedric\motorun
# là ça marche.
Z:\home\didou\Bureau\MotoG5Cedric\motorun>compress.bat
INPUT file name (example.bmp):ac6d5344d58ebd8a407685cd050bb411.bmp
Ne reconnaît pas « ffmpeg -i ac6d5344d58ebd8a407685cd050bb411.bmp -f rawvideo -s 720x1280 -pix_fmt bgr24 temp.raw » comme commande interne ou externe, ou fichier de commandes.
Ne reconnaît pas « perl compress.pl » comme commande interne ou externe, ou fichier de commandes.
temp.raw : fichier non trouvé
Fichier introuvable.

Fichier introuvable.

Appuyez sur une touche pour continuer...

J’en conclue qu’en l’état, wine ne sais pas aller chercher le ffmpeg et le perl de ubuntu…

ooops !
english version :
my conclusion it that, at that point, wine isn’t able to use ffmpeg and perl installed on the linux side …

Found a ready made zip file here. The structure is similar to the

So this is worth a try on the cheapest of my batch of Moto G5

Yes, but please keep it in english for community :wink:

My idea was more to understand what the Windows script does, and to find Bash commands to replace.

Just follow the blog post, entry point is https://azure.microsoft.com/fr-fr/free/.
I think this is the best solution, as the knowledge you will acquire could be reused later for other goals and purposes :wink:

Hello sylvain,

for the sake of the community, we will continue in English, meilleur !

Right now, i’m on my way to compiling ffmpeg for 32 bit windows system using docker.

First time compiling here, I’m proud to achieve this

I agree !

1 Like

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: