[Galaxy Ace II Q&A, Help & Troubleshooting] Linux_Shines:
Hello.

So - I bought this phone about ~8/9 months ago (in april 2014). I installed Cyanogenmod 11 by Maclaw twice, but there were problems with stability, so in August I decided to install AOSP by salvo (slv96).

Since then, everything was okay, until the middle of January (this year), when the phone... just restarted. It did not surprise me, because it restarted couple of times before. Unfortunately, it happend again - twice - so I started looking for possible causes. I noticed that the phone can boot normally, I can even use it for some time, but when I want to change something on it, it restarts, probably getting a kernel panic.

I tried to delete all data, or "triple wipe", but after that phone still had untouched ROM, just like it was before. Nothing was removed. So I downloaded Samsung Kies, because I tried to install an "original ROM", but Kies only shows the message "Connecting" and nothing more happens.

Next time I tried the ADB, I reset the flash counter by command:

dd if=/dev/zero of=/dev/block/mmcblk0 bs=1 count=1 seek=3145732

then I checked "what happens when I write the command dmesg | grep mmc*", which results in something like this:

root@codina:/ # dmesg | grep mmc*
dmesg | grep mmc*
<7>[ 0.000000] Normal zone: 1248 pages used for memmap
<7>[ 0.000000] HighMem zone: 286 pages used for memmap
<5>[ 0.000000] Kernel command line: cachepolicy=writealloc mpcore_wdt.mpcore_margin=359 root=/dev/ram0 rw rootwait crash_reboot=yes crash_dump=no init=initconsole='null' mem=96M@0 mem_mtrace=15M@96M mem_mshared=1M@111M mem_modem=16M@112M mem=128M@128M hwmem=84M@256M mem=43M@340M mem_issw=1M@383M mem_ram_console=1M@384M mem=382M@385M vmalloc=264M jig_smd=0 lpm_boot=0 checksum_pass=1 checksum_done=1 sec_debug.enable=0 sec_debug.enable_user=0 androidboot.serialno=473700e240071108 board_id=12 startup_graphics=1 logo. lcdtype=8 sbl_copy=1
<6>[ 0.000000] Console: colour dummy device 80x30
<6>[ 0.322540] print_constraints: dummy:
<6>[ 0.343658] print_constraints: db8500-sva-mmdsp:
<7>[ 0.343688] regulator regulator.9: regulator-db8500-sva-mmdsp-probed
<6>[ 0.343872] print_constraints: db8500-sva-mmdsp-ret:
<7>[ 0.343902] regulator regulator.10: regulator-db8500-sva-mmdsp-ret-probed
<6>[ 0.344329] print_constraints: db8500-sia-mmdsp:
<7>[ 0.344360] regulator regulator.12: regulator-db8500-sia-mmdsp-probed
<6>[ 0.344543] print_constraints: db8500-sia-mmdsp-ret:
<7>[ 0.344604] regulator regulator.13: regulator-db8500-sia-mmdsp-ret-probed
<6>[ 0.772735] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
<6>[ 1.227233] bt404_ts_device 3-0020: send reset command
<6>[ 1.255004] mmci-pl18x sdi2: mmc0: PL180 manf 80 rev4 at 0x80005000 irq 73,-1 (pio)
<6>[ 1.255096] mmci-pl18x sdi2: DMA channels RX dma0chan16, TX dma0chan17
<4>[ 1.298492] mmci-pl18x sdi0: Provided ocr_mask/setpower will not be used (using regulator instead)
<3>[ 1.298645] mmc0: [MMC] CMD TIMEOUT STATUS: 4, CMD: 52
<6>[ 1.298950] mmci-pl18x sdi0: mmc1: PL180 manf 80 rev4 at 0x80126000 irq 92,-1 (pio)
<3>[ 1.298980] mmc0: [MMC] CMD TIMEOUT STATUS: 4, CMD: 52
<6>[ 1.299072] mmci-pl18x sdi0: DMA channels RX dma0chan18, TX dma0chan19
<3>[ 1.322021] mmc0: [MMC] CMD TIMEOUT STATUS: 4, CMD: 8
<3>[ 1.322357] mmc0: [MMC] CMD TIMEOUT STATUS: 4, CMD: 5
<3>[ 1.322662] mmc0: [MMC] CMD TIMEOUT STATUS: 4, CMD: 5
<3>[ 1.322967] mmc0: [MMC] CMD TIMEOUT STATUS: 4, CMD: 5
<3>[ 1.323303] mmc0: [MMC] CMD TIMEOUT STATUS: 4, CMD: 5
<3>[ 1.323608] mmc0: [MMC] CMD TIMEOUT STATUS: 4, CMD: 55
<3>[ 1.323913] mmc0: [MMC] CMD TIMEOUT STATUS: 4, CMD: 55
<3>[ 1.324249] mmc0: [MMC] CMD TIMEOUT STATUS: 4, CMD: 55
<3>[ 1.324554] mmc0: [MMC] CMD TIMEOUT STATUS: 4, CMD: 55
<6>[ 1.368377] mmci-pl18x sdi1: mmc2: PL180 manf 80 rev4 at 0x80118000 irq 82,-1 (pio)
<6>[ 1.368438] mmci-pl18x sdi1: DMA channels RX dma0chan20, TX dma0chan21
<6>[ 1.471282] mmc0: new high speed DDR MMC card at address 0001
<6>[ 1.471771] mmcblk0: mmc0:0001 SEM04G 3.68 GiB
<6>[ 1.471954] mmcblk0boot0: mmc0:0001 SEM04G partition 1 2.00 MiB
<6>[ 1.472137] mmcblk0boot1: mmc0:0001 SEM04G partition 2 2.00 MiB
<6>[ 1.477600] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17
<6>[ 1.484130] mmcblk0boot1: unknown partition table
<6>[ 1.487213] mmcblk0boot0: unknown partition table
<3>[ 1.487823] mmc1: [MMC] CMD TIMEOUT STATUS: 4, CMD: 52
<3>[ 1.488159] mmc1: [MMC] CMD TIMEOUT STATUS: 4, CMD: 52
<3>[ 1.511444] mmc1: [MMC] CMD TIMEOUT STATUS: 4, CMD: 5
<3>[ 1.511779] mmc1: [MMC] CMD TIMEOUT STATUS: 4, CMD: 5
<3>[ 1.512084] mmc1: [MMC] CMD TIMEOUT STATUS: 4, CMD: 5
<3>[ 1.512390] mmc1: [MMC] CMD TIMEOUT STATUS: 4, CMD: 5
<4>[ 1.548614] [<c0d7bb08>] (dump_stack+0x20/0x24) from [<c073f974>] (warn_slowpath_common+0x64/0x74)
<4>[ 1.548614] [<c073f974>] (warn_slowpath_common+0x64/0x74) from [<c073f9c4>] (warn_slowpath_fmt+0x40/0x48)
<6>[ 1.588836] mmio_probe
<6>[ 1.589508] mmio_camera mmio_camera: MMIO driver initialized with minor=42
<6>[ 1.589538] mmio_camera mmio_camera: system_rev 7, NCP6914 Camera Sub-PMIC
<7>[ 1.595886] mmio_cam_power_pin_control pin : 2 , state 1
<7>[ 1.596466] mmio_cam_power_pin_control pin : 2 , state 0
<4>[ 1.624908] [<c0d7bb08>] (dump_stack+0x20/0x24) from [<c073f974>] (warn_slowpath_common+0x64/0x74)
<4>[ 1.624908] [<c073f974>] (warn_slowpath_common+0x64/0x74) from [<c073f9c4>] (warn_slowpath_fmt+0x40/0x48)
<6>[ 1.636779] asoc: snd-soc-dummy-dai <-> ux500-msp-i2s.0 mapping ok
<4>[ 1.668792] mmc1: host does not support reading read-only switch. assuming write-enable.
<6>[ 1.700103] mmc1: new high speed SDHC card at address 0007
<6>[ 1.700683] mmcblk1: mmc1:0007 SD8GB 7.21 GiB
<6>[ 1.702301] mmcblk1: p1
<6>[ 2.112426] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: errors=panic
<6>[ 2.246673] EXT4-fs (mmcblk0p2): recovery complete
<6>[ 2.247863] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: nomblk_io_submit,errors=remount-ro
<6>[ 2.299285] fs_mgr: Running /system/bin/e2fsck on /dev/block/mmcblk0p2
<6>[ 2.491821] e2fsck: /dev/block/mmcblk0p2: recovering journal
<6>[ 2.491882] e2fsck: /system/bin/e2fsck: unable to set superblock flags on/dev/block/mmcblk0p2
<6>[ 2.581146] EXT4-fs (mmcblk0p2): recovery complete
<6>[ 2.583099] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: journal_async_commit,errors=panic
<6>[ 2.625762] EXT4-fs (mmcblk0p4): recovery complete
<6>[ 2.626617] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: nomblk_io_submit,errors=remount-ro
<6>[ 2.669433] fs_mgr: Running /system/bin/e2fsck on /dev/block/mmcblk0p4
<6>[ 2.741790] e2fsck: /dev/block/mmcblk0p4: recovering journal
<6>[ 2.741851] e2fsck: /system/bin/e2fsck: unable to set superblock flags on/dev/block/mmcblk0p4
<6>[ 2.781799] EXT4-fs (mmcblk0p4): recovery complete
<6>[ 2.782684] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: journal_async_commit,errors=panic
<6>[ 2.803741] EXT4-fs (mmcblk0p7): recovery complete
<6>[ 2.804870] EXT4-fs (mmcblk0p7): mounted filesystem with ordered data mode. Opts: nomblk_io_submit,errors=remount-ro
<6>[ 2.849517] fs_mgr: Running /system/bin/e2fsck on /dev/block/mmcblk0p7
<6>[ 2.897705] e2fsck: /dev/block/mmcblk0p7: recovering journal
<6>[ 2.897766] e2fsck: /system/bin/e2fsck: unable to set superblock flags on /dev/block/mmcblk0p7
<6>[ 2.912231] EXT4-fs (mmcblk0p7): recovery complete
<6>[ 2.913024] EXT4-fs (mmcblk0p7): mounted filesystem with ordered data mode. Opts: journal_async_commit,errors=panic
<6>[ 2.920623] EXT4-fs (mmcblk0p9): mounted filesystem with ordered data mode. Opts: errors=panic
<7>[ 3.355377] EXT4-fs (mmcblk0p5): ext4_orphan_cleanup: deleting unreferenced inode 41301
<7>[ 3.362243] EXT4-fs (mmcblk0p5): ext4_orphan_cleanup: deleting unreferenced inode 40447
<7>[ 3.367767] EXT4-fs (mmcblk0p5): ext4_orphan_cleanup: deleting unreferenced inode 64030
<7>[ 3.367858] EXT4-fs (mmcblk0p5): ext4_orphan_cleanup: deleting unreferenced inode 64025
<7>[ 3.370513] EXT4-fs (mmcblk0p5): ext4_orphan_cleanup: deleting unreferenced inode 56153
<7>[ 3.374267] EXT4-fs (mmcblk0p5): ext4_orphan_cleanup: deleting unreferenced inode 8012
<6>[ 3.374481] EXT4-fs (mmcblk0p5): 6 orphan inodes deleted
<6>[ 3.374511] EXT4-fs (mmcblk0p5): recovery complete
<6>[ 3.398315] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: nomblk_io_submit,errors=remount-ro
<6>[ 3.449951] fs_mgr: Running /system/bin/e2fsck on /dev/block/mmcblk0p5
<6>[ 3.850677] e2fsck: /dev/block/mmcblk0p5: recovering journal
<6>[ 3.850738] e2fsck: /system/bin/e2fsck: unable to set superblock flags on /dev/block/mmcblk0p5
<7>[ 4.324157] EXT4-fs (mmcblk0p5): ext4_orphan_cleanup: deleting unreferenced inode 41301
<7>[ 4.331481] EXT4-fs (mmcblk0p5): ext4_orphan_cleanup: deleting unreferenced inode 40447
<7>[ 4.337310] EXT4-fs (mmcblk0p5): ext4_orphan_cleanup: deleting unreferenced inode 64030
<7>[ 4.337463] EXT4-fs (mmcblk0p5): ext4_orphan_cleanup: deleting unreferenced inode 64025
<7>[ 4.340911] EXT4-fs (mmcblk0p5): ext4_orphan_cleanup: deleting unreferenced inode 56153
<7>[ 4.344512] EXT4-fs (mmcblk0p5): ext4_orphan_cleanup: deleting unreferenced inode 8012
<6>[ 4.344940] EXT4-fs (mmcblk0p5): 6 orphan inodes deleted
<6>[ 4.344970] EXT4-fs (mmcblk0p5): recovery complete
<6>[ 4.365631] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: discard,noauto_da_alloc,journal_async_commit,errors=panic
<3>[ 6.199615] u8500_shrm shrm_bus: common receive with l2 header 210 failed
<4>[ 6.279571] [<c0d7bb08>] (dump_stack+0x20/0x24) from [<c073f974>] (warn_slowpath_common+0x64/0x74)
<4>[ 6.279602] [<c073f974>] (warn_slowpath_common+0x64/0x74) from [<c073fa40>] (warn_slowpath_null+0x2c/0x34)
<3>[ 21.941711] end_request: I/O error, dev mmcblk0, sector 3078528
<3>[ 32.071746] end_request: I/O error, dev mmcblk0, sector 3321888
<3>[ 32.073638] end_request: I/O error, dev mmcblk0, sector 3322784
<3>[ 34.127593] end_request: I/O error, dev mmcblk0, sector 2155520
<3>[ 34.253173] end_request: I/O error, dev mmcblk0, sector 3083136
<3>[ 34.792480] end_request: I/O error, dev mmcblk0, sector 1544704
<3>[ 35.217437] end_request: I/O error, dev mmcblk0, sector 3074040
<3>[ 35.709747] mmc2: [MMC] CMD TIMEOUT STATUS: 4, CMD: 52
<3>[ 35.710083] mmc2: [MMC] CMD TIMEOUT STATUS: 4, CMD: 52
<3>[ 35.734436] mmc2: [MMC] CMD TIMEOUT STATUS: 4, CMD: 8
<6>[ 35.811065] mmc2: new high speed SDIO card at address 0001
<3>[ 36.042938] end_request: I/O error, dev mmcblk0, sector 3071560
<4>[ 36.340393] sdio_reset_comm():
<4>[ 38.452423] Unknown PRIVATE command WLS_BATCHING GET - ignored
<4>[ 38.453887] Unknown PRIVATE command WLS_BATCHING STOP - ignored
<3>[ 44.364715] end_request: I/O error, dev mmcblk0, sector 3689008
<3>[ 44.548583] end_request: I/O error, dev mmcblk0, sector 3724064
<3>[ 62.210357] end_request: I/O error, dev mmcblk0, sector 3716120
<3>[ 62.472076] end_request: I/O error, dev mmcblk0, sector 3690320
<3>[ 62.775665] end_request: I/O error, dev mmcblk0, sector 3716184
<3>[ 75.980651] end_request: I/O error, dev mmcblk0, sector 3724512
<3>[ 82.332397] end_request: I/O error, dev mmcblk0, sector 2794080
<3>[ 84.947631] end_request: I/O error, dev mmcblk0, sector 3876768
<3>[ 84.949829] end_request: I/O error, dev mmcblk0, sector 3875328
<3>[ 84.959594] end_request: I/O error, dev mmcblk0, sector 3869184
<3>[ 84.960906] end_request: I/O error, dev mmcblk0, sector 3866992
<3>[ 84.962799] end_request: I/O error, dev mmcblk0, sector 3871616
<3>[ 84.965332] end_request: I/O error, dev mmcblk0, sector 3866848
<3>[ 84.967163] end_request: I/O error, dev mmcblk0, sector 3866944
<3>[ 84.969177] end_request: I/O error, dev mmcblk0, sector 3870088
<3>[ 84.971954] end_request: I/O error, dev mmcblk0, sector 3878192
<3>[ 84.973846] end_request: I/O error, dev mmcblk0, sector 3877888
<3>[ 84.991668] end_request: I/O error, dev mmcblk0, sector 3867520
<3>[ 84.993743] end_request: I/O error, dev mmcblk0, sector 3871424
<3>[ 84.998046] end_request: I/O error, dev mmcblk0, sector 3886120
<3>[ 85.004394] end_request: I/O error, dev mmcblk0, sector 3866016
<3>[ 100.235717] end_request: I/O error, dev mmcblk0, sector 3716664
<3>[ 100.686798] end_request: I/O error, dev mmcblk0, sector 3716728
<3>[ 107.611114] end_request: I/O error, dev mmcblk0, sector 3723728
<3>[ 116.956024] end_request: I/O error, dev mmcblk0, sector 3725024
<3>[ 117.235870] end_request: I/O error, dev mmcblk0, sector 3716960
<3>[ 117.372741] end_request: I/O error, dev mmcblk0, sector 3725088
<3>[ 123.722656] end_request: I/O error, dev mmcblk0, sector 3717024
<3>[ 123.910125] end_request: I/O error, dev mmcblk0, sector 3079640
<3>[ 128.908752] end_request: I/O error, dev mmcblk0, sector 3079712
<3>[ 129.095489] end_request: I/O error, dev mmcblk0, sector 3079776
<3>[ 129.182556] end_request: I/O error, dev mmcblk0, sector 3079840
<3>[ 129.626342] end_request: I/O error, dev mmcblk0, sector 1546240
<3>[ 132.953887] end_request: I/O error, dev mmcblk0, sector 3725248
<3>[ 132.995880] end_request: I/O error, dev mmcblk0, sector 3079680
<3>[ 133.043151] end_request: I/O error, dev mmcblk0, sector 3079744
<3>[ 133.115478] end_request: I/O error, dev mmcblk0, sector 3079808
<3>[ 146.493164] end_request: I/O error, dev mmcblk0, sector 3079976
<3>[ 156.772979] end_request: I/O error, dev mmcblk0, sector 3085152
<3>[ 189.913391] end_request: I/O error, dev mmcblk0, sector 2504704
<3>[ 223.977478] end_request: I/O error, dev mmcblk0, sector 2798968
<3>[ 455.043640] end_request: I/O error, dev mmcblk0, sector 3410928
<3>[ 455.045532] end_request: I/O error, dev mmcblk0, sector 3417352
<3>[ 455.047393] end_request: I/O error, dev mmcblk0, sector 3451248
<3>[ 455.049499] end_request: I/O error, dev mmcblk0, sector 3362560
<3>[ 455.051147] end_request: I/O error, dev mmcblk0, sector 3343104
<3>[ 455.053039] end_request: I/O error, dev mmcblk0, sector 3481160
<3>[ 455.055145] end_request: I/O error, dev mmcblk0, sector 3341440
<4>[ 1770.800903] Unknown PRIVATE command WLS_BATCHING GET - ignored
<4>[ 1770.802154] Unknown PRIVATE command WLS_BATCHING STOP - ignored
<3>[ 1806.052703] end_request: I/O error, dev mmcblk0, sector 3716824
root@codina:/ # dmesg | grep mmc* > wat.txt
dmesg | grep mmc* > wat.txt
sh: can't create wat.txt: Read-only file system
write: Broken pipe

I even tried to clear the internal flash memory from Linux Ubuntu by unmounting internal memory card in CWM Recovery and mounting it as Linux drive, but when I excecuted

dd if=/dev/zero of/dev/sdb1

and waited for ~2 hours, unmounted drive in Linux and mounted it back in Recovery, nothing happend. It still shows than at sdcard is AOSP.

What I can do with this phone? I have no warranty anymore, because the original system worked very poorly and even if I wanted to - I can't install it, because Samsung Kies does not recognise the phone. Is there any step-by-step tutorial about wiping contents of internal memory card and installing Android on sd card?