Advertisement
metalx1000

Video to Android Boot Animation

Dec 6th, 2022 (edited)
1,617
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.61 KB | None | 0 0
  1. #!/bin/bash
  2. ######################################################################
  3. #Copyright (C) 2022  Kris Occhipinti
  4. #https://filmsbykris.com
  5.  
  6. #This program is free software: you can redistribute it and/or modify
  7. #it under the terms of the GNU General Public License as published by
  8. #the Free Software Foundation version 3 of the License.
  9.  
  10. #This program is distributed in the hope that it will be useful,
  11. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. #GNU General Public License for more details.
  14.  
  15. #You should have received a copy of the GNU General Public License
  16. #along with this program.  If not, see <http://www.gnu.org/licenses/>.
  17. ######################################################################
  18.  
  19. video="https://www.youtube.com/watch?v=Nl6l63AYg7s"
  20. fps=10
  21. background="#000000"
  22.  
  23. adb shell wm size || exit 1
  24. rez="$(adb shell wm size|awk '{print $3}')"
  25. #rez="313x720"
  26. x="$(echo $rez|cut -d\x -f1)"
  27. y="$(echo $rez|cut -d\x -f2)"
  28.  
  29. echo "Creating Work Director..."
  30. mkdir bootani || exit 1
  31. cd bootani
  32.  
  33. echo "$x $y $fps" > desc.txt
  34. echo "p 0 0 part0 $background -1" >> desc.txt
  35.  
  36. mkdir part0
  37. cd part0
  38. youtube-dl "$video" -o "video.%(ext)s"
  39. ffmpeg -i video.* -vf fps=10 Bootup_%05d.jpg
  40. rm video.*
  41.  
  42.  
  43. #mogrify -resize $x -background black -gravity center -extent $rez -rotate "90" *.jpg
  44. mogrify -rotate "90" *.jpg
  45.  
  46. cd ../
  47. zip bootanimation.zip * -r -0
  48.  
  49. adb push bootanimation.zip /sdcard/
  50. adb shell "su -c 'mv /sdcard/bootanimation.zip /data/adb/modules/custombootani/system/product/media/'"
  51.  
  52. #reboot
  53. adb reboot
  54.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement