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

Root CM12.1 Alpha Progress...

elisam98

Well-Known Member
Dec 11, 2014
107
136
NYC, NY
Background: I decided to use @vm03 's sources for the LG L70 (https://github.com/vm03) to build the latest CM12.1 for the L70. I then Bumped the boot image for our locked bootloader and removed lines for the L70 (w5) from the updater-script in the resulting zip file...
...And CM booted!

UPDATE (11/21/2015):
We now have a semi-working CM12.1 ROM!

Updated package:
https://www.androidfilehost.com/?fid=24269982087000841
  • This ROM requires you to flash a keylayout fix - see this post
UPDATE (11/22/2015):
Updated boot image - solves problems 1 & 2 in this post:
boot.img: https://www.androidfilehost.com/?fid=24269982087002191

UPDATE (11/24/2015):
New kernel/boot image with SELinux set to Permissive:
https://www.androidfilehost.com/?fid=24269982087003853


*As always, flash at your own risk!
*Take a nandroid backup before flashing (you're gonna need it ;-)
*This ROM is still very much a WIP, but we're getting there! :)


SOURCES:
(All trees are based on @vm03 's sources - Thanks!)
 
Last edited:
Wow, great progress. I was working on this yesterday, but it was just hanging at the boot animation. I even went as far as modifying the init so that I could adb in at boot time. I was able to adb in, but there were many errors in the syslog and even a kernel panic relating to an IRQ. I took his flashable from here:
http://androidforums.com/threads/un...12-1-for-lg-l70-d320-d320n-d325-ms323.912225/
I bumped the kernel, and removed the version check just like you. What did you do differently to get it to boot? Did you build the kernel from source?

What did you do to get touch working in your TWRP build?

I suggest pulling the touch related config from the LG kernel source.

LS620 sources can be download:
http://opensource.lge.com/fileMgr/download/op/LGLS620/111380

This file in particular looks interesting:
/kernel/arch/arm/boot/dts/msm8610-w5c_spr_us/msm8610-lge-input.dtsi
Which corresponds to:
android_kernel_lge_msm8610/arch/arm/boot/dts/msm8610-lge-common/msm8610-lge-input.dtsi

Edit: your rom just hangs at the boot animation also, you got it to boot all the way up?
 
Last edited:
  • Like
Reactions: elisam98
Upvote 0
your rom just hangs at the boot animation also, you got it to boot all the way up?
Hmmm... Interesting.
I'll tell you the steps I took to flash this.

I also had a hang on the initial bit, but then I took the next steps, and it actually booted. I figured the hang was a fluke, but apparently the next steps were important (although I have no clue why it should have worked)

  1. I flashed the zip in TWRP (2.8.6.0)
  2. Backed up stock boot.img
  3. Rebooted into CM - waited, but it hung
  4. Booted recovery again and restored the backed up stock boot.img
  5. Rebooted and got a LG security error
  6. Booted recovery again, reflashed the CM zip
  7. Cleared cache/dalvik
  8. Rebooted system - and it worked (except for the touchscreen issue)!
Like I said, I have no idea why these steps worked, but they did. I haven't had time to recreate them either, but please feel free to try. :)
 
Upvote 0
We probably need to fork @vm03 's repo and update all the board config stuff with values from the lg sources. A lot of work for this inexpensive device.

I figure: if we can do it, why not?
Plus, I was excited to read somewhere that you'll be able to extend your internal storage seamlessly onto an external SD in Marshmallow. And I'm getting sick and tired of running out of internal storage on my phone! :)

I also refined my boot process...
Apparently, all I have to do to boot into CM is to pull the battery after the first boot hangs and by the second boot, the system will load properly. (No boot image reflash needed)

I'm currently away without access to my dev system, so I can't modify anything from here. But at least I was able to recreate the boot!

By the way, I'm on a LG Realm LS620 for testing. Which w5c variant are you using, @jacob019 ?
 
Last edited:
Upvote 0
Awesome! I'm using the VS450PP, but I might be getting an LS620 also. From what I can tell the hardware is identical. The software differences are vast, starting with a completely different partition layout; but I do have the LS620 rom and modem running on my VS450PP, activated on Sprint :) I tried booting CM many times and failed, but I'll give it another try tonight. There could be something subtly different about my VS450PP that isn't playing right, but the fact that we have this issue at all points to a problem that needs fixing. For debuging I suggest modifying default.prop before build:
ro.adb.secure=0
ro.secure=0
edit the "on property:sys.usb.config=mtp" section, at the end of it, change
setprop sys.usb.state ${sys.usb.config}
to
start adbd
setprop sys.usb.state ${sys.usb.config},adb
That way we can adb in to see what's wrong even if it's stuck at the boot animation.
 
Last edited:
Upvote 0
Progress!
I replaced the touchscreen lines in the defconfig file and added the new dts folder from the stock package.
I then rebuilt the kernel/boot image only (Sorry, no time!)...

...and it booted with a working touchscreen on the first try! :) :)

I haven't had a chance to compile a complete package (so no adb on boot for now :( ), but I'm including a link to the new (+bumped) boot image.

All I did was:
  1. Boot into recovery
  2. Install CM12.1 from the original package
  3. Installed a new boot image from my newly compiled boot.img
And CM booted with no (visible) issues.

** Please let me know what bugs / errors exist - I have to log off for the night already but I'm sure the camera isn't working yet (I either have to update the vendor tree or change some more kernel stuff.)

Thanks @jacob019 for all your suggestions!

Here is the new boot image:
https://www.androidfilehost.com/?fid=24269982086994815

EDIT: It took FOREVER to initially start up, but once it did, it worked.
 
Last edited:
Upvote 0
Progress!
I replaced the touchscreen lines in the defconfig file and added the new dts folder from the stock package.
I then rebuilt the kernel/boot image only (Sorry, no time!)...

...and it booted with a working touchscreen on the first try! :) :)

I haven't had a chance to compile a complete package (so no adb on boot for now :( ), but I'm including a link to the new (+bumped) boot image.

All I did was:
  1. Boot into recovery
  2. Install CM12.1 from the original package
  3. Installed a new boot image from my newly compiled boot.img
And CM booted with no (visible) issues.

** Please let me know what bugs / errors exist - I have to log off for the night already but I'm sure the camera isn't working yet (I either have to update the vendor tree or change some more kernel stuff.)

Thanks @jacob019 for all your suggestions!

Here is the new boot image:
https://www.androidfilehost.com/?fid=24269982086994815

EDIT: It took FOREVER to initially start up, but once it did, it worked.


i test it on
LG Realm (LS620) it worked but only home button that doesn't worrk and some time menu key doesn't work but does work has little slow down but other than that it works well :3
 
Last edited:
Upvote 0
Been working hard to get this going...

I have a new upload with an integrated bumped boot image - although not much else has changed...
Here it is:
https://www.androidfilehost.com/?fid=24269982086997017

So far:
  • I cannot flash any GAPPS package - the keyboard, etc. keeps on FCing
  • Camera is not working
  • Can't access parts of the settings menu - ex. the Security submenu
  • As far as i know, this ROM will *not* work on VS450PP
  • Stock MMS app will not send text/MMS messages
I am running a new build now, but I figured I'd attach my boot logcat in the meanwhile - haven't had too much time to analyze it yet, but please chime in if you have any feedback! :)

Also added sources to the first post....
 

Attachments

  • logcat_boot.txt
    367.7 KB · Views: 587
Last edited:
  • Like
Reactions: jacob019
Upvote 0
Finally had a chance to try it out. Amazing! A few tweaks and it should be suitable for daily use. I'll try to find some time to contribute patches.

Hopefully :) Thanks for your help!
Since I last posted:
  • I switched the vendor tree back to @vm03 - this enabled Double Tap to wake
  • I figured out a fix for the home button not working. I hope to incorporate it into future builds...
  • Thanks to @Wavey2Fresh, we now have a solution for the security settings FC (it does seem like a temporary solution to delete the keystore, so hopefully there's a better way to fix this)
The camera still doesn't work, and I can't get gapps on the system either without it crashing. :(
I won't have access to an adb computer for a bit, but if anyone wants to try pulling logcats of these issues, that would be really helpful!
 
Upvote 0
I submitted a pull request for a solution to the keystore problem, we just need to replace keymaster.mdt with the one from our firmware.

--
or to live patch...
cp /firmware/image/keymaste.mdt /system/vendor/firmware/keymaster/keymaster.mdt
chown root:shell /system/vendor/firmware/keymaster/keymaster.mdt
chmod 0644 /system/vendor/firmware/keymaster/keymaster.mdt
 
Last edited:
  • Like
Reactions: elisam98
Upvote 0
i test it on
LG Realm (LS620) it worked but only home button that doesn't worrk and some time menu key doesn't work but does work has little slow down but other than that it works well :3

Thanks for testing!

Until I can get a new build up, here is a temporary fix for the home button:

  1. Open the file /system/usr/keylayout/Generic.kl in a text editor
  2. On the line that has
    Code:
    key 102   MOVE_HOME
    change it to read
    Code:
    key 102   HOME

Also, has anyone tested the latest build on the VS450PP?
 
Upvote 0
Different partitions, I believe..

Good point... :)
I'm gonna focus on the Realm and then we can hopefully get something up for the Exceed2

EDIT: Looks like the fstab file is device agnostic. The list only refers to each partition by name - which in each device should be already symlinked to the correct partition number.
I would actually assume that the VS450PP *wouldn't* have a partition problem even without changing the partition file.

Anyone want to confirm/correct this?
 
Last edited:
Upvote 0
Hopefully :) Thanks for your help!
Since I last posted:
  • I switched the vendor tree back to @vm03 - this enabled Double Tap to wake
  • I figured out a fix for the home button not working. I hope to incorporate it into future builds...
  • Thanks to @Wavey2Fresh, we now have a solution for the security settings FC (it does seem like a temporary solution to delete the keystore, so hopefully there's a better way to fix this)
The camera still doesn't work, and I can't get gapps on the system either without it crashing. :(
I won't have access to an adb computer for a bit, but if anyone wants to try pulling logcats of these issues, that would be really helpful!
1. dt2w not depends from vendor blobs, all open. Kernel part: https://github.com/vm03/android_kernel_lge_msm8610/commit/a0a37d8f777834f9cebaba02ece3a47be2aba75f
framework part: https://github.com/vm03/android_dev.../cmhw/org/cyanogenmod/hardware/TapToWake.java
2. For fix keystore replace files proprietary/vendor/firmware/keymaster/keymaster.* from you device.
 
  • Like
Reactions: elisam98
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones