Original Android 4.03 image factory reset problems

Started by ozko, January 03, 2014, 02:47:06 PM

Previous topic - Next topic

ozko

I have an A13 with the original lcd image from the wiki and it works fine.
But this is a second time in a month that it factory reset itself.
What could be the cause of this?
It probably happened durring boot because it turns off fine and
when I power it again the next day it loses all data programs and its basically a factory reset.

EDIT:
Im using two boards A13 for touch control for two machines of the same kind trough serial connection. One works fine the second gives this fault for the second time.
Could it be a bad shutdown because I dont use batteries for safe shutdown ?
Or it could be a board fail?

bernard

Sadly, Android can easily fail (and even not reboot at all) if you pull the power or do a hard reset.

Previously Android was built with YAFFS2 which was great at preventing these things, but I suspect a licensing issue and performance difference.  Given that most phones and tablet run on batteries it shouldn't be a problem.  But for the type of stuff the board from Olimex is doing, it is a huge problem!!

From a shell, you can do a "sync" before pulling the power, or better yet, just do a "reboot -p" to perform a fast shutdown (takes about 3 seconds).

ozko

Hi thank you for the responce!
I`ll experiment with it currently im shutting it down with this method programatically when the power is unplugged

public void shutdown() {
        if (!(Power_utils.isConnected(mMain))) {
            Log.e(TAG, "UNPLUGED");
            try {
                Process proc = Runtime.getRuntime().exec(
                        new String[]{"su", "-c",
                                "busybox poweroff -d 8 -f"});
                proc.waitFor();
            } catch (Exception ex) {
                Log.i(TAG, "Could not reboot", ex);
            }
            Log.e(TAG, "SHUTDOWN");
        }
    }


But im not good with linux so im not sure what the power off parameters do exept the 8 sec delay.
Can you tell me how to implement the sync in this method?

ozko


LubOlimex

Hello both,

As bernard mentioned the loss of data (and sometimes even the NAND memory corruption) is caused by power-down events which are not well-handled by the EXT4 file system. Quite the contrary - the delayed memory allocation mechanisms which speed up the memory operations endanger the data retention and stability. Android has no problem using EXT4 since it is targeted at mobile devices that have a battery connected and full power down cannot occur - that's why they aim at the speed and not the data security during a power-down event.

The best work-around is to have a back-up battery connected to the A13 board.

When you want to turnoff the board either use the Android interface or hold the power down button or issue a "reboot -p" command via the debug interface.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex