Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,741,628 Members 40,620 Now Online
XDA Developers Android and Mobile Development Forum

[DEV][WiP] ramdisk-hijack - load custom ramdisk [4.3]

Tip us?
 
KeiranFTW
Old
(Last edited by KeiranFTW; 26th February 2014 at 07:05 PM.)
#1  
KeiranFTW's Avatar
Recognized Developer - OP
Thanks Meter 2724
Posts: 2,639
Join Date: Nov 2011
Location: Sunderland

 
DONATE TO ME
Default [DEV][WiP] ramdisk-hijack - load custom ramdisk [4.3]

Ramdisk Hijack - what is it?
- We are trying to load a custom ramdisk in order to be able to load a non-Sony based ROM on a locked bootloader using 2nd-init. This is a work in progress.

How can I help?
- My source code is here: https://github.com/keiranFTW/huashan_ramdisk-hijack also, you will find how to install this on there too.

You'll probably wonder why I'm trying to hack the stock ramdisk in - because my phone is my only device, I also need to use it as a phone. Once I can fix things this way I can move to using CyanogenMod Ramdisk.

Progress? CyanogenMod is currently booting on the phone but there are lots of non-working features.
This is not a ROM, do not install this unless you know what you are doing.

On completion I will give you this in form of an update.zip

#keiran
Sony Xperia SP - C5303 O2

illumination app for Xperia SP
The Following 27 Users Say Thank You to KeiranFTW For This Useful Post: [ Click to Expand ]
 
KeiranFTW
Old
#2  
KeiranFTW's Avatar
Recognized Developer - OP
Thanks Meter 2724
Posts: 2,639
Join Date: Nov 2011
Location: Sunderland

 
DONATE TO ME
Any developers willing to help me out here?
Sony Xperia SP - C5303 O2

illumination app for Xperia SP
The Following 4 Users Say Thank You to KeiranFTW For This Useful Post: [ Click to Expand ]
 
DooMLoRD
Old
#3  
DooMLoRD's Avatar
Recognized Developer
Thanks Meter 38006
Posts: 13,045
Join Date: Jul 2010
Location: Noida
I am busy with personal work, will check this out later... FYI you can't boot everything on same kernel... Specific kernel patches are required for some ROMs... Without those patches crucial rom features may not work...

Sent from my C6902 using xda app-developers app
The Following 5 Users Say Thank You to DooMLoRD For This Useful Post: [ Click to Expand ]
 
KeiranFTW
Old
(Last edited by KeiranFTW; 15th January 2014 at 01:43 PM.)
#4  
KeiranFTW's Avatar
Recognized Developer - OP
Thanks Meter 2724
Posts: 2,639
Join Date: Nov 2011
Location: Sunderland

 
DONATE TO ME
Quote:
Originally Posted by DooMLoRD View Post
I am busy with personal work, will check this out later... FYI you can't boot everything on same kernel... Specific kernel patches are required for some ROMs... Without those patches crucial rom features may not work...

Sent from my C6902 using xda app-developers app
I know this, and some of these kernel patches can be loaded as a module or even the ROM source code edited to suit the needs of the stock kernel.

Edit: I have had many people asking me if kexec could work, and the answer is no, probably not. Why? Because it requires a in-kernel patch as well as a module and so it is not possible to get it to work as we cannot flash a new kernel.

I have an idea and I'll start to merge changes soon

Sent from my C5303 using Tapatalk
Sony Xperia SP - C5303 O2

illumination app for Xperia SP
The Following 4 Users Say Thank You to KeiranFTW For This Useful Post: [ Click to Expand ]
 
neXus PRIME
Old
#5  
neXus PRIME's Avatar
Recognized Contributor
Thanks Meter 3008
Posts: 2,965
Join Date: Nov 2011
Location: Lahore, Pakistan
I am not experienced in kernel dev but maybe i can contribute in limited extent.
Unluckily, i also got "NO" in bootloader unlockable and very dissappointed to see that.
I hope someone will be able to find an alternative.
 
neXus PRIME
Old
(Last edited by neXus PRIME; 27th January 2014 at 05:49 PM.)
#6  
neXus PRIME's Avatar
Recognized Contributor
Thanks Meter 3008
Posts: 2,965
Join Date: Nov 2011
Location: Lahore, Pakistan
Have you looked at this?
http://www.xda-developers.com/androi...10-no-problem/

Work in peace...

