Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

TI Android DevKit Factory Reset Alternative Approach

From Texas Instruments Wiki
Jump to: navigation, search

What is Factory Reset in Android ? What is does ?

  • The feature "factory reset" - will erase all the data on android powered device. It will wipe all the data from the internal storage of the device and return it to the default factory settings. The data could be
    • google account
    • system and application data
    • custom settings
    • downloaded applications.

In addition, one can also choose to erase external storage (SD card). After the factory reset is complete; device will operate in the same way it did the first time one turned it on. One has to re-install all of data and applications back onto the device.

  • On any android powered device factory reset feature is located in settings application. Traditionally it will be at "settings->backup & reset->factory data reset", but it may very device to device

Why Factory Reset?

Feature is useful in following conditions

  • Malfunctioning device (resetting the device to original settings may fix numerous issues)
  • Wipe personal data off before selling
  • Returning it to manufacturer or retailer and want all personal data removed

Feature Integration to TI Android DevKit

Important Note

  • This wiki describes an alternative approach for implementing factory reset feature. Mentioned approach is quick to integrate, however it does stand for comparison for default or other available approaches that are exits. Every approach has its unique way of achieving desired actions.
  • Also, this wiki does not hold any claim on comparison or complexity improvement of described approach over exiting solutions.

Basic Design

Kindly find following flow diagram of alternative approach for factory reset feature for Android DevKit.


Integrate Patch

factory-reset service

  • To download source of factory reset service click here
/* go to <android-src>/external directory */
$cd <android-src>/external

/* copy downloaded source to current directory */
$cp <download-location>/TI_Android_DevKit_Factory-Reset.tar.gz .

/* untar downloaded source here */
$tar -xzvf TI_Android_DevKit_Factory-Reset.tar.gz

modify init.rc file

  • To download required patch file click here
  • Apply patch
/* go to user directory */
$cd <MY_DIR>

/* extract downloader patch files */
$tar -xzvf Patch_init_rc_factoryreset.tar.gz

/* go to device directory */
$cd <android-src>/device/ti/<platform>

/* apply below patch to kernel */
$patch -pl < <MY_DIR>/init_rc-factory-reset-changes.patch
  • Note : patch has been generated with respect to "<android-src>/device/ti/am335xevm/init.rc". If one has changed this file then patch will not gets applied out of box. It needs to be integrated manually

Build Android and Prepare Images

  • After applying above patches, kindly do full build of android
  • For the build procedure and preparing images refer to - DevKit developer guide

Feature Validation

  • Go to home->app launcher->settings
  • Changes the settings like sound, display, language etc..
  • Go to settings->backup & reset->factory data reset
  • It will prompt the message & after clicking erase everything, it will restart the device
  • On restart, factory-service what we have added, will erase required things to achieve factory-reset functionality.

What to do before Factory Reset?

Followings are the recommendation actions from user perspective before using this feature

  • Backup any important files to PC or external storage
  • Make sure contacts ( if exists) are synced with Gmail/Any other social account
  • Make a log of apps one may want to reinstall after reset

Assumption and Further Scope

  • Feature implementation assumed - /data & /cache – are the directories on emmc/mmc not the partitions.
  • If vendor is using separate partitions for these locations, then one need to modified following :
function# erase_data
For more details, kindly read comments mentioned for this function.


Technical Support and Product Updates

For further information or to report any problems, contact or
For community support join
For IRC #rowboat on
To raise any defect for this release please use