How To Guide Install GSIs on Samsung Galaxy A32 4G (Experimental)

Search This thread

klfld

Member
Dec 12, 2021
13
37
I have tested 2 GSI's so far, phh's AOSP and AndyYan's LineageOS 19.1.

Everything works so far except:
  • MTP file transfer
  • Fingerprint reader
  • File encryption (GSIs don't boot if you dont disable encryption)
So, if you wanna install one, here's what I did:

Install Prove N's Unofficial TWRP and follow his guide. DONT INSTALL MAGISK, IT HAS THE IMEI PROBLEM AND ITS NOT TESTED WITH GSIs

Download your preferred GSI, I recommend lineage-19.1-20220320-UNOFFICIAL-arm64_bvS.img.xz, comes without GAPPS (Use bgS if you want em).
Extract it and rename the .img file to system.img

(Optional) Download this vendor.img, I made a treble overlay and added it to the image. The rom should be more stable and power management should be fixed with that. I still have to push the changes to github.

Download ChonDoe_Flasher.zip, it's a tool to flash dynamic partitions. It checks your storage for system.img and vendor.img.

Get a microSD card, and copy to the root of it the ChonDoe_Flasher.zip, system.img and vendor.img.

Boot to TWRP, and install the ChonDoe zip, wait till it finishes flashing.

Reboot to TWRP again, so it can mount the vendor partition again, go to the terminal and type multidisabler, so we remove encryption.

Format data, internal storage and reboot, you should be ready to go.

Settings in PHH Treble Settings
  • Go to Samsung features and check "Enable extended brightness range" and "Enable access to all cameras".
  • Go to Misc features and check "Use alternate way to detect headsets"
  • To get the display working at 90hzs go to "Force FPS" and check the option.
  • On camera check "Expose Aux cameras" and "Force Enable Camera2API HAL3" (In theory you should get better photos with that but I didn't go outside today lol)
For the lack of MTP file transfer, I'm using ADB instead of MTP with this tool for uploading and getting files from internal storage: Python ADB File Explorer. Suprisingly it's faster than MTP for some reason...

I know MTP can be fixed changing the kernel driver, I have compiled the kernel from @Prove N. , he had some USB fixes, but I don't know how to pack it for Samsung, It could be nice to have it for GSIs. If anyone wants to help me with these small issues it would be awesome.

Report bugs, workarounds and fixes here in this thread, let's try to make this phone usable!
 

uluruman

Senior Member
Oct 23, 2021
255
42
I've recently bought this phone and installed LineageOS straight away. I used my alternative method without TWRP, by repacking super.img using my script, which I've modified to support SM-A325F. Too bad the fingerprint sensor does not work. Can anyone confirm it does not work regardless of on which Android version a GSI is based on?
 

LuCeiFeR

Senior Member
Jun 8, 2012
88
13
HTC EVO 3D
Samsung Galaxy Note 9
I already have TWRP on my A32 and have Magisk. Followed the guide, unfortunately phone didn't boot up. Instead it reboots to recovery. The hereunder error appears while flashing.


Code:
PARTITIONS FLASHER
| Released at 2021, January 10
| Developed by ChonDoe
 
Archive:  /external_sd/ChonDoe_Flasher.zip
  inflating: /tmp/busybox-arm
Archive:  /external_sd/ChonDoe_Flasher.zip
  inflating: /tmp/e2fsck
Archive:  /external_sd/ChonDoe_Flasher.zip
  inflating: /tmp/installer.sh
Archive:  /external_sd/ChonDoe_Flasher.zip
  inflating: /tmp/resize2fs
ENVIRONMENT SETUP
| Unmount System
umount: can't unmount /system: Invalid argument
umount: can't unmount /system_root: Invalid argument
umount: can't unmount /system_ext: No such file or directory
umount: can't unmount /product: Invalid argument
umount: can't unmount /vendor: Invalid argument
| Detecting Partition Layout
| Dynamic partition detected
| System Block: /dev/block/dm-0
| Product Block: /dev/block/dm-2
| Vendor Block: /dev/block/dm-1
 
FLASHING SYSTEM IMAGE
Invalid sparse file format at header magic
Failed to read sparse file
703357+0 records in
703357+0 records out
2880950272 bytes (2.7GB) copied, 34.579540 seconds, 79.5MB/s
| System flashed as raw image
| Attempt to Resize Partition
e2fsck 1.45.6 (20-Mar-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/: ***** FILE SYSTEM WAS MODIFIED *****
/: 7386/7744 files (12.1% non-contiguous), 684040/692238 blocks
resize2fs 1.45.6 (20-Mar-2020)
Resizing the filesystem on /dev/block/dm-0 to 1217099 (4k) blocks.
The filesystem on /dev/block/dm-0 is now 1217099 (4k) blocks long.

| Done
 
FLASHING PRODUCT IMAGE
| Cant find product.img
 
FLASHING VENDOR IMAGE
| Vendor flashed as sparse image
| Attempt to Resize Partition
e2fsck 1.45.6 (20-Mar-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Padding at end of inode bitmap is not set. Fix? yes


/dev/block/dm-1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/dm-1: 1140/41760 files (0.0% non-contiguous), 124955/166988 blocks
resize2fs 1.45.6 (20-Mar-2020)
Resizing the filesystem on /dev/block/dm-1 to 185664 (4k) blocks.
The filesystem on /dev/block/dm-1 is now 185664 (4k) blocks long.

| Done
I:TWFunc::Set_Brightness: Setting brightness control to 5
| Enjoy
 
I:Updater process ended with RC=0
I:Install took 59 second(s).
E:Unable to unlock /dev/block/mmcblk0p42 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p14 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p18 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p8 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p11 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p4 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p15 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0boot0 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p5 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p7 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p13 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p10 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p12 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p9 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p6 for flashing: (null)
Updating partition details...
I:checking for twrp app
I:Data backup size is 0MB, free: 108145MB.
...done
I:Set page: 'flash_done'
I:TWFunc::Set_Brightness: Setting brightness control to 200
I:operation_end - status=0
I:TWFunc::Set_Brightness: Setting brightness control to 5
I:TWFunc::Set_Brightness: Setting brightness control to 0
I:TWFunc::Set_Brightness: Setting brightness control to 200
I:Set overlay: ''
I:Set page: 'clear_vars'
I:Set page: 'install'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set page: 'advanced'
I:Set page: 'copylog'
I:Set page: 'action_page'
I:operation_start: 'Copy Log'
 

jasurshoir

Member
Apr 29, 2022
10
2
I've recently bought this phone and installed LineageOS straight away. I used my alternative method without TWRP, by repacking super.img using my script, which I've modified to support SM-A325F. Too bad the fingerprint sensor does not work. Can anyone confirm it does not work regardless of on which Android version a GSI is based on?
upload firmware plz
 

uluruman

Senior Member
Oct 23, 2021
255
42
Ok, I'll try not to mess it all up this time...

Here is the link to download: {Mod edit: Link removed. ufile.io is not accepted as file host on XDA}. That is super.img I've created using my script, it is packed into a tar archive and zipped to reduce the size for file sharing. It is specifically for SM-A325F, based on the NPB (Nepal/Butan) version of the firmware and contains LiR v3.16. After unzipping it is ready to be flashed using Odin into the AP slot over the stock NPB firmware. That means, you have to download and flash it first, then flash the super.img. After each flashing go straight into the Recovery mode and do factory reset, only then boot the system.

But that's not all, additionally you have to extract and flash optics.img from your regional firmware. Here is how to do it. Changing optics.img to your regional one is not compulsory but with the Nepalese/Butanese one you'll only have a few major cellular providers working. You can do it at any time after flashing the system, it does not require factory reset.

I have chosen the NPB stock firmware as the basis because after analyzing contents of other regional firmware I've found that it is probably the most non-bloated and privacy-respecting of all (the worst were Russian and European).
 
Last edited by a moderator:

jasurshoir

Member
Apr 29, 2022
10
2
Ok, I'll try not to mess it all up this time...

Here is the link to download: .... That is super.img I've created using my script, it is packed into a tar archive and zipped to reduce the size for file sharing. It is specifically for SM-A325F, based on the NPB (Nepal/Butan) version of the firmware and contains LiR v3.16. After unzipping it is ready to be flashed using Odin into the AP slot over the stock NPB firmware. That means, you have to download and flash it first, then flash the super.img. After each flashing go straight into the Recovery mode and do factory reset, only then boot the system.

But that's not all, additionally you have to extract and flash optics.img from your regional firmware. Here is how to do it. Changing optics.img to your regional one is not compulsory but with the Nepalese/Butanese one you'll only have a few major cellular providers working. You can do it at any time after flashing the system, it does not require factory reset.

I have chosen the NPB stock firmware as the basis because after analyzing contents of other regional firmware I've found that it is probably the most non-bloated and privacy-respecting of all (the worst were Russian and European).
all good please create one ui firmware
 
Last edited by a moderator:

jasurshoir

Member
Apr 29, 2022
10
2
Do you really need it? First, OneUI is not to be trusted as it's proprietary and not fully open-source, second, the only GSI version of it I can find (repacked by erfanoabdi) is very old (2019).
Yes, I really need this one, I saw on the Internet nippon gsi one oh 4.0 downloaded installed but did not start

add please play servise
 
Last edited:

uluruman

Senior Member
Oct 23, 2021
255
42
Yes, I really need this one, I saw on the Internet nippon gsi one oh 4.0 downloaded installed but did not start

add please play servise
Ok, here it is: {Mod edit: Link removed. ufile.io is not accepted as file host on XDA}

It's the same Nippon GSI you mentioned, I've just repacked it into super.img. I don't know whether it's gonna work or not. Sometimes the system is just incompatible with the phone hardware or the kernel. All I can do is to repack it all, analyzing logs or tweaking the kernel is currently beyond my abilities.

Here is also the version of LiR with GApps (Google Play, etc.): {Mod edit: Link removed. ufile.io is not accepted as file host on XDA}

I've also updated my script, besides other improvements now it supports GZ-packed GSI images.

P.S.: I really don't recommend using any of the Google services. Don't let corporations gather your usage data. You bought the phone and from now on it should be all yours, with all of its data, like a PC in the good old days. You own your device, and nobody has the right to stick their nose into how you use your phone, gather any statistics and push you any ads. You always have a choice to turn down privacy-unfriendly stuff, the price of that "inconvenience" is actually ridiculous. From my point of view, there is simply no point in using non-stock systems if they are still littered with the privacy-unfriendly bloatware.
 
Last edited by a moderator:
  • Like
Reactions: zombrainy

jasurshoir

Member
Apr 29, 2022
10
2
Ok, here it is: ...

It's the same Nippon GSI you mentioned, I've just repacked it into super.img. I don't know whether it's gonna work or not. Sometimes the system is just incompatible with the phone hardware or the kernel. All I can do is to repack it all, analyzing logs or tweaking the kernel is currently beyond my abilities.

Here is also the version of LiR with GApps (Google Play, etc.): ...

I've also updated my script, besides other improvements now it supports GZ-packed GSI images.

P.S.: I really don't recommend using any of the Google services. Don't let corporations gather your usage data. You bought the phone and from now on it should be all yours, with all of its data, like a PC in the good old days. You own your device, and nobody has the right to stick their nose into how you use your phone, gather any statistics and push you any ads. You always have a choice to turn down privacy-unfriendly stuff, the price of that "inconvenience" is actually ridiculous. From my point of view, there is simply no point in using non-stock systems if they are still littered with the privacy-unfriendly bloatware.
thank you one ui not working play market worked youre new lineage firmware
 
Last edited by a moderator:
  • Like
Reactions: uluruman

uluruman

Senior Member
Oct 23, 2021
255
42
I have a question. Is this file linked above different than the PixelExpirence GSI from GitHub? Because the file is about 1GB larger than the "PixelExperience_arm64-ab-12.1-20220516-UNOFFICIAL.img.xz" from https://github.com/ponces/treble_build_pe/releases?page=1
It is different, although based on it. It is the full Super partition, while "PixelExperience_arm64-ab-12.1-20220516-UNOFFICIAL.img" is only the System dynamic sub-partition within it. Besides System there are also Vendor, Product and ODM dynamic partitions included (taken directly from the NPB U2 stock firmware). Basically that's all the work my script is doing: repacking all the dynamic partitions inside super.img altogether, after which it contains another GSI but is still directly flashable with Odin.
 
Last edited:

uluruman

Senior Member
Oct 23, 2021
255
42
There is an alternative way of installing a GSI, although it is far less straightforward. See this and this post. The latter deals with dynamic partitions, without which you cannot flash a GSI.
 

Franzyy

Senior Member
It is different, although based on it. It is the full Super partition, while "PixelExperience_arm64-ab-12.1-20220516-UNOFFICIAL.img" is only the System dynamic sub-partition within it. Besides System there are also Vendor, Product and ODM dynamic partitions included (taken directly from the NPB U2 stock firmware). Basically that's all the work my script is doing: repacking all the dynamic partitions inside super.img altogether, after which it contains another GSI but is still directly flashable with Odin.
Ok thx for explaining it
 

uluruman

Senior Member
Oct 23, 2021
255
42
I followed your guide so that i can get PixelExpirence on my A32 but my wired headphones doesnt work when plugged in, it just plays music on the speaker on the phone. Do you know a fix?
Open "Phh Treble Settings" from the settings, then "Misc features" and check "Use alternative way to detect headsets" in the Audio section.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    they are already included in project elixir 3.6 by default. dont worry about it.
    Oh, good!! Thanks!! I'm using project elexir now
  • 7
    I have tested 2 GSI's so far, phh's AOSP and AndyYan's LineageOS 19.1.

    Everything works so far except:
    • MTP file transfer
    • Fingerprint reader
    • File encryption (GSIs don't boot if you dont disable encryption)
    So, if you wanna install one, here's what I did:

    Install Prove N's Unofficial TWRP and follow his guide. DONT INSTALL MAGISK, IT HAS THE IMEI PROBLEM AND ITS NOT TESTED WITH GSIs

    Download your preferred GSI, I recommend lineage-19.1-20220320-UNOFFICIAL-arm64_bvS.img.xz, comes without GAPPS (Use bgS if you want em).
    Extract it and rename the .img file to system.img

    (Optional) Download this vendor.img, I made a treble overlay and added it to the image. The rom should be more stable and power management should be fixed with that. I still have to push the changes to github.

    Download ChonDoe_Flasher.zip, it's a tool to flash dynamic partitions. It checks your storage for system.img and vendor.img.

    Get a microSD card, and copy to the root of it the ChonDoe_Flasher.zip, system.img and vendor.img.

    Boot to TWRP, and install the ChonDoe zip, wait till it finishes flashing.

    Reboot to TWRP again, so it can mount the vendor partition again, go to the terminal and type multidisabler, so we remove encryption.

    Format data, internal storage and reboot, you should be ready to go.

    Settings in PHH Treble Settings
    • Go to Samsung features and check "Enable extended brightness range" and "Enable access to all cameras".
    • Go to Misc features and check "Use alternate way to detect headsets"
    • To get the display working at 90hzs go to "Force FPS" and check the option.
    • On camera check "Expose Aux cameras" and "Force Enable Camera2API HAL3" (In theory you should get better photos with that but I didn't go outside today lol)
    For the lack of MTP file transfer, I'm using ADB instead of MTP with this tool for uploading and getting files from internal storage: Python ADB File Explorer. Suprisingly it's faster than MTP for some reason...

    I know MTP can be fixed changing the kernel driver, I have compiled the kernel from @Prove N. , he had some USB fixes, but I don't know how to pack it for Samsung, It could be nice to have it for GSIs. If anyone wants to help me with these small issues it would be awesome.

    Report bugs, workarounds and fixes here in this thread, let's try to make this phone usable!
    2
    Ok, I'll try not to mess it all up this time...

    Here is the link to download: {Mod edit: Link removed. ufile.io is not accepted as file host on XDA}. That is super.img I've created using my script, it is packed into a tar archive and zipped to reduce the size for file sharing. It is specifically for SM-A325F, based on the NPB (Nepal/Butan) version of the firmware and contains LiR v3.16. After unzipping it is ready to be flashed using Odin into the AP slot over the stock NPB firmware. That means, you have to download and flash it first, then flash the super.img. After each flashing go straight into the Recovery mode and do factory reset, only then boot the system.

    But that's not all, additionally you have to extract and flash optics.img from your regional firmware. Here is how to do it. Changing optics.img to your regional one is not compulsory but with the Nepalese/Butanese one you'll only have a few major cellular providers working. You can do it at any time after flashing the system, it does not require factory reset.

    I have chosen the NPB stock firmware as the basis because after analyzing contents of other regional firmware I've found that it is probably the most non-bloated and privacy-respecting of all (the worst were Russian and European).
    2
    all good please create one ui firmware
    Do you really need it? First, OneUI is not to be trusted as it's proprietary and not fully open-source, second, the only GSI version of it I can find (repacked by erfanoabdi) is very old (2019).
    2
    Would love this tbh.
    gapps would be preferred
    I tried to download it, but it took 1 hour and chrome said "network error", so i only can get the lineage os gsi.
    Maybe it is because they have bad servers
    1
    they are already included in project elixir 3.6 by default. dont worry about it.
    Oh, good!! Thanks!! I'm using project elexir now