Add support for hero2lte SM-G935X (works already)

Hello, thanks for making /e/OS. It works great on Samsung Galaxy S7 Edge SM-G935X but it’s unfortunately not listed in the supported models for hero2lte.

I have successfully installed it on one device but i tried MANY things and i don’t remember what order/combination of TWRP and /e/ worked. Now i’m trying to setup on another device, and both TWRP and /e/ recovery fail to sideload because the model is not listed as supported.

But i have ONE phone working which is concrete proof that this variant could be added to the list of supported models.

I have a few SM-G935X at hand and i’m willing to send one to each person interested in maintaining this model.

I tried finding where to add support in the repositories but it’s confusing for someone who knows nothing about Android development. If you can help me find this i’m happy to make the patch.

NOTE: The G935X i flashed with /e/OS now indicates in “About phone” that it’s a “G935F” which is an officially supported model.

1 Like

I think TWRP 3.3.x-x is the best for this device

Thanks. 3.3.1-0 is definitely one of those i tried recently and failed to install /e/ with. Still, like many other TWRP versions, it was actually working and only failed to install /e/ because the model was not declared supported in the /e/ build. Do you have any info how to get it listed? Or someone to contact who can get it listed?

Yes,
i can propose two solutions :

  1. The easiest
    Flash first a “normal” SM-935F samsung firmware, then TWRP (or recovery-e) and finaly /e/OS

  2. The more complicated
    Modify the meta-data to add devicename into the /e/build.ZIP as described for another device in this post

Modify the meta-data

Thanks, that’s exactly what i was looking for.

I added some code at the start of updater-script:

ui_print(getprop("ro.product.device") + " - " + getprop("ro.build.product") + " (bootloader: " + getprop("ro.boot.bootloader") + ")");

I get output hero2ltexx - hero2lte (bootloader: G935FXXU8ETI2). Still, the updater-script fails the universal8890.verify_bootloader_models() != "1" check, which means VerifyBootloaderMin returns not 1.

I don’t understand why it returns not 1 as the ro.boot.bootloader value i have should match here. I will try to investigate by building from source when i have a little time.

Still, by removing the checks for the variants and treating it as G935F, it installed fine. Here’s the updater-script i used:

ui_print("start updater");
ui_print("Target: samsung/hero2ltexx/hero2lte:8.0.0/R16NW/G935FXXU2ERD5:user/release-keys");
package_extract_dir("install", "/tmp/install");
set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755);
run_program("/tmp/install/bin/backuptool.sh", "backup", "/dev/block/platform/155a0000.ufs/by-name/SYSTEM", "ext4");
ui_print("Patching system image unconditionally...");
show_progress(0.900000, 0);
block_image_update("/dev/block/platform/155a0000.ufs/by-name/SYSTEM", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
  abort("E1001: Failed to update system image.");
run_program("/tmp/install/bin/e2fsck_static", "-fy", "/dev/block/platform/155a0000.ufs/by-name/SYSTEM");
run_program("/tmp/install/bin/resize2fs_static", "/dev/block/platform/155a0000.ufs/by-name/SYSTEM");
run_program("/tmp/install/bin/e2fsck_static", "-fy", "/dev/block/platform/155a0000.ufs/by-name/SYSTEM");
show_progress(0.020000, 10);
run_program("/tmp/install/bin/backuptool.sh", "restore", "/dev/block/platform/155a0000.ufs/by-name/SYSTEM", "ext4");
package_extract_file("boot.img", "/dev/block/platform/155a0000.ufs/by-name/BOOT");
show_progress(0.100000, 10);
ui_print("Patching recovery image unconditionally...");
package_extract_file("firmware-update/recovery.img", "/dev/block/platform/155a0000.ufs/by-name/RECOVERY");
ui_print("Upgrading firmware");
package_extract_file("firmware-update/F_modem.bin", "/dev/block/platform/155a0000.ufs/by-name/RADIO");
package_extract_file("firmware-update/F_sboot.bin", "/dev/block/platform/155a0000.ufs/by-name/BOTA0");
package_extract_file("firmware-update/F_cm.bin", "/dev/block/platform/155a0000.ufs/by-name/BOTA1");
package_extract_file("firmware-update/F_param.bin", "/dev/block/platform/155a0000.ufs/by-name/PARAM");
run_program("/sbin/reboot","fota_bl");
ui_print("Firmware is up-to-date");
set_progress(1.000000);

I will try to investigate by building from source when i have a little time.

So from the docs it appears i need >100GB disk space and 16GB RAM to build /e/OS. I don’t have this so i can’t investigate more. Also the docs are not clear how to just replace one small component…

Maybe someone has an idea?

Building needs 300G

But i don’t understand your problem installing /e/ on a SM-G935X as according to official google android device list it is an hero2lte

(All Gafams Are Bastards)

Note : i have a GT-I9195X s4mini switched to normal GT-I9195 on witch i flashed TWRP.3.3.1-0 and e-0.18-r-unofficial
a sort of wifi only mini-Tablet (4.3"screen)

Your installed firmware seems more recent than the one used by lineageOS as base when they drop support and /e/team didn’t update it.
It could be an anti-roll-back issue, maybe try with an older firmware…

https://samfw.com/firmware/SM-G935F/XEF