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

Root [Discussion - Developers _ONLY_] Building ICS from source (Isaac's github).

I'll make sure to correct the resource file. It's so fun to have things change every day with no knowledge of it (not).

What's the behavior of the bootloop? Do you see the red MOTO logo and then the screen goes black (but still lit) and then it turns off and does the same thing?

Or do you actually see the ICS boot animation and it keeps restarting?

Also, check in the "out/target/product/triumph" folder and look in "system/lib/hw/", is gralloc.msm7x30.so and hwcomposer.msm7x30.so in there?

The bootloop: Weird, here's what happens.

When connected to my pc via usb: The screen lights up, the red led charging light turns on, shows the M logo on the screen, the screen goes dark and the red LED turns off, then repeats the process. Looks like a hard reset.

When NOT connected to my pc: The screen lights up, the M logo shows, then the phone just shuts down and does not restart.

No boot animation ever shows up.

I checked for gralloc.msm7x30.so and hwcomposer.msm7x30.so and they are both there and created.

I wonder if the issue is a kernel problem though. If I drop in my old miui kernel in there, it at least boots up to a point where I can get a logcat which of course is useless for our purposes but it seems to point to a kernel problem.

I tried rebuilding your kernel that you have pushed up and when I flash it using the latest ramdisk created in that build, I just get this on the logcat:

- exec '/system/bin/sh' failed: No such file or directory (2) -

if that helps at all.
 
The bootloop: Weird, here's what happens.

When connected to my pc via usb: The screen lights up, the red led charging light turns on, shows the M logo on the screen, the screen goes dark and the red LED turns off, then repeats the process. Looks like a hard reset.

When NOT connected to my pc: The screen lights up, the M logo shows, then the phone just shuts down and does not restart.

No boot animation ever shows up.

I checked for gralloc.msm7x30.so and hwcomposer.msm7x30.so and they are both there and created.

I wonder if the issue is a kernel problem though. If I drop in my old miui kernel in there, it at least boots up to a point where I can get a logcat which of course is useless for our purposes but it seems to point to a kernel problem.

I tried rebuilding your kernel that you have pushed up and when I flash it using the latest ramdisk created in that build, I just get this on the logcat:

- exec '/system/bin/sh' failed: No such file or directory (2) -

if that helps at all.

Old MIUI kernels won't work as they are VMSPLIT_3G and CM7/CM9 (this is specific to our project; technically, the CM project is VMSPLIT_3G) relies on VMSPLIT_2G. If you were wanting to try using an older kernel, it would have to be a CM7 kernel.

Code:
- exec '/system/bin/sh' failed: No such file or directory (2) -
This error indicates that the filesystems and paths were never properly created. More likely than not, ramdisk you're packing the new kernel in doesn't have a correct init script. Check init.triumph.rc to see if it has the line:

Code:
on fs
...which should be:

Code:
on early-fs
If it's not that, then the kernel really is bad. However, the most recent prebuilt image I pushed the device repo doesn't have any drastic changes. (Unless page faulting is a necessary thing).
 
Old MIUI kernels won't work as they are VMSPLIT_3G and CM7/CM9 (this is specific to our project; technically, the CM project is VMSPLIT_3G) relies on VMSPLIT_2G. If you were wanting to try using an older kernel, it would have to be a CM7 kernel.

Code:
- exec '/system/bin/sh' failed: No such file or directory (2) -
This error indicates that the filesystems and paths were never properly created. More likely than not, ramdisk you're packing the new kernel in doesn't have a correct init script. Check init.triumph.rc to see if it has the line:

Code:
on fs
...which should be:

Code:
on early-fs
If it's not that, then the kernel really is bad. However, the most recent prebuilt image I pushed the device repo doesn't have any drastic changes. (Unless page faulting is a necessary thing).

Yeah, I should've thought about trying the cm7 kernel instead of miui kernel. doh!

However, same result as before. And I did try packaging up the cm7 zimage with the cm9 ramdisk and I got the same file system error.

Also, I checked my ramdisk files and it is using your updated init.triumph.rc file with the "on early-fs".

But perhaps, my talk of the kernel maybe being the issue is just a red herring. Don't want to pull you off of your own thoughts of what the issue might be. :)

Edit: Looking at your ics kernel repo, I just realized that you made an experimental branch with your latest config settings for the page faulting and hw3d settings. So when I was building my copy of your kernel, it was just with the main ics kernel branch. So maybe it really isn't a kernel issue....
 
When I left for work this morning, I started a compile. This one finished.

On a hunch I had deleted the Camera config.xml, like stated in post #274 before I left.

rm ~android/system/device/motorola/triumph/overlay/packages/apps/Camera/res/values/config.xml

I also added the -DQCOM_HARDWARE line to "BoardConfigVendor.mk" from post #270. I'm trying to keep track of the modifications for the next guy.

cat >> ~/android/system/device/motorola/triumph/BoardConfig.mk <<END

COMMON_GLOBAL_CFLAGS += -DQCOM_HARDWARE
END

My new build system is driving around town after I missed :mad: the home delivery. I'll be heading out later this evening to fedx to collect it.:cool: I might just get it setup before I leave for my Dad's house for a couple of days. I have a lot to learn about Android.
 
Hey, guys. How are we on this? I haven't been involved in this thread in a little while. Anything I'm missing out? :D
 
Trying all this for kicks. Used to code in PHP and MySQL, so I can move around in this stuff a little, but by far not a dev, or any other title. I think I have followed along with most of the changes, and just repo synced today. The build tossed out with :

Code:
target Java: DownloadProvider (out/target/common/obj/APPS/DownloadProvider_intermediates/classes)
packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadInfo.java:421: cannot find symbol
symbol  : variable NETWORK_WIMAX
location: class android.app.DownloadManager.Request
                return DownloadManager.Request.NETWORK_WIMAX;
                                              ^
Note: packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadReceiver.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
make: *** [out/target/common/obj/APPS/DownloadProvider_intermediates/classes-full-debug.jar] Error 41
Not sure if there is more to the error, but I don't believe so.
 
Trying all this for kicks. Used to code in PHP and MySQL, so I can move around in this stuff a little, but by far not a dev, or any other title. I think I have followed along with most of the changes, and just repo synced today. The build tossed out with :

Code:
target Java: DownloadProvider (out/target/common/obj/APPS/DownloadProvider_intermediates/classes)
packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadInfo.java:421: cannot find symbol
symbol  : variable NETWORK_WIMAX
location: class android.app.DownloadManager.Request
                return DownloadManager.Request.NETWORK_WIMAX;
                                              ^
Note: packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadReceiver.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
make: *** [out/target/common/obj/APPS/DownloadProvider_intermediates/classes-full-debug.jar] Error 41
Not sure if there is more to the error, but I don't believe so.

That error was fixed in this commit: Gerrit Code Review
Sync and try again and you should be good.
 
That error was fixed in this commit: Gerrit Code Review
Sync and try again and you should be good.

Funny, that commit went through yesterday. I synced this morning. Anyhow, I may give another shot tomorrow. The ndiswrapper on my nic is flakey, so after the last boot it's out. Always something, but is fun to get back into something challenging.
 
So I got up to the get-prebuilts script and I keep getting this error:

unzip: cannot find or open proprietary/Term.apk, proprietary/Term.apk.zip or proprietary/Term.apk.ZIP.

I followed mantera's previous post and downloaded the Term.apk, inserting it into ~/android/system/vendor/cm/proprietary. I still get the same error.

EDIT: Ran the scripts in get-prebuilts manually and it went through. Odd. Hopefully it worked correctly.
 
I have gotten this error as well. I have synced multiple times with success but I still get the error:
Code:
make: *** [out/target/common/obj/APPS/DownloadProvider_intermediates/classes-full-debug.jar] Error 41
Any idea why?

Someone correct me if I am wrong, as I am trying to understand this as I go. The commit NateMckn referred to is ?upstream? in CM code, and would need to be synced or cherry picked into isaac's github in order for it to fix our error.
 
We shall see if I was right. Fresh repo sync, got the new DownloadManager.java from the commit link NateMckn (that should fix the error) plugged in locally, and will build again and see what happens. Of course the dinosaur that I'm building on probably won't be finished by the time I crash, so in the AM I guess.
 
You could try cd'ing into your ~/android/system, and then do a 'git fetch https://github.com/CyanogenMod/android_frameworks_base.git' to grab the changes directly from CM's repo.

Oh, I had a feeling there was an easier way than what I did. Since all I had to go on at the moment I wanted to run the build again was the link given, I downloaded the file and unpacked it in the local directory. I'd imagine typing the line above would have done all that for me, and possibly more if there were other commits as well. Is that the command line syntax as it should be used? And would it know CM9 was the intended target because of the repo already in use?
 
Oh, I had a feeling there was an easier way than what I did. Since all I had to go on at the moment I wanted to run the build again was the link given, I downloaded the file and unpacked it in the local directory. I'd imagine typing the line above would have done all that for me, and possibly more if there were other commits as well. Is that the command line syntax as it should be used? And would it know CM9 was the intended target because of the repo already in use?

It knows you're on ICS because of the first 'repo init -b ics'. Checkout Git Reference for quick reference.
 
Finally figured out this git/repo stuff (I guess that makes me less of a computer n00b?)! It took a bit longer to set up since I'm on my Macbook Pro (too lazy and paranoid to remove FileVault 2.0 and install Ubuntu or another distro).

Anyone know how large the file is? Google's site says it's ~25GB (if I remember correctly) but that seems rather large to me.
 
DownloadManager.java solved that error, now the build stops here

Code:
target thumb C++: libmemalloc <= hardware/qcom/display/libgralloc/alloc_controller.cpp
target SharedLib: libmemalloc (out/target/product/triumph/obj/SHARED_LIBRARIES/libmemalloc_intermediates/LINKED/libmemalloc.so)
target Symbolic: libmemalloc (out/target/product/triumph/symbols/system/lib/libmemalloc.so)
target Strip: libmemalloc (out/target/product/triumph/obj/lib/libmemalloc.so)
make: *** No rule to make target `out/target/product/triumph/obj/lib/libgenlock.so', needed by `out/target/product/triumph/obj/SHARED_LIBRARIES/gralloc.msm7x30_intermediates/LINKED/gralloc.msm7x30.so'.  Stop.
Googled, checked code review, came up empty.
 
DownloadManager.java solved that error, now the build stops here

Code:
target thumb C++: libmemalloc <= hardware/qcom/display/libgralloc/alloc_controller.cpp
target SharedLib: libmemalloc (out/target/product/triumph/obj/SHARED_LIBRARIES/libmemalloc_intermediates/LINKED/libmemalloc.so)
target Symbolic: libmemalloc (out/target/product/triumph/symbols/system/lib/libmemalloc.so)
target Strip: libmemalloc (out/target/product/triumph/obj/lib/libmemalloc.so)
make: *** No rule to make target `out/target/product/triumph/obj/lib/libgenlock.so', needed by `out/target/product/triumph/obj/SHARED_LIBRARIES/gralloc.msm7x30_intermediates/LINKED/gralloc.msm7x30.so'.  Stop.
Googled, checked code review, came up empty.

Looks like an error with the libgenlock. Did you add libgenlock to Android.mk as Isaac suggested here:

There's something funky with CM's qcom_display repo. After you repo sync, make sure to edit this file: https://github.com/ikarosdev/android_hardware_qcom_display/blob/ics/Android.mk

This line:

Code:
display-hals := libhwcomposer liboverlay libgralloc libcopybit
...should be:
Code:
display-hals := libhwcomposer liboverlay libgralloc libcopybit libgenlock
...so that it gets picked up during the build. I'm not going to fork and fix it as I'm sure the somebody will fix it soon and send it downstream.

So close on the build! It got down to signing the package, but it then failed with this:

Code:
running:  java -Xmx2048m -jar out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmp4neXzD out/target/product/triumph/cm_triumph-ota-eng.chingling.zip
Could not create the Java virtual machine.

   ERROR: signapk.jar failed: return code 1

make: *** [out/target/product/triumph/cm_triumph-ota-eng.chingling.zip] Error 1

I have java installed and it is working.
 
You could try cd'ing into your ~/android/system, and then do a 'git fetch https://github.com/CyanogenMod/android_frameworks_base.git' to grab the changes directly from CM's repo.

Just wanted to note that that the above doesn't actually work since " ~/android/system" is not a git repo.

I'm by no means a GIT expert (I picked Bazaar as my DVCS):rolleyes:. If I understand things correctly the only change needed is to cd to the actual git repo:

cd ~system/frameworks/base

That said I've done this an still seem to have the error 41 on this section of code. So I don't think it actually fixes the error, at least not without doing something else.

Perhaps the suggested Note section might help??? :confused:

Note: packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadReceiver.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
 
Back
Top Bottom