[Samsung Galaxy S 4 Unified Development] Achsel:
@npjohnson

Since there were unexpected problems installing the August update on the S4 versions GT-I9505 and GT-I9515, my report on activating the cdc_ether driver will only be made now.

My previous installation: "lineage-18.1-202107xx-nightly-jfltexx-signed.zip" resp. "18.1-202107xx-nightly-jfvelte-signed.zip", "BiTGApps-arm-11.0.0-R28_signed.zip" and "Magisk-v23.0.zip" installed via TWRP recovery.

With the same installation there were no problems with a Samsung Galaxy Tab 4 tablet (SM-T530) during the August update.

Because the LineageOS recovery does not have a backup/restore option, I prefer the TWRP recovery. After installing the August update on the S4 via "Settings/System/Advanced/Updater", an error message occurred during installation (backup/restore from BiTGapps failed), then the device went back to recovery mode after a long, unsuccessful boot. The same error occurs when updating with LineageOS recovery. In contrast to the same Tab 4 installation, BiTGapps does not seem to be compatible with the LineageOS 18.1 for the S4. Therefore I had to do a clean reinstallation for the August update on both S4 versions. Instead of BiTGapps I have now used MindTheGapps-11.0.0-arm-20210412_124103.zip. Now everything works as it should, including the JSDOIN USB/Ethernet adapter with the cdc_ether driver (page 12, post 227). Thank you again for activating the driver.

@others

My guide to a clean reinstallation:

For example, download the TAR version of the TWRP recovery that matches your device from here:

https://dl.twrp.me/jflte/ or https://eu.dl.twrp.me/jfvelte/

Download and unzip the "ODIN" ZIP file for Samsung devices from here:

https://odindownload.com/download/#.YMnKrYGnu-Y

Download and install the "Samsung Mobile Driver" EXE file from here:

https://developer.samsung.com/mobile/android-usb-driver.html

For example, download the LineageOS update ZIP file from here and copy it into the external SD card:

https://download.lineageos.org/jfltexx or https://download.lineageos.org/jfvelte

Download the "MindTheGapps-11.0.0-arm-20210412_124103.zip" file from here and copy it into the external SD card:

https://androidfilehost.com/?w=files&flid=322935

Because in my opinion there are too many Google apps in the "MindTheGapps" package, I used the following instructions to remove all APK files that I personally don't need:

Download and install the "7-Zip" EXE file for 32 or 64-bit systems from here:

https://www.7-zip.org/download.html

Download and install the "Notepad++" Installer EXE file for 32 or 64-bit systems from here:

https://notepad-plus-plus.org/downloads/v8.1.3/

I created a new folder, renamed it to e.g. "MindTheGapps" and copied the "MindTheGapps-11.0.0-arm-20210412_124103.zip" file into the "MindTheGapps" folder. I clicked with the right mouse button on the ZIP file and selected with the left "7-Zip/Unzip here". In the "system/product/app" folder I deleted all sub-folders exept the "GoogleTTS" folder (I need it for a special navigation app), in the "system/product/priv-app" folder I deleted all sub-folders exept the "Phonesky" (Google Play Store) and the "PrebuiltGmsCore" (Google Play Services) folder and in the "system/system_extern/priv-app" folder I deleted all sub-folders exept the "GoogleServicesFramework" (is required for the Google Play Services). Then I deleted the corresponding entries in the "CERT.SF" and "MANIFEST.MF" files in the "META-INF" folder via "Notepad++". Finally, I marked the two "META-INF" and "system" folders and the "toybox" file, clicked with the right mouse button on it, selected with the left "7-Zip/Add to an archive", choosed as archive format "ZIP", renamed it to "MindTheGapps-11.0.0-arm-20210412_124103_small.zip" and copied it into the external SD card. I have attached my scaled down version of "MindTheGapps". But with my instructions everyone can adapt their own version.

Download the "Magisk-v23.0.zip" file for root access from here and copy it into the external SD card:

https://magiskupdate.com/magisk-zip/

Flashing of TWRP recovery TAR file via ODIN:

Copy the TWRP TAR file into the ODIN folder on your PC. Charge the S4 as fully as possible, turn it off completely and start it into "download mode" (Volume Down + Home + Power button), press Volume Up button to continue. Connect the S4 to the PC via USB cable and wait until all USB drivers are installed. Now start ODIN and wait until the entry under "ID: COM" is highlighted in blue and "Added !!! " under "Message" at the end appears. Tap on "AP" and select the TWRP TAR file that corresponds to your device. Click on "Options", disable the "Auto Reboot" option, click on "Log" and then on "Start". Once up "PASS!" is displayed, remove the battery of the S4 for approx. 3 seconds, reinsert it, disconnect the USB cable and click on "Exit" to quit ODIN. Now start the S4 into the "recovery mode" (Volume Up + Home + Power button). Release the 3 buttons as soon as "Recovery booting..." appears in small blue text. If you let go of the buttons too late and the S4 boots normally, the TWRP will be deleted and you will have to flash it again with ODIN according to the instructions.

Clean reinstallation with TWRP Recovery:

After the first start, the message "Keep Read Only" appears. But because we want to keep the "TWRP", swipe to the right at "Swipe to Allow Modifications". Now you can set your time zone and language under "Settings". Then go to "Wipe/Advanced" and activate only the options "Dalvik / ART Cache", "System", "Data", "Internal Storage" and "Cache". Swipe right to confirm. Click the home button, then "Wipe", there "Format Data" and swipe right to confirm. Click the home button, then "Install", there "Install from SD card" and select the LineageOS ZIP file. Then click on "Add more ZIPs", select the "MindTheGapps-11.0.0-arm-20210412_124103_small.zip" and the "Magisk-v23.0.zip" one after the other and swipe to the right to confirm. After installing the 3 ZIP files click on "Wipe Cache/Dalvik", swipe right to confirm and finally click on "Restart System". It now takes about 3 minutes until LineageOS 18.1 is started for the first time and can be set up.

Flashing of Lineage recovery TAR file via ODIN:

Those who prefer to reinstall with the LineageOS recovery, as recommended, can also flash the Lineage Recovery with ODIN. To do this, the IMG file must first be converted into a TAR file. Click on the IMG file with the right mouse button and select "7-Zip/Add to an archive" with the left mouse button. Select "TAR" as the archive format, give the file any name and copy the created TAR file into the ODIN folder. To flash the Lineage recovery TAR file via ODIN, proceed in the same way as for the TWRP TAR file.

Clean reinstallation with Lineage Recovery:

After starting into the recovery (Volume Up + Home + Power button), click on "Factory reset", then on "Format data/factory reset", and then on "Format cache partition" and "Format system partition" and start formatting the entire internal memory. All files will be deleted. Go back to the main menu. Install the Lineage ZIP file by selecting "Apply Update" and then "Choose from sdcard1". Then install the add-ons (MindTheGapps small and Magisk) in the same way and ignore the displayed signature error (confirm with "yes"). Go back to the main menu and select "Reboot system now". It now takes about 3 minutes until LineageOS 18.1 is started for the first time and can be set up.

All installations based on my instructions are at your own risk. I do not accept any liability for this. However, I have successfully tested everything on two S4 phones and a Tab 4 tablet.

Good luck with the installation and thanks again to "npjohnson" for providing LinageOS 18.1 for the S4 and the updates.

Axel