We need a TaskMananger and New Audio Player - G1 Android Development

1. I was playing with my G1 and realize that some of the aplication don't have a close option and stay loaded in the background with no way to close it unless you reboot your phone.
2. The G1 player is good but not as good as can be for the type of phone we have. I bought a HTC 3 in 1 adapter and a vent mount for my car, so I can listen to mp3 in the car. But the screen keep turning off after 1 minute and then you have to push menu 2 times to see the player again (thats in case you don't have the cell locked). It will be nice to have a player with an option to keep the screen on all the time if the device is conected to a external power source, in this way will be less distraction when driving (My point is that we need a more car friendly Music Player. Another thing the player does not have is a search function through the playlist that you can type the song with the keyboard.
I will be happy to donate or pay for aplications like this that do what they are supouse to do

2. settings - applications - development - stay awake (screen will never sleep when charging)

heh but we still need a "task manager" of sorts. sure you can goto terminal do ps get process id then kill it. BUT i work @ a very dirty job and try not to use my kb. also it would be cool to have the program tell you detailed info like if its transmitting or recieving. there are a few first gens in the market like pservices and sys monitor but u cant do andthing besides look

Perrosky said:
1. I was playing with my G1 and realize that some of the aplication don't have a close option and stay loaded in the background with no way to close it unless you reboot your phone.
Click to expand...
Click to collapse
There is no task manager and that is intentional. The life cycle of an android application is supposed to be managed by the OS, not by the user. The OS will kill the application process whenever it needs resources used by the sleeping application (it will ask the application, what data it needs to save, so it can be restored to exactly the same state it was left in). At most, you can choose how many processes the OS should try to keep (1-4).

daveid said:
2. settings - applications - development - stay awake (screen will never sleep when charging)
Click to expand...
Click to collapse
Thanks for the tip it will same me alot of distraction while driving and using the G1 as mp3 player. But the player still can be better and have better features I think.

Ideally there would be no need for task manager, yes.
But... In real world use especially with many apps being poorly developed and buggy, I agree task manager is disparately needed.

lu_tze said:
There is no task manager and that is intentional. The life cycle of an android application is supposed to be managed by the OS, not by the user. The OS will kill the application process whenever it needs resources used by the sleeping application (it will ask the application, what data it needs to save, so it can be restored to exactly the same state it was left in). At most, you can choose how many processes the OS should try to keep (1-4).
Click to expand...
Click to collapse
I didn't now that, but still we should be able to kill aplication when we want to, you know as we wish.

makes me wonder why the people writing the apps don't put in an exit button more often. Of everything I have downloaded I think ONE has an exit button. Sure would be nice! Android can manage the stuff if it feels it needs to, but there is no reason PacMan or the Fart Machine need to stay running

lu_tze said:
There is no task manager and that is intentional. The life cycle of an android application is supposed to be managed by the OS, not by the user. The OS will kill the application process whenever it needs resources used by the sleeping application (it will ask the application, what data it needs to save, so it can be restored to exactly the same state it was left in). At most, you can choose how many processes the OS should try to keep (1-4).
Click to expand...
Click to collapse
yes but some process' dont close take myspace or pacman etc. they are huge memory hogs. Android might close applications when it feels like resources are at the limit but should anybody have to deal with the delays and lags... of programs that dont close that you want to. ????. Take this senerio into account since most of us has used a WM phone do you want your phone to be locking up at 100% cpu usage and have Huge Delays when Home screening takes 5 seconds to rebuild the desktop or more? NO nobody does.... weather android was not built with a task manager or not it can and does and will kill processes but how hard is it to add those options to a small little app if someone is willing to take the time to do so If it is not for you when it is made by all means you dont need to use it. this could also lead to a sort of tcp/udp stream tracker and blocker for those whom pay by MB as i have seen in another forum the guy had $132 dollar Data bill only visiting Europe.
i didnt read this then the "task manager" maybe could force it to sleep. Save info and force it to unload Services and Resources.

daveid said:
2. settings - applications - development - stay awake (screen will never sleep when charging)
Click to expand...
Click to collapse
Download powermanager instead...

Locale works as well, but I have to admit, Power Manager works best out of the box though I would admit

Meeker said:
Locale works as well, but I have to admit, Power Manager works best out of the box though I would admit
Click to expand...
Click to collapse
And tunewiki is pretty good to, make sure you turn the lyrics option off, this will kill your battery life..

what people don't seem to understand is you will often be slowing down your user experience if you manually quit applications. The way the OS is designed, it freezes idle applications and keeps them around as memory (dropping them as soon as it needs the memory for something else), so the next time you launch the app, chances are if its a commonly used app it will still be around. this is now your laptop, having users manually manage tasks will in most cases degrade their overall experience.

You guys are thinking in terms of Windows. That won't work with the AndroidOS.

OK lest just assume that since this is Android OS all the applications are going to behave in a perfect and consistent manner.
I do understand how the memory management was designed and its a nice idea nevertheless. The issue is with code that doesn't play nice and lets be honest the market is full of half done apps and there will be more as time passes.
We need a way to force quit apps in those specific cases that apps misbehave and the system is not aware of it.

Theoretically we do have a task mgr
Code:
$ su
# ps
USER PID PPID VSIZE RSS WCHAN PC NAME
root 1 0 268 132 c00a5d64 0000c6cc S /init
root 2 0 0 0 c005c0e0 00000000 S kthreadd
root 3 2 0 0 c004c528 00000000 S ksoftirqd/0
root 4 2 0 0 c006ec48 00000000 S watchdog/0
root 5 2 0 0 c0058ef8 00000000 S events/0
root 6 2 0 0 c0058ef8 00000000 S khelper
root 7 2 0 0 c0058ef8 00000000 S suspend/0
root 8 2 0 0 c0058ef8 00000000 S kblockd/0
root 9 2 0 0 c0058ef8 00000000 S kmmcd
root 10 2 0 0 c0058ef8 00000000 S btaddconn
root 11 2 0 0 c0058ef8 00000000 S btdelconn
root 12 2 0 0 c0058ef8 00000000 S qmi
root 13 2 0 0 c003265c 00000000 D rpcrouter
root 14 2 0 0 c0058ef8 00000000 S detection/0
root 15 2 0 0 c0032fd4 00000000 S krpcserversd
root 16 2 0 0 c007ab6c 00000000 S pdflush
root 17 2 0 0 c007ab6c 00000000 S pdflush
root 18 2 0 0 c007ea90 00000000 S kswapd0
root 19 2 0 0 c0058ef8 00000000 S aio/0
root 20 2 0 0 c0032fd4 00000000 S kadspd
root 21 2 0 0 c0058ef8 00000000 S panel_on/0
root 22 2 0 0 c0161aac 00000000 S mtdblockd
root 23 2 0 0 c0167840 00000000 S USB mass_storag
root 24 2 0 0 c0058ef8 00000000 S synaptics_wq
root 25 2 0 0 c02105bc 00000000 S krfcommd
root 26 2 0 0 c0153b40 00000000 S loop0
root 27 2 0 0 c0153b40 00000000 S loop1
system 28 1 796 152 c011b828 afe0b74c S /system/bin/servicemanager
root 29 1 1828 224 ffffffff afe0b50c S /system/bin/mountd
root 30 1 652 140 c01996a8 afe0c0bc S /system/bin/debuggerd
radio 31 1 7720 620 ffffffff afe0bdbc S /system/bin/rild
root 32 1 66044 10576 c00a6380 afe0b874 S zygote
media 33 1 19280 2116 ffffffff afe0b74c S /system/bin/mediaserver
bluetooth 35 1 1164 184 c00a5d64 afe0c69c S /system/bin/dbus-daemon
root 36 1 788 172 c01fd7e4 afe0b50c S /system/bin/installd
compass 38 1 1304 420 c0178a50 afe0b74c S /system/bin/akmd
root 39 1 3324 140 ffffffff 0000e664 S /sbin/adbd
root 44 2 0 0 c0184b98 00000000 S mmcqd
system 54 32 231096 20536 ffffffff afe0b74c S system_server
radio 86 32 117456 15720 ffffffff afe0c824 S com.android.phone
app_14 90 32 118904 17412 ffffffff afe0c824 S android.process.acore
app_0 126 32 103276 14900 ffffffff afe0c824 S com.google.process.gapps
app_17 153 32 93580 14312 ffffffff afe0c824 S android.process.media
root 185 2 0 0 c0032de8 00000000 D audmgr_rpc
app_17 607 32 100672 12980 ffffffff afe0c824 S com.android.camera
app_26 630 32 136776 22628 ffffffff afe0c824 S com.android.browser
app_21 707 32 107036 16584 ffffffff afe0c824 S com.google.android.gm
app_39 912 32 98388 12420 ffffffff afe0c824 S net.sunflat.android.papijump
app_43 963 32 87732 10608 ffffffff afe0c824 S com.ap.SnapPhoto:remote
app_1 991 32 96144 13556 ffffffff ad0126f0 R com.android.term
app_1 997 991 724 320 c0049e28 afe0c4cc S /system/bin/sh
app_1 999 997 868 328 00000000 afe0b50c R ps
# kill 630 607 707 963
Not pretty but it works.

Can you kill processes if not a super user ?
I can whip up an UI for kill if so.

OrdeS said:
Can you kill processes if not a super user ?
I can whip up an UI for kill if so.
Click to expand...
Click to collapse
Nope u can't.....

OrdeS said:
Can you kill processes if not a super user ?
I can whip up an UI for kill if so.
Click to expand...
Click to collapse
No, but theoretically shouldn't it be possible for a kill app to just run the command as root?

OrdeS said:
Can you kill processes if not a super user ?
I can whip up an UI for kill if so.
Click to expand...
Click to collapse
yes u can kill by id

Related

[dev][sqlite3] 21/Jan, how to disable sync in sqlite3 without pragma

WARN:The following steps only for developers. The following changes may cause instability or even cause the phone can not be used.
Android phones as the underlying database using sqlite3. sqlite3 writes efficiency is very low, because the sync feature turned on by default, and fsync() must be performed after each insertion, the resulting system efficiency is low, and the disk life is reduced.
I try to disable sync feature by default in exchange for greater IO performance and reduce disk consumption. While doing so may result in data integrity problems, but I still like to use it because most of the sqlite insert action can be completed within a few seconds, not too much to consider issues such as sudden power-down.
After modified, the time of insert 2000 records to sqlite3 db, from 1m11s reduce to 2s.
Attachment is my sqlite3 patch, it is for CM or AOSP.
For SenseROM, I can not simply replace libsqlite.so from AOSP, so I do hexedit with it.Do follow modify for SenseROM libsqlite.so:
replace
c6 f7 66 fd 03 20 78 72
with
c6 f7 66 fd 01 20 78 72
replace
cc f8 0c 00 03 20 a3 68
with
cc f8 0c 00 01 20 a3 68
replace
5f fa 81 fc 83 f0 01 06
with
5f fa 81 fc 01 23 00 26
EDIT(2011/01/07 23:40):
replace
5f fa 81 fc 83 f0 01 06
with
5f fa 81 fc 01 26 00 bf
replace
23 72 00 23 66 72 02 26
with
26 72 00 23 63 72 02 26
EDIT(2011/01/10 16:45):
HD WWE RUU 1.72.405.3 patched libsqlite.so:http://www.multiupload.com/N9FLJYAC77, not test!
EDIT(2011/01/10 22:24):
HD WWE RUU 1.72.405.3 patched version v2 as attachement
patch file upgrade to V2
EDIT(2011/01/21 10:59):
add auto repaire script for mms/sms db corrupt. If you met data loss with my sqlitemod, then place this script to /system/etc/init.d/, and chmod 755 to it.
this script will be check your mms/sms db at boot time, and auto fix it if found table loss.:View attachment 03repairesmsdb.txt
Patched libsqlite.so for SenseROM.
I got libsqlite.so from Pays 1.1+Z HD rom.
Sounds intressting. I like the idea of modding sqlite more than loop.
Loopfile is double flush (flush loop + flush file) and direct loop mount causes random reboots.
Ill test it it when i have time.
EDIT: you don't mind if i'll use it for my rom (as optional addon)
EDIT2: By the way, ... did you try 1.72 base of HD rom. Its really fast and sqlite3 is also newer version?
but won't cause this (micro)-lags like any other kind of disk-buffering?
The 2000 insert statements will go in 2s because they are still in RAM.
After a while of doing nothing and / or suddenly needing more RAM, the changes will (finally) be written to disk, causing the system to be unresponsive for the duration of the write.
If I receive or send a new sms / text for example, there are a few records inserted. With sync on, it might take a fraction longer, but the changes are there and the user 'understands' it. There is some activity.
Without sync-ing, all those little changes add up until suddenly they need to be really written and the system lags for a full second or so because it needs to write them all at once.
And what are the moments when there are a lot of database writes during normal use anyway?
Another example: I'm restoring my sms messages with SMS Backup & Restore. I've got a lot of messages, so it takes a while. This is normal. Now, with syncing (default) it takes a while, but when the app says it's done... it's really done. Switching back to your homescreen and launching another app will go smoothly.
With syncing off, the restore operation will complete sooner, but the moment you start another app (or even go back to your homescreen) more RAM is needed and the changes will be written to disk, causing a simple tap to launch an app to feel laggy or sluggish because the latest changes from the restore operation are written to disk (which the user understands to be done already).
Buffering like this helps a lot if something needs to be written while concurrently something else is constantly reading. The write-changes are kept in memory so the disk I/O is completely free for the reading operations. When they are done, the write-changes can actually be commited to disk, and won't interfere with the read operations. On a multi-tasking desktop computer, this is normal.
But when will something like that be needed / happening on a smartphone?
Thinking about the user experience, when a special process is running (restoring backups, installing an app, etc..) the user expects / understands that it takes a moment. The user surely does not want that operation to complete quickly, only to have a lagging keyboard 5 secs afterwards, right?
Thinking about 2000+ inserts is nice, but I really don't see when a situation like that occurs on an Android phone, and I much rather have operations be really done than interfering later on.
I think you are wrong.
With Android applications, the database operation is non-persistent, normal step in app is:
1.open db
2.do read/write
3.close db
with step3, the data in cache will be flush to disk. so user will not notice any sudden lag, always smooth.
With SYNC-ON, the db operation like this:
1.open db
2.1. write a record/do a transcation
2.2. fsync()
2.3. write a record/do a transcation
2.4. fsync()
.....
3.close db/fsync()
with SYNC-OFF, operation like this:
1.open db
2.1 write a record/do a transcation
2.2 write a record/do a transcation
....
3. close db/fsync()
So, no-sync can significantly save IO time.
dipje said:
but won't cause this (micro)-lags like any other kind of disk-buffering?
The 2000 insert statements will go in 2s because they are still in RAM.
After a while of doing nothing and / or suddenly needing more RAM, the changes will (finally) be written to disk, causing the system to be unresponsive for the duration of the write.
If I receive or send a new sms / text for example, there are a few records inserted. With sync on, it might take a fraction longer, but the changes are there and the user 'understands' it. There is some activity.
Without sync-ing, all those little changes add up until suddenly they need to be really written and the system lags for a full second or so because it needs to write them all at once.
And what are the moments when there are a lot of database writes during normal use anyway?
Another example: I'm restoring my sms messages with SMS Backup & Restore. I've got a lot of messages, so it takes a while. This is normal. Now, with syncing (default) it takes a while, but when the app says it's done... it's really done. Switching back to your homescreen and launching another app will go smoothly.
With syncing off, the restore operation will complete sooner, but the moment you start another app (or even go back to your homescreen) more RAM is needed and the changes will be written to disk, causing a simple tap to launch an app to feel laggy or sluggish because the latest changes from the restore operation are written to disk (which the user understands to be done already).
Buffering like this helps a lot if something needs to be written while concurrently something else is constantly reading. The write-changes are kept in memory so the disk I/O is completely free for the reading operations. When they are done, the write-changes can actually be commited to disk, and won't interfere with the read operations. On a multi-tasking desktop computer, this is normal.
But when will something like that be needed / happening on a smartphone?
Thinking about the user experience, when a special process is running (restoring backups, installing an app, etc..) the user expects / understands that it takes a moment. The user surely does not want that operation to complete quickly, only to have a lagging keyboard 5 secs afterwards, right?
Thinking about 2000+ inserts is nice, but I really don't see when a situation like that occurs on an Android phone, and I much rather have operations be really done than interfering later on.
Click to expand...
Click to collapse
melethron said:
Sounds intressting. I like the idea of modding sqlite more than loop.
Loopfile is double flush (flush loop + flush file) and direct loop mount causes random reboots.
Ill test it it when i have time.
EDIT: you don't mind if i'll use it for my rom (as optional addon)
EDIT2: By the way, ... did you try 1.72 base of HD rom. Its really fast and sqlite3 is also newer version?
Click to expand...
Click to collapse
my sqlite3 mod is against loop.
The main purpose of loopfile/loopdevice is speedup fsync() in sqlite3, But the normal file operations have been affected. So I directly modify sqlite3. The benefit is MTD db access can be speedup, too.
Anyone can use my MOD.
I use 1.32.832.6(HK RUU), because I don't like WWERUU include too many language, this will lead apk too large.
Offical new version sqlite3 must be disabled nosync for stability.
ownhere said:
my sqlite3 mod is against loop.
The main purpose of loopfile/loopdevice is speedup fsync() in sqlite3, But the normal file operations have been affected. So I directly modify sqlite3. The benefit is MTD db access can be speedup, too.
Anyone can use my MOD.
I use 1.32.832.6(HK RUU), because I don't like WWERUU include too many language, this will lead apk too large.
Offical new version sqlite3 must be disabled nosync for stability.
Click to expand...
Click to collapse
I dont have a problem with large apks. I deodexed my rom and complete system will fit in mtd4+5 then. Apart from that: the 1.72 base is REALLY MUCH faster. As soon as HK RUU 1.72 is available i recommend you use that one. You'll love it.
About the fsync if db is closed. When will it be closed then? After the app is closed?
melethron said:
I dont have a problem with large apks. I deodexed my rom and complete system will fit in mtd4+5 then.
About the fsync if db is closed. When will it be closed then? After the app is closed?
Click to expand...
Click to collapse
Most apps close db after db operation. I try reboot 10+ times in 30 mins, no FC or data loss.
Ok. Still a bit risky but its really good to have this optional. Great work .
Sent from my HTC Desire using XDA App
great work!
patch for miui, flash from recovery.
the binary is slightly different,so I made this patch.
_bryan_ said:
great work!
patch for miui, flash from recovery.
the binary is slightly different,so I made this patch.
you can also extract libsqlite.so from the zip and replace it with rootexplorer.
Click to expand...
Click to collapse
Not sure if replacing it "on the fly" is a good idea. Might cause issues if sqlite is runnin while it is replaced.
melethron said:
Not sure if replacing it "on the fly" is a good idea. Might cause issues if sqlite is runnin while it is replaced.
Click to expand...
Click to collapse
yes,you are right.
so we need to put it in rom before flashing, right??
i will try on oxygen 1.4 and will post benchmark
madman_cro said:
so we need to put it in rom before flashing, right??
i will try on oxygen 1.4 and will post benchmark
Click to expand...
Click to collapse
tried it. dont see any lags, and to be honest dont see any improvments. will test some more
madman_cro said:
tried it. dont see any lags, and to be honest dont see any improvments. will test some more
Click to expand...
Click to collapse
Do you even use data2sd. In most cases there aren't lags if /data/data is on nand but there is if it is on sd-ext.
melethron said:
Do you even use data2sd. In most cases there aren't lags if /data/data is on nand but there is if it is on sd-ext.
Click to expand...
Click to collapse
no i dont use it . i only use a2sd
madman_cro said:
no i dont use it . i only use a2sd
Click to expand...
Click to collapse
Don't think you'll notice the difference then.
madman_cro said:
so we need to put it in rom before flashing, right??
i will try on oxygen 1.4 and will post benchmark
Click to expand...
Click to collapse
I'd say you can inject it in recovery mode. No need for flashing
Answer to this here (the discussion there went off topic).
Loop is not intended to mount a "real" filesystem. It is made to mount stuff like *.iso or *.img. Loop is only a "workaround" to skip fsync. Loop is simply abused to achieve a fsync skip. Skipping it directly in sqlite has following improvements over loop:
1. Less RAM: needed because there is no "loop" cache needed then.
2. Less I/O: Only one flush because there is no need to "double flush"
3. Less cputime/battery: Also because no double flush.
4. Less time to set it up: No setup needed for a loopfile.
5. More safety: Faster flush and the partition can be journaled without speed decrease (ext3/4 instead of fat)
About 5: You may still loose data on a powerloss because it is not yet synced but you wont have corrupted data because half written data will be fixed on a ordered journal.
ownhere said:
replace
c6 f7 66 fd 03 20 78 72
with
c6 f7 66 fd 01 20 78 72
replace
cc f8 0c 00 03 20 a3 68
with
cc f8 0c 00 01 20 a3 68
replace
5f fa 81 fc 83 f0 01 06
with
5f fa 81 fc 01 23 00 26
EDIT(2011/01/07 23:40):
replace
5f fa 81 fc 83 f0 01 06
with
5f fa 81 fc 01 26 00 bf
replace
23 72 00 23 66 72 02 26
with
26 72 00 23 63 72 02 26
Click to expand...
Click to collapse
are these values the same in sqlite hd 1.72....
i can not find them...after c6 f7 66 it say can not find...if i open it in a hex editor
edit: or anyone can give me a patched version for 1.72..?
thx for answers...with kind regards...Alex

[Q] Trying to modify thermald.conf

Hello!
I want to modify my thermal conf using Root Explorer, so it goes from this
sampling 1000
[tsens_tz_sensor0]
sampling 3000
thresholds 55 65 75 85
thresholds_clr 52 60 70 80
actions cpu cpu cpu cpu
action_info 1134000 972000 648000 384000
to this
sampling 1000
[tsens_tz_sensor0]
sampling 5000
thresholds 85 90 92 95
thresholds_clr 81 86 88 91
actions cpu cpu cpu cpu
action_info 1728000 1350000 648000 348000
I mount the system folder for R/W, and edit the file. I save it, but when I go back and check if the file has been saved, the values are still not saved. Can anyone help me? Thank you!
This is because this file is being written by another script, probably controlled by the kernel. You need to find the script that writes this conf file on boot and edit that. New to this phone so don't know where you would find it.
sent from my Sensation XE
Asa2303 said:
This is because this file is being written by another script, probably controlled by the kernel. You need to find the script that writes this conf file on boot and edit that. New to this phone so don't know where you would find it.
sent from my Sensation XE
Click to expand...
Click to collapse
Hmm. I looked everywhere, and cannot find such scrit.
EDIT: NVM, I solved it.
would you mind to tell me how you solved it?
thanks in advanced.

[MOD] [18] Multi-Browser2RAM (MB2R) Startup Script - Final Release - 053113

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Note: In the above images I have modified my Chrome cache to 100MB which differs from the attached script. Edit as you wish. I also noticed that I spelled acknowledgments wrong! I'll change it later. Don't be confused by the times. They were from 2 different script runs.
[Edit] Screenshots above are from the first release.
***********************************************************************************************
I have been working on this startup script for awhile now and finally got it polished and ready for release. This script is more versatile and replaces Browser2RAM. Do not run them both at the same time. This script **requires root** and to be **run as root**. If you run it from the terminal make sure to "su" first.
This script works on JB 4.1 (at boot or after boot=terminal or a script manager) and 4.2 (at boot only). It works with 4 browsers: Stock, Naked, Chrome, and Firefox remapping each of their cache folders to a dynamic (as required) 50MB allocation in RAM which should suit most users. For demanding performance you can change the allocation from 50 to 100MB to run up to 20 simultaneous browser tabs for each browser.
Note: Since the RAM cache mapping is dynamic, it does not steal from your RAM unless needed by your browser so there is no downside to running a larger cache. Data is persistent so bookmarks and cookies are not lost if you crash or reboot. GPlay app Script Manager (Devwom) can be used to run this script at boot *as root* or advanced users can use an init.d script method.
Download attached. Upload the file and remove the .txt extension. Optionally remove the .sh extension as well.
******************************************************************************************
Open the script up in Script Manger and click two icons upper left area (su, boot). Also check the radio button "is script" NOT "is executable". You'll see the two set icons next to the script name in the Script Manager file list (if you back out or open it up again) but for some reason you have to run the script in SM once for the settings to stick. That's it. Reboot and all the mountpoints are automagically created. Works with root on stock ROM.
And, for those who don't want to run it at boot automatically, and prefer not using the terminal, you can also use Script Manager to open it up and run it after boot as well. Just click the RUN button and make sure to check the su button first.
If you're having trouble finding Script Manager it's because it has been reported incompatible with some devices. If you can't get it from GPlay, Script Manager is attached but may have some video incompatibilities with some devices.
Linkback to dev thd:
http://forum.xda-developers.com/showthread.php?t=2227123&page=1
[Edit]
Updated script to add 4 more browsers (now 8 in total): Opera Mobile, Dolphin, Boat, and Boat Mini. New one is autostart3.sh.txt
[Edit]
Final release, Rev 4. Removed 2 previous versions. Enhanced error silencing. Updated script to add 6 more browsers (now 14 in total): Added - Dolphin Mini, Opera Mini, Baudi, Adrenaline, Maxthon, and One. If you want more browsers then edit the script. [Edit] Looks like I'll be adding a few more browsers to this per request. Keep your eyes out for REV5 [End Edit]. Added umount_all.sh script to unmount all the mounts created in autostart4.sh (just in case you need it). Chrome (my preferred browser) cache is 100MB, the rest are 50 by default.
There's also been a recent additional method added to load this script at boot and run it as root that does NOT require Script Manager OR init.d support. Confirmed working on stock 10.4.4.25 (JB 4.1.1). Should work on stock 10.6.1.14.4 (JB 4.2.1) too. See PG 12.
[Edit]
Final release 5, 053113, autostart_fn.sh.txt
Rewrote entire script. Now works as a function using variables to load a user-defined list of browser apks (See LIST=" " variable in main code block). Umount_all.sh.txt also updated to umount all the mounts created by the DEFAULT LIST in autostart_fn.sh.txt script. Added @Tylorw1 to the credit list (even though he forgot to add an "m" after "50" for his 3 additions.)
*********************************************************************************************************
NOTICE: @sbdags has already incorporated this entire script into the latest CROMIX.
Do NOT run this script if you are on CROMIX or it may create duplicate mountpoints!
The umount_all script should NOT be loaded in SManager to run at boot! This is a utility script mainly for devs to run from the terminal or a script manager just in case they need to undo what the autostart script does, namely unmount all the browser cache mounts created (for troubleshooting purposes) so they don't have to mess with their setup and/or reboot, especially true if using SManager or an init.d method to load the script at boot.
INIT.D SCRIPTS: If using this as an init.d script, it is IMPERATIVE that your script name have no dots "." and no file extension. In this case, rename the script to autostart_fn or 20autostart_fn if you have multiple init.d scripts.
**New, Recommended Alternate Load Method (hack) to enable init.d support for stock ROMs with Busybox**
(Replaces depreciated method of directly hijacking install-recovery.sh with this script but only works if you have Busybox installed. Stick with depreciated method if you don't have Busybox and can't get SM to work)
http://forum.xda-developers.com/showthread.php?p=42296292#post42296292
*********************************************************************************************************
I love what your script did to the stock browser in CromiX. Will this be a part of a future update in sbdag's rom?
Great work! Thank you!
Sent from my ASUS Transformer Pad TF700T using Tapatalk HD
berndblb said:
I love what your script did to the stock browser in CromiX. Will this be a part of a future update in sbdag's rom?
Great work! Thank you!
Sent from my ASUS Transformer Pad TF700T using Tapatalk HD
Click to expand...
Click to collapse
Thanks for the nice reply.
@sbdags? Feel free but make sure to look inside the script for licensing requirements.
Thanks mate. I have modified yours further to add opera mobile as well.
BTW what does the 2>&- do on the end of the rm command?
eg
rm -rf /data/data/com.android.browser/cache/* 2>&-
BTW here are the lines for opera:
Code:
if [ -d /data/data/com.opera.browser ];
then
umount /data/data/com.opera.browser/cache;
rm -rf /data/data/com.opera.browser/cache/*;
mount -t tmpfs -o size=50m opera_cache /data/data/com.opera.browser/cache;
fi;
sbdags said:
Thanks mate. I have modified yours further to add opera mobile as well.
BTW what does the 2>&- do on the end of the rm command?
eg
rm -rf /data/data/com.android.browser/cache/* 2>&-
BTW here are the lines for opera:
Code:
if [ -d /data/data/com.opera.browser ];
then
umount /data/data/com.opera.browser/cache;
rm -rf /data/data/com.opera.browser/cache/*;
mount -t tmpfs -o size=50m opera_cache /data/data/com.opera.browser/cache;
fi;
Click to expand...
Click to collapse
Good deal. Thanks for the opera. Might as well add the mini too. We could add all the browsers we want - their format is identical except for mutant randomly generated Firefox. I'll update it when I get a chance. I'm pretty burnt on this right now. I sure picked a whopper for my first script and now I'm running with the devs! Anyone can be a programmer if they just know how to Google.
http://www.cyberciti.biz/faq/how-to-redirect-output-and-errors-to-devnull/
***********************************************************
Regarding adding "2>&-" at the end of a command:
0 is stdin
1 is stdout
2 is stderr
The integer file descriptors associated with the streams stdin, stdout, and stderr are 0, 1, and 2, respectively.
What that does is tell the command to not open (log) stderr when it runs. Its a trick to get a command to run even with errors if passible and silence its error output to the terminal. I tried "2>/dev/null" and "&>/dev/null" both of which failed with "Text file busy". Not sure why? Its the only way I could figure out how to prevent the "errors" "rm failed for -rf..." when there are no files to remove from echoing to the terminal.
Ah OK, I won't need the extra stderr stufff or an init.d script. I've added your copyright stuff (although I'm not convinced it is actually copy righted but I understand what it means). Thanks for putting this together! :good:
sbdags said:
Ah OK, I won't need the extra stderr stufff or an init.d script. I've added your copyright stuff (although I'm not convinced it is actually copy righted but I understand what it means). Thanks for putting this together! :good:
Click to expand...
Click to collapse
You are very welcome and glad I could finally give back. You guys have sure helped me out a ton on this site. The dumbest question I can ask here on XDA is the one I didn't. Nobody here has ever condescended or made me feel like the nOOb I am and I really appreciate that (@_that, @becomingx, @jtrosky). It allowed me to lower my stupid shield and really motivates me to learn more and more about Android because you guys are all so positive and helpful its addicting (and fun). Also, let this prove that the knowledge you share with us newbe's can go full circle and (eventually) benefit you in some form as well although we will never be capable of giving back even a fraction of what we learn from XDA.
If run at boot or from a ROM then the stderr thing is trivial. But if a newbe runs it from the terminal they would probably be confused by the "errors" so I masked them out. The script runs and mounts regardless.
Hey, regarding copyrights it looks like its gotta be that way; legal mumbo jumbo. I found a copyright license file instructing me to do so. I just cut and pasted it into my script. Trust me it wasn't my idea nor would I have added that on my own as it goes against the spirit of XDA sharing. I'm in no way looking to profit from it, but I'm also not giving them (copyright holders) all the credit because I put the work into expanding the script and I came up with the idea for the Firefox random fix (graciously coded by @becomingx) so I just fell in suit and jumped on the copyright bandwagon. I'm just following instructions from the *license* file here (valid or not):
https://github.com/steveniemitz/Browser2Ram
[Edit] I just informed Steve that I forked his fork and followed his copyright requests.
http://forum.xda-developers.com/showthread.php?p=41392000#post41392000
I wouldn't want Julian or Steve coming down on me or a fork off me and accuse us of stealing their work for sharing a script. Not that it would come to that, but you know, CYA. I did my part as they asked. You can do as you please. I can't control what others do with it, but I feel I should make them aware of apparent copyrights in license files.
I'll add your credit to the next release for the opera code. [Edit] Also @jtrosky for being a good guy and sharing the "about:debug" trick [End Edit]. If you have the code for any other browsers you'd like to or think would be beneficial to add, I'll add those too. :good:
Here's one to umount them all if you need it for any reason. I've doubled up sometimes on mounts so I need this to clear it all out. I added a umount for opera too.
[Edit]
Had to get Opera Mobile to make sure it worked with the mount and it did. I was having some connectivity issues but that said I tried to use Opera to come here and post back and IT CRASHED right as I was attempting to edit a post. This is with a new mount in RAM for Opera running. All the text box controls were garbled like no icons just txt. I tried both user agents. I made some changes in settings like I put it in turbo mode. I've seen this before in Chrome with bad connectivity but never to that extent. I'll give it another test drive but to be honest with you @sbdags that's the worst browser I've tried since UC. And I used to use both Opera and Opera Mini on my phone and never had a problem.
[Edit]
Posting this using Opera Mobile. Seems to be much better behaved today but it is still a bit glitchy whenever I enter a text box. The zoom is awesome thought, you can really see the forum more like a desktop app complete with sidebar menus and the whole nine yards. I am going to have to increase my text size but seems pretty stable. Oh no text size control? I guess its dynamic with the zoom. Not sure what was going on with my previous connectivity but Opera didn't like it at all. [Edit] But it crashed again editing this post. Opera and I are not getting along. I'm sticking with Chrome. [Edit] Unloaded the mount for Opera and posting back. Lets see if the b%$ch crashed again. So good so far. Hitting save now... Worked that time. And again...
My OOM settings
OOM: Out of Memory
I had a previous discussion with @_that about this and he disagreed with me when I said that for better performance you would increase never decrease the memory value for each catagory from the stock settings, but I'm going to step up and say that after testing this with different settings the performance proves itself and I disagree (for the first time) with him on this. I will also say that this observation matches the pattern in System Tuner in OOM looking at the presets ranging from "very light" to "very aggressive" and agrees with some other posts about optimizing the browser for the TF7. My settings below for the last two categories (Content Providers, Empty Applications) are very close to ST's "very aggressive" presets.
I'm running the following MB (not KB) sizes for OOM:
32,40,48,82,195,246
*************************************************
Ref: ST "very aggressive" preset for OOM
16,32,64,128,192,256
[Edit-Correction/Clarification*] Note the fifth setting for Content Providers is the category where the *background* browser process *service* resides *when the app is not in the forground* and is affected so increasing this to around 192 has proven better performance (in my opinion on this device).
Ref: http://www.transformerforums.com/fo...6579-tweaking-tf700-performance-browsing.html
elfaure said:
Note the fifth setting for Content Providers is the category where the browser process resides and is affected
Click to expand...
Click to collapse
No. While browing, the browser is in category "Foreground Applications". But you can't ever see this in System Tuner, because when you try, ST itself is the foreground application. Increasing the OOM value for content providers means that the browser (or any other processes in that category) is *more* likely to be killed when another app in foreground needs memory.
You can see it yourself via adb shell. Start the browser, and in parallel an adb shell from you computer:
Code:
[email protected]:/ # ps | grep browser
u0_a8 4820 135 538416 66980 ffffffff 4017eee4 S com.android.browser
[email protected]:/ # cat /proc/4820/oom_adj
0
Now switch back to the launcher and see again:
Code:
[email protected]:/ # cat /proc/4820/oom_adj
7
elfaure said:
so increasing this to around 192 has proven better performance (in my opinion on this device).
Click to expand...
Click to collapse
Do you have a reproducible test for the perceived performance increase?
_that said:
No. While browing, the browser is in category "Foreground Applications". But you can't ever see this in System Tuner, because when you try, ST itself is the foreground application. Increasing the OOM value for content providers means that the browser (or any other processes in that category) is *more* likely to be killed when another app in foreground needs memory.
You can see it yourself via adb shell. Start the browser, and in parallel an adb shell from you computer:
Code:
[email protected]:/ # ps | grep browser
u0_a8 4820 135 538416 66980 ffffffff 4017eee4 S com.android.browser
[email protected]:/ # cat /proc/4820/oom_adj
0
Now switch back to the launcher and see again:
Code:
[email protected]:/ # cat /proc/4820/oom_adj
7
Do you have a reproducible test for the perceived performance increase?
Click to expand...
Click to collapse
Just the speed at which my hair blows backwards when I browse. :laugh:
Maybe forcing oom_adj to 0 (or less like the smallest it can get -17) for the browser process might be a good idea so it becomes immortal. That's one of the last processes I want killed, even if it is in the background.
https://bugzilla.mozilla.org/show_bug.cgi?id=768832
http://forum.xda-developers.com/showthread.php?t=622666
But seriously you are absolutely correct that when browsing the app is in the foreground and that setting is low like it should be. Its the last two catagories that early clearing of the trash makes for more RAM for the other 4 groups so foreground apps can have the most room to run. Its unclear to me how forcing an early kill of the browser background *service* WRT content providers is a benefit but it seems to work. Maybe it just forces that service to the forground but still keeps it active.
From the link below:
"From what I have experienced, the more open apps in the "Empty App" category, the slower and more sluggish the phone. Having these apps open is basically a waste of memory, because they are in standby and not being used. A high OOM value should therefore be set for "Empty App"."
"Processes that fall into the "Content Provider" category are also a waste of space; they only actually get used when running the application that service belongs to. This means that often the service will be running in the background when it doesn't actually need to be. A high OOM value should therefore be set for "Content Provider"."
Although it seems counter-intuitive, take a look at this and let me know if you agree. Try it out for yourself and see if you can tell a difference. I can but don't have a deterministic way to prove it.
http://forum.xda-developers.com/showthread.php?t=1639207&page=3
Another thing I've noticed WRT the OOM settings merely as a pattern observation when looking at the settings group for each of the 6 categories as sliders like in ST there appears to be a proportional (exponential) relationship between them. If you did a screen shot for each and made them semi-transparent and overlayed them all you would see a set of sloped curves all with increasing slope moving from light to aggressive. For example if you start with the "very light" settings group and record those 6 numbers then do the same for each group up thru "very aggressive", for each set of 6 there is a proportional relationship between them and the next or previous group. I would guess this suggests the heuristics of the kernel OOM management is best serviced with a group of proportioned parameters. So if you changed the default settings for *any* group up or down the other groups would need to follow to keep the curve shape proportional (size relationship between parameters in any given group).
Forcing oom_adj
@sbdags
Do you have a provision in CROMI(X) to allow the user to force-set the oom_adj value for a particular app or app list? I think this would be a great feature especially for browser. I would like to set it to -17 so its immortal/invincible.
I am particularly interested in understanding what setting a high value for content providers say 192 does when a browser *service* is running in the *background* and questioning whether that service is now more likely to be killed by OOM or not? What happens to the parent process for this service if it is killed? What happens in this condition when browser is also the last app or a fairly recent app?
Here's a post and method to do so:
http://lwn.net/Articles/317814/
elfaure said:
@sbdags
Do you have a provision in CROMI(X) to allow the user to force-set the oom_adj value for a particular app or app list? I think this would be a great feature especially for browser. I would like to set it to -17 so its immortal/invincible.
I am particularly interested in understanding what setting a high value for content providers say 192 does when a browser *service* is running in the *background* and questioning whether that service is now more likely to be killed by OOM or not? What happens to the parent process for this service if it is killed? What happens in this condition when browser is also the last app or a fairly recent app?
Here's a post and method to do so:
http://lwn.net/Articles/317814/
Click to expand...
Click to collapse
Yes this can/could be done. What is the pid of the browser? How do I find out?
sbdags said:
Yes this can/could be done. What is the pid of the browser? How do I find out?
Click to expand...
Click to collapse
Look a few posts back at @_that's reply to me regarding OOM. He shows the code there to do this. Also before we go hog wild here, I was simply interested if it could be done and you confirm it can. Let's speak with _that and others about whether or not this makes sense. For a single browser of choice I say yes it does. For 4 or 5 or a slew of browsers I say no because it could eat all your memory and you'd have no way to kill the processes for oom_adj=-17.
[Edit] We have a slight problem. PID's are different for different devices?? @_that shows PID for browser is 4820 and on my device its 6186? He must have a TF200 or TF300?
On another note, give the dev of the app "Bluetooth Keyboard EasyConnect" two thumbs up from me if you know him/her. Finally some software that connects my keyboard automatically at boot and reconnects it after a timeout just by pounding a few keys actually works for the first time. I've been looking for this app for 6 mos. and tried no less than 8 others. When I saw it was XDA created I thought I'd check it out. The dev created some HID profiles and did some other magic with this app, its awesome!! I can now leave my keyboard for hours and hours and just bang some keys and it reconnects. That's the way it should be. Excellent job.
****************************************
Code:
ps | grep browser
ps | grep chrome
ps | grep firefox
ps | grep opera
ps | grep fevdev
The first output parameter is the PID.
Output:
[email protected]:/ $ ps | grep browser
u0_a9 6186 119 540368 68936 ffffffff 00000000 S com.android.browser
u0_a372 6272 119 528528 65052 ffffffff 00000000 S com.opera.browser
[email protected]:/ $ ps | grep firefox
u0_a190 6330 119 593488 76724 ffffffff 00000000 S org.mozilla.firefox
u0_a190 6403 119 466016 27376 ffffffff 00000000 S org.mozilla.firefox.UpdateService
u0_a190 6415 6330 585740 50932 ffffffff 00000000 S org.mozilla.firefox
[email protected]:/ $ ps | grep chrome
1|[email protected]:/ $ ps | grep chrome
u0_a15 6600 119 563460 65784 ffffffff 00000000 S com.android.chrome
u0_i3 6628 119 542892 57404 ffffffff 00000000 S com.android.chrome:sandboxed_process0
[email protected]:/ $
You sure this works with dolphin? Seems to have speeded up Stock (but I have issues there), but to have made no difference to dolphin. Is there anything I need to do? Running CM10.1 (RC2).
dgjl said:
You sure this works with dolphin? Seems to have speeded up Stock (but I have issues there), but to have made no difference to dolphin. Is there anything I need to do? Running CM10.1 (RC2).
Click to expand...
Click to collapse
Maybe someone can confirm or deny this, but as far as I know (and was told from Naked dev) both Dolphin and Boat use the com.android.browser agent so they are automatically cached to RAM with the mount settings for browser in the script. I haven't done much testing with either. As far as working with custom ROMs I can't help you there because I'm locked on stock ROM. I know it works with CROMIX for the 4 browsers Stock, Naked, Chrome, and Firefox from the feedback I've received. Maybe some other users can test this for us and post feedback here.
[Edit] I just loaded dolphin and searched my device for "dolphin". Interesting findings.
1. There is no com.android.dolphin or any executable for dolphin, so it must use com.android.browser.
2. But when dolphin is running and I type this code into a terminal, I find no dolphin process running nor do I find browser running either??
@_that what do you make of this?
Code:
ps | grep dolphin
ps | grep browser
ps | grep chrome
ps | grep com.
Output:
[email protected]:/ $ ps | grep dolphin
1|[email protected]:/ $ ps | grep browser
1|[email protected]:/ $ ps | grep chrome
u0_a15 6787 119 560624 65404 ffffffff 00000000 S com.android.chrome
u0_i14 12801 119 549252 61132 ffffffff 00000000 S com.android.chrome:sandboxed_process0
1|[email protected]:/ $ ps | grep com.
root 100 2 0 0 ffffffff 00000000 S krfcommd
u0_a91 760 119 499724 56696 ffffffff 00000000 S com.android.systemui
u0_a17 840 119 463884 23492 ffffffff 00000000 S com.android.defcontainer
u0_a88 854 119 469904 34176 ffffffff 00000000 S com.beansoft.keyboardplus
radio 872 119 484048 26848 ffffffff 00000000 S com.android.phone
u0_a77 888 119 464080 23292 ffffffff 00000000 S com.nuance.xt9.input
system 902 119 489608 77744 ffffffff 00000000 S com.android.launcher
u0_a330 1126 119 463976 24252 ffffffff 00000000 S com.TEST.android.lvh
u0_a151 2068 119 468284 24504 ffffffff 00000000 S com.namakerorin.audiofxwidget
u0_a208 2749 119 466992 27464 ffffffff 00000000 S com.latedroid.juicedefender
u0_a24 4799 119 468388 28012 ffffffff 00000000 S com.rootuninstaller.ramboosterpro
u0_a42 5037 119 464436 24776 ffffffff 00000000 S com.google.android.inputmethod.latin
u0_a201 6384 119 480352 38416 ffffffff 00000000 S com.symantec.mobilesecurity
u0_a15 6787 119 560908 64424 ffffffff 00000000 S com.android.chrome
u0_a16 7739 119 473856 26596 ffffffff 00000000 S com.google.android.gsf.login
u0_i14 12801 119 550084 62376 ffffffff 00000000 S com.android.chrome:sandboxed_process0
system 12994 119 464324 29872 ffffffff 00000000 S com.asus.services
system 13233 119 462992 22776 ffffffff 00000000 S com.nvidia.NvCPLSvc
u0_a119 13295 119 462924 23996 ffffffff 00000000 S com.aiteam.wifitogglewidget
u0_a36 13889 119 482888 31720 ffffffff 00000000 S com.google.android.googlequicksearchbox
u0_a12 13921 119 466800 25476 ffffffff 00000000 S com.android.providers.calendar
u0_a28 13938 119 472532 26832 ffffffff 00000000 S com.google.android.apps.maps:GoogleLocationService
u0_a11 13959 119 472712 25960 ffffffff 00000000 S com.android.calendar
u0_a7 16792 119 466732 25868 ffffffff 00000000 S com.android.bluetooth
root 20746 20737 1780 1180 ffffffff 00000000 S /data/data/com.estrongs.android.pop/files/libestool2.so
u0_a76 30444 119 463248 24324 ffffffff 00000000 S com.asus.weather
u0_a21 30513 119 495112 32964 ffffffff 00000000 S com.android.email
u0_a18 30876 119 463264 24012 ffffffff 00000000 S com.android.deskclock
u0_a160 31522 119 462932 23120 ffffffff 00000000 S com.aiteam.bluetoothtogglewidget
u0_a16 32085 119 501984 32392 ffffffff 00000000 S com.google.process.gapps
[email protected]:/ $
[Edit]
When I do the same for boat (ps | grep boat) I do find "com.boatbrowser.free" process running so it is NOT using the com.android.browser agent (bad info from Naked dev). Thanks, I learned something. I will add a mount for boat in the script. But dolphin is confusing me!
What "issues" are you having with the stock browser?
elfaure said:
Maybe someone can confirm or deny this, but as far as I know (and was told from Naked dev) both Dolphin and Boat use the com.android.browser agent so they are automatically cached to RAM with the mount settings for browser in the script. I haven't done much testing with either. As far as working with custom ROMs I can't help you there because I'm locked on stock ROM. I know it works with CROMIX for the 4 browsers Stock, Naked, Chrome, and Firefox from the feedback I've received. Maybe some other users can test this for us and post feedback here.
[Edit] I just loaded dolphin and searched my device for "dolphin". Interesting findings.
1. There is no com.android.dolphin or any executable for dolphin, so it must use com.android.browser.
2. But when dolphin is running and I type this code into a terminal, I find no dolphin process running nor do I find browser running either?
[email protected]:/ $
[Edit]
When I do the same for boat (ps | grep boat) I do find "com.boatbrowser.free" process running so it is NOT using the com.android.browser agent (bad info from Naked dev). Thanks, I learned something. I will add a mount for boat in the script. But dolphin is confusing me!
What "issues" are you having with the stock browser?
Click to expand...
Click to collapse
Now that's what I call a fulsome answer. Good luck with sorting it out. Problems with stock are: 1) when I type the screen goes up and up (as I type it's just gone over the top) on every key press - letters, numbers, punctuation, return, etc. 2) sometimes (using full screen mode) old tabs and blue progress lines get stuck at the top of the screen).
elfaure said:
[Edit] I just loaded dolphin and searched my device for "dolphin". Interesting findings.
1. There is no com.android.dolphin or any executable for dolphin, so it must use com.android.browser.
2. But when dolphin is running and I type this code into a terminal, I find no dolphin process running nor do I find browser running either??
@_that what do you make of this?
Click to expand...
Click to collapse
1. wrong, because com.android.browser is the stock browser.
2. you need to find out the correct app name.
_that said:
1. wrong, because com.android.browser is the stock browser.
2. you need to find out the correct app name.
Click to expand...
Click to collapse
So for my reference, all browsers have a unique executable and no browsers other than the stock browser use com.android.browser I take it? I was told something wrong then. I also thought that in order for it to be an executable is must start with "com." but I now see that is not the case. Man there is a lot of stuff to not know here.
**********************************************************************************************************
Found the name of dolphin source apk is mobi.mgeek.TunnyBrowser so that's the process I am looking for so I launch it and go to a website then I "ps" from the terminal and I found it running with PID 12085.
Also found the name of boat source apk is com.boatbrower.free running at PID 13254.
Also found the name of boat mini source apk is com.boatgo.browser at PID 13177.
Question: Is the PID always the same when running a particular app on a particular device? So for example if I ran dolphin tomorrow or a week from now, or on another TF7 would it always have this same PID or is that determined by load order?
*****************************************************************************************************
Updated script to REV3, now for 8 browsers: 4 original + Opera Mobile, Dolphin, Boat, & Boat Mini.
*****************************************************************************************************
dgjl said:
Now that's what I call a fulsome answer. Good luck with sorting it out. Problems with stock are: 1) when I type the screen goes up and up (as I type it's just gone over the top) on every key press - letters, numbers, punctuation, return, etc. 2) sometimes (using full screen mode) old tabs and blue progress lines get stuck at the top of the screen).
Click to expand...
Click to collapse
I was misinformed about Dolphin and Boat. You got me so I fixed it. New version is ready.
****************************************************
I added 4 new browsers to the script (Opera Mobile, Dolphin, Boat, and Boat Mini)
For your glitches, try the "about:debug" trick here
http://forum.xda-developers.com/showthread.php?t=1923285
Let me know if this resolved anything
For your Dolphin, download the new startup script on PG.1 (autostart3.sh.txt)
elfaure said:
Found the name of dolphin source apk is mobi.mgeek.TunnyBrowser so that's the process I am looking for
Click to expand...
Click to collapse
Good. How did you find it? I used the Play Store web page and read the name in the address bar, but there are lots of other ways.
elfaure said:
Question: Is the PID always the same when running a particular app on a particular device?
Click to expand...
Click to collapse
The PID is only valid while the process is running.

[Q] Unexpected values in adj for lowmemorykiller param?

On my Moto G 4G (XT1039) I was poking around with the minfree settings and reading about it I found out there was a paired file it uses to determine the adj levels for each of the min settings.
So I got curious:
[email protected]:/ $ cat /sys/module/lowmemorykiller/parameters/adj
0,58,117,176,529,1000
[email protected]:/ $ cat /sys/module/lowmemorykiller/parameters/minfree
12288,15360,18432,21504,24576,30720
The adj parameters seems to be wrong. I believe the valid values for this will be 0 to 15 (it is actually -17 to 15 but the negative values are used for system/native/persistent processes -- you know things that shouldn't be killed).
Most info seemed to be suggesting adjusting minfree but never took a look into its twin/paired file adj.
I just feel it is a bit off from what I would have expected to be in that file. I think the stock settings for this is 0,1,2,7,14,15

BIZAR: Built-in Camera app has an "overlay" after first use; works fine in other apps

BIZAR: Built-in Camera app has an "overlay" after first use; works fine in other apps
This is by FAR the most bizarre issue I've seen on android phone. Here the facts:
1) This happens only on ONE phone, all other phones running same setup do not see the symptom.
2) Running Lolipop 5.0.2 with builtin Camera, installed from: /system/app/Amigo_Camera.apk (called: com.android.camera, version: 3.2.0.au)
3) Camera works 100% with any app that launches it from the app itself, like whatsapp, telegram, and so forth (so, indirect invocation works fine)
4) HOWEVER, when launching the camera app directly, it opens up with a clear photo the FIRST time it is launched. After that, any subsequent launching, app opens up the app BUT, it has an "overlaid" "foggy" image that is super imposed on the whole live image, and also prevents pressing any keys - so camera app is totally not usable/functional.
This is NOT fog from the lens, b/c launching the same camera app from another app indirectly (like mentioned in #3) works fine, also, clearing the cache on the camera app allows the image to be crystal clear, but only until you EXIT the camera app. You can take as many good pictures, but, if you LEAVE the app, the next time you get into it, it has this foggy faded image of roughly the last image that lens "saw".. This is really crazy!!
5) I've tried reinstalling Amigo_Camera.apk, and MANY other things, but nothing helps.. Also tried reinstalling google playstore/play services.
6) I cannot attribute any recent change to this behavior, one minute it was OK, then it started doing it, and now ~2 weeks like that, can can't figure it out! Workaround for now, using OpenCamera app, but really curious as to root cause.
7) After clearing the cache, Camera app works fine first time, and creates these directories:
Code:
[email protected]:/data/data/com.android.camera # ls -l
total 8
drwxrwx--x 2 10029 10029 4096 Mar 29 20:25 cache
drwxrwx--x 2 10029 10029 4096 Mar 29 20:25 shared_prefs
ownership looks OK:
Code:
busybox ls -lZR
drwxrwx--x 2 4096 Mar 31 12:39 u:object_r:app_data_file:s0 cache
drwxrwx--x 2 4096 Mar 31 12:39 u:object_r:app_data_file:s0 shared_prefs
./cache:
./shared_prefs:
-rw-rw---- 1 114 Mar 31 12:39 u:object_r:app_data_file:s0 LOC.xml
-rw-rw---- 1 121 Mar 31 12:39 u:object_r:app_data_file:s0 MENU_MODE.xml
-rw-rw---- 1 122 Mar 31 12:39 u:object_r:app_data_file:s0 METER_GUIDE.xml
-rw-rw---- 1 294 Mar 31 12:39 u:object_r:app_data_file:s0 com.android.camera_preferences.xml
-rw-rw---- 1 239 Mar 31 12:39 u:object_r:app_data_file:s0 com.android.camera_preferences_0.xml
and also content looks identical to those from a working phone (with identical ROM).
I've run logcat, but not sure what to look for.
8) All working phones use XPosed, but symptom remains even after disabling xposed.
Has anyone ever seem such a mysterious case of camera mis-behavior? any tips?
9) I refuse to 'reset phone to factory defaults', but willing to do just about anything to research/figure out why this is happening.
Thanks in advance.
Stormy.
[SOLVED] BIZAR: Built-in Camera app has an "overlay" after first use
my oh my.. after few weeks, finally, breakthrough. Decided to search for 'screenshot not working', b/c my issue was not widely described. Among the 100's of hits on screenshot not working this one sounded most promising:
http://www.jrichards.ca/posts/android-screenshot-not-working/
It is talking about "animations on the phone" which live in Developers Options. Indeed I had turned them off few weeks ago.. Now turned all back on to 0.5x, and camera immediately shows SHARP images all the times! Will play to see which one of the 3 causes it, but for now, all is OK. (Also, disabling all 3 again, camera worked as well, and after an hour started with the artifacts/foggy overlays, so best to set to 0.5x and not completely disable)
Thanks.
Stormy

Categories

Resources