yashsingh1/xdaforums huggingface dataset:
[Xperia Z2 Q&A, Help & Troubleshooting] 5ageman:
Hello, as the title says, Im new to Sony smartphones, Xperia Z2 is my first sony phone.

Now I would like to get some things clear...

Ive read that I dont have to unlock my bootloader to root my Z2 with 5.1.1

If I do it this way, will I be able to flash roms and kernels normally or is there a difference between locked and unlocked bootloader for roms?

If I unlock my bootloader I loose my DRM keys, now what does that mean in practice? I have read that camera algorythms can cease to work in Xperia Z3 case, but since Z3 and Z2 are basically the same device does this apply to Z2 too?

So basically, I know what I can gain with unlocking and rooting, but what exactly will I loose?

TIA
[Xperia Z2 Q&A, Help & Troubleshooting] Bruce666:
1. If you unlock bootloader you will be able to flash custom kernels and ROMs based on custom kernel (stock-based ROMs like ExistenZ work on locked bootloader).

2. Yes you will loose DRM Keys, but you can backup them before unlocking and restore to lock bootloader, but you need root. To do this you have to downgrade your Android to 5.0.2 (I prefer 23.1.A.1.28) and root via KingRoot

In practice, losing DRM Keys disables e.g. X-Reality or Noise Reduction in camera.

3. Without DRM Backup you'll loose your warranty. With DRM Backup, when you'll have to send ur phone to repair, you restore DRM keys and you have warranty again. You lose many advanced camera functions and image correction like X-Reality.
[Xperia Z2 Q&A, Help & Troubleshooting] 5ageman:
I see, so I do loose some valuable features by unlocking the bootloader the same as I do with the Z3. Then its a no go for me, I checked out the Existenz rom and I think it will suffice with its features for an android poweruser.

And one more question, does the 20mp in superior auto xposed module produce good pics, do I loose quality comparing to pics taken in 8mpix?
[Xperia Z2 Q&A, Help & Troubleshooting] Bruce666:
I don't know I didn't try this. As I remember Z5 camera supports 20MP in SA and this is available in ExistenZ but im not sure.
[Xperia Z2 Q&A, Help & Troubleshooting] Knutselmaaster:
You don't need to unlock the bootloader to root.

This is only needed if you want to flash another kernel.

Some roms need that and some don't.

Most of the rom makers use [LB] for locked and [UB] for unlocked in the title of their roms topic to indicate compatibility.

Normally the roms for unlocked bootloader are in the "http://xdaforums.com/xperia-z2/orig-development" and the ones for locked bootloader in "http://xdaforums.com/xperia-z2/development" forums but that is not always the case and some are usable in both cases.
[Xperia Z2 Q&A, Help & Troubleshooting] rockyy:
Sorry that i join this thread, but i understand his problem.

I had Xperia Z and i only used towelroot and was happy. now i got a XZ2 and iam trying since hours to get it rooted.

First of all i flashed a clear 5.1.1 and found out, that i can't flash it. so i went down to 5.0.2 (D6503_23.1.A.1.28_Customized DE) and i should use easyroot (doesnt work)

error: only position independent executables (PIE) are supported.

done

Checking if device is rooted...

Error: device not rooted

Towelroot also doesnt work. So is there any option to get it rooted?
[Xperia Z2 Q&A, Help & Troubleshooting] Mokiwipeout:
Your question has been answered a bazillion times...

Search a bit, and you should find the answer.
[Sony Xperia T, TL, TX, V] palomino7:
Hi, I need incease partitions of Userdata. I found some tutorials and for me it looks fine this: http://xdaforums.com/showthread.php?t=2710480.

Unfortunatelly I can't go over step about remove partitions because according to log are being used. I tried a lot of possibility with parted and fdisk but somehere I do mistakes. Can me help with this. See attachment with my steps. Thanks.

[IMG="Logs"]http://s15.postimg.org/nv23gu3tn/parted.jpg[/IMG]
[Sony Xperia T, TL, TX, V] palomino7:
I found solution after many experiments. The biggest problem it was unmount partitions and then these partitions remove. These things were possible do in OMNI ROM 4.4.4 over ADB. I found this solution here: http://xdaforums.com/showthread.php?t=2712253&page=11

My steps:

0 - You download scripts fs-utils from here - http://xdaforums.com/showthread.php?t=2712253 and copy to MicroSDCard

1 - Install OMNIROM 4.4.4

2 - I was fighting with connection of ADB. I can't run ADB Sideload because I can't connect. I was only freely in recovery menu. I used following commands:

