Busybox, Environment Variables and Tweaks scripts? - Samsung Galaxy S (4G Model)

Well I am trying to test how well the tweak script in init.d work
and apparently /bin isn't even in $PATH
I load it every time but its kind of annoying...
I can't seem to file .profile so my first question is where the hell is he?!
my second question is basically did anyone ever check them?
there are 2 or 3 attempts to remount partitions with noatime
one with barrier and another one which is basically a loop of noatime remount
Darky zipalign goes over system/app every reboot? why?
and 11link2sd why the 10 seconds sleep?
maybe everything is the way it suppose to be but I still need to find out why...

I am not a Linux engineer, but I'll answer with what I've noticed.
The android shell isn't supposed to be a full blown command line environment, so you don't get a .profile file and any variables you put into $PATH get reset when you reboot.
Yeah the scripts aren't that efficient, they're mostly script packs that have gotten passed on from phone to phone for a while, so if you know what you're doing you can put everything you want into your own file as that would work better instead of doing all the remounts you're talking about.
About zipalign, if you read through the script it now has a database file that keeps track of which apk's it's already zipaligned so it only does it to new ones.
Honestly I would be happy with just having the ext4 remounts for delalloc and noatime since those provide a significant boost, other than that I think Android does a good job at ram management, etc.

The PATH gets reset every time I get a new shell...
as for the Zipalign database or no database, it useless...
there is no reason for running this on the phone, it should be run only one time when you are making the ROM

logan123 said:
The PATH gets reset every time I get a new shell...
as for the Zipalign database or no database, it useless...
there is no reason for running this on the phone, it should be run only one time when you are making the ROM
Click to expand...
Click to collapse
I installed bash and not even it loads .bash_profile correctly. It gets really annoying.
Well, if you don't like some of the things just remove them.

Related

[HOW-TO] Edit your user.conf

With all these new "hero" builds coming out/updates for them, it is important to have optimal settings. Many people are not sure how to do this so I thought I would take my time to write a quick how to.
I have also attached a user.conf that is setup with comp cache and backing swap, swappiness of 80. I set the cpu scaling from 384 to 528 Mhz. You may edit this with notepad++ if you would like swap instead. Just open the user.conf with notepad++ and make the changes you want (the file is pretty self explanatory) Just be sure to set compcache to 0 along with backing swap
Place the "user.conf" on your sd root, and use the commands mentioned below
P.S. I apologize in advance to the moderators if you feel this is not in the appropriate place or not necessary, just trying to make things a little bit easier
In Terminal type:
Code:
$su
#sh /system/bin/rwsystem
#cp -f sdcard/user.conf /system/bin/user.conf
*If your ROM does not support "rwsystem"* use:
Code:
mount -o remount,rw /dev/mtd/mtdblock3 /system
Once again, I have attached a user.conf along with the JAC kernel that includes the script which allows you to use "rwsystem" (If your ROM supports the kernel)
Here is the link to the JACSki kernel with ttc_smokee's gps fix and Soul Life's script which will allow you to use "rwsystem"
http://www.4shared.com/file/133261717/84fd2884/JACHEROSki_Kernal-_Update.html
*Just like anything else on this site, I am not responsible for you bricking or damaging your device*
CHeErs
Post here if you would like any kind of walkthrough for "dummies" reguarding user.conf's or user.init's or
kingklick said:
*If your ROM does not have a kernel that supports "rwsystem" use
Code:
mount -oremount,rw /dev/mtd/mtdblock3 /system
Click to expand...
Click to collapse
You missed the space between -o and remount...
cx92001 said:
You missed the space between -o and remount...
Click to expand...
Click to collapse
works as-is
some progs accept arguments like that
some don't
mount happens to be one that does
alapapa said:
works as-is
some progs accept arguments like that
some don't
mount happens to be one that does
Click to expand...
Click to collapse
Good to know. Thanks
alapapa said:
works as-is
some progs accept arguments like that
some don't
mount happens to be one that does
Click to expand...
Click to collapse
yah it does work without the space, thanks, but i edited the space in anyway to prevent more posts like that
Are these edits needed/beneficial for those not interested/using hero ROMs?
I recall MikeTaylor had a file, but i know so little on what these can do. Thanks for doing this man.
s15274n said:
Are these edits needed/beneficial for those not interested/using hero ROMs?
I recall MikeTaylor had a file, but i know so little on what these can do. Thanks for doing this man.
Click to expand...
Click to collapse
Not needed, however I'd say most would argue they are beneficial changes for most ROMS... ie) cyanogen uses comp cache on his builds.
and no problem man my pleasure. My way of giving back to this great site
If you do not know how to edit these files post here and ill make you a user.conf to your liking
kingklick said:
With all these new "hero" builds coming out/updates for them, it is important to have optimal settings. Many people are not sure how to do this so I thought I would take my time to write a quick how to.
I have also attached a user.conf that is setup with comp cache and backing swap, swappiness of 80. I set the cpu scaling from 383 to 528 Mhz. You may edit this with notepad++ if you would like swap instead. Just be sure to set compcache to 0 along with backing swap
P.S. I apologize in advance to the moderators if you feel this is not in the appropriate place or not necessary, just trying to make things a little bit easier
In Terminal type:
Code:
$su
#rwsystem
#cp -f sdcard/user.conf /system/bin/user.conf
*If your ROM does not have a kernel that supports "rwsystem" use
Code:
mount -o remount,rw /dev/mtd/mtdblock3 /system
Once again, I have attached a user.conf along with the JAC kernel that will allow you to use "rwsystem" (If your ROM supports the kernel)
Here is the link to the JACSki kernel which will allow you to use "rwsystem"
http://www.megaupload.com/?d=K39IKK7A
*Just like anything else on this site, I am not responsible for you bricking or damaging your device*
CHeErs
Click to expand...
Click to collapse
Rwsystem is not kernel dependent, its a script I wrote that made its way into a few other builds. Just a script which resides in bin or xbin directory, nothing more or less.
soulife said:
Rwsystem is not kernel dependent, its a script I wrote that made its way into a few other builds. Just a script which resides in bin or xbin directory, nothing more or less.
Click to expand...
Click to collapse
o ok kool. I was mislead by a few others saying it was in the new JAC kernel silly people.... Anyway thanks for the fix soul life
you did a great thing by adding that script
Just changed the "kernel file" to the kernel with gps fix.
cheers!
More Detailed HOW-TO
Thanks for the post. I am in middle of (will take about a year, LOL) writing a HOW-TO on user.conf settings so that it will be easier to understand what needs editing and what settings are best. Currently, I am using a 64MB linux-swap with compcache and have been playing around with tweaking the settings to make my phones run "perfectly." This is much more difficult than it sounds when you take into account the various options such as backing swap, linux swap, swap files, compcache and swappiness settings. This all, of course, is system and user dependent. I use my G1 and my myTouch differently and have different apps installed on each so therefore, my settings are different for both. I still haven't come up with the perfect strategy but I am pretty close.
How about expanding this out (I don't mind actually posting it) to include more details on what each setting means and what the possible benefits/problems are with each. I use this (http://forum.xda-developers.com/showthread.php?t=542899) userinit.sh file along with the user.conf. I wrote one script to pull the user.conf from system/sd to my SD card and one that pushes it back to system/sd when I'm done with it. I use "Text Edit" to edit the user.conf right on my phone so I do not need to use ADB and Notepad++. This takes the PC out of the picture so I can tweak the settings wherever I happen to be.
I don't think there is ONE user.conf file that is good for everyone. It all depends on what the user's intentions are with his or her phone. Your default swappiness is set to 80 but that can vary. I am up in the air on that one testing between 30 and 100. But like I said, user dependent.
AndroidAppCritic said:
Thanks for the post. I am in middle of (will take about a year, LOL) writing a HOW-TO on user.conf settings so that it will be easier to understand what needs editing and what settings are best. Currently, I am using a 64MB linux-swap with compcache and have been playing around with tweaking the settings to make my phones run "perfectly." This is much more difficult than it sounds when you take into account the various options such as backing swap, linux swap, swap files, compcache and swappiness settings. This all, of course, is system and user dependent. I use my G1 and my myTouch differently and have different apps installed on each so therefore, my settings are different for both. I still haven't come up with the perfect strategy but I am pretty close.
How about expanding this out (I don't mind actually posting it) to include more details on what each setting means and what the possible benefits/problems are with each. I use this (http://forum.xda-developers.com/showthread.php?t=542899) userinit.sh file along with the user.conf. I wrote one script to pull the user.conf from system/sd to my SD card and one that pushes it back to system/sd when I'm done with it. I use "Text Edit" to edit the user.conf right on my phone so I do not need to use ADB and Notepad++. This takes the PC out of the picture so I can tweak the settings wherever I happen to be.
I don't think there is ONE user.conf file that is good for everyone. It all depends on what the user's intentions are with his or her phone. You default swappiness is set to 80 but that can vary. I am up in the air on that one testing between 30 and 100. But like I said, user dependent.
Click to expand...
Click to collapse
o ok very kool. Although, I did mention in my OP the HEro ROMs and what not, so I figured most people interested would be in the HEro scene. These settings seem to work best for me on 75% of the hero ROMs Ive flashed. DOesnt mean its "right" just whats worked for me. Just wanted to give back to this great site, and help the new comers because we have all been there at some point
P.S. PM me what you think I shoulld change/add to this thread to make it offical. Thank you in advance
ChEerS
Yeah, I just noticed the Hero thing. I suppose that I would like to see (somewhere on XDA either here or a new post) a very detailed explanation of all the possible settings, what they do and how they may or may not affect each other. When I was first trying all of this out I had to search very long to find explanations. If a noob wanted to know what swappiness was, for example, they would have a difficult time finding a good explanation. Even the experts can't agree so how is a novice supposed to understand it.
Perhaps this would be a good place for people who know to informally contribute and it can eventually be moved to its own thread, a sort of compache, linux-swap, backing swap, swappiness manual. A one-stop shop for all things memory related with links to the various XDA threads that can help them accomplish what they want to do.
My G1 and myTouch fly right now with next to no lag but it took me quite some time to get all the settings the way I like it (sort of, still perfecting them). I want the same for everyone.
AndroidAppCritic said:
Yeah, I just noticed the Hero thing. I suppose that I would like to see (somewhere on XDA either here or a new post) a very detailed explanation of all the possible settings, what they do and how they may or may not affect each other. When I was first trying all of this out I had to search very long to find explanations. If a noob wanted to know what swappiness was, for example, they would have a difficult time finding a good explanation. Even the experts can't agree so how is a novice supposed to understand it.
Perhaps this would be a good place for people who know to informally contribute and it can eventually be moved to its own thread, a sort of compache, linux-swap, backing swap, swappiness manual. A one-stop shop for all things memory related with links to the various XDA threads that can help them accomplish what they want to do.
My G1 and myTouch fly right now with next to no lag but it took me quite some time to get all the settings the way I like it (sort of, still perfecting them). I want the same for everyone.
Click to expand...
Click to collapse
Yeah I agree cuz when I was trying to root my phone and stuff around fiveish months ago... and I had to do the whole runaround because there was not any good organized information like now it is pretty close. But we definitely have a ways to go to get some good stuff for n00bs... lets get it done.'
AndroidAppCritic said:
Yeah, I just noticed the Hero thing. I suppose that I would like to see (somewhere on XDA either here or a new post) a very detailed explanation of all the possible settings, what they do and how they may or may not affect each other. When I was first trying all of this out I had to search very long to find explanations. If a noob wanted to know what swappiness was, for example, they would have a difficult time finding a good explanation. Even the experts can't agree so how is a novice supposed to understand it.
Perhaps this would be a good place for people who know to informally contribute and it can eventually be moved to its own thread, a sort of compache, linux-swap, backing swap, swappiness manual. A one-stop shop for all things memory related with links to the various XDA threads that can help them accomplish what they want to do.
My G1 and myTouch fly right now with next to no lag but it took me quite some time to get all the settings the way I like it (sort of, still perfecting them). I want the same for everyone.
Click to expand...
Click to collapse
yah for sure bro. Maybe you and me should put a detalied one together... This was intended to be a crude easy guide for pure n00bs who just want a "faster" phone. Most n00bs are not too concerned with what "swappiness" is and the technical difference between CC or linux-swap. Thats just my opionion though brother
Sorry if this is a stupid question but what exactly do I do with the two files? Do I rename the kernal update as update.zip and run that after I'm done installing the Hero ROM of my choice (I was looking at doing drizzy's)? Then what do I do with the user.conf file?
markdt098 said:
Sorry if this is a stupid question but what exactly do I do with the two files? Do I rename the kernal update as update.zip and run that after I'm done installing the Hero ROM of my choice (I was looking at doing drizzy's)? Then what do I do with the user.conf file?
Click to expand...
Click to collapse
Ima change the OP thanks anyway, if you have recovery 1.4 you can actually flash "any" zip meaning it does not need to be renamed. MOst ROMS now have this kernel built in, however MOdaco 2.2 DOES NOT, so if you plan on using modaco 2.2, flash this kernel. FLash MOdaco (or whatever ROM is missing this kernel) THEN flash the kernel right after without rebooting.
as far as the user.conf goes, put it on your root and use the commands i provided in the OP.
ChEeRS

Modified build.prop. Way improved speeds

I modified my build.prop this morning, and my D2 is way snappier, no catching in long lists, and more
EDIT: Pasting someone elses build.prop can mess things up it seems, heres the changes I made
http://forum.xda-developers.com/showthread.php?t=771232
Sent from my DROID2 using XDA App
Will this work for those with 2.2.20?
This is kind of specific to your phone. Can you tell us what you changed?
I would not blindly copy someones build.prop. One thing I noticed, his is for 2.2.19. I diffed his with mine to see actual changes that would make a difference. Mine is 2.2.20
Code:
# This defines the max event window manager can
# handle in 1 s. We may adjust this # for performance
# reason later
windowsmgr.max_events_per_sec=60
# This defines the min duration between two pointer event
ro.min_pointer_dur=8
# Time between scans in seconds. Keep it high to minimize battery drain.
# This only affects the case in which there are remembered access points,
# but none are in range.
wifi.supplicant_scan_interval = 75
# This is a high density device with more memory, so larger vm heaps for it.
dalvik.vm.heapsize=32m
#Proximity sensor debounce time
mot.proximity.delay=200
# disable touch below 60 pixels
mot.proximity.distance=45
The problem is some of my setting may differ because mine is stock 2.2.20 and his is 2.2.19, so I am not sure what he changed and what changed because of the update. I would like to hear exactly what he changed and his reasoning behind it (why he thinks it would give better performace). You can read the comments to at least see what the different items do to get an idea if you want to do a similar change, but that doesn't tell you if its different because of the 2.2.20 update, or because he changed it.
Update: I see he snagged these changes form the Droid X forums. Check here to see an explanation of what the settings do. http://forum.xda-developers.com/showthread.php?t=771232
I didn't think it was specific, but I guess so. Yeah, that's what I changed. And just testing after changes seem a lot faster
Sent from my DROID2 using XDA App
This is what I noticed after copying the file to my d2...
1. Can't make phone calls...when I press the phone icon to make the call, it kicks me to the homescreen and the top notification area tells me I have no signal....maybe the instant outgoing call changes is causing this.
2. When the phone turns the screen off...I noticed that the screen is black/blank but the back light is still on...so the screen is still on...
Other than these issues, I love how snappier the phone felt and the high density combined with launcherpro 5 rows is awesome. Too bad the issues makes my phone unusable...
facelessuser said:
I would not blindly copy someones build.prop.
Click to expand...
Click to collapse
Agreed, no one should copy this directly.
Code:
# This defines the max event window manager can
# handle in 1 s. We may adjust this # for performance
# reason later
windowsmgr.max_events_per_sec=60
I did this change manually and it does seem to have improved graphical performance in menus.
Anybody trying to mod their Build.prop using adb here's how I did it:
Disclaimer: I'm not responsible for messing up your phone a build.prop is an important file. (I copied the files off so the file should never leave your phone it should only be copied over after we edit it, so nothing bad /Should/ happen)
(set USB connection to Charge Only)
adb devices
adb shell
su
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cd /system
ls (only for seeing directory contents)
cp /system/build.prop /sdcard/build.prop
Now that you have the build.prop on the card you need to access it
Switch the USB connections to USB Mass Storage
Now go to the new usb device on your computer
The build.prop won't be editable yet
right-click->properties on the build.prop
now edit the name from build.prop to build.txt
click ok and/or apply
click yes to the box saying the file may not be usable (it will after we name it back)
now edit the build.prop (I used Wordpad and added comments that included the original values just for reference)
(make sure to save changes)
Now, go to the folder the 'build' is in at the top click on Tools->Folder options then uncheck the box for "hide extensions for known filetypes"
Rename the file from 'build.txt' back to 'build.prop'
Set the USB connections back to Charge Only
the cmd prompt should be back to the folder with adb in it so:
adb devices (just to make sure)
su
cp /sdcard/build.prop /system/build.prop
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
exit
That should do it just reboot your Droid 2 and it should run better/faster
My first benchmark from quadrant was about 1500 this came from around 1350-1430.
Hope this helps
On the last command I think you typed the command incorrectly, ro,remount does not work so I used -o,remount..not too familiar with adb but I think that worked and I changed some of the build.prop and the results are pretty noticeable..with no animations set the phone is amazingly snappy and responsive .I used some of the specs they used for droid x but im hoping someone can write all the droid 2 specs because this way we know if these limitations are for our phone not the X. Thanks
Sent from my DROID2 using XDA App
Just an fyi quadrant is 1369...never preformed one before..is this better than stock droid..I would assume so......phone is really working fantastic
Sent from my DROID2 using XDA App
Just did another 1417
Sent from my DROID2 using XDA App
I get 1450 average with my build.prop mods and deodexing
Sent from my DROID2 using XDA App
Noticed no improvement in speed after editing build.prop and rebooting.
The touch screen seems a bit more responsive.
Quadrant scores before and after are around 1400.
Still no idea why the D2 feels so sluggish when scrolling in any app, compared to my DInc, which gets only 1160. Build.prop edits did not fix this for me.
Says My Phone is a Droid X
I added the build, and now my phone:
A. wont alternate from landscape to long way.
B. SScreen light is on all the time.
Can someone please upload the stock build so I can go back. Thanks. My score was 1455, btw.
Thanks.
I did
karnovaran said:
Agreed, no one should copy this directly.
Code:
# This defines the max event window manager can
# handle in 1 s. We may adjust this # for performance
# reason later
windowsmgr.max_events_per_sec=60
I did this change manually and it does seem to have improved graphical performance in menus.
Click to expand...
Click to collapse
Please help me. I am an idiot, and did copy it. Please help me. I cant make calls etc. Cant find the droid 2 stock build. Please email it to me. !!!!! Buggin out...
here is the build.prop...obviously you will need to rename it to that but thats the original. yeah if you didnt read ANY of the previous posts it specifically said not to copy it..lol..sorry i think thats funny...
Fixed
JonandRoid said:
here is the build.prop...obviously you will need to rename it to that but thats the original. yeah if you didnt read ANY of the previous posts it specifically said not to copy it..lol..sorry i think thats funny...
Click to expand...
Click to collapse
Actually, I did read them. Not all though. Still funny though. Less so on y mend. Fixed it, thanks.
kageurufu said:
I modified my build.prop this morning, and my D2 is way snappier, no catching in long lists, and more
EDIT: Pasting someone elses build.prop can mess things up it seems, heres the changes I made
http://forum.xda-developers.com/showthread.php?t=771232
Sent from my DROID2 using XDA App
Click to expand...
Click to collapse
You mean those are the changes I made. haha glad to see it worked for you guys too.
newk8600 said:
Anybody trying to mod their Build.prop using adb here's how I did it:
Disclaimer: I'm not responsible for messing up your phone a build.prop is an important file. (I copied the files off so the file should never leave your phone it should only be copied over after we edit it, so nothing bad /Should/ happen)
(set USB connection to Charge Only)
adb devices
adb shell
su
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cd /system
ls (only for seeing directory contents)
cp /system/build.prop /sdcard/build.prop
Now that you have the build.prop on the card you need to access it
Switch the USB connections to USB Mass Storage
Now go to the new usb device on your computer
The build.prop won't be editable yet
right-click->properties on the build.prop
now edit the name from build.prop to build.txt
click ok and/or apply
click yes to the box saying the file may not be usable (it will after we name it back)
now edit the build.prop (I used Wordpad and added comments that included the original values just for reference)
(make sure to save changes)
Now, go to the folder the 'build' is in at the top click on Tools->Folder options then uncheck the box for "hide extensions for known filetypes"
Rename the file from 'build.txt' back to 'build.prop'
Set the USB connections back to Charge Only
the cmd prompt should be back to the folder with adb in it so:
adb devices (just to make sure)
adb shell
su
cp /sdcard/build.prop /system/build.prop
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
exit
That should do it just reboot your Droid 2 and it should run better/faster
My first benchmark from quadrant was about 1500 this came from around 1350-1430.
Hope this helps
Click to expand...
Click to collapse
think you forgot one thing...or at least I had to do this step....
thanks for the infos though, very helpful.
the bad news--this actually reduced my quadrant score. I was getting ~1350-1400 and now more like ~1275-1350
FWIW I'm running Epic Unleashed 2.5
Using epic unleashed 2.5 I'm constantly hitting near 1500 on quadrant and one time I hit 1520
Sent from my DROID2 using Tapatalk

