[Q] HTC vision and Phone Encryption - G2 and Desire Z Q&A, Help & Troubleshooting

Hello guys, i wanted to reply to thread http://forum.xda-developers.com/showthread.php?t=1492461 but sadly forum doesnt let me due to insuficient rights (i think you need 10 posts to post in developer forums), so here is my analysis on Phone Encryption feature based on jerl92`s current CM9-vision-RC2 ROM. So feel free to move my posting whereever you feel it belongs to...
Also forum rules seem to force me to formulate a question of of this (lol), so here is my question:
Q: How to get Phone encryption running STABLE on a DesireZ aka vision device using command line vdc, or get it running anway using GUI?
A: Partially and unstable i was able to get it working using jerl92's CM9-vision-RC2 ROM : Please read below...
I wasnt able to get phone encryption working on ROMs based on newer Android codebase, but I was able to successfully encrypt a HTC vision device (Desire Z) using the following procedure for Phone Encryption with CM9-vision-RC2 ROM (which sidesteps the filesystemsizeproblem described below, FORMATS /data partition and leads in case of CM9-vision-RC2.zip to a HIGHLY unstable system afterwards):
adb shell
su
vdc cryptfs enablecrypto wipe yourpass
* The system will freeze for a few seconds (follow adb logcat), reboots and then comes up with a password prompt.
* Phone encryption password is yourpass
* After having arrived back at home screen, the device reboots after 2minutes without any indication in logcat. So you only have roughly 2 minutes time for debugging *g*.
* BUT AT LEAST ENCRYPTION WORKS AND ROM DEVELOPMENT CAN GO ON: adb shell mount | grep /data
/dev/block/dm-0 /data ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc 0 0
*vdc cryptfs cryptocomplete: 200 0
*vdc cryptfs verifypw yourpass: 200 0
*vdc cryptfs verifypw wrongpass: 200 1
I am sure jerl92 can identify the reason for those reboot loops in the logcat of such encrypted CM9-vision-RC2 system and its just one or more of the hacks at systemstart which he already applied to normal system and need to be repeated after START {cmp=com.android.settings/.CryptKeeper$Blank} in logcat!
My configuration:
* ROM: CM9-vision-RC2
* hboot-eng.img: vision.hboot-0.84.2000
* TRUE RADIO S-OFF: Despite the knowledge about different partition layouts throughout different Radio firmwares it does NOT seem to be important which Radio version is currently on the phone: I tested below's procedure with Vision_Radio_12.62.60.27_26.13.04.19, as well as with Vision_Radio_12.57.60.25_26.10.04.12-PC10IMG and Vision_Radio_12.62.60.27_26.13.04.19(From T_MOBLIE OTA 2.16.531.5, and there doesnt seem a difference in behavior).
Then I was able to identify at least 2 problems with (i think all) jerl92's ROMs using normal phone encryption using Settings | Security | Encrypt phone:
1) The /data filesystem has the wrong size (fitting mmcblk0p26 100%, which is 16 Kbytes too large)
2) There is another issue at around 50% of encryption progress. My only idea is that there is a problem encrypting the sdcard, based on logcat showing several timeouts in the mounting procedure while the encryption progress is running.
Workaround for 1):
For better understanding please read: https://source.android.com/tech/encryption/android_crypto_implementation.html
immediately after having tapped on Settings | Security | Encrypt phone, and initiating the encryption process, adb logcat shows:
D/VoldCmdListener( ): cryptfs enablecrypto inplace {}
E/Cryptfs ( ): Orig filesystem overlaps crypto footer region. Cannot encrypt in place.
(you can tap back-button to go back)
The short term solution for that error is described at https://code.google.com/p/cyanogenmod/issues/detail?id=5678#c21, and also comment #46: #c46
But use your own /data partition which is in case of HTC vision mmcblk0p26: adb shell mount | grep /data
/dev/block/mmcblk0p26 /data ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc 0 0
Following format command worked for me inside recovery using CWM after having mounted /system: /system/xbin/mkfs.ext2 -l 1143979008 /dev/block/mmcblk0p26
(alternative command mounting /data shortly to test size using df, and 1099608-16=1099592: mke2fs /dev/block/mmcblk0p26 1099592)
@jerl92: Long term solution I think should be modification of fstab (like https://android.googlesource.com/device/moto/wingray/+/android-4.1.1_r2/recovery.fstab ) as described in second part of https://jira.cyanogenmod.org/browse...issuetabpanels:comment-tabpanel#comment-10700.
Ideas on 2):
logcat is full with "W/MountService( ): Waiting too long for mReady!" during the regular GUI encryption process.
and also showing up with
"D/VoldCmdListener( ): volume mount /mnt/sdcard
W/VoldConnector( ): Unhandled event '612 Volume sdcard /mnt/sdcard mount failed - no media'
E/MountService( ): Boot-time mount failed (-2)
"
Probably there is an issue starting encryption of sdcard at 50% of total encryption progress (as part of the implementation described on http://source.android.com/tech/encryption/android_crypto_implementation.html).
And no, my microSDcard is inserted; i even made sure NOT to have special cards inserted like a goldcard, which i initially thought of the problem could be...
Other ideas to get the /data partition on vision devices encrypted
*Modified CWM as described here http://forum.xda-developers.com/showthread.php?t=1167089 for another device
*Using an old way initially designed for wildfire but it might also work on vision devices: https://github.com/guardianproject/luksunlock I wasnt able to compile using current toolchain for ICS and higher :-/
* Adopting the issue to CM10.1 and helping to develop/debug following idea: https://code.google.com/p/cyanogenmod/issues/detail?id=5678#c34, currently migrated to https://jira.cyanogenmod.org/browse/CYAN-87 (maybe someone tells Flinny for his ROMs): In which ROM does these changes flow to, so one can test them on vision devices?
So how do you guys think is the cheapest and fastest way to get our devices encrypted?
I cant "cook", nor do i know how to apply patches / modify to already existing ROMs using recovery update :-/

Related

The Brick Thread (updated 8.14.13)

First, let me define "bricked". When I say bricked, I mean it doesn't boot past the acer logo, only stops there, recovery can be attempted, but seems to always fail loading update.zip in stock recovery, or can not mount anything in custom recovery (CWM so far, haven't seen TWRP do this yet).
Updates will be listed here.
Updated 6-27:
-Added fstab, ideas and theories that I have so far, and a list of things I have noticed so far in various threads.
Updated 8-14-13:
-Added a link to a massively helpful thread concerning the Samsung Brick Bug, which is apparently what we also have. Well, the firmware of our EMMC has.
-Updated the "things to try" section in post 3 with updated information and tactics.
Ok, calling in all owners with Bricked A100s, the information for this is scattered all around multiple threads, and I would like to compile a list into 1 central thread for past and present bricked A100 owners.
Please post in with the following information if available:
Date of purchase (it can be a rough guess if you don't know)
ROM it was running, was it stock acer OTA update ICS, modded stock, CM9 etc
Did you flash and unlock the bootloader, if so, where did you get it?
Did you flash and use a custom recovery, if so, where did you get it? CWM, or TWRP?
Did you have any freezes, random reboots, odd behaviour before the brick?
Did you hard reboot (use the reset button, or hold the power button)?
Did you run a custom kernel (ezterry or any others) or stock kernel?
Did you overclock, if so what was max, and did you undervolt, if so, how low?
What have you done since the brick, any wipes, roms you've attempted to use as update.zip, any flashes attempted.
The above is no longer needed, we know now that it occurs on any and all kernels/roms and any combination of either.
I'll compile the results in the second post, and hopefully someone can maybe make more sense then I can of what is occuring.
Things I have noticed compiling data from all the threads and posts about bricking I have seen:
The brick will eventually occur regardless of the Android version or kernel installed, HC, ICS, JB, no version is any safer then another, though HC seems to take much longer to happen.
It appears to be corruption or otherwise loss of access to the GPT, which stores the partition information, as this is damaged the tablet no longer knows where to find a partition, so it fails to mount (partition here).
All reports are usually prefaced by some sort of freeze and a hard reboot to brick.
Partitions always fail to mount.
Partitions that failed to mount one try will rarely mount another (cache/recovery have done this)
Flashing different recoveries seems to make no difference in mounting.
Fastboot does seem to still work provided the bootloader is intact. It allows flashing of recovery.
CPUID> SBK doesn't work. I had figured it was our flashed bootloaders, but it seems to fail on stock bootloaders as well. Likely A100 uses a different key then A500.
Happens even on completely stock, unrooted, untouched Acer HC or ICS.
adb shell cat /sys/devices/platform/sdhci-tegra.3/mmc_host/mmc0/mmc0:0001/name shows that our EMMC is M8G2FA, and mine in particular was revision 0xB, which bricked. This can also be checked with the Got Brick Bug? app for Samsung devices, while it won't tell you accurately if you are going to brick, it will give you this information as well.
After some discussion with WDS from the CM9 team, there was a rash of these bricks on other devices as well, and seemed to be the result of a bad batch of EMMC chips, or controllers for it, that caused corruption and failure to be read from or written to. The solution was difficult, but obtainable, with NVFlash to partition around the bad area, leaving itself a separate partition for itself, an island away from the rest. Difficult and time consuming, this is not an option for us as we can NOT use NVFlash at all, we can't pass the bootloader verification for NVFlash access. Either the A100 key needs leaked or released, or Acer needs to allow us to fully unlock the bootloader (no encryption anymore) for NVFlash to be an option.
This leaves us with simple tools, ADB and Fastboot, which as long as you can get to the Acer screen, you can use.
ADB doesn't give us an out right way to create, move, delete, and modify partitions, just what is on an existing partition. So, we can use tools like DD to read from and write to any given partition, as long as the device know it exists, and is functioning within that range. If the data corruption is in say, /system, and it exists within the range of the OS, then it will not work. If it exists just outside of the OS, but then gets accessed later during usage, then it will fail. Same for any partition it may have corruption or bad sectors in, it could be any partition anywhere at anytime.
Here is a massively useful thread concerning the Samsung bug, but seems to be pretty much what we have going on ourselves.
http://forum.xda-developers.com/showthread.php?t=1644364
Filesystem Table (taken from recovery)
-------------------------------------------------------------------------------
Mount Point Filesystem Device Partition
-------------------------------------------------------------------------------
/system | ext4 | /dev/block/mmcblk0p3
/data | ext4 | /dev/block/mmcblk0p8
/cache | ext4 | /dev/block/mmcblk0p4
/misc | emmc | /dev/block/mmcblk0p5
/flexrom | ext4 | /dev/block/mmcblk0p6
/sdc | vfat | /dev/block/mmcblk1p1
/boot | emmc | /dev/block/mmcblk0p2
/recovery | emmc | /dev/block/mmcblk0p1
/sd-ext | ext4 | /dev/block/mmcblk1p2
cat /proc/partitions gives this:
------------------------------------------------------------------------------
major minor #blocks name
179 0 7815168 mmcblk0
179 1 6144 mmcblk0p1
179 2 8192 mmcblk0p2
179 3 614400 mmcblk0p3
179 4 1253376 mmcblk0p4
179 5 4096 mmcblk0p5
179 6 102400 mmcblk0p6
179 7 10240 mmcblk0p7
179 8 5801984 mmcblk0p8
179 32 31166976 mmcblk1
179 33 31162880 mmcblk1p1
*Note*
While is says /data is EXT4, I think it's actually EXT3, but since it shares with internal SD as /data/media, that may be why it shows EXT4 in some places and EXT3 in others.
EMMC filesystem partitions can't be read by normal means, they don't have a true filesystem.
VFAT is any FAT/FAT32 formatted device, so external SD shows up as VFAT.
I'm pretty certain this is not complete, there are partitions that don't show up under normal usage, so there may be hidden partitions on the device.
Ideas or theories I have and things to try
I'm pretty well convinced we suffer from bad EMMC, that corruption I mentioned in post 2. However, it could also be something as simple as the partitions get scrambled, and while they are there, they can't mount due to being damaged, so I have a few things I wanted to try (hence my request for a loaned or donated bricked A100 for testing in another post I made).
1. DD system and cache partitions, the entire thing, from a working device. (done, I did this on my own tab)
2. DD the image back to a bricked A100, since cache almost always fails to mount, DD cache.img to it (haven't tried yet, don't have a bricked unit)
3. If DD fails, check where it is failing at, it will report records in/out, however DD doesn't handle bad sectors well, and may just hang.
4. If DD fails, and doesn't return a records in/out summary (hangs) attempt fastboot flash cache cache.img (requires a mounting SD card)
5. If DD fails, and external SD is NOT mountable, then ADB Shell is out, and requires launching from adb dd, which I haven't found a way to do yet. (DD would use the image from PC, not SD)
6. If DD is completely out, and fastboot can't flash either, we'll need to work on the partitions directly, using parted or some other tools that can modify the partitions, which is beyond my abilities.
All unsuccessful.
JTAG may or may not work, as it has been mentioned that even JTAG will fail to write to the EMMC with its damaged section. At this point there is only 2 possible methods that may work:
1. Motherboard replacement. Either Acer under warranty (or out of warranty if you can get your case elevated, some users report this being possible) or you replace it yourself. It's not terribly difficult, and I can probably even make a video of it if needed.
2. Someone with a reflow station may be able to remove the EMMC from the board and replace it with a non damaged unit. This place would require a method to read/dump a good chip and be able to write this back to the new one, we can not just NVFlash a system back onto the system. I don't suggest anyone with a hair dryer or heatgun attempt this. The cost for this may be high, but maybe a deal can be worked out of a shop or person is willing to take on this job, as there are TONS of dead A100s around (and A210 appears to be prone to it also, way to go Acer!)
Prevention:
There is currently no way to prevent this, however I have begun modifying Samsung's firmware patch to maybe work with our boards. This isn't something I'm good at, or even know what I'm doing, so it may work, or may not. Information can be found in the newly included link about the brick bug in post 1, however the rundown is this: Every power up (not reboot, power on) the kernel will run a check against the model and revision of the EMMC, if it falls into a given range, then it will attempt to bypass the erase functions of the EMMC firmware so it will, idealy, not write that 32 byte section of 0s causing the EMMC to crash. If it doesn't match, then it does nothing. It's originally written for Samsung devices, of course, so requires reworking for the A100, but it may work, it may not.
I purchased it in December.
It was running the first ZeroNull MOD.
Yes, I unlocked the bootloader with a method found here.
I flashed CWM with a method found here and I used it only for backing up and for flashing the mod.
Only hardly ever it random rebooted.
I was running stock kernel, and I never overclocked/undervolted.
I tried to Wipe cache and to mount all the mountable from recovery. Nothing happened.
Oh, last thing: my tab passes the Acer green logo, but it doesn't pass this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Please, help me!
ok i have an a100 that is bricked wont boot past acer logo screen. Recovery says mmcblk0p5 is screwed and before i flashed to stock recovery cwm said mmcblk0p4 was screwed. I have a fully functional a100 with me too made backups mmcblk0p1-mmcblk0p7 and tried restoring them one by one. Some work and restore ok but others give errors. I have used this partiton table to try and attempt and restore thanks to smokku. Last night I somehow flashed the wrong img to the wrong partiton and went to recovery through update.zip in stock recovery and it actually made progress about 1/3 of the way through. It has never done that before and I wished I had given it more time to complete but it was late so I gave up. I dont have the cpuid so Im stumped. Any insight would be great as this tablet is my nephews. I guess I could make a claim with acer but then I'd be out my tablet while his is being fixed. Somehow his less than 3 month old 32gb sdcard died when the tablet died too. Thanks
Coming from cm-9-26-21-b11-a100-pm with unlocked bootloader and cwm 5.5.0.4 with ezterry
Tablet had problem with play store 921 error 3 days ago I then fixed the play store and the tablet worked fine. 3 days later the battery ran out and he recharged it to never boot again.
I have v.03.06-ics unlocked bootloader and can access fastboot and adb too but partitons are borked beyond my recovery skills
/dev/block/mmcblk0p1 SS recovery (/etc/install-recovery.sh)
/dev/block/mmcblk0p2 LX boot (boot.img)
/dev/block/mmcblk0p3 AP /system ext4
/dev/block/mmcblk0p4 CC /cache ext4
/dev/block/mmcblk0p5 MC misc
/dev/block/mmcblk0p6 FX /system/vendor ext4 (flexrom.img)
/dev/block/mmcblk0p7 AB APK (p1 and p2 signatures)
/dev/block/mmcblk0p8 UA /data ext4
Ok I'm going to ask one thing, please include all of the information I requested in the first post, it will help alot in figuring out all possible causes.
Well, ok two things, second is if you have CWM or TWRP custom recoveries, please do not flash stock recovery. If you do, we only have APX mode, which we can't use, and fastboot, which is basic flashing, no real tools to use for figuring this out. CWM and TWRP will have ADB abilities, which we need the tools for.
I'll be including the full filesystem table in the third post, which will show the device partitions and where they mount do. It will help with flashing images to the proper partitions. I'll try to have that included pretty soon.
EDIT: brendan802 Says ADB does still work in stock recovery, so my above message may not be true.
Ok I flashed back to cwm 5.5.0.4 through fastboot.
Funny thing is even on the acer loading screen I can still access adb with stock recovery. I have been trying to get fastboot update update.zip to work with no success. I have rewritten all partitons I can through fastboot with no luck. I think the partiton tables need to be rewritten through adb somehow or through apx mode but the cpuid is no longer attainable
brendan802 said:
Funny thing is even on the acer loading screen I can still access adb with stock recovery. I have been trying to get fastboot update update.zip to work with no success. I have rewritten all partitons I can through fastboot with no luck. I think the partiton tables need to be rewritten through adb somehow or through apx mode but the cpuid is no longer attainable
Click to expand...
Click to collapse
CPUID doesn't matter for our devices, the SBK isn't valid for A100s.
Fastboot doesn't rewrite partitions, just dumps the information to the partition, if the partition fails to mount, it can't do anything with it anyways.
Thanks for letting me know stock recovery allows ADB, I wasn't aware of that. I'm going to try talking to morfic and faux about using parted to manually partition the device, hopefully it means we can rebuild the partitions completely, and get the system to mount then correctly, then we can start on what caused it.
pio_masaki said:
After some discussion with WDS from the CM9 team, there was a rash of these bricks on the A500 as well, and seemed to be the result of a bad batch of EMMC chips, or controllers for it, that caused corruption and failure to be read from or written to. The solution was difficult, but obtainable, with NVFlash to partition around the bad area, leaving itself a separate partition for itself, an island away from the rest.
Click to expand...
Click to collapse
Misinformation,
I was talking about the G2 (Desire Z/Vision) & it was a problem also affecting the MT4G/DHD & others.
There was no solution
waydownsouth said:
Misinformation,
I was talking about the G2 (Desire Z/Vision) & it was a problem also affecting the MT4G/DHD & others.
There was no solution
Click to expand...
Click to collapse
Ah I apologise I thought you were talking about the A500, my bad. I'll edit that to be little more accurate. However I have read about partitioning around the corruption on the A500 with NVFlash, so I know thats possible. Well, given almost ideal circumstances it is.
brendan802 said:
Funny thing is even on the acer loading screen I can still access adb with stock recovery. I have been trying to get fastboot update update.zip to work with no success. I have rewritten all partitons I can through fastboot with no luck. I think the partiton tables need to be rewritten through adb somehow or through apx mode but the cpuid is no longer attainable
Click to expand...
Click to collapse
As you seem to have a working ADB, would it be possible for you to boot to recovery, and using adb do this:
adb shell cat /proc/partitions
then copy it out and paste it in a post, then
adb shell cat /proc/cmdline
also copied into a post here
It can then be compared to a working device (mine) and see if anything is different.
For anyone on the stock bootloader, please do the same commands and report them back. It seems we used the A200 bootloader, which may be leading to this, or at least why the SBK fails. Also for any reponses, please include the recovery and if your bootloader was unlocked.
pio_masaki said:
Thanks for letting me know stock recovery allows ADB, I wasn't aware of that. I'm going to try talking to morfic and faux about using parted to manually partition the device, hopefully it means we can rebuild the partitions completely, and get the system to mount then correctly, then we can start on what caused it.
Click to expand...
Click to collapse
No thanks for all of your knowledge and support. I am giving this tab 1 more day and if I cant restore its going back to acer. I still dont understand how the recovery started actually showing the blue progress bar on the bottom instead of an immediate red triangle. I sent the wrong command with the wrong image I think something similar to this "fastboot flash ext4 mmcblk0p4.img" or mmcblk0p5.img and of course it errored due to size mismatch but then I was able to start to flash update.zip through recovery. Still baffles me
---------- Post added at 09:55 PM ---------- Previous post was at 09:50 PM ----------
Here is my output:
C:\android-sdk\platform-tools>adb shell cat /proc/partitions
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\android-sdk\platform-tools>adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
0123456789ABCDEF device
C:\android-sdk\platform-tools>adb shell cat /proc/partitions
adb server is out of date. killing...
* daemon started successfully *
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\android-sdk\platform-tools>
C:\android-sdk\platform-tools>adb shell cat /proc/cmdline
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\android-sdk\platform-tools>adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
0123456789ABCDEF device
C:\android-sdk\platform-tools>
brendan802 said:
No thanks for all of your knowledge and support. I am giving this tab 1 more day and if I cant restore its going back to acer. I still dont understand how the recovery started actually showing the blue progress bar on the bottom instead of an immediate red triangle. I sent the wrong command with the wrong image I think something similar to this "fastboot flash ext4 mmcblk0p4.img" or mmcblk0p5.img and of course it errored due to size mismatch but then I was able to start to flash update.zip through recovery. Still baffles me
---------- Post added at 09:55 PM ---------- Previous post was at 09:50 PM ----------
Here is my output:
C:\android-sdk\platform-tools>adb shell cat /proc/partitions
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\android-sdk\platform-tools>adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
0123456789ABCDEF device
C:\android-sdk\platform-tools>adb shell cat /proc/partitions
adb server is out of date. killing...
* daemon started successfully *
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\android-sdk\platform-tools>
C:\android-sdk\platform-tools>adb shell cat /proc/cmdline
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\android-sdk\platform-tools>adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
0123456789ABCDEF device
C:\android-sdk\platform-tools>
Click to expand...
Click to collapse
Odd, this is the exact same issue I just ran into. I actually kinda bricked my device earlier today, but besides that, I was testing a Jellybean build, and it was giving these exact same errors. Basically, you have no /system, or rather, nothing there. That would certainly explain why there is no booting.
This was done in bootloader, or in recovery? If this wasn't in recovery, please try there. The other option we can try is I'll upload my system.img, which IIRC has CM9, but its a full partition image, 1.2GB. Since you seem to have access to fastboot, you can do a fastboot flash system system.img and see what it does. If it still can't work, I guess you can see if DD will work in recovery, but it would need external sd to be mountable.
Also, that CPUID is interesting. As in, that isn't close to right lol
Ive already flashed a full system backup from a working a100 with no luck in fastboot. Recovery gives nothing but mount errors. I guess I need to find a way to replace the unlocked bootloader with the original locked one and send it to acer. I do appreciate your help though.
brendan802 said:
Ive already flashed a full system backup from a working a100 with no luck in fastboot. Recovery gives nothing but mount errors. I guess I need to find a way to replace the unlocked bootloader with the original locked one and send it to acer. I do appreciate your help though.
Click to expand...
Click to collapse
I think dd a full partition in adb would give better results then a data only flash but its just a theory. Thanks for taking the time to test some stuff out for us
Tapatalked from my Galaxy S II.
Bootloader v.0.03.06-ICS
TWRP Recovery
This is my output:
C:\android-tools>adb shell
~ # cat proc/partitions
cat proc/partitions
major minor #blocks name
~ # cat proc/cmdline
cat proc/cmdline
tegraid=20.1.4.0.0 [email protected] vmalloc=256M video=tegrafb [email protected]
x3db3d000 console=none usbcore.old_scheme_first=1 [email protected] brand=
acer tegraboot=sdmmc gpt
~ #
I have access to fastboot too. But I tried everything I found on the forum without good results :crying:
LeRx79 said:
Bootloader v.0.03.06-ICS
TWRP Recovery
This is my output:
C:\android-tools>adb shell
~ # cat proc/partitions
cat proc/partitions
major minor #blocks name
~ # cat proc/cmdline
cat proc/cmdline
tegraid=20.1.4.0.0 [email protected] vmalloc=256M video=tegrafb [email protected]
x3db3d000 console=none usbcore.old_scheme_first=1 [email protected] brand=
acer tegraboot=sdmmc gpt
~ #
I have access to fastboot too. But I tried everything I found on the forum without good results :crying:
Click to expand...
Click to collapse
This is a little scary, yet exactly what I was expecting. There is no partition table, at all. Unless you happened to not paste the output of cat /proc/partitions.
The other thing I noticed, in cat /proc/cmdline, there is no bootloader listed. Also, no CPUID, which is alot bootloader related. So, this explains why SBK fails, partially I think due to us using A200 bootloaders, and partially because if the bootloader is fubar, it won't pass anyways.
So we're left with either the EMMC corrupted or failed, and took the partitions with it, or its a bootloader issue, as it doesn't show up. Of course, its entirely possible the bootloader partition is also lost, which means it can't boot past the initial boot stage, the acer screen. Also explains why nothing can be mounted, but it strikes me as a little odd that recovery DOES work, but also doesn't show up in the partition list, even while IN recovery. I mean recovery runs from RAM, but it loaded from somewhere, right?
Only other option I can suggest, at least for you, LeRx79, is to flash the bootloader blob again. Fastboot will dump whatever to where ever you point it to, but doesn't mean it can actually flash it, if the partition is missing, or invalid, then it can't write to that partition, it doesn't exist.
If you still have the tools from when you unlocked the bootloader, try this:
adb reboot bootloader
fastboot flash bootloader whateverblobfileyouused
And report back if it fails, or does it, and actually attempts to boot again, and please do
adb reboot recovery
adb shell
adb cat /proc/partitions
adb cat /proc/cmdline
and see if they change.
I've got an error when I try to flash the bootloader:
FAILED <remote: <00030003>>
LeRx79 said:
I've got an error when I try to flash the bootloader:
FAILED <remote: <00030003>>
Click to expand...
Click to collapse
OK then I suppose its gone too.
Try uhm...
Adb shell
Mount /data
See what it says probably not found but report it back here.
Then try
Parted /dev/block/mmcblk0p8 print
This should return partition info for /data including internal SD. Try for device mmcblk0p1 - mmcblk0p8 and paste what it says.
Its really looking like emmc failure which means new motherboard time. Only other thing is trying to create partitions.
Tapatalked from my Galaxy S II.

[Q] Very slow and laggy Nexus

Hi! From a few months, since I started flashing new ROMs, my gnex became slower and very laggy. The real problem is that it is very slow even when flashing ROMs and other stuffs in recovery mode. I'm currently using CM10 with Franco kernel and ClockworkMod recovery. Changing kernel and wiping didn't solved anything. What could be the reason?
Try to download eMMC brickbug check, is an app that check if your memory chip is affected by a factory bug (since there's a series of chip afflicted), this bug slow down all the system and makes it very laggy. Try to take a shot, and if the result is that you are afflicted in the forum there's the solution!
No bug and no errors in memory test
1 - Backup all files on your SD card .dont include /android/ Directory.
2 - Flash Google Factory Image for 4.1.2
2.1 - Flash Latest TWRP
3 - Download "Forever Gone"
4 - Start it and let it run through your empty SD card (it'll overwrite it with 0s, it helped fix a problem on the nexus 7 and helped me with some SD card IO lags, And it removes all traces of what once was, so...)
5 - Download Rasbeanjelly 11-6 (the 4.1.2 version ) It's pure AOSP, Blazing fast and the standby drain is amazing (and notifications don't delay even when asleep )
6 - Download Trinity Kernel latest stable (Link http://goo.gl/jl1Ga )
7 - Flash the above and set up your ROM.
SECTION TWO
8 - Go to Google maps >> Location settings & turn everything off.
8.1 - If you still want location history use backitude instead of latitude
9 - Use one chat app instead of many (especially FB messenger it sucks battery big time, use IMO . It's the best, has file transfer, audio/video call, lovely interface and supports most networks even skype.
10 - Sign out of Google talk
11 - Turn off Google+ Sync
12 - Turn off Google Backup
13 - If you don't use it, Turn off Google now (i think it's nice actually).
14 - Install Betterbatterystats & BatteryMonitorWidget to keep watch of any batter hogs should they come along.
15 - Install Velis Auto Brightness
Trust me on this one with trinity & rasbeanjelly
Set the CPU to 1000thingy max/600 thingy minimum
I believe that when i get a quality phone for this kind of cash i shouldn't compromise functionality c: so i don't use battery saving apps, i need my data on and always, I get about 17 hours with ~3 hours screen time, Pm me if you need anything else ^_^
[Edit] Optional : Turn off screen touch sounds/Vibration, if you want to...
-----------------------------------------------------------------------------------
Silencing maps (preventing non user caused wakelocks)
1. Sign out and /or freeze latitude.
That's it!
Additional information:
-manual startup of maps will work anyhow, don't worry,
-navigation still works
-toggling gps on will show your current position on the map
Do you format partition cache and Dalvik cache before flashing ROM?If no then this is the problem you are facing..coz i've flashed 100's of ROMs but no problem yet!!
Wait wait wait (xD)..it's very slow even WHILE FLASHING anything (or making backups) in recovery mode (when there's the green android with the rotating blue frame inside). I can't see how changing ROM or changing settings inside the OS can solve the problem...I'm not an expert but I think it's a problem at a lower lever..like kernel, drivers, chips..something like that :silly:
..anyway..cause not an expert I tried the Trinity kernel and didn't make any difference..and I will try to use Forever Gone after I made ​​a backup and restored to factory image..
This may and probably applies.
http://forum.xda-developers.com/showthread.php?t=1971852
Sent from my Galaxy Nexus using Tapatalk 2
tiny4579 said:
This may and probably applies.
http://forum.xda-developers.com/showthread.php?t=1971852
Click to expand...
Click to collapse
Ok I made a bench and I had horrible results. This night I'll try to fix this...
Restore all to stock and these are the results:
Seems that you have the same buggy eMMC chip of type V3U00M.
The phone might slowdown again after writing some data on it. You should add discard to your mount options.
Guide (filling the partition using dd and rm is optional for you)
I don't know how to run the code of the step 3: I tried to install Android Termina Emulator and run the commands here..."su" worked and the dialog box of SuperSU appeared asking me the permission, but when I wrote "mount -o remount,discard /data" nothing appened. Sorry men..I don't know what I'm doing
He says:
Type the following commands in a Terminal or preferably an adb shell:
Click to expand...
Click to collapse
and than
Therefore using adb would be better... Some users also reported a speedup when this is done in recovery mode (CWM/TWRP) via adb.
Click to expand...
Click to collapse
How can I do that? Like...reboot into recovery mode, connect the phone to the pc, move to the folder of adb.exe and run the command as "adb su" and "adb mount -o remount,discard /data" ? ...I don't think :silly:
nicari92 said:
I don't know how to run the code of the step 3: I tried to install Android Termina Emulator and run the commands here..."su" worked and the dialog box of SuperSU appeared asking me the permission, but when I wrote "mount -o remount,discard /data" nothing appened. Sorry men..I don't know what I'm doing
Click to expand...
Click to collapse
The command did add the discard option, but it is not showing any output
nicari92 said:
[...] How can I do that? Like...reboot into recovery mode, connect the phone to the pc, move to the folder of adb.exe and run the command as "adb su" and "adb mount -o remount,discard /data" ? ...I don't think :silly:
Click to expand...
Click to collapse
Nearly right: You have to open an adb shell (using the command adb shell) and then type the commands
Well, as you don't really know what you're doing, I think that it's not such a great idea to experiment with the command line in superuser mode...
You can get the same results doing the following:
Install Script Manager from Play Store.
Download the following text file to your internal memory: remount.sh
Browse to the script in Script Manager and add it to be run at boot (Open as... Script/Executable). Make sure you check both the Boot and Su options, then press Save and Run.
Now you should be done if you don't already experience huge slowdowns of your memory (0.4-0.5 MiB/s random write is OK)
If you HAVE slowdowns, install Forever Gone. Fill your sdcard (aka securely erase deleted files) and then free the filled space. Done.
Install and run LagFix (fstrim) from Play Store. Done.
---
FYI: The code in remount.sh is the following:
Code:
#!/system/bin/sh
mount -o remount,discard /data
mount -o remount,discard /cache
Ok thanks!
Do I have to relaunch the command (or recreate the script) every time I flash a new ROM?
nicari92 said:
Ok thanks!
Do I have to relaunch the command (or recreate the script) every time I flash a new ROM?
Click to expand...
Click to collapse
After a full wipe you have to re-install the app and configure the script again to make sure it is launched on every boot.
Install seeder v1.4 too.
Look for it in XDA(free) or the Play store(paid)
--------------------------------------------------
If I have helped you.... hit that sexy thanks button. ^_^
AW: [Q] Very slow and laggy Nexus
I don't think that waiting for the random source is the problem here...
The thread I linked has an app that can run the trim command which should help io.
Sent from my Galaxy Nexus using Tapatalk 2
Direct Link
You can use it instead of dd&rm / Forever Gone. The tool does this job better and is faster, I would say it's the preferred method now.
Doesn't permanently solve the problem, though (unless you run it periodically) ...
So maybe the best is using the discard init script plus this app once.
once you have run the remount script why do you need the lagfree app?
ph4zrd said:
The command did add the discard option, but it is not showing any output
Nearly right: You have to open an adb shell (using the command adb shell) and then type the commands
Well, as you don't really know what you're doing, I think that it's not such a great idea to experiment with the command line in superuser mode...
You can get the same results doing the following:
Install Script Manager from Play Store.
Download the following text file to your internal memory: remount.sh
Browse to the script in Script Manager and add it to be run at boot (Open as... Script/Executable). Make sure you check both the Boot and Su options, then press Save and Run.
Now you should be done if you don't already experience huge slowdowns of your memory (0.4-0.5 MiB/s random write is OK)
If you HAVE slowdowns, install Forever Gone. Fill your sdcard (aka securely erase deleted files) and then free the filled space. Done.
Install and run LagFix (fstrim) from Play Store. Done.
---
FYI: The code in remount.sh is the following:
Code:
#!/system/bin/sh
mount -o remount,discard /data
mount -o remount,discard /cache
Click to expand...
Click to collapse
Thanks a million... Works like a charm.

FSTRIM and/or garbage collection impaired?

fstrim -v /cache
is a success (along with factory, config, and prob 1 more)
fstrim -v /data
returns 1 (unsupported).. yet is mounted with the discard flag (so I suppose trim is enabled?!)
Then there are a few mmc/sdhci associated 'tuning' errors in that pop up in kmsg. Also.. There is a ~300MB partition dedicated to a demo.... Not awesome.
So question part: Is trim working?
I guess not, at least i haven't been able to get it working. I hope that asus is going to fix this with an update to android 5.1

forget encryption key reset - format /sdcard /data

Few days ago I decide to encrypt my phone. And as I want to install nightly so I rebooted and it want the password but then I discover I can't remember I tried adb shell but it says that I do not have permission (sudo does not works). So what should I basically do now? use terminal/ adb shell in TWRP and format /data and /sdcard with dd, or what is way to do it correctly? I come across to this https://android.stackexchange.com/questions/33398/cannot-factory-reset-after-encrypting#48264 but it's 4 years old I do not get completely "Substitute /dev/block/mmcblk0p12 and ext4 according to the recovery filesystem table (for /data). " part. I've LG G2.
Thanks Rob
roberto32 said:
Few days ago I decide to encrypt my phone. And as I want to install nightly so I rebooted and it want the password but then I discover I can't remember I tried adb shell but it says that I do not have permission (sudo does not works). So what should I basically do now? use terminal/ adb shell in TWRP and format /data and /sdcard with dd, or what is way to do it correctly? I come across to this https://android.stackexchange.com/questions/33398/cannot-factory-reset-after-encrypting#48264 but it's 4 years old I do not get completely "Substitute /dev/block/mmcblk0p12 and ext4 according to the recovery filesystem table (for /data). " part. I've LG G2.
Thanks Rob
Click to expand...
Click to collapse
I'm not an expert on this but since every device's partition map is unique, dd should be given the specific partition offsets and filesystem type for your device when performing any destructive operations or else you run the risk of bricking your device when using dd to write to your internal flash. That's what the "substitute" part is about because it varies from device-to-device.
I would suggest checking on one of LG G2 forums here, someone there can probably give you the proper parameters. (Here is the general LG G2 section, there are also some others eg for particular carriers like T-Mobile US)
I've already asked there but no answer. I'll rahter specifically ask about how to find partition table map. Thanks anyway

Mount loopback fs crashing phone

Not sure which section to post this question but I've been trying to create & mount a local file for a project idea. Failing right a the start its been looking for information but struggling to find any logs to explain whats happening.
Phone Galaxy S5, flashed with LineageOS 15.1 (unto date)
Basically I've been trying to create a file with dd, making a filesystem then mounting.
Creating a file with dd on phone or external also running mkfs (tried exfat ext4 2fs)
The problem comes when mounting using adb or local shell app the command doesn't complete while phone reboots.
Sample shell commands used to help with understanding my issue
Code:
su -
cd /storage/(sdcard)
dd if=/dev/zero of=virtualfs bs=1024 count=10240
mkfs.exfat virtualfs
mkdir vir
mount -o loop ./virtualfs ./vir
Phone freezes, 5 seconds later reboots
I've tried running from a couple of terminals over adb with one running logcat but nothing is seen between command and reboot.
At this point I'm lost where to look for errors or what to attempt next.
without finding a way forward on this loopback issue I'm hoping someone could provide guidance.
Guessing this would be a kernel issue? how could this be confirmed

Categories

Resources