# Automatic device resets

**URL:** <https://forum.legato.io/t/automatic-device-resets/6581>\
**Category:** Legato Application Framework\
**Created:** [August 29, 2023, 2:51pm UTC](https://forum.legato.io/t/automatic-device-resets/6581 "2023-08-29T14:51:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HudriWudri](https://avatars.discourse-cdn.com/v4/letter/h/a6a055/32.png) [@HudriWudri](https://forum.legato.io/u/HudriWudri)\
**Post date:** [August 29, 2023, 2:51pm UTC](https://forum.legato.io/t/automatic-device-resets/6581/1 "2023-08-29T14:51:11Z")

</div>

Hey everybody,  
I am using the WP76xx devices and noticed an interesting behaviour. If I reset the device multiple times, the software on the device resets itself to the initial state. This means all my apps are gone and I need to flash the device again.  
I guess this is the intended behaviour to recover a device if you flash a faulty version during development. In my case, the reboots of the device are intentional.  
Is there a way to disable this behaviour, so the software won’t reset itself after x resets?

Let me know if you need more details.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [August 29, 2023, 3:54pm UTC](https://forum.legato.io/t/automatic-device-resets/6581/2 "2023-08-29T15:54:40Z")

</div>

this is the rollback mechanism:

> **[Updates - Legato Docs](https://docs.legato.io/latest/conceptsUpdates.html#conceptsUpdates_Rollback)**
>
> legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development

I suggest building the applicaiton together with legato.cwe image:

> [@Application no longer available after a certain time](https://forum.legato.io/t/application-no-longer-available-after-a-certain-time/4546/5):
>
> It is possible to get rollbacks even after an application is marked good. The only way to completely remove the possibility of your app being removed is to compile a new ‘master firmware’ which includes your app.

> [@Flash size wp7607](https://forum.legato.io/t/flash-size-wp7607/3805/35):
>
> you can go to legato-19.02.0/modules/WiFi/wifi.sdef, under “apps:” section, add e.g. $LEGATO\_ROOT/apps/sample/helloWorld/helloWorld.adef [image] Now the new app will be included in legato.cwe. Please also note that the max size for legato partition is 8MB.

---

<div class="post-metadata">

**Author:** ![MVAJGER](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@MVAJGER](https://forum.legato.io/u/MVAJGER)\
**Post date:** [September 12, 2023, 11:39am UTC](https://forum.legato.io/t/automatic-device-resets/6581/3 "2023-09-12T11:39:11Z")

</div>

Hello, is it always 2 directories under /legato/systems/ ? I only have 1; current

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [September 12, 2023, 2:56pm UTC](https://forum.legato.io/t/automatic-device-resets/6581/4 "2023-09-12T14:56:40Z")

</div>

if you install some application to module, it will have one more folder.  
After that if you type “update -g” to mark the system to be good, it will only have one directory:

```auto

root@swi-mdm9x28-wp:~# legato version
19.11.6_225ac9b7882467c5c7f9e0bf4cdb5523
root@swi-mdm9x28-wp:~# ls /legato/systems/
current
root@swi-mdm9x28-wp:~# update /tmp/hello1.wp76xx_swi-wp76_5.0.0.update
Unpacking package: 100% ++++++++++++++++++++++++++++++++++++++++++++++++++
Applying update: 100% ++++++++++++++++++++++++++++++++++++++++++++++++++
SUCCESS
root@swi-mdm9x28-wp:~# app status
[running] atAirVantage
[running] atQmiLinker
[running] atService
[running] audioService
[running] avcService
[running] cellNetService
[running] dataConnectionService
[running] fwupdateService
[running] gpioService
[running] modemService
[running] portService
[running] positioningService
[running] powerMgr
[running] qmiAirVantage
[running] secStore
[stopped] smsInboxService
[stopped] spiService
[stopped] tools
[stopped] voiceCallService
[stopped] wifi
[stopped] wifiApTest
[stopped] wifiClientTest
[running] wifiService
[stopped] wifiWebAp
[running] hello1

root@swi-mdm9x28-wp:~# legato status
Systems installed:
  42 [good]
  43 [tried 1] <-- current
Legato framework is running.

root@swi-mdm9x28-wp:~# ls /legato/systems/
42 current

root@swi-mdm9x28-wp:~# update -g
System is now marked 'Good'.
root@swi-mdm9x28-wp:~# ls /legato/systems/
current

```
