I have been searching the forums and webs and have tried some methods/apps to add this, but to no avail so far.
Phone: GSM GNexus - Rooted
Rom: 10-20120808-SKANK-maguro
Recovery: CWM
Currently no startup/shutdown sounds - would like to have some!
I have tried:
Using Boot sound changer from the marketplace
Manual install PowerOn.wav to system/etc and Shutdown.ogg to system/media/audio/ui.
and some other stuff I cannot recall right now.
Any suggestions or anyone know if it even possible?
Thanks in advance.
Cheers in advance.
Bump
Trying to revive this thread... I have also tried the exact same things on stock, AOKP-M2 and CM10.1.2 ROM's to no avail.
I suspect something needs to be changed in the init scripts (and a bin file in /system/bin) for these sounds to play...
Or can anyone shed light on where exactly is "rc.local" (or equivalent script) located in AOKP ROM's as that's what I am using right now?
Anyone?
Update... please view this thread:
http://forum.xda-developers.com/showthread.php?t=1096068
As I suspected, the rc.local init scripts need to be changed. Problem is that I am running AOkP that does not use the same scripts (or atleast the init scripts are kept in a different directory.
The executable "stagefright" exists in the /system/bin and is invoked using the command:
$> stagefright -a -o /system/media/android_audio.mp3
It should work but doesn't.
Anyone want to give this a try on CM10 and report??
Related
I have tried both AdAway and AdFree Android on my Nexus and while both seem to work okay on wi-fi, as soon as I use a mobile data connection the ads show as usual.
Has anybody else noticed this?
(I'm rooted etc. btw)
all I can tell is that I've the same experience.
Probably because they both use the hosts file to block ads, which is pretty silly and not very reliable.
Solution: use iptables instead. Get a script like this: http://pgl.yoyo.org/as/iplist.php?ipformat=iptables and put it in your userinit.d. Might have to change the location of the iptables executable for Android.
Thanks, but excuse the amateurish question, but where can I find the userinit.d?
I've extracted a ROM and tried searching for it but with no success.
cmonthegas said:
Thanks, but excuse the amateurish question, but where can I find the userinit.d?
I've extracted a ROM and tried searching for it but with no success.
Click to expand...
Click to collapse
Unfortunately I don't have a Galaxy Nexus yet so I don't know where they put userinit.d and iptables in the new version. I hope to put detailed instructions once I get my GN, but that could be a while....
Haven't checked yet but normally init.d folder is located in...
/etc/init.d
dunno if thats the same as userinit.d though???
right, I've checked in the /etc/init.d folder and there's three files
87calibration
93zipalign
99complete
I doubt it's any of them?
cmonthegas said:
right, I've checked in the /etc/init.d folder and there's three files
87calibration
93zipalign
99complete
I doubt it's any of them?
Click to expand...
Click to collapse
Actually since you are rooted you can just put it in that directory. Doesn't look like it comes with userinit but that's not a big deal, the point of using userinit is so that it lives on /data and not /system so you don't have to replace it everytime you flash /system. Just put the script in there, name it "95firewall", replace the location of the iptables binary in the script (you can find out where iptables lives by typing "which iptables" in the terminal) and chmod and chown it to be the same as the rest of the files in the directory.
Oh yeah and take out "-o eth0" from every line in the script, I don't think Android uses that interface name.
adaway adblocking works fine for me regardless of being on wifi or 3g. I don't really understand why there would be a difference, does it reference a separate host file per interface or something?
bleomycin said:
adaway adblocking works fine for me regardless of being on wifi or 3g. I don't really understand why there would be a difference, does it reference a separate host file per interface or something?
Click to expand...
Click to collapse
I think it may have something to do with proxies. With some SIM cards, Internet access through the cell radio is automatically configured to use a proxy. I've seen this with desktop operating systems: with proxies set up a certain way, domain name resolution bypasses the hosts file completely. Since on Android, this layer is just Linux, it wouldn't surprise me if this is what's happening as well.
Thanks for the input! I'll give it a try after lunch and see what happens.
I tried briefly last night using a custom script in Droidwall, but I couldn't get it to work properly. That would probably be the ideal method as the rules can just be turned on/off easily from within the app, but I'll give this a try first.
I'll update when I've had a go at it.
Cheers!
Ha, well it would appear I can't try it as I'm running a stock rom which doesn't support init.d
I was so used to running a custom rom, I forgot all about that.
I'll probably try installing another rom today or tomorrow - I haven't got time to be reinstalling everything atm
Shodney said:
Ha, well it would appear I can't try it as I'm running a stock rom which doesn't support init.d
I was so used to running a custom rom, I forgot all about that.
I'll probably try installing another rom today or tomorrow - I haven't got time to be reinstalling everything atm
Click to expand...
Click to collapse
Haha, same here...I didn't realize the stock ROM doesn't support it. Darn that sucks.
Okay i've (finally) had chance to have a play with this after installing Revolution rom with init.d support.
I changed the tables and dropped them into init.d, but they aren't being applied and ads are still coming through.
example of what I changed the entries to:
/system/bin/iptables -A OUTPUT -d 1100i.com -j DROP
Click to expand...
Click to collapse
If I try to apply a rule manually using ADB, I get the following error:
FIX ME! implement getgrnam() bionic/libc/bionic/stubs.c:416
Click to expand...
Click to collapse
So I'm stuck
Any ideas?
So the source code for the us cellular gs2 was released yesterday and I have been trying to build the kernel using initramfs. and this tut here( http://forum.xda-developers.com/showthread.php?t=1442870&highlight=make+modules). After changing to 10.04 I can get the kernel to compile successfully. Then I copy these modules
cp drivers/scsi/scsi_wait_scan.ko Path to initramfs/lib/modules
cp drivers/bluetooth/bthid/bthid.ko Path to initramfs/lib/modules
cp drivers/net/wireless/bcm4330/dhd.ko Path to initramfs/lib/modules
cp drivers/samsung/vibetonz/vibrator.ko Path to initramfs/lib/modules
cp drivers/staging/westbridge/astoria/switch/cyasswitch.ko Path to initramfs/lib/modules
(to correct paths)
Kernel builds fine, no errors that i can really see. It flashes fine, and to works for the most part. So far I noticed that wifi does not work, When you go into settings under wifi it just says error. Also Vibration does not work, though I did not check Bluetooth yet either. Those are the two I am going to worry about now.
Anyone have any suggestions on what might be wrong or where I need to start looking, I am kind of a (HUGE) noob with development but I am doing what I can to learn for this phone. Just need a little help from some one smarter than me.
Thanks
Sickin said:
So the source code for the us cellular gs2 was released yesterday and I have been trying to build the kernel using initramfs. and this tut here( http://forum.xda-developers.com/showthread.php?t=1442870&highlight=make+modules). After changing to 10.04 I can get the kernel to compile successfully. Then I copy these modules
cp drivers/scsi/scsi_wait_scan.ko Path to initramfs/lib/modules
cp drivers/bluetooth/bthid/bthid.ko Path to initramfs/lib/modules
cp drivers/net/wireless/bcm4330/dhd.ko Path to initramfs/lib/modules
cp drivers/samsung/vibetonz/vibrator.ko Path to initramfs/lib/modules
cp drivers/staging/westbridge/astoria/switch/cyasswitch.ko Path to initramfs/lib/modules
(to correct paths)
Kernel builds fine, no errors that i can really see. It flashes fine, and to works for the most part. So far I noticed that wifi does not work, When you go into settings under wifi it just says error. Also Vibration does not work, though I did not check Bluetooth yet either. Those are the two I am going to worry about now.
Anyone have any suggestions on what might be wrong or where I need to start looking, I am kind of a (HUGE) noob with development but I am doing what I can to learn for this phone. Just need a little help from some one smarter than me.
Thanks
Click to expand...
Click to collapse
Here try this init.rc file in you initramfs.
if that doesn't work, try reflasing the modem and kernel at the same time.
Usuaully wifi breaks if you don't flash the modem with it.
Thanks guys ill give it a shot.. Do I just drop the file in the root of initramfs? Or is there a specific folder it goes in?
Also where do I get my modem? Is it something I built in platform (still trying to figure out how to package that) or do I need to pull it off my phone?
Thanks again for the help!
Sent from my SCH-R760 using xda premium
Sickin said:
Thanks guys ill give it a shot.. Do I just drop the file in the root of initramfs? Or is there a specific folder it goes in?
Also where do I get my modem? Is it something I built in platform (still trying to figure out how to package that) or do I need to pull it off my phone?
Thanks again for the help!
Sent from my SCH-R760 using xda premium
Click to expand...
Click to collapse
Yes drop it in initramfs. You don't need to worry about modems that wont cause any problems. I have built a lot of gb kernels and never had any problems with flashing.
So I replaced the init.rc in initramfs and still no wifi or vibration. Any other thoughts?
Thanks Again
I'm not seeing the source code for the U.S. Cellular variant (SCH-R760) on Samsung's website. Where are you getting the source to compile a kernel from?
it is posted as the SCH-R760U, i thought it was wierd at first but all the documentation says for the uscc and the kernel build is c1_rev05_na_uscc_defconfig. That and it is the file that samsung sent to me when I inquired about the code for the R760.
GOOD NEWS EVERYONE! I tried it again using your init.rc and building with make -j5 instead of make modules and it worked. Found it after quite a while of browsing the tut thread but works well know. Thanks for you help.
Next question would be, what do I need to be doing to package the files I built from source and the platform samsung source. Like what files do I need to package, and should I be packaging them for cwm or odin?
Also my kernel version under my phone info shows unavailable, any ideas on that?
Hello all,
I hoping that someone here at xda can help me gain r/w access to the /system folder on a skeye.dart.
This is custom device (google will find it) that has Android ported and is currently running Android 2.1. It has a custom bootloader but will has the functionality to update the Android ROM from the sdcard. I am looking to hack the current ROM (update.img) so that I can write to the /system partition.
This is where the but comes in. Having searched high and low, I found the following thread:
HTML:
http://forum.xda-developers.com/showthread.php?t=1477845
This seemed to be what I needed as I had troubles with any Windows/cygwin process but I I am getting the following message when I try to split the img file:
Code:
[email protected]:~$ perl split_bootimg.pl update.img
Android Magic not found in update.img. Giving up.
I'm hoping someone can throw a bit of light on this for me? I can supply the zip file to anyone who's interested in having a look at this.
SKeye.dart
Just encountered batch of Skeye.dart mobile devices. They are running CE6.0. Is there a path to upgrade? How to convert to Android?
Any hints, ideas, links etc would be appreciated.
I have been banging my head against the wall for days now regarding this problem and can't quite figure it out. I created my own boot animation and was able to get that running just fine. I wanted to add a boot sound as well, so I did my homework and followed the instructions to a T. I resolved an error that I was getting while running the command sh bootsnd.sh, but even after it ran successfully I still was left with no boot sound. In the /system/media folder I have an mp3 named android_audio.mp3. I also verified that the build.prop file in the system folder had the line ro.config.play.bootsound=1 in it as well. I am currently running CM9 RC2 on my T-Mobile G2. Is there something I am missing? Can the G2 even play boot sounds? Has anyone gotten boot sounds to run on their G2? If so, how? Any help or pointers would be greatly appreciated and thank you all in advance for any help you may be able to provide.
Did you set permissions for the file to rwxrxxrxx?
Sent via carrier pigeon
Atomix86 said:
Did you set permissions for the file to rwxrxxrxx?
Sent via carrier pigeon
Click to expand...
Click to collapse
I double checked to make sure, but yeah the permissions were set correctly.
I can run the command 'stagefright -a -o /system/media/android_audio.mp3' from the terminal and it plays the sound without a problem.
Any other suggestions?
Are you calling it in desc.txt inside the bootanimation? I'm sure that's a part of it.
-Nipqer
I don't know if this makes a difference at all, but in the rom I use (EliteMod ICS, modified CM9 kernel, AOKP rom), seems you need to only place an boot_audio.mp3 file into /system/media/ , much like how you place boot animation.zip in /system/media, and chmod 644
Nipqer said:
Are you calling it in desc.txt inside the bootanimation? I'm sure that's a part of it.
-Nipqer
Click to expand...
Click to collapse
I did some additional research and did find a few references to adding the audio to the desc.txt file by adding a line like this 's android_audio.mp3' to it. I tried doing this and it borked the entire thing. On the reboot I saw the HTC logo, then was met by a black screen with no sound for a few moments before my home screen appeared.
kbeezie said:
I don't know if this makes a difference at all, but in the rom I use (EliteMod ICS, modified CM9 kernel, AOKP rom), seems you need to only place an boot_audio.mp3 file into /system/media/ , much like how you place boot animation.zip in /system/media, and chmod 644
Click to expand...
Click to collapse
I tried renaming it and changing the permissions again only to be met again by silence.
Thank you both for the suggestions. Do you guys have anything else I could try?
http://www.mydroidworld.com/topic/7677-how-to-add-a-bootsound-to-cyanogenmod/
i managed to add boot sound thx to that method... you will need bootsound.zip... here http://forum.xda-developers.com/showthread.php?t=1298144 and follow instructions of first link... hope it will help...
Hello fellas.
Back in the day, if I wanted to keep my dpi setting of 280 after flashing a new nightly (talking CM now), I just made a local.prop with the modified line and put it in /data.
Since, I think, CM10, though, local.prop doesn't get loaded, so I have to manually change build.prop.
I know a solution to this would be just keeping the same build.prop and flashing it after the rom (I already have a zip with the modifications I like that I flash after each nightly), but I don't really want to keep an old build.prop. What I want is to juat modify the line through my zip, so it stays updated while I don't have to modify the line every single day.
I found very quickly that I can use this line:
sed -i 's/ro.sf.lcd_density=320/ro.sf.lcd_density=280/g' /system/build.prop
to get the job done, and it does indeed work if I run it using the terminal. The problem is, I can't get it to work in recovery.
Having very little experience with programming, I'm just trying stuff to see if it works. I treid directly including the like line in the updater-script, didn't have too much hope for that.
I also tried including another simple file with this code:
#!/sbin/sh
sed -i 's/ro.sf.lcd_density=320/ro.sf.lcd_density=280/g' /system/build.prop
that I then extract and run, as I've seen in threads in the forum, but still doesn't work. The file gets extracted, but it doesn't work
I even tried to do it in a userinit script form, just to see if the rom loaded it on boot, but nope.
This is pretty friggin' simple to do, and I'm sure I'm probably making a silly noob mistake, but I just don't have any experience with this kind of code, so if someone can tell me how to make my zip run that very simple line, I'd much appreciate it.
Thanks.
Ok, after moar and moar and moar search, I finally found a script that does the job.
Problem solved.
yay
yay
Hi,
can you please provide your solution. I'm also trying to edit values in build.prop.
I tried to do via init.d script. The script is fine but / system seems to be read only when executing script at startup.
So it would be great if you can reply how you did it (maybe complete other way).
Thanks in advanced!
This is the post in question.
Swiftkey'd from my GNexus
Perfect, thanks a lot! I already found a workaround via an init.d script but this looks very promissing....
Sent from my XT894 using xda app-developers app
It's very useful.
I just included it in my after-nightly zip, so everything becomes automated with cyandelta.
Swiftkey'd from my GNexus
Hi,
So how do I edit AND add lines to build.prop from recovery ZIP?
Easy solution
Or maybe using just the updater-script and this code (this should also work on every rom)
run_program("/sbin/sh", "-c", "sed -i 's:ro.sf.lcd_density=.*:ro.sf.lcd_density=280:' /system/build.prop");
Click to expand...
Click to collapse
You can change 280 to another value if you want.
..
Molitro said:
Hello fellas.
Back in the day, if I wanted to keep my dpi setting of 280 after flashing a new nightly (talking CM now), I just made a local.prop with the modified line and put it in /data.
Since, I think, CM10, though, local.prop doesn't get loaded, so I have to manually change build.prop.
I know a solution to this would be just keeping the same build.prop and flashing it after the rom (I already have a zip with the modifications I like that I flash after each nightly), but I don't really want to keep an old build.prop. What I want is to juat modify the line through my zip, so it stays updated while I don't have to modify the line every single day.
I found very quickly that I can use this line:
sed -i 's/ro.sf.lcd_density=320/ro.sf.lcd_density=280/g' /system/build.prop
to get the job done, and it does indeed work if I run it using the terminal. The problem is, I can't get it to work in recovery.
Having very little experience with programming, I'm just trying stuff to see if it works. I treid directly including the like line in the updater-script, didn't have too much hope for that.
I also tried including another simple file with this code:
#!/sbin/sh
sed -i 's/ro.sf.lcd_density=320/ro.sf.lcd_density=280/g' /system/build.prop
that I then extract and run, as I've seen in threads in the forum, but still doesn't work. The file gets extracted, but it doesn't work
I even tried to do it in a userinit script form, just to see if the rom loaded it on boot, but nope.
This is pretty friggin' simple to do, and I'm sure I'm probably making a silly noob mistake, but I just don't have any experience with this kind of code, so if someone can tell me how to make my zip run that very simple line, I'd much appreciate it.
Thanks.
Click to expand...
Click to collapse
Sir can you tell me what to do to change ro.product.name if same phone in different regions is having different ro.product.name so that the build.prop for every phone that's installed.