yashsingh1/xdaforums huggingface dataset:
[XDA Assist] Xstar410:
update-still not working, but...

Target boot image: /media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/boot.img

/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/boot.img maxsize=10040448 blocksize=135168 total=6676480 reserve=270336

Made boot image: /media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/boot.img

target StaticExecutable: recovery (/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/obj/EXECUTABLES/recovery_intermediates/LINKED/recovery)

target Symbolic: recovery (/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/symbols/system/bin/recovery)

target Strip: recovery (/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/obj/EXECUTABLES/recovery_intermediates/recovery)

----- Making recovery image ------

Copying baseline ramdisk...

Modifying ramdisk contents...

cp: cannot stat ‘/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/root/init.recovery.*.rc’: No such file or directory

build/core/Makefile:944: recipe for target '/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/ramdisk-recovery.img' failed

make: [/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/ramdisk-recovery.img] Error 1 (ignored)

/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/recovery.img maxsize=8177664 blocksize=135168 total=9250816 reserve=270336

error: /media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/recovery.img too large (9250816 > [8448000 - 270336])

build/core/Makefile:978: recipe for target '/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/recovery.img' failed

make: *** [/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/recovery.img] Error 1

make: *** Deleting file '/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/recovery.img'

#### make failed to build some targets (11:50 (mm:ss)) ####

build error!

I tried many things now, but I can't seem to get the recovery maxsize right during build...

im going to change the recovery size from 8000000 to 8177664
[XDA Assist] Xstar410:
update 2-not working

----- Making recovery image ------

Copying baseline ramdisk...

Modifying ramdisk contents...

cp: cannot stat ‘/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/root/init.recovery.*.rc’: No such file or directory

build/core/Makefile:944: recipe for target '/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/ramdisk-recovery.img' failed

make: [/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/ramdisk-recovery.img] Error 1 (ignored)

/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/recovery.img maxsize=8162880 blocksize=135168 total=9250816 reserve=270336

error: /media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/recovery.img too large (9250816 > [8433216 - 270336])

build/core/Makefile:978: recipe for target '/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/recovery.img' failed

make: *** [/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/recovery.img] Error 1

make: *** Deleting file '/media/xstar97/Acer/Users/xstar97/Desktop/cm12.1/out/target/product/c6522n/recovery.img'

#### make failed to build some targets (10:29 (mm:ss)) ####

I'm honestly stuck trying to build the recovery
[XDA Assist] Xstar410:
almost working

It's still saying that it's too large & i finally noticed i been missing a file called init.recovery.*.rc

I gotten boardconfig.mk all set up and correct

BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 no_console_suspend=1 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 vmalloc=312M

BOARD_KERNEL_BASE := 0x80200000

BOARD_KERNEL_PAGESIZE := 2048

# fix this up by examining /proc/mtd on a running device

BOARD_BOOTIMAGE_PARTITION_SIZE := 10485760

BOARD_RECOVERYIMAGE_PARTITION_SIZE := 8388608

BOARD_SYSTEMIMAGE_PARTITION_SIZE := 674234368

BOARD_USERDATAIMAGE_PARTITION_SIZE := 1073741824

BOARD_FLASH_BLOCK_SIZE := 131072

recovery.fstab

# mount point	fstype device	[device2]

/boot mtd /dev/block/mmcblk0p7

/cache yaffs2 /dev/block/mmcblk0p15

/data yaffs2 /dev/block/mmcblk0p13

/misc mtd /dev/block/mmcblk0p17

/recovery mtd /dev/block/mmcblk0p18

/sdcard vfat /dev/block/mmcblk0p1 /dev/block/mmcblk0

/system yaffs2 /dev/block/mmcblk0p12

/sd-ext ext4 /dev/block/mmcblk0p2

do I need to add more?

such as ...0p1 to ..0p37

what else do I need to do?
[XDA Assist] Xstar410:
I give up on cyanogenmod recovery

BUT, I found a perfect substitute for it...PhilZ recovery.img for hydro xtrm c6522 varients

I tested it & works like a charm, but the only downside is that you have to constantly connect your PC and boot(NOT FLASH) into PhilZ recovery.

so I made all steps easier by creating script(s) & provide the PhilZ recovery & stock recovery.

1. please open a terminal within the folder with all the files

2. you can either run & read the help.sh or just run setup.sh (basically the same info, but setup.sh starts the process)

to run the scripts please type "./setup.sh" without ""

the following info in the script will tell you what to do from then on.

NOTE:

