2/24/2012

Android WM8650 : Backup settings / env_uboot before flash (ubootnfo.sh)

Use any terminal emulator such a ConnectBot to extract these values:

wmtenv get touchcodec (older ROMs use this)
wmtenv get wmt.model.no
wmtenv get wmt.audio.i2s
wmtenv get wmt.gpt.gsensor
wmtenv get wmt.bus.i2c
wmtenv get wmt.sys.keypad
wmtenv get wmt.display.param
wmtenv get wmt.display.tmr 
wmtenv get wmt.display.pwm 
wmtenv get wmt.io.mxcgsensor 
wmtenv get wmt.io.gsensor
wmtenv get wmt.io.touch
wmtenv get wmt.vt160x.bat
wmtenv get wmt.io.ts.2dcal 

If all options of Uberoid fail, you can mod the env_uboot file now yourself with the proper settings! Just be sure to pick the right kernel (else cam/hibernation will fail)

Or try this script out using ScriptManager or Gscript from the market:

ubootnfo.sh:

Code: [Select]
#!/bin/sh
echo "wmt.model.no:" >>/LocalDisk/ubootnfo.txt;
wmtenv get wmt.model.no >>/LocalDisk/ubootnfo.txt;
echo "wmt.audio.i2s" >>/LocalDisk/ubootnfo.txt;
wmtenv get wmt.audio.i2s >>/LocalDisk/ubootnfo.txt;
echo "wmt.gpt.gsensor" >>/LocalDisk/ubootnfo.txt;
wmtenv get wmt.gpt.gsensor >>/LocalDisk/ubootnfo.txt;
echo "wmt.bus.i2c" >>/LocalDisk/ubootnfo.txt;
wmtenv get wmt.bus.i2c >>/LocalDisk/ubootnfo.txt;
echo "wmt.sys.keypad" >>/LocalDisk/ubootnfo.txt;
wmtenv get wmt.sys.keypad >>/LocalDisk/ubootnfo.txt;
echo "wmt.display.param" >>/LocalDisk/ubootnfo.txt;
wmtenv get wmt.display.param >>/LocalDisk/ubootnfo.txt;
echo "wmt.display.tmr" >>/LocalDisk/ubootnfo.txt;
wmtenv get wmt.display.tmr >>/LocalDisk/ubootnfo.txt;
echo "wmt.display.pwm" >>/LocalDisk/ubootnfo.txt;
wmtenv get wmt.display.pwm >>/LocalDisk/ubootnfo.txt;
echo "wmt.io.mxcgsensor" >>/LocalDisk/ubootnfo.txt;
wmtenv get wmt.io.mxcgsensor >>/LocalDisk/ubootnfo.txt;
echo "wmt.io.gsensor" >>/LocalDisk/ubootnfo.txt;
wmtenv get wmt.io.gsensor >>/LocalDisk/ubootnfo.txt;
echo "wmt.io.touch" >>/LocalDisk/ubootnfo.txt;
wmtenv get wmt.io.touch >>/LocalDisk/ubootnfo.txt;
echo "wmt.vt160x.bat" >>/LocalDisk/ubootnfo.txt;
wmtenv get wmt.vt160x.bat >>/LocalDisk/ubootnfo.txt;
echo "wmt.io.ts.2dcal" >>/LocalDisk/ubootnfo.txt;
wmtenv get wmt.io.ts.2dcal >>/LocalDisk/ubootnfo.txt;
echo "Touchcodec:" >>/LocalDisk/ubootnfo.txt;
wmtenv get touchcodec >>/LocalDisk/ubootnfo.txt;
NOTE: Not all values will have output! That's OK :)


Also WMT provides a script for this!

envlog.sh:
Code: [Select]
#!/bin/sh

# Display all boot settings in 'one-line' style
# for internal debug purpose.
#
# Written by Vincent Chen <vincentchen@wondermedia.com.tw>

for f in `find $1 -name "uboot_env_*" | sort`
do
  printf "\$cat $f\n\n"
  cat $f |tr '\n' '~'|sed 's/\\\~//g'|tr '~' '\n'|\
      sed 's/  //g'|sed '/^$/d'
  echo
done

No comments:

Post a Comment