Friday, October 12, 2018

linux - Given that every application runs as a separate user, what happens when you want to add a new user account?


According to this, every application in Android runs as a separate kernel-level user, with a unique user ID and group ID.


So, what happens under the hood when you add a new user (e.g. to your shared tablet)?



Answer



The Linux user IDs that Android uses to isolate apps from each other are completely unrelated to user profiles on Android 4.2 tablets.


In Android, each app gets its own directory for saving data. The Linux user ID system is used to make sure apps can't read each others' data. But all these data directories are inside one directory on the filesystem, /data/user/0. Let's say the first user is called Abulurd, and he installs the app Showr. It might be given user ID 1004, and the directory /data/user/0/com.shadowburst.showr.


Now, let's say you create a new user profile for Beatrice. She gets a fresh directory, /data/user/1, which starts off empty. When she logs into the device, and installs Showr, it doesn't download the app again (because the Android app installer knows the APK file is already on the device), but it does create a new user ID 1007 (for example), and a new directory /data/user/1/com.shadowburst.showr.


Android uses Linux filesystem permissions, and the different Linux user IDs, not only to make sure that Abulurd's Showr can't read the data of Abulurd's other apps, but also that Abulurd's Showr can't read the data of Beatrice's Showr. The two instances of Showr run in different processes, with different user IDs.


If you're familiar with Linux terminology, making a new user profile is similar to using chroot on the device to get an isolated part of the filesystem to run apps in.



What I've described is the usual process, but just as apps can be written to share a data directory with other apps by the same developer (signed with the same key), Android gives apps the opportunity to say they work with multiple users. This way, an app can be written to have one process for all the user profiles, to let them share data or perform some special function. The lock screen has to work this way, for instance, because all user profiles share one lock screen app, which has to read all users' lock-screen settings.


Thursday, October 11, 2018

linux - Nexus 7 doesn't have sdcard folder when connected to PC


I've just bought a Nexus 7. When I plugged it into my laptop, it shows the media folder, I'd like to access the sdcard folder just like the other devices. How to transfer files?


I think "adb push" is not a good choice. enter image description here



Answer



Nexus 7 doesn't support UMS (USB Mass Storage) out of box. But, it supports file transfer by MTP (Media Transfer Protocol). MTP allows you to push and pull any type of files from sdcard, but it doesn't allow you to edit files directly on sdcard (like you do with UMS mode).


From your screenshot, it looks like your Nexus 7 is connected with PTP (Photo Transfer Protocol), also known as Camera Mode. Switch to MTP mode and do whatever you want. Also make sure your PC OS supports MTP.


2.3 gingerbread - The RAM total of the apps "Running" never equals the "Used Ram" shown below on the scale


I realised after a few days of observation, that the total of the RAM usage of indivisual apps shown in the running process is quite lower than that shown below it on the scale


And as "Cached Background Process" are calculated separately, they are not added in this "RAM Used" part of the scale.


Then what is using it? Coz the OS has its own space. Then what from the userspace is taking it up but not showing up?


Gingerbread 2.3.6


Like when I am writing this, the Total of indivisual values displayed is around 45-50mb while the scale below shows 95mb used!! How? \


Edit



Screen cast -


http://youtu.be/fzkQlZ8CdkU




How to disable a specific calendars notification?


How can I disable the notifications for a specific calendar only?


Example: I have the calendar of my girlfriend synced to my phone to know the times she is at home, working, etc. Now I get all the notifications about the events from her calendar. I want to get notifications for my calendar only, but not for hers.


Maybe this is important too:
I am using a Davical server and sync my calendars over caldav sync.



Answer



You could use e.g. Calendar Event Reminder, and disable notifications in the default/stock calendar. With CER, you can setup reminders for each calendar separately, and even deactivate alerts for calendars you don't want to be alerted for (in your case, the "work" calendar).


The added plus is you will never miss an alert anymore, as you can configure CER to annoy you until you shut the alert of manually. I've bought the app when it was still payed, and it never let me down.


Unfortunately, I don't know of any way to do that with the native calendar -- but at least this is a free solution, though it takes an extra app :)


Wednesday, October 10, 2018

calibration - How can I calibrate the tilting sensor on Android


I have an Android mobile which seems to be of Samsung, or at least a clone thereof. I got it for my wife as a present, so I don't really know which one. Under the battery pack it says "Model: 19502"


when I look through the menus there are absolutely no identifications as to which it is and the settings only allow rather high level stuff, like setting background images, and similar, but nothing system relevant.


When I play games I noticed that the tilt is not correct, so I installed "App Sensor Box" which allows me to test the sensors. It shows a board with a ball on it, and I can see that the ball rolls off when I keep it balanced. Unfortunately this app doesn't allow me to calibrate it, so I wanted to know if such an app exists, or what I can do to calibrate it, because there are not setting to trigger this. The apps I found on Play Store all seem to just read, but don't change it.



Answer



It's a tough one to answer, as I'm not sure what version of Android you are running, and you have stated it may be a clone.


Method 1:



Open "Settings"


Find "Motion" and tap on it


Scroll down the menu and tap on "Sensitivity Setting"


Open "Gyroscope calibration"


Place device on a level surface and tap Calibrate


Method 2:


Download 'G-Sensor' from the Samsung Apps store pre-installed on your device. Here is a weblink.


Method 3:


Download Bubble Level from the Google Play store, this has a calibration option also.


device firmware - Samsung S Galaxy II (i9100): possible with stock Google Android OS?


I'm in the market for a new Smartphone. Except for iPhone's, I'm new in the field and probably have some misconceptions.


My first choice was the Google Nexus S, but I was offered a great deal on the Samsung S Galaxy II (i9100). The only issue is that I read that it came with an "enhanced" version of Android. Being familiar with PC's, I know that these enhancements are almost always bloatware: I always do a clean install of Windows to get rid of it.


My question is fairly simple: is this possible to use the stock Google Android OS on the Samsung S Galaxy II (i9100)? That was the killer feature of the Nexus S for me: coming directly from Google, easily upgradable. Would that be possible and if yes, how?


Thank you for enlightening me.



Answer




It is very unlikely that Samsung will ever release an unmodified Android firmware for the Galaxy S II. They've never released one for their Galaxy S family of phones without their TouchWiz "enhancements".


Historically the only Android devices that have run the stock OS have been the very early phones released by each manufacturer (before they'd written their own customizations) and the Google Nexus series of phones. If you stray away from that you are going to get modified firmwares, interfaces and apps.


One of the big downsides to using a phone that has extensive manufacturer customizations is that this means that they will generally be a lot slower in pushing out updated versions of the Android OS to you. Phones with manufacturer customized OS's are normally updated months after the Nexus devices, if ever. This is because the manufacturers have to do lots of work and testing to re-integrate all of their changes and customizations back into the OS every time the base OS changes. Factor in the fact that phone companies often drag their feet in certifying the updated OS's on their networks and you have a huge set of delays before the updates reach your phone.


The big upsides to a customized OS is that the manufacturer will often add a lot of features that aren't available to stock OS phones, eg Samsung's TouchWiz offered built-in wireless tethering well before it was added to the stock OS in Froyo, both HTC Sense and Samsung TouchWiz add remote phone tracking and wiping features to the phones (in most geographic regions), their media players can generally play more formats, and the interfaces often look "nicer".


Your main option for "clean" firmwares running the stock OS for non-Nexus phones is to use unofficial custom ROMs. Many of these use the stock Android interface and apps, with only minimal changes to either. See these questions for more on custom ROMs: What is the difference between: Rooting, Jailbreak, ROM, Mod, etc, and What is the meaning of “flashing a custom ROM”?


Also see this previous question: Android phones without custom UIs


UPDATE: Since this answer was written one things has changed. In mid-2013 Google started offering "Google Play Edition" phones for sale on the Play Store in certain regions in addition to their own Nexus line of devices. These "Google Play Edition" phones tend to be some of the more popular, higher-end GSM phones and are offered with the plain Android OS with Google Apps, and without any manufacturer or carrier modifications, just like Nexus phones. So far these phones have been getting OS updates much faster than their manufacturer modified brethren.


So far the phones available on there in "Pure Google" versions include the Samsung Galaxy S4, HTC One, LG G Pad 8.3, Sony Z Ultra, and Motorola Moto G.


As these are generally the exact same hardware as their manufacturer branded siblings there are often fairly simple ways to apply these "clean" OSs to branded phones (but do check that you really do have the same hardware, some of these phones have variations with the same name, but different hardware in them, eg they may be available in GSM, CDMA, LTE versions with totally different radio hardware and SoC CPUs).


Tuesday, October 9, 2018

sd card - How can I can open local files in the default Android browser?


I want to open local files that are on my sdcard in the Android browser. How can I accomplish this?



Answer



In order to view local files on the sdcard with the default Android browser just enter file://sdcard/ and then the path to the file you want to view. For example if you have an xml file named "person" in a folder named "xmlfiles" it would look like file://sdcard/xmlfiles/person.xml in your address bar. You can create bookmarks for the file you are viewing but if you try to make a shortcut to that bookmark or use a bookmark widget (at least the HTC one) these will not work and may give an error "The linked program is no longer installed on your phone". The bookmarks will work if opened from within the browser.


So far I have verified that the browswer can open/render these files: xml, html files(htm), and image files


It cannot open pdfs.


According to this comment it works for Android 2.1 and above


samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...