[DEV] Check the Bootloader - Acer Iconia A500

As I've posted in another thread (http://forum.xda-developers.com/showthread.php?t=1056783) I weren't able to flash my CWM for the A500.
This message appeared in the upper left corner of the device (while showing the acer logo):
Code:
secure boot: image SOS checksum fail!
Now we need to find hints that could reveal what causes this and how we can fix it or avoid this.
Regards,
Tim

I'm very keen on getting this to work, I was thinking about writing acer about unlockng the bootloader (as asus and motorola have), also about src code under the GPL.
Not sure how much luck I would have lol
In the past how did we get around a locked boot loader?

I wrote them a message this morning... waiting.....

Perhaps these links could help?
http://tegradeveloper.nvidia.com/tegra/forum/workaround-run-ubuntu-now
maybe then we can use this command?
fastboot oem unlock
and I found a wiki on how to split the images and recreate them, again not sure if its useful at all.
http://tinyurl.com/39xaqtq
Sorry if they don't!

we cant enter fastboot mode its one of the main problems...

right according to the link at tegra forums you have to add it to the boot/recovery.img which is half the problem since its signed?
just shooting arrows at the wall and seeing what sticks!

what about booting the recovery from a script at kernel startup...?
a good example of this is SE X10 bootloader is locked as hell with a 1024bit encryption key that checks the kernel for key too and what has been done is hijacking the charger(this is the script that is responsible for booting the phone into a charging mode instead of loading android) script and booting the recovery if a button is pressed

this sounds interesting but I'm not known to that technique yet.
we could perhaps use fakeflash, too.
Sent from my Nexus S using Tapatalk

Bootloader seems to be encrypted
Seems like the BL is encrypted...
According to the partition table, BL should be placed @0x180000 on /dev/mmcblk0
But there seems to be encrypted stuff. I think the algorithm described in this patent is used:
faqs.org/patents/app/20100070743
--> Encrypted using SBK
According to [0027], the SBK may be flushed from the keylot in the encryption engine by the BL..
I hope acer just forgot to implement this ^^

Anyone know what kind of signature it is? 'Checksum' tells me it might be CRC, which would be just for integrity and easially spoofed.

I think the checksum starts at +0x240 and seems to have 20 bytes. Any idea what this could be?
Edit: could be sha1
Edit2: It is SHA-1..

sc2k said:
I think the checksum starts at +0x240 and seems to have 20 bytes. Any idea what this could be?
Edit: could be sha1
Edit2: It is SHA-1..
Click to expand...
Click to collapse
0x240 is the offset into the header of the id element used for writing the SHA1 signature as defined in the bootimage.h and written by the mkbootimage program in the sdk. Nothing new here. Look at the bootimage.h
Code:
#define BOOT_MAGIC "ANDROID!"
#define BOOT_MAGIC_SIZE 8
#define BOOT_NAME_SIZE 16
#define BOOT_ARGS_SIZE 512
struct boot_img_hdr
{
unsigned char magic[BOOT_MAGIC_SIZE];
unsigned kernel_size; /* size in bytes */
unsigned kernel_addr; /* physical load addr */
unsigned ramdisk_size; /* size in bytes */
unsigned ramdisk_addr; /* physical load addr */
unsigned second_size; /* size in bytes */
unsigned second_addr; /* physical load addr */
unsigned tags_addr; /* physical addr for kernel tags */
unsigned page_size; /* flash page size we assume */
unsigned unused[2]; /* future expansion: should be 0 */
unsigned char name[BOOT_NAME_SIZE]; /* asciiz product name */
unsigned char cmdline[BOOT_ARGS_SIZE];
unsigned id[8]; /* timestamp / checksum / sha1 / etc */
};

The actual checksum must be somewhere else.. flashing a working boot.img from mmcblk0p2 to mmcblk0p1 will also result in the SOS message.
If the checksum is somewhere outside it must be written by recovery.. there is some interesting code where recovery writes 4x 16 Bytes to mmcblk0p7 @0x84 after installation succeeded. It's 4x the same pattern but in my dump other data is shown there.
Any ideas what this could be?
Btw: mmcblk0p5 also has some boot flags. E.g. you can enable a tty console by calling:
$ su
$ misc_command debug on
This will modify mmcblk0p5. After reboot console=... Is appended to your boot options .
Entering recovery mode will reset the debug flag.

sc2k said:
The actual checksum must be somewhere else.. flashing a working boot.img from mmcblk0p2 to mmcblk0p1 will also result in the SOS message.
Click to expand...
Click to collapse
I believe that each partition has a different valid checksum. So something that passes the check for mmcblk0p2 does not pass for mmcblk0p1. There must be list of partitions and associated checksums somewhere.

heres the log from the last update...
Code:
Starting recovery on Tue Jun 7 11:01:19 2011
can't open /dev/tty0: No such file or directory
framebuffer: fd 3 (1280 x 800)
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /system ext4 /dev/block/mmcblk0p3 (null) 0
2 /data ext4 /dev/block/mmcblk0p8 (null) 0
3 /cache ext4 /dev/block/mmcblk0p4 (null) 0
4 /misc emmc /dev/block/mmcblk0p5 (null) 0
5 /flex ext4 /dev/block/mmcblk0p6 (null) 0
6 /mnt/sdcard vfat /dev/block/mmcblk1p1 (null) 0
7 /boot emmc /dev/block/mmcblk0p2 (null) 0
8 /aboot emmc /dev/block/mmcblk0p8 (null) 0
9 /recovery emmc /dev/block/mmcblk0p1 (null) 0
I:Got arguments from boot message
Command: "recovery" "--update_package=SDCARD:update.zip"
(replacing path "SDCARD:update.zip" with "/mnt/sdcard/update.zip")
ro.secure=1
ro.allow.mock.location=0
ro.debuggable=0
persist.service.adb.enable=0
ro.build.id=HRI66
ro.build.display.id=Acer_A500_1.139.01_COM_GEN1
ro.build.system.id=Acer_A500_1.139_COM_GEN1
ro.build.version.incremental=eng.hermit.20110511.221202
ro.build.version.sdk=11
ro.build.version.codename=REL
ro.build.version.release=3.0.1
ro.build.date=Wed May 11 22:12:55 CST 2011
ro.build.date.utc=1305123175
ro.build.type=user
ro.build.user=hermit
ro.build.host=apple
ro.build.tags=release-keys
ro.product.model=A500
ro.product.brand=acer
ro.product.name=picasso_generic1
ro.product.device=ventana
ro.product.board=ventana
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=Acer
ro.product.locale.language=en
ro.product.locale.region=US
ro.wifi.channels=
ro.board.platform=tegra
ro.build.product=ventana
ro.build.description=picasso_generic1-user 3.0.1 HRI66 eng.hermit.20110511.221202 release-keys
ro.build.fingerprint=acer/picasso_generic1/ventana:3.0.1/HRI66/eng.hermit.20110511.221202:user/release-keys
ro.build.characteristics=tablet,nosdcard
ro.opengles.version=131072
wifi.interface=wlan0
keyguard.no_require_sim=1
ro.dinfo.version=1.0
ro.cpu.vendor=nVidia
ro.cpu.speed=1.0 GHz
ro.cpu.version=T20
ro.config.notification_sound=OnTheHunt.ogg
ro.config.alarm_alert=Alarm_Classic.ogg
dalvik.vm.heapstartsize=5m
dalvik.vm.heapgrowthlimit=48m
dalvik.vm.heapsize=256m
ro.com.google.clientidbase=android-acer
acer.sync.adb.mode=ENABLED
ro.com.google.gmsversion=3.0_r5
ro.setupwizard.mode=REQUIRED
dalvik.vm.dexopt-flags=m=y
net.bt.name=Android
net.change=net.bt.name
dalvik.vm.stack-trace-file=/data/anr/traces.txt
ro.factorytest=0
ro.bootmode=unknown
ro.baseband=unknown
ro.carrier=unknown
ro.bootloader=unknown
ro.ram.size=1GB
ro.hardware=ventana
ro.revision=0
init.svc.recovery=running
E:/dev/block/mmcblk1 does exist
Finding update package...
I:Update location: /mnt/sdcard/update.zip
Opening update package...
I:1 key(s) loaded from /res/keys
Verifying update package...
I:comment is 1690 bytes; signature 1672 bytes from end
I:whole-file signature verified
I:verify_file returned 0
Installing update...
Verifying current system...
partition read matched size 3043328 sha 23917956b398554dc14fe6c2d86ab3e358bfba5c
Removing unneeded files...
applying patch to /system/app/AccountAndSyncSettings.apk
target 2646 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/ApplicationsProvider.apk
target 6948 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/Bluetooth.apk
target 71682 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/Browser.apk
target 824116 bytes; free space 160763904 bytes; retry 1; enough 1
Patching system files...
applying patch to /system/app/Calculator.apk
target 42343 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/CalendarProvider.apk
target 11855 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/CertInstaller.apk
target 20049 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/Contacts.apk
target 588436 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/ContactsProvider.apk
target 10594 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/DefaultContainerService.apk
target 4118 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/DownloadProvider.apk
target 26496 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/DownloadProviderUi.apk
target 32560 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/DrmProvider.apk
target 6498 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/FDUpdater.apk
target 794799 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/HTMLViewer.apk
target 4262 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/Launcher2.apk
target 26757819 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/LiveWallpapersPicker.apk
target 126452 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/MagicSmokeWallpapers.apk
target 212304 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/MediaProvider.apk
target 10776 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/PackageInstaller.apk
target 29398 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/Phone.apk
target 618972 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/Settings.apk
target 2039503 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/SettingsProvider.apk
target 13385 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/SystemUI.apk
target 727904 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/TelephonyProvider.apk
target 7779 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/TtsService.apk
target 7876 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/UserDictionaryProvider.apk
target 3506 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/VisualizationWallpapers.apk
target 138038 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/bin/debuggerd
target 22240 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/build.prop
target 1770 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/am.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/am.odex
target 29616 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/android.policy.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/android.policy.odex
target 231528 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/android.test.runner.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/android.test.runner.odex
target 196112 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/bmgr.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/bmgr.odex
target 13640 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/bouncycastle.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/bouncycastle.odex
target 934048 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/com.android.location.provider.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/com.android.location.provider.odex
target 7240 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/core-junit.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/core-junit.odex
target 23920 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/core.jar
target 22562 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/core.odex
target 4797712 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/ext.jar
target 101174 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/ext.odex
target 1460952 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/framework-res.apk
target 5116851 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/framework.jar
target 12753 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/framework.odex
target 9118928 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/ime.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/ime.odex
target 6592 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/input.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/input.odex
target 4296 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/javax.obex.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/javax.obex.odex
target 60520 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/monkey.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/monkey.odex
target 88704 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/pm.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/pm.odex
target 27824 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/services.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/services.odex
target 1638968 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/sqlite-jdbc.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/sqlite-jdbc.odex
target 149192 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/svc.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/svc.odex
target 8280 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/lib/libEGL.so
target 95597 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/lib/libandroid_runtime.so
target 600311 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/lib/libbcc.so
target 3944716 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/lib/libcameraservice.so
target 55866 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libgui.so
target 75436 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libhwui.so
target 225596 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libmedia.so
target 423170 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libmedia_jni.so
target 76314 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libmediaplayerservice.so
target 223354 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libmllite.so
target 105436 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libsensorservice.so
target 64192 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libskia.so
target 1026635 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libstagefright.so
target 1645631 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libstagefright_omx.so
target 55098 bytes; free space 160735232 bytes; retry 1; enough 1
applying patch to /system/lib/libstlport.so
target 212915 bytes; free space 160735232 bytes; retry 1; enough 1
applying patch to /system/lib/libui.so
target 83847 bytes; free space 160735232 bytes; retry 1; enough 1
applying patch to /system/lib/libutils.so
target 165943 bytes; free space 160735232 bytes; retry 1; enough 1
applying patch to /system/lib/libvideoeditorplayer.so
target 114224 bytes; free space 160735232 bytes; retry 1; enough 1
applying patch to /system/lib/libwebcore.so
target 7343005 bytes; free space 160735232 bytes; retry 1; enough 1
Patching boot image...
applying patch to EMMC:/dev/block/mmcblk0p2:3043328:23917956b398554dc14fe6c2d86ab3e358bfba5c:3043328:5c7d8b4e98bb083ae8f0d8f585a3aca3a9833d34
partition read matched size 3043328 sha 23917956b398554dc14fe6c2d86ab3e358bfba5c
0 bytes free on /cache (3043328 needed)
error opening /cache/recovery/otatest: No such file or directory
0 regular files in deletable directories
no files can be deleted to free space on /cache
not enough free space on /cache
minzip: Extracted file "/system/etc/install-recovery.sh"
minzip: Extracted file "/system/recovery-from-boot.p"
Unpacking new recovery...
Symlinks and permissions...
Random offset: 0x29f
minzip: Extracted file "/tmp/0"
minzip: Extracted file "/tmp/f"
minzip: Extracted file "/tmp/imei.sh"
about to run program [/system/bin/sh] with 2 args
000000000000000
/tmp/IMEIwithBarcode /tmp/f differ byte 0
No need to do!!
000000000000000
minzip: Extracted file "/tmp/calibration.sh"
minzip: Extracted file "/tmp/calibration_f"
minzip: Extracted file "/tmp/calibration_wrong"
about to run program [/system/bin/sh] with 2 args
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
/tmp/GyroGain /tmp/calibration_wrong differ byte 0
No need to do!!
minzip: Extracted file "/tmp/EC_flash"
minzip: Extracted file "/tmp/ec.rom"
script result was [t]
i have a feeling that EC_flash & ec.rom are actually flasher with bootloader...

thor2002ro said:
heres the log from the last update...
Code:
Starting recovery on Tue Jun 7 11:01:19 2011
can't open /dev/tty0: No such file or directory
framebuffer: fd 3 (1280 x 800)
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /system ext4 /dev/block/mmcblk0p3 (null) 0
2 /data ext4 /dev/block/mmcblk0p8 (null) 0
3 /cache ext4 /dev/block/mmcblk0p4 (null) 0
4 /misc emmc /dev/block/mmcblk0p5 (null) 0
5 /flex ext4 /dev/block/mmcblk0p6 (null) 0
6 /mnt/sdcard vfat /dev/block/mmcblk1p1 (null) 0
7 /boot emmc /dev/block/mmcblk0p2 (null) 0
8 /aboot emmc /dev/block/mmcblk0p8 (null) 0
9 /recovery emmc /dev/block/mmcblk0p1 (null) 0
I:Got arguments from boot message
Command: "recovery" "--update_package=SDCARD:update.zip"
(replacing path "SDCARD:update.zip" with "/mnt/sdcard/update.zip")
ro.secure=1
ro.allow.mock.location=0
ro.debuggable=0
persist.service.adb.enable=0
ro.build.id=HRI66
ro.build.display.id=Acer_A500_1.139.01_COM_GEN1
ro.build.system.id=Acer_A500_1.139_COM_GEN1
ro.build.version.incremental=eng.hermit.20110511.221202
ro.build.version.sdk=11
ro.build.version.codename=REL
ro.build.version.release=3.0.1
ro.build.date=Wed May 11 22:12:55 CST 2011
ro.build.date.utc=1305123175
ro.build.type=user
ro.build.user=hermit
ro.build.host=apple
ro.build.tags=release-keys
ro.product.model=A500
ro.product.brand=acer
ro.product.name=picasso_generic1
ro.product.device=ventana
ro.product.board=ventana
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=Acer
ro.product.locale.language=en
ro.product.locale.region=US
ro.wifi.channels=
ro.board.platform=tegra
ro.build.product=ventana
ro.build.description=picasso_generic1-user 3.0.1 HRI66 eng.hermit.20110511.221202 release-keys
ro.build.fingerprint=acer/picasso_generic1/ventana:3.0.1/HRI66/eng.hermit.20110511.221202:user/release-keys
ro.build.characteristics=tablet,nosdcard
ro.opengles.version=131072
wifi.interface=wlan0
keyguard.no_require_sim=1
ro.dinfo.version=1.0
ro.cpu.vendor=nVidia
ro.cpu.speed=1.0 GHz
ro.cpu.version=T20
ro.config.notification_sound=OnTheHunt.ogg
ro.config.alarm_alert=Alarm_Classic.ogg
dalvik.vm.heapstartsize=5m
dalvik.vm.heapgrowthlimit=48m
dalvik.vm.heapsize=256m
ro.com.google.clientidbase=android-acer
acer.sync.adb.mode=ENABLED
ro.com.google.gmsversion=3.0_r5
ro.setupwizard.mode=REQUIRED
dalvik.vm.dexopt-flags=m=y
net.bt.name=Android
net.change=net.bt.name
dalvik.vm.stack-trace-file=/data/anr/traces.txt
ro.factorytest=0
ro.bootmode=unknown
ro.baseband=unknown
ro.carrier=unknown
ro.bootloader=unknown
ro.ram.size=1GB
ro.hardware=ventana
ro.revision=0
init.svc.recovery=running
E:/dev/block/mmcblk1 does exist
Finding update package...
I:Update location: /mnt/sdcard/update.zip
Opening update package...
I:1 key(s) loaded from /res/keys
Verifying update package...
I:comment is 1690 bytes; signature 1672 bytes from end
I:whole-file signature verified
I:verify_file returned 0
Installing update...
Verifying current system...
partition read matched size 3043328 sha 23917956b398554dc14fe6c2d86ab3e358bfba5c
Removing unneeded files...
applying patch to /system/app/AccountAndSyncSettings.apk
target 2646 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/ApplicationsProvider.apk
target 6948 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/Bluetooth.apk
target 71682 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/Browser.apk
target 824116 bytes; free space 160763904 bytes; retry 1; enough 1
Patching system files...
applying patch to /system/app/Calculator.apk
target 42343 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/CalendarProvider.apk
target 11855 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/CertInstaller.apk
target 20049 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/Contacts.apk
target 588436 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/ContactsProvider.apk
target 10594 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/DefaultContainerService.apk
target 4118 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/DownloadProvider.apk
target 26496 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/DownloadProviderUi.apk
target 32560 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/DrmProvider.apk
target 6498 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/FDUpdater.apk
target 794799 bytes; free space 160763904 bytes; retry 1; enough 1
applying patch to /system/app/HTMLViewer.apk
target 4262 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/Launcher2.apk
target 26757819 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/LiveWallpapersPicker.apk
target 126452 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/MagicSmokeWallpapers.apk
target 212304 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/MediaProvider.apk
target 10776 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/PackageInstaller.apk
target 29398 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/Phone.apk
target 618972 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/Settings.apk
target 2039503 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/SettingsProvider.apk
target 13385 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/SystemUI.apk
target 727904 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/TelephonyProvider.apk
target 7779 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/TtsService.apk
target 7876 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/UserDictionaryProvider.apk
target 3506 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/app/VisualizationWallpapers.apk
target 138038 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/bin/debuggerd
target 22240 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/build.prop
target 1770 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/am.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/am.odex
target 29616 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/android.policy.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/android.policy.odex
target 231528 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/android.test.runner.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/android.test.runner.odex
target 196112 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/bmgr.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/bmgr.odex
target 13640 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/bouncycastle.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/bouncycastle.odex
target 934048 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/com.android.location.provider.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/com.android.location.provider.odex
target 7240 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/core-junit.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/core-junit.odex
target 23920 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/core.jar
target 22562 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/core.odex
target 4797712 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/ext.jar
target 101174 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/ext.odex
target 1460952 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/framework-res.apk
target 5116851 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/framework.jar
target 12753 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/framework.odex
target 9118928 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/ime.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/ime.odex
target 6592 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/input.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/input.odex
target 4296 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/javax.obex.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/javax.obex.odex
target 60520 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/monkey.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/monkey.odex
target 88704 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/pm.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/pm.odex
target 27824 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/services.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/services.odex
target 1638968 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/sqlite-jdbc.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/sqlite-jdbc.odex
target 149192 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/svc.jar
target 313 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/framework/svc.odex
target 8280 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/lib/libEGL.so
target 95597 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/lib/libandroid_runtime.so
target 600311 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/lib/libbcc.so
target 3944716 bytes; free space 160743424 bytes; retry 1; enough 1
applying patch to /system/lib/libcameraservice.so
target 55866 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libgui.so
target 75436 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libhwui.so
target 225596 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libmedia.so
target 423170 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libmedia_jni.so
target 76314 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libmediaplayerservice.so
target 223354 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libmllite.so
target 105436 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libsensorservice.so
target 64192 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libskia.so
target 1026635 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libstagefright.so
target 1645631 bytes; free space 160739328 bytes; retry 1; enough 1
applying patch to /system/lib/libstagefright_omx.so
target 55098 bytes; free space 160735232 bytes; retry 1; enough 1
applying patch to /system/lib/libstlport.so
target 212915 bytes; free space 160735232 bytes; retry 1; enough 1
applying patch to /system/lib/libui.so
target 83847 bytes; free space 160735232 bytes; retry 1; enough 1
applying patch to /system/lib/libutils.so
target 165943 bytes; free space 160735232 bytes; retry 1; enough 1
applying patch to /system/lib/libvideoeditorplayer.so
target 114224 bytes; free space 160735232 bytes; retry 1; enough 1
applying patch to /system/lib/libwebcore.so
target 7343005 bytes; free space 160735232 bytes; retry 1; enough 1
Patching boot image...
applying patch to EMMC:/dev/block/mmcblk0p2:3043328:23917956b398554dc14fe6c2d86ab3e358bfba5c:3043328:5c7d8b4e98bb083ae8f0d8f585a3aca3a9833d34
partition read matched size 3043328 sha 23917956b398554dc14fe6c2d86ab3e358bfba5c
0 bytes free on /cache (3043328 needed)
error opening /cache/recovery/otatest: No such file or directory
0 regular files in deletable directories
no files can be deleted to free space on /cache
not enough free space on /cache
minzip: Extracted file "/system/etc/install-recovery.sh"
minzip: Extracted file "/system/recovery-from-boot.p"
Unpacking new recovery...
Symlinks and permissions...
Random offset: 0x29f
minzip: Extracted file "/tmp/0"
minzip: Extracted file "/tmp/f"
minzip: Extracted file "/tmp/imei.sh"
about to run program [/system/bin/sh] with 2 args
000000000000000
/tmp/IMEIwithBarcode /tmp/f differ byte 0
No need to do!!
000000000000000
minzip: Extracted file "/tmp/calibration.sh"
minzip: Extracted file "/tmp/calibration_f"
minzip: Extracted file "/tmp/calibration_wrong"
about to run program [/system/bin/sh] with 2 args
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
/tmp/GyroGain /tmp/calibration_wrong differ byte 0
No need to do!!
minzip: Extracted file "/tmp/EC_flash"
minzip: Extracted file "/tmp/ec.rom"
script result was [t]
i have a feeling that EC_flash & ec.rom are actually flasher with bootloader...
Click to expand...
Click to collapse
This part seems to be interesting:
Code:
partition read matched size 3043328 sha 23917956b398554dc14fe6c2d86ab3e358bfba5c
Removing unneeded files...

This is a very good hint!
Edit: not really. This is after the signature check...
Sent from my GT-I9000 using XDA App

yea, but if it's not checking that signature every boot and only checking the checksum, we could build the image and use dd to flash it

netham45 said:
yea, but if it's not checking that signature every boot and only checking the checksum, we could build the image and use dd to flash it
Click to expand...
Click to collapse
But can't we already do that now? /system can be flashed with whatever you want.

huxflux2003 said:
But can't we already do that now? /system can be flashed with whatever you want.
Click to expand...
Click to collapse
But if the checksum on the boot.img isn't valid, it will refuse to boot.

Related

Update today, maybe something useful to help tapping into recovery.

Okay so the device wanted to update to 1.141 today, so I let it download the update and extracted that, as well as decoding it and looking on the data in the file. The original name of the update was 7F8CECD70FB62872B5515A59B3C9F0DF.zip
The update.zip (decrypted already) can be found here: hxxp://dl.dropbox.com/u/3430150/update_1_decrypted.zip (Blocked to post outside links, sorry. Just replace hxxp with http)
The content of /cache/recovery/last_log is as follows:
Code:
Starting recovery on Sun May 29 13:07:08 2011
can't open /dev/tty0: No such file or directory
framebuffer: fd 3 (1280 x 800)
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /system ext4 /dev/block/mmcblk0p3 (null) 0
2 /data ext4 /dev/block/mmcblk0p8 (null) 0
3 /cache ext4 /dev/block/mmcblk0p4 (null) 0
4 /misc emmc /dev/block/mmcblk0p5 (null) 0
5 /flex ext4 /dev/block/mmcblk0p6 (null) 0
6 /mnt/sdcard vfat /dev/block/mmcblk1p1 (null) 0
7 /boot emmc /dev/block/mmcblk0p2 (null) 0
8 /aboot emmc /dev/block/mmcblk0p8 (null) 0
9 /recovery emmc /dev/block/mmcblk0p1 (null) 0
I:Got arguments from /cache/recovery/command
Command: "/sbin/recovery" "--update_package=CACHE:acer_ug/update.zip"
(replacing path "CACHE:acer_ug/update.zip" with "/cache/acer_ug/update.zip")
ro.secure=1
ro.allow.mock.location=0
ro.debuggable=0
persist.service.adb.enable=0
ro.build.id=HRI66
ro.build.display.id=Acer_A500_1.105.01_EMEA_GEN3
ro.build.system.id=Acer_A500_1.105_EMEA_GEN3
ro.build.version.incremental=eng.hermit.20110406.201911
ro.build.version.sdk=11
ro.build.version.codename=REL
ro.build.version.release=3.0.1
ro.build.date=Wed Apr 6 20:19:53 CST 2011
ro.build.date.utc=1302092393
ro.build.type=user
ro.build.user=hermit
ro.build.host=apple
ro.build.tags=release-keys
ro.product.model=A500
ro.product.brand=acer
ro.product.name=picasso_emeagen3
ro.product.device=ventana
ro.product.board=ventana
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=Acer
ro.product.locale.language=en
ro.product.locale.region=US
ro.wifi.channels=
ro.board.platform=tegra
ro.build.product=ventana
ro.build.description=picasso_emeagen3-user 3.0.1 HRI66 eng.hermit.20110406.201911 release-keys
ro.build.fingerprint=acer/picasso_emeagen3/ventana:3.0.1/HRI66/eng.hermit.20110406.201911:user/release-keys
ro.build.characteristics=tablet,nosdcard
ro.opengles.version=131072
wifi.interface=wlan0
keyguard.no_require_sim=1
ro.dinfo.version=1.0
ro.cpu.vendor=nVidia
ro.cpu.speed=1.0 GHz
ro.cpu.version=T20
ro.config.notification_sound=OnTheHunt.ogg
ro.config.alarm_alert=Alarm_Classic.ogg
dalvik.vm.heapstartsize=5m
dalvik.vm.heapgrowthlimit=48m
dalvik.vm.heapsize=256m
ro.setupwizard.mode=REQUIRED
ro.com.google.gmsversion=3.0_r1
ro.com.google.clientidbase=android-acer
acer.sync.adb.mode=ENABLED
dalvik.vm.dexopt-flags=m=y
net.bt.name=Android
net.change=net.bt.name
dalvik.vm.stack-trace-file=/data/anr/traces.txt
ro.factorytest=0
ro.bootmode=unknown
ro.baseband=unknown
ro.carrier=unknown
ro.bootloader=unknown
ro.ram.size=1GB
ro.hardware=ventana
ro.revision=0
init.svc.recovery=running
ro.aceruuid=000000000000000e0b9a56e22f0
ro.build.sku=Wifi
ro.product.modelalias=A500
ro.ec.version=21010000
ro.device.sn=xeh6len0041170e0271500
ro.serialno=11705738315
ro.flash.density=32GB
init.svc.adbd=stopped
E:/dev/block/mmcblk1 does not exist
E:/dev/block/mmcblk1 does not exist
E:/dev/block/mmcblk1 does not exist
E:/dev/block/mmcblk1 does not exist
E:/dev/block/mmcblk1 does not exist
E:/dev/block/mmcblk1 does not exist
E:/dev/block/mmcblk1 does not exist
E:/dev/block/mmcblk1 does not exist
E:/dev/block/mmcblk1 does not exist
E:/dev/block/mmcblk1 does not exist
Finding update package...
I:Update location: /cache/acer_ug/update.zip
Opening update package...
I:1 key(s) loaded from /res/keys
Verifying update package...
I:comment is 1690 bytes; signature 1672 bytes from end
I:whole-file signature verified
I:verify_file returned 0
Installing update...
Verifying current system...
partition read matched size 3031040 sha be82badf7fcb94d7f5631b80360fbf0f39d74f6b
Removing unneeded files...
applying patch to /system/app/AccountAndSyncSettings.apk
target 2645 bytes; free space 182931456 bytes; retry 1; enough 1
applying patch to /system/app/AccountAndSyncSettings.odex
target 3728 bytes; free space 182931456 bytes; retry 1; enough 1
applying patch to /system/app/AcerDLNA.apk
target 338268 bytes; free space 182931456 bytes; retry 1; enough 1
Patching system files...
applying patch to /system/app/AcerOneTimeInit.odex
target 4920 bytes; free space 182923264 bytes; retry 1; enough 1
applying patch to /system/app/AcerSyncHelper.apk
target 12441 bytes; free space 182923264 bytes; retry 1; enough 1
applying patch to /system/app/AgendaWidget.apk
target 46326 bytes; free space 182923264 bytes; retry 1; enough 1
applying patch to /system/app/ApplicationsProvider.apk
target 7500 bytes; free space 182923264 bytes; retry 1; enough 1
applying patch to /system/app/ApplicationsProvider.odex
target 19896 bytes; free space 182923264 bytes; retry 1; enough 1
applying patch to /system/app/Bluetooth.apk
target 87010 bytes; free space 182923264 bytes; retry 1; enough 1
applying patch to /system/app/Bluetooth.odex
target 224968 bytes; free space 182923264 bytes; retry 1; enough 1
applying patch to /system/app/Browser.apk
target 871680 bytes; free space 182923264 bytes; retry 1; enough 1
applying patch to /system/app/Browser.odex
target 539232 bytes; free space 182923264 bytes; retry 1; enough 1
applying patch to /system/app/Calculator.apk
target 43815 bytes; free space 182923264 bytes; retry 1; enough 1
applying patch to /system/app/Calculator.odex
target 82112 bytes; free space 182923264 bytes; retry 1; enough 1
applying patch to /system/app/CalendarGoogle.apk
target 737806 bytes; free space 182923264 bytes; retry 1; enough 1
applying patch to /system/app/CalendarProvider.apk
target 12699 bytes; free space 182923264 bytes; retry 1; enough 1
applying patch to /system/app/CalendarProvider.odex
target 195424 bytes; free space 182923264 bytes; retry 1; enough 1
applying patch to /system/app/Camera.apk
target 1347826 bytes; free space 182923264 bytes; retry 1; enough 1
applying patch to /system/app/Camera.odex
target 269672 bytes; free space 182587392 bytes; retry 1; enough 1
applying patch to /system/app/CertInstaller.apk
target 25193 bytes; free space 182587392 bytes; retry 1; enough 1
applying patch to /system/app/CertInstaller.odex
target 35240 bytes; free space 182587392 bytes; retry 1; enough 1
applying patch to /system/app/ChromeBookmarksSyncAdapter.apk
target 145644 bytes; free space 182587392 bytes; retry 1; enough 1
applying patch to /system/app/Contacts.apk
target 645372 bytes; free space 182587392 bytes; retry 1; enough 1
applying patch to /system/app/Contacts.odex
target 925024 bytes; free space 182587392 bytes; retry 1; enough 1
applying patch to /system/app/ContactsProvider.apk
target 11566 bytes; free space 182587392 bytes; retry 1; enough 1
applying patch to /system/app/ContactsProvider.odex
target 544936 bytes; free space 182587392 bytes; retry 1; enough 1
applying patch to /system/app/DefaultContainerService.apk
target 4334 bytes; free space 182587392 bytes; retry 1; enough 1
applying patch to /system/app/DefaultContainerService.odex
target 15712 bytes; free space 182587392 bytes; retry 1; enough 1
applying patch to /system/app/DeskClock.apk
target 269181 bytes; free space 182587392 bytes; retry 1; enough 1
applying patch to /system/app/DeskClock.odex
target 93848 bytes; free space 182583296 bytes; retry 1; enough 1
applying patch to /system/app/DownloadProvider.apk
target 34288 bytes; free space 182583296 bytes; retry 1; enough 1
applying patch to /system/app/DownloadProvider.odex
target 166296 bytes; free space 182583296 bytes; retry 1; enough 1
applying patch to /system/app/DownloadProviderUi.apk
target 36436 bytes; free space 182583296 bytes; retry 1; enough 1
applying patch to /system/app/DownloadProviderUi.odex
target 30528 bytes; free space 182583296 bytes; retry 1; enough 1
applying patch to /system/app/DrmProvider.apk
target 7538 bytes; free space 182583296 bytes; retry 1; enough 1
applying patch to /system/app/DrmProvider.odex
target 12688 bytes; free space 182583296 bytes; retry 1; enough 1
applying patch to /system/app/Email.apk
target 599351 bytes; free space 182583296 bytes; retry 1; enough 1
applying patch to /system/app/Email.odex
target 1454760 bytes; free space 182546432 bytes; retry 1; enough 1
applying patch to /system/app/FDUpdater.apk
target 794799 bytes; free space 182542336 bytes; retry 1; enough 1
applying patch to /system/app/FWupdateService.odex
target 5824 bytes; free space 182444032 bytes; retry 1; enough 1
applying patch to /system/app/Finsky.apk
target 1061041 bytes; free space 182444032 bytes; retry 1; enough 1
applying patch to /system/app/GalleryNew3DGoogle.apk
target 1614779 bytes; free space 182444032 bytes; retry 1; enough 1
applying patch to /system/app/Gmail.apk
target 1707652 bytes; free space 182444032 bytes; retry 1; enough 1
applying patch to /system/app/GoogleBackupTransport.apk
target 68878 bytes; free space 182448128 bytes; retry 1; enough 1
applying patch to /system/app/GoogleCalendarSyncAdapter.apk
target 119380 bytes; free space 182448128 bytes; retry 1; enough 1
applying patch to /system/app/GoogleContactsSyncAdapter.apk
target 133536 bytes; free space 182448128 bytes; retry 1; enough 1
applying patch to /system/app/GoogleFeedback.apk
target 141615 bytes; free space 182448128 bytes; retry 1; enough 1
applying patch to /system/app/GoogleLoginService.apk
target 1126438 bytes; free space 182448128 bytes; retry 1; enough 1
applying patch to /system/app/GooglePartnerSetup.apk
target 88651 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/GoogleQuickSearchBox.apk
target 679801 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/GoogleServicesFramework.apk
target 1500828 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/HTMLViewer.apk
target 4474 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/HTMLViewer.odex
target 6848 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/HeroOfSparta.apk
target 4958531 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/LatinImeGoogle.apk
target 8995468 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/LatinImeTutorial.apk
target 162667 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/Launcher2.apk
target 26766383 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/Launcher2.odex
target 432800 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/LinkToAdobeFlash.odex
target 1728 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/LinkToFacebook.odex
target 1720 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/LiveWallpapersPicker.apk
target 127900 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/LiveWallpapersPicker.odex
target 23056 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/MagicSmokeWallpapers.apk
target 212988 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/MagicSmokeWallpapers.odex
target 29312 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/Maps.apk
target 6144251 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/MarketUpdater.apk
target 9039 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/MediaProvider.apk
target 11108 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/MediaProvider.odex
target 108536 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/Music2.apk
target 3605104 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/MusicA.apk
target 6584727 bytes; free space 182439936 bytes; retry 1; enough 1
applying patch to /system/app/MyLocationWidget.apk
target 179213 bytes; free space 183402496 bytes; retry 1; enough 1
applying patch to /system/app/NFS.apk
target 102386506 bytes; free space 183435264 bytes; retry 1; enough 1
applying patch to /system/app/NetworkLocation.apk
target 108731 bytes; free space 183361536 bytes; retry 1; enough 1
applying patch to /system/app/OneTimeInitializer.apk
target 7207 bytes; free space 183361536 bytes; retry 1; enough 1
applying patch to /system/app/PackageInstaller.apk
target 34958 bytes; free space 183361536 bytes; retry 1; enough 1
applying patch to /system/app/PackageInstaller.odex
target 25864 bytes; free space 183361536 bytes; retry 1; enough 1
applying patch to /system/app/Phone.apk
target 711260 bytes; free space 183361536 bytes; retry 1; enough 1
applying patch to /system/app/Phone.odex
target 585272 bytes; free space 183361536 bytes; retry 1; enough 1
applying patch to /system/app/PicoTts.odex
target 12520 bytes; free space 183361536 bytes; retry 1; enough 1
applying patch to /system/app/Settings.apk
target 2253722 bytes; free space 183361536 bytes; retry 1; enough 1
applying patch to /system/app/Settings.odex
target 765248 bytes; free space 183042048 bytes; retry 1; enough 1
applying patch to /system/app/SettingsProvider.apk
target 13733 bytes; free space 183042048 bytes; retry 1; enough 1
applying patch to /system/app/SettingsProvider.odex
target 54080 bytes; free space 183042048 bytes; retry 1; enough 1
applying patch to /system/app/SetupWizard.apk
target 1140096 bytes; free space 183042048 bytes; retry 1; enough 1
applying patch to /system/app/Street.apk
target 296419 bytes; free space 183042048 bytes; retry 1; enough 1
applying patch to /system/app/SystemUI.apk
target 731624 bytes; free space 183042048 bytes; retry 1; enough 1
applying patch to /system/app/SystemUI.odex
target 265232 bytes; free space 183042048 bytes; retry 1; enough 1
applying patch to /system/app/Talk.apk
target 1719222 bytes; free space 183042048 bytes; retry 1; enough 1
applying patch to /system/app/TelephonyProvider.apk
target 8011 bytes; free space 183042048 bytes; retry 1; enough 1
applying patch to /system/app/TelephonyProvider.odex
target 91368 bytes; free space 183042048 bytes; retry 1; enough 1
applying patch to /system/app/TtsService.apk
target 7876 bytes; free space 183042048 bytes; retry 1; enough 1
applying patch to /system/app/TtsService.odex
target 36456 bytes; free space 183042048 bytes; retry 1; enough 1
applying patch to /system/app/UserDictionaryProvider.apk
target 3510 bytes; free space 183042048 bytes; retry 1; enough 1
applying patch to /system/app/UserDictionaryProvider.odex
target 14888 bytes; free space 183042048 bytes; retry 1; enough 1
applying patch to /system/app/Vending.apk
target 1847561 bytes; free space 183042048 bytes; retry 1; enough 1
applying patch to /system/app/VisualizationWallpapers.apk
target 139770 bytes; free space 183037952 bytes; retry 1; enough 1
applying patch to /system/app/VisualizationWallpapers.odex
target 35840 bytes; free space 183037952 bytes; retry 1; enough 1
applying patch to /system/app/VoiceRecorder.apk
target 1948477 bytes; free space 183037952 bytes; retry 1; enough 1
applying patch to /system/app/WeatherWidget.apk
target 3236893 bytes; free space 183017472 bytes; retry 1; enough 1
applying patch to /system/app/YouTubeTablet.apk
target 1695977 bytes; free space 183017472 bytes; retry 1; enough 1
applying patch to /system/app/xt9.apk
target 1095855 bytes; free space 183017472 bytes; retry 1; enough 1
applying patch to /system/bin/debuggerd
target 22240 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/build.prop
target 1772 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/etc/media_profiles.xml
target 15102 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/etc/security/otacerts.zip
target 1819 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/am.jar
target 313 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/am.odex
target 29616 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/android.policy.jar
target 313 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/android.policy.odex
target 231528 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/android.test.runner.jar
target 313 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/android.test.runner.odex
target 196112 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/bmgr.jar
target 313 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/bmgr.odex
target 13640 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/bouncycastle.jar
target 313 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/bouncycastle.odex
target 934048 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/com.android.location.provider.jar
target 313 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/com.android.location.provider.odex
target 7240 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/com.google.android.maps.jar
target 157902 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/core-junit.jar
target 313 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/core-junit.odex
target 23920 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/core.jar
target 22562 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/core.odex
target 4797712 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/ext.jar
target 101174 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/ext.odex
target 1460952 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/framework-res.apk
target 5342683 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/framework.jar
target 12753 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/framework.odex
target 9118928 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/ime.jar
target 313 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/ime.odex
target 6592 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/input.jar
target 313 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/input.odex
target 4296 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/javax.obex.jar
target 313 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/javax.obex.odex
target 60520 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/monkey.jar
target 313 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/monkey.odex
target 88704 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/pm.jar
target 313 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/pm.odex
target 27824 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/services.jar
target 313 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/services.odex
target 1638968 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/sqlite-jdbc.jar
target 313 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/sqlite-jdbc.odex
target 149192 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/svc.jar
target 313 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/framework/svc.odex
target 8280 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/lib/egl/libGLES_android.so
target 82079 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/lib/hw/sensors.tegra.so
target 40588 bytes; free space 182919168 bytes; retry 1; enough 1
applying patch to /system/lib/libEGL.so
target 95597 bytes; free space 182886400 bytes; retry 1; enough 1
applying patch to /system/lib/libandroid_runtime.so
target 600311 bytes; free space 182886400 bytes; retry 1; enough 1
applying patch to /system/lib/libaudioflinger.so
target 307881 bytes; free space 182886400 bytes; retry 1; enough 1
applying patch to /system/lib/libbcc.so
target 3944716 bytes; free space 182886400 bytes; retry 1; enough 1
applying patch to /system/lib/libcamera.so
target 137612 bytes; free space 182886400 bytes; retry 1; enough 1
applying patch to /system/lib/libcameraservice.so
target 55866 bytes; free space 182882304 bytes; retry 1; enough 1
applying patch to /system/lib/libdrmframework_jni.so
target 27244 bytes; free space 182882304 bytes; retry 1; enough 1
applying patch to /system/lib/libgui.so
target 75436 bytes; free space 182882304 bytes; retry 1; enough 1
applying patch to /system/lib/libheroofsparta.so
target 1130990 bytes; free space 182882304 bytes; retry 1; enough 1
applying patch to /system/lib/libhwui.so
target 225596 bytes; free space 182882304 bytes; retry 1; enough 1
applying patch to /system/lib/libicui18n.so
target 973238 bytes; free space 182882304 bytes; retry 1; enough 1
applying patch to /system/lib/libjni_xt9input.so
target 563231 bytes; free space 182882304 bytes; retry 1; enough 1
applying patch to /system/lib/libmedia.so
target 423170 bytes; free space 182878208 bytes; retry 1; enough 1
applying patch to /system/lib/libmedia_jni.so
target 76314 bytes; free space 182878208 bytes; retry 1; enough 1
applying patch to /system/lib/libmediaplayerservice.so
target 223354 bytes; free space 182878208 bytes; retry 1; enough 1
applying patch to /system/lib/libmllite.so
target 105436 bytes; free space 182878208 bytes; retry 1; enough 1
applying patch to /system/lib/libnfsshift.so
target 428028 bytes; free space 182878208 bytes; retry 1; enough 1
applying patch to /system/lib/libnvmm_camera.so
target 295964 bytes; free space 182886400 bytes; retry 1; enough 1
applying patch to /system/lib/libnvodm_imager.so
target 226540 bytes; free space 182886400 bytes; retry 1; enough 1
applying patch to /system/lib/libnvodm_query.so
target 28028 bytes; free space 182882304 bytes; retry 1; enough 1
applying patch to /system/lib/libsensorservice.so
target 64192 bytes; free space 182882304 bytes; retry 1; enough 1
applying patch to /system/lib/libskia.so
target 1026635 bytes; free space 182882304 bytes; retry 1; enough 1
applying patch to /system/lib/libstagefright.so
target 1645631 bytes; free space 182882304 bytes; retry 1; enough 1
applying patch to /system/lib/libstlport.so
target 212915 bytes; free space 182882304 bytes; retry 1; enough 1
applying patch to /system/lib/libtalk_jni.so
target 30279660 bytes; free space 182882304 bytes; retry 1; enough 1
applying patch to /system/lib/libui.so
target 83847 bytes; free space 182878208 bytes; retry 1; enough 1
applying patch to /system/lib/libutils.so
target 165943 bytes; free space 182878208 bytes; retry 1; enough 1
applying patch to /system/lib/libvideoeditorplayer.so
target 114224 bytes; free space 182878208 bytes; retry 1; enough 1
applying patch to /system/lib/libwebcore.so
target 7343005 bytes; free space 182878208 bytes; retry 1; enough 1
applying patch to /system/lib/modules/bcm4329.ko
target 268026 bytes; free space 182874112 bytes; retry 1; enough 1
applying patch to /system/lib/modules/scsi_wait_scan.ko
target 32399 bytes; free space 182874112 bytes; retry 1; enough 1
applying patch to /system/usr/keylayout/Acer-AK00LB.kl
target 1902 bytes; free space 182874112 bytes; retry 1; enough 1
applying patch to /system/usr/xt9/config/databases.conf
target 5587 bytes; free space 182874112 bytes; retry 1; enough 1
applying patch to /system/usr/xt9/databases/ldb/DEusUN_xt9_2.ldb
target 527337 bytes; free space 182874112 bytes; retry 1; enough 1
applying patch to /system/usr/xt9/databases/ldb/ENubUN_xt9_2.ldb
target 304390 bytes; free space 182878208 bytes; retry 1; enough 1
applying patch to /system/usr/xt9/databases/ldb/ESusUN_xt9_2.ldb
target 342741 bytes; free space 182878208 bytes; retry 1; enough 1
applying patch to /system/usr/xt9/databases/ldb/FRusUN_xt9_2.ldb
target 342811 bytes; free space 182878208 bytes; retry 1; enough 1
applying patch to /system/usr/xt9/databases/ldb/ITusUN_xt9_2.ldb
target 384789 bytes; free space 182878208 bytes; retry 1; enough 1
Patching boot image...
applying patch to EMMC:/dev/block/mmcblk0p2:3031040:be82badf7fcb94d7f5631b80360fbf0f39d74f6b:3043328:a6c9422292c4d677de3f402cc0fba0be944655f8
partition read matched size 3031040 sha be82badf7fcb94d7f5631b80360fbf0f39d74f6b
1151762432 bytes free on /cache (3031040 needed)
Unpacking new files...
minzip: Extracted file "/system/app/Clearfi.apk"
minzip: Extracted file "/system/usr/xt9/config/device.conf"
minzip: Extracted file "/system/usr/xt9/databases/kdb/qwerty.arabic.center.kdb"
minzip: Extracted file "/system/usr/xt9/databases/kdb/qwerty.danish.center.kdb"
minzip: Extracted file "/system/usr/xt9/databases/kdb/qwerty.norwegian.center.kdb"
minzip: Extracted file "/system/usr/xt9/databases/kdb/qwerty.swedish.center.kdb"
minzip: Extracted file "/system/usr/xt9/databases/kdb/qwerty.thai.center.kdb"
minzip: Extracted file "/system/usr/xt9/databases/kdb/qwerty.ukrainian.center.kdb"
minzip: Extracted file "/system/usr/xt9/databases/ldb/ARlsUN_xt9.ldb"
minzip: Extracted file "/system/usr/xt9/databases/ldb/Acer_621_CSlsUN_xt9.ldb"
minzip: Extracted file "/system/usr/xt9/databases/ldb/Acer_621_DAusUN_xt9.ldb"
minzip: Extracted file "/system/usr/xt9/databases/ldb/Acer_621_NOlsUN_xt9.ldb"
minzip: Extracted file "/system/usr/xt9/databases/ldb/Acer_621_PLlsUN_xt9.ldb"
minzip: Extracted file "/system/usr/xt9/databases/ldb/Acer_621_SVusUN_xt9.ldb"
minzip: Extracted file "/system/usr/xt9/databases/ldb/Acer_621_TRlsUN_xt9.ldb"
minzip: Extracted file "/system/usr/xt9/databases/ldb/FIusUN_xt9_2.ldb"
minzip: Extracted file "/system/usr/xt9/databases/ldb/THlsUN_xt9.ldb"
minzip: Extracted file "/system/usr/xt9/databases/ldb/UKlsUN_xt9.ldb"
Unpacking new recovery...minzip: Extracted file "/system/etc/install-recovery.sh"
minzip: Extracted file "/system/recovery-from-boot.p"
Symlinks and permissions...
Random offset: 0x148
minzip: Extracted file "/tmp/0"
minzip: Extracted file "/tmp/f"
minzip: Extracted file "/tmp/imei.sh"
about to run program [/system/bin/sh] with 2 args
000000000000000
/tmp/IMEIwithBarcode /tmp/f differ byte 0
No need to do!!
000000000000000
minzip: Extracted file "/tmp/calibration.sh"
minzip: Extracted file "/tmp/calibration_f"
minzip: Extracted file "/tmp/calibration_wrong"
about to run program [/system/bin/sh] with 2 args
000000240005c5e00000000000000000000000000000000000000000000100002b4246cb
0+1 records in
0+1 records out
73 bytes transferred in 0.360 secs (202 bytes/sec)
Done!!
run_program: child exited with status 1
minzip: Extracted file "/tmp/EC_flash"
minzip: Extracted file "/tmp/ec.rom"
script result was [0.065000]
I tried to adb shell and adb logcat into it while recovering but was unable to do so...wuhuu..
Well, I hope this is of use to some of you Really want to see us able to unleash the full potentional of this device. Which we could....if just Acer wasn't such a PITA with a locked bootloader....

Mako Kernel build issue

latest commit 5194a3d in https://android.googlesource.com/kernel/msm/+log/android-msm-mako-3.4-jb-mr1/ throws an error in Prima
drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c: In function 'limHandleDelBssInReAssocContext':
drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c:4701: warning: the frame size of 2584 bytes is larger than 1024 bytes; see http://go/big_stack_frame
error, forbidden warning: limProcessMlmRspMessages.c:4701
make[3]: *** [drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.o] Error 1
make[2]: *** [drivers/staging/prima] Error 2
make[1]: *** [drivers/staging] Error 2
Any clues?
For these who will search for fix:
https://github.com/franciscofranco/mako/commit/5a7da427e24fd8da8f4f9dd27702044e5b35e3d3
https://github.com/franciscofranco/mako/commit/faeac9ff5597238db35b3c30d85e8f03f2d8a8b3
Thanks Franco
Adam

Temporary solution for camera crash on KitKat ROMs (might fix other issues).

I will start with the solution and then follow it up with a technical analysis of the problem.
To the KitKat ROM maintainers here, @jamal2367 , @janjan , here please add the following to /system/etc/sysctl.conf:
Code:
vm.min_free_kbytes=32768
To be clear this will set a low watermark of 32MB of free memory. The kernel will attempt to reclaim memory as soon as the system dips below 32MB of free memory.
Now on to the technical analysis. So it looks like all of the crashes I experience on the KitKat ROMs are triggered by the ION memory allocator.
Code:
<4>[ 78.327331] mediaserver: page allocation failure: order:0, mode:0xe0
...
<4>[ 78.327484] [<c02da24c>] (sg_alloc_table+0x1c/0x44) from [<c03a3704>] (ion_iommu_heap_allocate+0x1f4/0x54c)
<4>[ 78.327484] [<c03a3704>] (ion_iommu_heap_allocate+0x1f4/0x54c) from [<c03a02e8>] (ion_alloc+0xd4/0x354)
<4>[ 78.327514] [<c03a02e8>] (ion_alloc+0xd4/0x354) from [<c03a0af0>] (ion_ioctl+0x108/0x434)
...
Code:
<4>[ 84.951995] Binder_4: page allocation failure: order:0, mode:0xe0
...
<4>[ 84.952117] [<c02da24c>] (sg_alloc_table+0x1c/0x44) from [<c03a3704>] (ion_iommu_heap_allocate+0x1f4/0x54c)
<4>[ 84.952148] [<c03a3704>] (ion_iommu_heap_allocate+0x1f4/0x54c) from [<c03a02e8>] (ion_alloc+0xd4/0x354)
<4>[ 84.952148] [<c03a02e8>] (ion_alloc+0xd4/0x354) from [<c03a0af0>] (ion_ioctl+0x108/0x434)
...
The key here is the mode of allocation. Notice that it is 0xe0. The mode corresponds to the gfp_mask of the allocation. A reference of the GFP flags can be found in the Linux kernel source: /source/include/linux/gfp.h
So we see that 0xe0 = 0x20 | 0x40 | 0x80, translating that to the corresponding GFP flags we see that it is
Code:
0xe0 = ___GFP_HIGH | ___GFP_IO | ___GFP_FS
Notice that ___GFP_HIGH is set and not ___GFP_WAIT. This means that this type of allocation will not wait for reclaimable memory to be reclaimed. In particular this means that if most of the memory is occupied by cached pages or VFS cache the allocation will fail. One way around this problem is to simply increase the minimum amount of memory the kernel will attempt to keep available. That's what the above suggested fix does. It certainly seems to solve the problem as the free memory never dips below the point crashes begin to occur when starting the camera. However, a better solution might be to fix the kernel code leading up to the allocation. I believe if @faux123 adds the latest version of scatterlist.c to his kernel repo it may solve the problem as the lines modifying the GFP mask which is originally a standard GFP_KERNEL to the "non-waiting" kind is no longer present.
The problematic code in __sg_alloc_table is
Code:
int __sg_alloc_table(struct sg_table *table, unsigned int nents,
unsigned int max_ents, gfp_t gfp_mask,
sg_alloc_fn *alloc_fn)
{
...
gfp_mask &= ~__GFP_WAIT;
gfp_mask |= __GFP_HIGH;
...
}
Perhaps I'll fork the repo and try to apply the fix myself later.
Diffeomorphism said:
I will start with the solution and then follow it up with a technical analysis of the problem.
To the KitKat ROM maintainers here, @jamal2367 , @janjan , here please add the following to /system/etc/sysctl.conf:
Code:
vm.min_free_kbytes=32768
To be clear this will set a low watermark of 32MB of free memory. The kernel will attempt to reclaim memory as soon as the system dips below 32MB of free memory.
Now on to the technical analysis. So it looks like all of the crashes I experience on the KitKat ROMs are triggered by the ION memory allocator.
Code:
<4>[ 78.327331] mediaserver: page allocation failure: order:0, mode:0xe0
...
<4>[ 78.327484] [<c02da24c>] (sg_alloc_table+0x1c/0x44) from [<c03a3704>] (ion_iommu_heap_allocate+0x1f4/0x54c)
<4>[ 78.327484] [<c03a3704>] (ion_iommu_heap_allocate+0x1f4/0x54c) from [<c03a02e8>] (ion_alloc+0xd4/0x354)
<4>[ 78.327514] [<c03a02e8>] (ion_alloc+0xd4/0x354) from [<c03a0af0>] (ion_ioctl+0x108/0x434)
...
Code:
<4>[ 84.951995] Binder_4: page allocation failure: order:0, mode:0xe0
...
<4>[ 84.952117] [<c02da24c>] (sg_alloc_table+0x1c/0x44) from [<c03a3704>] (ion_iommu_heap_allocate+0x1f4/0x54c)
<4>[ 84.952148] [<c03a3704>] (ion_iommu_heap_allocate+0x1f4/0x54c) from [<c03a02e8>] (ion_alloc+0xd4/0x354)
<4>[ 84.952148] [<c03a02e8>] (ion_alloc+0xd4/0x354) from [<c03a0af0>] (ion_ioctl+0x108/0x434)
...
The key here is the mode of allocation. Notice that it is 0xe0. The mode corresponds to the gfp_mask of the allocation. A reference of the GFP flags can be found in the Linux kernel source: /source/include/linux/gfp.h
So we see that 0xe0 = 0x20 | 0x40 | 0x80, translating that to the corresponding GFP flags we see that it is
Code:
0xe0 = ___GFP_HIGH | ___GFP_IO | ___GFP_FS
Notice that ___GFP_HIGH is set and not ___GFP_WAIT. This means that this type of allocation will not wait for reclaimable memory to be reclaimed. In particular this means that if most of the memory is occupied by cached pages or VFS cache the allocation will fail. One way around this problem is to simply increase the minimum amount of memory the kernel will attempt to keep available. That's what the above suggested fix does. It certainly seems to solve the problem as the free memory never dips below the point crashes begin to occur when starting the camera. However, a better solution might be to fix the kernel code leading up to the allocation. I believe if @faux123 adds the latest version of scatterlist.c to his kernel repo it may solve the problem as the lines modifying the GFP mask which is originally a standard GFP_KERNEL to the "non-waiting" kind is no longer present.
The problematic code in __sg_alloc_table is
Code:
int __sg_alloc_table(struct sg_table *table, unsigned int nents,
unsigned int max_ents, gfp_t gfp_mask,
sg_alloc_fn *alloc_fn)
{
...
gfp_mask &= ~__GFP_WAIT;
gfp_mask |= __GFP_HIGH;
...
}
Perhaps I'll fork the repo and try to apply the fix myself later.
Click to expand...
Click to collapse
Wow this is very very a good think .....i hope you can fixed the problems with the random reboots ......im not the big developers .....
THX best regards
hi, could this be related to reboots?
great find!
Hi all,
First of all thanks for the great rom Jamal, however my camera app is FC in general and from the lockscreen which is a feature I wanted from stock.
If this fix works how would it be applied as I'm not a developer in any way and not able to post in the actual rom thread.

[Q] Need help in porting slimbean

Well I was trying to port slimben for my acer a500 and the build goes well until the last few steps when trying to make a zip file. Can you guys help me take a look thank you!
Code:
Made boot image: out/target/product/a500/boot.img
----- Making recovery image ------
out/host/linux-x86/bin/mkbootimg --kernel out/target/product/a500/kernel --ramdisk out/target/product/a500/ramdisk-recovery.img --base 0x10000000 --output out/target/product/a500/recovery.img
Made recovery image: out/target/product/a500/recovery.img
out/target/product/a500/recovery.img maxsize=5136384 blocksize=135168 total=4249600 reserve=270336
Construct recovery from boot
mkdir -p out/target/product/a500/obj/PACKAGING/recovery_patch_intermediates/
PATH=out/host/linux-x86/bin:$PATH out/host/linux-x86/bin/imgdiff out/target/product/a500/boot.img out/target/product/a500/recovery.img out/target/product/a500/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p
Construct patches for 3 chunks...
patch 0 is 205 bytes (of 2838538)
patch 1 is 1242964 bytes (of 170881)
patch 2 is 153 bytes (of 1141)
chunk 0: normal ( 0, 2838538) 205
chunk 1: deflate ( 2838538, 1410471) 1242964 (null)
chunk 2: normal ( 4249009, 591) 153
Install system fs image: out/target/product/a500/system.img
out/target/product/a500/system.img+out/target/product/a500/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=1310318592 blocksize=135168 total=195068238 reserve=13246464
Package target files: out/target/product/a500/obj/PACKAGING/target_files_intermediates/slim_a500-target_files-eng.user.zip
Package OTA: out/target/product/a500/slim_a500-ota-eng.user.zip
./build/tools/releasetools/ota_from_target_files -v \
-p out/host/linux-x86 \
-k build/target/product/security/testkey \
--backup=true \
--override_device=picasso,a500 \
out/target/product/a500/obj/PACKAGING/target_files_intermediates/slim_a500-target_files-eng.user.zip out/target/product/a500/slim_a500-ota-eng.user.zip
unzipping target target-files...
running: unzip -o -q out/target/product/a500/obj/PACKAGING/target_files_intermediates/slim_a500-target_files-eng.user.zip -d /tmp/targetfiles-91NFVw
--- target info ---
blocksize = (int) 131072
boot_size = (int) 8388608
default_system_dev_certificate = (str) build/target/product/security/testkey
extfs_sparse_flag = (str) -s
fs_type = (str) ext4
fstab = (dict) {'/flexrom': <common.Partition object at 0x1e48150>, '/cache': <common.Partition object at 0x1e480d0>, '/boot': <common.Partition object at 0x1e44ed0>, '/system': <common.Partition object at 0x1e48050>, '/mnt/sdcard': <common.Partition object at 0x1e48250>, '/recovery': <common.Partition object at 0x1e44e50>, '/data': <common.Partition object at 0x1e481d0>}
recovery_api_version = (int) 2
recovery_size = (int) 5242880
system_size = (int) 1283457024
tool_extensions = (str) device/acer/a500/../common
userdata_size = (int) 13950255104
using device-specific extensions in device/acer/common
unable to load device-specific module; assuming none
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 901, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 869, in main
WriteFullOTAPackage(input_zip, output_zip)
File "./build/tools/releasetools/ota_from_target_files", line 448, in WriteFullOTAPackage
script.Mount("/data")
File "/home/user/slim4.1/build/tools/releasetools/edify_generator.py", line 157, in Mount
(p.fs_type, common.PARTITION_TYPES[p.fs_type],
KeyError: 'auto'
make: *** [out/target/product/a500/slim_a500-ota-eng.user.zip] Error 1

Error while trying to Build AOSP 7.0 for Lux [Help needed]

Hello, I am trying to build Android 7.0 AOSP for our Moto X Play.
This is my 1st time and I am running into various problems. While I have been able to fix few of them, this particular problem is out of my understanding.
Code:
Starting build with ninja
ninja: Entering directory `.'
ninja: error: 'out/target/product/lux/obj/KERNEL_OBJ/usr', needed by 'out/target/product/lux/obj/EXECUTABLES/audiod_intermediates/audiod_main.o', missing and no known rule to make it
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
I have attached my local-manifest and default.xml files for reference.
@squid2 , @Vatsal , @GtrCraft , @TechnoAnder , @nickdoherty please check if any one of you can help. I am sorry for tagging you all to the post like this. But I really want to be able to successfully build the ROM for our device.
Point out my mistakes if any in local-manifest and also comment if you need any more info to be able to help me fix the issue.
Update 1 : I tried with just "make" and at last got this :
Code:
build/core/Makefile:34: warning: overriding commands for target `out/target/product/lux/system/bin/rild'
build/core/base_rules.mk:316: warning: ignoring old commands for target `out/target/product/lux/system/bin/rild'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/lux/system/lib/libril.so'
build/core/base_rules.mk:316: warning: ignoring old commands for target `out/target/product/lux/system/lib/libril.so'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/lux/system/lib/hw/audio.primary.default.so'
build/core/base_rules.mk:316: warning: ignoring old commands for target `out/target/product/lux/system/lib/hw/audio.primary.default.so'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/lux/system/lib/hw/audio.primary.msm8916.so'
build/core/base_rules.mk:316: warning: ignoring old commands for target `out/target/product/lux/system/lib/hw/audio.primary.msm8916.so'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/lux/system/lib/hw/audio_policy.default.so'
build/core/base_rules.mk:316: warning: ignoring old commands for target `out/target/product/lux/system/lib/hw/audio_policy.default.so'
build/core/ninja.mk:163: recipe for target 'out/build-aosp_lux.ninja' failed
make: *** [out/build-aosp_lux.ninja] Segmentation fault (core dumped)
make: *** Deleting file 'out/build-aosp_lux.ninja'
Update 2 : Trying again gave different error :
Code:
build/core/Makefile:34: warning: overriding commands for target `out/target/product/lux/system/bin/rild'
build/core/base_rules.mk:316: warning: ignoring old commands for target `out/target/product/lux/system/bin/rild'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/lux/system/lib/libril.so'
build/core/base_rules.mk:316: warning: ignoring old commands for target `out/target/product/lux/system/lib/libril.so'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/lux/system/lib/hw/audio.primary.default.so'
build/core/base_rules.mk:316: warning: ignoring old commands for target `out/target/product/lux/system/lib/hw/audio.primary.default.so'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/lux/system/lib/hw/audio.primary.msm8916.so'
build/core/base_rules.mk:316: warning: ignoring old commands for target `out/target/product/lux/system/lib/hw/audio.primary.msm8916.so'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/lux/system/lib/hw/audio_policy.default.so'
build/core/base_rules.mk:316: warning: ignoring old commands for target `out/target/product/lux/system/lib/hw/audio_policy.default.so'
*** glibc detected *** out/host/linux-x86/bin/ckati: free(): invalid next size (fast): 0x0000000055536890 ***
======= Backtrace: =========
[0x4946c2]
[0x42e3d8]
[0x42dc46]
[0x42c9db]
[0x477c44]
[0x4032c1]
======= Memory map: ========
00400000-00584000 r-xp 00000000 08:04 777269 /media/arnabj/Firmwares/AndroidSource/Nougat/out/host/linux-x86/bin/ckati
00584000-0058d000 rw-p 00183000 08:04 777269 /media/arnabj/Firmwares/AndroidSource/Nougat/out/host/linux-x86/bin/ckati
0058d000-005a8000 rw-p 00000000 00:00 0
02260000-5d875000 rw-p 00000000 00:00 0 [heap]
7f16f0000000-7f16f2403000 rw-p 00000000 00:00 0
7f16f2403000-7f16f4000000 ---p 00000000 00:00 0
7f16f8000000-7f16fac00000 rw-p 00000000 00:00 0
7f16fac00000-7f16fc000000 ---p 00000000 00:00 0
7f16fc000000-7f16fe400000 rw-p 00000000 00:00 0
7f16fe400000-7f1700000000 ---p 00000000 00:00 0
7f1700000000-7f1703401000 rw-p 00000000 00:00 0
7f1703401000-7f1704000000 ---p 00000000 00:00 0
7f1706e4e000-7f1706e4f000 ---p 00000000 00:00 0
7f1706e4f000-7f170764f000 rw-p 00000000 00:00 0
7f170764f000-7f1707650000 ---p 00000000 00:00 0
7f1707650000-7f1707e50000 rw-p 00000000 00:00 0
7f1707e50000-7f1707e51000 ---p 00000000 00:00 0
7f1707e51000-7f1708651000 rw-p 00000000 00:00 0
7f1708651000-7f1708652000 ---p 00000000 00:00 0
7f1708652000-7f170a257000 rw-p 00000000 00:00 0
7f170a2be000-7f170a6bf000 rw-p 00000000 00:00 0
7f170aab8000-7f170acb3000 rw-p 00000000 00:00 0
7f170ad13000-7f170ad15000 rw-p 00000000 00:00 0
7ffc0370b000-7ffc03746000 rw-p 00000000 00:00 0 [stack]
7ffc0379b000-7ffc0379d000 r--p 00000000 00:00 0 [vvar]
7ffc0379d000-7ffc0379f000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
build/core/ninja.mk:163: recipe for target 'out/build-aosp_lux.ninja' failed
make: *** [out/build-aosp_lux.ninja] Aborted (core dumped)
make: *** Deleting file 'out/build-aosp_lux.ninja'
#### make failed to build some targets (01:05 (mm:ss)) ####
Update 3 : The above error only comes up when do "make", may be my pc's resources get exhausted? doing "make -j4" gives the initial error again. So I manually created these three directories : obj, KERNEL_OBJ, usr and restarted with "make -j4".
To my surprise this time it didn't gave this error anymore. Instead it gave :
Code:
Starting build with ninja
ninja: Entering directory `.'
ninja: error: 'out/target/product/lux/obj/SHARED_LIBRARIES/libcryptfs_hw_intermediates/export_includes', needed by 'out/target/product/lux/obj/EXECUTABLES/vold_intermediates/import_includes', missing and no known rule to make it
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
When serached on Google regarding this I came to find out that I have missed "device/qcom/common/" and so updated my local-manifest and sync'd it. Even though now I have the device tree I still get the same error.
I appears to me that 'out/target/product/lux/' is having permissions issue. Because there was no 'obj' directory inside 'lux/' when the first error occured. I manually created it. But now when it's there, I still get errors of file not being found such as that eport_includes file.
A clean build again results in initial error. Hope anyone can help me fix it.
Or your build system is not powerful enough. Or you didn't set it up properly. Anyway building on aosp source is just a waste of your time. Wait for caf or cm releases
I understand it's time consuming but I am willing to put that time and effort.
And regarding my PC Confugration, its Gen 3 Core i3 (4 Cpus @ 2.59Ghz, 4+8 GiB DDR3 RAM 1600MHz)
Sorry new to this answer-question thingy.
Deleted.
---------- Post added at 02:53 AM ---------- Previous post was at 02:52 AM ----------
still this error @GtrCraft @arnabJ on the caf sources
still this error @GtrCraft @arnabJ on the caf sources
You mean to say that I may not be at fault here? I mean my setup of Local-manifest.

Categories

Resources