Friday, September 23, 2011

Acer Iconia A100 - Recovery

As of this writing there is no any official ROM available for Acer Iconia A100. In case you turned it into a brick like I did, you can try the following to recover it.

Update (2011-10-19): There are few official ROMs posted in XDA. I have tried to recovery my A100 (Build version Acer_A100_1.014.08_COM_GEN1) without issue. Recommend to use this ROM instead.



Bare-bones Restore

ROM "Acer_A100_1.022.02_AAP_CUS4"
You can download it from this link (click "联通下载" or "电信下载"), the source is this URL.


This is a Chinese ROM and includes other locales, the majority of packages are version 3.2-1313484170. Please note this ROM does not include common Google packages (Market, MyApps, etc).

Extract the rar file and save the update.zip into the root of a microSD. Use the microSD to recover A100 (hold the volume up key and turn on the tablet, release the volume up key once it starts recovering).

Once it finishes, the tablet should come back to life, at least! Next, do a Tablet erase to have a clean start and establish WiFi connection.



Google Apps Pre-requisite 

System Dump
Download it from this link, the source is this URL.

Most of the packages are version 3.2-150265. Unzip it, we need the app folder, save the app folder to your preferred location in your PC (e.g. /a100/app)


Android SDK
Follow the instructions from android.com.
You need it to install packages. To make life a bit easier, append the following line to the $PATH environment variable in /root/.profile, if you use Linux:
PATH=$PATH:/opt/android-sdk-linux_x86/platform-tools/


Root
You already know how to do it, otherwise you wouldn't ruin your A100. Just follow this thread, then install Superuser and Root Explorer afterward.


Titanium Backup
Install Titanium Backup and take full backup of existing apps.



Packages Comparison

3.2-1313484170 (Acer_A100_1.022.02_AAP_CUS4) 3.2-150265 (System Dump - /app)
AcerAbout.apk AcerAbout.apk
AcerClockWidget.apk AcerClockWidget.apk
AcerDLNA.apk AcerDLNA.apk
AcerNetworkLocation.apk
AcerNidus.apk AcerNidus.apk
AcerOneTimeInit.apk AcerOneTimeInit.apk
AcerRegistration.apk AcerRegistration.apk
AcerSync.apk AcerSync.apk
AcerSyncHelper.apk AcerSyncHelper.apk
AdobeFlashPlayer.apk AdobeFlashPlayer.apk
AgendaWidget.apk AgendaWidget.apk
ApInAp.apk ApInAp.apk
ApplicationsProvider.apk ApplicationsProvider.apk
Aupeo.apk Aupeo.apk
Bluetooth.apk Bluetooth.apk

BooksTablet.apk
Browser.apk Browser.apk
Calculator.apk Calculator.apk

CalendarGoogle.apk
Calendar.apk
CalendarProvider.apk CalendarProvider.apk
Camera.apk Camera.apk
CertInstaller.apk CertInstaller.apk

ChromeBookmarksSyncAdapter.apk
Clearfi.apk Clearfi.apk
Contacts.apk Contacts.apk
ContactsProvider.apk ContactsProvider.apk
DTG.apk
DefaultContainerService.apk DefaultContainerService.apk
DeskClock.apk DeskClock.apk
DigitalClockWidget.apk DigitalClockWidget.apk
DownloadProvider.apk DownloadProvider.apk
DownloadProviderUi.apk DownloadProviderUi.apk
DrmProvider.apk DrmProvider.apk

DTG.apk
Email.apk Email.apk
Exchange.apk Exchange.apk
FDUpdater.apk FDUpdater.apk

Finsky.apk
FWupdateService.apk FWupdateService.apk
Gallery3D.apk

GalleryNew3DGoogle.apk


GameLoftStore.apk

Gmail.apk

GoogleBackupTransport.apk

GoogleCalendarSyncAdapter.apk

GoogleContactsSyncAdapter.apk

GoogleFeedback.apk

GoogleLoginService.apk

GooglePartnerSetup.apk

GoogleQuickSearchBox.apk

GoogleServicesFramework.apk
HTMLViewer.apk HTMLViewer.apk
LatinIME.apk

LatinImeGoogle.apk
Launcher2.apk Launcher2.apk

LinkToFacebook.apk
LiveWallpapersPicker.apk LiveWallpapersPicker.apk
LumiRead.apk
MagicSmokeWallpapers.apk MagicSmokeWallpapers.apk

Maps.apk

MarketUpdater.apk
MediaProvider.apk MediaProvider.apk

MediaUploader.apk
Music.apk

Music2.apk

MusicA.apk

MyLocationWidget.apk
nemoPlayer.apk nemoPlayer.apk

NetworkLocation.apk

OneTimeInitializer.apk
PackageInstaller.apk PackageInstaller.apk
Phone.apk Phone.apk
PicoTts.apk PicoTts.apk

Planner.apk
Provision.apk
QuickSearchBox.apk
Settings.apk Settings.apk
SettingsProvider.apk SettingsProvider.apk

SetupWizard.apk

SocialJogger.apk
Solitaire.apk Solitaire.apk
SoundRecorder.apk SoundRecorder.apk

Street.apk
SystemUI.apk SystemUI.apk

Talk.apk

TegraZone.apk
TelephonyProvider.apk TelephonyProvider.apk
TtsService.apk TtsService.apk
UserDictionaryProvider.apk UserDictionaryProvider.apk
VG_baidumobile.apk
VG_baidusearch.apk
VG_droidreader.apk
VG_gomarket.apk
VG_mapbar.apk
VG_mochi.apk
VG_qiyi.apk
VG_qq.apk
VG_qqlord.apk
VG_renren.apk
VG_sinanews.apk
VG_sinaweibo.apk
VG_sohu.apk
VG_straightflush.apk
VG_tudou.apk

Vending.apk

VideoEditorGoogle.apk

Videos.apk
VisualizationWallpapers.apk VisualizationWallpapers.apk
VoiceRecorder.apk VoiceRecorder.apk

VoiceSearch.apk

WeatherWidget.apk

xt9.apk

YouTubeTablet.apk

Package (Pink) - Packages removed
Package (Light Blue) - Packages installed
Package (Red) - Not able to install (incompatible?)


Cleaning Up
Before I started adding any packages, I did a clean up of bloatware and packages that I don't need through Titanium Backup. Refer to the left column of the table above (Packages in pink colour). Up to this point your A100 should be in a pretty good state (i.e. no any pop-up application errors).


Install Google Apps

Connect A100
Connect A100 to your computer with an USB cable. Make sure the settings below (Setting > Applications):
- USB debugging is enabled
- Unknown sources is allowed

From the SDK, confirm if it can communicate with your A100:
vpcp115kg ~ # adb kill-server
vpcp115kg ~ # adb start-server
vpcp115kg ~ # adb devices
List of devices attached
37c61xxxxxxxxxx device


RW /system

From the SDK, remount the A100 /system into rw mode:
vpcp115kg ~ # adb remount
remount failed: Operation not permitted

If it failed, try the following commands:
vpcp115kg ~ # adb shell
$ su -
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# chmod 777 /system/app
# exit
$ exit
vpcp115kg ~ #


Google Services

From the SDK, install the following apk:
vpcp115kg ~ # cd /a100/app

Install GoogleLoginService:
vpcp115kg ~ # adb install GoogleLoginService.apk

vpcp115kg ~ # adb push GoogleLoginService.apk /system/app
Install GoogleServicesFramework:
vpcp115kg ~ # adb install GoogleServicesFramework.apk
vpcp115kg ~ # adb push GoogleServicesFramework.apk /system/app
vpcp115kg ~ # adb reboot

Once rebooted, the Google Account option should be available under Settings > Account & sync > + Add account
Add your Google account and confirm the connection succeeds before continue.


Install GoogleCalendarSyncAdapter:
vpcp115kg ~ # adb install GoogleCalendarSyncAdapter.apk
vpcp115kg ~ # adb push GoogleCalendarSyncAdapter.apk /system/app
Install GoogleContactsSyncAdapter:
vpcp115kg ~ # adb install GoogleContactsSyncAdapter.apk
vpcp115kg ~ # adb push GoogleContactsSyncAdapter.apk /system/app
Install Gmail:
vpcp115kg ~ # adb install Gmail.apk
vpcp115kg ~ # adb push Gmail.apk /system/app

The options of Sync Calendar, Sync Contact and Sync Gmail should appear under Settings > Account & sync. Test the synchronisation before continue.
 
Install GoogleQuickSearchBox:
vpcp115kg ~ # adb install GoogleQuickSearchBox.apk
vpcp115kg ~ # adb push GoogleQuickSearchBox.apk /system/app
Install MarketUpdater:
vpcp115kg ~ # adb install MarketUpdater.apk
vpcp115kg ~ # adb push MarketUpdater.apk /system/app
Install Finsky (Market):
vpcp115kg ~ # adb install Finsky.apk
vpcp115kg ~ # adb push Finsky.apk /system/app
Install Vending:
vpcp115kg ~ # adb install Vending.apk
vpcp115kg ~ # adb push Vending.apk /system/app
Install YouTubeTablet:
vpcp115kg ~ # adb install YouTubeTablet.apk
Install Maps:
vpcp115kg ~ # adb install Maps.apk
Install Talk:
vpcp115kg ~ # adb install Talks.apk
Install Street:
vpcp115kg ~ # adb install Street.apk


Your tablet should now back to fully functional.







Monday, September 12, 2011

Linux Mint 11 "Katya" on VAIO P - VPCP115KG Part 5 (Experimental)

Aligning Filesystems
As the erase block size has been identified, in order to align with it, the previous partitions / volumes configuration are reconfigured.


Proposed Disk Layout
Partition / Volume Size Remark
/dev/vg00/lv00 9216MB / partition in LV (576 LE)
/dev/sda1 256MB /boot partition
/dev/vg00/lv01 1024MB swap partition (64 LE)
/dev/vg00/ev00 16GB encrypted 16GB partition in LV (1000 LE)
/dev/vg00/lv02 32224MB /data partition in LV (3072 LE)
free space
144 LE free space for snapshot


Factory CHS & Partition Table
I don't bother with the default CHS, instead I create a /boot partition after the first 16MB erase block, both the size of sda1 & sda2 are divisible by 16.
# sfdisk -luM /dev/sda
 
Disk /dev/sda: 7783 cylinders, 255 heads, 63 sectors/track
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start   End    MiB    #blocks   Id  System
/dev/sda1   *    16    271    256     262144   83  Linux
/dev/sda2       272  61055  60784   62242816   8e  Linux LVM
/dev/sda3         0      -      0          0    0  Empty
/dev/sda4         0      -      0          0    0  Empty

# sfdisk -luS /dev/sda
Disk /dev/sda: 7783 cylinders, 255 heads, 63 sectors/track
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/sda1   *     32768    557055     524288  83  Linux
/dev/sda2        557056 125042687  124485632  8e  Linux LVM
/dev/sda3             0         -          0   0  Empty
/dev/sda4             0         -          0   0  Empty



Partitioning
Create a LVM physical volume:
# lvm pvcreate --dataalignment 16384k /dev/sda2
Confirm if the PV is properly aligned:
# pvs -o +pe_start
  PV         VG   Fmt  Attr PSize  PFree 1st PE
  /dev/sda2  vg00 lvm2 a-   59.34g 2.25g  16.00m 

Create a LVM volume group:
# lvm vgcreate -s 16 vg00 /dev/sda2
Confirm the PE size of the logical volume:
# lvm vgdisplay /dev/vg00 | grep 'PE Size'
  PE Size               16.00 MiB 

Create a / volume (576 LE x 16):
# lvm lvcreate -n lv00 -L 9216 /dev/vg00
Create a swap volume (64 LE x 16):
# lvm lvcreate -n lv01 -L 1024 /dev/vg00
Create a volume for LUKS (1000 LE x 16):
# lvm lvcreate -n ev00 -L 16000 vg00
Create a volume for /data (2014 LE):
# lvm lvcreate -n lv02 -l 2014 /dev/vg00

Create an ext4 /boot partition:
# mkfs.ext4 -E stripe-width=16384 -b 1024 /dev/sda1
Create an ext4 / volume:
# mkfs.ext4 -E stripe-width=4096 -b 4096 /dev/vg00/lv00
Activate swap partition:
# mkswap /dev/vg00/lv01
Create an ext4 LUKS volume (refer to Part 1 on how to create it):
# mkfs.ext4 -E stripe-width=4096 -b 4096 /dev/mapper/ev00
Create an ext4 /data volume:
# mkfs.ext4 -E stripe-width=4096 -b 4096 /dev/vg00/lv02


Restore
Refer to Part 2 on how to restore the data as well as the boot loader, when necessary.


I/O Scheduler

Edit /etc/rc.local and add the lines highlighted in blue below:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

echo deadline > /sys/block/sda/queue/scheduler
echo 1 > /sys/block/sda/queue/iosched/fifo_batch

exit 0





Everything should be aligned to 16MB erase block, hopefully.




Linux Mint 11 "Katya" on VAIO P - VPCP115KG Part 4

Flashbench
In order to find out the erase block size of bundled 64GB SSD, SanDisk pSSD-P2, different tests were conducted using flashbench. All tests were ran under Linux Mint 11, booted from an USB flash:

mint ~ # uname -a
Linux mint 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux


The following are few offset test results:

Random write test with 16MB erase size










Sequential write test with 16MB erase size










Random write test with 32MB erase size











Sequential write test with 32MB erase size












Various tests were performed and showed the erase block size is 16MB. Thank you for the help and assistance from Arnd Bergmann, the coder of flashbench. Other figures are posted in Linaro.org.