DO NOT FLASH PhilZ recovery because it's NOT a standalone recovery.

click the link below to download from my dropbox, if by any chance that dropbox decides to stop allowing you to download, just PM & I WILL send you a new link personally.

philz.zip

You can check the scripts/edit them to your hearts content, but there's nothing in them that will harm your PC, device, or your mom..

also the credits

the one & only dev who built this recovery for us! is hroark13
[Sony Xperia C5 Ultra] alon3232:
Hi,

Using the C5 Ultra Dual for the last couple of days - this is the E5533 Dual french variant (original firmware as the french variant is one of the few which didn't get the latest firmware update).

Before using the phone I performed full factory reset to be on the safe side.

However, I ran into a very strange battery performance - I fully charged the C5 to 100% (SLOW !!!!!!!!!!!!!!!) - This is a thing everyone complains about and even using LG G3 1.8A charger does not speed things up - I used a USB charging meter and is shows that the actual charging current is a poor 0.65A which explains this slow charge rate. I do not have the supplied sony 850mAH charger so I can't tell what this charger is doing.

My issue is different - After disconnecting the charger at 100% battery started draining at a very alarming rate - overnight 8 hours it lost 15% in stamina mode (Wifi On - all other functions OFF - BT/GPS).

Then used the phone - battery didn't hold well, went down to %65 with minimal use but here comes the surprise - had to restart the phone - after restart phone battery went UP to 91% !!!

Again used the phone down to 70% - restarted the phone and it went up after restart to 85% !!!

I know i need to try 2 things:

1. Wipe Cache (how do you do this for the C5?)

2. Recalibrate Battery - long process

Tell me what you think

Appreciate your help
[Sony Xperia C5 Ultra] alihacker4:
I think factory rest would help
[Sony Xperia C5 Ultra] alon3232:
Factory Reset did not help - charge went from 14% suddenly to 40% and then phone shutdown after 10 minutes of use with battery drained (cannot power on phone until I charge it).

Just went with Software Repair using PCC - will report how things are after it
[Sony Xperia C5 Ultra] malih16:
Have you tried draining it to 0% and then do an offline charging to 100%.

FYI, offline charging is plugging in the charger while the phone is off, remember not to turn it on until 100%.
[Sony Xperia C5 Ultra] Mohanad.elsamaty:
I guess you can just download xposed and there's an app call battery cealibrate and its easy you just hit the button and job in done :D or you can boot into recovery and you will see the wipe Cache think
[Sony Xperia C5 Ultra] thejamesarnold:
Maybe things started to get fu*ked up when ou used that 1.8a charger. I may be wrong but Oems have plenty of reasons why they only provide certain chargers.
[Sony Xperia C5 Ultra] alon3232:
How to boot into recovery in order to wipe cache ?

How to boot into recovery in order to wipe cache ?
[Sony Xperia C5 Ultra] Mohanad.elsamaty:
Just turn off ur device and then press vol + and power together and wait till the vibrate
[Sony Xperia C5 Ultra] kanej2006:
Lol, download Xposed? That requires root access and so do most battery calibration apps.

Unfortunately, root access is not yet available for our beloved Sony Xperia C5 Ultra...
[Sony Xperia C5 Ultra] gsser:
i saw some methods that you can actually calibrate battery without root. It is a long time to do it like you have to charge and decharge it like 3 times. But i forgot how to do it and it was in a Turkish Forum. I remember it said that most of the conpanies adjust battery calibration to %90 rather than %100. So you should give it a try
[Sony Xperia C5 Ultra] Mohanad.elsamaty:
Actually it is avalible :D just doenload kingoroot on your Pc or laptop and connect your phonr but afyer you enable usb debug and it eill root you Device :)

( tested by some other users and ut works!)
[Sony Xperia C5 Ultra] skylinestan:
Which version you are referring to? As the 29.0.B.1.55 version cannot be root due to vulnerability has been fix by Sony.. But I haven't try the 29.0.B.0.161 version
[Sony Xperia C5 Ultra] scandare:
Kingoroot still failed to root this device, still searching solution
[T-Mobile Samsung Galaxy Note II] mojorisin7178:
Hi I just installed windows 10 not too long ago. And I have a tmo note 2 running cyananogenmod 12.1 the n7105 version. I cant seem to get odin to read my phone. I tried to get the lastest version of odin from here but the link is removed. I did a search and got nothing except that odin does in fact work on windows 10. So it must be my phone. Does anyone have any Idea why it is not working?
[T-Mobile Samsung Galaxy Note II] mojorisin7178:
solved

Okay so how stupid am I? I have been away for a while and so its been a while since I have used odin. I forgot that you have to put the phone in download mode in order for odin to readf the phone. Dam idiot. But I also have anotherr question. The newest odin looks different that the old one. I used to go to pda to install factory software and recoveries and such. Now I dont see a pda option. What one do I use? BL, AP, CP, csc or ums?
[T-Mobile Samsung Galaxy Note II] jrc2:
I recommend you watch this video: https://www.youtube.com/watch?v=6Rc17Hj11RM

and then: https://www.youtube.com/watch?v=-7LilFAF6lw
[Xperia Z5 Android Development] nilezon:
I have ported the Z5 Compact root method to Z5.

Please note that both recovery.img and kernel img are different from the Z5 Compact thread. Do not use recovery or kernel for Z5 Compact on your regular Z5 phone.

Disclaimer

I am well aware that this is not the nicest method of rooting, but I got the phone a few hours ago and haven't got the time to put together a better way.

Credits

[MENTION=5243932]Tommy-Geenexus[/MENTION] for Zombie kernel

[MENTION=5169444]AndroPlus[/MENTION] for Z5 recovery and guidance :good:

[MENTION=631273]Chainfire[/MENTION] for SuperSU

Guide

First, you need to unlock you bootloader (I know, I know, now stop weeping :crying::crying::crying:)

A rooted device does not boot using default kernel, so you need to install an insecure kernel.

I have repacked stock Z5 (32.0.A.4.11) kernel to disable Sony RIC, dm verity, make it insecure, etc.

Flash using:

fastboot flash boot z5_stock_fixed.img

Reboot your phone using:

fastboot reboot

And verify that it works as expected.

Now, reboot your phone to bootloader again (see info how to at the end of post).

Then issue:

fastboot boot recovery.img

This recovery is partly broken, but it works well enough to install root.

Thanks to [MENTION=5169444]AndroPlus[/MENTION] for TWRP.

The phone will boot to a black screen, but you can connect to it using ADB.

You need to manually mount the system and userdata partition by issuing:

adb shell mount /dev/block/platform/soc.0/by-name/system /system
adb shell mount /dev/block/platform/soc.0/by-name/userdata /data

If you get this error:

mount: mounting /dev/block/platform/soc.0/by-name/system on /system failed: No such file or directory

You probably just need to wait a while and try again. You usually have to wait ~120 sec for the mount to work. Be patient.

If you got /system and /data to mount, you can now push SuperSU to the phone and install it:

adb push UPDATE-SuperSU-v2.46.zip /data/media/0/
adb shell twrp install /data/media/0/UPDATE-SuperSU-v2.46.zip
adb shell rm /data/media/0/UPDATE-SuperSU-v2.46.zip

If it all works, just reboot and enjoy root:

adb reboot

Files

z5_stock_fixed.img

recovery.img (for Z5)

Extra info

Boot to bootloader by adb command:

adb reboot bootloader

or by turning off the phone, and then hold down VOL UP while plugging in the USB cable.
[Xperia Z5 Android Development] Azdian:
works like a charm, finally I can use my Z5 =)

thank you mate.
[Xperia Z5 Android Development] komugi:
Awesome, do we need to backup TA partition anymore to keep X-Reality etc?
[Xperia Z5 Android Development] Azdian:
You need to unlock the bootloader, so I don't think you can backup the TA partition.
[Xperia Z5 Android Development] Jesmugge:
Does this change anything in the kernel? Will battery life be the same?
[Xperia Z5 Android Development] rohorubo:
If you unlock yourbootloadeR TA partition it lost forever! You can't get it back and things like x-reality won't work anymore.

Gesendet von meinem E6653 mit Tapatalk
[Xperia Z5 Android Development] koziakauzu:
We know that, but it must have a way (yet to find?) to backup and restore the TA partition just like previous devices (it was possible on Z and Z1, don't know about the others)

Sent from my E6653
[Xperia Z5 Android Development] gwiqu:
are there unlocked bootloader Z5s? how do we check if our bootloader is locked?
[Xperia Z5 Android Development] Duvel999:
GOOGLE :)

Go to calls,enter *#*#7378423#*#* and go to service info-configuration.

Sent from my E6653 @ XDA Portal
[Xperia Z5 Android Development] mindstormsguy:
I ran through these instructions, and I now have root privileges, but I can't write to /system. Is there something I missed to enable this, or does this just not work?
[Xperia Z5 Android Development] nilezon:
You need to mount /system as read/write (default: read-only).

You can use an app or shell command to do this.

For example:

http://xdaforums.com/wiki/Guide:Using_the_Terminal#Mount
[Xperia Z5 Android Development] harfot:
I see I have this problem too.

Using terminal cmd

# mount -o rw,remount /system

replies

mount: Operation not permitted

Also not possible with Root Explorer

In this way it's also not possible to install Busybox.

I reinstalled kernel but didn't change anything.
[Xperia Z5 Android Development] mindstormsguy:
Operation not permitted for me too. And I also tried reinstalling the kernel before posting.
[Xperia Z5 Android Development] nilezon:
Hmm. Same for me. Maybe Sony RIC or SELinux is not fully disabled after all.
[Xperia Z5 Android Development] harfot:
[MENTION=2784807]DooMLoRD[/MENTION]:

Hello my friend,

Long time no see - hope you are doing well.

Am I wrong if I remember this "half" root once in a DooMKernel? Cannot find it but I'm sure you know the reason.

Thanks
[Xperia Z5 Android Development] AndroPlus:
It looks like Zombie kernel doesn't have changes like this:

https://github.com/AndroPlus-org/an...mmit/f0544c997bb22da293005ffcaaeeeb4a55394c8d

I think he can improve this current method...
[Xperia Z5 Android Development] nilezon:
I don't think it is needed.

Setting:

CONFIG_SECURITY_SONY_RIC=n

in kernel config seem to solve the remount rw problem.

It's much cleaner to remove Sony RIC module this way, than just patching it, IMHO.

It's sad this can't be done by just repacking stock ramdisk.
[Xperia Z5 Android Development] Azdian:
[MENTION=811738]nilezon[/MENTION] do we need a new compiled kernel for every new firmware?
[Xperia Z5 Android Development] nilezon:
You can run an older kernel, but the latest is often then best.
[Xperia Z5 Android Development] bazhip:
Is the fixed version in the main post now, then?
[Xperia Z5 Android Development] CLShortFuse:
Official DRM restore thread: http://xdaforums.com/xperia-z5/development/sony-credentials-restore-unlocking-t3296383

Please post here
[Xperia Z5 Android Development] tobias.waldvogel:
As CLShortFuse has pointed out there is now a new dedicated thread for the DRM topic.

Regarding the kernel I think the only thing left is to integrate recovery in order to have to start it via fastboot every time.

I will start to work on this in the next days and probably provide a kernel kitchen in order to automate the following steps for new kernel packages:

- Enable changes to /sytem

I.e. disable dm verity and Sony RIC

- Integrate TRWP recovery

With this you will be able to update the kernel for your device on each update and don't have to wait until someone does the change

So stay tuned ;)
[Xperia Z5 Android Development] ninestarkoko:
thank you tobias for the work, hope now there's space for some development for the Z5 line:)

Any news about that? I recently needed warranty repair for my xperia so i'd like to keep the bootloader locked for a while, as the sony service might refuse to repair unlocked devices
[Xperia Z5 Android Development] bazhip:
With CVE-2016-0728, would it be possible to get root without unlocking the bootloader? It affects kernel 3.8 and newer, and allows root acess: http://perception-point.io/2016/01/14/analysis-and-exploitation-of-a-linux-kernel-vulnerability-cve-2016-0728/
[Xperia Z5 Android Development] tobias.waldvogel:
I read this article as well in the morning. Its worth a try in order to backup the ta partition before unlocking.

However you still can't modify the systen partition as this would change the dm verity hash. As consequence the kernel would refuse to mount it. And you can't change the kernel without unlocking the bootloader, sorry.

Gesendet von meinem E6683 mit Tapatalk
[Xperia Z5 Android Development] ninestarkoko:
If we can backup TA partition and, if /when we need warranty service or sell the phone, restore it along with relocking the bootloader, then for me it's everything i need. My phone is at Sony service centre for warranty repair and i hope when it comes back you'll have some more amazing solutions for the Z5 line.

Thank you for the effort you are putting on this
[Xperia Z5 Android Development] frostmore:
I think its worth visiting how root access was gained by contacting zxz0O0, given that you are able to restore DRM, it probably will not be long before finding a way to gain root though the venerability found in CVE-2016-0728.

Hope this helps as i am waiting to get my hands on the premium and root it without losing DRM keys and TA partition.
[Xperia Z5 Android Development] asjstian:
My favorite guy, Tobias! Just flashed this stock kernel boot.img, needed SONY_RIC disabled to get busybox installed, and push via adb deodex Sony album.apk (fc all the time). But now no SD card is not showing? Any ideas?

Thanks a lot for your efforts! REALLY appreciate it :laugh::good:
[Xperia Z5 Android Development] tobias.waldvogel:
Sounds like you have a different device. The kernel image I published was for the Z5 dual (E6683). Which one do you have?
[Xperia Z5 Android Development] halfblack:
Hello.

Firstly, many thanks for this tutorial. It's clear and easy to follow.

However, I have issues with root access. I own Xperia Z5 E6653. After unlocking bootloader (firmware .200) I have followed your guide and managed to install everything without errors. However, it looks like my root is incomplete? I cannot, in any way I tried, get /system/ to mount as writable. Apps like Greenify get root access without issues.

Firstly I had a problem with writing to SDCard. Did not work for Titanium Backup - it couldn't write anything. In that case I tried both using an app, and manually, patch platform.xml to include media_rw - didn't work. Root Explorer, ES Explorer and all the other cannot mount /system/ as writable so I can't modify/replace the file.

I cannot install busybox too - no access.

Can anyone please help me with this?
[Xperia Z5 Android Development] asjstian:
And soon it seems, I must pay better attention to what I read and do.. You are absolutely right, mine is not dual version. I've been reading, over, and over again before I posted the question, but failed to see it was the kernel for another model!

Curious : what might happen running a kernel version for another model?

Best regards

---------- Post added at 10:56 PM ---------- Previous post was at 10:53 PM ----------

For busybox i belive it's because sony_ric is not fully disabled.
[Xperia Z5 Android Development] tobias.waldvogel:
There is no need to recompile the kernel. Basically it boils down to apply the changes to the init ramdisk which I mentioned in this post: http://xdaforums.com/showpost.php?p=64522022&postcount=77

I'm going to create a boot image kitchen in order to simplify these steps.
[Xperia Z5 Android Development] halfblack:
Busybox aside, I'm really worried about this write block issue. I cannot use TitaniumBackup, AdAway and many others. Judging by overwhelmingly positive response I assume there is something wrong on my end, but I cannot pinpoint the cause.
[Xperia Z5 Android Development] Funkmasterchilla:
I think you should start all over again having a look at this thread here. Your issue seems to come from SuperSU: did you try flashing it again from recovery? You then have to go in the app and it should ask you to install/update binaries then restart the phone.
[Xperia Z5 Android Development] halfblack:
Many, many thanks! That did the trick. I have redownloaded TWRP (which was exact size/date match to what I had), AndroPlusKernel (went for v8 instead of v9) and SuperSU (as well - exact match). Reflashed all in order, cleared cache/dalvik... and it works! Again, many thanks!
[Xperia Z5 Android Development] Funkmasterchilla:
Glad to here it mate :) You can now fully enjoy !
[Xperia Z5 Android Development] tobias.waldvogel:
Kernel repack package

You can also try this new kernel repack package. http://xdaforums.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605

Just run it in TWRP after flashing a new Android version. It unpacks the kernel, disables dm verity and SONY-RIC and writes it back.

So no more searching for a right kernel for your device :)
[Xperia Z5 Android Development] ninestarkoko:
Thanks, so we don't always depend on someone to repack new kernels.

About the exploit CVE-2016-0728... Did you have some time to look on that?

Many people are reporting it not working on their linux machines for different reasons https://gist.github.com/PerceptionPointTeam/18b1e86d1c0f8531ff8f

Maybe it needs to be adapted to each device differently or it might just be unexploitable on modern devices
[Xperia Z5 Android Development] zxz0O0:
SELinux prevents that vulnerability from being exploited.
[Xperia Z5 Android Development] ninestarkoko:
bad news to hear that (from our point of view). Perception point team talked about it as a "mitigation" and about possibilities to bypass it. Do you think it's false hopes anyway?
[Xperia Z5 Android Development] tobias.waldvogel:
I'm afraid there is now way as zxz0O0 already pointed out. Anyway even if you find a exploit to get root it is still not done. SELinux will prevent you from doing most of the things to get permanent root. In addition there is no way to modify the /system partition without deactivating dm-verity, and you can't get rid of dm-verity without changing the kernel. Which again would be required to unlock the bootloader in the end.

The only other option I can see would be to try to modify the bootloader itself, but this would be playing with fire as there is very high chance to brick your device.