text:
Change hardware name
I'm using the official Android Emulator. When I run this I get:
adb shell getprop | grep hardware

I get
[ro.boot.hardware]: [goldfish]
[ro.hardware]: [goldfish]
[ro.kernel.androidboot.hardware]: [goldfish]

I want to rename goldfish to any other word.
I can run the emulator in debug mode emulator -avd test -show-kernel -verbose to see kernel parameters:
  kernel.path = /home/artyom/android-sdk-linux/system-images/android-19/default/armeabi-v7a//kernel-qemu
  kernel.parameters =  androidboot.hardware=goldfish android.checkjni=1
  kernel.newDeviceNaming = no
  kernel.supportsYaffs2 = yes

So, Android Emulator passes androidboot.hardware=goldfish to the QEMU.
Let's dive into Android source.
In /system/core/init/util.c we can see that passing hardware via kernel command line makes it unchangeable.
void get_hardware_name(char *hardware, unsigned int *revision)
{
    const char *cpuinfo = "/proc/cpuinfo";
    char *data = NULL;
    size_t len = 0, limit = 1024;
    int fd, n;
    char *x, *hw, *rev;

    /* Hardware string was provided on kernel command line */
    if (hardware[0])
        return;

According to the eLinux wiki, hardware name used to init file init.machine_name.rc, so renaming goldfish to any other name must be combined with renaming init.goldfish.rc to init.anyname.rc.
So my question is, how can I force a different hardware name? How I can different androidboot.hardware value to the qemu? What files, other than init.goldfish.rc should I change? Different hardware name must be forced while compiling?
I've tried adding this to the .config file:
CONFIG_CMDLINE="androidboot.hardware=randomname android.checkjni=1"
CONFIG_CMDLINE_EXTRA=y
CONFIG_CMDLINE_FORCE=y

It didn't help.
Related question: android boot - where is the init.%hardware%.rc read in init.c ? where are services started?
Additional info: Initialize Goldfish hardware

Here we can see, that passing hardware via kernel command line makes
it unchangable.

The hardware name is indeed changeable. get_hardware_name is only used to set the ro.hardware property in property_service, hosted by init. Everything else, like dalvik vm for android.os.Build.HARDWARE is requesting ro.hardware from property_service.
Ways of changing the hardware name:

Recompile the android emulator based on qemu, which sets androidboot.hardware right here: userspace-boot-properties.cpp#265
For physical phones, change the kernel cmdline in the boot partition header or for Android 12+ modify bootconfig in the vendor_boot partition
Use magisk to patch ro.hardware in the property_service by executing resetprop ro.hardware <hardware_name>. This can be done early in the boot process even before Zygote is started by writing a post-fs-data script

However changing the hardware name before boot is finished will result in a boot loop.
I tried renaming init.<ro.hardware>.rc and fstab.<ro.hardware> but there were still problems like Could not find 'android.hardware.*' that were causing the bootloop.
Even setting ro.hardware right after booting by waiting for resetprop -w sys.boot_completed 0 caused problems in network services that prevented the interface from loading.
The problem is that the dalvik vm is initializing android.os.Build.HARDWARE statically when it's loaded and caches the class. So subsequent changes in the ro.hardware property are ignored.
The trick here is to wait until everything is booted up, then execute resetprop ro.hardware <hardware_name> and then restart Zygote (dalvik/java vm) with setprop ctl.restart zygote.
This will reload the android.os.Build class with the updated ro.hardware property.
Now all requests from getprop, the java/dalvik vm or even native modules will see the updated hardware name.
Here's a startup service script to do this with magisk:
/data/adb/service.d/change_hardware.sh

#!/bin/sh
until pids=$(pidof com.android.systemui)
do
    sleep 1
done
resetprop ro.hardware ranchu
setprop ctl.restart zygote

chmod +x /data/adb/service.d/change_hardware.sh

If you know the process where you have to emulate a different hardware, it's easier to overwrite android.os.Build.HARDWARE in the target process with frida:
Java.perform(() => {
    Java.use("android.os.Build").HARDWARE.value = 'ranchu';
});

authors: ณัฐฐ์ฎาวรรณ มั่นต่าย


text:
Duplicate contact storages
I use Android 2.3.4 (Gingerbread).
When I go to Contacts > [MENU] > Display options, I see duplicate entries as "bud***@gmail.com Phone-only (unsynced)". (1) See left image.
And when I try to add a new contact, I face the same issue. (2) See right image.

Why does this happen? This wasn't there earlier and I noticed this right now. I didn't visit contacts app recently though. I noticed this when I tried to add a new contact.
Adding more to the issue, I can create new contacts and save them inside one of these places, but it'll always display in the bottom duplicate. Even if I select the top duplicate when saving, it'll only display in the bottom one.

The weird problem had a weird solution. I turned the phone off and turned it on again, and the problem was gone.
I can't give any reason as to why the problem occurred and why it got solved. Might be a bug.

On a side note, I look silly here, not doing a turn-off-on at the first place. But why all that happened?!

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
What's causing battery drainage by "Google Services" while packet data is switched on in a 3G dead zone?
Here's a picture of my Samsung Galaxy S2 battery usage page. Around the point where the battery usage started diving, I had added a calendar remainder, sent an email (to a new contact) and browsed facebook (using their app) and twitter (using the web browser).
I've done all of these things many times before. What could have caused the sudden drain, and how can I stop it happening again when I'm not near a charger? (Updated question after picture.)

UPDATE
I've done some experimentation and made some observations. My workplace is in a 3G dead zone, but has 2G thanks to a repeater box someone has installed nearby.
For the past three months, I have left the phone with 'Sync' and 'Packet Data' switched on all the time. When at work inside the 3G dead zone, I sometimes switch on wifi. Before this incident, I've had no problems at all with battery power, despite leaving Sync on all the time.
After posting the original revision of this question, I charged the phone up while it was switched off, went home and only switched it back on when I got home. I had sync and 3G data all night and the battery wasn't rapidly draining.
This morning, the only change I had made was to carry it with me into my workplace and put the phone on my desk. I didn't switch anything on or off, I only carried it to my desk. It very quickly started heating up and I noticed that battery was rapidly draining as before.
I began to suspect that the dead zone was causing the problem. To test this hypothesis, I charged the phone up and switched off wifi, sync and packet data. During the day, I switched on wifi and sync in various combinations. (Text continues after picture.)

The kink in the graph is around 20 minutes where wifi and sync were both switched off, but packet data was switched on. During those 20 minutes, the phone was heating up and the battery was draining. When I switched packet data off, normal battery use resumed.
Conclusion: Something in my phone has a bug where the battery starts draining badly while in a 3G dead zone and packet data is switched on.
Remember, this only started happening very recently. I've had this phone since January and have left both packet data and sync switched on almost continuously. I've not knowingly had any software updates recenty and the 3G data availablity of my workplace has been consistently very bad for some time.
Does please anyone know of a fix?
(Many thanks to m'colleague Duncan Large for taking the pictures and helping test the hypothesis.)

See also: http://android.stackexchange.com/q/9453/267

Have you tried rebooting your phone yet? If you're lucky, it's just some kind of rare error.

I've updated the question with the results of an experiment. Yes, I rebooted the phone many times since this issue started to no avail.

It looks like your phone tries to build a 3g connection only if packet data is enabled. After all, 2g is just fine for voice and texts. But unsuccessfully trying to create a connection when there is no network costs a lot of power.
In my experience, phones normally cope just fine with that. My theory is that the 2G signal normally contains some sort of flag that indicates whether there is also a 3G signal. The 2G repeater would incorrectly send this flag -- possibly because the tower it gets its signal from sends it too. Thus your phone wastes energy trying to connect to a signal that only exists somewhere else.
If you cannot (or don't want to) replace the repeater by a more sophisticated model, you should turn off 3G altogether while in your office. GSM phones have a setting in Wireless & networks -> Mobile networks -> Network Mode that lets you switch between WDCMA (3G) and GSM (2G). I don't know what the setting looks like on a CDMA phone.
You can probably automate this with Tasker if you do want to use 3G where it is possible. Alternatively you could use a widget to change the setting manually without having to go to the settings menu. One app that provides a widget for this is Widgetsoid.

Also happened on my Samsung Infuse. It took me awhile to realize what the problem was. And also as you stated it never used to do it, only about the time the warranty expired. But yeah disabling my data while at work (which is a low signal 3g zone) fixed the problem.

I had same problem and fixed this way:
Go to Google sync and activate, then download an app named "DS battery saver."
Since then, my Google services no longer consume battery as it did. I think it's because it couldn't go into sleep mode. This app allows it to go to sleep.  I've been using since then and it resolved my problems.
Before this, with my Galaxy on idle, it only lasted 12 hours or so. That is without the screen on or making phone calls.  It's an android bug has nothing to do with WiFi.  My WiFi was always off, and still it drained all my battery.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Moving whole internal storage to external SD card
My phone is an (old, trashy, crap, …) LG l65 phone with custom ROM with patches on patches on patches on…
This phone has 2 GB of internal storage, is fully rooted (along with custom recovery and ROM I said above) and current OS version is Android 5.1 (not 6 sadly).
For now I only ran
adb shell pm set-install-location 2

This command works very well, although in my case this isn't enough as installed apps make configurations right on /storage/emulated/0/.android  and data folder. And are bigger than apps itself.
I tried to run
mv /storage/emulated/0/ /storage/sdcard1/internal/ && ln -s /storage/sdcard1/internal/ /storage/emulated/0/

but the command failed on the first subcommand (mv) exactly like here: Can't move folder in Android terminal and heard it won't link between devices anyway.
Is it possible to move internal to external or do I need to suffer with non-updated apps, blocked SMS and new downloads?

Have you tried a cp with a subsequent rm as indicated in https://stackoverflow.com/a/40719757/25234 ?

been there already but the worst part is linking so any app which will try to make file in /storage/emulated/0/.android will be redirected to /storage/sdcard/files/.android or so…

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Random Webpages Opening on Samsung Phone after Google App Opened
Whenever my Dad opens the Google app after his Samsung phone being off, a random website opens in Chrome through a floating window.
I have two separate text files taken right after from the "dumpsys activity activities" command, but I can't seem  to find what app is actually opening it.
What would I need to look for in the files and is there anything else I can do to try and find the bad app? If anyone wants, I could upload the files somewhere and attach them here.
I have attached the output through Google Docs if anyone wants to look at it.

You could include the contents of one of the files.  Or at least the beginning portion

There are a few suggestions.

Install and run ADB to look into it
Uninstall 5 or 10 apps at a  time, reboot and test. Once you have the nasty batch, check one at a  time. I am sure he wont have more than 50 odd apps, it wont take that long.
Change the default browser.  If it still opens Chrome, then it is likely to be a system app

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Media Skip back/forward via USB keyboard keys
I have an Android 14 phone (Samsung Galaxy A15). I want to control media playback with a USB keyboard connected to my phone. The keyboard does not have dedicated "media playback" buttons.
Is there an app (or setting) that lets me do that?
I tried the app Button Mapper (by flar2) and it works for play/pause, but not for skipping back/forward.
Note that the media app I want to control is this one:
Music Player & MP3 Player by InShot Inc.


text:
Unable to mount Galaxy S2 on Debian Squeeze laptop as storage device
I am trying to mount my Galaxy S2 on Debian Squeeze laptop. I turned off USB debugging and then in:
"Wireless & Networks" → "USB Utilities" → "Connect storage to PC"

it asks me to connect a USB cable, as soon as I connect the USB cable the pop goes away and my phone starts charging but I don't see my phone mounted in my laptop.
I did lsusb and don't see any Samsung device connected. Then I decided to turn on USB debugging and did lsusb again but no luck. What could be wrong?

This comment helped me, though I also had to create a udev rule https://android.stackexchange.com/a/5067/11156, the udev rule is given below, please note that kumar is my username on my box.
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8",
ATTRS{idProduct}=="6640", MODE="0660", OWNER="kumar",
GROUP="plugdev", SYMLINK+="android%n"
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"

If this solution solved your issue, consider accepting the answer to have the question answered.


text:
Can I Bluetooth tether my Android to iPhone?
I am very confused atm. My iPhone 4 says it has Internet Tethering (Settings > General > Network > Internet Tethering > On) via Bluetooth (Settings > General > Bluetooth > On).

Does this mean I can share my data plan with my Android phone? (A Dell Streak.)
When I activate Bluetooth on my Android phone (Settings > Wireless & Network settings > Bluetooth > turn on > Bluetooth Settings > Discoverable > turn on) I can both iPhone and Streak to see each other; I get the dialog saying "confirm that number xx appears on the other device's screen" and press the button to confirm that; but that's it. From then on both devices say:

Paired but not connected.

What else do I need to do?

While researching for a solution, I found that a lot of posts I see on the Mac forums say that your provider (currently Virgin Australia) must support tethering. Does that cover this use? How do I know if my supplier is stopping tethering from working?
If relevant my Android version is 2.2.

You won't be able to use BT-DUN on the streak unless there is something custom built into the UI.  My Archos 70 has a setting baked into Android for Bluetooth Tethering specifically.  Without that or some app to enable it, the Streak won't know where to get the internet connection from, even if the devices are connected.  Don't bother with PDANet because it only works when you are going the other way, sharing your Android internet connection with another device.
Another option, would be to put MyWi on your iPhone and make it a wireless access point, then you can connect to it via your wifi connection.  There is one problem: the MyWi creates an adhoc connection and Android doesn't recognize adhoc.  You can get around this by editing your wpa_supplicant file but you need to be rooted to do this.  Here are the instructions to do this: http://android.modaco.com/content/dell-streak-streak-modaco-com/316049/ad-hoc-network-connection-for-streak/

This sounds like something I need to root my device for right?

How about this - I am only using the data connection on my iPhone until my new account activates on the Dell Streak (with Optus directly). Is it easier to set up the Dell Streak (as a WiFi hot-spot?) so that the iPhone can use its data plan?

Good question.  I'm not sure.  I don't know if the Streak supports the native hotspot capability of Froyo (even if it does you'll probably have to pay your carrier extra).  Otherwise, you'll probably still need to root your Streak to use an app like Wifi Tether or Barnacle. Those, like MyWi, create an adhoc hotspot. Do some googling and find out if the iPhone can connect to an adhoc connection.  I believe it can, but I'm not sure.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/2.5/


text:
Can I remove MicroSD card with my Android phone turned on?
On my Samsung Galaxy 551 I can remove the MicroSD card without needing to remove the battery and consequently turn off my cellphone. Should I remove my SD without turning off the phone? Will I damage something if I do it?

You should first dismount the card.  You can do this via Settings -> SD card and phone storage -> Unmount SD card.  You can certainly corrupt data and cause application crashes if you don't do this first.

Yes you will be able to remove the SD Card as Mathew said in his answer. First you need to Unmount SD Card from Settings and then remove the SD Card. In this case no need to remove the Battery or SIM card.
But there are some things that you need to take care of.
1. If you have moved any of the applications to SD Card then you cannot access them without SD Card.
2. Make sure that you are not accessing any of the applications that are installed on SD Card.
After removing the SD Card you can see a status message saying "SD Card removed" in the notification bar of the phone.
You might need to restart your phone after inserting the same SD card back to the phone. Some of the applications might not work. I am sure this happens on 2.1 Eclair devices.


text:
How can I copy files onto an SD card with a Honeycomb tablet?
It seems like copying a file onto the SD card ought to be easy, but for the life of me I can't figure out how to do it. I have an (International) Motorola Xoom Wifi running stock Moto Android 3.2.
If I insert an SD card with content on it, I can see the contents of the card show up in the tablet's Gallery app. I can also go into the built-in Files app and browse the contents of the SD card. Using the Files app I can select files and copy them from the SD card to the internal storage.
However when I browse the tablet's internal storage with the Files app and select and Copy a file, if I then navigate to the SD card the Paste Here option is grayed out.
Using File Manager HD, I can't even find the SD card. It looks (from the Files app) like the SD card is at /mnt/external1/ but I can't see any way to get there. Is there something I'm missing in File Manager HD to find the SD card, or is there a deficiency in File Manager HD that another file manager could solve?
Also strangely I can delete files from the SD card using the gallery app, but not using the Files file manager app!

Which filesystem is on the SD card?

@flow (unlike earlier today) I'm now home with a proper laptop available which says the card is FAT32

Well that's strange timing!
Just received an update notification on the tablet, installed the update and suddenly I can copy files to the SD card, delete files from the SD Card and create folders on the SD Card with no problem! This was using the built-in Files app.
It's still saying my Android Version is 3.2, but the build number has updated to H.6.6-23, so can only assume this is an update to the drivers or Motorola's software rather than the OS itself.
Found a thread on the Xoom Owner's forum mentioning it Another UK update?

I just received another update to my UK wi-fi xoom. I already had the
  original 3.2 update.
I didn't really catch the update number, but the release notes
  appeared looked to be the same as the previous big update.
It was very small (only 1 or 2 k!).
I could only really think of one reason this might have been sent out,
  so tried copying from the internal memory to /mnt/external1 (a 32 Gb
  sd card) and it worked!

So it looks like this was probably a fault that they've pushed out a fix for, rather than any design problem.

Getting to your external in File Manager HD is...not very obvious. The only way I'm aware of to get to it is to hit the Home button at the top right on the action bar (not the Android OS button in the bottom left) and then hit Up. This should put you at /mnt, so you can get to the external at /mnt/external1. The "Storage" shortcut on the left pane also takes me there, but I don't think it's always operated like that in the past. I might be mis-remembering there, though. If "Storage" takes you to /mnt/sdcard then you can hit "Up" from there to get back to /mnt.
As for copying, the external card was originally read-only by default. Now it seems to exist in some kind of weird limbo (at least for me) and I'm not entirely sure how the permissions are designed. File Manager HD shows its permissions as dr- (that is, read-only directory) but it lets me paste files there anyway. Nonetheless, if you're rooted you can use something like MicroSD Mounter as an easy way to remount it RW (it works fine for me).
I should probably also note that the above is on Android 3.2.2, after getting Verizon's LTE upgrade. The permissions may still be read-only for Xooms in other regions, but I'm not sure. Mine could also just be read/write because I'm using a custom kernel and boot image (don't remember if it was in there).

Wow never would've thought to press Up when I'm already at what looks like the top level. So now I can browse to /mnt/external1 but FMHD won't let me edit anything either?

@GAThrawn: Yeah, it's probably still mounting read-only by default. I don't think you can modify the contents of the external card via your Xoom without rooting and remounting it read/write. I have no idea why Moto designed it that way.

@elder Well that's annoying, and is a point against this as a laptop replacement. I know ICS has further changes to the way internal/external storage work, wonder if it makes SD card file management a bit saner for cases like this where I just want to sort photos on the card?


text:
What options exist when the vendor does not supply an ADB driver for an Android device?
I bought an Android phone and the vendor does not offer any drivers whatsoever. The Android SDK and the drivers that come with it don't seem to work with the device, but the device itself reports as Android 2.2.1.
Other users have reported that the drivers of the Nook Color worked for them, but I cannot confirm this, after trying.
What options do I have to connect to the device (and ultimately to root it)?
Is it truly just the .inf file that I need to manipulate in order to make the device ID known to Windows? After all there are tools to figure out those strings while the device is connected (although "unknown") ...
The model in question is a Simvalley SP-60 GPS.
Note:
The OS I need drivers for is either Windows 7 x64 or, if anyone has successfully done that, Windows XP 32bit (under VMware with the USB device connected to it).

I would try editing extras\google\usb_driver\android_winusb.inf in the Android SDK so that it recognizes your device.
The file should have a section like this that you can extend:
[Google.NTamd64]
; HTC Dream
%SingleAdbInterface%        = USB_Install, USB\VID_0BB4&PID_0C01
%CompositeAdbInterface%     = USB_Install, USB\VID_0BB4&PID_0C02&MI_01
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0FFF

If you go into the Windows Device Manager and view the properties for your device, you should see the ID you need.  For example, my Vibrant says USB\VID_04E8&PID_681C under Device IDs and has 3 entries with that and &MI_00, &MI_02, and &MI_03 appended under Bus Relations.  I would therefore add this to the .inf file:
; Samsung Vibrant
%SingleAdbInterface%        = USB_Install, USB\VID_04E8&PID_681C
%CompositeAdbInterface%     = USB_Install, USB\VID_04E8&PID_681C&MI_00
%CompositeAdbInterface%     = USB_Install, USB\VID_04E8&PID_681C&MI_02
%CompositeAdbInterface%     = USB_Install, USB\VID_04E8&PID_681C&MI_03

You should also reboot into the bootloader, recovery mode, etc. and see if that provides more IDs.  I know my Vibrant installs new drivers the first time it's connected in each mode, so likely there are more entries needed.
Then just update the driver and select this .inf file.  It will probably give you an error about Driver Signature Verification. Depending on your version of Windows there are different ways to temporarily disable that; here is a good guide for Windows 8 and 10. Once it's disabled, install the .inf file and you should be good to go.
I think once you've done that then the USB Mass Storage drivers and so on will be auto-installed when you mount the device to the PC, but if not you could probably extend this process for that.

Recently, Koush (the person behind clockworkmod) has deleveloped a UniversalADBDriver for Windows, which can be downloaded e.g. here. Read more e.g. in the AndroidPolice article A Universal ADB Driver For Windows That Actually Works on 8 and check ADBDriver.Com as an alternative source. See also Koush's original G+ post on this. Quoting:

For whatever reason, every phone manufacturer has their own adb driver, so I end up installing like 3-4 different drivers when I do my testing. It's a royal pain in the ass, and is also asking a lot of the end user of one of my apps to do this.
This driver should work on all Android phones for all versions of Windows. [1] It does not require that you turn on test signing or disable driver verification or even reboot. This is done by automatically installing ClockworkMod as a trusted certificate and publisher into the local machine's certificate store during the setup process.
[1] On Windows 8, after downloading, choose "More Info" then "Run anyway".

So if you don't want to play with source/configuration files yourself, you might want to give this a try.


text:
Can a developer with an app in the market also distribute to un-registered (rooted) devices?
I'm looking to root a tablet device, to limit access to certain settings, and to remove the ability to get to the Market (long story).
However, I do want to get some apps that are available on the Android Market onto the device.  Is there any restrictions to app developers selling their apps in the market to also distribute their applications outside of the market.
Links to good references get bonus points.
Thanks!

I don't think there's anywhere to cite where Google has said that putting your app on the market is not exclusive, but I'm sure it's allowed, since there are a lot of different alternatives to the Market and you can even download versions of apps available on the market through other means. In certain cases, like Tasker, getting it directly (not through the market) is even encouraged by the author.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/2.5/


text:
How do I protect my phone from malicious apps once it is rooted?
I rooted my phone.
Now if I use a Terminal Emulator such as Android Terminal Emulator, I noticed that I can can easily obtain root access without a password:
$ id
uid=10059(app_59) gid=10059(app_59) groups=1015(sdcard_rw),3003(inet)
$ su
# id
uid=0(root) guid=0(root) groups=0(root)

In the Unix server and desktop world, a superuser account with no password is considered dangerous because the superuser account has access to all resources on the machine.
Is this similarly dangerous on an Android phone? If so, how can I protect my phone from malicious apps which try to gain root? Can I manage which apps have access to the superuser account on this phone?

There's a similar question which covers some of this: Security risks of rooting your android smartphone. However, since it doesn't really explain how you manage access to the root user, I'll expand on that here.
When you root your device, you basically always (technically I suppose you don't have to, but you should) install the Superuser application along with the su binary. Superuser's sole purpose is to manage which applications are permitted to elevate to root and which are not. The default behavior is that Superuser will prompt you whenever a new app tries to execute a call to su, and you can then allow or deny it using the prompt. It can save your decisions so that you won't get prompted more than once for the same app, but you can erase this saved data from the Superuser settings page. It also provides a log viewer which keeps track of when su is accessed and by which applications.
Now, the tricky part is that many of the newer malicious apps will actually perform an exploit to gain root access rather than simply trying to make a call to su. There's really not much you can do about these aside from being careful about what you install and where you install apps from since they aren't even using su to begin with. However - to directly answer your question - apps which require legitimate root access can be easily managed by Superuser as explained above.
If you are rooted but don't already have Superuser then you should be able to simply install it from the Market, I believe.

SuperUser is your "gateway" for rooted apps to get root access. I highly recommend that you install it.  It also comes with most ROMs, e.g., CyanogenMod

Great! I run Superuser, and it's good to get the confirmation that this is the right thing to do. In Unix terms, 'Superuser' is a bit like controlling superuser access via sudo and /etc/sudoers.


text:
Disable notifications per app and time frame
I would like to know if there's any app or any Tasker plugin that would allow me to block notifications on the weekends.
I got two email accounts, one personal with the Gmail app and the other work-related with the Inbox app. I receive like eighty emails on the last one per day (even on weekends), I would like to automatically block the Inbox app notifications from Friday night to Monday morning. Right now I do this by hand every weekend (and sometimes I forget to enable them again on Monday).
I found plenty of answers on how to block notifications per app, but not per time frame.
(If it matters, the phone is a non-rooted Samsung Galaxy S6)

In Lollipop, you can't block notifications without root access, adb, or through Settings app. For rooted Android, Notifications Off would easily work. If not, appops command can be used.

In the Samsung s6 with lollipop sure you can. Just long press the notification, press info and then change block notifications to on.

As I said, you can't block notifications without root access, adb, or through Settings app. That long press opens the app's page through Settings app!

Anyway, please read the question, i don't need that, i need to block it by time frame.

I understand the question well. Time frame is just a trigger, a context here. It cannot do anything on its own. There is no point in arguing over a trigger since you can't achieve what you want without root access, adb, or through Settings app

Please, add your explanation as an answer and I'll mark it off there's no other valid answer in a couple of days.

In Settings open Notifications (under Device heading) ➡ Do not disturb ➡ Automatic rules ➡ + Add rule ➡ Type [Rule name], select [Time rule] or [Event rule], select OK ➡ select options for the new rule: Days, Filter notifications. Start time, End time, Do not disturb type.

The setting is found in different locations depending on the phone manufacturer and is sometimes not available depending on the model of phone.

My Filter notifications screen is loaded with notifications I've blocked in the past. It's a nonsensical, unordered list with specific notifications that have the full app name "com.organisation.whatsapp" etc. I think this is from a time when this screen functioned differently. Or maybe I used it incorrectly in the first place. Is there a way to clear all of them again and start over?

Hm, it seems I do not have the "Filter notifications" option for a rule on a FP2 running a nearly stock Android 6. Anyone know if this screen was introduced in a later Android version?

I can't see any 'filter notifications' running Android 8 (Android One version). Can anyone confirm that it still exists?

This can be done quite easily via Tasker but requires root.

Create a profile using the 'Day' and 'Time' triggers

Create a task which turns off notifications for XXX app via Secure Settings
(Create Task, go to Plugin, Secure Settings, Root actions, Package notifications, select app, toggle)

Set the profile to trigger the task.

I have rooted phone (Nexus 5X), did exacly what it says and I'm still getting notifications. Any idea why?

I prefer the method SoccerPhreak has posted, it does not require root and has enough options for me to be happy I will get notified of the things I need to know about and for the less important things I can safely ignore them.

This option seems to work fine for me. It might be interesting to note that this controls the normal Android "Block notifications" option (which can be reached through (on Android 6) Settings -> Sound & Notification -> App Notificiations, or by longpressing a notification and pressing the info icon). AFAICS this means that all notifications from that app are suppressed (not just the sound, which is what I was hoping for originally).

I have had the same problem for quite some time. I have just developed an app that allows you to cancel notifications from specific applications on the day and time you want. Also, you can set a notification title and/or content, so only notifications of selected app with that title or content will be cancelled.
For example, you could cancel WhatsApp/Telegram notifications from chat group called "Work", between 7pm and 10am during weekdays, and whole weekends.
Here is the app: Disconnect

I use IFTTT to put my phone in Do not Disturb (DnD) mode based on date and time. Then set exclusions from DnD on the apps I want to get notifications on during that time frame. It will suppress all notifications based on time but let through the excluded apps.

Which IFTTT applet do you use to control 'do not disturb'?

I use this app called Notification Blocker from the Play Store, it is perfect. The only thing is it will only allow you to block during a specified time frame and not by days of the week. You could always try and set up two rules though, one for the weekday and one for the weekends.


text:
What is this "4 white bubbles with a red dot" notification icon?
I see this in my notification bar, but I have no idea what it is

Scrolling down my notification bar doesn't show what it is, and my notification log doesn't show it either.
What is this?

It's Google Assistant. See this


text:
Proximity sensor issue on receiving telephone call
This is related to an issue with Android custom ROMs on the legacy device the LG G4, since the move to A12 and A13. This doesn't occur on any version below A12.
I need your help with debugging the black screen issue on telephone calls in A13 on the LG G4.
As soon as we accept a telephone call, the screen goes black, and the only way to interact with the phone is via the power button.
There is some issue with the proximity sensor on this device since A12+.
However, any testing app I have used states that the proximity sensor is detected and works correctly but no ROM seems to make use of it.
We have been doing a lot of testing to help try and find a root cause.
We noticed that if the headset is plugged in, the black screen issue doesn't occur. This behaviour is explained in ProximitySensor.java:

Proximity wake lock will be released if any of the following conditions are true: the audio  is routed through bluetooth, a wired headset, or the speaker; the user requested, received a request for, or is in a video call; or the phone is horizontal while in a call.

We took some logs of phone calls, and I noticed, when filtering on proximity in the logs, we have two different situations:

telephone call with headphones (log filtered by proximity)
=> screenOnImmediately: true

telephone call No headphones (log filtered by proximity and PID of dialer)
=> screenOnImmediately: false

I think we need to debug the code to find out why the proximity sensor doesn't reply correctly, or isn't queried correctly.
I think the important parameter is PROXIMITY_SCREEN_OFF_WAKE_LOCK. See ProximitySensor.java, line 69
and ProximitySensor.java, line 198.
I see references to the parameter PROXIMITY_SCREEN_OFF_WAKE_LOCK in frameworks_base and frameworks_native.

Normally you debug problems by modifying the code, e.g. disabling certain sections or add additional logging vode for getting the state of certain values. If you can not or don't want to decompile a custom version using a trace tool like frida-trace and frida may be an option. It requires a rooted device and allows to hook method calls if arbitrary apps and modify the function arguments and return values at runtime. In the end it is a bit like Xposed just way easier and faster to use which makes it perfect for testing and modifying app behavior.

Hi Robert. I actually do build custom ROMs, so no issue to add debug flags to the source code and recompile. I was hoping someone could guide me on where I should put the debug flags to find out why the variable "screenOnImmediately" is set to false when there is no headset (earphones or BT) attached.

Bump. Anyone can guide me as to where I can set the debug flags ?


text:
Resize /data on stock recovery
I'm on the BL6000Pro (with Magisk) which has no custom recovery (like TWRP) that I know of.
I run CAOS11 on it but the /system partition is already full while the /data partition is huge and empty.
I'd like to shrink /data and expand /system.
However, all solutions to shrinking /data require a custom recovery to manipulate the unmounted /data partition.
I can manipulate /system via fastboot resize-logical-partition system {{size}} but not /data because /data is not a logical partition.
In the stock recovery I have no adb access (adb devices says "unauthorized") while I have adb access in the ROM.
Question:
Is there a way to shrink /data without a custom recovery?
I think this question applies generically to any device that has no custom recovery and might therefore be of (somewhat) larger value to the community.
Edit:
Here's an excerpt from fastboot getvar all
(bootloader) partition-size:userdata:0x3A05FF8000
(bootloader) partition-size:sdc:0x3B96000000
(bootloader) partition-size:misc:0x80000
(bootloader) partition-size:boot:0x2000000
(bootloader) partition-size:super:0x140000000
(bootloader) partition-size:metadata:0x2000000
(bootloader) partition-size:vendor:0x29817000
(bootloader) partition-size:system:0x100000000
(bootloader) super-partition-name:super
(bootloader) is-logical:para:no
(bootloader) is-logical:userdata:no
(bootloader) is-logical:sdc:no
(bootloader) is-logical:misc:no
(bootloader) is-logical:boot:no
(bootloader) is-logical:super:no
(bootloader) is-logical:metadata:no
(bootloader) is-logical:vendor:yes
(bootloader) is-logical:system:yes

"you can delete some non-essential dynamic partitions, such as the product partition" (search for lpmake) what is 'fastboot getvar partition-size:super' total size, do you really think it's necessary to shrink userdata partition?

@alecxs Thanks for the response. I added the excerpt to the question.
I already deleted product to fit in the CAOS11 /system.
I already increased /systembut only marginally via fastbootd, I don't see another way to increasing /systembut I'd be grateful for any suggestions.

your super partition is almost full, without custom recovery or root you can increase system 359 MB only

@alecxs I managed to create a full backup via mtkclient.
I'm not sure what to do next. My only idea is to edit the scatter file (increase partition_sizeof super, also reduce the size of userdata) and flash the super partition again via SP Flash. Is that allowed? Also I'm not sure what to do with pgpt and sgpt. I'd greatly appreciate your advice.

Hi, sounds like a plan. you should be able to modify pgpt+sgpt files on pc with partitioning tool

try something like parted pgpt.bin unit B print on linux PC. here is a example usage for parted

just to clarify: by edit scatter you mean calculate new size + new offset for all partitions in line of course. + pgpt must edited too, both steps are required in combination (write new partitions in new scatter + write new pgpt) imho

here is how to (not) restore pgpt https://forum.xda-developers.com/t/4536929


text:
Hide photos & videos from the gallery
no matter what is stored on the Android operating system as long as there is no root rights needed to view this photo / video file stores in my case Amazon photos.
All photos & videos of the file system in your app or the pictures are released. But I do not want my photos and videos I automatically enter the gallery in another place like downloads / documents.
Unfortunately, I always have to go manually in the Amazon Photos app and hide the pictures that do not come from the camera which time unnecessarily wasted.

EDIT: After the hint of the community bot in the comments, I'll try to make the question simpler.
No matter where I save photos and videos on my device, for example in the music folder or in the documents folder, they end up in my photo gallery.
But I don't want them to get into my gallery because the pictures are in the documents folder and not in the camera folder.  What exactly can i do now?

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.

you can try putting the pictures or videos you don't want in the Gallery in your "Secure Folder"'s Gallery.
If you don't know, there is an app called Secure Folder and you can access several apps, including the Gallery app, and so the Secure Folder acts as like a private room with an additional body guard /  password required to enter.
You can move all pictures and videos in your Gallery to your Secure Folder Gallery by going to a specific pic/video, pressing the 3 vertical dots that appear in the lower right corner, and then tapping Move to Secure Folder, they will then disappear from the Gallery

Secure Folder is specific to Samsung.  Although there may be similar apps on other makes of phone.


text:
Encrypt SD Card
I am new to Android because I was an iOS user before and the first thing I came across on the way is that with Android it is possible to expand the memory via an SD card.
The disadvantage, however, is that the merged memory encrypts the data, but the data is unusable if it is defective.  The other method is not to use the SD card as a shared volume but as a separate data carrier.  The problem, however, is that in the event of theft, data such as application documents etc. is read in.
Is it possible in any way to encrypt the data on the external SD card so that the data can still be read by entering the password and on multiple devices.
You couldn't encrypt the SD card on a computer and activate it on the Android device with a password.  Or the Android device itself can offer encryption options.  For example, there is a virtual volume like macOS introduced with hdiutil to create UDIFs so that the disk image could be read when the password was entered and it worked like a real virtual encrypted disk.
I hope you can roughly understand what I'm getting at, ihow to encrypt the data and to be able to access everyone again when the password is entered, on all devices.
What next?
Warm greetings

Decrypting microSD card on another Android device or desktop computer

Cross-platform compatible encryption of SD-card for Android

@Irfan Latif  Sorry, but your contributions are written in such a complicated way that only someone with prior knowledge can understand it.  There is no example or something similar given, only several suggested CLI programs that you have to deal with very intensively.  Isn't there a way, as it is not risky, to write an encrypted virtual volume on the SD card?


text:
How can I simultaneously use mobile data and WiFi?
Through a combination of Afwall/Netguard and Automate/Tasker, I'd like to use both my mobile data and WiF at the same time.
For example, I'd like for some live/realtime widgets on the homescreen to use WiFi, but at the same time I'd like the browser session I'm on to be using mobile data.
The current setup I have is this - if Chrome is on the foreground then turn of WiFi and use mobile data. When it's not in the foreground use mobile data.
But the problem with this is that it's slow. It will take a sec or two to turn off mobile data and switch on WiFi and wait for it to connect, and vise versa. If they are both on though, it wouldn't be this slow.
Any tips?
Android 7 | Rooted 1 | Xposed

On most devices, in Developer Options, there's an option called "Cellular data always active" (for fast network switching).

"(for fast network switching)" Doesn't that mean it's either or...only faster switching between them? Can I have one app use data and another use WiFi at the same time (let's say split screen working on both apps simultaneously).

Hmm, I guess I misunderstood the intent. Perhaps the answer to a similar situation might help, though it might not be that easy.

The question has been already asked many times e.g. here: https://android.stackexchange.com/q/242307/218526

@Irfan Latif I searched, extensively, b4 posting. The only useful one I was able to find was yur linked "example". Idk, maybe others are better searchers. I saw that u also commented with the same comment on the question you linked, saying that they needed to be rooted & with a link to another question. And in that question u commented to "inject manual rules" %, as well as needing to be rooted. Perhaps u can expound a little more in my question with some more knowledge on how to do this. If anything at least this would then be the go-to reference in the future for ppl looking to do the same.

Firstly, if you did a search before posting the question, it's a better idea to add links in the question so that responders don't send you back to the same links, and mods don't close your question as a duplicate. // Secondly, good answers to such questions don't exist because the solutions are out of the scope of an ordinary user. If you've a rooted device and some prior knowledge of Linux/Android network routing, my hints are enough to reach a working solution. In other case, spending an hour or so in writing an answer that a big majority of the visitors find useless, is a wastage of time.

@Irfan Latif Thanks for your contribution.


text:
How can I unlock a carrier locked Android phone?
Is there a way to unlock a Samsung phone locked to a carrier without contacting the carrier for its unlock code?

How does carrier/network lock work? How is it implemented?

thanks for sharing that! so does that mean flashing an unlocked firmware won’t work?

Bootloader unlock/custom firmware has no effect on a carrier/SIM lock.


text:
Unable to delete eSIM profile on Google Pixel 3a
I have recently changed phone carriers. I cannot download an eSIM for my new carrier while it is supposed to be compatible with the Pixel 3a. They claim this is because I still have the eSIM profile from my previous carrier. For some reason, I cannot erase this old eSIM profile manually. I get the following error message: “Can't erase SIM. This SIM can't be erased due to an error. Restart your device and try again.” Of course, I still can't erase the eSIM when I restart the phone.
I have contacted both carriers, as well as Google. They had me reset Wi-Fi, mobile & Bluetooth which didn't work. The next step they advise is a factory reset. I'd like to find another way to erase this faulty eSIM profile and I'm not completely sure that a factory reset would be “strong enough” actually.
Has anyone ever encountered a similar problem or knows a way to force the deletion of the old eSIM profile?
Edit: as Robert suggested I have checked the device log. Here is the result:
12-25 19:36:01.101  2463  2463 I Showing dialog with title = %s: Effacer ce profil SIM téléchargé ?
12-25 19:36:01.145  1770  1921 I ActivityTaskManager: Displayed com.android.settings/.network.telephony.DeleteEuiccSubscriptionDialogActivity: +122ms
12-25 19:36:01.200  2463  2463 W Choreographer: Frame time is 0.220733 ms in the future!  Check that graphics HAL is generating vsync timestamps using the correct timebase.
12-25 19:36:01.200  2247  2247 W Choreographer: Frame time is 0.220733 ms in the future!  Check that graphics HAL is generating vsync timestamps using the correct timebase.
12-25 19:36:01.560  1770  3866 I WifiService: startScan uid=1000
12-25 19:36:01.577  1770  3866 I WifiService: startScan uid=1000
12-25 19:36:02.188  2463  2463 I DeleteEuiccSubscriptionDialogActivity: Subscription deletion confirmed
12-25 19:36:02.188  2463  2463 V SidecarFragment: SidecarFragment.setState(): Sidecar Class: com.android.settings.network.telephony.DeleteEuiccSubscriptionSidecar, State: State.RUNNING, Substate.UNUSED
12-25 19:36:02.189  2463  2463 I DeleteEuiccSubscriptionSidecar: Deleting subscription ID: 3
12-25 19:36:02.192  2463  2539 D OpenGLRenderer: endAllActiveAnimators on 0x70de910f50 (RippleDrawable) with handle 0x6fee8d2fd0
12-25 19:36:02.193  2457  2941 D TelephonyProvider: Using old permission behavior for telephony provider compat
12-25 19:36:02.193  1770  3866 W InputManager-JNI: Input channel object 'd46f1bc com.android.settings/com.android.settings.network.telephony.DeleteEuiccSubscriptionDialogActivity (client)' was disposed without first being removed with the input manager!
12-25 19:36:02.210  2662  2662 I EuiccGoogle: [2] EuiccServiceImpl.onCreate: onCreate DSDS mode: simCardState is 0
12-25 19:36:02.217  2662 10194 I EuiccGoogle: [67] EuiccServiceImpl.onDeleteSubscription: onDeleteSubscription: delete slotId = -1, iccId = 89330120209449770550
12-25 19:36:02.218  2662 10194 I EuiccGoogle: [67] EuiccServiceImpl.lockWriteLock: Successfully grant SIM state write lock
12-25 19:36:02.218  2662 10194 I EuiccGoogle: [67] EuiccServiceImpl.ensureSlotIsEuiccAndActive: ensureSlotIsEuiccAndActive: slotId = -1, forceDeactivateSim = true
12-25 19:36:02.221  2662 10194 I EuiccGoogle: [67] EuiccServiceImpl.ensureSlotIsEuiccAndActive: Passed in slotId=-1; euiccIsActive=false; targetSlotIsRemovable=false; forceDeactivateSim=true.
12-25 19:36:02.221  2662 10194 E EuiccGoogle: [67] EuiccServiceImpl.ensureSlotIsEuiccAndActive: Multiple active slots supported, but slotId -1 is not active
12-25 19:36:02.221  2662 10194 E EuiccGoogle: com.google.android.flib.log.WhatATerribleException
12-25 19:36:02.221  2662 10194 E EuiccGoogle:   at com.google.android.flib.log.Blog.wtf(Blog.java:157)
12-25 19:36:02.221  2662 10194 E EuiccGoogle:   at com.google.android.euicc.logging.EuiccGoogleLog.wtf(EuiccGoogleLog.java:20)
12-25 19:36:02.221  2662 10194 E EuiccGoogle:   at com.android.euicc.service.EuiccServiceImpl.ensureSlotIsEuiccAndActive(EuiccServiceImpl.java:3747)
12-25 19:36:02.221  2662 10194 E EuiccGoogle:   at com.android.euicc.service.EuiccServiceImpl.onDeleteSubscriptionInternal(EuiccServiceImpl.java:1676)
12-25 19:36:02.221  2662 10194 E EuiccGoogle:   at com.android.euicc.service.EuiccServiceImpl.onDeleteSubscription(EuiccServiceImpl.java:1640)
12-25 19:36:02.221  2662 10194 E EuiccGoogle:   at android.service.euicc.EuiccService$IEuiccServiceWrapper$9.run(EuiccService.java:815)
12-25 19:36:02.221  2662 10194 E EuiccGoogle:   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
12-25 19:36:02.221  2662 10194 E EuiccGoogle:   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
12-25 19:36:02.221  2662 10194 E EuiccGoogle:   at java.lang.Thread.run(Thread.java:920)
12-25 19:36:02.229  1770 10195 I DropBoxManagerService: add tag=system_app_wtf isTagEnabled=true flags=0x2
12-25 19:36:02.229  2662 10194 I EuiccGoogle: [67] EuiccServiceImpl.onDeleteSubscriptionInternal: onDeleteSubscriptionInternal: slotId = -1, iccId = 89330120209449770550, ensureSlotIsEuiccAndActive = Pair{131083 false}.
12-25 19:36:02.229  1770 10195 W DropBoxManagerService: Dropping: system_app_wtf (1306 > 0 bytes)
12-25 19:36:02.229  2662 10194 I EuiccGoogle: [67] EuiccServiceImpl.onDeleteSubscriptionInternal: onDeleteSubscriptionInternal: slotCheckResult = 131083
12-25 19:36:02.230  2662 10194 I EuiccGoogle: [67] EuiccServiceImpl.unlockWriteLock: SIM state write lock is locked by the current thread. Unlock it.
12-25 19:36:02.230  2662 10194 I EuiccGoogle: [67] EuiccErrorMapper.mapErrorCode: Mapping for error code: 131083
12-25 19:36:02.231  2662 10194 I EuiccGoogle: [67] EuiccErrorMapper.mapErrorCode: Mapping error code: 131083 to: 33554432
12-25 19:36:02.231  2662 10194 I EuiccGoogle: [67] EuiccServiceImpl.onDeleteSubscription: onDeleteSubscription errorCode: 131083, mapped to: 33554432
12-25 19:36:02.242  2463  2463 I EuiccOperationSidecar: Result code : 2; detailed code : 0
12-25 19:36:02.242  2463  2463 E DeleteEuiccSubscriptionDialogActivity: Failed to delete the subscription.
12-25 19:36:02.242  2463  2463 V SidecarFragment: SidecarFragment.setState(): Sidecar Class: com.android.settings.network.telephony.DeleteEuiccSubscriptionSidecar, State: State.INIT, Substate.UNUSED
12-25 19:36:02.242  2463  2463 V SidecarFragment: SidecarFragment.setState(): Sidecar Class: com.android.settings.network.telephony.DeleteEuiccSubscriptionSidecar, State: State.INIT, Substate.UNUSED
12-25 19:36:02.246  3829  3829 I GoogleInputMethodService: GoogleInputMethodService.onFinishInput():3301
12-25 19:36:02.246  3829  3829 I GoogleInputMethodService: GoogleInputMethodService.onStartInput():1979
12-25 19:36:02.247  3829  3829 I DeviceUnlockedTag: DeviceUnlockedTag.notifyDeviceLockStatusChanged():79 Notify device unlocked.
12-25 19:36:02.909  2463  2539 D OpenGLRenderer: endAllActiveAnimators on 0x70de8e37e0 (RippleDrawable) with handle 0x6fee8db040
12-25 19:36:02.910  1770  3246 W InputManager-JNI: Input channel object '7633076 com.android.settings/com.android.settings.network.telephony.DeleteEuiccSubscriptionDialogActivity (client)' was disposed without first being removed with the input manager!
12-25 19:36:02.950  2463  2463 D NetworkSettings: onResume() subId=3
12-25 19:36:02.974  2457  2941 D TelephonyProvider: Using old permission behavior for telephony provider compat
12-25 19:36:02.999  2457  2941 D TelephonyProvider: Using old permission behavior for telephony provider compat
12-25 19:36:03.012  3829  3829 I GoogleInputMethodService: GoogleInputMethodService.onFinishInput():3301
12-25 19:36:03.013  3829  3829 I GoogleInputMethodService: GoogleInputMethodService.onStartInput():1979
12-25 19:36:03.013  3829  3829 I DeviceUnlockedTag: DeviceUnlockedTag.notifyDeviceLockStatusChanged():79 Notify device unlocked.
12-25 19:36:03.049  1770  3246 W InputManager-JNI: Input channel object 'a5961ab com.android.settings/com.android.settings.network.telephony.DeleteEuiccSubscriptionDialogActivity (client)' was disposed without first being removed with the input manager!
12-25 19:36:03.057  1770  3246 W InputManager-JNI: Input channel object '15c0fa7 com.android.settings/com.android.settings.network.telephony.DeleteEuiccSubscriptionDialogActivity (client)' was disposed without first being removed with the input manager!
12-25 19:36:03.928  1770  2180 D ConnectivityService: NetReassign [no changes]

Sorry for the log length, I can't really find where the problem is. From what I understand, it has to do with eUICC. I would bet the old carrier has messed up with permissions, but I can't be sure. Hopefully, someone may be able to identify the problem.

Enable developer options and check the device log via adb logcat while you are trying to delete the eSIM profile. Hopefully logcat will show an error message that helps you to understand what is going wrong.


text:
How to type Ctrl-C (and others) in terminal emulator
On Android 11, I tried in Terminal Emulator for Android and 'Material Emulator'. Pressing Vol Dn + c doesn't do anything.
For example, but not limited to, after
ping 8.8.8.8

I can't find any way to stop the ping (except exiting the emulator, of course). Tried all kinds of combinations. Similarly, typing
$sort
a
b
c

How do I stop input? On Linux I'd type Ctrl-D (=eof), but that doesn't work on Android.
In preferences, I have Vol Dn as definition for the Control Key
Note: Thanks for the suggestions! What I'm worried about is that in the Special Keys help item, it clearly states that Vol Dn should act as a Control key (in both terminal emulators I tried). Am I doing something wrong here?

long touch for menu, or install termux, or hackers keyboard

Many keyboards can send Ctrl events including AnySoftKeyboard.

ping command accepts the count flag "-c " to limit the no. of echo requests

@crazo7924, I knew that... The issue is (was) more generic: There are quite a few commands that take input from stdin, but then it's generally necessary to end with Ctrl-D - same problem. It's difficult to live without a real Ctrl key! Anyway, tke hackers kbd solved things. Thanks!

To close this issue:
Thanks for the suggestions:
@alecxs: The hackers keyboard works great, and as it can represent a full keyboard, it feels very familiar. On screen portrait mode it's a bit more difficult to use though.
@IrfanLatif: AnySoftKeyboard looks very promising as it's easier to use in portrait mode and has better access for foreign languages.
EDIT: I happened to return to this, and thought it would be useful to add 'Unexpected Keyboard', which I've been using for a while now.

It seems to be a bug for the recent versions  of Android, I hope the developer fix it ASAP because I really loved that terminal, but I tried this one and it worked well
TermOne Plus


text:
Android doesn’t connect to a hearing aid
I have a hearing aid which is paired to an Android phone.
When I reset the hearing aid the connection is not initiated by Android. I have to tap on the hearing aid in Android’s Connected Devices pane to trigger Android to connect to the hearing aid.
In the global settings I noticed that ble_scan_always_enable is set to 1.
I wonder if it has to do with triggering the connection?
Phone model: Pixel 3
Android version: 12

Have you paired the hearing aid again after resetting it?

No, I haven't. The bond data is not lost by reseting the hearing aid and the Android initiates the connection when the hearing aid is tapped. It does not connect without the user's interaction.

whats the hearing aid model?


text:
How do I clear Android caches via ADB (Bricked phone)?
I have used my phone and all was fine, but I wanted to reboot it and something went wrong. first it has stuck in boot loop, I waited ~10 minutes and thought it'll boot but no, then I tried enter a Recovery (twrp) and it just doesn't want to boot even in recovery. So I went to fastboot and flashed a new version of twrp, but it still won't boot. All the times when I have been stuck in a bootloop I just cleared caches via twrp and phone booted fine but now I really don`t know what I can do to rescue it and not lose my data. So maybe there is a way I can wipe caches without accessing the recovery menu? =(
If I force bootloader to load from fastboot it throws me back into a fastboot.

Poco x3 nfc (surya)
Android 12 Pixel Experience (official from their website)

so i have tried alot of recoveries ( bunch of twrps, 3 orange foxes, PE recovery) no one works, TWRP&OF just hangs on splash screens and PErecovery is just a black screen. i just have no clue what do i do. i can try flash rom from a fastboot but then i will lose all my data. that sucks

Instead of adding info using comments please edit your question instead.


text:
Why does my Samsung Galaxy S10 mobile hotspot cut out after exactly one hour?
I have an issue where if I turn on my hotspot it will automatically stop working after exactly one hour, every time. I have tested this with a stopwatch several times to confirm this is the case. It's becoming a real pain because I'm always on the go and need to tether my mobile internet to my other devices for work purposes.

I have reset my network settings.
I made sure the Turn off when no device connected for setting is on Never timeout.
The system software is fully up-to-date.

There has to be some setting or issue somewhere causing it. Has anyone else ever experienced this? I can't figure it out and would super appreciate any help. Are there any logs I can look at?
The way this issue presents itself is odd. The connected devices lose the hotspot connection entirely, however, the hotspot toggle on the Samsung phone is still set to On. If I search for the hotspot I can still find it, and when I try to reconnect it will take a little longer than usual and eventually say "Connected - No Internet". I then have to go back to the Samsung and toggle the hotspot off/on to get it working on the other devices again.
I'm using the exact same sim card I had in my Huawei 20 Pro before I upgraded to Samsung and this was never an issue on that phone. It seems unique to my Samsung.

Is this when you are still or when you are driving ?

Always when stationary working in one spot

Do you have a VPN running ?

No VPN running this end

I do have a VPN profile installed on the phone from a VPN app i have but the VPN is never switched on. But i can uninstall the VPN app and delete the VPN profile from the phone to be sure it's not that and re-test.

OK so I've just been in to see one of the people in the Samsung shop and asked the question directly. They said that a recent update in the system software has caused this. Apparently, Samsung deliberately put a one hour timeout on the hotspot because people were complaining that it was eating all their data! What the actual *#@!??

I'm finding this really difficult to believe to be true. I'm now in a queue with Samsung support so i can get an answer from a technician.

Rather than listing them one by one in the comments.  These are some of the possible causes for the hotspot to stop.

Default setup option in Samsung to timeout is after 1 hour.
VPN app running that may reset it when it reconnects to the internet.
Lock / Limitation by ISP.  ISPs in some countries are very strict about this.
WIFI interference or Out-Of-Range may also stop hotspot.
Battery Saving Mode may drop hotspot
Rate-limited mobile plan can do it too.
Connecting to a Wifi network will stop hotspot.

Thanks Rohit. I can confirm that 2-7 are not an issue on this side. I am curious about what you mean by Default setup option in Samsung to timeout is after 1 hour. Are you aware of this as being the case or rather is it a suggestion that it could be a possibility? Also I've received 3 upvotes so far for this question so I imagine others are also experiencing this. If there are any settings you think I can look at specific to point 1. please let do me know.

I have seen this on 3 different mobiles, but I believe that you have already set this to never timeout.


text:
Why is the latest Android Build ID starting with the letter A?
In the following list of "Source code tags and builds" the first entry has the build id AP1A.240305.019.A1.
https://source.android.com/docs/setup/reference/build-numbers#source-code-tags-and-builds
I find this strange, as based on the "Build ID definitions", the first letter is supposed to be the "letter of the codename of the platform release", which seemed to follow an ascending alphabetical order so far.
https://source.android.com/docs/setup/reference/build-numbers#build-ids-defined
Out of pure curiosity, does anyone have any idea as to what caused the sudden jump to A?


text:
How to make and enable a bootable MicroSD?
I was trying to root some Huawei and Samsung phones, but these do not come with the option to enable the oem unlock option, and the partitions and files are in read-only mode. So I was thinking of a workaround, but I don't know if it works or there is a way to do so.
I remember there is a live CD distribution on Linux that enables access to the system and modification or use directly, so is there a way to write an ISO/image/ROM file of a standar version of android or a custom one, to a MicroSD and boot from there to edit the attributes and permissions or even partition or format the internal space?

Related/possible duplicate: Booting Android from SD card and Can I root Android by booting from an SD card?.

bootloader can unlocked by modifying devinfo (older qualcomm) or unsamlock (older samsung) qualcomm devices can be accessed from PC via EDL mode, for exynos, hisilicon, spreadtrum rare low level access exist for some devices. sp flash tool is for mediatek only


text:
How to decrypt a recovered password on Samsung S6?
I have rooted my Samsung S6 so that I could recover wifi passwords. But the app Wifi password Recovery find an encrypted password.
Is it possible to find the original password?
If so, how can I do to see it?

Thanks for your help!

Related: Decrypting wpa_supplicant.conf on Samsung Galaxy mobiles, but doesn't have the answer to decrypt the existing pass.

Also, Retrieve WiFi password which was linked from How to recover stored wifi password?

I think the answer is NO

The PSK is generated from the WPA passphrase using hashing. Hash algorithms are one-way (you can not reverse it easily). So the only possible way is a brute-force attack by trying every possible password, generate the PDK and look if it matches. Depending on the length of the WPA passphrase the used characters and the hardware you have this can take weeks or even years. As far as I remember most Wifi devices also allow to directly use the PSK instead of the password. Not sure if this is still the case today andhow it is on Android.

So I there is no hope?


text:
Apps detecting Android on VirtualBox as jailbroken/rooted
I'm using Android in a VM, namely VirtualBox. The reason for this is that my bank forces me to use the (very badly rated) banking app SecureGo, but I have no Android or iOS device.
These things worked well:

Setting up the VM
Installing android
Installing the SecureGo app

However, SecureGo refuses to work because it says that it detected a jailbreak or rooting on my device.
Any ideas on how to fix this?
Configuration

Virtualbox 6.1
Android 8.1.0 (x86 64-bit iso from fosshub.com/Android-x86-old.html)

What "Android" have you instjalled - AndroidX86 or what other distribution did you choose?

I installed the x86 64-bit iso from https://www.fosshub.com/Android-x86-old.html

Unfortunately the error message SecureGo shows is most likely not the actual reason. Banking apps and other security sensitive apps often check their environment and if something is not as they expect from a real unrooted device they simply state that the device is rooted, no matter if this is true or not.
As your device is not a genuine Google Android device at all I don't think SecureGo will ever run on it.
Therefore the only way is to speak with your bank and ask what they provide for people without smartphone and tablet. And if they don't offer your something then you have the two choices to stay and buy a cheap Android phone or switch the bank.
If you decide to stay make sure the device you buy is not from an unknown Chinese vendor. Only consider large well known brands.

I was afraid of an answer like that. Sadly, it seems that banks in Germany are currently being forced into this kind of policy by law and the ones I checked offer this app only.

@rttpik German Banks have to provide a service fir switching the bank, so switching to a different bank is easy and there are still some banks providing a free giro bank account. SMS TAN as is also a still valid second factor and some banks that use QR-code based systems provide physical readers for a small fee (~30 euro).

Thanks @Robert. As for your first comment, is there no way to make the OS believe that it is on a real phone + make the app believe that it is on a real Android OS living on a real phone? My (layperson's) understanding has been so far that this is what VMs are all about.


text:
Cannot list all folders in /data/data in few apps
I have a rooted Android 11.
Using Termux, or Es File Explorer, I can see all the 284 directories in /data/data.
Unfortunately, many file explorer apps (with root privileges, such as Total Commander, ZArchiver) can only see 2 folders : com.google.android.gms (don't know why), and their own data folder.
I thought this was related to this, but apparently no since I granted the root privileges to both apps...
How could I see all the folders in /data/data using (for example) Total Commander?
Doing a chmod 755 in Termux? Or maybe there is a problem with these apps as if they they don't use root privileges if at least one folder/file is visible in "normal user" mode?

How do you grant root access to Total Commander / ZArchiver? It works fine Android 10

In their settings, I selected to read files/folders as root (a pop-up from Magisk asking me if I want to grant - or not - root privileges). They also have a setting "Fix SELinux Context" checked by default, but unchecking this does not seem to solve the issue.

guess it's related to mount namespaces, the apps does not handle it well. you can set to global in magisk settings for testing purposes

@alecxs thanks! Did not know about this option (I think the problem of not be able to see folders in /data/data is due to an update of magisk - changing some settings). Just tried and it works just as I wanted ! Please consider to write an answer to get more reputation ;)

To mark this question as solved.
As @alecxs said, these apps does not handle correctly mounting namespaces, and therefore we need to select in Magisk settings Mount Namespace Mode->Global Namespace instead of Inherit.

"By default Magisk inherits the calling process's mount namespace. This can be changed in Magisk Manager. If your root app always need global mount access, use --mount-master when calling su. This can be easily done in libsu by adding a flag in config." -- @topjohnwu on Twitter.


text:
How to determine the architecture (32 v. 64 bit) using only the phone
On a computer, it's pretty easy to find out if the system is 32 or 64 bit.
I have a Nokia G21 and a Huawei P10 in front of me, and both tell me the various things: the model designation of the phone, the CPU, the Android version; but nothing tells me explicitly the architecture, i.e., whether it's a 32 or 64 bit device.
Microsoft Windows, on the other hand, tells me in no uncertain terms at Settings -> System -> Info which one it is. Linux is also pretty forthcoming with this information.
Is there any means from the on-board tools of Android to find this out?
I.e., not asking the internet, not connecting to a PC and not installing any additional apps.

If you enable Developer options (usually tapping the build version in about phone enables it) on my device the first entry is about how much RAM is installed/available. If this entry shows more than 4GB then it has to be a 64 bit device.

Well, that's indirect and covers only a subset of cases, i.e., phones with more than 4 GB of RAM. If my phone reports 4 GB or less, then I am non the wiser.

On a terminal emulater app or ADB shell type uname -m.

@IrfanLatif there is a catch. OP mentioned the restraint: "not asking the internet, not connecting to a PC and not installing any additional apps". :)

@Firelord noted. But many ROMs have a terminal emulater app built-in, usually disabled in developer options. It's a basic utility for any power user, not something additional :)

@IrfanLatif Of all the devices I have ever used (up to Android 10) none of them had terminal emulator builtin on vendor provided stock ROMs. On custom ROMs, I did find terminal app in Dev options. It could be that stock ROMs for Android 11 and above come with terminal app in Dev options so I can't comment on that.

@Firelord you must be right. OEMs have a lot of their own bloatware to bundle with their devices. I had custom ROMs in mind.

This is a shot in the dark. Go into Developer options, bug report -> select "Full report" if a dialog comes up. Wait until you get a notification that bug report has been generated. Click on it to share it (save it into your file manager). Here's where things get uncertain. If the vendor provided or user installed file manager has Zip/Unzip support and text-view/text editor support than extract or view the bug report -> fs -> data -> tombstones or anr -> open any of the files in text editor. Among the first couple of lines would be "ABI".

@Firelord You deserve a medal for this insanely convoluted way to determine the sought after data. Although, I haven't test this yet; this sounds weirdly plausible.

In my mind, smartphones are crummy computers. There are 32 and 64 bit ones, but it's not straightforward to find out, what they actually are.

@DohnJoe 32/64-bit is info which the target audience (which we are not a part of) of smartphone need not to know. The device ought to perform and apps ought to work nicely on them and get the job done for the user. The way Google's Play Store works, it removes the need to know anything about the device specs to get apps -- the one thing user would be depending upon mostly.

The motivation for my question was me looking for an app outside of the PlayStore. There, the app was available for arm and arm64. So, my question isn't entirely academic.

that's trial & error with 50 % success. arm works on arm64 too. smartphone without internet and no connection to PC, how do you install the app? MicroSD card on PC? https://deviceinfohw.ru

Yes, one can google this information. However, even the specs of the manufacturer are sometimes silent on the bitiness, e.g. here: https://www.nokia.com/phones/en_int/nokia-g-21/specs?sku=719901183451

Spreadtrum T606 comes with ARMv8.2-A Instruction set (64-bit) but the ROM may built as 32-bit. It really depends on ROM

another funny method: calculate 2147483647 + 1 if the result is negative it's 32-bit signed integer echo $((2147483647+1))


text:
Is there a way to assign SIM cards to personal and work profile
I recently had a problem with merging all the data from two phones (one personal and one for work) into a corporate owned personal work profile dual-sim phone.
Here, importing the contacts for the work profile was a problem. Importing via file, transferred via the work-profile OneDrive app did not work.
So, the next attempt was to store all contacts on the SIM card of the old work phone and move the (work) SIM into the new dual-sim phone.
However, the contacts stored on the (work) SIM show up in the personal-profile contacts only.
Is there a way to associate a SIM card with a profile?
E.g. SIM1 is personal and SIM2 is work, so that the personal contacts app only shows contacts stored on SIM1?
This would also apply to SMS, e.g. handling SMS received from the work SIM by the messages app of the work-profile.

A good question. On Reddit there are a few similar questions, but all of them I have found without answer.

@Robert, I also came across the unanswered Reddit questions, that's why I decided to post my question here. I suspect, that the workings of SIM and SMS are either too basic (the Android OS can not fully take control of them) or are too basic (the OS makers simply don't care).


text:
Log-in to Microsoft 365 apps fails when on wifi only, on some phones
I am playing around with Microsoft Intune enrollment of Android phones, and I have noticed that I am partially able to use Microsoft 365 apps for Android.
I have 2 phones, that are wifi-only.

A fully managed Huawei P10 lite running Android 8
A Fairphone 2 running Android 10 with a work-profile

Both phones can connect to the internet, enrol into Microsoft Intune, install apps.
However, only the Huawei is able to log-in with the Microsoft 365 Office apps, i.e., OneDrive et al.; the Fairphone 2 fails with the error message declaring that no network connection is available.
My Google results are full of similar complaints, however, there's either no possible solution posted, or some seemingly random "tips" such as clearing the app's cache, un-installing and re-installing (an all time Microsoft-support classic), and more various and wonderful actions to take.
I have seen suggestions to change DNS settings to use e.g. the 8.8.8.8 DNS server from Google, however, our guest wifi already uses this DNS; to no avail. While all other apps connect to the internet, Microsoft'S finest 365 apps for Android are blissfully unaware of the available network.
Has anyone from this community some wisdom to share?

https://answers.microsoft.com/en-us/outlook_com/forum/all/my-phone-app-says-i-dont-have-internet-connection/88010637-227d-4f4f-bfc4-aa9ffac5c139
https://answers.microsoft.com/en-us/msoffice/forum/all/cant-login-to-microsoft-android-apps-with-wifi/52b3a6ed-8f7b-4ddb-92d8-a907b87cfd92
https://answers.microsoft.com/en-us/msoffice/forum/all/office-apps-on-android-problem-on-wifi/2e891a9f-9784-45b9-8a00-5c9513448dd3


text:
Does modifying system partition disturb Android system updates?
I want to root my device and then modify files on the system partition.
I want to enable multi user support and install busy box. But there are many other reasons why someone would want to do this.
My question is if this can disturb system updates (not app updates)?
Will a system update simply overwrite the old system image? (Reverting all my changes).
Or will the update fail?
To answer my question it would be good to know how an Android system update works.
(File based/image based. Is it delta?)

The answer is maybe unfortunately... All depends what you change, it can cause updates to fail, and if they go through and you have a patched boot image (common in rooting) and it get's over written, it might not boot after an update until the new image is patched again (you root again). It will not overwrite your system, updates are delta changes not entire images in almost every case. Basically once you root, make a system image backup and be prepared that any update could break your phone, but there is no definitive answer really. This post really belongs in Android Enthusiasts though.

why modify system? https://android.stackexchange.com/q/232388

This all depends on how your device OEM handles it. My experience with OnePlus 6 has been positive. OnePlus always detected that my system was modified and informed me that it would download complete OTA (not delta version) and install it. Because my device came with partition layout that supported seamless updates (A/B updates), system updates (which I rarely did anyway) worked out fine. "As expected" updates overwrote changes I had made to non-data partitions earlier. But I was able to update the device nonetheless.

@alecxs Your post is about removing pre-installed apps. I want to do other things like editing the build.prop file (which is located on the system partition).

same applies - magisk has resetprop applet which does it systemless-ly ;) check the system.prop file

@alecxs I have read "How to Install Magisk" and it seems I need to modify the boot and recovery image. I think then there is the same problem as when modifying the system image.

right, magisk lives in boot (or recovery for some samsung devices) but magisk used to keep backup of stock boot.img ready for OTA survival. btw having your mods in module handy makes it easier to restore

there is nothing against rooting with other solution and modify /system (even possible on dynamic partitions) just beware of avb/dm-verity on recent android versions https://android.stackexchange.com/q/217116


text:
How can I view the Android internal partition table?
I've rooted my device, put it in recovery mode, and have linked it to PC by adb shell.
How can I view the list of storage devices and partitions?
Note: fdisk doesn't work.

fdisk works if you pass it a device like fdisk -l /dev/block/mmcblk0

I believe you want: cat /proc/mtd.
Also useful: mount.

cat /proc/partitions shows a list of all the partitions too. I think mount correlates with cat /proc/mounts. Ah, good 'ol /proc

all I get is dev:    size   erasesize  name whether I run as su or not.  http://android.stackexchange.com/q/53225/693

/proc/mtd is not available on all devices, while /proc/partitions should be.

I usually use a combination of the following 4 commands and correlate them, since each of these commands gives a piece of the information that might be needed.
Summarily:

Using df lists the filesystem path alias and size info as seen below (total size, used, free and block size)

Example output:
root@ks01lte:/sdcard # df
df
Filesystem                               Size     Used     Free   Blksize
/dev                                   910.0M    92.0K   909.9M      4.0K
/firmware                               64.0M     8.7M    55.2M     16.0K
/firmware-modem                         64.0M    49.2M    14.8M     16.0K
/system                                  2.2G     2.2G    62.7M      4.0K
/data                                   11.9G     3.0G     8.9G      4.0K
/cache                                  31.5M     4.1M    27.4M      4.0K
/persist                                 7.9M     4.0M     3.8M      4.0K
/efs                                    13.8M     4.4M     9.3M      4.0K
/storage/emulated                      910.0M     0.0K   910.0M      4.0K
/storage/emulated/0                     11.9G     3.0G     8.9G      4.0K
/storage/emulated/0/Android/obb         11.9G     3.0G     8.9G      4.0K
/storage/emulated/legacy                11.9G     3.0G     8.9G      4.0K
/storage/emulated/legacy/Android/obb    11.9G     3.0G     8.9G      4.0K
/mnt/media_rw/extSdCard                 29.7G   251.8M    29.5G     32.0K
/storage/extSdCard                      29.7G   251.8M    29.5G     32.0K

(... cut for space reasons)

Using cat /proc/mounts shows the partition file path, the alias, the filesystem type, the startnig inode, the number of blocks, read/write status (and other parameters of the individual partition that I'm not entirely sure of)

NB: The output of cat /proc/mounts can be a bit messy, but if you read it line by line (entry by entry) carefully you'll get the info
Example output:
root@ks01lte:/sdcard # cat /proc/mounts
cat /proc/mounts
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=931840k,nr_inodes=124673,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=931840k,nr_inodes=124673,mode=750,gid=1000 0 0
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,errors=panic,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/efs /efs ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0

(... cut for space reasons)

Using cat /proc/partitions you will get the actual partition name identifier and the number of blocks in the partition.

Example output:
root@ks01lte:/sdcard # cat /proc/partitions
cat /proc/partitions
major minor  #blocks  name
 253        0    1048576 vnswap0
 179        0   15388672 mmcblk0
 179        1      15360 mmcblk0p1
 179        2      58816 mmcblk0p2
 179        3        512 mmcblk0p3
 179        4         32 mmcblk0p4
 179        5         32 mmcblk0p5
 179        6       2048 mmcblk0p6
 179        7        512 mmcblk0p7
 179        8        512 mmcblk0p8
 179        9      10240 mmcblk0p9
 179       10      10240 mmcblk0p10
 179       11      14336 mmcblk0p11
 179       12       3072 mmcblk0p12
 179       13       3072 mmcblk0p13
 179       14      20480 mmcblk0p14
 179       15      20480 mmcblk0p15
 179       16      10240 mmcblk0p16
 179       17       7159 mmcblk0p17
 179       18       3072 mmcblk0p18

(... cut for space reasons)

Using ls -al /dev/block/platform/msm_sdcc.1/by-name you get the mapping between the partition alias and the path of actual partition file (you also get the owner, their user group, etc)

Example output:
root@ks01lte:/sdcard # ls -al /dev/block/platform/msm_sdcc.1/by-name
ls -al /dev/block/platform/msm_sdcc.1/by-name
lrwxrwxrwx root     root              2014-01-20 11:29 aboot -> /dev/block/mmcblk0p6
lrwxrwxrwx root     root              2014-01-20 11:29 apnhlos -> /dev/block/mmcblk0p1
lrwxrwxrwx root     root              2014-01-20 11:29 backup -> /dev/block/mmcblk0p17
lrwxrwxrwx root     root              2014-01-20 11:29 boot -> /dev/block/mmcblk0p14
lrwxrwxrwx root     root              2014-01-20 11:29 hidden -> /dev/block/mmcblk0p25
lrwxrwxrwx root     root              2014-01-20 11:29 modem -> /dev/block/mmcblk0p2
lrwxrwxrwx root     root              2014-01-20 11:29 persdata -> /dev/block/mmcblk0p22
lrwxrwxrwx root     root              2014-01-20 11:29 persist -> /dev/block/mmcblk0p21
lrwxrwxrwx root     root              2014-01-20 11:29 recovery -> /dev/block/mmcblk0p15
lrwxrwxrwx root     root              2014-01-20 11:29 system -> /dev/block/mmcblk0p23
lrwxrwxrwx root     root              2014-01-20 11:29 tz -> /dev/block/mmcblk0p8
lrwxrwxrwx root     root              2014-01-20 11:29 userdata -> /dev/block/mmcblk0p26

(... cut for space reasons)

Don't have /dev/block/platform/xxx/by-name. Did have /proc/emmc, which is similar, but doesn't list the boot partitions. Also don't have cat /proc/mounts, but used mount instead.

I m trying to figure out vbmeta partition size & location. Where is that

Old thread but found something nobody else has mentioned... just in case anyone finds it useful.
ls -la /dev/block/bootdevice/by-name
The directory contains named symlinks to all the partitons.

already answered, you just didn't read

@alecxs nobody here has pointed out that specific directory, it can occasionally be useful when other solutions don't have the information you want. I fail to see the purpose of your comment.

so i didn't read. the path makes the difference

if you like, you can improve your answer with ls -l $(find /dev/block -name by-name) this will cover all possible paths (which of course varies for other devices)

@alecxs Confirmed, tested working in termux-v0.79. Celeb solution only worked in my TWRP 3.7.0 terminal.

Even more useful information can be obtained from parted. An example when the block device is /dev/block/mmcblk0:
~ # parted /dev/block/mmcblk0 print
Model: MMC SEM04G (sd/mmc)
Disk /dev/block/mmcblk0: 3959MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name       Flags
10      524kB   1573kB  1049kB               PIT
 6      1573kB  3146kB  1573kB               CSPSA FS
 7      4194kB  14.7MB  10.5MB  ext4         EFS
 2      14.7MB  31.5MB  16.8MB  ext4         Modem FS
14      32.5MB  34.6MB  2097kB               SBL
16      34.6MB  36.7MB  2097kB               SBL_2
 1      36.7MB  53.5MB  16.8MB               PARAM
12      53.5MB  55.6MB  2097kB               IPL Modem
13      55.6MB  72.4MB  16.8MB               Modem
15      72.4MB  89.1MB  16.8MB               Kernel
17      89.1MB  106MB   16.8MB               Kernel2
 3      106MB   748MB   642MB   ext4         SYSTEM
 5      748MB   2056MB  1309MB  ext4         DATAFS
 4      2056MB  2377MB  321MB   ext4         CACHEFS
 9      2377MB  2713MB  336MB   ext4         HIDDEN
11      2713MB  2765MB  52.4MB               Fota
 8      2765MB  3949MB  1184MB               UMS

~ #

parted not installed on my device, so presumably not available by default.

how do you get parted installed?

parted isn't available on android devices by default, solution is not viable

@endolith, e.g. with Termux (in 2023)

You can use fdisk via busybox on a droid.  So, assuming you have the busybox binary on your rom, and it's on your path, the command would simply be:
busybox fdisk [the various fdisk options...]

Example output of an i9305 with TWRP recovery running (v3.5.0_9-0):
~ # busybox fdisk -l /dev/block/mmcblk0
Found valid GPT with protective MBR; using GPT

Disk /dev/block/mmcblk0: 30777344 sectors, 2740M
Logical sector size: 512
Disk identifier (GUID): 52444e41-494f-2044-4d4d-43204449534b
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 30777310

Number  Start (sector)    End (sector)  Size       Code  Name
   1            8192           16383       4096K   0700  BOTA0
   2           16384           24575       4096K   0700  BOTA1
   3           24576           65535       20.0M   0700  EFS
   4           65536           73727       4096K   0700  m9kefs1
   5           73728           81919       4096K   0700  m9kefs2
   6           81920           90111       4096K   0700  m9kefs3
   7           90112          106495       8192K   0700  PARAM
   8          106496          122879       8192K   0700  BOOT
   9          122880          139263       8192K   0700  RECOVERY
  10          139264          319487       88.0M   0700  RADIO
  11          319488          843775        256M   0700  TOMBSTONES
  12          843776         2940927       1024M   0700  CACHE
  13         2940928         6086655       1536M   0700  SYSTEM
  14         6086656         7233535        560M   0700  HIDDEN
  15         7233536         7249919       8192K   0700  OTA
  16         7249920        30769151       11.2G   0700  USERDATA

You can see sizes and usage statistics of all mounted partitions by simply using this command:
df

Note, the typical df -h does not work here and is not needed because the output is already in megabytes. The command works within adb shell and the Android terminal emulator, but not in the Recovery mode terminal because nothing is mounted at that point.

for listing mmcblk0 partitions:
cat /proc/dumchar_info
Part_Name   Size    StartAddr   Type    MapTo
preloader    0x0000000000600000   0x0000000000000000   2   /dev/misc-sd
mbr          0x0000000000080000   0x0000000000000000   2   /dev/block/mmcblk0
ebr1         0x0000000000080000   0x0000000000080000   2   /dev/block/mmcblk0p1
pro_info     0x0000000000300000   0x0000000000100000   2   /dev/block/mmcblk0
nvram        0x0000000000500000   0x0000000000400000   2   /dev/block/mmcblk0
protect_f    0x0000000000a00000   0x0000000000900000   2   /dev/block/mmcblk0p2
protect_s    0x0000000000a00000   0x0000000001300000   2   /dev/block/mmcblk0p3
seccfg       0x0000000000020000   0x0000000001d00000   2   /dev/block/mmcblk0
uboot        0x0000000000060000   0x0000000001d20000   2   /dev/block/mmcblk0
bootimg      0x0000000000600000   0x0000000001d80000   2   /dev/block/mmcblk0
recovery     0x0000000000600000   0x0000000002380000   2   /dev/block/mmcblk0
sec_ro       0x0000000000600000   0x0000000002980000   2   /dev/block/mmcblk0p4
misc         0x0000000000080000   0x0000000002f80000   2   /dev/block/mmcblk0
logo         0x0000000000300000   0x0000000003000000   2   /dev/block/mmcblk0
expdb        0x0000000000080000   0x0000000003300000   2   /dev/block/mmcblk0
android      0x0000000000a00000   0x0000000003380000   2   /dev/block/mmcblk0p5
cache        0x000000002bc00000   0x0000000003d80000   2   /dev/block/mmcblk0p6
usrdata      0x00000000b6ca0000   0x000000002f980000   2   /dev/block/mmcblk0p7
bmtpool      0x0000000000000000   0x0000000037780000   2   /dev/block/mmcblk0
Part_Name:Partition name you should open;
Size:size of partition
StartAddr:Start Address of partition;
Type:Type of partition(MTD=1,EMMC=2)
MapTo:actual device you operate

cat: /proc/dumchar_info: No such file or directory.

@OhadCohen it is working on some ancient mediatek devices

On my device there is a /proc/diskstats with similar info, though not as pretty formatted. (TWRP recovery)

For internal storage only, you can install DiskInfo. But it doesn't show the file system of my SD card.

Try this in the path -
dev/block/platform/******/by-name # ls -al

try out all directory inside dev/block/platform/**/byname


text:
What to do before reformatting phone or setting back to factory state?
Recently it seems as if my phone has bogged down to a point where is is almost unusable (Droid Eris running 2.1).
I'm on the verge of reformatting or setting back to a factory state. I was wondering what things should I do to make sure I have all my contacts/pics/etc.. and what tools can help me accomplish this?  Also what about the apps I have paid for?  How can I get those to transfer?

If you have an SD card, I would copy its contents to a PC.  That should save all of your pictures.
Paid apps are linked to your Google account and can always be re-downloaded.
Have you entered your contacts manually and not synced them to your Google account?  If not, you don't need to back them up; they're in the "cloud", to use the common catchphrase.
If you're rooted, you can use an app like Titanium Backup to save your applications and data, so that you don't need to redownload them (and so your settings, saved games, etc. are backed up).

Your contacts and calendar will be stored in the cloud and synced back when you re-login with the same Google Account. Also, most of your settings. Apps that you purchased will be listed in your Market Account.
I suggest you use SMS Backup or something similar to save your messages (if you wish to) to your Storage Card. GoSMS and Handcent SMS also have SMS backup/restore facility.
By default, your camera pics are stored in the DCIM folder on your storage card.
Use a backup app like Titanium Backup or MyBackup Pro to backup all the stuff first, just as an additional safety net.
NOTE: Busy right now, so haven't added links. A quick search will turn up the apps in the Market. ;-)

I'd recommend doing all these steps regardless of the fact that your data is in the cloud

Download MyBackUp Pro (or a similar app)
Backup everything to a micro SD card
Deactivate any license (for BlockBuster Movies, etc)
Export anything that is exportable (like contacts, calendars, pictures, etc)

I always say that its better to be super safe than sorry. Sometimes if you have multiple accounts that merge data into one place, you may expect Tom Smith (example use of name) to be on Google's servers but they are actually on FaceBook or some other server. By exporting it, you'll have a file with everyone and then you can upload the contacts to your Gmail account.
I say this from personal experience by losing pictures and data.


text:
Google Latitude and multiple devices - How to prevent location jumping?
I have an Android smartphone and tablet which both are linked to my Google account and Latitude enabled. Since I don't carry the tablet always with me, my Latitude location sometimes jumps back and forth, if my smartphone has no connectivity.
I could disable Latitude on my tablet, but I wonder if there is a way to configure Latitude on the tablet to not provide any location information at all?

Personally I never enabled Latitude on my tablet, it spends most of its time at home, and the rest in Airplane mode!

So on the tablet, you just want to use Latitude to see where other people are, but not report your own location?  And the app doesn't provide an option to turn it off per-device?

That is exactly the problem, endolith. Since there is no offical Latitude for Android issue tracker, I have asked the question on Google's mobile forums. If you are also looking for a native solution, please star it. Hopefully we will get Google's attention.

There's an app called ALTitude that does allow you to configure those settings per installation (= per device in your case).
EDIT: Purpose of the app - updating your Latitude status/location base on more fine grained settings (update interval, location source).
ALTitude on Android Market
XDA Thread
I'd recommend to configure Latitude to "manual location" and ALTitude to automatic update, but first read through the thread to check if this tool does the trick for you.

I am not sure if this will work, since ALTitude requires to set Latitude to "manual update" and I think that this setting will also be synced across all devices which Latitude enabled and my Google Account. Edit: of course that could work, because ALTitude will then update my location, :-) I'll report back how it turns out.

Ok, this will work. But I don't like 3rd party apps. That's why I switched to remotely turning off wifi via GTalkSMS if I have left my tablet at home, so that it has not data connectivity. If there aren't any better answers until the end of the contest, I will accept this one. Thanks masterjo.

@Flow if there's any suggestions you'd like to voice do so in the XDA Thread - the app is in active development and the developer is very responsive.

This is probably overkill and might not even work, but you could root your tablet and install Cyanogenmod, which lets you revoke permissions for individual apps.  So you could revoke permission for Latitude to access your location on the tablet, but leave the rest of the app running.  This may just cause it to crash, though.

If you go to Settings in your Latitude, under Location Reporting it gives you the option "Do not update your location". Another option is to just turn off the GPS on your tablet, this way it won't give your position in Latitude.

I'm not sure if the first option is the same as Andrew's answer, but the second makes sense.

I am sorry but disabling GPS won't help since Latitude will still update the position from the WiFi and cell tower location data. Also GPS isn't used by Latitude explicitly, it's only used when the GPS postion is already there (e.g. because Maps with enabled GPS is running).

For the current version of Google Maps (7.2.0) set Settings > Google location settings >Location Reporting> Off on your tablet. For more details see the Google help page.
For an older version of Google Maps (6.14.4) I found: Settings > Location settings >Report from this device.

Under Settings > Accounts > Google, Privacy > Maps & Lattitude, I have disabled the option "Report from this device" on my Nexus 7 tablet. This makes my phone the only device to update my location.