[Moto G4 Play ROMs, Kernels, Recoveries, & Other De] reikaze:
Try to break the reboot loop by removing the battery and entering directly into fastboot/recovery from there and there swipe and reinstall.

And don't format to internal storage the SD Card, that's the last thing that triggered the reboot loop on mine.

---------- Post added at 10:00 AM ---------- Previous post was at 09:31 AM ----------

I'm trying to build from source but on first sync a repository will fail to download with a

git-lfs filter-process --skip: 1: git-lfs filter-process --skip: git-lfs: not found
fatal: The remote end hung up unexpectedly

and then fail to check out arm-linux-gnueabi-9.0

Shared project LineageOS/android_hardware_qcom_wlan found, disabling pruning.
Shared project LineageOS/android_hardware_qcom_wlan found, disabling pruning.
Shared project LineageOS/android_hardware_ril found, disabling pruning.
Shared project LineageOS/android_hardware_ril found, disabling pruning.
Traceback (most recent call last):
File "/media/DriveExt4/los/.repo/repo/main.py", line 547, in <module>
_Main(sys.argv[1:])
File "/media/DriveExt4/los/.repo/repo/main.py", line 522, in _Main
result = repo._Run(argv) or 0
File "/media/DriveExt4/los/.repo/repo/main.py", line 184, in _Run
result = cmd.Execute(copts, cargs)
File "/media/DriveExt4/los/.repo/repo/subcmds/sync.py", line 855, in Execute
project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
File "/media/DriveExt4/los/.repo/repo/project.py", line 1380, in Sync_LocalHalf
self._InitWorkTree(force_sync=force_sync, submodules=submodules)
File "/media/DriveExt4/los/.repo/repo/project.py", line 2594, in _InitWorkTree
raise GitError("cannot initialize work tree for " + self.name)
error.GitError: cannot initialize work tree for Harpia-development/android_prebuilts_gcc_linux-x86_arm_arm-linux-gnueabi-9.0

The work tree won't get initialized on subsequent sync's

After redownloading harpia.xml manifest, removing the work tree, the git repo and it's objects

$ rm -rf .repo/project-objects/Harpia-development/android_prebuilts_gcc_linux-x86_arm_arm-linux-gnueabi-9.0.git
$ rm -rf .repo/projects/prebuilts/gcc/linux-x86/arm/arm-linux-gnueabi-9.0.git
$ rm -rf prebuilts/gcc/linux-x86/arm/arm-linux-gnueabi-9.0

(It seems I shouldn't delete android_prebuilts_gcc_linux-x86_arm_arm-linux-gnueabi-9.0.git since it doesn't seems to get redownloaded, I'll try it with a clean repo with the same method but without deleting that project)

and trying again to sync with trace, the hung up won't appear but it will fail to check out again saying it doesn't have a remote refs/heads/master

: cd /media/DriveExt4/los/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9
: git rev-list ^342dbd42e1f714fda199d8eb6e1b063bff0523fe HEAD -- 1>| 2>|
: git checkout -q 342dbd42e1f714fda199d8eb6e1b063bff0523fe -- 1>| 2>|

: export GIT_DIR=/media/DriveExt4/los/.repo/projects/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9.git
: git rev-list refs/tags/android-9.0.0_r44 -1 1>| 2>|
: git config --file /media/DriveExt4/los/.repo/projects/prebuilts/gcc/linux-x86/arm/arm-linux-gnueabi-9.0.git/config --null --list 1>| 2>|
Traceback (most recent call last):
File "/media/DriveExt4/los/.repo/repo/main.py", line 547, in <module>
_Main(sys.argv[1:])
File "/media/DriveExt4/los/.repo/repo/main.py", line 522, in _Main
result = repo._Run(argv) or 0
File "/media/DriveExt4/los/.repo/repo/main.py", line 184, in _Run
result = cmd.Execute(copts, cargs)
File "/media/DriveExt4/los/.repo/repo/subcmds/sync.py", line 855, in Execute
project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
File "/media/DriveExt4/los/.repo/repo/project.py", line 1380, in Sync_LocalHalf
self._InitWorkTree(force_sync=force_sync, submodules=submodules)
File "/media/DriveExt4/los/.repo/repo/project.py", line 2588, in _InitWorkTree
_lwrite(os.path.join(dotgit, HEAD), '%s\n' % self.GetRevisionId())
File "/media/DriveExt4/los/.repo/repo/project.py", line 1365, in GetRevisionId
rev = rem.ToLocal(self.revisionExpr)
File "/media/DriveExt4/los/.repo/repo/git_config.py", line 700, in ToLocal
raise GitError('remote %s does not have %s' % (self.name, rev))
error.GitError: remote github does not have refs/heads/master

I tried several times, with and without redownloading harpia.xml and on a different filesystem and it happens the same. It fails to sync with arm-linux-gnueabi-9.0 and nuking the local copy, work tree and objects will allow it download but fail saying refs/heads/master are missing on the remote repository.

I guess it's something about the repository on harpia.xml

<project name="Harpia-development/android_prebuilts_gcc_linux-x86_arm_arm-linux-gnueabi-9.0" path="prebuilts/gcc/linux-x86/arm/arm-linux-gnueabi-9.0" remote="github" revision="master" />

I read that this might happen somethings if some file has windows line breaks (\r\n) and converting to unix work, but I don't know which file