yashsingh1/xdaforums huggingface dataset:
[XPERIA X10 Android Development] DooMLoRD:
[2.2] ROMs based on FreeX10-beta4

PLEASE MAKE A FULL XRECOVERY/NANDROID BACKUP BEFORE TRYING ANY SYSTEM MODIFICATIONS LIKE THIS

Additionally please make certain that u can use flashtool to flash a stock FW incase u run into any problems and that the device is fairly charged >50% battery before trying this.

use the attached file ONLY if the existing

chargemon

file in /system/bin/ is as follows:

#!/system/bin/busybox sh

cat /dev/input/event2 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck ]
then

# remount rootfs rw
mount -o remount,rw rootfs /

# Umount MTDs
umount -l /data
umount -l /cache

# Extract recovery
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar

# Umount system
umount -l /system

chroot / /init

fi

/system/bin/charger

# remount rw
mount -o remount,rw rootfs /

cd /
rm -r /sdcard
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar

# zdzihu: hack-fix
if [ -e /data/data/com.android.providers.telephony/databases/telephony.db ]; then
/system/bin/chroot / /init
exit
fi

chroot / /init

[Thank you JimmyX10 for helping out with testing this]

the attached file is an update.zip flashable thru xrec

also this contains the modded chargemon file based on freex10-beta4... i yet have to incorporate the suggestions by Androxyde

this contains GScript Lite, and it gets installed as a system app... so if u already have it installed, i recommend u uninstall it before flashing this...

also this file contains the required reboot_xrecovery.sh script... it will be put on the /sdcard/gscript/ folder automatically so that gscript lite can immediately find it... once u reboot back into system after flashing just launch the app and click on "Load File" and select reboot_xrecovery.sh all the contents will load automatically...

* some custom roms are not permitting reboot command if SU rights are not there... u need to make sure that the option "Need SU?" is checked (ticked) else the device wont be able to reboot from the script... *

u can now create a shortcut on the homescreen to GScipt Lite and select the reboot into xrecovery script.

if u try running the script a popup for SU permissions might come up, this will only come the first time its run, select "Allow" and then ur device will reboot into xrecovery...

thats it! now whenever u want to reboot into xrecovery just launch the shortcut!!!

if u are using a different 2.2 rom and/or the chargemon file is different than the one shown here please post it here along with the details of the rom u using and i will try n put up a compatible version for u..
[XPERIA X10 Android Development] DooMLoRD:
[2.1] ROMs based on SE stock FW with xRecovery 0.3-release

PLEASE MAKE A FULL XRECOVERY/NANDROID BACKUP BEFORE TRYING ANY SYSTEM MODIFICATIONS LIKE THIS

Additionally please make certain that u can use flashtool to flash a stock FW incase u run into any problems and that the device is fairly charged >50% battery before trying this.

use the attached file ONLY if the existing

chargemon

file in /system/bin/ is as follows:

#!/system/bin/busybox sh

/system/bin/charger

cat /dev/input/event2 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck ]
then

# remount rootfs rw
mount -o remount,rw rootfs /

# Umount MTDs
umount -l /cache
umount -l /data

# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar

# Umount /system
umount -l /system

# chroot
chroot / /init

fi

# Continue booting
exit

the attached file is an update.zip flashable thru xrec

also this contains the modded chargemon file based on xRecovery 0.3-release for SE stock ROMs... i yet have to incorporate the suggestions by Androxyde

this contains GScript Lite, and it gets installed as a system app... so if u already have it installed, i recommend u uninstall it before flashing this...

also this file contains the required reboot_xrecovery.sh script... it will be put on the /sdcard/gscript/ folder automatically so that gscript lite can immediately find it... once u reboot back into system after flashing just launch the app and click on "Load File" and select reboot_xrecovery.sh all the contents will load automatically...

* some custom roms are not permitting reboot command if SU rights are not there... u need to make sure that the option "Need SU?" is checked (ticked) else the device wont be able to reboot from the script... *

u can now create a shortcut on the homescreen to GScipt Lite and select the reboot into xrecovery script.

if u try running the script a popup for SU permissions might come up, this will only come the first time its run, select "Allow" and then ur device will reboot into xrecovery...

thats it! now whenever u want to reboot into xrecovery just launch the shortcut!!!

if u are using a different 2.1 rom and/or the chargemon file is different than the one shown here please post it here along with the details of the rom u using and i will try n put up a compatible version for u..
[XPERIA X10 Android Development] DooMLoRD:
[2.1] ROMs based on SE stock FW with xRecovery installed through Flashtool v0.2.8

PLEASE MAKE A FULL XRECOVERY/NANDROID BACKUP BEFORE TRYING ANY SYSTEM MODIFICATIONS LIKE THIS

Additionally please make certain that u can use flashtool to flash a stock FW incase u run into any problems and that the device is fairly charged >50% battery before trying this.

use the attached file ONLY if the existing

chargemon

file in /system/bin/ is as follows:

#!/system/recovtools/sh

/system/bin/charger

DEVICE=X10

case $DEVICE in

X10*)
cat /dev/input/event2 > /dev/keycheck& ;;

E10*)
cat /dev/input/event1 > /dev/keycheck& ;;

U20*)
cat /dev/input/event0 > /dev/keycheck& ;;

E15*)
cat /dev/input/event1 > /dev/keycheck& ;;

esac

sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -f /data/local/tmp/flashtool ]
then
# delete 'reboot into xrec' file
rm -f /data/local/tmp/flashtool

# remount rootfs rw
mount -o remount,rw rootfs /

# Umount MTDs
umount -l /cache
umount -l /data

# Mount recovery partition
rm -r /sbin
rm -f /etc
(cd /;tar -xzf /system/recovtools/xrecovery.tar.gz)

# Umount /system
umount -l /system

# chroot
chroot / /init

fi

# Continue booting
exit

the attached file is an update.zip flashable thru xrec

also this contains the modded chargemon file based on xRecovery installed through Flashtool v0.2.8 for SE stock ROMs...

this contains GScript Lite, and it gets installed as a system app... so if u already have it installed, i recommend u uninstall it before flashing this...

also this file contains the required reboot_xrecovery.sh script... it will be put on the /sdcard/gscript/ folder automatically so that gscript lite can immediately find it... once u reboot back into system after flashing just launch the app and click on "Load File" and select reboot_xrecovery.sh all the contents will load automatically...

* some custom roms are not permitting reboot command if SU rights are not there... u need to make sure that the option "Need SU?" is checked (ticked) else the device wont be able to reboot from the script... *

u can now create a shortcut on the homescreen to GScipt Lite and select the reboot into xrecovery script.

if u try running the script a popup for SU permissions might come up, this will only come the first time its run, select "Allow" and then ur device will reboot into xrecovery...

thats it! now whenever u want to reboot into xrecovery just launch the shortcut!!!

if u are using a different 2.1 rom and/or the chargemon file is different than the one shown here please post it here along with the details of the rom u using and i will try n put up a compatible version for u..
[XPERIA X10 Android Development] Nagarebozhi:
I just want to give you a BIG THANKS Doomlord for making this script for us :) its ridiculous easy now just push gscript and wait got it to boot in to xrec for you! I don't know how many times I have missed to boot in the regular way because you get stuck in TV or something else so this makes my life better :P

And I'm glad to help you testing :)

Sent from my ARCified X10i with CM 7.0 RC2 Gingerbread Or my CM 6.1.3 Froyo
[XPERIA X10 Android Development] lzyllp:
I think it must have some changes if our want to make it work with CM7.

#!/system/bin/busybox sh → #!/system/recovery/sh

tar -xf /system/bin/xrecovery.tar → tar -xf /system/recovery/xrecovery.tar.bz2
[XPERIA X10 Android Development] DooMLoRD:
will be testing out ways to make it work in 2.3 (GB/CM7)... J has also replied to the p.m. and Bin4ry & Androxyde are also giving inputs...

we may have a universal chargemon script soon!!!!
[XPERIA X10 Android Development] lzyllp:
Great news!
[XPERIA X10 Android Development] depulle87:
Indeed good news, I'm waiting for it when it's compleet then I'm more then willing to test it for you guys
[XPERIA X10 Android Development] DooMLoRD:
now it works on CM7RC2

hey guys i have managed to get it working on CM7RC2-v010...

the code is correct the only issue was that the permissions for the files (chargemon & charger) were getting changed, they should be having all execute (chmod 755) permissions...

tested the following after applying update.zip:

1) able to get back into OS

2) able to get into recovery the normal way

3) able to get into recovery with reboot into xrecovery script

EDIT:

thank you bazji, tremendouz, depulle87, lzyllp for testing this on CM7RC2

we can confirm that its working properly on CM7RC2 and i will upload the working version along with instructions in some time!
[XPERIA X10 Android Development] bazji:
Willing to test mate pm sent
[XPERIA X10 Android Development] Mortyx10:
i have tested this on Wolf CM6 V4.4 and it gives me an error "reboot: operation not permitted"

but the funny part is when I reboot manually the phone enters Xrecovery itself without me pushing any key.

this happens only if I run the script before rebooting

so I think it works but just cant reboot my phone from the script...

here is the original chargemon file extracted from V4.4 zip file

thanks
[XPERIA X10 Android Development] DooMLoRD:
actually it seems some custom roms are not allowing reboot code without superuser permissions...

to fix this.. launch GScript Lite, edit the reboot_xrecovery script (long press on the name of th script) and tick the "Need SU" option and save the script... now if u try running the script it will ask u for SU permissions only the first time its run and then ur device will reboot...

please try it out and post wht happens....

also the chargemon file u posted is the same as FreeX10-beta4... so u can use the update.zip i have provided in above posts...
[XPERIA X10 Android Development] Mortyx10:
Yep you are right it works prefect now

Thanks man
[XPERIA X10 Android Development] lzyllp:
Work with you? I want test it
[XPERIA X10 Android Development] bazji:
amazing work

pm sent mate from one very happy CM7 RC2 V10a user :-)

thanks

barry
[XPERIA X10 Android Development] Zocker Tko:
hi finally i get it working on both x10 and x8 (roms see in my sig):D

i updated both handys to the newest xrecovery "FreeXperia recovery from J's CM7rc2"

edited the chargemon files and installed the gscript stuff

- on my x10 reboot from os into xrecovery np, it needs su

- on my x8 yesterdy no way, today i disabled and enabled again the su option in gscript and bam it works, reboot from os into xrecovery

here the chargemon files

the only thing is with both handys, when they are in offline charging and i press only the power button, it boot directly into xrecovery:)
[XPERIA X10 Android Development] lzyllp:
update.zip for 2.2 ROMs based on FreeX10-beta4 not work with CM6.1.3 V4.5.7.When I run it still into OS
[XPERIA X10 Android Development] DooMLoRD:
please post chargemon file for that version (CM6.1.3 V4.5.7)

also please let me know if the following works after u have flashed the update.zip:

1) are u able to get back into OS

2) are u able to get into recovery the normal way

3) are u able to get into recovery with the reboot into xrecovery script
[XPERIA X10 Android Development] lzyllp:
I able to get back into OS and get into recovery the normal way.but not get into recovery with the reboot into xrecovery script
[XPERIA X10 Android Development] DooMLoRD:
[2.3] ROMs based on CM7RC2 v008 to v010a

PLEASE MAKE A FULL XRECOVERY/NANDROID BACKUP BEFORE TRYING ANY SYSTEM MODIFICATIONS LIKE THIS

Additionally please make certain that u can use flashtool to flash a stock FW incase u run into any problems and that the device is fairly charged >50% battery before trying this.

CM7RC2 v008 to v010a should be able to use the attached file

PLEASE DO NOT USE IT ON ANY OTHER VERSIONS OF THE CM7RC2 ROM

use the attached file ONLY if the existing

chargemon

file in /system/bin/ is as follows:

#!/system/recovery/sh

cat /dev/input/event2 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck ]
then

# remount rootfs rw
mount -o remount,rw rootfs /

# Umount MTDs
umount -l /data
umount -l /cache

# Extract recovery
cd /
rm -r /sbin
rm -f etc
tar -xjf /system/recovery/recovery.tar.bz2

# Umount system
umount -l /system

chroot / /init

fi

/system/bin/charger

# remount rw
mount -o remount,rw rootfs /

cd /
rm -r /sdcard
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar

chroot / /init

[Thank you bazji, tremendouz, depulle87, lzyllp for helping out with testing this]

the attached file is an update.zip flashable thru recovery

also this contains the modded chargemon file based on CM7RC2... i yet have to incorporate the suggestions by Androxyde

this contains GScript Lite, and it gets installed as a system app... so if u already have it installed, i recommend u uninstall it before flashing this...

also this file contains the required reboot_xrecovery.sh script... it will be put on the /sdcard/gscript/ folder automatically so that gscript lite can immediately find it... once u reboot back into system after flashing just launch the app and click on "Load File" and select reboot_xrecovery.sh all the contents will load automatically... u need to make sure that the option "Need SU?" is checked (ticked) else the device wont be able to reboot from the script...

u can now create a shortcut on the homescreen to GScipt Lite and select the reboot into xrecovery script.

if u try running the script a popup for SU permissions might come up, this will only come the first time its run, select "Allow" and then ur device will reboot into xrecovery...

thats it! now whenever u want to reboot into xrecovery just launch the shortcut!!!

if u are using a different 2.3 rom and/or the chargemon file is different than the one shown here please post it here along with the details of the rom u using and i will try n put up a compatible version for u..
[XPERIA X10 Android Development] Nagarebozhi:
yes it works I am on that ROM and it works perfectly for me!

Sent from my ARCified X10i with CM 7.0 RC2 Gingerbread Or my CM 6.1.3 Froyo
[XPERIA X10 Android Development] lzyllp:
I reflash it and get it work.:D
[XPERIA X10 Android Development] DooMLoRD:
see if the "Needs SU?" option is checked (ticked) in GScript script edit window
[XPERIA X10 Android Development] DooMLoRD:
thats great!!! since i dont have X8 i couldnt test this on it...
[XPERIA X10 Android Development] Zocker Tko:
hi again please forget my previous posts, because i was to stupid to work with the flashtool 0.2.9 for installing the newer xrecovery.

so i decidet to test again with my older x10mini pro (2.1 firmware), and installed new xrecovery via flashtool.

the only thing what i changed after install in chargemon, was to add the red line and install the gscript stuff, so i can say for me, on all my phones x10 with CM 6.1.3 V4.5.7, x8 with stock 2.1 and x10 mini pro with stock 2.1, it works and all have the newer xrecovery installed and all need the su in gscript. Sry for long post.

#!/system/recovery/sh

/system/bin/charger

DEVICE=`cat /system/recovery/model`

case $DEVICE in

X10*)

cat /dev/input/event2 > /dev/keycheck& ;;

E10*)

cat /dev/input/event1 > /dev/keycheck& ;;

U20*)

cat /dev/input/event0 > /dev/keycheck& ;;

E15*)

cat /dev/input/event1 > /dev/keycheck& ;;

esac

sleep 3

kill -9 $!

if [ -s /dev/keycheck -o -f /data/local/tmp/flashtool ]

then

# delete 'reboot into xrec' file

rm -r /data/local/tmp/flashtool

# remount rootfs rw

mount -o remount,rw rootfs /

# Umount MTDs

umount -l /cache

umount -l /data

# Mount recovery partition

rm -r /sbin

rm -r /etc

(cd /;tar -xjf /system/recovery/recovery.tar.bz2)

# Umount /system

umount -l /system

# chroot

chroot / /init

else

if test -f /system/bin/ramdisk.tar

then

# remount rw

mount -o remount,rw rootfs /

cd /

rm -r /sdcard

rm init*

rm logo.rle

rm default.prop

tar -xf /system/bin/ramdisk.tar

/system/bin/chroot / /init

fi

fi

# Continue booting

exit
[XPERIA X10 Android Development] riginal:
I know it's already been reported but just to confirm the zip file works flawlessly on Wolfbreak's CM 6.1.3 V4.4 , thanks for the great work
[XPERIA X10 Android Development] DooMLoRD:
wow u have got a lot of SE phones ;)

the red line u tagged is actually a comment statement (so it does not affect anything)...

just saw flashtool v0.2.9 was out a few hrs back... since FT 0.2.8 the location of recovery has changed [/system/recovtools/] (even in 0.2.9 its different [/system/recovery/])... we are approaching a universal chargemon file with FreeXperia recovery working on all but the script is not yet finalised.... i myself tested flashtool v0.2.9 to install FreeXperia recovery on CM7RC2-v010a (X10)... i was able to boot into recovery but the phone doesnt get back into OS it is stuck at SE text logo... may be i am doing something wrong... may be thats why FT 0.2.9 is tagged as beta...
[XPERIA X10 Android Development] lzyllp:
I tested flashtool v0.2.9 to install FreeXperia recovery on CM7RC2-v010... i was able to boot into recovery but the phone doesnt get back into OS it is stuck at SE text logo too
[XPERIA X10 Android Development] Zocker Tko:
hi look in the flashtool thread i have answerd your question

and the red line works for me on all three phones so it is universal with the newest xrecovery

edit: and what is when you only change the chargemon with my working chargemon on CM7RC2-v010a ?
[XPERIA X10 Android Development] xcxa23:
CONFRIMED works with CM-6.1.3-V4.5.7

i use this for wolfbreak cyanmode latest version of rom and its work perfectly. no flaws
[XPERIA X10 Android Development] droidjems:
+1 one more confirmation thats it works beautifully with CM7RC2v010a. This should be integrated to core.
[XPERIA X10 Android Development] AfroLoots:
Just installed the 2.1 Flash Tool installed. It worked like a charm.
[XPERIA X10 Android Development] agentJBM:
I am a little confused about the universal update.zip for use with all roms with XRecovery installed with flash tool. I thought on most custom 2.2+ ROMs we were not supposed to reinstall xRecovery or we will end up in boot loop. I'm not sure what this means, or the best way to proceed. Any suggestions?
[XPERIA X10 Android Development] lzyllp:
There not reinstall xrecovery.Don't worry
[XPERIA X10 Android Development] DooMLoRD:
u need to re-install xrecovery only if u want to use universal update.zip

actually the recovery installed by flashtool beta v0.2.9 is (FreeXperia recovery, which is newer one) and is moved to /system/recovery/ (same as in the CM7RC2 rom)

in my opinion we should move to the new recovery (though users on 2.3 CM7RC2 roms better read the instructions in the universal update.zip post before doing anything) on all roms (stock/custom)

if u dont want to experiment with newer recovery u can use the update.zip files for specific rom versions...
[XPERIA X10 Android Development] GlossGhost:
Fix

Ok, good work but can somebody make something that will fix the Reboot>Recovery option :confused:

This is in the Phone options when you hold the power button :p (IN SOME ROM'S!)

(I am using Wolfbreak's ROM)
[XPERIA X10 Android Development] lzyllp:
J will try it in CM7 010.Just waiting for it
[XPERIA X10 Android Development] Crocodile1973:
so what is this new FreeXperia, will it restore the normal xrecovery backups? does it look the same. so i'm on z's theme. can you just flash the universal update zip via xrecovery and then we will be using the new one?
[XPERIA X10 Android Development] DooMLoRD:
FreeXperia recovery is an updated xRecovery which J supplies with his CM7RC2 roms... its also being incorporated into FlashtTool v0.2.9...

since its an updated xRecovery u can use the backups u created with xRecovery... actually xrecovery/freexperia recovery dont create/restore backups, the tool nandroid actually does this and is integrated into the recoveries....

the current universal update.zip (reboot_into_xrec_universal_v1.zip) does not contain FreeXperia recovery it just contains the modified chargemon script and gscript lite app + reboot script... i am thinking of creating a newer universal update.zip (v2 may be) which will also flash/install FreeXperia recovery and associated files...
[XPERIA X10 Android Development] Crocodile1973:
Yeah that would be great idea. Is this FreeXperia only available via J's Rom?
[XPERIA X10 Android Development] DooMLoRD:
Ya as of now only J's custom Rom has it... though u can install it on other roms using FlashTool beta v0.2.9

sent from FreeX10_beta4+CM6 settings
[XPERIA X10 Android Development] droidjems:
A sort of bug: after installing and using the script, i used the teeminal emulator to change bootanin with a cp command. After that, any gscript script will just show script running and stay still. After reapplying the .zip thr scripts are working fone again.

I'm running cm7rc2v010a.
[XPERIA X10 Android Development] ParrotSquawk:
Let me see if I understand this...This is a replacement for xRecovery?

The purpose for xRecovery is to use .zip files on the SD card to update ROMs rather than flashing the phone, IIRC (which takes computer issues out of the equation = GOOD!)

My objective is to be able to switch between various ROMS under development as I find one that I can live with on a day-to-day basis. xRecovery has been my method of choice for switching ROMS and I am comfortable in using it. As one of the ROMS includes a newer version of busybox than xRecovery needs, I must uninstall BB and xRecovery and reinstall xRecovery whenever I want to try other ROM's.

I am not sure of the instructions on how to use the files so I will either wait for the .apk or ask one of the ROM writers to create an update.zip for me to use with xRecovery
[XPERIA X10 Android Development] Crocodile1973:
see my post and the reply. its only a script so you can boot straight into xrecovery from the OS, without having to press the buttons. As DooMLoRD said, use flashtool 0.29 and you can replace it with freeXperia recovery, which is a replacement, and you can do the same
[XPERIA X10 Android Development] DooMLoRD:
no dude this script doesnt change ur current xrecovery...

if u do not want to try out the universal script no problem... just put up a post here with the name & version of custom rom u using and if possible the 'chargemon' file from /system/bin/ folder of ur rom...
[XPERIA X10 Android Development] ParrotSquawk:
Croc:

Does it solve the busybox incompatibility issue?
[XPERIA X10 Android Development] ParrotSquawk:
Doom:

I am running one of Erickwill's 2.1's which you have seen before. However, either Zeam or his ROM installs a later version of busybox than will work with xRecovery. I will just use FT .29b to fix xrecovery.

I'm rereading the forum to understand the purpose of the universal tool better...

Thanks... back later.

Ok.. after reading the purpose of all the above, I'll wait for the movie instead of reading the book... errhm ...I mean I'll wait for the .apk In the meantime, it's like holding down the F5 key...
[XPERIA X10 Android Development] Mortyx10:
Okay due to a problem I had I had to flash my phone and I did it using flashtool 0.2.9.1 and then installed xrecovery through flashtool, then installed wolf's cm6 v4.5.7, then I used the universal script but after the phone boot I had no signal and constant fc of android system and xrecovery was damaged so I had to flash again.