[TOOL][2013-12-20][SS/DS] Combine CWM with ANY kernel and ramdisk - Sony Xperia M

Note: This tool requires a Linux environment to run. Tested only on Ubuntu 12.04
Please report any bugs that you found here!
This is a tool to pack CWM recovery with any kernel and ramdisk on Linux, for the Xperia M (and very likely the Xperia M Dual also, but you are advised to replace the kernel and ramdisk with the one for Xperia M Dual)
How to use:
Extract the files to any location
Place the kernel zimage as `workdir/kernel`
Write the kernel command line to `workdir/cmdline`
Place the ramdisk (must be in gzip format) as `workdir/boot/boot.gz`
Run the script `cwm-packer`
The boot image is created as `combined-boot.img`. Flash it with `fastboot flash boot combined-boot.img`
(For older versions before 2013-12-20 only) The kernel and ramdisk included is the stock C1905 kernel and ramdisk. CWM recovery is version 6.0.4.4 (same as this: http://forum.xda-developers.com/showthread.php?t=2480556)
Download:
View attachment cwm-packer-xperia-m-2013-12-20.tar.gz
(For older versions before 2013-12-20 only) https://docs.google.com/file/d/0B1i7Q5Isuy2JUWM1ZHhKcWQwR3M/edit?usp=sharing
Source code:
The tool itself is a shell script, it is the source code itself.
The CWM recovery is built using the source code on this thread: http://forum.xda-developers.com/showthread.php?t=2480556
(For older versions before 2013-12-20 only) The kernel and boot ramdisk is extracted from stock ROM.
Kernel source: https://github.com/alvinhochun/sony-xperia-m-kernel
Changelog:
2013-12-20
Updated to CWM 6.0.4.5
For whatever reason, mounting sdcard as USB storage now works.
Busybox mount now works like typical CWM
The kernel and boot ramdisk is not included
2013-10-19
Compiled with cm-10.2 sources, CWM 6.0.4.4
Major changes in partition table format to allow CWM 6.0.4.4
Allow mounting external USB storage (using OTG cable) so backup can be stored on USB flash drives
2013-10-15b
Fixed screen shift issue!
2013-10-15
Include the zimage of the stock kernel instead of the uncompressed kernel
2013-10-14
Updates init script
Recompiled recovery to use device-specific key mapping (camera focus key = back)
Click to expand...
Click to collapse
Notes: if anyone needs the older CWM 6.0.3.7 (2013-10-15b) for any reasons, you can find it in the "File" -> "Manage revisions" on Google Drive.

thank you so much bro :highfive:

it will be great you will build cwm for locked boot loader ..
we are waiting for that

jereMarfil24 said:
it will be great you will build cwm for locked boot loader ..
we are waiting for that
Click to expand...
Click to collapse
I just thought of a possible way to boot to recovery without modifying ramdisk, so it should not be long till I have a working CWM for you all.
Update: I decided not to work on CWM for locked bootloader, sorry.
Sent from my Sony Xperia M (C1905)

The recovery is updated. Please check the first post.

is this working for Locked Bootloader???
alvinhochun said:
I just thought of a possible way to boot to recovery without modifying ramdisk, so it should not be long till I have a working CWM for you all.
Sent from my Sony Xperia M (C1905)
Click to expand...
Click to collapse
sorry for my idiot question
is the tool support for installed cwm on Locked Bootloader???

Sorry, no, this tool is only useful for unlocked bootloader. Most likely useful to kernel developers to integrate CWM to their kernel (technically the boot image).
I said I thought of a way to put CWM to locked bootloader, well it would be a hacky way, may be unstable, and I will need quite some time to get it working. I also need testers who are not afraid of reflashing to factory state.
Sent from my Sony Xperia M (C1905)

Screen shift issue fixed. Please update the tool (replace recovery.gz)

I have updated this tool with CWM 6.0.4.4.

@alvinhochun please, could you make it for our Xperia ion? i'm not on linux so i cannot
here is stock kernel (sin file):
http://www.mediafire.com/download/gf6dmmgz38985f1/LT28h_6.2.B.0.211_kernel(2).sin

which offset should i use if i want to modify your tool to work with ICS/Miro..

Updated recovery to CWM 6.0.4.5

@alvinhochun
i m having error
[email protected]:~/cwm-packer$ '/home/ansebovi/cwm-packer/workdir/cmdline'
/home/ansebovi/cwm-packer/workdir/cmdline: line 1: androidboot.hardware=qcom: command not found
i m ending up on this error on ubuntu 13.10 x64
i did all kernel renaming.,boot.gz placing..but still having this..
so i tried ur old version which already having the kernel and boot.gz in it...still same error
please help me

ansebovi said:
@alvinhochun
i m having error
[email protected]:~/cwm-packer$ '/home/ansebovi/cwm-packer/workdir/cmdline'
/home/ansebovi/cwm-packer/workdir/cmdline: line 1: androidboot.hardware=qcom: command not found
i m ending up on this error on ubuntu 13.10 x64
i did all kernel renaming.,boot.gz placing..but still having this..
so i tried ur old version which already having the kernel and boot.gz in it...still same error
please help me
Click to expand...
Click to collapse
Nobody tells you to execute the `cmdline` file. You are supposed to run `cwm-packer`.
Sent from my Sony Xperia M (C1905)

alvinhochun said:
Nobody tells you to execute the `cmdline` file. You are supposed to run `cwm-packer`.
Sent from my Sony Xperia M (C1905)
Click to expand...
Click to collapse
got confused
aww really sorry...
my bad..
ty
now working

Hello,
I want to use the script to make the CWM recovery image but Im not sure how to get the kernel and ramdisk to use on script. Can anyone confirm if this process is right:
I copied kernel.sin from the ftf file, opened the file on flashtool under "tools->Sin editor->Extract data" this produced the file kernel.elf. Then using flashtool under "tools->extractors->elf" selected the kernel.elf file then pressed "unpack". After this process I ended with 2 files: "kernel.elf.Image" and "kernel.elf.ramdisk.gz".
These are the two files I can use with the script to produce the CWM recovery image? I guess the "kernel.elf.Image" contains the 2k header? Anyway, I can just use these files straight on the script and Im good to go?
Also Im not sure about the step n.3 on the instructions:
"3. Write the kernel command line to `workdir/cmdline`"
What you mean by "write the kernel command line" ?
Apreciate any clue on this!
[EDITED]
By the contents of 'wordir/cmdline' it seems it contains instructions for boot, so, no need to write anything but just use the provided 'cmdline' as it is? P.S. Im on Xperia M dual (C2004), but crossflashed a C1904 firmware on it.

Alright,
Everything went well using the files as I described.
I didn't found any CWM combined bootloader for the ROM I'm using (15.1.A.1.9) so I put it here attached in case it can be useful for someone in the future.
Thanks again for this script and CWM build !
[EDITED]
No, not much luck trying to upload the image, maybe cause Im a new user or something

building kernel from stock source
help me somebody please
i'm trying to build custom kernel for my xperia M dual
got sources from sony's website, doing build by guide
here is an error:
Code:
In file included from drivers/usb/gadget/android.c:51:0:
drivers/usb/gadget/f_qdss.c: In function 'qdss_bind_config':
drivers/usb/gadget/f_qdss.c:586:38: warning: argument to 'sizeof' in 'strncmp' call is the same expression as the second source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: f_qdss.c:586
make[3]: *** [drivers/usb/gadget/android.o] Error 1
make[2]: *** [drivers/usb/gadget] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2
is it an NDK version issue?
I'm running:
Code:
make -j8 ARCH=arm CROSS_COMPILE=/home/dev/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi-
thanks

Related

How to make and flash a kernel from Official Htc Froyo Kernel sources?

Hi,
I have a branded Desire which have been first unbranded (goldcard), OTA updated to latest Htc froyo update, and then Unrevoked 3.21+S-off 1.5 by alpharev.
Now, i want to make my own kernel from htc sources.
I know linux (using Gentoo for years), but process to flash a new kernel on an android device is not clear for me.
Is this link ok for Desire?
http://htcevohacks.com/htc-evo-hacks/how-to-build-your-own-htc-evo-4g-android-kernel/
Regards.
Sent from my HTC Desire using XDA App
I followed Cyanogen wiki for building the HTC Kernel as I found the toolchain from Codesourcery threw errors when trying to compile.
Obviously with the CyanogenMod guide, I don't clone the kernel from their git, instead I untar the HTC source.
I would be interested in hearing your findings, if you do try and compile with that toolchain.
As for flashing the Kernel, I just use koush's AnyKernel - drop the zImage into the kernel folder and then compress and sign, to make a flashable zip.
Mekrel said:
I followed Cyanogen wiki for building the HTC Kernel as I found the toolchain from Codesourcery threw errors when trying to compile.
Obviously with the CyanogenMod guide, I don't clone the kernel from their git, instead I untar the HTC source.
I would be interested in hearing your findings, if you do try and compile with that toolchain.
As for flashing the Kernel, I just use koush's AnyKernel - drop the zImage into the kernel folder and then compress and sign, to make a flashable zip.
Click to expand...
Click to collapse
Yeah, basically this. It's pretty straightforward, it can just be a bit finicky sometimes.
Hi,
Thanks for answers.
Mekrel:
For the Sourcery compiler, I have same results as yours: errors and does not compile.
I believe HTC are working with the "google" toolchain, so their sources are not veryfied to work with another compiler.
Using the Cyanogen compile way ( with "google" toolchain), it does compile fine.
I'm happy to see this option in the kernel (Change Cpu Policy While Screen is ON/OFF), but I wonder why it is not activated by default... :
http://img833.imageshack.us/img833/3668/desiredefault.jpg
With changes made:
http://img145.imageshack.us/img145/3707/desiremodified.jpg
It would certainly be better than using SetCpu for me ( I'm using it just to force cpu at 245MHz when screen is off), and not need to hack HTC performance lock feature since I don't want to underclock or overclock my Cpu.
Now I just have to test it...but I do have few questions before doing that:
I can use koush's AnyKernel tool to flash my new zImage, but in case all goes wrong? How to revert back?
-->Can I save my actual boot.img in sdcard, and in case flash process goes wrong revert back to my actual boot.img?
Please help if possible with detailed process (or a web link but I have not being able to find a detailed process for Desire).
Regards.
Edit: Seems for me that Kouch's tool will not reuse my ramdisk, but another one?
-->I just want being able to modify my kernel, so I prefer to reuse ramdisk which is actually in my boot.img if possible.
-->I have tried this way: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images, but script provided on this link gave me error because my boot.img has a "Second Stage".
Judge584 said:
Hi,
Thanks for answers.
Mekrel:
For the Sourcery compiler, I have same results as yours: errors and does not compile.
I believe HTC are working with the "google" toolchain, so their sources are not veryfied to work with another compiler.
Using the Cyanogen compile way ( with "google" toolchain), it does compile fine.
I'm happy to see this option in the kernel (Change Cpu Policy While Screen is ON/OFF), but I wonder why it is not activated by default... :
http://img833.imageshack.us/img833/3668/desiredefault.jpg
With changes made:
http://img145.imageshack.us/img145/3707/desiremodified.jpg
It would certainly be better than using SetCpu for me ( I'm using it just to force cpu at 245MHz when screen is off), and not need to hack HTC performance lock feature since I don't want to underclock or overclock my Cpu.
Now I just have to test it...but I do have few questions before doing that:
I can use koush's AnyKernel tool to flash my new zImage, but in case all goes wrong? How to revert back?
-->Can I save my actual boot.img in sdcard, and in case flash process goes wrong revert back to my actual boot.img?
Please help if possible with detailed process (or a web link but I have not being able to find a detailed process for Desire).
Regards.
Edit: Seems for me that Kouch's tool will not reuse my ramdisk, but another one?
-->I just want being able to modify my kernel, so I prefer to reuse ramdisk which is actually in my boot.img if possible.
-->I have tried this way: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images, but script provided on this link gave me error because my boot.img has a "Second Stage".
Click to expand...
Click to collapse
You can backup via:
Code:
cat /dev/mtd/mtd2 > /sdcard/mtd2.img
Then you can use fastboot to flash boot:
Code:
fastboot flash boot mtd2.img
The guide you linked to doesn't recommend trying to split the boot.img from your phone (in this example, mtd2.img) due to possible corruption issues, which is why I went for Koush' AnyKernel.
So what you're saying is you can't get the ramdisk from your boot.img via:
Code:
% mkdir ramdisk
cd ramdisk
gzip -dc ../boot.img-ramdisk.gz | cpio -i
as this is the part that throws the error?
no, errors came from the perl scripts posted on the link http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
So to resume:
Code:
cat /dev/mtd/mtd2 > /sdcard/mtd2.img
will backup my boot.img but it may be corrupted
Code:
fastboot flash boot mtd2.img
will restore it but if it's corrupted then it's useless.
Why can it be corrupted?
Why not possible to flash this way, without the hassle of dealing with boot.img?:
Code:
fastboot flash zimage zImage
Edit:
OK, I have done some search: please confirm this procedure to be safe to flash a modified kernel:
1°)Make an Nandroid Backup
2°)Since my Desire is rooted and S-OFFed it does not need any-more signed files, so for me I just have to put my new wifi kernel module (bcm4329.ko) to /system/lib/modules/bcm4329.ko (via adb push)
3°And then flash the new kernel zImage in fastboot using this command:
Code:
fastboot flash zimage zImage
4°)Once done: I will have to power off my Desire.
5°)Then, Power it on again in bootloader mode, wait for 3 seconds and then go to fastboot: the zImage should now start flashing automaticaly.
6°)Once done: reboot to test my new kernel.
7°)In case something goes wrong, all I will have to do is to restore boot via my Nandroid backup and all will be fine.
If someone can confirm this procedure to be right and safe, thank you.
Best Regards.
Ok, my new kernel is ready.
Does someone can confirm that step 1 to 7 in previous post are corrects?
Sent from my HTC Desire using XDA App
The 7 steps you posted look about right - I'm not entirely sure about #3, I don't have much experience in fastboot flashing. You might be better off using AnyKernel and flashing that in recovery.
It works good!
Thanks a lot.
Sent from my HTC Desire using XDA App

[APP][Update] SGS kernel flasher v1.6.2 - flash a kernel within android

This application *requires* root.
This app can flash a kernel within android on Samsung i9000, Captivate, Fascinate, Vibrant and more.
Features:
* backup kernel as update.zip (for recovery)
* flash kernel from zImage, any .tar or .zip that contains a zImage
* reboot
Usage:
backup kernel: creates an update.zip (for recovery) containing a backup of the current kernel with time and date in /sdcard/sgs-kernel-flasher/backup/
choose kernel: choose kernel image (mostly named zImage) or any .tar or .zip that contains a zImage
flash kernel: flashes the kernel
reboot: reboot the phone
Android market: SGS kernel flasher
DISCLAIMER:
The author of this app is not responsible for any damage to your phone that may be caused by usage of this app or by deficient kernel images.
Im curious, is it "bad" to flash to the partitions when in use ?
Shouldn't it be done via recovery ? Something like cwm where you'd choose flash kernel, it would safely restart your phone into recovery where it would flash your zimage and reboot.
Thnx
Daneshm90 said:
Im curious, is it "bad" to flash to the partitions when in use ?
Shouldn't it be done via recovery ? Something like cwm where you'd choose flash kernel, it would safely restart your phone into recovery where it would flash your zimage and reboot.
Thnx
Click to expand...
Click to collapse
This partition is safe to be flashed from within android - otherwise i would not publish an app that can do that.
The partition is not used while android is running - only read at boot.
Just dont use the app with wrong files - you have to know what you are doing.
I improved the app:
v1.0.1 stable:
* added: manual reboot
* added: check selected file for valid zImage
This app is now stable - happy flashing.
oooh naice!
What are the benefits of flashing the kernel while the OS is running ?
EarlZ said:
What are the benefits of flashing the kernel while the OS is running ?
Click to expand...
Click to collapse
For me, it hurts when pressing the Volume keys up/down in Recovery!
Whats the difference between this and the Tuxility app.? It does the same thing..?
/H
Sent from my GT-I9000 using Tapatalk
what about checking ( disabling ) lagfix?
Hrc4u said:
Whats the difference between this and the Tuxility app.? It does the same thing..?
/H
Sent from my GT-I9000 using Tapatalk
Click to expand...
Click to collapse
This app does not use the redbend_ua binary - no forced reboot.
And the only purpose of this app is to flash the kernel, nothing else.
iiixda said:
what about checking ( disabling ) lagfix?
Click to expand...
Click to collapse
I will implement a check that will show a warning, but disablinf or removing of a lagfix is too much at the moment. There are too much different lagfix approaches and considering them all is pretty complex.
I keep most of kernels on /sdcard/kernals/ directory in .zip (CWM) format.
Any chances of adding support of such files?
Adding .tar should be straightforward too
I have updated the app one more time:
v1.2.1:
added: PDA.tar and update.zip file support
added: choose file starts in /sdcard/sgs-kernel-flasher/
added: lagfix detection and warning
That means you can now select any .tar or .zip that contains a zImage and the app will automatically extract and flash that zImage.
Major break through for easy kernel flashing on i9000, Captivate, Fascinate and Vibrant- please propagate this awesome news.
Btw. the app is now on market.
Ok this is awesome!
(you beat me to it, you know, congrats!)
I'm running the 2.2.1 firmware ( JPX trough KIES) and used the "SuperOneClick 1.5.5" application to root.
When I run the kerner installer, it would tell me that I have a lagfix installed (AFAIK I don't have any) and also tells me that my device is not rooted.
I can confirm that it's rooted by using the root-explorer and have super-user and busybox installed.
Pierreken said:
I'm running the 2.2.1 firmware ( JPX trough KIES) and used the "SuperOneClick 1.5.5" application to root.
When I run the kerner installer, it would tell me that I have a lagfix installed (AFAIK I don't have any) and also tells me that my device is not rooted.
I can confirm that it's rooted by using the root-explorer and have super-user and busybox installed.
Click to expand...
Click to collapse
Did you see the root request dialog?
If not, you may restart the app or just have look what the superuser app says about the permissions of the sgs kernel flasher.
Does it support 'CWM' .zip files?
I mean these where not only zImage resides, but also some other thingies.
I ask this question because I wasn't able to flash SO_4_5_1 kernel using CWM file provided in this topic: http://forum.xda-developers.com/showthread.php?t=811660
file: http://forum.xda-developers.com/attachment.php?attachmentid=467462&d=1292684343
Attempt on JPX+SO_4_5_1 kernel (so basically it was an attempt to reflash of the same kernel)
Code:
zImage extraction failed!
Kernel flash failed!
xan said:
Does it support 'CWM' .zip files?
I mean these where not only zImage resides, but also some other thingies.
I ask this question because I wasn't able to flash SO_4_5_1 kernel using CWM file provided in this topic: http://forum.xda-developers.com/showthread.php?t=811660
file: http://forum.xda-developers.com/attachment.php?attachmentid=467462&d=1292684343
Attempt on JPX+SO_4_5_1 kernel (so basically it was an attempt to reflash of the same kernel)
Code:
zImage extraction failed!
Kernel flash failed!
Click to expand...
Click to collapse
I will check that.
edit: fixed will be released in a few minutes
Bugfix release:
v1.2.8:
fixed: zImage not correctly extracted from .zip-files
Hello,
Many thanks for this so nice app .
I have to inform You that he detects lagfix is running on my phone, but that is not true.
My phone is running on 2.2.1 Froyo, XXJPUI9000, and i flashed all .PIT, PDA, MODEM and CSC files trough Odin.
I rooted My phone with CF-Root.
And ofcourse differenc is visible, I charge my phone each 3 days .
So if this BUG can be fixed would be nice.
Thanks.
xipod said:
Hello,
Many thanks for this so nice app .
I have to inform You that he detects lagfix is running on my phone, but that is not true.
My phone is running on 2.2.1 Froyo, XXJPUI9000, and i flashed all .PIT, PDA, MODEM and CSC files trough Odin.
I rooted My phone with CF-Root.
And ofcourse differenc is visible, I charge my phone each 3 days .
So if this BUG can be fixed would be nice.
Thanks.
Click to expand...
Click to collapse
I will also check that - it is only a warning message, you can ignore that for the moment.
Edit: I need some mount listings, if you have working adb, please run something like this: "adb shell mount > mount-listing.txt" and attach that file to a post in this thread. That will help me to improve the lagfix detection. Thanks.

[Tool] [SS/DS] [LB] [Deprecated] Nicki Root - Full root on latest firmware

UPDATE: check out TowelRoot app by @geohot! One-click root solution that works with latest firmware released for Xperia M single/dual (provides half-root only, don't forget to apply root fixer)
Nicki Root is deprecated, it got merged in my new dd Flasher tool and works across many devices, not only Xperia M. The attachments and changelog from Nicki Root were kept below for archiving history, but I won't provide support for it anymore. For any problem you may encounter, go to dd Flasher thread. If you want to root Xperia M through dd Flasher, downgrade your device to Android 4.1 or 4.2.2 firmware, root it with Cydia Impactor and follow the instructions from dd Flasher thread.
Changelog
Version 2.0
• Nicki Root now is called dd Flasher
Old versions
Version 1.3.3
• Bugfixes for Linux script
• Updated SuperSU to 2.02
Version 1.3.2
• Make sure the temporary folder exists before pushing the script
Version 1.3.1
• Now compatible with Linux
Version 1.3
• Implement log capabilities (users can pull last log by selecting appropriate option in main menu)
• Drop "reboot in flash mode" (after using dd, system partition layout is different and device can't be rebooted)
• Check if LED can be used to indicate status, otherwise disable it
• Minor code changes
Version 1.2
• Rewrote most of the code
• Script now uses LED to indicate status
• By popular demand, dropped choice command in favour of set command (should work with Windows XP again)
• For every single command, script will now check if it failed or not and warn the user if anything get wrong
• Rewrote the mount/umount routine, loop device is selected automatically and resource busy issues are fixed now
• Can be used with half-rooted devices now (script check if device is fully rooted and apply root fixer at runtime if needed)
• Implemented "reboot in flash mode" command to avoid needing to pull/reinsert battery manually (experimental, sometimes doesn't work)
Version 1.1
• Make sure busybox is installed after first boot (previous versions pushed busybox but didn't install it)
• Drop choice32/choice64 applets and use built-in OS command (Windows XP no longer supported)
Version 1.0.1
• Typo fix (Nicky => Nicki)
• Updated busybox to 1.22.1
Version 1.0
• Initial release
Will test as soon as Indian Firmware Update show up...
Sent from my C2004 using Tapatalk
Well done @mbc07, this is great news. Dont forget to give credit to @joemarshall, afterall, he cane up with the idea . Thanks for testing it and creating this thread, nevertheless
sent from wadiya using my mafroom
I'll be trying this (probably) in the next hour, I'll post results for the Single SIM afterwards.
RESULTS TIME: This method of rooting worked and I am now running 4.3 with root access. Thank you.
Sent from my C1905 using xda app-developers app
Gonna test after I download 4.1.2 ftf, hope it works
rizla2 said:
Gonna test after I download 4.1.2 ftf, hope it works
Click to expand...
Click to collapse
It works perfectly, I'm now rooted on 4.3 thanks to this. The only error I had was when the tool first tried to push the system.ext4 to the SD Card, it said there wasn't enough space, I just deleted the incomplete copy and then ran the tool again and it worked.
Hmm, I'd not thought of mounting the image and doing dd, that is pretty tidy.
Balls, It didn't work for me first try, error mounting the loopback device, said it was busy. I'm re-flashing the phone back to 4.1 now. I've split the shell scripts into 2, first one does the modifications of system.ext4, second one does the dd flash, with a press any key between. That way if the modifications to system.ext4 fail, you're not stuck with an unrooted phone where system partition has already been written, and you can happily start again. I was flashing from sd card if that makes any difference.
Also, would it be possible to copy the reboot executable into your temp folder before you do the dd, so that you don't have to do the battery out reset in the middle of the process, or won't reboot work once you're in that state?
Edit: Second time lucky, thanks ever so much. Maybe I just needed to start from a blank slate version of 4.1, blimey that first boot takes some time though!
cheers,
Joe
mbc07 said:
It took me a lot of time and I tried a lot of methods but I finally managed to root the new 4.3 update without unlocking the bootloader, let's root that thing.
Requirements:
You will need FlashTool and the FTF file of 4.3 update for your phone
You should be running Android 4.1.2/4.2.2 firmware with full root. If you already updated to 4.3, sorry, you'll need to downgrade to 4.1.2/4.2.2 and root it, otherwise this method won't work
You should have at least 1.5GB of free space in your Internal Storage or in your SD Card. If you don't have enough space, the installation will be aborted and your phone will be left intact
Make sure you have full root (eg. your phone doesn't reboot when you remount /system with RW access). Using this method without full root may reboot your phone during the procedure, getting you in a bootloop
Currently the script works only on Windows, I'll try to get a Linux version soon
Getting system.ext4 file: before continuing, we'll need to extract system.ext4 from system.sin present in the update. Open the FTF it with WinRAR or 7-zip and extract system.sin somewhere, then open FlashTool, go to Tools => Sin Editor, locate the system.sin file extracted previously and then click in "Extract Data". You'll get system.ext4 in the same folder you extracted system.sin. Now you're good to go
Procedure:
Download the attached ZIP and unzip its contents somewhere
Move system.ext4 extracted previously to the same folder where root.bat is
Open root.bat and follow the instructions
After the process finished, the script will tell you and your phone will be in a frozen state (it's normal). At that point, you should manually remove the USB cable and then pull/reinsert your battery. DON'T TURN IT ON, we haven't finished yet (turning it on now will get you in a bootloop).
Open FlashTool again and flash the entire 4.3 FTF, but exclude system (if you forget to do so, the root will be removed and you'll need to start over)
After flashing finished, disconnect the USB cable and start your phone. If everything went well you should be in 4.3 now, with full root access
NOTE: I'm not that good with BASH/Shell scripts, and although I had implemented some sanity checks, something may have escaped that checks. So, if you do this procedure and the shell script finish with errors, it's better to start over since something may have not worked and you may be in a partial root state...
Click to expand...
Click to collapse
It worked for me thanks to you
About flashing 4.3 can I do a data and cache wipe?
Wysłane z mojego GT-P3110 przy użyciu Tapatalka
iks8 said:
About flashing 4.3 can I do a data and cache wipe?
Wysłane z mojego GT-P3110 przy użyciu Tapatalka
Click to expand...
Click to collapse
Flashtoll wil wipe data and cache when you flash 4.3 You don't need to do anything else.
paper13579 said:
Well done @mbc07, this is great news. Dont forget to give credit to @joemarshall, afterall, he cane up with the idea . Thanks for testing it and creating this thread, nevertheless
sent from wadiya using my mafroom
Click to expand...
Click to collapse
I still need to rework the OP, many people from Root for FTF 4.3 Update 15.4.A.0.23 LOCKED BOOTLOADER deserves credits, after all I wouldn't have that idea without their replies... Will get these guys credited in the OP soon
joemarshall said:
Hmm, I'd not thought of mounting the image and doing dd, that is pretty tidy.
Balls, It didn't work for me first try, error mounting the loopback device, said it was busy. I'm re-flashing the phone back to 4.1 now. I've split the shell scripts into 2, first one does the modifications of system.ext4, second one does the dd flash, with a press any key between. That way if the modifications to system.ext4 fail, you're not stuck with an unrooted phone where system partition has already been written, and you can happily start again. I was flashing from sd card if that makes any difference.
Also, would it be possible to copy the reboot executable into your temp folder before you do the dd, so that you don't have to do the battery out reset in the middle of the process, or won't reboot work once you're in that state?
Edit: Second time lucky, thanks ever so much. Maybe I just needed to start from a blank slate version of 4.1, blimey that first boot takes some time though!
cheers,
Joe
Click to expand...
Click to collapse
Thank you for the feedback, I'll try to add some sanity checks before using dd. About reboot, I tried using busybox reboot but nothing happened, the same for adb reboot. Apparently after using stop, the reboot command doesn't seems to work
Uh, I forgot... Anybody tried pushing to SD Card? Did it worked?
mbc07 said:
Uh, I forgot... Anybody tried pushing to SD Card? Did it worked?
Click to expand...
Click to collapse
Yes it did, sort of. The first time I did it I got an error saying there wasn't enough space (I had over 10GB free however). Once I got the error I deleted the incomplete file from my SD Card and then I ran the script again, this time it copied the file fully and then installed properly.
This occurred on the Single SIM C1905 Xperia M by the way.
Yes! Finally rooted. Thanks a lot!
Btw don't forget to change usb mode to mtp instead msc (I've tried msc and it can't copy files)
mbc07 said:
I still need to rework the OP, many people from Root for FTF 4.3 Update 15.4.A.0.23 LOCKED BOOTLOADER deserves credits, after all I wouldn't have that idea without their replies... Will get these guys credited in the OP soon
Thank you for the feedback, I'll try to add some sanity checks before using dd. About reboot, I tried using busybox reboot but nothing happened, the same for adb reboot. Apparently after using stop, the reboot command doesn't seems to work
Click to expand...
Click to collapse
At first time i've had also 'mount: mounting /dev/block/loop0 on /data/local/tmp/system failed: Device or res
ource busy'
Flash new, clean Android 4.1 solve problem.
Thank you very much.
Hey guys, does this give you full root?
sent from wadiya using my mafroom
paper13579 said:
Hey guys, does this give you full root?
sent from wadiya using my mafroom
Click to expand...
Click to collapse
Yes it does.
I'll check about the loop device errors (apparently they may occur in Xperia M single SIM), thanks for reporting guys...
paper13579 said:
Hey guys, does this give you full root?
sent from wadiya using my mafroom
Click to expand...
Click to collapse
Yes. I implemented the disable ric service method from [NUT] root fixer too
Man, this is a great achievement, you should be proud. Im about to try it now. Wish me luck
sent from wadiya using my mafroom
Before your script use dd it should check:
1. That there is no any apps mounted in /dev/block/loop0 (for example Swift Key). If yes, you will see 'mount: mounting /dev/block/loop0 on /data/local/tmp/system failed: Device or resource busy' (you can it by type losetup)
2. Phone is in MTP USB MODE. If you set to memory storage mode, Android will not access to sd card with system.ext4 image (script would check that can it access to /sdcard) and you will get mount argument error

[Q] Problems on Building CM-12 (GT-I8160)

Hi there! I'm trying to build CM-12 for GT-I8160 based on TeamCanjica's CM-11. Actually, it has been compiled successfully with some hacks (I skipped imgdiff). But it bricked my phone after I flashed it via CWM. :crying:
I've unbricked my phone by flashing my backup of stock boot partition (mmcblk0p15) to "Kernel" partition via Heimdall. Then, my phone showed CM boot animation for a long time. (bootloop I think, maybe because of stock boot partition isn't compatible with it). And I use stock firmware for now.
I found that type of the boot partition (mmcblk0p15) of the stock differ with boot.img I've built.
Code:
$ file mmcblk0p15-boot (my backup of stock boot partition)
mmcblk0p15-boot: Linux kernel ARM boot executable zImage (little-endian)
$ file boot.img (boot.img I've extracted from cm-12-20141217-UNOFFICIAL-codina.zip)
boot.img: Android bootimg, kernel (0x40008000), ramdisk (0x41000000), page size: 4096
So, what are "Linux kernel ARM boot executable zImage" and "Android bootimg"? Where is the root partition (ramdisk) stored?
Is it okay to skip imgdiff? I think imgdiff is just for creation of OTA package. Am I correct?
I also found boot.img in out/target/product/codina (not in the zip file) which type is Linux kernel ARM boot executable zImage.
Is it the correct boot.img? I found that the content of that file is same with kernel file I found in the same folder. I'm afraid that the ramdisk is not included in it.
Sorry for my English n thank you very much.
Oh. All people wants to have cm12, but still 0 replies here.
I'm sorry, I can't help in this too... /
S.AMU said:
Oh. All people wants to have cm12, but still 0 replies here.
I'm sorry, I can't help in this too... /
Click to expand...
Click to collapse
Hi! It's okay, I've flashed out/target/product/codina/boot.img + gapps. It booted to CM-12 , freezed at the welcome screen n refused to boot again after I force-rebooted it :crying:. Unfortunately, ADB & recovery didn't work, so I didn't know much why it got freezed. Maybe I have to figure out how to compile a nice kernel with working ADB & recovery. Hahaha...

[RECOVERY][Android 10/11][Stock/SODP][XZ2/C/P/3] TWRP 3.4.0-0 [UNofficial]

The Sony Open Devices Project is always happy about volunteers (coding, testing, etc)
Also mainlining your favorite snapdragon powered xperia device into the mainline kernel is possible and we will be glad to help you!
Official site
Unofficial site
Code:
#include <std_disclaimer.h>
/*
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
FAQ:
Just wiping your phone in TWRP lead into an encrypted & not readable userdata in the stock system.
You need to open advanced wiping and check the entries data and internal storage.
Of course clear the dalvik, too.
If you backed up system and/or vendor partitions and you want to restore them, make sure that TWRP setting "Use rm -rf instead of formatting" is set!.
If after the usage of NewFlasher or the OTA Updater or something else, which installs stock firmware parts you get stuck into the TWRP or SONY Logo, you need again to disable the verification with the vbmeta.img file and its parameters in fastboot.
fastboot & adb
https://developer.sony.com/develop/open-devices/get-started/flash-tool/useful-key-combinations/
https://wiki.lineageos.org/adb_fastboot_guide.html
https://developer.android.com/studio/releases/platform-tools
Weird problems not easily to reproduce by other users require that you make sure, that you
Use the newest platform tools (adb & fastboot)
Downloaded the newest firmware via Xperifirm from XDA and installed the newest firmware via Newflasher from XDA
Newflasher from XDA
Xperifirm from XDA
Removing the stock bloat apps via titanium backup may result in a boot loop. Use a file explorer to remove them, disable them or try to use my unfinished bloat removal script at github.
Your phone reboots into recovery, instead of system? Maybe it crashed too often due to a wrong installation or whatever?
In TWRP:
Code:
cat /dev/block/bootdevice/by-name/misc
shows you the reason.
TWRP -> [WIPE] -> [Advanced Wipe] -> Tick only the misc -> [Swipe to Wipe]
Known Bugs:
The "fastboot boot twrp.img" doesn't work, if you use the hardware buttons to open the blue fastboot bootloader mode. Only use adb, twrp or the android system to reboot into blue fastboot bootloader mode or flash the twrp.img, boot the device, reboot into bootloader and flash the original boot.img back, before booting into twrp.
You can also "fastboot reboot bootloader" in the blue fastboot mode.
This is a bootloader bug, maybe it gets fixed with the stock Q bootloader.
If "fastboot boot twrp.img" results into a blackscreen and reboot of the phone, take a look if you modified the DTBO partition.
It requires a special TWRP for every modified kernel/dtbo until I find some way to unify the twrp kernel with the DTBO (if the bootloader supports it).
Bugtracker:
TWRP Bugtracker -> If you think the problem is in TWRP
My Bugtracker -> If you think the problem is in my implementation
Bugreport:
A bugreport needs your device name, dmesg, the /tmp/recovery.log and a way to reproduce the issue.
If possible use
Code:
logcat -b all
instead of just a dmesg.
If ADB is not working to provide logs
VOLUP+POWER for 1 Seconds -> Forced crash to create a pstore
Boot the normal system.
Give me the files in
Code:
/sys/fs/pstore/
If the TWRP is stuck at the TWRP logo, the chances are high, that the decryption didn't succeed.
To rescue a not responding phone:
VOLUP+POWER for 3 Seconds -> RESTART with one Vibration.
VOLUP+POWER for 20 Seconds -> SHUTDOWN with 3 Vibrations.
VOLUP+POWER+CAMERA for 30 Seconds -> HARDWARE SHUTDOWN by discharging a capacitor.
Thank you very much for your help, code contribution & testing! (Random order):
@dees_troy and his team of volunteers for the TWRP code
@dhacke thank your for providing a download server
Shame on me if I forgot someone after searching through the thread and my PM's!
And many thanks to the few donators!
A telegram group for technical SODP stuff:
https://t.me/xda_tv
XDA:DevDB Information
TWRP, ROM for the Xperia XZ2
Contributors
MartinX3, Sony
Source Code: https://github.com/MartinX3-AndroidDevelopment
ROM OS Version: Android 10
ROM Kernel: Linux 4.x
ROM Firmware Required: Newest recommended
Based On: AOSP
Version Information
Status: Stable
Current Stable Version: 3.4.0-0
Stable Release Date: 2020-06-13
Created 2020-03-29
Last Updated 2020-06-20
Download & Installation
Download:
https://androidfilehost.com/?w=devices&uid=11410963190603893035
https://www.dhsfileserver.de/ftp/martinx3/ Thank you @dhacke for the second download server
Installation:
Update to newest stock firmware before unlocking!!!
Unzip the *.gz files with https://7-zip.org/ or Linux.
Enter fastboot via software, not hardware buttons. See "Known Bugs".
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
fastboot boot twrp.img
Advanced menu -> "Install recovery ramdisk" -> Choose twrp.img
Reboot into installed TWRP
Want Root? -> Magisk
(Only if your phone doesn't boot to system anymore) Advanced menu -> "Fix recovery bootloop"
(Optional; Security degradation; Only if you know what you're doing) Switch SELinux to permissive (with my permissive.zip)
News
02.03.2021
Reuploaded the SODP TWRP with a workaround for Android 11 compatibility.
Click to expand...
Click to collapse
15.06.2020
reuploaded the stock twrp for the xz2 premium with a completely fixed touch.
Click to expand...
Click to collapse
14.06.2020
reuploaded the stock twrp with a later touch kernel modules initialization.
Hopefully fixing the randomly happening not working touch.
Click to expand...
Click to collapse
13.06.2020
thanks to the fixes in 3.4.0 we got now a twrp with the following enhancements for stock and sodp:
- this twrp will work with future 10.0 roms, you don't need a new build matching the security patch level of your rom.
- you can install this twrp again with the buildin ramdisk patcher. Please follow the installation instructions.
Click to expand...
Click to collapse
11.06.2020
switch to twrp 3.4.0
sodp twrp 2020-06 security patch level
stock twrp 2020-05 security patch level for firmware 52.1.a.2.1
now both twrp should work without a rom being installed (empty system/vendor/oem partitions) and still be able to decrypt your userdata.
Also the stock twrp touch should now always work instead of playing russian roulette.
Click to expand...
Click to collapse
11.05.2020
reuploaded sodp twrp for 2020-05 security patch level.
It didn't boot with the newest aosp.
Click to expand...
Click to collapse
07.05.2020
sodp twrp for 2020-05 security patch level.
Click to expand...
Click to collapse
14.04.2020
removed stock twrp for firmware 52.1.a.0.672 until sony releases the kernel sources of the new security patch level.
Otherwise the keymaster won't decrypt the userdata for twrp and twrp gets stuck on the twrp logo.
Click to expand...
Click to collapse
13.04.2020
stock twrp for firmware 52.1.a.0.672
sodp twrp for 2020-04 security patch level
hopefully fixed the touch problems of the stock twrp
fixed the forced read only partition mountings of system, vendor, odm
Click to expand...
Click to collapse
31.03.2020
stock twrp for firmware 52.1.a.0.618
Click to expand...
Click to collapse
30.03.2020
sodp twrp for 2020-03 security patch level
installing in ramdisk (to make it persistent) is impossible at the moment, because it is a 9.0 twrp which makes its ramdisk incompatible to the rom.
Of course monthly twrp releases in sync with the current patch level need to be released or i would need to remove the userdata decryption completely.
The stock twrp will follow, after it became ready.
Click to expand...
Click to collapse
30.03.2020
SODP TWRP for 2020-03 security patch level
Installing in Ramdisk (to make it persistent) is impossible at the moment, because it is a 9.0 TWRP which makes its ramdisk incompatible to the ROM.
Of course monthly TWRP releases in sync with the current patch level need to be released or I would need to remove the userdata decryption completely.
The Stock TWRP will follow, after it became ready.
Click to expand...
Click to collapse
PS: AndroidFileHost blocked me for doing too many actions at the same time.
Maybe I can upload it there tomorrow.
Done
can't wait for possibility to install in ramdisk
but now there is a working recovery :highfive:
31.03.2020
Stock TWRP for firmware 52.1.A.0.618
Click to expand...
Click to collapse
xz3 twrp
MartinX3 said:
31.03.2020
Click to expand...
Click to collapse
xz3 twrp won't boot, sodp version is good but there's no install on ramdisk?
hafiidh said:
xz3 twrp won't boot, sodp version is good but there's no install on ramdisk?
Click to expand...
Click to collapse
You mean SODP TWRP works, but not the stock TWRP on your XZ3?
You are stuck on sony logo?
Or on TWRP logo?
I need a bugreport with "logcat -b all" via adb.
Install ramdisk doesn't work at the moment, because it is a TWRP 9.0 hack, since TWRP 10.0 is ready.
But I wrote it in the news
Edit:
Reworked the thread a bit for more clarification
First! Wonderful job!
---EDIT------
Everything works fine! So nice!
@MartinX3 Great job as always bro! :good:
I ran it on my XZ2 (stock 52.1.A.0.618).
Phone has booted to the twrp screen (till the unlock pattern), but the touch is not working (log).
I didn't start from scratch (fresh install), for the record.
Tia!
serajr said:
@MartinX3 Great job as always bro! :good:
I ran it on my XZ2 (stock 52.1.A.0.618).
Phone has booted to the twrp screen (till the unlock pattern), but the touch is not working (log).
I didn't start from scratch (fresh install), for the record.
Tia!
Click to expand...
Click to collapse
Thank you
Are you sure the touch doesn't work?
I tested this release on the same firmware on my XZ2 in stock.
This confuses me now.
You booted stock .618 before and you tried to deactivate & activate the display?
Here it worked right out of the box.
And if it happens again, could you execute "start preptouch"
And if that not works, could you execute "/sbin/preptouch.sh"?
Sjll said:
First! Wonderful job!
---EDIT------
Everything works fine! So nice!
Click to expand...
Click to collapse
Thank you
MartinX3 said:
[...] Are you sure the touch doesn't work?
And if it happens again, could you execute "start preptouch"
And if that not works, could you execute "/sbin/preptouch.sh"?
Click to expand...
Click to collapse
I am. I have tried at least three times so far. Tried turning off and on the screen, but the slide to unlock didn't work, too.
"start preptouch", no response, no working touch
"/sbin/preptouch.sh"...
Code:
insmod: failed to load /sbin/clearpad_rmi_dev.ko: File exists
insmod: failed to load /sbin/clearpad_core.ko: File exists
insmod: failed to load /sbin/clearpad_i2c.ko: File exists
akari:/sbin # ls -l
Tia again
serajr said:
I am. I have tried at least three times so far. Tried turning off and on the screen, but the slide to unlock didn't work, too.
"start preptouch", no response, no working touch
"/sbin/preptouch.sh"...
Code:
insmod: failed to load /sbin/clearpad_rmi_dev.ko: File exists
insmod: failed to load /sbin/clearpad_core.ko: File exists
insmod: failed to load /sbin/clearpad_i2c.ko: File exists
akari:/sbin # ls -l
Tia again
Click to expand...
Click to collapse
And the service menu of android should also say that you use the clearpad driver.
And I assume the 9.0 stock twrp did always touch fine?
The script say that the kernel modules for the touch driver got loaded and I assume the sys path in the script file got executed too, after loading the .ko files.
And you have a normal European firmware?
That's now a mystery for me why it works for me and others, but not in your phone
Especially if you have the clearpad touch hardware
MartinX3 said:
And the service menu of android should also say that you use the clearpad driver.
And I assume the 9.0 stock twrp did always touch fine?
The script say that the kernel modules for the touch driver got loaded and I assume the sys path in the script file got executed too, after loading the .ko files.
And you have a normal European firmware?
That's now a mystery for me why it works for me and others, but not in your phone
Especially if you have the clearpad touch hardware
Click to expand...
Click to collapse
I got the touch working after copying the three .ko libs to the ramdisk /sbin folder, and a small editing (below) in the permissive.sh (also removed "$touch_id" == "3" from preptouch.sh).
Code:
setenforce 0
insmod /sbin/clearpad_rmi_dev.ko
insmod /sbin/clearpad_core.ko
insmod /sbin/clearpad_i2c.ko
echo 1 > /sys/devices/virtual/input/clearpad/post_probe_start
I know this is an awful workaround, but maybe this give you some hint (or sets you more confusing yet )
I'm with the sony stock customized_br fw, as always!
serajr said:
I got the touch working after copying the three .ko libs to the ramdisk /sbin folder, and a small editing (below) in the permissive.sh (also removed "$touch_id" == "3" from preptouch.sh).
Code:
setenforce 0
insmod /sbin/clearpad_rmi_dev.ko
insmod /sbin/clearpad_core.ko
insmod /sbin/clearpad_i2c.ko
echo 1 > /sys/devices/virtual/input/clearpad/post_probe_start
I know this is an awful workaround, but maybe this give you some hint (or sets you more confusing yet )
I'm with the sony stock customized_br fw, as always!
Click to expand...
Click to collapse
Ah you have a XZ2C, not a XZ2?
Because the removed ID 3 is for the XZ2 with clearpad touch.
But the script did already copy the .ko files into your /sbin before and executed the same code, you did now manually.
And according to your logs the setenforce 0 was already executed earlier.
So you just did the same the script did.
Well, yes you confuse me more
Could you try to just execute "echo 1 > /sys/devices/virtual/input/clearpad/post_probe_start" if the touch doesn't work again?
I wonder if the initialization is too early on your device.
Then I could try to delay the preptouch service to a later stage of the device boot.
MartinX3 said:
Ah you have a XZ2C, not a XZ2?
Because the removed ID 3 is for the XZ2 with clearpad touch.
But the script did already copy the .ko files into your /sbin before and executed the same code, you did now manually.
And according to your logs the setenforce 0 was already executed earlier.
So you just did the same the script did.
Well, yes you confuse me more
Could you try to just execute "echo 1 > /sys/devices/virtual/input/clearpad/post_probe_start" if the touch doesn't work again?
I wonder if the initialization is too early on your device.
Then I could try to delay the preptouch service to a later stage of the device boot.
Click to expand...
Click to collapse
I have a regular XZ2 (H8216), and its touch_id is 3 (customized_br fw), so I removed the Id 3.
"Could you try to just execute..." I've already tried that, with no success.
"Then I could try to delay the preptouch..." Cool... As you could notice, it worked here with that awful way I did it, so why not?
:good:
serajr said:
I have a regular XZ2 (H8216), and its touch_id is 3 (customized_br fw), so I removed the Id 3.
"Could you try to just execute..." I've already tried that, with no success.
"Then I could try to delay the preptouch..." Cool... As you could notice, it worked here with that awful way I did it, so why not?
:good:
Click to expand...
Click to collapse
But you tried it also yourself later.
You executed the script again without success at a later stage.
And adding it to the permissive.sh is like executing the script, just earlier.
I assume `cat /sys/devices/dsi_panel_driver/panel_id` gives you the "3" as result?
MartinX3 said:
But you tried it also yourself later.
You executed the script again without success at a later stage.
And adding it to the permissive.sh is like executing the script, just earlier.
I assume `cat /sys/devices/dsi_panel_driver/panel_id` gives you the "3" as result?
Click to expand...
Click to collapse
I ran the scripts/codes manually in the trwp root shell (with the no working touch screen).
Yep, running the script earlier (permissive.sh) did the trick (*.ko files in the ramdisk).
And 3 is the output of the panel_id (that's why I removed the 3 from the preptouch.sh).
Edit: I've noticed this...
The permissions of the libs copied from vendor to sbin (preptouch), as you could see here
Code:
-rw------- 1 root root 1070630 1972-01-22 17:46 clearpad_core.ko
-rw------- 1 root root 251702 1972-01-22 17:46 clearpad_i2c.ko
-rw------- 1 root root 296934 1972-01-22 17:46 clearpad_rmi_dev.ko
Patched twrp
Code:
-rwxrwxrwx 1 root root 1070902 2020-04-02 21:48 clearpad_core.ko
-rwxrwxrwx 1 root root 251830 2020-04-02 21:48 clearpad_i2c.ko
-rwxrwxrwx 1 root root 297054 2020-04-02 21:48 clearpad_rmi_dev.ko
Edit 2: chmod on copied files did the trick (preptouch.sh) - but sometimes still not working (need to boot twice, three times...):
Code:
#XZ2 "3" XZ2C "4" Clearpad
if [[ "$touch_id" == "3" ]] || [[ "$touch_id" == "4" ]]; then
cp /v/lib/modules/clearpad_rmi_dev.ko /sbin/
cp /v/lib/modules/clearpad_core.ko /sbin/
cp /v/lib/modules/clearpad_i2c.ko /sbin/
[B]chmod 777 /sbin/clearpad_rmi_dev.ko
chmod 777 /sbin/clearpad_core.ko
chmod 777 /sbin/clearpad_i2c.ko[/B]
insmod /sbin/clearpad_rmi_dev.ko
insmod /sbin/clearpad_core.ko
insmod /sbin/clearpad_i2c.ko
echo 1 > /sys/devices/virtual/input/clearpad/post_probe_start
fi
Maybe you find out a more elegant way to handle with that!
Edit 3:
I also got it permanently installed on kernel (combo keys does work, too), it's a bit tricky I gotta say, but it works.
You know, twrp's ramdisk.cpio kernel hack (old install procedure).
Hi Martin,
just wanted to let you know that your latest version for Sony stock (0.618 fw) does also not work for me (touch does not respond). Even 'fastboot reboot bootloader' before 'fastboot boot twrp-xz2.img' doesn't change anything.
Device:
Xperia XZ2 (H8216) running Android 10 stock (52.1.A.0.618)
Customized CH
Clearpad Touch version: 3

Categories

Resources