Root Note8 (Exynos) + OEM Issue Fix + EFS Backup (Note8/S8/S8+) | XDA Forums

How to Use

1.Enable Developer Option (settings – about phone – Software information – Tap 7 times on build number to activate developer option in settings menu)
2.Enable OEM Unlock from developer option (Read above for workaround if you don’t have this option)
3.Download and copy N950F_root_OEM_issue_devices.zip according Oreo/Pie to Ext SD card
4.Download TWRP for N8
5.Switch Off device
6.Press Vol down + Bixby + Power to reboot to download mode, press volume up when asked to continue to download mode
7Download Odin and open it, Disable ‘Auto reboot’ from option menu of Odin
8.Select TWRP (tar image) with AP tab of Odin and Start
9.Once Successfully flashed, you will see ‘Passed’ in Odin tab
10.Disconnect device and hold Vol down + power till screen goes off, Now immediately press Vol Up + Bixby + Power to reboot to TWRP
11.Select to allow modification
12.From TWRP, Select WIPE menu – Then FORMAT DATA – You need to type ‘yes’ to perform wipe. WARNING : This will erase all data including Int SD storage from device
13.Once format device completes, go back and select REBOOT’ Menu and then – ‘RECOVERY’, This will reboot to TWRP again
14.Now select Install and navigate path to Ext SD card – N950F_root_OEM_issue_devices.zip, you have copied earlier
15.Once Magisk flash successfully, Reboot to System
Open settings – Developer option – Look for OEM Unlock option. If it is there, it is safe to reboot device.
Credits and Thanks goes to BlackMesa123 for this post for OEM patch script.

Important Note for Pie – There will be OEM unlock option there in developer setting but it will be disabled and can not enabled, this is because of it is hacked. Just ignore it. You can not boot device with TWRP if it is really disabled. Also If magisk app may not appear then simply download Magisk_for_Pie.apk from below attachement and install as regular app.

Source: [Guide] (Oreo) Root Note8 (Exynos) + OEM Issue Fix + EFS Backup (Note8/S8/S8+) | XDA Forums

Root Note8 (Exynos) + OEM Issue Fix + EFS Backup (Note8/S8/S8+) | XDA Forums was last modified: July 6th, 2022 by Jovan Stosic

write a struct array to spiffs

CODE: SELECT ALL        long start_time_spiffs = millis();

File configFile = SPIFFS.open("/lights.conf", "w+");

if (!configFile)
{
Serial.println(F("Failed to open test.conf"));
} else {

Serial.println(F("Opened Hue_conf.txt for UPDATE...."));
Serial.printf("Start Position =%u \n", configFile.position());

unsigned char * data = reinterpret_cast<unsigned char*>(Lights); // use unsigned char, as uint8_t is not guarunteed to be same width as char...
size_t bytes = configFile.write(data, sizeof(HueLight) * _LightCount ); // C++ way

Serial.printf("END Position =%u \n", configFile.position());
configFile.close();

}

 

Source: write a struct array to spiffs – Everything ESP8266

write a struct array to spiffs was last modified: June 29th, 2022 by Jovan Stosic