adb shell (this command connect command line to phone and in prompt I had something this ~ # 6 --> don't worry ... try to command ls and if will be listed folder from mobile so thats OK)

adb kill-server

adb start-server

adb devices

You have to try so long until will not correct adb shell .

3 - Now I had the biggest problem. At any cost you have to run unmount(command UMOUNT) and remove(command RM) partitions.

umount /sdcard

umount /data

parted /dev/block/mmcblk0

rm 14

rm 15

mkpartfs logical ext2 1621 5865

name 14 Userdata

mkpartfs logical ext2 5865 7818

name 15 SDCard

quit

These commands must be done. If not something is wrong and you have to fix it some way.

Then it's easy. Run following commands

cd /ext_card/fs-utils

tune2fs -j /dev/block/mmcblk0p14

tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p14

e2fsck -fpDC0 /dev/block/mmcblk0p14

tune2fs -j /dev/block/mmcblk0p15

tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p15

e2fsck -fpDC0 /dev/block/mmcblk0p15

chown -R 2800:2800 /sdcard

After all steps I didn't have mounted internal SDCard. This is very small problem. In new recovery I formated as vfat and then I formated as ext4 and after restart it was mounted. Resize internal sdcard for apps DONE.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] TDK29:
Hi,

is there any way to change the quick settings bar to a more Sense like style?

I came from a HTC and i really miss the option to see all relevant settings at one screen and can quickly change the settings and not only switch them on and off...

Thanks!
[Galaxy S6 Edge Q&A, Help & Troubleshooting] jadaress1:
If u long press the toggle the settings page for that toggle appears
[Nexus 6P Q&A, Help & Troubleshooting] wilflare:
On my Nexus 6P's Google Contacts, there's a "ME" Contact.

Is there anyway to sync or link it to my own personal contact details?
[Nexus 6P Q&A, Help & Troubleshooting] nycebo:
If you already have a contact entry for yourself with your email address in it, then adding your email address to the Me contact should link/join the two together.
[Nexus 6P Q&A, Help & Troubleshooting] wilflare:
I do but it doesn't work for some reason :(
[Nexus 6P Q&A, Help & Troubleshooting] Ves:
There is no way to sync it. I've been sending feedback about it for years.
[Nexus 6P Q&A, Help & Troubleshooting] wilflare:
does this affect the image on the phone's user profile as well?
[Nexus 6P Q&A, Help & Troubleshooting] sweetpiggy:
try this:

put your gmail into 'me' contact, link this local contact with your g+ profile. Eventually, open g+/settings/yourgmail/contact switch on contact access.
[Nexus 6P Q&A, Help & Troubleshooting] wilflare:
thanks! will this affect the User Account on my phone as well?
[Nexus 6P Q&A, Help & Troubleshooting] Ves:
If you turned on the contact optionin Google+ it will sync that photo across devices. But one you chose from the device should only be usable on the device itself. But correct me if I'm wrong here.
[Galaxy Note II Q&A, Help & Troubleshooting] MeiR_ct:
Hello.

My SGN2 have classic SDS symptoms (or maybe half SDS): Stuck at boot logo screen, recovery mode shows variuos of mount errors, and Odin fails to flash any file in download mode right after attempting to access NAND.

The device had rooted stock rom with Android 4.4.2 before of dying, and I can see the "product name" in download mode, so there's a possibility that actually it's not the famous sudden death syndrome, but some other kind of eMMC corruption.

After lots of search efforts which didn't lead me to an answer, I want to know from exprienced users if there's a known way to dump plain data out of the eMMC, with JTAG or eMMC reader / adapter, or other external equipment.

I saw in several tutorials that JTAG softwares have a read method. Does it access the direct sectors of the eMMC in low level, or it requires the same normal successful mounting in order to work?

Also, from what I understood, when mounting the eMMC with one of mentioned special devices, it's recognized on PC as a regular removable disk, similarly to a USB flash disk. Perhaps a program like "testdisk" will be able to achieve what I wish?

In addition, this woderful research thread mentions direct MMC commands that can be performed in some manner (I have no enough knowledge to understand how).

As [MENTION=3682533]AdamOutler[/MENTION] mentions in post #112 over there, he tried to develop a solution together with [MENTION=3036272]Oranav[/MENTION] and [MENTION=1767826]Rebellos[/MENTION]. Is there anyone who is familiar with this approach?

I'm mentioning also [MENTION=591147]Entropy512[/MENTION], [MENTION=304216]vim1[/MENTION], [MENTION=4167023]AndreiLux[/MENTION] and [MENTION=4372730]E:V:A[/MENTION], which seem to have the knowledge according to that thread, hoping that someone can contribute to my thread here.

Thanks in advance for any help!

Meir
[Galaxy Note II Q&A, Help & Troubleshooting] Rebellos:
What recovery do you have? Does it have adb shell access through USB?

If so - you should be good to go with high level solution. If not, try flashing it with TWRP.

Mind you it might brick your phone "even more" if flashing fails somehwere in the middle.

It's possible to dump mmc using

dd if=/dev/block/mmcblk0 of=/sdcard/dump.bin

(you need a SDcard mounted, so there's somewhere to dump to).

If my memory serves me well, if this is indeed a SDS - the eMMC will "freeze" once a broken memory block gets accessed. It will remain unresponsible until power-cycled - this can be done either by resetting the phone, or manipulating PMIC settings in the system.

So you'd want to read certain blocks from MMC - http://www.thelinuxdaily.com/2010/03/write-to-or-read-from-a-given-sector-using-dd/ and reboot your phone once you hit the bad one.

However, mind you, SDS was triggered by something. And that was a certain MMC command (TRIM) sent over during flashing by an unpatched system/recovery. Did this happen after some try to flash the device? It still might be some weird way of SDS or, as you said yourself, some other kind of corruption. The device itself is pretty old...

If you cannot reach it through recovery. We're talking another level of complexity.

JTAG would be your best shot, as it's fairly easily accessible and relatively easy to solder. It can break the CPU execution at any given moment, and then either upload a payload, or work directly through JTAG.

A payload would make the CPU configure eMMC and do the necessary stuff - like dumping parts of it to RAM (making it downloadable by JTAG, in process). JTAG could basically do the same, just slower. I am pretty sure there is a (most likely paid) software out there to do exactly that, but I have no experience with it whatsoever. I'm just familiar with the process.

It is also possible to hookup bare eMMC chip as a legacy SD card. But it's really tough (it's hard to imagine how small the chip connections really are, until you try to solder them). See my recent post about that:

http://xdaforums.com/hardware-hacki...e-lumia-to-t2798431/post64703284#post64703284
[Galaxy Note II Q&A, Help & Troubleshooting] grwalker:
Hi Rebellos

What level of success do you think could be had with re-partitioning the emmc by trying to use the patched PIT's contained in the zip file "pits-N7100---FOR-EXPERTS-ONLY.zip" contained at the end of the thread http://xdaforums.com/showthread.php?t=1667886

I can only get to download mode using USB jig. Otherwise screen shows "firmware encountered an error..." Regular flashing of stock PIT does not work. Phone never rooted and running stock 4.4.2. Just died one day.

Thanks in advance
[Galaxy Note II Q&A, Help & Troubleshooting] Bunsenbrenner:
have you search this error? I think no ! The forums are full with this error..... !!! a little bit Google "firmware encountered an error" and you have 447.000 Posts :D

and i have offered in last Post to help you with PM .... but no reaction :eek:

pls Do not say THX Press Button Thanks! it has helped................;)
[Galaxy Note II Q&A, Help & Troubleshooting] MeiR_ct:
[MENTION=1767826]Rebellos[/MENTION], I already have TWRP recovery, and I can access the device through adb, but it looks like it doesn't mount the external sdcard.