[DEVS][THINK-TANK] Finding a solution for custom boot animations.

I need all your help on testing and finding a solid solution to get boot animations working for 100% of users and situations.
Desired behaviour:
1. Sprint files only -- shows Sprint animation.
2. bootanimation.zip only -- shows custom boot.
3. Both sets of files -- bootanimation.zip overrides Sprint.
Undesired behaviour: (i.e. things I've tried that have failed, or are ugly)
1. Sprint animation has fallback android animation overlay, blinking ANDROID over the Sprint stuff. UGLY!
2. Situations 1 and 2 work normally, but if both sets of files are present, both animations display.
3. Disabling sprint animation completely. This is not good, we want something to work for every user.
4. Custom boot animations that loop until boot completes don't stop when boot completes. This is very bad.
We need to thinktank some code to get this working right, so we can implement it easily in each kernel we produce.
So it is ro=read only, heh.
Ah, I love it! You weren't lying when you said elegant
DevinXtreme said:
Ah, I love it! You weren't lying when you said elegant
Click to expand...
Click to collapse
I do need you and others to test and improve upon it.
It doesn't act quite as expected, but even at this point it's far better than other alternatives.
tehdarkknight said:
I do need you and others to test and improve upon it.
It doesn't act quite as expected, but even at this point it's far better than other alternatives.
Click to expand...
Click to collapse
Blah. Gone over several scenarios and they all end exactly where we are. I'm not so hot with scripting, but the pseudo should translate the same.
What about nesting if-thens? Don't assume anything (rw.kernel.android.customboot shouldn't be set until going through the if-thens). Create the parent if-then that checks for the Sammy/Sprint files. If it finds them, set rw.kernel.android.customboot to false, then write the nested statement to check for the custom boot files. If they are there, set rw.kernel.android.customboot to true. Then, to the parent statement, write an else that just sets rw.kernel.android.customboot to true. This should solve the problem. So:
Code:
if(Sprint/Sammy Files exist){
rw.kernel.android.customboot = 0
if(Custom Files also exist)
rw.kernel.android.customboot = 1
}
else
rw.kernel.android.customboot = 1
I got it working a little better.
init.rc:
Code:
on property:rw.kernel.android.customboot=1
start bootanimcustom
on property:rw.kernel.android.stockboot=1
start playlogos1
service playlogos1 /system/bin/playlogos1
user root
oneshot
disabled
service bootanimcustom /system/bin/bootanimation
user graphics
group graphics
disabled
oneshot
customboot.sh
Code:
#!/system/bin/sh
if [ -f "/data/local/bootanimation.zip" -o -f "/system/media/bootanimation.zip" ]; then
setprop rw.kernel.android.customboot 1
else
setprop rw.kernel.android.stockboot 1
fi
I do, however, have a problem. The boot animation never ends. The system starts up and the UI is loaded, but the boot animation takes over the screen and never seems to die. Using adb shell I was able to see the process and kill it, which restored the screen to the OS. Any ideas on how to stop it automatically?
ttabbal said:
I got it working a little better.
init.rc:
Code:
on property:rw.kernel.android.customboot=1
start bootanimcustom
on property:rw.kernel.android.stockboot=1
start playlogos1
service playlogos1 /system/bin/playlogos1
user root
oneshot
disabled
service bootanimcustom /system/bin/bootanimation
user graphics
group graphics
disabled
oneshot
customboot.sh
Code:
#!/system/bin/sh
if [ -f "/data/local/bootanimation.zip" -o -f "/system/media/bootanimation.zip" ]; then
setprop rw.kernel.android.customboot 1
else
setprop rw.kernel.android.stockboot 1
fi
I do, however, have a problem. The boot animation never ends. The system starts up and the UI is loaded, but the boot animation takes over the screen and never seems to die. Using adb shell I was able to see the process and kill it, which restored the screen to the OS. Any ideas on how to stop it automatically?
Click to expand...
Click to collapse
Are you using stock animations or a custom one?
Also, won't this run into the same problem? If both conditionals end up true, you've got it trying to run both.
DevinXtreme said:
Are you using stock animations or a custom one?
Also, won't this run into the same problem? If both conditionals end up true, you've got it trying to run both.
Click to expand...
Click to collapse
I tried the sketch android. I also noticed that the bootanimation2nd loads up an "Android" text that doesn't take over as much of the screen.
The conditionals can't both end up true, only one can ever be set in the shell script. If I delete the bootanimation.zip, I get the standard "Galaxy S" animation via playlogos. If I have a bootanimation.zip, that's what displays. It just never goes away.
ttabbal said:
The conditionals can't both end up true, only one can ever be set in the shell script. If I delete the bootanimation.zip, I get the standard "Galaxy S" animation via playlogos. If I have a bootanimation.zip, that's what displays. It just never goes away.
Click to expand...
Click to collapse
Blah. That's what I get for not paying attention. I read the if-then-else totally wrong... I'm in class right now, doing Java programming... they meshed.
That's weird feedback, though. Eff Sammy making this harder than it needs to be.
Is it possible to nest with these shell scripts?
DevinXtreme said:
Blah. That's what I get for not paying attention. I read the if-then-else totally wrong... I'm in class right now, doing Java programming... they meshed.
That's weird feedback, though. Eff Sammy making this harder than it needs to be.
Is it possible to nest with these shell scripts?
Click to expand...
Click to collapse
Nest? You mean like a nested-if-then-else?
if [ test ] then
if [ test2 ] then
fi
fi
That's the basic structure for shell scripts if-nesting if I'm understanding you right.
ttabbal said:
Nest? You mean like a nested-if-then-else?
if [ test ] then
if [ test2 ] then
fi
fi
That's the basic structure for shell scripts if-nesting if I'm understanding you right.
Click to expand...
Click to collapse
Exactly. I've never actually worked with shell scripting before, so while I get the function, I just don't know enough to write my own. Syntax is weird like that. I don't see why it would loop.
DevinXtreme said:
Exactly. I've never actually worked with shell scripting before, so while I get the function, I just don't know enough to write my own. Syntax is weird like that. I don't see why it would loop.
Click to expand...
Click to collapse
Yeah, it's like the bootanimation process is waiting for a trigger to tell it to stop. I suspect that the samsung Android doesn't do this, as they don't use that program. I just don't know what it is that it needs to do. If I can figure that out, I can likely write something to trigger it.
thought the epic doesnt like if [insert command here] statements?
shabbypenguin said:
thought the epic doesnt like if [insert command here] statements?
Click to expand...
Click to collapse
Depends on the shell interpreter I would think. I'm on a Vibrant though, so perhaps there are differences.
shabbypenguin said:
thought the epic doesnt like if [insert command here] statements?
Click to expand...
Click to collapse
My initramfs installs busybox
ttabbal said:
I got it working a little better.
<snip>
I do, however, have a problem. The boot animation never ends. The system starts up and the UI is loaded, but the boot animation takes over the screen and never seems to die. Using adb shell I was able to see the process and kill it, which restored the screen to the OS. Any ideas on how to stop it automatically?
Click to expand...
Click to collapse
I have two things to note about your code. The first is that we should only use one prop, it's just good coding practice and prevents unintended behaviour. The second is that the reason playlogos1 loops is because the service needs to be oneshot, if you start it normally, it loops. But it would appear that you can't oneshot a service inside an 'on' statement in init.rc.
I think our solution lies here: http://www.kandroid.org/android_pdk/bring_up.html
The problem was my bad syntax in init.rc. I think I have it fixed, i'll compile tomorrow morning.
doesnt install it all the way, still had to link some things in order for me to debug the battery tweak
That's a good question. The initramfs runs /system/bin/busybox --install, but I've never checked the linkage. I'll be pushing my initramfs to github soon.
if tahts the case i may start over with the project and just use your kernel as a base install, kinda like what collin did for cm6
update:
finished check sig
Necro'ing this thread. Check OP for new information, and let's get this ***** solved!

