Building your own ROM

jack454

Well-known member
Mar 3, 2011
53
11
0
Visit site
Well that went well. Here's the error.
Install: out/host/linux-x86/bin/minigzip
Target ram disk: out/target/product/thunderc/ramdisk.img
/bin/bash: line 1: 14964 Broken pipe out/host/linux-x86/bin/mkbootfs out/target/product/thunderc/root
14965 Illegal instruction | out/host/linux-x86/bin/minigzip > out/target/product/thunderc/ramdisk.img
make: *** [out/target/product/thunderc/ramdisk.img] Error 132
make: *** Deleting file `out/target/product/thunderc/ramdisk.img'
 

tdm

Well-known member
Apr 11, 2011
1,409
3,596
0
Visit site
Well that went well. Here's the error.
Install: out/host/linux-x86/bin/minigzip
Target ram disk: out/target/product/thunderc/ramdisk.img
/bin/bash: line 1: 14964 Broken pipe out/host/linux-x86/bin/mkbootfs out/target/product/thunderc/root
14965 Illegal instruction | out/host/linux-x86/bin/minigzip > out/target/product/thunderc/ramdisk.img
make: *** [out/target/product/thunderc/ramdisk.img] Error 132
make: *** Deleting file `out/target/product/thunderc/ramdisk.img'

Bad memory? Does this repro consistently?
 
  • Like
Reactions: jack454

jack454

Well-known member
Mar 3, 2011
53
11
0
Visit site
Yes I have no trouble syncing. It just will not get past that point in the build. I'll try swapping memory with another box and see if that does it. Thanks
 

tdm

Well-known member
Apr 11, 2011
1,409
3,596
0
Visit site
I just found an incredible resource for git commands:

Git Community Book

It's the only documentation I've found to date that actually explains what is happening with each command, how to use the commands properly, and how to fix mistakes you might make along the way. ;)

Thanks I'll take a look. I've been a developer for 20 years and been using perforce for the last 5 or so. But I'm a noob to distributed source control. The thing that spooks me with git is how branches work. It seems so easy to make a change and lose it, or conversely not be able to obliterate a change because it's tucked away in some hidden corner of the history. Hopefully they cover that well...
 

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
I updated the BacksideUpdater to include the ability to check any download file's md5 against the manifest's value, and options to delete bad downloads and redownload, or delete manually. I also added progressdialog spinners to give the user something to look at while background processes are running. I also added graphics to the gui to give it a slightly more polished look. And finally I have the app run a package check upon opening, automatically downloading the manifest and checking the default download location for a package to test. This prevents multiple downloads of the manifest during a single use of the app, and makes the user experience a bit better imho.

BACKside users are currently updating to the 0131 build using the functionality built into the updater before these changes were added, but the main functionality was already in, so this update cycle should be a good test. Once we get through one more update cycle, I'll be ready to extend the manifest to support multiple ROMs.

Git now has master and gingerbread branches. I'll be using the master branch for the Eclipse project (still gotta clean that up and push it), and the gingerbread branch for the files to be added via device_thunderc.mk, so the package can be added to android/default.xml for syncing.
 
  • Like
Reactions: Discovered

pbailey212

Well-known member
Mar 20, 2011
765
219
0
Visit site
http://m.androidcentral.com/official-clockworkmod-touch-recovery-now-available-rom-manager

$1.99 for a touch recovery? Seriously? And how many users are going to screw up their phone with this because its not supported?

Koush is talented no doubt. But this seems a bit over the top. Or is it just me?

What's funny is its free from his Google+ page and xda I believe, but you have to do an in-App purchase to get it through rom manager. I will stick with compatible free volume rocker recovery

Sent from my LG-VM670 using Tapatalk
 

tdm

Well-known member
Apr 11, 2011
1,409
3,596
0
Visit site
FYI- I've given up on getting stock bootsound to work. I could be wrong, but it seems to be called from the stock init binary, and I don't know how to check that out. So for now, my flashable bootsound enabler will have to do. Not a big deal, since the flashable method works, and a large percentage of users don't care about bootsounds anyway. (I like it because it lets me know when my phone has a crash/reboot, even if it's in my pocket at the time ;))

An interesting note: when I do attempt to use the stock bootsound service via playmp3 and PowerOn.mp3, the flashable bootsound enabler doesn't work. So that may be a clue for those of you with more init experience than I have.

Thanks again to eollie for the original research on enabling bootsounds in CM7 ROMs!

FYI, I haven't forgotten about this. I just haven't had time to research it yet. I'll probably get to it tomorrow.

FWIW, the boot sound is not called directly from init, it is called from init.rc:

# LGE_CHANGE_S [soocheol.heo@lge.com] 2010-07-08, merge from MS690 for enable boot sound
# 20100708 hyeongwoo.seo@lge.com MS690: Change.. media -> root
# LGE_CHANGE [dojip.kim@lge.com] 2010-06-28
service bootsound /system/bin/playmp3
user root
group root
oneshot
# LGE_CHANGE_E [soocheol.heo@lge.com] 2010-07-08
 

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
FYI, I haven't forgotten about this. I just haven't had time to research it yet. I'll probably get to it tomorrow.

FWIW, the boot sound is not called directly from init, it is called from init.rc:

# LGE_CHANGE_S [soocheol.heo@lge.com] 2010-07-08, merge from MS690 for enable boot sound
# 20100708 hyeongwoo.seo@lge.com MS690: Change.. media -> root
# LGE_CHANGE [dojip.kim@lge.com] 2010-06-28
service bootsound /system/bin/playmp3
user root
group root
oneshot
# LGE_CHANGE_E [soocheol.heo@lge.com] 2010-07-08

Yep, I tried adding all that in, and added the files via device_thunderc.mk. I'm pretty sure it's in my git history.
 

tdm

Well-known member
Apr 11, 2011
1,409
3,596
0
Visit site
Yep, I tried adding all that in, and added the files via device_thunderc.mk. I'm pretty sure it's in my git history.

I copied the original playmp3 binary into /data/local/bin and the original PowerOn.mp3 to /system/sounds/poweron/PowerOn.mp3 (this is hardcoded in the binary). Here's what I saw:

Code:
# /data/local/bin/playmp3 
link_image[1962]: 16053 could not load needed library 'libaudioalsa.so' for '/data/local/bin/playmp3' (load_library[1104]: Library 'libaudioalsa.so' not found)CANNOT LINK EXECUTABLE
#

So then I copied the original /system/lib/libaudioalsa.so and tried again:

Code:
# /data/local/bin/playmp3 

 mode_ringer =2
OMXCORE API - OMX_Init 
 Inside OMX_GetComponentsOfRole 
OMXCORE API :  Get Handle b3d0 OMX.qcom.audio.decoder.mp3 b258
before get_cmp_index **********-1
get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.decoder.avc ,count = 0 
get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.decoder.mpeg4 ,count = 1 
get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.decoder.divx ,count = 2 
get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.decoder.vc1 ,count = 3 
get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.decoder.h263 ,count = 4 
get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.encoder.mpeg4 ,count = 5 
get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.decoder.spark ,count = 6 
get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.decoder.vp ,count = 7 
get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.video.encoder.h263 ,count = 8 
get_cmp_index: cmp_name = OMX.qcom.audio.decoder.mp3 , core[i].name = OMX.qcom.audio.decoder.mp3 ,count = 9 
returning index 9
getting fn pointer
Dynamically Loading the library : libOmxMp3Dec.so
free handle slot exists 0
Component c70c Successfully created
th_val = 40208e64
bOutputEosReached || (tunnel && bInputEosReached breaking
OMXCORE API :  Free Handle c70c
Library Used 
#

Bingo! :)
 

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
Beautiful! I had been copying playmp3 to /system/bin, not sure if that matters or not. Thanks, there are a few users who are going to hate you though. Perhaps I'll add an option to disable bootsound similar to the option to disable bootanimation (wonder if the sound will still play with bootanimation disabled, it didn't with my old method).

On the offline-charging issue, I am building right now with changes to ShutdownThread, init.c, init.thunder.rc, and added a file to init.d. ShutdownThread creates a single character file /proc/charger_args, init.c checks for it and adds the tail, init.thunder.rc checks for the tail and runs chargerlogo if set, and init.d runs a script to remove /proc/charger_args so it won't remain for next boot. Will let you know if it works, not sure if this is what you had in mind.
 

anthonycr

Themer. You've seen them
Jul 11, 2011
2,104
571
0
Visit site
Beautiful! I had been copying playmp3 to /system/bin, not sure if that matters or not. Thanks, there are a few users who are going to hate you though. Perhaps I'll add an option to disable bootsound similar to the option to disable bootanimation (wonder if the sound will still play with bootanimation disabled, it didn't with my old method).

On the offline-charging issue, I am building right now with changes to ShutdownThread, init.c, init.thunder.rc, and added a file to init.d. ShutdownThread creates a single character file /proc/charger_args, init.c checks for it and adds the tail, init.thunder.rc checks for the tail and runs chargerlogo if set, and init.d runs a script to remove /proc/charger_args so it won't remain for next boot. Will let you know if it works, not sure if this is what you had in mind.

I'm one of those people that will be mad:mad: I hate the virgin mobile sound. Thats cool you got it working tho.;)
 

tdm

Well-known member
Apr 11, 2011
1,409
3,596
0
Visit site
Beautiful! I had been copying playmp3 to /system/bin, not sure if that matters or not.

No, it does not matter. I was just using /data/local/bin because it's a convenient place to throw binaries for testing. It should really live in /system/bin.

The key points are to place the boot sound file in the proper place and copy the original libaudioalsa.so.

But now that we've got that figured out, I have to ask -- what's wrong with using stagefright like you do in your flashable boot sound script? It's open source, it's already on the phone, and doesn't require tossing Froyo shared libs onto your phone. Much better IMO.

And while I'm asking, I'm a bit confused -- you have a flashable boot sound enabler script, but your goal seems to be to integrate this directly into your ROM. Why don't you do that? The script would be pretty easy to integrate into init.thunderc.rc. It's just a bootsound service and a little shell script wrapper to stagefright which, conveniently enough, checks a configurable build.prop entry to see whether it should run or not.

Thanks, there are a few users who are going to hate you though. Perhaps I'll add an option to disable bootsound similar to the option to disable bootanimation

Nobody could hate it more than me. Remember my first post? ;)