When I go to "Mount" menu in TWRP and press "External SDCard", I get this output in console:

[COLOR="Red"]E: Unable to mount '/external_sdcard'[/COLOR]

And this is "mount" output inside adb shell:

~ # ←[6nmount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime)

"cat /proc/devices" output:

~ # ←[6ncat /proc/devices
cat /proc/devices
Character devices:
1 mem
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
21 sg
29 fb
81 video4linux
89 i2c
108 ppp
116 alsa
128 ptm
136 pts
153 spi
180 usb
188 ttyUSB
189 usb_device
204 ttySAC
216 rfcomm
243 ump
244 mali
246 roccat
247 BaseRemoteCtl
248 media
249 ttyGS
250 usbmon
251 hsicctl
252 tzic
253 dia
254 rtc

Block devices:
1 ramdisk
259 blkext
7 loop
8 sd
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
179 mmc
254 device-mapper

"cat /proc/partitions" output:

~ # ←[6ncat /proc/partitions
cat /proc/partitions
major minor #blocks name

179 0 30657536 mmcblk0
179 1 30656512 mmcblk0p1

I tried to use the "dd" command you suggested in order to dump despite the above, and surprisingly, when I opened another terminal window, and used "kill" several times to track the "dd" progress, it showed in the first terminal:

~ # ←[6ndd if=/dev/block/mmcblk0 of=/sdcard/dump.bin
dd if=/dev/block/mmcblk0 of=/sdcard/dump.bin
1492162+0 records in
1492161+0 records out
763986432 bytes (728.6MB) copied, 53.898640 seconds, 13.5MB/s
2888160+0 records in
2888160+0 records out
1478737920 bytes (1.4GB) copied, 104.709910 seconds, 13.5MB/s
3251936+0 records in
3251936+0 records out
1664991232 bytes (1.5GB) copied, 118.393067 seconds, 13.4MB/s
3418080+0 records in
3418080+0 records out
1750056960 bytes (1.6GB) copied, 124.486490 seconds, 13.4MB/s

But then, as you predicted, the process suddenly halted, and the device restarted.

I connected the SD card directly to my PC and I couldn't see a file named "dump.bin".

And some weird thing- when I connect with adb again, the "mount" shows the same output, but "cat /proc/partitions", which listed "mmcblk0" and "mmcblk0p1" before, is now empty:

~ # ←[6ncat /proc/partitions
cat /proc/partitions
major minor #blocks name

Is it possible that the "dd" process damaged the mmc even more?
[Galaxy Note II Q&A, Help & Troubleshooting] MeiR_ct:
Okay, I found out what happened with "cat /proc/partitions", and apparently it's bad news.

It's always empty when the external sd card is not connected to the device, and not empty when it's connected.

I'm afraid that means that emmc partitions are not recognized at all..

So my only hope is using external boxes?
[Galaxy Note II Q&A, Help & Troubleshooting] Rebellos:
I think Josh from Mobiletechvideos was experimenting with that technique. It all depends on the block of eMMC that's damaged. If it's something around the beggining of the flash memory where bootloaders, GPT and PIT reside. It's probably impossible to walk-around with PIT patching. If it's somewhere further. It might be possible to fix it with patched PIT. Even if it worked, though - I wouldn't trust such device anymore when holding data.

Oh, sorry. I forgot to tell you - please post "dmesg" output if you can access the adb. But yeah, as far as I remember mmcblk0 should be eMMC, not external-sd. So it's a bad sign. But eMMC *must* be accessible because, obviously, bootloaders and recovery are being loaded succesfully from there.

About previous post - if mounting SD card failed (probably because TWRP expects to find it under mmcblk1 device node), you will be dumping files into RAM filesystem (this is how Linux behaves). SGS2 has, as far as I remember, 2GB of RAM. So after using all RAM available for in-memory rootfs, your phone crashed.

As long as you don't mix up "if" and "of" parameters of dd command - you shouldn't damage the device anymore.

What's more - when your recovery is already fully loaded into RAM and it occurs eMMC error - your phone shouldn't reboot, but rather burst out a load of errors into kernel log (dmesg). Kernel has no reason to panic as it can still execute.
[Galaxy Note II Q&A, Help & Troubleshooting] Rebellos:
It reboots when dumping to RAM fs because kernel runs out of memory and panics.

(Awesome idea with grep - much easier for me, when on mobile ;) )

As suspected, though oddly. Internal eMMC controller is frozen already when recovery is running. The best shot would be power-cycling it through disabling and enabling the said vtf_2.8v regulator, hoping it doesn't power your CPU aswell. It can probably be done through sysfs. After that, another SDHCI driver probe should be somehow forced - I've got no idea how to do it without modifying kernel. But it might be doable. Try to do some lookup. I will aswell.

Remember dmesg is your best friend here. :3

//edit: Kernel patching itself is not an issue. Flashing it is, in your case. I suggest we try it as a last effort. Kexec, if supported by your current recovery kernel, is promising aswell.
[Galaxy Note II Q&A, Help & Troubleshooting] MeiR_ct:
First of all, I must thank you for your help and efforts so far.

My linux knowledge is quite low, so even before the driver task, I don't really know how to manipulate the vtf_2.8v regulator.

I made some search and saw there's a regulator interface API which should be accessed by some C language compiled script.

regulator_disable(regulator);
regulator_enable(regulator);

But I have no idea how to compile it correctly and initiate it after boot.

Can you please instruct me or to send me learning it from some tutorial?
[Galaxy Note II Q&A, Help & Troubleshooting] andrewKode:
Didn't Samsung fix this problem by releasing the kernel fix in Android 4.3?
[Galaxy Note II Q&A, Help & Troubleshooting] Rebellos:
It cannot be used from "script" nor "application". It's internal kernel API, accessible only from kernel space. You would need to either:

- modify kernel (sdhci driver, most notably), build it and then flash it over recovery (risky business with damaged eMMC, but you might end up doing that)

- modify kernel, build it and launch it with kexec (it is probably not supported by your recovery kernel)

- write a separate kernel module, build it into kernel module binary (.ko) and load it using insmod. It's probably the hardest solution.

//edit:

They supposedly did IIRC. That's why it might not be actually an SDS, but something quite similar.

//edit2:

Oh damn. I just looked at your dmesg again and realized my terrible mistake. VTF_2.8V regulates external SD card connection, not eMMC... It means I have currently not a real clue about how to access your eMMC without JTAG or something.

//edit3:

Here's the answer!

Dug out from publicly available N7100 schematics.

https://github.com/omnirom/android_...id-5.1/arch/arm/mach-exynos/mach-midas.c#L850

Deasserting this GPIO should power down both VMEM_VDD_2.8V and VMEM_VDDF_3.0V PMIC outputs. Which are powering eMMC.

This function controls the said pin:

https://github.com/omnirom/android_.../arch/arm/mach-exynos/setup-mshci-gpio.c#L154

It is called here:

https://github.com/omnirom/android_...0c1b6089d70/drivers/mmc/host/mshci-s3c.c#L585

You could try to suspend kernel (more info here: https://community.freescale.com/thread/261901) but it'll probably not suspend eMMC device, as it's not probed succesfully at all.

So a "proper" hack-around would power cycling eMMC around here:

https://github.com/omnirom/android_...0c1b6089d70/drivers/mmc/host/mshci-s3c.c#L366

by simply adding

pdata->set_power(pdev, 0); //power off
usleep(1000); //1ms sleep to make sure it is really powered down
pdata->set_power(pdev, 1); //power off

Then build the kernel + recovery and try to kexec it. If it fails, try flashing it and pray it won't break in the middle. Got no more ideas for now.
[Galaxy Note II Q&A, Help & Troubleshooting] MeiR_ct:
[MENTION=1767826]Rebellos[/MENTION], I'm afraid that I'm quite lost here due to lack of knowledge.

I found a patched kernel zip for N7100 which includes kexec in this MultiROM MOD thread (kernel download for Touchwiz ROMs in post #2), and pushed it with adb to the device, but then the recovery failed to flash it, probably because the flashing process involves accessing those unmounting directories.

The questions is whether every kernel flashing will fail for the same reason.

If the alternative is to enable kexec support in my current kernel, I have no idea how to do it. =\

I'm a native Windows user, so unfortunately I don't know how to access each of the suggested methods.
[Galaxy Note II Q&A, Help & Troubleshooting] Rebellos:
You wont flash a thing using recovery, as it flashes stuff onto eMMC, which is already unaccessible.

I had Odin flashing in mind, but I forgot that you stated being unable to flash anything through Odin aswell. Got no viable solution for now then. If obtaining the data is urgent I recommend using a commercial recovery service or someone knowledgable with doing it through jtag.

I just figured eMMC could be power cycled using direct memory writes to GPIO control registers by any application. It still wouldnt get probed again by kernel though. I could try and develop aome walk-around solution but with my current time availability it would probably take weeks, if not months.
[Galaxy Note II Q&A, Help & Troubleshooting] MeiR_ct:
Okay, it's not so surprising for me that I cannot perform any recovery actions in the current state.

I contacted some recommended phone lab recently, for replacing the chip, and they said that they have an emmc reader to USB adapter.

I will try my luck there, hoping for a chance of recovering my data.

Thank you again for your time and help [MENTION=1767826]Rebellos[/MENTION], I really appreciate it!
[Galaxy Note II Q&A, Help & Troubleshooting] Rebellos:
That's great to hear. I'm sorry couldn't help you more. Please let me know how did that go.
[Galaxy Note II Q&A, Help & Troubleshooting] MeiR_ct:
Frustration goes on!

It turned out that the lab still doesn't have mentioned eMMC to USB adapter, and it's on the way from a worldwide shipping.

The guy from the lab managed to detach the corrupted eMMC, but so far he didn't manage to revive the device after several attempts with new eMMCs.

He blames the eMMC cards supplier, but actually I'm afraid he damaged the motherboard during his attempts, although he has a very good reputation and experience handling this task.

The unfortunate is that other labs don't accept to touch the device in its current state, after someone else started the work.

He advised me to wait so he will try again, and there is nothing I can do about, since I don't have any special equipment.

It seems that instead of paying 50$ for a fix, I will have to move on to a new device, which means paying about 500$. :(

All I can hope is to be able to recover data from the detached eMMC card, while the guy will have the adapter.
[Galaxy Note II Q&A, Help & Troubleshooting] ab1009:
Hi MeiR_ct

Could this guy recover your data? please tell us how your story ended. I have a similar story.

br