• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [MetroPCS] Kernel and Bootloader modding from the ground up.

LoopyD

Android Enthusiast
Okay, so we got a Loki'd bootloader and a new ROM. Hehe. Idea abandoned. But don't worry, the new ROM is in the works!

Well... I don't know how many people will help me work on this. But due to LG refusing to fix the insufficient storage issue with this phone... The direct source of Link2SD not working correctly and why the SD hack inexplicably fails randomly and once insufficient storage is encountered means a full refresh of the entire system partition... It has come to my attention that this phone needs a lot more.

I screwed myself over by promising to work on this. And since I keep my promises I'm going to power through this. Blindly, inexplicably and stupidly.

This phone requires an entire rewrite of EVERYTHING including the stock ROM,kernel, and Bootloader. Everything coming up to this point is now obsolete unless you would like to deal with the insufficient storage problem. I promised a fully working ROM. And it is the most annoying bug this phone posesses...

This project will take a lot of time. I can cut corners by simply modding the original images to work correctly. However if the problem is being caused by hardware malfunctioning at the storage controller level than I will kindly post urging you to drop your phones in the toilet and buy a new one. Hee hee!

I have been struggling to find a laptop. One that will suit running a JVM, bytecode interpreter, Eclipse, and any other tools required for this. Going through bytecode and renaming variable names to make sense will take a long time. But if I can get a team to help instead of doing this alone the process will become easier.

Plan of project :

Re write the bootloader:

Extract all images and data from bootloader.
Convert it all to Java bytecode
Build bootloader source code from the bytecode.
Modify the source and compile it to a custom bootloader.

Rewrite the kernel:

decompile hroark kit kat kernel.
Convert it to Java bytecode.
Build kernel source from the byte code.
Modify the source and compile the custom kernel.

Build new TWRP recovery.

Make an entirely new kit kat ROM based on this new kernel.

Fix bugs with drivers and system objects.

Test and fix.

Release.

I don't want to do this alone and it requires being swift and efficient. If the users of this particular forum stick around this phone will be maxed out to its best potential. Anyone that wishes to help with this project please post here. Especially if you're experienced with Java.
 
Last edited:
It's great to have people working on this phone. Just want to make a few quick comments so you don't waste effort looking in the wrong direction. Note that I'm still learning as well. I could be wrong about anything. So even if you decide to ignore what I say, I will not take offense. After all, every choice we make or every action we take is an opportunity to learn.

1. The bootloader is locked. Fortunately, we have Loki. And with it, I think there's no need to bother with the bootloader. To understand a bit more about the bootloader and the booting process, read the blog post by djrbliss if you haven't. If you're talking about a different bootloader, then forget what I just said.
2. There's no need to reverse engineer the kernel. It's all open source. Linux kernel is GPL. Every modification to the kernel MUST be GPL, i.e. open-source. LG has released the kernel source it uses. Hroark has released source code of his modifications. If you believe any bug resides in the kernel, you can start hunting for it.
3. Most of the components before Android loads are written in C or C++. The Java VM doesn't come into play until the Android framework is loaded. So the bootloader, the kernel, and some parts of Android have nothing to do with Java.

It's going to be a lot of work. I hope you're able to achieve what you want to achieve. Good luck.
 
Are you sure you want a laptop? When it comes to price/performance ratio you'd be better off building a desktop machine with your own choice of parts that are most supported on linux. Maybe an i5 4690k/r9 290x system? Or if you're on a low budget maybe an amd cpu with a r9 280x? Or an apu to go even lower. When it comes to desktops you have a lot more choice in the parts which is the main perk.
 
Also I'd be willing to help with anything but unfortunately I have no idea how to code for linux yet. I'm just starting to test the waters with linux in terms of transitioning from windows. With the 'Cortana' AI being built in to windows 10 and harvesting all your data, I'll be going over to either Fedora or OpenSUSE from windows 8.1, unless they let you uninstall/turn it off. I do have a fully functional LGMS500 though. I could help test things for you.
 
First, don't decompile hroak's work, ask him for the source. Reverse engineering a dev's work isn't going to win you any friends you know.

Secondly - how do you plan to execute a Java kernel and why would you want to try?

Third - I have no idea how you plan to replace the bootloader but are you aware that an open bootloader exists and you could use it for a starting point? Search xda for it - I don't know if the project has been active lately or not.

Finally - how are you planning on converting native op codes to Java bytecode, and how are you planning to get to Java? Smali / backsmali from converted the somehow converted code?
Why not just start with source code? :confused:

Hope this helps. :)
 
I do like your Idea but no offence I think maybe put the bootloader on the back burner for now. As we do have a way around all that. Work on what this phone really needs right now and that is the link2SD fully working with out and issuses if a reboot happens or what not. Also more ROM support because the few dev's we do have are working there butt's off on ROM's and I think the more STABLE rom's we get will help this phone also. Just my personal opinion I will help as much as I can. I am no DEV person I will test and beat on rom's to find bugs. But programming I am not smart enough for that anymore.
 
Looked through github, saw some kernel source for the ov camera, but that's about it. We got a Loki'd bootloader as brought up many times in some other threads. Thanks for putting me in my place @EarlyMon! :D

'sides, dm's got a new ROM. He he he.
 
@ksjd0414 dm is. He has it partially working, though I'm itching my brain trying to figure out why it's blue...it's got something to do with the filter settings. Saturation / Hue and all that.

@EarlyMon and thank you! Saving me the trouble is definitely appreciated!
 
I'm looking online for ways of compiling a kernel for android using Linux on a desktop and downloading specific packages. I'm going to keep looking in to this, but I'm wondering if it's possible to modify an existing kernel to allow higher cpu frequencies.
 
Well, with the F6 I noticed 1.4 GHTZ is as far as I can push it safetly. Even then, extensive use of the GPU and even running video makes the CPU temp go well above 125oF. The intellidemand governor is useful in this case. Setting up SetCPU to underclock when the screen is off helps to cool it. But if you're staring at your phone a while it isn't a good idea to overclock past 1.4 GHTZ, at least on Jellybean.
 
Hey Loopy. In the post you say a new rom is in the works. Is that something you're working on? And can you tell us anything about it?
 
Last edited:
Back
Top Bottom