RAM Script and Delvik Heap size anyone?

Has anyone tried this on the Infuse ?
[SCRIPT][19.9.2011] The Best RAM Optimization - Updated!
I also did the following.
Used Root Explorer, and Open & edit /system/build.prop, change dalvik.vm.heapsize= to 80m
Any one confirms this is great ?
Have not tried, might muck around with it later today after i finish my essay. Do you think his script will run on top of DynamicRAM's 99 tweaks? I know the supercharger script didn't play nice with it if you have both installed at the same time.
Didn't notice anything
hey ya'll watch this!!
If this is what I think it is then it is what dynamic rams script is based off of. If it is an init.d script then most likely the parameters that each changes that ate the same will new set to the last commands that runs setting it. Though both may run together it is gonna be mostly redundant. One script will mostly not be applied. Changing the name of the script will determine what runs first. I know the letter s and I think e are used for this but I don't know which is set to run first. Then the number sets the order after that.

Carrier IQ

So, looks like we have Carrier IQ on our phones, thanks to AT&T. Any luck on getting a 3rd party ROM on here yet? Any estimates as to when?
Can you give us more information? like how you found it on the phone, what steps did you take?
With more info, those of us in the know can figure out how to disable it, or remove it, without having to resort to waiting for a rom.
I have been looking for it for quite some time without much luck.
It's the device health app.it calls the ciq agent . Easily frozen.
Sent from my MB865
mtnlion said:
It's the device health app.it calls the ciq agent . Easily frozen.
Sent from my MB865
Click to expand...
Click to collapse
Thanks, I will see what else I can come up with for the ciq agent, maybe a way I can fake it out on the *NIX side of the house.
Yep first thing I went looking for after I got root.
Bloat freezer. It's free, finds it fast. When you freeze device health it doesn't want to close and keeps force closing, just reboot, it will be frozen and not running.
Douchewithaphone said:
Bloat freezer. It's free, finds it fast. When you freeze device health it doesn't want to close and keeps force closing, just reboot, it will be frozen and not running.
Click to expand...
Click to collapse
Must be rooted.
Sent from my mAtrix2!!
Well, I have found a way from the UNIX end to stop this thing in it's tracks, but it is not pretty for those unfamiliar with command line....
What we have to do is uncompress the kernel image in the boot.img remove the sys.DeviceHealth from the init.rc file there, then compress the kernel back up, all using cpio.... now to see if I can possibly make it work, and not brick any phones in the process, maybe I can throw a quick apk together next week.
I have tried the bloat freezer and the android assistant and I can still find the sys.DeviceHealth running on the UNIX side with the ps command, so this is a nasty one.
I will keep you guys posted, If I can find a better way.
Here is the link I saw, and how I figured out where sys.DeviceHealth is starting from.
For those interested ONLY. PLEASE do not try this yet, give me some more time to play with this in an emulator and see what I can come up with.
I am just sharing information at this time. BTW Zygote is the process that is calling the sys.DeviceHealth on the Atrix 2.
To see this Do the following from the terminal emulator app on your phone or though adb shell.
ps | grep -i Heal
ps | grep -i zygote
If you notice on the sys.DeviceHealth process that the second number is the same number as the first number of the zygote process.... What that means is that the zygote process starts the sys.DeviceHealth process. The first number is process ID (the processes "adress" so to speak), and the second number is the Parent process ID (The process that started the next one).
http://vinnysoft.blogspot.com/2009/12/zygote-system-process.html
jimbridgman said:
Here is the link I saw, and how I figured out where sys.DeviceHealth is starting from.
For those interested ONLY. PLEASE do not try this yet, give me some more time to play with this in an emulator and see what I can come up with.
I am just sharing information at this time. BTW Zygote is the process that is calling the sys.DeviceHealth on the Atrix 2.
To see this Do the following from the terminal emulator app on your phone or though adb shell.
ps | grep -i Heal
ps | grep -i zygote
If you notice on the sys.DeviceHealth process that the second number is the same number as the first number of the zygote process.... What that means is that the zygote process starts the sys.DeviceHealth process. The first number is process ID (the processes "adress" so to speak), and the second number is the Parent process ID (The process that started the next one).
http://vinnysoft.blogspot.com/2009/12/zygote-system-process.html
Click to expand...
Click to collapse
zygote appears to be a process respawner (watchdog) of some type. The trick is to find out where its config lies and tweak that to prevent the launching of sys.DeviceHealth.
I've just got the busybox installed that came with TiBackup and the shell tools are sorely limited (no grep for eg.). The shell itself is also pretty limited (no pipe??? WTF?). I had a version of bash on my atrix4g, and I'm wondering if you know of a reliable source for bash and shell tools for the atrix2?
A lil info on what AT&T says and how it uses Carrier IQ and some of the devices it is on can be read here http://m.androidcentral.com/atts-us...its-own-analytics-app-not-just-embedded-phone
razholio said:
zygote appears to be a process respawner (watchdog) of some type. The trick is to find out where its config lies and tweak that to prevent the launching of sys.DeviceHealth.
I've just got the busybox installed that came with TiBackup and the shell tools are sorely limited (no grep for eg.). The shell itself is also pretty limited (no pipe??? WTF?). I had a version of bash on my atrix4g, and I'm wondering if you know of a reliable source for bash and shell tools for the atrix2?
Click to expand...
Click to collapse
Yes that is exactly what zygote is. You would disable the sys.DeviceHealth in the EXACT way it says in the in link I posted, but you have to uncompress the kernel image, and extract the init.rc in there, then edit it to not include the sys.DeviceHealth, then re-compress it with cpio. This is just for information right now, so that later on when the ROM developers get started, they can use this info for their ROMs. I am testing this using a couple Android emulators to see what I can do with this.
As for a reliable busybox, I like the version from JRummy16 in the market, go grab that an install the latest version of busybox from his installer you downloaded (I think it is 1.19.3 or something similar).
also go get the hackers keyboard in the market, it helps a lot if you EVER use the terminal app ON the phone, heck I like for text and typing as well.
Jim: I'm assuming you mean the initrd image and not the kernel, or is that all wrapped up into one in android? the initrd is an odd place for the system's watchdog config. I suppose putting it in the kernel image prevents disabling it because presumably we don't have the key to sign the new image...
that's a new version of busybox, but I'm more interested in one with all of the options compiled in. What I have is pretty bare-bones... Does his busybox have grep at least? what do you do for a decent shell?
razholio said:
Jim: I'm assuming you mean the initrd image and not the kernel, or is that all wrapped up into one in android? the initrd is an odd place for the system's watchdog config. I suppose putting it in the kernel image prevents disabling it because presumably we don't have the key to sign the new image...
that's a new version of busybox, but I'm more interested in one with all of the options compiled in. What I have is pretty bare-bones... Does his busybox have grep at least? what do you do for a decent shell?
Click to expand...
Click to collapse
Yes in the initrd image the kernel is packed in there, as well as the init.rc file on Android, as well the filesystem subset, etc.
The init.rc file in / on the phone is NOT the one the kernel itself executes, take a look at that link I posted, Here is the excerpt we are interested in, I am pretty sure that the sys.DeviceHealth is in the exact same place:
I want to get a bit more control of what things are starting up when. To do this I need to modify the init.rc file. To do this I first extracted the the ramdisk to the fileystem so that I can modify it (gnucpio -iz -F ramdisk.img).
After this I simply commented out the line from init.rc. Then we can recreate it: (gnucpio -i -t -F ../ramdisk.img | gnucpio -o -H newc -O ../rootfs.img).
Click to expand...
Click to collapse
Yes both the stericson and JRummy16 busybox have most every command in the busybox you really need, oh and they create links in /system/bin for you, so that you can run commands without needing to always type busybox in front of the command.
As far as shells, I am a bourne or korn guy, so I just use the default /system/bin/sh, since I am closely intimate with bourne, being the UNIX Engineer that I am, and handling anything at the lowest level of the OS still requires bourne. But I love to program in korn (ksh), but I have not found any android shells that are useable beyond the basics, since we really are not going to spend much time there, it does not matter much. I would get aquainted the bourne, that android uses, since android seems be using the old school UNIX style bourne, more and more, yes there is some bourne again in there too.
P.S. pipe is in the /system/bin/sh, just make sure you source the /osh/apath.sh file, to get the /system/bin and /system/xbin in the shell...
The hackers keyboard has things like the arrow keys so that you can command recall, and other helpful things.
If you really need to run something, from the shell, just make sure put sh in front of it, or it won't run in a shell, one of the oddities about Android.
I have tested the method I mentioned before, and uncompressing the ramdisk that holds the kernel, and removing the sys.DeviceHealth from the init,rc, and it does work, after packaging it back up with CPIO. I tested this on an older phone that does not have a locked bootloader.
I am afraid to test it on the Atrix 2 since we still do not have a true way to get back after a soft brick at that low level.
Given the fact that this was another style of phone, and an unlocked bootloader, and the fact that the process name is a little different, I am still confident we can do something similar for our phone.
If you follow the directions on my post, you'll find it much easier to disable the Carrier IQ.
http://forum.xda-developers.com/show...6#post20281786
mrpoet said:
If you follow the directions on my post, you'll find it much easier to disable the Carrier IQ.
http://forum.xda-developers.com/show...6#post20281786
Click to expand...
Click to collapse
^^^^^^^^^^^Page not found^^^^^^^^^^^
kirkgbr said:
^^^^^^^^^^^Page not found^^^^^^^^^^^
Click to expand...
Click to collapse
Try this Link. I am not sure if it will do the job for us or not, because we don't have the same Apps installed as the Epic 4g that this original post was copied from.
Here is the thread, mrpoet created and pointed to:
http://forum.xda-developers.com/showthread.php?t=1390874
Here is the original one, that he does link to in his references:
http://forum.xda-developers.com/showthread.php?t=1373394
I am going to see if it works.
----Edit---
I just gave this a try and all the commands ran successfully, but sys.DeviceHealth is still running after following the above post.
JRW 28 said:
A lil info on what AT&T says and how it uses Carrier IQ and some of the devices it is on can be read here http://m.androidcentral.com/atts-us...its-own-analytics-app-not-just-embedded-phone
Click to expand...
Click to collapse
Just to let everyone know, the information contained in the link that JRW 28 posted, is an accurate statement from AT&T.
I have inside information that, that is BS. There are 100's of Terrabytes of Disk Storage just for this purpose.
They're a pack of bastards.

Categories

Resources