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

[DEV][LB]ramdiskHijack - CM for locked bootloaders?

Tip us?
 
dh.harald
Old
(Last edited by dh.harald; 21st February 2014 at 10:26 PM.)
#1  
Senior Member - OP
Thanks Meter 929
Posts: 250
Join Date: May 2010
Location: London

 
DONATE TO ME
Default [DEV][LB]ramdiskHijack - CM for locked bootloaders?

I try to implement 2nd-init method (Motorola Milestone/Defy/etc) to hijack ramdisk.
With this method, we can change stock ramdisk, and we can boot CM with stock kernel...
Here's KeiranFTW's original thread too: http://forum.xda-developers.com/show....php?t=2608408, but I used 2nd-init instead of chroot

So, i'm done with following steps:
Successfully implement recovery and hijack ramdisk...
I can replace ramdisk contents with new one...
I can boot CM10.2, but it has defects:
Kernel and user space graphical drivers are mismatch, screen is yellowish (no blue), and a lots of mdp errors in dmesg, and no boot animation
no radio
there's some problem with /data/ / sdcard mount...

So i call for help, because i've limited time for this project, but it can interesting...

If you want to try it, do the following steps:
get hijack from here: https://github.com/dh-harald/hijack-ramdisk-huashan
get CM from source (preferred) or fxp, and delete boot.img from zip (and connected lines from update-script)
(optional) replace jelly.tar and recovery.tar to your device specific ramdisks, if you're on other device than Xperia SP
go to recovery, apply CM, (optional gapps), copy chargemon and hijack.tar to /system/bin and fix rights, and factory reset...
install 4.3 kernel only via flashtool (if you aren't on 4.3)...

Known problem, that you need original kernel modules too, to get wifi working (not tested)

I think, it's mainly CM configuration, but it maybe helps, when CM team starts to use Sony's 4.3 kernel based CM kernel...

Any helps are welcome...

Here's a screenshot about cm and locked bootloader and stock kernel... It's a bit confusing, because when i screenshot it via ddms, colors are fine, but in screen, there's no blue color, only yellow...

EDIT:
I've found that radio/fs problems are selinux related...

EDIT: Current status:
No wifi
No sdcard on /sdcard (only /data/media)
Got baseband, but still no radio
Visible glitches, yellowish screen (aosp <-> caf ?)
Attached Thumbnails
Click image for larger version

Name:	Screenshot_baseband.png
Views:	886
Size:	129.9 KB
ID:	2593125  
The Following 11 Users Say Thank You to dh.harald For This Useful Post: [ Click to Expand ]
 
testnumero
Old
#2  
Member
Thanks Meter 17
Posts: 68
Join Date: Oct 2011
hi,
have you checked this thread ?
http://forum.xda-developers.com/show....php?t=2593806 and
http://forum.xda-developers.com/show...8&postcount=22
 
dh.harald
Old
(Last edited by dh.harald; 19th February 2014 at 08:03 PM.)
#3  
Senior Member - OP
Thanks Meter 929
Posts: 250
Join Date: May 2010
Location: London

 
DONATE TO ME
Quote:
Originally Posted by testnumero View Post
I use same method, like this, but i use 2nd-init instead of chroot... selinux prevents proper booting
 
dh.harald
Old
(Last edited by dh.harald; 20th February 2014 at 11:48 AM.)
#4  
Senior Member - OP
Thanks Meter 929
Posts: 250
Join Date: May 2010
Location: London

 
DONATE TO ME
ATM, i'm playing stock rom with 2nd-init, to minimalize differences..

I passed selinux problems with @Hashcode binaries, got bootlogo, and i've no selinux errors, etc.

Next problem is modem initialization:

== cut ==

Any idea?

I cut some sleeps, in script, and modem doesn't initialized before script runs 2nd-init.

Now it boots, but still no radio...
The Following User Says Thank You to dh.harald For This Useful Post: [ Click to Expand ]
 
PAINfájdalom
Old
#5  
Junior Member
Thanks Meter 13
Posts: 19
Join Date: Aug 2013
Quote:
Originally Posted by dh.harald View Post
I try to implement 2nd-init method (Motorola Milestone/Defy/etc) to hijack ramdisk.
With this method, we can change stock ramdisk, and we can boot CM with stock kernel...
Here's KeiranFTW's original thread too: http://forum.xda-developers.com/show....php?t=2608408, but I used 2nd-init instead of chroot

So, i'm done with following steps:
Successfully implement recovery and hijack ramdisk...
I can replace ramdisk contents with new one...
I can boot CM10.2, but it has defects:
Kernel and user space graphical drivers are mismatch, screen is yellowish (no blue), and a lots of mdp errors in dmesg, and no boot animation
no radio
there's some problem with /data/ / sdcard mount...

So i call for help, because i've limited time for this project, but it can interesting...

If you want to try it, do the following steps:
get hijack from here: https://github.com/dh-harald/hijack-ramdisk-huashan
get CM from source (preferred) or fxp, and delete boot.img from zip (and connected lines from update-script)
(optional) replace jelly.tar and recovery.tar to your device specific ramdisks, if you're on other device than Xperia SP
go to recovery, apply CM, (optional gapps), copy chargemon and hijack.tar to /system/bin and fix rights, and factory reset...
install 4.3 kernel only via flashtool (if you aren't on 4.3)...

Known problem, that you need original kernel modules too, to get wifi working (not tested)

I think, it's mainly CM configuration, but it maybe helps, when CM team starts to use Sony's 4.3 kernel based CM kernel...

Any helps are welcome...

Here's a screenshot about cm and locked bootloader and stock kernel... It's a bit confusing, because when i screenshot it via ddms, colors are fine, but in screen, there's no blue color, only yellow...

EDIT:
I've found that radio/fs problems are selinux related...

when will be a good working ROM?
 
dooby-doo
Old
#6  
dooby-doo's Avatar
Junior Member
Thanks Meter 35
Posts: 25
Join Date: Dec 2009
Location: A világvégétől egy kicsit jobbra..
Check this thread please.
@TiMiN8R time is limited too.
Sorry for my bad English.
 
KeiranFTW
Old
(Last edited by KeiranFTW; 25th February 2014 at 03:27 PM.)
#7  
KeiranFTW's Avatar
Recognized Developer
Thanks Meter 2724
Posts: 2,639
Join Date: Nov 2011
Location: Sunderland

 
DONATE TO ME
I know this sounds crazy, but don't stop the sdcard service and some of the RIL services in hijack.sh.. and then see what happens.
The stock RAMdisk already starts some of these

You'll also probably need stock binaries too such as:
hostapd
wpa_supplicant
stock firmware files at /etc/firmware
/etc/wifi/calibration
libhardware_legacy.so

Hope I helped..

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

illumination app for Xperia SP
 
KeiranFTW
Old
#8  
KeiranFTW's Avatar
Recognized Developer
Thanks Meter 2724
Posts: 2,639
Join Date: Nov 2011
Location: Sunderland

 
DONATE TO ME
So looks like you have got baseband working but radio interface layer does not seem to be.. good work we are getting there

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

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

 
DONATE TO ME
here is my own attempt: https://github.com/keiranFTW/huashan_ramdisk-hijack

follow there for progress
Sony Xperia SP - C5303 O2

illumination app for Xperia SP
The Following 3 Users Say Thank You to KeiranFTW For This Useful Post: [ Click to Expand ]
 
diabolus81
Old
#10  
Member
Thanks Meter 15
Posts: 61
Join Date: Jun 2010
Nice to know someone still fight with this and i hope there will be a winning fight

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes