Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
svtfmook
Old
(Last edited by svtfmook; 16th November 2011 at 09:25 PM.)
#1  
Senior Member - OP
Thanks Meter 205
Posts: 1,202
Join Date: Aug 2007

 
DONATE TO ME
Default [Recovery][WIP] ARecovery

DO NOT FLASH ANYTHING FOUND HERE YET!!!
FOR DEVELOPMENT AND SHARING PURPOSES ONLY

if you flash anything before we say it's ok to, we take no resopnsibility...

the purpose of this thread is to get all of the devs together and working on this. this is a great method of getting us a fully functional recovery without needing the bootloader unlocked. this will work on a number of motorola devices as well.

Preface
ok, the bootstrap recovery works, however, without being able to boot directly into the recovery from a power up state, it makes actual "recovery" difficult. the bootstrap recovery is great, and nitro did an awesome job with it as well as adapting it to the atrix 2 with ninja-like quickness. but i would like to build onto his awesome work and expand it's functionality.

the purpose of ARecovery is to provide a fully functional recovery that you can boot directly into, like you can with any clockworkmod recovery device that has a locked bootloader.

there has been a couple different ways this has been achieved on other devices, some will actually use an sdcard as a recovery partition, others have used a hijacked boot file to launch recovery. the hijacked boot file worked great on the xperia line of phones, so this is the method i am using.

i have had some help from doomlord putting this together, and he is one of the top xperia devs. he has given me some guidance on how the hijack boot could work on the atrix 2 and i am in the process of putting this together. so whatever comes of this project, we owe it all to doomlord

The Plan
what i plan to do, is actually use nitro's bootstrap recovery to initially flash the ARecovery package, this will move the files i plan on using for the hijack boot.

The files that will initially be flashed will be the hijacked boot file, the redirected file and the arecovery package.

the hijacked boot file is emc_mgt_tool, this file is called early on in the boot sequence in init.mapphone_utms.rc. this file will be replaced with this code (which is a work in progress and i will update this script as i work on it):
Code:
#!/system/bin/sh

	cat /dev/input/event3 > /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 etc 
	# stock files will need to be added to arecovery.tar
	rm -r /sbin 
	# stock files will need to be added to arecovery.tar
	tar -xf /system/xbin/arecovery.tar

	# Umount /system
	umount -l /system

	# chroot
	chroot / /init

	fi
	
	# Continue normal booting
	/system/bin/enc_mgt_tool2
	exit
this script at boot will be activated with a hardware keypress, if triggered, the ARecovery process will start. if not triggered, boot will continue by being passed to the redirected file.

Progress
Pretty much where i am at right now, is still pretty much the beginning. stock system files need to be added to the arecovery.tar and the hijack script needs work. i will continue working on this until an sbf is found. when the sbf is found, i will start testing this.

doomlord has pretty much said that when we get an sbf, let him know and he'll help put this together.

and again, this will work on a number of motorola devices, so the more devs in on this, the better.

i attached arecovery_flash.zip. this is the initial flash package that contains the ARecovery stuff.
DO NOT FLASH THIS!!!


do not flash
version .01 download
Attached Files
File Type: zip arecovery_flash.zip - [Click for QR Code] (1.59 MB, 125 views)
The Following 2 Users Say Thank You to svtfmook For This Useful Post: [ Click to Expand ]
 
svtfmook
Old
(Last edited by svtfmook; 16th November 2011 at 09:26 PM.)
#2  
Senior Member - OP
Thanks Meter 205
Posts: 1,202
Join Date: Aug 2007

 
DONATE TO ME
Change Log:
11-16-2011
  • The start

11-16-2011 version .01
  • added stock sbin and etc to recovery.tar
  • added redirect file
 
JRW 28
Old
#3  
JRW 28's Avatar
Senior Member
Thanks Meter 630
Posts: 915
Join Date: Aug 2011
Location: FL
Take a look at this a see what you think?
http://hash-of-codes.blogspot.com/p/...safestrap.html
Current device - HTC One X+

 
svtfmook
Old
#4  
Senior Member - OP
Thanks Meter 205
Posts: 1,202
Join Date: Aug 2007

 
DONATE TO ME
Quote:
Originally Posted by JRW 28 View Post
Take a look at this a see what you think?
http://hash-of-codes.blogspot.com/p/...safestrap.html
even this would need to be built basically the same way as we are doing here
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...