Advertisement
metalx1000

Modify Android GSI system Image

Jun 17th, 2023
1,677
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.01 KB | None | 0 0
  1. #modify Android GSI system Image
  2. # System image option
  3. ## - https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-%28GSI%29-list
  4. ## - https://sourceforge.net/projects/andyyan-gsi/files/lineage-20-light/
  5.  
  6. #resize the image
  7. fallocate -l 3500M system.img
  8. resize2fs system.img 3500M
  9.  
  10. #mount the image
  11. mkdir mnt
  12. sudo mount system.img mnt
  13.  
  14. #THIS IS WHERE YOU MAKE CHANGES TO THE SYSTEM
  15.  
  16. #unmount image
  17. sudo umount mnt
  18.  
  19. #now resize the image by removing empty space
  20. e2fsck -yf system.img
  21. resize2fs -M system.img
  22. e2fsck -yf system.img
  23.  
  24. #now install it
  25. adb reboot bootloader
  26.  
  27. wget https://dl.google.com/developers/android/qt/images/gsi/vbmeta.img
  28. fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
  29. fastboot reboot fastboot
  30.  
  31. fastboot delete-logical-partition product
  32. fastboot delete-logical-partition product_a
  33. fastboot delete-logical-partition product_b
  34. fastboot erase userdata
  35. fastboot erase cache
  36. fastboot flash system system.img
  37. fastboot -w
  38. fastboot reboot
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement