[Q] Browser2Ram with JB 4.2.1 not working - Asus Transformer TF700

Hi,
I was using my rooted (not unlocked) TF700 with stock rom and browser2ram. I think that it was a very good compromise, for not unlocking.
After the latest firmware update (Jelly Bean 4.2.1) browser2ram is not working anymore. The app does not make any error message, but from browsing experience I clearly see that it is not working.
Is there someone who can modify the app to work with JB4.2.1?
Thank you very much in advance :fingers-crossed:

I can't directly answer your question, but one way to check to see if Browser2RAM is even loading or not is to look at your superuser app logs to see if Browser2RAM is requesting root access or not (and if it's being granted). The SuperUser app logs are available right in the SuperUser app...
Sent from my ASUS Transformer Pad TF700T using Tapatalk 2

jtrosky said:
I can't directly answer your question, but one way to check to see if Browser2RAM is even loading or not is to look at your superuser app logs to see if Browser2RAM is requesting root access or not (and if it's being granted). The SuperUser app logs are available right in the SuperUser app...
Sent from my ASUS Transformer Pad TF700T using Tapatalk 2
Click to expand...
Click to collapse
Thanks for the prompt reponse.
Apart from the user experience, I know that browser2ram is not working, since i tested it following this hint:
"Open a terminal, then type:
mount | grep tmpfs
If browser2ram is correctly installed you should have a mount point called "browser"(iirc) pointing to "/data/data/com.android.browser" but its been gone with 4.2 for me."
in the following thread: http://forum.xda-developers.com/showthread.php?p=40030887

KARLOKARLO said:
Thanks for the prompt reponse.
Apart from the user experience, I know that browser2ram is not working, since i tested it following this hint:
"Open a terminal, then type:
mount | grep tmpfs
If browser2ram is correctly installed you should have a mount point called "browser"(iirc) pointing to "/data/data/com.android.browser" but its been gone with 4.2 for me."
in the following thread: http://forum.xda-developers.com/showthread.php?p=40030887
Click to expand...
Click to collapse
I'm on CROMI-X 4.2 and I do not have the browser entry when I type that into terminal. I\ll try and remember to verify once I get back to CROMI 3.4.7 (betatest back and forth wobble).

This is the expected result, obtained on CROMI 3.4.1:
Code:
[email protected]:/ # mount|grep browser
browser_cache /data/data/com.android.browser/cache tmpfs rw,relatime,size=102400k 0 0

Stupid question, but have you tried simply un-installing and re-installing Browser2RAM? Maybe that will help...
Sent from my ASUS Transformer Pad TF700T using Tapatalk 2

Tried all different ways and it does not appear to be installing properly. I wonder if something in the way 4.2 lays out it's structure is confusing it.
What folder should it be caching and where to?
Having said that browser performance on 4.2.1 seems impressive without it.

sbdags said:
Tried all different ways and it does not appear to be installing properly. I wonder if something in the way 4.2 lays out it's structure is confusing it.
Click to expand...
Click to collapse
I suggest moving the functionality to an init.d script. I just issued the mount command in adb shell (on 4.2) and that works, so it should also work from init.d (now I'm finally going to add the missing init.d support to my kernel ).

jtrosky said:
Stupid question, but have you tried simply un-installing and re-installing Browser2RAM? Maybe that will help...
Sent from my ASUS Transformer Pad TF700T using Tapatalk 2
Click to expand...
Click to collapse
Yes, I re-installed the apk. I also tried to download it again, from a different link. I am sure that it is granted super user access.
I think that something has changed from 4.1 to 4.2, but have no clue what changed.
This is the only real problem I need to solve, using a stock ROM. Without browser2ram working, even in 4.2.1, when a page is newly loaded, sometime the screen does not react to my finger input.

Don't know if this is related to the OP's problem, but doing the browser2ram trick manually no longer works for me. Previously, using JB 4.1 I could do:
Code:
mount -t tmpfs -o size=30m tmpfs /data/data/com.android.browser/cache/webviewCacheChromium
and everything was a-okay -- cached files were written to the tmpfs as desired. Now, the mount command executes successfully, but the browser still uses the underlying filesystem for storage. The tmpfs is there, I can create files in it, but the browser won't use it. Firefox fails in the same way (previously worked as well). Gonna try to look into this some more when I can.
Can anyone confirm that doing this manually works for them with JB 4.2? Thanks!

becomingx said:
Don't know if this is related to the OP's problem, but doing the browser2ram trick manually no longer works for me. Previously, using JB 4.1 I could do:
Code:
mount -t tmpfs -o size=30m tmpfs /data/data/com.android.browser/cache/webviewCacheChromium
and everything was a-okay -- cached files were written to the tmpfs as desired. Now, the mount command executes successfully, but the browser still uses the underlying filesystem for storage. The tmpfs is there, I can create files in it, but the browser won't use it.
Click to expand...
Click to collapse
How do you know that the browser won't use it? If the tmpfs is mounted, how do you see the underlying fs? And why do you mount only over one subdirectory of cache?
I tested the original command from browser2ram (see some posts before) and it worked fine:
Code:
mount -t tmpfs -o size=100m browser_cache /data/data/com.android.browser/cache
Remember to kill the browser if it was running before, maybe that's your issue.

_that said:
How do you know that the browser won't use it?
Click to expand...
Click to collapse
No cache files appear in the new mount. Plus I don't see the speed improvement.
If the tmpfs is mounted, how do you see the underlying fs?
Click to expand...
Click to collapse
I can't while it's mounted, but if I clear the cache, then mount the tmpfs, then browse some sites, then unmount the tmpfs, new cached files appear on the underlying fs.
And why do you mount only over one subdirectory of cache?
Click to expand...
Click to collapse
I don't know if I fully understand the question, but I'm guessing you mean why do I mount at "webviewCacheChromium" instead of the parent directory "cache" like browser2ram does? I find this gives me the speed enhancement with losing my current session/bookmarks/history/etc. (i.e. no need to save it back to disk every 12 hours if I remember how browser2ram works off the top of my head.)
I tested the original command from browser2ram (see some posts before) and it worked fine:
Code:
mount -t tmpfs -o size=100m browser_cache /data/data/com.android.browser/cache
Click to expand...
Click to collapse
Hmm, I'll have to try mounting at the "cache" dir to see if it makes any difference.
Remember to kill the browser if it was running before, maybe that's your issue.
Click to expand...
Click to collapse
Already tried cold-booted the thing and mounting it before ever launching the browser, and still didn't work.
Thanks for the feedback -- I'll keep poking at it and see what I can find.

becomingx said:
I can't while it's mounted, but if I clear the cache, then mount the tmpfs, then browse some sites, then unmount the tmpfs, new cached files appear on the underlying fs.
Click to expand...
Click to collapse
OK, in my testing, the files appeared in the mounted directory, and unmounting the tmpfs made old files appear, so it worked for me.
becomingx said:
I don't know if I fully understand the question, but I'm guessing you mean why do I mount at "webviewCacheChromium" instead of the parent directory "cache" like browser2ram does? I find this gives me the speed enhancement with losing my current session/bookmarks/history/etc. (i.e. no need to save it back to disk every 12 hours if I remember how browser2ram works off the top of my head.)
Click to expand...
Click to collapse
The old version of Browser2RAM moved the complete /data/data/com.android.browser to the tmpfs and had the code for saving it back. The newer version only mounts a tmpfs over .../cache. Things like bookmarks and history should be outside of cache (common sense but unverified, can someone confirm?).

_that said:
How do you know that the browser won't use it? If the tmpfs is mounted, how do you see the underlying fs? And why do you mount only over one subdirectory of cache?
I tested the original command from browser2ram (see some posts before) and it worked fine:
Code:
mount -t tmpfs -o size=100m browser_cache /data/data/com.android.browser/cache
Remember to kill the browser if it was running before, maybe that's your issue.
Click to expand...
Click to collapse
I can confirm this works

Guys I tried to put this in an init.d script.
Now interestingly on the TF700 it does nothing...
On the Prime it installs and sets up the cache properly.
Any ideas why sh is not executing the exact same file on the TF700?

sbdags said:
Guys I tried to put this in an init.d script.
Now interestingly on the TF700 it does nothing...
On the Prime it installs and sets up the cache properly.
Any ideas why sh is not executing the exact same file on the TF700?
Click to expand...
Click to collapse
Either you forgot to set the correct permissions on your script, or it may have something to do with SELinux stuff introduced in Android 4.2.
Edit: Looks like we have to learn about SELinux. I found some more info:
http://code.google.com/p/cryptonite/issues/detail?id=47

sbdags said:
I can confirm this works
Click to expand...
Click to collapse
_that said:
OK, in my testing, the files appeared in the mounted directory, and unmounting the tmpfs made old files appear, so it worked for me.
Click to expand...
Click to collapse
Thanks guys for confirming that this does indeed work.
The old version of Browser2RAM moved the complete /data/data/com.android.browser to the tmpfs and had the code for saving it back. The newer version only mounts a tmpfs over .../cache. Things like bookmarks and history should be outside of cache (common sense but unverified, can someone confirm?).
Click to expand...
Click to collapse
I thought when I originally tried mounting at "cache" I lost (atleast) my session. Once I get it working again I'll have to confirm.
_that said:
Either you forgot to set the correct permissions on your script, or it may have something to do with SELinux stuff introduced in Android 4.2.
Edit: Looks like we have to learn about SELinux. I found some more info:
http[colon][slash][slash]code[dot]google[dot]com/p/cryptonite/issues/detail?id=47
Click to expand...
Click to collapse
I had a weird feeling it might be the SELinux stuff. Unfortunately not an area of Linux I have a lot of experience with...

so anyone know how to make browser2ram on 4.2? I don't understand what you guys were talking about in the upper posts...lol I don't speak computer language unfortunately

odorfreedk said:
so anyone know how to make browser2ram on 4.2? I don't understand what you guys were talking about in the upper posts...lol I don't speak computer language unfortunately
Click to expand...
Click to collapse
I'm working on it ASUS's Android build doesn't come with any of the SELinux userspace tools, so there seems to be no way to manipulate mount context as it stands. At the moment I'm looking into how all the other filesystems are able to be mounted omnipresent; if I'm lukcy I may have something soon.

Edit: Anybody reading this for the first time, please don't use this workaround. Read the rest of the thread for better ones, or jump to here for my own current, best solution.
*sigh*
So the workaround I've devised for the moment builds off of the 27th comment in the link[1] posted by _that. Basically, I've picked one of the services from `/init.cardhu.rc', in this case `wifimacwriter', and renamed the binary from `/system/bin/wifimacwriter' to `/system/bin/wifimacwriter.dist'. In its place I've created a shell script:
Code:
#!/system/bin/sh
if ! grep -q '^browser_cache' /proc/mounts; then
mount -t tmpfs -o size=40m browser_cache /data/data/com.android.browser/cache/webviewCacheChromium
fi
exec /system/bin/wifimacwriter.dist
which creates the mount then calls the real service. The grep(1) call shouldn't be necessary (i.e. this is a `oneshot' service and shouldn't be started more than once), but I'm being cautious for now. This is *nasty* and definitely not for everyone, but it works for me for now until something better can be found.
Comment #29 at [2] says that the issue will be patched by Google in the next release, but the poster doesn't provide any detail or sources. The solution I thought I had turned out to be a dud. I'll keep pondering and researching the problem, but unfortunately I don't have anything better for the time being.
@_that: The browser session (if nothing else, other than the cache of couse ) is stored in the `cache' directory. So keeping a persistent session seems to require mounting at `webviewCacheChromium'.
[1] http://code.google.com/p/cryptonite/issues/detail?id=47#c27
[2] http://code.google.com/p/cryptonite/issues/detail?id=47#c29

Related

[Q] Sensation CIFSManager with TempRoot

Ok, so the latest temp-root has gone well, and things still work okay, which is a great improvement, and much kudos to the devs for this.
However, CIFs Manager seems to not work, and I like to watch stuff over my network - and I'm pretty sure it's something very simple to do with SymLinks and stuff, as to how it works.
"Mounting the share has failed with an error
mount: mounting //10.1.100.10/Films on /mnt/cifs/Films failed: No such device"
Same settings work fine on my Desire, so I know the network's good, must be something to do with where it's looking, or trying to work, and the symlinks etc. in the temp-root.
However, I haven't a clue where to start - maybe someone can help out?
Maybe you start with reading the CifsManager FAQs?
regards
Most Frequently Asked Questions:
Q: When trying to mount a share I only get an error message saying something like...
"Error running exec().Command: [su]"
A: Most probably your device is not properly rooted or the su command is missing.
"No such device".
A: Your current kernel or rom lacks the necessary CIFS support. Try to find a matching kernel module (cifs.ko) or use a rom with explicit CIFS support.
"mounting <yourshare> on <yourmountpoint> failed: No such file or directory"
A: Your "Mount Point" simply does not exist and CifsManager is not able to automatically create it for you. As automatic Mount Point creation is not done with su rights, CifsManager can only create Mount Points in directories with permissions 777 or on your SD-Card.
Q: I have installed CifsManager but launching the app fails with something like "Application not installed on your phone"
A: This is not a problem caused by CifsManager but a bug in your ROMs launcher. Look for an updated version of your launcher.
Q: I mounted my favorite share successfully but files with special characters are not displayed correctly.
A: Try to use a kernel with explicit UTF-8 support or try to find/load the kernel module nls_utf8.ko.
Click to expand...
Click to collapse
f3d0r said:
Maybe you start with reading the CifsManager FAQs?
regards
Click to expand...
Click to collapse
fed0r,
Great information there - thank you so much. I'll double-check the permissions, but I was sure I'd already altered the mount point to 777. If that doesn't work, I'll try using a mount point on SD too.
I never even thought that the issue could be something so simple - thanks agaiN!
I thought he was indicating:
A: Your current kernel or rom lacks the necessary CIFS support. Try to find a matching kernel module (cifs.ko) or use a rom with explicit CIFS support.
Yes, on reading it the second time over, that seems to be what is indicated. I actually had an error combining #2 and #3.
Ah well, back to waiting for S-OFF so I can flash a ROM with the right kernel, because I haven't got a clue when it comes to Kernel type things!!
So, Stock Sensation ROMs do NOT have CIFS support. Tested.

[Q] Extracting RFS filesystem images from Linux

Does anyone have tips on extracting RFS images on a Linux box?
So far everything I've found on extracting RFS images indicated to either:
1) Use MagicISO/PowerISO - these are proprietary Windows tools, I'd prefer not to have to reboot or move to another machine
2) Mount it as a VFAT filesystem - this didn't work for me last time I tried it
Any other suggestions? It's not something I usually bother with as I'm almost always doing kernel work or working with already-extracted userland filesystems, but with all of the AT&T Gingerbread leaks coming out I'd like to be able to analyze these without waiting for someone to CWM it up.
Mount it as loop.
http://forum.xda-developers.com/showthread.php?t=751827
LinuxBozo said:
Mount it as loop.
http://forum.xda-developers.com/showthread.php?t=751827
Click to expand...
Click to collapse
That's what I tried before (see 2) above) - didn't work. Tried both autodetect and forcing vfat.
Maybe just that particular RFS image (was one of the ones from gtg's Ultimate Unbrick packages) was wonky... Will try again tonight with I3/I4.
Works Here (TM) ;-)
LinuxBozo said:
Works Here (TM) ;-)
Click to expand...
Click to collapse
Weird. Whatever RFS image I was trying to mess with last time around must've been mangled... UCKI3 mounts fine.
i missed this thread, i was messing with the kk1 leak and wanted to create a rooted package without flashing it rooting and dumping it, problem is i cant set permissions when i mount the image to a loop. i can read and write but i cant change the permissions of su to 6755 or antthin other than 0755 it just says operation not permitted. i tried to fdisk the loop and turn off dos compatibility mode which seemed to cause issues on my flash drive, though it might work but it wont stick.
any suggestions from the local gurus? im sure the fix is simple but from how much time ive spent on it it might make more sense to flash it root it and dd the rooted /system partition
Dani897 said:
i missed this thread, i was messing with the kk1 leak and wanted to create a rooted package without flashing it rooting and dumping it, problem is i cant set permissions when i mount the image to a loop. i can read and write but i cant change the permissions of su to 6755 or antthin other than 0755 it just says operation not permitted. i tried to fdisk the loop and turn off dos compatibility mode which seemed to cause issues on my flash drive, though it might work but it wont stick.
any suggestions from the local gurus? im sure the fix is simple but from how much time ive spent on it it might make more sense to flash it root it and dd the rooted /system partition
Click to expand...
Click to collapse
You can't really do anything but read only operations from vanilla linux because while RFS is VFAT under the covers, there are other things to it. Writing to it once mounted as loop will cause havoc. You would have to actually have RFS driver in the kernel to do anything other than read operations. Which means, mounting as loop on your phone, or getting RFS into your own linux kernel (not gonna happen, since it's closed source)
LinuxBozo said:
You can't really do anything but read only operations from vanilla linux because while RFS is VFAT under the covers, there are other things to it. Writing to it once mounted as loop will cause havoc. You would have to actually have RFS driver in the kernel to do anything other than read operations. Which means, mounting as loop on your phone, or getting RFS into your own linux kernel (not gonna happen, since it's closed source)
Click to expand...
Click to collapse
Ok so if I wanted to release an Odin package it would mean dumping it from my phone then. Gotcha!
Thanks.

[Q] Busybox: "ln" not implemented?

Hi.
I have busybox installed on my ICS 4.0.4. I tried to create a hard link of a ringtone file as follows (via adb).
[email protected]:/mnt/sdcard/Ringtones $ ln Gee.m4a ../Notifications/Gee.m4a
link failed Function not implemented
The intention is to be able to use this one ringtone file for both ringtone and notification. Since having two copies of the same file takes up unnecessary space, I want to use links. However, from this output, ln doesn't seem to be implemented. Am I missing something?
Thanks!
Typing just "busybox" should show all available commands.
But it usually says "applet not found" if it is missing the command.
Not sure if you can even build busybox without the ln applet.
Check the 2nd post of this thread http://forum.xda-developers.com/showthread.php?t=1122710.
This is most likely the case here too, the partition you are working with doesn't support symlinks.
Dark3n said:
Check the 2nd post of this thread http://forum.xda-developers.com/showthread.php?t=1122710.
This is most likely the case here too, the partition you are working with doesn't support symlinks.
Click to expand...
Click to collapse
Thanks for the quick reply. Is there a way to check which file system /mnt/sdcard uses? I tried "df -T" (as one normally does on Linux), but apparently '-T' is not supported on busybox.
Thanks again!
Try just "mount", results can differ depending on the busybox you are using. On my cm9 nightly it showed the file system types.
Thanks! I tried the mount command and it showed the file system as "fuse," which makes sense as the GNex doesn't support external storage.
Apparently the version of "ln" I have doesn't support fuse.
Sent from my Galaxy Nexus using XDA

Mount NFS - Solved

has anybody managed to mount NFS shares on their TF300
I'm new to android, but not new to linux
and getting permission denied
but exported share is open to the whole subnet
it would be nice to know somebody has it working, since there are very few threads related to nfs and the TF300
KAD
Make sure your permissions are set right in termonal su is always key my friend imounted it easily
Hit the thanks button if i helped
ok, thanks, it's good to know somebody has it working
and yes, I was already su
this means, I have some permissions issue with my file server
I guess I'll have to google, since the NFS shares are mounted dailey,
on my WDLXTV and my Ubuntu desktop without problems
but while I'm at it, does anybody know of an NFS utils package that's been compiled for ICS, it would be nice to have things like showmount available
solved, no issues on server side here
here's the things to be aware of
NFS is in the kernel but it's cripled
1. you must use busybox to run your mount cmds
2. you must be root
3. you must use the nolock option
example
Code:
busybox mount -o nolock,proto=tcp -t 192.168.1.123:/media /mnt/nfs
where did you get the nfs-utils package for android ?
thanks

File system issue

I recently restored my tablet from a CWM backup that I made using CWM recover v3.2 I think.
Even after reinstalling the ROM (EOS v3), the file system isn't as per normal. The old file system is now in a folder called '0', with a new structure created. Please refer to screenshot.
As such, I have various issues now:
- Browsers crash when trying to save a file, presumably because the downloads location differs.
- I had duplicates of photos etc appearing in the gallery.
Is there any way to fix this, without a full complete wipe?
Sent from my Xoom using XDA Premium HD app
LOL, You flashed a JB 4.2 ROM previously and tried to go back to a JB 4.1.2 huh? Everything that glitters ain't gold.
From adb shell :
Code:
mv /data/media/0/* /data/media
Then
Code:
rm -r /data/media/0
Type it exactly as posted. Usual Disclaimer: blah blah... it's on you.
Mjamocha said:
LOL, You flashed a JB 4.2 ROM previously and tried to go back to a JB 4.1.2 huh? Everything that glitters ain't gold.
From adb shell :
Code:
mv /data/media/0/* /data/media
Then
Code:
rm -r /data/media/0
Type it exactly as posted. Usual Disclaimer: blah blah... it's on you.
Click to expand...
Click to collapse
I remember reading about this recently but I don't remember the details.
What is the reasoning behind this? Is it related to the Xoom's system partition being too small? Is it intended?
Cubanluke88 said:
I remember reading about this recently but I don't remember the details.
What is the reasoning behind this? Is it related to the Xoom's system partition being too small? Is it intended?
Click to expand...
Click to collapse
With Android 4.2, Google introduced multiple users as a new feature. In order to accommodate multiple users, Google is now giving each user a their own folder for storage. If you upgraded to 4.2 from 4.1, then the 4.2 ROM will look for a certain file in /data to determine whether it needs to migrate all of your files to the new multi-user data structure. By default, 4.2 migrates all of /data/media to /data/media/0.
Ah that makes sense.
And explains why my gnexus didn't do that when I tested a 4.2 rom. Thanks.
Cubanluke88 said:
Ah that makes sense.
And explains why my gnexus didn't do that when I tested a 4.2 rom. Thanks.
Click to expand...
Click to collapse
No prob. ftgg99 made that possible a while ago THREAD I've use this "SwitchMe" since ICS, to have separate profiles for my personal use, and a guest account for the family. It seems more stable/secure than the newly integrated JB 4.2, IMO
Thanks for the help and explanation, I'll try it later with ADB. The reasoning makes sense, too.
Also, yes, I downloaded a new EOS nightly via the UpdateMe app and flashed it. I saw the stupid phablet layout, played with it for 30 seconds, then reverted back to an older nightly.
TheStickMan said:
Thanks for the help and explanation, I'll try it later with ADB. The reasoning makes sense, too.
Also, yes, I downloaded a new EOS nightly via the UpdateMe app and flashed it. I saw the stupid phablet layout, played with it for 30 seconds, then reverted back to an older nightly.
Click to expand...
Click to collapse
All good man.

Categories

Resources