/usr/bin/avos:do housekeeping()

From ArchosDocs

Jump to: navigation, search

Description

Monitors the state of /mnt/data and save the settings when the drive is mounted. We can learn the data structure of /mnt/data/System/System6.bin by reversing the function params_SaveHdd().

The Code

function do_housekeeping() {
new_state = fs_is_mounted("/mnt/data/");
if(new_state != true && new_state != old_state) {
old_state = true
atd_sync();
params_SaveUser();
}
}
 
function params_SaveUser() {
params_SaveFlash(); // Loads flashrw.ko, and write settings to flash memory.
params_SaveHdd(); // Saves /mnt/data/System/System6.bin
}
Personal tools