2011年4月25日星期一

Flash NVidia Tegra APX device

IDK what knowledge (in case of eLocity A7) have Koush, but i'm trying to allocate all info about hard-flashing process here.

------------------------------------------------------------------------

1. Recovery

eLocity A7 has Android System Recovery <1e>. According info from official update: recovery.img will flash to partition named "SOS"
To get into recovery you should:
- turn Tablet off
- quickly turn on and release power-button (notice green light)
- press power again and hold till text "Booting recovery kernel image"
- if you hold longer your Tablet will turn off)

2. ADB (Android Debug Bridge)

2.1 Cable
Ensure you have USB Cable A-A like in attached image
http://forum.xda-developers.com/attachment.php?attachmentid=530427&stc=1&d=1298973504

2.2 Drivers
Ensure you have Android SDK Tools. If you have SDK Tools already you could start from section "Modifying drivers"

2.2.1 Installing SDK Tools
- Download it from http://developer.android.com/sdk/index.html
- Unpack it to (avoid long-names and desktop-folders; good folder: c:\asdk)
- Run "sdk manager.exe"
- From "Android repository" download "Android SDK Platform-tools"
- From "Third-party Add-ons / Google Inc. add-ons" download "Google USB Driver package"
- Exit from SDK Manager

2.2.2 Modifying drivers
- Go to /google-usb_driver
- Find android_winusb.inf and edit it
- Add following to both sections [Google.NTx86] and [Google.NTamd64]
;NVIDIA Tegra
%SingleAdbInterface% = USB_Install, USB\VID_0955&PID_7000
%CompositeAdbInterface% = USB_Install, USB\VID_0955&PID_7100&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0955&PID_7100
- Save and exit
- Run Windows command-promt and type
echo 0x955 >> "%USERPROFILE%\.android\adb_usb.ini"

2.3 Switch modes
eLocity A7 has USB-Host "out-of-box", but it can be converted to simple USB

- Ensure you have Root Explorer
- Run it and go to /data/data
- Create folder name com.compal.usb_otg
- Go into and make file usb.txt
- In usb.txt write 0
- Connect tablet to PC with USB Cable A-A
- Reboot (tablet can switch modes only while rebooting)

Note: 
0 - USB Slave mode
1 - USB Host mode

2.4 Checking ADB
- If you done steps above correctly Windows would search adb-drivers. Point them at /google-usb_driver
- Check connection by running adb from /platform-tools
adb devices
If it returned serial number you have success

3. APX mode

3.1 Getting Nvidia Tools
- Go to http://developer.nvidia.com/tegra/devkit-250tango and download "Android 2.2 (Froyo) for Tegra 250 & Tango ONLY" (one or both Windows/ Linux)
Speedlinks (NVidia updated tools 7 feb 2011, so links would change in future)
Windows: http://developer.download.nvidia.com/tegra/files/os/tegra_froyo_20110207.msi
Linux: http://developer.download.nvidia.com/tegra/files/os/tegra_froyo_20110207.run.gz
- [WIN] Install it in (default it is there C:\Program Files\NVIDIA Corporation\tegra_froyo_20110207) 

3.2 Running into APX
- Connect to PC (remember: in USB Slave mode and with Cable A-A)
- Run following command in terminal emulator
echo 1 >/proc/naz10_diag/force_recovery
- Tablet should reboot into APX
- If you've connected properly Windows should search another drivers
- Point them to /usbpcdriver

3.3 Getting partitions
- Go to
- Run nvflash-command to get into bootloader. I used stock bootloader from elocity official update. I didn't use bootloader from .
nvflash --bl bootloader.bin --go
- Tablet should write something at screen (recovery mode bla-bla)
- Run nvflash-command to get list of partitions
nvflash -r --getpartitiontable partitiontable.txt
- I have last official update and in partitiontable.txt "SOS"-partition has number 6
- Run nvflash-command to get specified X partition
nvflash -r --read X part-X.img

I successfully got partition number 6 and it is about 8 MB
I got partition "APP" (with number 9) and it is about 500 Mb - i think our system image can be extended ;)
nvflash has command "--download N filename". It downloads partition filename to N. But i'm afraid to experiments, cause don't have warranty
------------------------------------------------------------------------

Things to investigate

- Running into APX-mode with hardware-buttons. I don't know how it can be. Viewsonic GTablet owners have to press VolumeDown and Power to get into. But our Tablet doesn't have VolumeDown. I tried Volume already but it seems that this button starts working after system was loaded.
Without this method we have only two methods to restore:
1) If tablet is booting properly -> nvflash
2) If tablet won't boot -> recovery

- Custom recovery. It would be great if Koush will realize it. Last step left)
------------------------------------------------------------------------
Thanks to
- greenar
- Dexter_nlb
- nicofs (he added info about nvflash to toshiba ac100 wiki)