(wonder if the sound will still play with bootanimation disabled, it didn't with my old method).

That's because of this:

Code:
echo 'on property:init.svc.bootanim=running   # to correct timin' >> /system/etc/init.local.rc
echo '        start bootsound' >> /system/etc/init.local.rc

This says to start the bootsound when the boot animation runs.

On the offline-charging issue, I am building right now with changes to ShutdownThread, init.c, init.thunder.rc, and added a file to init.d. ShutdownThread creates a single character file /proc/charger_args, init.c checks for it and adds the tail, init.thunder.rc checks for the tail and runs chargerlogo if set, and init.d runs a script to remove /proc/charger_args so it won't remain for next boot. Will let you know if it works, not sure if this is what you had in mind.

Not sure I follow. Please send me diffs in email and we'll go over them.

Thanks!
 

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
When I tried to incorporate the stagefright method into the build, it never worked. Unfortunately, I was new to git atm, and deleted that history doing a fresh repo sync months ago, so I'm not sure where I messed it up. Enabling native bootsound was an attempt to get all stock functions back. Thanks to you, we are closer now on several points! ;)

On the offline-charging fix, I forgot /proc is not writeable, so I'm rebuilding with charger_args written to /data, will send you the diffs when it's done compiling.


Remove 01mvdalvik for Market fix
I decided to remove the 01mvdalvik script from init.d while testing some of these other things. I hadn't been able to update any app larger than 6mb for a while now, even though internal storage showed plenty of space. I do not use anything other than native apps2sd. I can confirm that not moving dalvik-cache to data does fix the insufficient space issue when attempting to update or install from the Market. I was able to update all apps, including ones over 17mb, and after updating everything, I was able to install an app over 16mb. Whatever the newer Market checks, moving dalvik to data is not helping to give us more space. I'm removing it from future builds unless there are bug reports as a result.
 
  • Like
Reactions: Discovered

thekraven

Well-known member
Nov 10, 2010
1,407
1,148
0
Visit site
Do the V builds have this number pad appearance in the t9 dialer?

"Also I think I may have found a wierd kind of bug-ish thing? if you open up the phone dialer and enter a few digits and then go back to the home screen and then go back to the dialer so that the digits you entered are still there in the dialer, a keypad with numbers on it will popup on top of the regular phone dialer. It can be closed by pressing back but just looks really wierd..."
 

pbailey212

Well-known member
Mar 20, 2011
765
219
0
Visit site
Do the V builds have this number pad appearance in the t9 dialer?

"Also I think I may have found a wierd kind of bug-ish thing? if you open up the phone dialer and enter a few digits and then go back to the home screen and then go back to the dialer so that the digits you entered are still there in the dialer, a keypad with numbers on it will popup on top of the regular phone dialer. It can be closed by pressing back but just looks really wierd..."

I can confirm the extra number pad, that is wierd

Sent from my LG-VM670 using Tapatalk
 

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
You had offline-charging right all along Tom, just needed a slight change in the order I believe. Seems your test for last_kmsg does work, but the tails were not applied appropriately.

Note- I have included root/sbin/ftmpower and system/bin/battery_charging binaries from the stock OV system dump in the build I tested this on via device_thunderc.mk. I haven't tried without them yet, so I don't know if they have any impact. They were not added in as part of this commit, will test without them tomorrow (too tired now).

In init.c, there was already a battchg_pause variable being used, but it was never flagged properly I assume due to the OS and kernel not communicating the reboot command. We can use the last_kmsg test to set that variable appropriately, and then it adds the boot-pause queue-tail at the right moment. No need to add warm/cold tails, or write new drivers for the kernel.
Code:
/system/core/init.c
@@ -740,9 +740,9 @@ int main(int argc, char **argv)
     /* If /proc/last_kmsg exists the phone has been rebooted, if not
        it's a cold boot */
     if (access("/proc/last_kmsg", R_OK) == 0) {
-        action_for_each_trigger("boot-warm", action_add_queue_tail);
+        battchg_pause = 0;
     } else {
-        action_for_each_trigger("boot-cold", action_add_queue_tail);
+        battchg_pause = 1;
     }

In init.thunderc.rc I removed the exec of bootlogo in early-boot and added it at the top in boot-pause (diffs were over two commits, sorry, hope this makes sense):
Code:
# Charging while powered off
# *from powered off state, plug in charger
# *from os power down with charger plugged in
on boot-pause
        exec sbin/chargerlogo

# This does the initial RLE animation for the vendor logo.
# Taken verbatim from the stock init.rc.
service bootlogo /sbin/bootlogo
   user root
   group root
   oneshot
 
# Boot normally into os
# *if rebooted via any method
# *via power button when powered off and no charger
# *via long press on power button while offline charging
on early-boot
   start bootlogo

With these changes, the following behaviour occurs (crashes tested by oc to 864):

With charger plugged in:
Reboot from recovery - boots fully
Reboot from os - boots fully
Power off - boots to chargerlogo
Crash - boots fully

Without charger:
Reboot from recovery - boots fully
Reboot from os - boots fully
Power off - powers off
Crash - boots fully

Powered off > No charger > Press power button - boots fully
Powered off > Plug in charger - boots to to chargerlogo
Offline-charging > Long press power button - boots fully


I believe this is the behaviour we have been looking for. Now users can have offline-charging, and I can charge my phone overnight without worrying about some random crash rebooting it into offline-charging mode and making me miss alarms and phone calls!

Thanks again Tom!
 

Forum statistics

Threads
943,150
Messages
6,917,531
Members
3,158,850
Latest member
kerokekerol