yashsingh1/xdaforums huggingface dataset:
[XPERIA X10 Android Development] DooMLoRD:
refer to http://xdaforums.com/showpost.php?p=12244282&postcount=85

did u verify that the chargemon script on ur device/custom rom is the same as the one provided above...

every version of flashtool/custom rom installs a different busybox version & different recovery/chargemon version... that might be the issue
[XPERIA X10 Android Development] Mortyx10:
This is weird even though I used the flashtool to install xrecovery but the chargemon file is look like the 2.2 one so it was my mistake...

thanks for your quick reply...

Edit: it's because I then flashed the cm6 rom so the chargemon file must have been overwritten...my bad
[XPERIA X10 Android Development] bazji:
Cm7 rc2 v11

hey doomlord just installed this on j's new cm7 rc2 v11 and it works perfectly :-)
[XPERIA X10 Android Development] DooMLoRD:
thanks for testing...

btw cm7rc2 v011 uses newer chargemon file from flashtool v0.2.9.1

there are some newer changes in place...

if u are interested in testing newer kernel provided by J, i suggest that u do not use these update.zip files...

i will put up an updated script with those changes in place...
[XPERIA X10 Android Development] davelinders:
Why is everybody saying that you must push the back button around three

times for getting into recovery.

Tip: When Ericsson logo appears press then the left top button (the power button) on the phone.

You have to press once not three times, this works every time for me.
[XPERIA X10 Android Development] bazji:
cheers doomlord
[XPERIA X10 Android Development] Crowds:
this is definitely one of the most WOW **** happen here;)

good job mate
[XPERIA X10 Android Development] Lion3494:
Hey doom can you still boot into xrecovery by pressing the back button also?
[XPERIA X10 Android Development] DooMLoRD:
yes yes... no existing functionality is disturbed... this is just an add-on...
[XPERIA X10 Android Development] lzyllp:
Yes,it's ok
[XPERIA X10 Android Development] Crowds:
chargemon for GB v11;)

note: rename to chargemon only (remove.txt)
[XPERIA X10 Android Development] Nagarebozhi:
what are that for? Because the zip doomlord did works on v11 to.

Sent from my ARCified X10i with CyanogenMod 7.0 RC2 2.3.3 or 6.1.3 2.2.1
[XPERIA X10 Android Development] Crowds:
odd. didn`t work with me

had to change minor things like -e to -f and reboot"something" to flashtool:confused:

edit:

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

then

rm -f /data/local/tmp/flashtool

edit2: besides the new chargemon has this at the beggining:

#!/system/recovery/sh

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 $!

and the one attached doesn`t. so i don`t wanna mess with the original one;)
[XPERIA X10 Android Development] lzyllp:
Some differents？I use the 2.3（CM7RC2 - v010和CM7RC2 - v010a） file and it work fine with me
[XPERIA X10 Android Development] Crowds:
of course it does...i said v11 :D
[XPERIA X10 Android Development] Nagarebozhi:
but I have v11 and the one for v010/a works perfectly for me, thats weird..

Sent from my ARCified X10i with CyanogenMod 7.0 RC2 2.3.3 or 6.1.3 2.2.1
[XPERIA X10 Android Development] Crowds:
yes that`s odd:confused:

the one posted call for

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

# delete 'reboot into xrec' file
rm -f /data/local/tmp/flashtool

on J v11

if [ -s /dev/keycheck -o -e /data/local/tmp/recoveryboot ]
then
rm -r /data/local/tmp/recoveryboot

so, i realize that the one posted didn`t work with me (v11) what i did was change the one from J:confused:
[XPERIA X10 Android Development] Nagarebozhi:
hope some one can explain why it works for me, maby Doomloord can spread some light over this..

Sent from my ARCified X10i with CyanogenMod 7.0 RC2 2.3.3 or 6.1.3 2.2.1
[XPERIA X10 Android Development] DooMLoRD:
Guys relax... please wait for some time I will update/add files for cm7rc2-v011 tonite...

OT: watching cricket world cup quarter final match :P

sent from FreeX10_beta4+CM6 settings
[XPERIA X10 Android Development] Nagarebozhi:
Doomlord, why does the script for CM7.0 v010 works for me on v011? Can you explain that?

Cheers

X

Sent from my ARCified X10i with CyanogenMod 7.0 RC2 2.3.3 or 6.1.3 2.2.1
[XPERIA X10 Android Development] DooMLoRD:
ok wait i will try n explain this...

* every version of flashtool is coming up with different recovery locations & chargemon files

flashtool v0.2.8 installs recovery @ /system/recovtools/ & the 'reboot file' is /data/local/tmp/flashtool

flashtool v0.2.9 installs recovery @ /system/recovery/ & the 'reboot file' is /data/local/tmp/flashtool

flashtool v0.2.9.1 installs recovery @ /system/recovery/ & the 'reboot file' is /data/local/tmp/recoveryboot, additionally newer code has been introduced to check for 'custom kernel booting file' /data/local/tmp/kexecboot

so i hope this clears up stuff on wht is different in each flashtool...

now as for CM7RC2 versions...

all CM7RC2 versions have the recovery @ /system/recovery/

v008-v010a do not implement 'reboot into recovery' option hence the chargemon script in those roms dont check for the 'reboot file'

v011 implements 'reboot into recovery' option and is based on flashtool v0.2.9.1 so the chargemon script in checks for the 'reboot file' @ /data/local/tmp/recoveryboot and for 'custom kernel booting file' @ /data/local/tmp/kexecboot

now the universal script (v1) which i put here is by itself complete and is based on flashtool v0.2.9 and checks for the 'reboot file' @ /data/local/tmp/flashtool but doesnt check for any 'custom kernel booting file' as this has been recently introduced... so the v1 script will work fine for getting into recovery the normal way, or using 'reboot into recovery' script but it does not have the implementations to execute code for custom kernel booting...

i will be uploading a newer update.zip which will introduce the check for 'custom kernel booting file' and will be based on flashtool v0.2.9.1

hope i have cleared some confusion and not made it worse ;)
[XPERIA X10 Android Development] kommonk:
could we not some how twist this into a widget that will reboot into a Rom on the SD card like free x10 started?

Sorry if its a stupid question :-)
[XPERIA X10 Android Development] DooMLoRD:
are u talking about having an app for this?

already working on it with lots of help from MrHassell (he is making the app)...

or are u talking about dual-booting?
[XPERIA X10 Android Development] AfroLoots:
Forgot to mention; I used the 2.1 version with EW latest arc+TimeScape rom. Works but I had trouble at the start cause I had used older flash tool to install recovery on the previous rom. Glad someone is working to streamline all of this into one universal solution.

Sent from my X10a running EW Jet Black V010.xArc(TimeScape)
[XPERIA X10 Android Development] away:
sweet, any idea if its going to be able to be completely universal or need radio buttons or something to choose various scenarios ? something a little like in the attached pic.

should be a sweet/handy app when its ready.

I'm looking forward to it :)
[XPERIA X10 Android Development] DooMLoRD:
ya we are trying to make it universal (for all Xperia, android devices which use the boothijack file /system/bin/chargemon)

right now we are calling it "SE Xperia Reboot Options" (may change)

as for various scenarios we have the following options:

Device

Recovery

Custom BootKit

the the button can be "Reboot"/"Go"

it will have both an app drawer application as well as a widget...

we are also thinking of adding an option to install/uninstall the chargemon add-on (i.e. the app will itself modify the chargemon file, so the user need not use any other update.zips)
[XPERIA X10 Android Development] CM-PRo:
Thanx!! Good job! :D
[XPERIA X10 Android Development] DooMLoRD:
for other Xperia android devices

hey guys if u have other Xperia android device (other than X10) please keep track of the following thread:

X8:

[Script] Reboot into xRecovery from OS <for X8> {need testers}

X10 Mini:

[Script] Reboot into xRecovery from OS <for X10 Mini> {need testers}

X10 Mini Pro:

[Script] Reboot into xRecovery from OS <for X10 Mini Pro> {need testers}
[XPERIA X10 Android Development] Realorasz:
Do we know if this works on cm 6.1. V053 by wolfbreak?

Sent from my X10a running CM 6.1.3 V4.4
[XPERIA X10 Android Development] monopolo:
Sry, failed post
[XPERIA X10 Android Development] DooMLoRD:
ok... so why did u quote such a long post? ;)

without actually commenting on it?
[XPERIA X10 Android Development] DooMLoRD:
yes it should work... have i have tested it myself.. use the following file: http://xdaforums.com/showthread.php?p=12220660#post12220660
[XPERIA X10 Android Development] Realorasz:
Cool, it does. Thanks a million.

From my X10a running WB CM 6.1.3 V053
[XPERIA X10 Android Development] DooMLoRD:
guys i have just finished creating a script which will do all the modifications to the chargemon file (without replacing the whole file with a preconfigured one)... (its a text search & replace script)... so we are approaching an easier way to install/uninstall this 'reboot into recovery from OS' add-on... also it will be compatible with all Xperia android phones (X10, X8, X10 mini, X10 mini pro)...

i will release it tonight (its afternoon here)...

additionally MrHassell is hard at work with creating the app for this and let me tell u he has put in a lot of time and effort into it... we hope to release it soon for testing...
[XPERIA X10 Android Development] tremendouz:
super well done
[XPERIA X10 Android Development] The Gingerbread Man:
Great work doomlord and Mr hassel, works great. Looking forwards to the app and widget coming soon ;-) what if you could add reboot to recovery into the power menu options how it was a while ago? Perhaps something to ask Jerpelea to bring into one of his next releases? Thanks guys :-)
[XPERIA X10 Android Development] MrHassell:
APK 80% complete

These options are present in several (Cyanogen-mods and others) but not integrated correctly. I'm sure Jerpelea's AOSP Gingerbread will be configured right. The mod in power options is framework dependant.

This would mean modifying every Framework for each build, making it quite labour intensive, so DoomLoRD and I are building a Native Java APK, built using MotoDevStudio (eclipse) from the xRecovery ISO.

It will install a widget and will be ready soon for any 2.1+ Xperia - Universal as DoomLoRD's script, working like the essential xRecovery APK - a combined effort by Zoz33 & Zdzihu xRecovery.
[XPERIA X10 Android Development] Grospolina:
It's not a stupid question. In fact, I was just thinking about this.

FYI, here's how this script works:

1. The script makes an empty file called flashtool and puts it in /data/local/tmp

2. Whenever the phone starts, the script in chargemon runs.

3a) If the flashtool file exists, it deletes the flashtool file and boots into xRecovery.

3b) If the flashtool file doesn't exist, it boots normally.

That's it. (Well okay, it also checks to see if you pressed a key during startup for booting into xRec.)

As you can see, the flashtool file is simply an empty file. All it does is act like a "flag". Therefore, it doesn't matter what the file is called as long as the reboot script and "chargemon" match.

We used to be able to dual-boot into two different ROMs, but we lost that ability in order to be able to boot to xRecovery. I never actually tried it, so I didn't know how it worked. I think the problem was that chargemon could check for a keypress, but it couldn't tell which key is pressed (yes, you can boot into xRec with ANY key, even Power).

However, now we have this new "flag" file method of booting. So the question is this:

Can we use different flag files to boot to multiple ROMs? After all, DooMLoRD's explanation of CM7 shows us that we can use two flag files (recoveryboot and kexecboot) to do two different things. It follows that we should be able to use as many flag files as we want.
[XPERIA X10 Android Development] MrHassell:
clever :)

It's not at all stupid! This is what were doing now :D - If it was anything like even silly we wouldn't be doing it.. thanks for the positive feedback and encouragement! Really like hearing any cool thoughts, suggestions and your clever ideas!

Best Regards,

The Hoff
[XPERIA X10 Android Development] Mortyx10:
I just used this with trip's miui rom and it works perfect

Looking forward for the app

Thanks again
[XPERIA X10 Android Development] DooMLoRD:
precisely!!!!

as for multiboot to be triggered... actually we dont even need different files... we can just make a file (say /data/local/tmp/bootinto or better /sdcard/bootinto).. which has the text BOOTNAND or BOOTSDCARD etc...

then we can use a code like following:

MULTIBOOTSELECT=`cat /sdcard/bootinto`

case $MULTIBOOTSELECT in
BOOTNAND)
echo "Executing code to boot OS on NAND: extract ramdisk etc" ;;
BOOTSDCARD)
echo "Executing code to boot OS on SDCARD: unmount MTD blocks, loop mount img files as /data , /system & /cache .... " ;;
esac

i had already tried to make FreeX10-beta4 boot from sdcard... using chargemon code from FreeX10-alpha (this was initial version and could boot from sdcard) and ramdisk from all versions of FreeX10 but had no luck to get the OS to boot from sdcard... i was able to get till bootanimation but nothing beyond that :( had asked J (had sent him the logcat file) about wht to do and he recommended that a newer ramdisk needed to be written... i still dont have the experience to make ramdisks... if anyone is willing to help with creation of ramdisk for this i am willing to test... i already have sorted out the way to convert yaffs2 img files (nandroid/recovery backups) to ext2fs img files so that the ext2fs img files can be loop mounted as /system , /data & /cache [thats what FreeX10-alpha was doing for booting via sdcard]
[XPERIA X10 Android Development] aries77:
just post on x8 thread also :

tested on Racht's Floyo 0.15 and works

one thing is I use no frill cpu control, it don't run on boot after reboot from xrecovery ,tried twice - it says unclean shutdown , while using reboot dialog (power button-reboot) -> xrecovery -> reboot , it works.

maybe it's because no frill feature "- Added safety valves on boot: if unclean shutdown is detected or /data/.nocpu or /sd-ext/.nocpu exist, the frequencies will not be updated."

maybe it's just me using both , but it's nice to see both works

thanks for your effort.

edit : can't go into xrecovery using normal way anymore (press back or menu while rebooting)

*using freexperia recovery from flashtool 2.9.1*
[XPERIA X10 Android Development] DooMLoRD:
have posted a possible solution in X8 thread...

that shouldnt happen... :confused:

ok do one thing copy the file /system/bin/chargemon and post its contents here (u can use RootExplorer or use the adb command: adb pull /system/bin/chargemon c:\chargemon)

[*] to revert back previous chargemon file use the add-on_uninstaller script... [*]
[XPERIA X10 Android Development] aries77:
here it is
[XPERIA X10 Android Development] DooMLoRD:
see the following lines in /system/bin/chargemon

if [ -s /dev/keycheck -o -e /data/local/tmp/recoveryboot ]
then
rm -r /data/local/tmp/recoveryboot

-s /dev/keycheck

this checks for key press during bootup

-o -e /data/local/tmp/recoveryboot

this checks for 'reboot file' /data/local/tmp/recoveryboot

rm -r /data/local/tmp/recoveryboot

this removes the 'reboot file' if its present

so getting into recovery, the normal way, should work
[XPERIA X10 Android Development] aries77:
strange, tried three time again (to make sure), still can't boot to xrecovery using normal way, power -> reboot -> press key -> nothing, straight to home.

after pressing back/menu on SE boot screen, than Hackdroid screen appear , no xrecovery
[XPERIA X10 Android Development] DooMLoRD:
when u see the Sony Ericsson text logo... repeatedly keep pressing/tapping the BACK key...
[XPERIA X10 Android Development] aries77:
ok tried BACK key, twice, even rapid pressing not working either.
[XPERIA X10 Android Development] The Gingerbread Man:
Time to repair with seus and start again? Root and install recovery with flashtool?
[XPERIA X10 Android Development] DooMLoRD:
dude his OS is not broken.. he can boot into OS... he is only not able to get into recovery the normal way...
[XPERIA X10 Android Development] The Gingerbread Man:
I figured repairing with seus would remove his broken recovery and then install it again with flashtool. Was the quickest and easiest way I can think of to sort it. I know nothing about coding etc just a suggestion...
[XPERIA X10 Android Development] DooMLoRD:
yes u are right... btw he has an X8 and using custom 2.2 ROM...
[XPERIA X10 Android Development] The Gingerbread Man:
As long as he has made a backup recently he should be able to restore it after reinstalling and hopefully not loose to much data. I hope this helps out anyway, I know I'm in just a little over my depth here just trying to help, as always :-)
[XPERIA X10 Android Development] aries77:
Yes, my os is fine. X recovery already using flash tool 291

Any way its fine with me. The script helps me a lotsince I don't have to watch the boot process and press any key anymore (that's the point). Just inform that normal way don't work

Thanks DooMLoRD
[XPERIA X10 Android Development] Grospolina:
Do you have a file called /system/recovery/model? It should be a text file that only has the text "X10" (without quotes) in it. If not, then create it.
[XPERIA X10 Android Development] DooMLoRD:
no no... u have the right idea but that user has an X8....

so create the file /system/recovery/model with the text E15
[XPERIA X10 Android Development] Bacx:
Great :) it works perfekt on my x10 using Wolfs newest ROM :) Booting into recovery without pressing a key :)

thx

P.s. i can go into Recovery the "normal" way by pressing a key a couple of time, too :)
[XPERIA X10 Android Development] aries77:
have that file and "E15" in it. I guess "E15" is the right value not "X8i". I'll ask X8 user to do normal way test just to see if this is only happens on me or not, since X10 can do it.

Btw, I play with framework-res.apk and I screw up, can't boot into OS, fortunately I can boot into xrecovery using flashtools and restore my backup

edit :

tried "X8i" value anyway, and unsucessfull

Since dbts25 can boot with normal way with his x8 so I guess something wrong with my system.

Thanks, and looking foward for widget app :D
[XPERIA X10 Android Development] DooMLoRD:
oops..

nice catch... :D

ya u are right X8 devices are identified as E15 model... i have corrected my above post...

FYI...

X10 => x10

E10 => X10 Mini

U20 => X10 Mini Pro

E15 => X8
[XPERIA X10 Android Development] MrHassell:
android.permission

Load backups from sdcard and store files sure! Cannot make files executable in /sdcard. To write to sdcard from APK, application manifest requires following line or it wont work.

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
[XPERIA X10 Android Development] kwarkje:
install script

Nice work, gentlemen! I've been waiting for this for ages!

Just couldn't see why it was necessary to keep pushing the "back"-button to enter xRecovery...

Would be very nice to have the widget on my homescreen..

For the time being: is it enough to install the "reboot....zip" via xRecovery, and then I have the script installed?

I'm on Wolfbreak's ROM with Shiwantha's theme.

@mrhassell:

So you live in Melbourne! I've been there! Great city!

Greetz,

kwarkje

EDIT: I just did it the "hard way": I manually adapted my "chargemon"-file, as shown at Page One.

First I changed also the "charger"-things in the file, but when I applied that and rebooted, I couldn't get into xRecovery anymore.

I then copied back my backup-file, and changed that again, but now only for the booting into xRecovery. Made the script in Gscript, and now everything works fine! Booting into xRecovery, booting into ROM, even charging without booting did it!

Thanks alot, guys, this lightens up my day!
[XPERIA X10 Android Development] DooMLoRD:
ok so wht to do now? :confused:
[XPERIA X10 Android Development] a2441918:
Works like a charm..Thanks a lot
[XPERIA X10 Android Development] MrHassell:
Widget ready for alpha release - testers required!

We work around Android security and are now ready to release the first version.. I'm waiting for DooMLoRD to tell me it is really ready and I'm not going to cook someones phone :D

A few hours and DoonLoRD will upload and make available. This Widget provides a simple way of switching kernel from Zdzihu, Bin4ry custom or stock and to hot swap / load xRecovery and change your ROM..

Anyone interested in building APK installers for Android, we have /sdcard/Android/data/com.some.app.name - mounted in rw (in most cases) and a check means you can write a file, mess with it doing string substitution and read that stream back, validate changes are correct, mount R+W on /system for a short time to issue the MV or the RM command from SU while having RW on /system, copy the new file into location, issue the correct CHMOD command and exit.

RW mode has served it's purpose, its important to mount back as Read Only for performance and security. I have this Widget working and ready to test and get tuned correctly, based on your feedback and suggestions.

Widget requires PNG graphic (SEMPITERNAL my favorite designer but maybe too busy? Very happy to hear from any designers wanting to get their work exposed on an AOSP project!)

Feedback on bugs. There may be devices, like X8 which may cause issues.. not 100% certain until we get it out and people test..

This must be installed on each firmware you require this ability as it can't work unless you install... Nobody is that good... but were working on it ;)
[XPERIA X10 Android Development] kwarkje:
help testing

I'd like to help testing, mrhassell....

What are the conditions? I have some backups on my phone, one SE-stock-2.1, and one from Wolfbreaks ROM.

Release it, and I'll test it for you.

Greetz,

kwarkje
[XPERIA X10 Android Development] MrHassell:
Testing opening soon - DooMLoRD must say ok first!

Hi Thank you for your offer to Test, this is great! :)

Were just waiting for DooMLoRD to come back and I'm tweaking thing's with it now.. waiting basically until he gives the nod of approval to proceed.

There are no conidtions other than you have a backup of your device and are prepared for a possible boot loop at worst, overcome by re-entering xRecovery and restoring a backup.

It's a very ordinary looking widget (need gfx designed) but the functionality will make all X8 / X10 owner hopefully happy! I need to know about any enhancements to make in this Alpha stage, then we make it look nicer and bring in extended functionality.

Best Regards,

MH
[XPERIA X10 Android Development] MrHassell:
Widget is ready

I'm about to release the first version of such a widget, made in Eclipse. Pure Android from Java sources.. just having a few issues with a logo of all things - lol

EDIT: Last minute problem detected, melt down that forced SEUS restore! World cup.. wives.. all the important thing's ;) Have found the need to cater for at least the following devices.

E10

E15

LT15

U20

X10
[XPERIA X10 Android Development] Crowds:
i really like the one i use for my last mod (bottom right)

i could test;)
[XPERIA X10 Android Development] MrHassell:
complete device list - fully comp ;)

Thank you for this! With further inspection I found that this is actually missing one possible device... this is the list that it should cater for ;)

# E10

# E15

# LT15

# U20

# X10
[XPERIA X10 Android Development] DynamicRam:
i have an X10 Runing j's CM7 and going into recovery using back key don't work any more
[XPERIA X10 Android Development] DooMLoRD:
which version have u used for installation?

are you able to access recovery using the script atleast?

also can u please upload the following files for checking the issue:

/system/bin/chargemon

/system/recovery/model