OP
can you link me to some good references about chroot? I got the basic understanding, want to try it on linux on my laptop.
Closest analogy i can draw is the linux live cd, which runs the OS live without installation. If thats the case, and if we succeed in this process, we could use some partition to dump cm and run it from there.
But lets not get too far, im still in infancy stage.

Regards
Yasir


finally Got the basics of what you are doing... You are essentially doing the same thing letama atis112 and company did to run cm10 usng stock kernel, but hijacked stock ramdisk to run cm ramdisk.... Seems a good idea but will only work for CM10 (4.1 based) and later when locked bootloader gets 4.3, we could get cm10.2 as well. If you are doing the same thing they did, then hopefully it will work soon. If its something different, then wish u luck, ill keep tracking ur progress.
The Following User Says Thank You to neXus PRIME For This Useful Post: [ Click to Expand ]
 
MrSteve555
Old
#7  
Senior Member
Thanks Meter 369
Posts: 447
Join Date: Nov 2013
Yes, he is trying to have it done the same way as letama, atis and others with one minor difference - we don't have pre_hwconfig.sh, so he's trying with chargemon. Older ramdisk Keiran's github worked fine, but after some commits he made it doesn't boot. When I try with older ramdisk and newest step2.sh, everything except sdcard works fine. I have an idea - what if we kill every process with every possible way(killall5, pkill,etc) and then start it manually, by calling them from /system/bin? Maybe it's the way.
Some offtop here:
Maybe the kernel from leak works on locked BL's? If DooM haven't changed anything in it - it's very possible. Maybe someone with 4.3 leak on their phone would try locking the bootloader?(Of course only if that person knows how to unbrick, if something goes wrong).
The Following User Says Thank You to MrSteve555 For This Useful Post: [ Click to Expand ]
 
neXus PRIME
Old
#8  
neXus PRIME's Avatar
Recognized Contributor
Thanks Meter 3008
Posts: 2,965
Join Date: Nov 2011
Location: Lahore, Pakistan
Quote:
Originally Posted by MrSteve555 View Post
Yes, he is trying to have it done the same way as letama, atis and others with one minor difference - we don't have pre_hwconfig.sh, so he's trying with chargemon. Older ramdisk Keiran's github worked fine, but after some commits he made it doesn't boot. When I try with older ramdisk and newest step2.sh, everything except sdcard works fine. I have an idea - what if we kill every process with every possible way(killall5, pkill,etc) and then start it manually, by calling them from /system/bin? Maybe it's the way.
Some offtop here:
Maybe the kernel from leak works on locked BL's? If DooM haven't changed anything in it - it's very possible. Maybe someone with 4.3 leak on their phone would try locking the bootloader?(Of course only if that person knows how to unbrick, if something goes wrong).
I assume you have the same issue of unlockable BL? anyways, i am waiting for 4.3 so that after playing with, we can try and run cm10.2 at least... + miui
The Following 2 Users Say Thank You to neXus PRIME For This Useful Post: [ Click to Expand ]
 
dh.harald
Old
(Last edited by dh.harald; 17th February 2014 at 07:09 PM.)
#9  
Senior Member
Thanks Meter 928
Posts: 250
Join Date: May 2010
Location: London

 
DONATE TO ME
I've redone your work, and i can succesfully hijack ramdisk...

I've CM booted up, but:
1. graphical glithes (i know the solution)
2. no baseband
3. no sdcard (inner, external)

But it's improvement

Source: https://github.com/dh-harald/hijack-ramdisk-huashan
Attached Thumbnails
Click image for larger version

Name:	device-2014-02-17-200749.png
Views:	844
Size:	106.9 KB
ID:	2585139  
The Following 16 Users Say Thank You to dh.harald For This Useful Post: [ Click to Expand ]
 
KeiranFTW
Old
#10  
KeiranFTW's Avatar
Recognized Developer - OP
Thanks Meter 2724
Posts: 2,639
Join Date: Nov 2011
Location: Sunderland

 
DONATE TO ME
Quote:
Originally Posted by dh.harald View Post
I've redone your work, and i can succesfully hijack ramdisk...

I've CM booted up, but:
1. graphical glithes (i know the solution)
2. no baseband
3. no sdcard (inner, external)

But it's improvement

Source: https://github.com/dh-harald/hijack-ramdisk-huashan
If my girlfriend would let me and I was near you I would kiss you right now :*
Jokes aside, I think I might be able to fix SD card and the rest

Sent from my C5303 using Tapatalk
Sony Xperia SP - C5303 O2

illumination app for Xperia SP

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes