GSI stands for generic system image, The GSI contains all directories and files same as implemented in android system, GSIs can have many types of encryption for different devices but sparse GSI can be flashed on any android. Android System image mainly contains following directories app, bin, etc, fonts, framwork, lib, lib64, media, priv-app, usr, vendor, xbin, build.prop, manifest.xml, etc.
Requirements to create system image from android device
- Android device with SU binaries installed(Rooted device)
- Windows/Linux PC with adb and fastboot installed
- USB cable for connection of android device with PC
Step 1- Enable Developer mode and USB debugging from settings
- click 7 times on about phone to enable Developer Mode
- search for Developer mode and enable USB Debugging
Step 2- Connect Android device with PC in debugging mode, Type the following command in Command prompt/ Terminal to check your device connected properly with PC
- "adb devices"
It will show your device's id number and a pop up menu will show in android device Allow adb connection on that menu
Step 3- Enter in adb shell and run it with SU (super user/administrator) privileges, Type the following commands in Terminal/command prompt
- adb shell
- su
- cd /dev/block/by-name //this path may be different in your device
- dd if=system of=/storage/self/primary/system.img //This will generate unencrypted/unsparse system image in your device storage
- dd if=/storage/self/primary/system.img of=/dev/block/by-name/system
The changes will be applied to system, format device to apply changes
OR
Step 6- To flash image trough fastboot a sparse image will required, To convert the modified system.img to sparse format, linux users can use "simg2img" utility software and for windows users some software are available like "imgextractor"
- install simg2img using command in Terminal "sudo apt-get install simg2img"
- To convert the modified system.img in sparse format type the following command
- "img2simg < input non sparse image file name > < output sparse image name>"
- Flash the sparse image using fastboot mode in android device using following command
- "fastboot flash system <image file name>"
Comments
Post a Comment