[Q] Customising System Bar (Task Bar) With custom text - Galaxy Tab 2 Q&A, Help & Troubleshooting

All,
I am trying to test the water to see what is possible for an enterprise tablet deployment we are working on.
We are working on a dual persona device - which enables the user to switch between two android instances.
I want to be able to notify the user which persona they are using, and an ideal way to do that would be via the "System Bar" at the bottom of the screen. I am thinking of a couple of options:
1) Change the colour of the system bar
2) Add some text to the status bar (that is always there)
If I understand correctly, the settings for this menu are in SystemUI.apk, and i have pulled this using adb from the device. I believe I know how to go about changing the colour, by searching out the relevant png's and swapping them.
How would i go about implementing option 2, for example I may want the string "Home" or "Work" displayed dependant on the instance the user has loaded. Would this be a case of changing a layout XML definition? If so which one?
Regards,
Andy

Why not just use the system notification services that already exist in android? You can have persistent notification icons, text etc. and no need to build a custom ROM, just use an app.

DigitalMD said:
Why not just use the system notification services that already exist in android? You can have persistent notification icons, text etc. and no need to build a custom ROM, just use an app.
Click to expand...
Click to collapse
Good question - I am open to all suggestions - the key requirement is that an item of text would be visible at all times to the user, and couldn't be dismissed.
Wasn't looking at a custom ROM - we have to make some changes to the device anyway which need us to Root it - so was thinking while we were there to mount the Filesystem read/write and swap SystemUI.apk to solve this issue.
As I say open to good ideas.

This may be what you're looking for...
http://www.androidpolice.com/2012/11/14/android-4-2-feature-highlight-multiple-user-accounts/

LeftyGR said:
This may be what you're looking for...
http://www.androidpolice.com/2012/11/14/android-4-2-feature-highlight-multiple-user-accounts/
Click to expand...
Click to collapse
Hi, interesting but not quite what we are trying for just yet. These devices will be single user devices (currently) which we intend to run dual persona's on, essentially we will be running a micro hypervisor, that allows a user to switch between virtual OS's.
So - we are just trying to find a decent feedback mechanism to present the user with an "always visible" way of telling them which persona they are in.

patonar said:
Hi, interesting but not quite what we are trying for just yet. These devices will be single user devices (currently) which we intend to run dual persona's on, essentially we will be running a micro hypervisor, that allows a user to switch between virtual OS's.
So - we are just trying to find a decent feedback mechanism to present the user with an "always visible" way of telling them which persona they are in.
Click to expand...
Click to collapse
Ok. So I think what you are looking for is this:
* Single User sign-on - where one person (considered the owner) logs into the device.
* Switching profiles (essentially) between two user interfaces.
**Where in one environment the owner has a general setup to use as a personal device, for lack of a better term.
**And in another environment the owner has a cusomized setup that is more optimized for work purposes. Not necessarily "different than the first environment, but obvious enough that when they unlock the device they will know which environment they are in.
Basically correct?
If so, what about this as a general solution: Using multiple Launcher Apps.
Basically, use the system default as one environment. Setup/arranged for the purpose of general use. Use a second (3rd party) Launcher as the second environment. 3rd party launchers are very customizable and most are themeable. And there are a few Launcher Manager apps on the market that allow for faster switching between them. Even provide desktop shortcuts on each launcher to quickly do between. Lock the 3rd party launcher from being able to be uninstalled easily by placing it into system/app folder. And if you want to take certain functionality away, modify it so an owner can't change the theme or settings you choose for it.

LeftyGR said:
Ok. So I think what you are looking for is this:
* Single User sign-on - where one person (considered the owner) logs into the device.
* Switching profiles (essentially) between two user interfaces.
**Where in one environment the owner has a general setup to use as a personal device, for lack of a better term.
**And in another environment the owner has a cusomized setup that is more optimized for work purposes. Not necessarily "different than the first environment, but obvious enough that when they unlock the device they will know which environment they are in.
Basically correct?
If so, what about this as a general solution: Using multiple Launcher Apps.
Basically, use the system default as one environment. Setup/arranged for the purpose of general use. Use a second (3rd party) Launcher as the second environment. 3rd party launchers are very customizable and most are themeable. And there are a few Launcher Manager apps on the market that allow for faster switching between them. Even provide desktop shortcuts on each launcher to quickly do between. Lock the 3rd party launcher from being able to be uninstalled easily by placing it into system/app folder. And if you want to take certain functionality away, modify it so an owner can't change the theme or settings you choose for it.
Click to expand...
Click to collapse
Yes basically correct, but I have a solution for the device "persona" switching - imagine I am actually running two completely separate ROM's running on VM's.... so each ROM behaves as its own device, unaware of the other...
All I want to do - is add some text to the system bar that is always there....

patonar said:
Yes basically correct, but I have a solution for the device "persona" switching - imagine I am actually running two completely separate ROM's running on VM's.... so each ROM behaves as its own device, unaware of the other...
All I want to do - is add some text to the system bar that is always there....
Click to expand...
Click to collapse
Ok. Two completely separate OS running at same time. I could see that as possible, save the problem you may run into with internal space in the current format. Would you need to completely repatriation the entire device to achieve this? Or maybe you could use an AOSP base, which is considerably lighter. I'm saying two completely autonomous systems would essentially duplicate all files needed to run to make them truely separate. Actually, I think that's what you're saying...

LeftyGR said:
Ok. Two completely separate OS running at same time. I could see that as possible, save the problem you may run into with internal space in the current format. Would you need to completely repatriation the entire device to achieve this? Or maybe you could use an AOSP base, which is considerably lighter. I'm saying two completely autonomous systems would essentially duplicate all files needed to run to make them truely separate. Actually, I think that's what you're saying...
Click to expand...
Click to collapse
The implementation of the virtualised android is being done by a company for me... that isn't the issue.
I have been making some kernel mods, to beef up encryption, but also wanted while i am there to make some mods to the system bar / task bar.
Forget about the two OS issue - imagine a single device, one OS, ICS 4.0.4 - i want to add some text to the task bar (static text) how could i do it?

Related

Android Fork Bomb

Just out of curiosity does anyone know if any android devices can be affected by a fork bomb sent via text or email?
It is Linux so I'm guessing it will be affected. Maybe it won't be like OMG but it will be some what affected.
If a text or email could execute a custom script on being received, there is probably a lot worse that it could do than a fork bomb... Might be possible to get two views to keep calling each other, in which case the bundle for that program will expand until it runs out of memory and android will kill the app. This is very much an app specific bug though, and isn't related to the "fork bomb" of a program making a new instance of itself.
I thought Android runs on the sandbox environment for applications, which means the app can't execute much permissions as compared to Windows.
Just my $0.02
Yes, the apps are sandboxed for the most part.
Now that I think on it, there is a launch flag to open a new instance of a program leaving any currently running ones alone, which could be used to make a forkbomb. In this case, it would not be stopped by memory as the earlier instances will shut down but the exponentially increasing new instances will keep going, probably making the phone unusable until a reboot.
This can only be done by compiling and launching a signed app though, no email client can do this unless it has a backdoor to trigger this code from itself or from a trojan-esque feature to download, install, and launch apps on its own. The user would be promted to ok the new app's permissions anyway, unless it uses and gets permission for root access.
Basically, forkbombs are possible, but not by email or text with stock or nonmalacious programs.
Task Management
If the script gained root access, it'd be just the same as on a Linux machine. But I believe the DalvikVM simply kills any apps/processes it needs to in order to keep the system running smoothly (in theory).
well it works...
https://github.com/nicandris/com.example.forkbomb

Multitasking / Keeping Apps in foreground state

If i understand Android correctly, it sends applications into a "background" mode when switching tasks? I would like to prevent that. There are some apps (like games or browser) that need quit a bit of time restoring the last state so this would be usefull for some tasks.
Is this possible ?
TyrionWarMage said:
If i understand Android correctly, it sends applications into a "background" mode when switching tasks? I would like to prevent that. There are some apps (like games or browser) that need quit a bit of time restoring the last state so this would be usefull for some tasks.
Is this possible ?
Click to expand...
Click to collapse
Well, switching to background mode just marks the application as not displaying anything. The way memory management on Android works, if foreground apps (i.e. apps that are actively displaying on the screen) need memory and there's none available, then background apps will be put into a stored state that frees up memory for the foreground apps. Coming back from that stored state is probably what you're noticing. Android also tries to keep a certain amount of unused memory around and will put background apps into stored state to achieve that. We do have pretty limited memory available on this device so some level of pausing is always going to happen. See also: http://andrs.w3pla.net/autokiller/details
You may be able to reduce how many background tasks are put into storage by tweaking the minfree parameters (using e.g. Autokiller Memory Optimizer from the market) to tell Android to aim for a smaller pool of free space.
Mioze7Ae said:
Well, switching to background mode just marks the application as not displaying anything. The way memory management on Android works, if foreground apps (i.e. apps that are actively displaying on the screen) need memory and there's none available, then background apps will be put into a stored state that frees up memory for the foreground apps. Coming back from that stored state is probably what you're noticing. Android also tries to keep a certain amount of unused memory around and will put background apps into stored state to achieve that. We do have pretty limited memory available on this device so some level of pausing is always going to happen. See also: http://andrs.w3pla.net/autokiller/details
You may be able to reduce how many background tasks are put into storage by tweaking the minfree parameters (using e.g. Autokiller Memory Optimizer from the market) to tell Android to aim for a smaller pool of free space.
Click to expand...
Click to collapse
Thanks, i'm will give it a try. Is it also possible to max out swap before sending apps to background? I think restoring the ram-state from sd would still be faster for several apps.
Edit: reading your post again, i'm not talking about a tasking switch delay, but apps that completly reload themselves when switching tasks (DolphinMini page load,DungeonHunter as examples). Just to prevent any confusion...
TyrionWarMage said:
Thanks, i'm will give it a try. Is it also possible to max out swap before sending apps to background? I think restoring the ram-state from sd would still be faster for several apps.
Edit: reading your post again, i'm not talking about a tasking switch delay, but apps that completly reload themselves when switching tasks (DolphinMini page load,DungeonHunter as examples). Just to prevent any confusion...
Click to expand...
Click to collapse
Oh... Sorry I misunderstood. I don't know anything relevant to that case.
I've spent a few hours trying to find how to make certain Droid apps maintain their foreground state when put in the background with no luck. Perhaps it just can't be done.
I'm thinking of the Cydia iPhone app called Backgrounder which lets you choose which apps maintain foreground state when put into the background.
This is necessary, for example, with a note application where you are switching between taking notes and looking up info. Every time you switch back to the note app, you need to go back into your note, put it in edit mode and navigate to the section of the note you were editing. If it were acting like a foreground app in the background, when switching back to it it would already have your note open and be in edit mode with the cursor where you left off.
K9 mail has a similar problem where if you have an email open, switch to another application, when you go back to K9 it takes you to your inbox again where you have to navigate to the email you had open before switching.
Is there a tool similar to Backgrounder for Android?
Thanks.
nheacock said:
I've spent a few hours trying to find how to make certain Droid apps maintain their foreground state when put in the background with no luck. Perhaps it just can't be done.
I'm thinking of the Cydia iPhone app called Backgrounder which lets you choose which apps maintain foreground state when put into the background.
This is necessary, for example, with a note application where you are switching between taking notes and looking up info. Every time you switch back to the note app, you need to go back into your note, put it in edit mode and navigate to the section of the note you were editing. If it were acting like a foreground app in the background, when switching back to it it would already have your note open and be in edit mode with the cursor where you left off.
K9 mail has a similar problem where if you have an email open, switch to another application, when you go back to K9 it takes you to your inbox again where you have to navigate to the email you had open before switching.
Is there a tool similar to Backgrounder for Android?
Thanks.
Click to expand...
Click to collapse
Looking for such tool too. Making app to stick with its foreground state even though it is actually in the background. (Make it appear in notification?)
ZDBox is a useful tool... you can download from market its free and the app has the abbility to:
★ Traffic counter: Monthly/daily mobile data usage overview, shows remaining data traffic, detailed data usage information for each app.
★ Do not disturb: Just set days and the time when you need your privacy and you won’t be disturbed by your phone. Set phone to silent, vibration or airplane mode.
★ App lock: Protect apps with a password or pattern, for exmaple your contacts, Facebook, Twitter, Whatsapp,Gmail and so on
★ Task killer: Kill all apps at once, define protected apps which won’t be killed, set auto kill when screen gets locked, mark single or multiple apps to kill
★ history eraser:clean your(Browser history,market search history,Google Map search history,Gmail search history,Clipboard)
★ Notification bar: One tap on the bar shows remaining battery time, running apps, how much data traffic is left and if app lock is active or not. A tap on these informations starts ZDbox.
★ Uninstaller: Shows used/available internal and SD card memory. Apps can be easily uninstalled. Single or multiple (batch) uninstall possible.
★ App to SD: Move apps to your SD card. Single or multiple (batch) move possible. Only for Android 2.2 and 2.3.
★Cache Cleaner:With Cache Cleaner you can clean your cache of phone.protect your secret without a trace.
I hope you can use for keep your running applications with that app...
sorry for my english...
davidequiz said:
★ Task killer: Kill all apps at once, define protected apps which won’t be killed, set auto kill when screen gets locked, mark single or multiple apps to kill
Click to expand...
Click to collapse
This will not help since the task killer which kills the background apps in inside the android system not an external one.
We must find a way to control the internal one then...
nheacock said:
I've spent a few hours trying to find how to make certain Droid apps maintain their foreground state when put in the background with no luck. Perhaps it just can't be done.
I'm thinking of the Cydia iPhone app called Backgrounder which lets you choose which apps maintain foreground state when put into the background.
This is necessary, for example, with a note application where you are switching between taking notes and looking up info. Every time you switch back to the note app, you need to go back into your note, put it in edit mode and navigate to the section of the note you were editing. If it were acting like a foreground app in the background, when switching back to it it would already have your note open and be in edit mode with the cursor where you left off.
K9 mail has a similar problem where if you have an email open, switch to another application, when you go back to K9 it takes you to your inbox again where you have to navigate to the email you had open before switching.
Is there a tool similar to Backgrounder for Android?
Thanks.
Click to expand...
Click to collapse
Guys, I'm so much looking for a solution of this same thing. The closest I came to is Ram manager. Has a xda threat and can be found in the play store. But it also can't manage to lock an app and prevent its killing (although it helps a lot). I need my navigation always running and it is silently killed or stopped while I'm looking at my mail or have a phone call. This is ridiculous. Have you found a solution. Some way to protect an app from killing and lock it in the foreground. I mean how are they able to do it for the apps which are in the system tray!? Like antivirus apps and tons of other. I can't believe xda experts don't know how...
I would think that Antivirus apps run a service.
In Mioze's CM6 there are build prop edits that might work, but I never tried them.
Code:
# apps to be kept in memory (specified by process name)
# use with caution, RAM is limited!
sys.keep_app_1=
sys.keep_app_2=
I am not an expert and can't tell the difference between service and an app running. What you're saying makes sense, but I need clear instructions somewhere to make an app protected from killing. Thanks for helping.
Sent from my HTC One X using xda premium
Wrong forms this milestone xt720.
Sent from my SGH-T759 using xda premium
I pretty much fixed android multitasking - even on ense 4.0 and 4.1
http://forum.xda-developers.com/showthread.php?t=1900626
Testers welcome.
And for locking an app in a foreground state, my SuperCharger can do that via BulletProof Apps menu.
zeppelinrox said:
I pretty much fixed android multitasking - even on ense 4.0 and 4.1
http://forum.xda-developers.com/showthread.php?t=1900626
wI
Testers welcome.
And for locking an app in a foreground state, my SuperCharger can do that via BulletProof Apps menu.
Click to expand...
Click to collapse
I tested that and almost became an expert. I'm not so sure if it is completely solved, although I have to admit that you have done a great and recognized job.
Just tell me can the script for bulletproof apps work alone, without the supercharger script. Many ROMs have their own memory settings and one is afraid to cover them with supercharger script settings.
But if bulletproof script can run and do the job on itsown then the problem is really fixed.
Yeah its separate.
Alot of devs say dont supercharge because they dont want to be showed up and scare their users lol
But hundreds of roms come supercharged anyway.
zeppelinrox said:
Yeah its separate.
Alot of devs say dont supercharge because they dont want to be showed up and scare their users lol
But hundreds of roms come supercharged anyway.
Click to expand...
Click to collapse
Thanks for answering!
So I'm going to try running only the bulletproof script without the supercharger script and set an app to be UNbillable.
Should I set it to run on startup!? I'm using custom ROM. The last revolution HD.
The init.d script would run automatically.
So you dont need to configure anything.
Whatever app is in the hitlist will get bulletptoofed soon after running the app.
zeppelinrox said:
The init.d script would run automatically.
So you dont need to configure anything.
Whatever app is in the hitlist will get bulletptoofed soon after running the app.
Click to expand...
Click to collapse
I am trying to get this configured. But I only want to run the bulletproof script, not the 99SuperCharger script. I just want to keep my rom's memory settings, cause I am OK with them.
But both of the scripts (99SuperCharger and bulletproof) are going to reside in the init.d folder of my custom rom. So they will both be started, aren't they?
How can I make only bulletproof script run at boot. Should I just delete 99SuperCharger from init.d?

[Q] Help! Deploying to board members, very tight turn around

Apologies in advance if this is in the wrong spot or been answered. Feel free to move or at least point me to the right spots/threads.
Here's our situation:
We have a fair sized mobile program (~1500 lines) with a mix of OS. We have been trying for awhile to convince key management that mobile has become critical. Spent the last 3 weeks effectively turning a Galaxy Tab S into a desktop. This was the linchpin that got us approval to expand. Now for the kicker:
We've been approved to roll out ~70 units to Board Members and select Directors with a standard config (apps and screens) . The problem is, they want everything deployed by December 1. The main question is, what do I use to quickly set up every one the exact same way, right down to the widgets and app screen positions? I do have general Play store and Samsung accounts, and rights to install everything on my laptop. Devices cannot be rooted (Corp policy). Any suggestions?
Thanks!
You have a week to make a full custom rom lol. Look into rom kitchen for the tab s. Widgets and default home screens are easy. Personalizing apps settings might be more difficult.
chaostic_2k1 said:
You have a week to make a full custom rom lol. Look into rom kitchen for the tab s. Widgets and default home screens are easy. Personalizing apps settings might be more difficult.
Click to expand...
Click to collapse
Can't do custom rom, device has to be stock due to corporate policy (among other factors). We don't care about personalizing most app settings (i.e. not logging them into facebook), mostly just what's on the device and the placements.
custom ROMs are Not required to be rooted. You can take a stock rom and change it. but if you're only using user apps and widgets and only need to personalize the home screen then all you need is Adb, a script and the Apk files. Turn on side loading and usb debugging, plug it in and run a script that will adb install each apk. Then set up the home screens manually. Tedious but easily done in a few days
chaostic_2k1 said:
custom ROMs are Not required to be rooted. You can take a stock rom and change it. but if you're only using user apps and widgets and only need to personalize the home screen then all you need is Adb, a script and the Apk files. Turn on side loading and usb debugging, plug it in and run a script that will adb install each apk. Then set up the home screens manually. Tedious but easily done in a few days
Click to expand...
Click to collapse
I was not aware that custom ROMs do not require root. That said, the manual home screen setup is the part we are trying to avoid. With batch install, the apps that are being installed is easy. the few that we load from the Samsung store are a bit more annoying, but still not that bad. It's that screen setup that kills us.

Running multiple versions of a app/simulating screen prompting

Id like to run 2 versions of a app is this possible? Id love to do this is a unrooted scenario but if its not possible my phones can be rooted.
My second question is how easy/safe would it be to simulate a button press externally? Looking for creative ideas here I need to hit a prompt once a hour on my phone. I dont want to use internal apps because im pretty sure those will get noticed.
Thanks!
You can, if you break an application to change the name of the package, replacing all the way to him to collect and re-sign. Get a new application. Of course, there may be problems with the treatment settings, databases, etc., but if the application is very simple, you can hire.

Secure Spaces Support (or equivalent feature) for Pixel?

I used Graphite Software's Secure Spaces on a Blackphone 2, and I really liked the way it allowed me to keep work and personal data separate. Visiting their website, I see that support is unfortunately limited to a small group of phones, and includes the installation of a customized ROM. In the xdaforums Nexus 5 and Nexus 5X Development forums, there are Secure Space ROM threads, but I'm just curious if anyone knows if there will be future support with Secure Spaces for the Pixel, or if there is another solution that provides a similar separation capability, for the Pixel. (Unfortunately my employer does not allow rooted phones).
Just received notification from Graphite that support for the Pixel is planned. If anyone knows of any similar "separation" technology that's available please feel free to post to the thread.
Not being familiar with Secure Spaces, and having only briefly scanned what it does, could you not do the same thing on the Pixel by setting up an additional user for the phone? When you set up a new user it's like a whole separate phone for that user, including passphrase, apps, storage, email, settings, everything.
Maybe it's an ignorant suggestion, but it looks like that's what Secure Spaces does.
I think that Secure Spaces offers more separation than what you're describing, (although I admit I've never tried setting up two user accounts on my phone to see what separation is provided). My current and former employer require that any devices that access the corporate network, (in order to get email, calendar schedule, etc.), be installed with MDM, (mobile device management), software that allows the IT department to have complete control over the entire phone's configuration, (most obvious if you try to change the security options), and management. Secure Spaces allows me to have separate workspaces, one that corporate IT can own, and another that can be configured and managed as I want. It also keeps data separate between the workspaces.
jasnn said:
I think that Secure Spaces offers more separation than what you're describing, (although I admit I've never tried setting up two user accounts on my phone to see what separation is provided). My current and former employer require that any devices that access the corporate network, (in order to get email, calendar schedule, etc.), be installed with MDM, (mobile device management), software that allows the IT department to have complete control over the entire phone's configuration, (most obvious if you try to change the security options), and management. Secure Spaces allows me to have separate workspaces, one that corporate IT can own, and another that can be configured and managed as I want. It also keeps data separate between the workspaces.
Click to expand...
Click to collapse
When I create a new user under Nougat, it's as if it's a brand new phone. You only have the base apps that were there when the phone was new, you have to set up Gmail again, Chrome is empty, Photos shows nothing, etc. You can manage security settings, pretty much everything. The only thing I've found that it will not let the secondary user do is open the Messenger application - so the secondary user cannot read or send text messages on the phone - which is of course a good thing.
I also found an article with this blurb about the separation between users:
Under the hood, file-based encryption enables this improved user experience. With this new encryption scheme, the system storage area, as well as each user profile storage area, are all encrypted separately. Unlike with full-disk encryption, where all data was encrypted as a single unit, per-profile-based encryption enables the system to reboot normally into a functional state using just device keys.​
Anyway, it's probably all irrelevant now since the product you're used to and happy with is available for the Pixel. That said, if you haven't installed Secure Spaces yet it might be worth taking a look at it. Just two-finger swipe from the top and tap the "user" icon and then "Add user".
Thanks for spending the time to research this issue.
I'm sure that folks over in the two SecureSpaces development threads here, (1., 2.), can speak more authoritatively on what Secure Spaces offers over a stock setup. For me being able to configure the security options for my personal space, separate from my work space, is important, as well as keeping the data separate from each other.
What about Android for Work?
I used to use it with BES12, worked well.
Sent from my Pixel using Tapatalk

Categories

Resources