"Imagine being a phone. At launch, everyone loves you and is in line to get you. You amaze every review website or youtube channel out there. You're beautiful, sturdy, incredibly fast and affordable. People flash new roms on you on the daily. Over thirty THOUSAND people discuss you on a dedicated subreddit. There's millions of apps promoting themselves using you for their screenshots. Your owner takes you everywhere. You're with your owner through the best and worst times, always ready to rock. Your owner promotes you to their friends often. Over time, your power button starts getting funky, new phones come out and then one day, your owner is ordering a new phone through your screen. You try stopping them by randomly rebooting one more time, but this only seems to encourage the owner more. One day, you hear the doorbell. Your owner takes their new phone out of the box, with the same excitement they felt back when you were unboxed 2 years ago. They pick you up one last time to post a photo of the new phone, turn you off, take out your SIM and put you in a drawer never to be picked up again. You wonder where you went wrong. Was it the battery life? The camera? The power button? You lay there, waiting for your battery to completely run out, and when it does, you know you've had a good life." - /u/alectprasad
- Termux has a
termux-url-opener
hook that allows sharing of URLs from an app into Termux. This, combined with a handler that callsyoutube-dl
, technically lets you download a video when you share it from youtube. - AccuBattery is neither precise nor accurate. Its many (inaccurate) data points eventually converge to achieve an average, but potentially still at the wrong place (imprecise).
- Phone cases do not negatively impact thermal performance, as long as the screen is exposed.
- Under-screen fingerprint scanners require a transparent window over the screen, the screen protectors of which might try to do something like having a patch of glue where the scanner is. The cheap ones might only have that glue at the scanner. More expensive ones will have a uniform-looking screen.
- The Samsung Galaxy brand started from some Samsung executives liking a particular brand of wine, called the Galaxy made in Napa Valley.
- Google "invented" the magnetic wireless charger in 2012.
- Google knows that gestures butchered recent apps.
- Samsung aggressively preserves battery longevity by limiting max/min levels of charge, as well as temperature. See post and possibly relevant Exynos source code.
- Android is a way bigger target for malware because (a) there are more of them around, and (b) the majority of them are out of date.
adb shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGS
- A powered-on OLED panel can take 1.8W to power full brightness
- If you place on a wireless charging mat a phone that is already charging with USB, wireless charging takes precedence.
- Unless otherwise specified, power always go through the battery first, not directly from DC to motherboard. This means every device that does not advertise such a thing will have battery degrade every time you use it while charging.
- The first step to enable wireless ADB is to connect your device via USB.
- TCL ("partially state-owned") stands for "Telephone Communication Limited" so they supposedly should make phones under its own brand.
- ".seb" files are Solid Explorer Backups.
- Samsung devices don't have fastboot??
- A 5.5" display at 16:9 is 2.7" in width. A 18:9 display at the same width is 6.0". A 19:9 display at the same width is 6.31". A 20:9 display at the same width is 6.58".
- The Samsung Galaxy S20 Exynos versions have slower chipsets that use more power than the Snapdragon versions.
- Record your screen, not necessarily stopping it:
adb shell screenrecord --bit-rate 800000 --size 960x540 --time-limit 59 /sdcard/FileName.mp4
- There is an SMS fork of Signal, called Silence, that uses SMS instead of, you know, the internet.
- All "IPS" and "PLS" displays are TFT displays.
- How do you disable internet access for an app on android 10? Answer: you just don't. "Let every app access the internet, bitch."
- Google does not say that Adaptive battery kills apps. If it is true, adaptive battery just controls jobs, alarms, network activity, and cloud messaging. They do not come into effect while charging.
- Don't use scoped storage in one simple step:
cmd appops set com.foo.bar android:legacy_storage allow
- Apps like cameras and game emulators may require certain types of chipset (notably, snapdragon).
- In a GC log line e.g.
Background concurrent copying GC freed 47894(2MB) AllocSpace objects, 13(276KB) LOS objects, 41% free, 33MB/57MB, paused 439us total 308.276ms
, the most interesting part is the amount of time that the program waspaused
while GC took place, which translates to a perceived performance hit. In this case, the program didn't really pause. - To put shortcuts in your Nova Launcher drawer, make a new app folder with any app in it, drag the folder onto the desktop, put any shortcuts you want in it, and then remove the folder from the desktop (and you can remove the placeholder app inside). Now you have web apps that aren't really apps in the drawer!
- "Background restriction" is only an energy limit. Apps can still run in the background for however long they want.
- Cheap devices can come with a Settings app that doubles as malware, rendering the device unusable if removed.
- Unless with an ancient GPU, reducing the resolution from 1440p to 1080p has no real-world power difference if the GPU was shipped to do 1440p.
- Full-disk encryption is at most a deterrent if your bootloader is unlocked, which allows attacker to get your key right off the filesystem. To make it more useful, set a stronger password.
- Phone batteries doubled in capacity between 2013 and 2019 because device volume also doubled.
- "You can think dalvik.vm.heaptargetutilization as a setting how accurately the RAM should be used. If you set this to 0.25, you tell the system that up to 75% of RAM can be wasted as a tradeoff to reduce CPU usage. If you have a device where you have more CPU power than actual RAM, it might make sense to increase this setting."
- ART-optimise your apps with
cmd package bg-dexopt-job
. JIT may generate profiles, so you may want to compile AOT only after JIT ran over your apps for a while. - There is another level of ODEX optimisation using:
pm compile -a -f --check-prof false -m everything; pm compile -a -f --check-prof false --compile-layouts; pm bg-dexopt-job
. This is also exactly what the Galaxy App Booster does. - You can see which version of the kernel you're running where it is compiled.
- The "optimize performance for apps" thing that LineageOS has has never been fully implemented and does nothing.
- Run
settings put secure location_providers_allowed -network
to remove the consent you gave Google to collect your location with Wi-Fi in exchange for "battery-saving" location. This does not disable Wi-Fi scanning though, so disable it in the settings yourself. - In Android 10, "pausing" an app means banning it with digital wellbeing, not preventing background activity.
- If you are going to buy a device that doesn't come with a headphone jack (because options do not exist), at least pick a device that allows both analogue and digital audio passthrough so you can get any adapter you want, and it will work. Example: OnePlus. Counterexample: Google.
- RCS has never had end-to-end encryption. It is a protocol designed for carrier interop, not privacy. Client-to-server encryption is possible, but the server always knows what you are saying.
adb ls
does not take any arguments forls
.adb shell ls
does.- Like a joke, AOSP does not come with standard linux tools like
nano
/pico
,vi
, or any editor. Evened
. - Xposed does not have an impact on performance (something like 0.2% on GeekBench 5). However, Xposed v90 beta3 (last official version) can cause your apps to fail to launch from
Check failed: instrumentation_frame.method_->GetNonObsoleteMethod() == GetMethod()->GetNonObsoleteMethod() (instrumentation_frame.method_->GetNonObsoleteMethod()=0x6f895330, GetMethod()->GetNonObsoleteMethod()=0x7a4b3ec588) Expected: <runtime method>.<runtime internal callee-save reference and argument registers method><no signature>...
. There is no workaround. - Pixel 3's "super res zoom" kicks in automatically on zoom 1.2x and up.
- Huawei devices can have apps that use magic permissions like
com.huawei.permission.sec.MDM_INSTALL_SYS_APP
, not present in anyone else's android, to install privileged apps, such as Google Play Services. - You can't deny an app
android.permission.INTERNET
, even with root. pm trim-caches 500G
, which would clear the cache until you have 500GB free, would effectively clear all your cache.- To make your htop settings stick, mount
/
(not/system
) as read-write, and then make the file/.config/htop/htoprc
. pm list packages
got moved tocmd package list packages
. Don't know why.- Staying away from Google is a completely valid motion. Lock-in in the form of vendor (closing source of killer apps so the vendors can't clone their features), apps (google play services as dependency), and APIs (fused location, maps, in-app payments, games). Article was written by Ron Amadeo.
- "Adaptive LMK" is based on VM pressure.
- To start the device with adb already enabled, edit
build.prop
with a new line:persist.sys.usb.config=mtp,adb
- Apps that don't need to read phone state, but request that permission anyway, are reading your IMEI number to uniquely track you.
- Verify your adb RSA key with
awk '{print $1}' < ~/.android/adbkey.pub | openssl base64 -A -d -a | openssl md5 -c
- If you don't have a phone app (say you adb disabled it) and someone calls you, the device will still ring, but you will have no way to answer.
- Keeping a $1000 phone for 2 years means using it for $1.35 a day. 3 years? $0.90 a day. See also: entire chart.
- Use
monkey -p com.packagename 1
to launch an app without input. - If your device is not encrypted, and you encounter "incorrect password/pin" after restoring from a NANDroid backup, try this or delete
/data/system/locksettings.db*
from a TWRP shell. Also worth deleting:password.key
andpattern.key
, if you use those. - To automate scrolling up a long list, use
while true; do input swipe 300 300 300 1500 100; done
. - Throwing a file into the "intent firewall" directory instantly disables direct share, without the need for an xposed module.
- To get how healthy your battery thinks it is, use
adb shell 'su -c cat /sys/class/power_supply/battery/charge_full_design'
from your laptop. - Samsung earns far more in its semiconductor business than its smartphone business, because smartphones are now a commodity, and have low profit margins. It does not innovate in the smartphone business unless it has to. Sony had made a similar pivot to playstation and image sensors.
- Xiaomi's "we'll make only 5%" slogan is a PR campaign, because firstly, the 5% only applies to their hardware business, where they don't earn money anyway, and secondly, investors do know the difference, so they will realise that lower hardware prices means higher profits from MIUI, their software division.
- Any app with "storage" access can modify another app's update files to run malicious executable updates.
- LineageOS devs clearly and explicitly outline hardware and software requirements for a device to qualify for an official build.
adb install -r
installs the apk without failing when it already exists.- If you have both exactly one device and exactly one emulator running,
adb -e
chooses the emulator, andadb -d
chooses the only connected device. - To remove Google Play Services from the whitelist that lets them do whatever they want without battery optimisation, edit the
/system/etc/sysconfig/google.xml
or/system/product/etc/sysconfig/google.xml
file and comment out the appropriate sections. .dex
files are VM caches in an APK, and.odex
files are optimised VM caches outside an APK. "De-odexed" ROMs put the odex files inside the APK, so you can mod the APK or something without odex files conflicting with it.- As of 2018-05-04, a package called
com.google.android.googlequicksearchbox
contained an offline podcast function. - "Some apps will use OpenSL ES for Android to record audio, an example is WhatsApp. Xposed cannot hook into native code, so this cannot be prevented." - XPrivacyLua
- To "verify udev rules", do this: enter
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
into/etc/udev/rules.d/51-android.rules
,chmod a+r
that file, and thensudo udevadm control --reload-rules && sudo udevadm trigger
. - There is no straightforward way to find a package's application label by ID. At minimum, you need to first find the path to your APK (
pm list packages -f com.example.package
), then somehow transfer that toaapt dump badging /path/to/installed.apk
. - More people downloaded Subway Surfers than Google Calendar.
- The Facebook Android app has 2.2 billion monthly active users, only a small percentage of which would be bots given the collection method.
- You can
pm disable
apps or components (with root),pm hide
only apps (no root), orpm uninstall -k --user 0 ...
(also no root, irreversible?). - You might be able to reverse an
pm uninstall -k --user 0 ...
withcmd package install-existing <name of package>
. - Using OpenKeychain requires your secret key to be on your mobile device. The project knows that this is inherently less secure than if your key were stored offline in a remote bank vault.
- 2018-04-01 LineageOS builds have an Easter egg that a) got pushed to devices late, and b) will not disappear after April Fools day.
- Qualcomm Quickboot is just putting the phone in a special kind of airplane mode.
- OnePlus 2 and 3 had the lamest codenames in the series: bacon (1), onyx (X), oneplus2 (2), oneplus3 (3/3T), cheeseburger (5), dumpling (5T), enchilada (6), fajita (6T).
- Samsung phones (article: Galaxy S8) lose 20% battery capacity when rooted because Samsung really hates you, your life choices, and making money off you.
- Inputs can be emulated with
input tap x y
andinput swipe x1 y1 x2 y2
- Screen off gestures not working might be MinMinGuard's fault. To fix, wipe your Dalvik/ART cache, and not ironically.
pkill -l19 com.xiaomi.hm.health # SIGSTOP that damn background process
pkill -l18 com.xiaomi.hm.health # SIGCONT that app so it works again
- You can stop mpdecision by simply typing
stop mpdecision
. - When your phone says it accepts a max of n fingerprints, you can put multiple fingers on the sensor in a single run, fun fact...
- Doze parameters can be found here. A flowchart of doze's events can be found here.
adb logcat *:W
to filter at least WARN.- Lots of
build.prop
entries don't do anything. dumpsys batterystats --reset # resets battery graph
- List package permissions:
dumpsys package com.google.android.inputmethod.latin
pm grant com.uzumapps.wakelockdetector.noroot android.permission.BATTERY_STATS
:cmd appops set com.android.application WAKE_LOCK ignore
pm revoke com.uzumapps.wakelockdetector.noroot android.permission.BATTERY_STATS
- On the opposite (coincidentally, the same) side of the planet, two Internet giants do mentally special things to each other on their users' phones in other to share shopping links over a chat service
- ShareIt, CM browser, DU battery saver, and ES file explorer are among the apps that China uses to spy on other countries.
- The battery stats is reset when it reaches MAX_HISTORY_BUFFER, which is 256kB.
- If the camera mods don't work, you need to enable the Camera2 API (
persist.camera.HAL3.enabled=1
) first. - Cyanogen was Steve Kondik's nickname. He created CyanogenMod.
adb shell dumpsys batterystats --reset
resets the battery graph.- Not being on a stock rom while relocking your bootloader will brick the device, says this guy.
- If your friendly local LineageOS installation complains about having no
TERM
variable in bash, then see if addingexport TERM=xterm
to/etc/mkshrc
helps. The message you get is:Error opening terminal: unknown.
- Face Unlock is less popular in countries like Saudi Arabia and UAE.
- Download the SDK before attempting to compile anything.
- Daydream is triggered only if the device is allowed to sleep from screen timeout while charging. Pressing the power button at any time will cancel the timeout.
- Use the "debug GPU overdraw" thing in developer options to check where your app is drawing over a pixel twice or more (which is wasteful), including re-computing the colour over transparent areas.
- Google Play Services keeps track of your boot count in a
shared_prefs/bootCount.xml
. - September 2017--a month which will live in infamy--both BroadPwn and Blueborne vulnerabilities were released into the wild. In the same month, Google released Android O[nion], rendering all N-based ROMs vulnerable to these attacks.
- CAF (Code Aurora Forums) is not the project; "Android for MSM" is the project. When dudes say they are based on CAF, they actually mean they are based on Android for MSM by CAF.
- In a very glitchy way, one-handed mode is shipped with Android 6.0 using the
wm overscan
command. - Android devices can be rooted with the row hammer effect. "Repeatedly accessing data stored in memory chips could flip certain bits," say Arstechnica.
- Stop (my particular android) device from charging using
echo 0 > /sys/class/power_supply/battery/charging_enabled
. (Use 1 to re-enable, or 2 to blow the phone up.) Note the power manager wakelock will be active even if you aren't charging, so the device never goes to sleep when plugged in. - Samsung is not an Android manufacturer for Google; Samsung is a conglomerate that wants to take Android off Google. No other series of devices have both Samsung and Google Apps suites.
- Tapping "Cached data" in System>Storage on Android clears caches for all apps. Beware, it also clears Google offline maps and gReader article data.
- If a Oneplus One boot loops because of a corrupt
persist
partition, runmake_ext4fs /dev/block/mmcblk0p15
- As of
Android LCyanogenMod 12, the shell (or busybox) now comes with htop. - However much Google results decide to decay, the way to check (your particular android) device's battery percentage is
cat /sys/class/power_supply/battery/capacity
. - The last three digits of a Google Play Services package defines the compatible android version, CPU architecture, and PPI, respectively. The most common combination is "030", package for Pre-5 devices.
- MediaTek is "not that much worse" than Qualcomm iff you don't use custom ROMs.
- "userdebug" seen in Android's build string apparently means something. "No root because it's a 'user' build, which is what manufacturers ship. 'userdebug' builds which contain root also contain debugging tools and other things that some users might consider to be bugs."
- "You may already know that every app/process in Android is assigned an oom_adj value, which indicates the likelihood of it being killed when an out of memory (OOM) situation occurs. More higher it's value, the higher likelihood of it getting killed. Valid range is -17 to +15. (if in the -17 range means it won't get killed)."
- Android N will have two system partitions, one online and one offline. The online one will push updates to the offline one, and they switch once the offline one is updated.
- Mounting android's system as rw:
mount -o remount,rw /system
- Mounting android's system as ro:
mount -o remount,ro /system
(I know right) - The file
batterystats.bin
is used to display the battery graph, and has no impact on battery capacity or battery life. - In Tasker, "top priority" is 50, not 1.
- Accelerometer readings can be used to reverse engineer what you were typing, including passwords. Video was from 2011.
- People can totally downgrade your APK while preserving data with the 'adb -r -d' options.
accessibility_display_daltonizer
controls which colour space to use (monochromacy = 0, deuteranomaly = 1, protanomaly = 2, tritanomaly = 3), whileaccessibility_display_daltonizer_enabled
controls whether it is active (0 = disabled, 1 = enabled).- TWRP doesn't have password protection on purpose; they didn't want to guarantee safety.
- Since debloating a ROM doesn't resize the system partition, it is important to choose a phone (and carrier combo) that does not ship with useless junk in the first place.
- The "shutter speed" and "aperture" settings in Android are fake. What are you, stupid? There is no shutter (apart from some of Samsung's experiments). Both settings are emulated.
- Tasker's
%DATE
format will change depending on the system locale. - For some reason, qcrilmsgtunnel is responsible for showing your signal icon.
- OnePlus and Vivo were owned by Oppo. Oppo is owned by BBK... not just any BBK, but 广东步步高电子工业有限公司. Then BBK buys OnePlus from Oppo. It's conglomerates all the way up.
- AdGuard GitHub version blocks ads. "Please do not mention this feature in Google Play store comments," says M66B.
- Use
settings put global ram_expand_size 4096
to get 4GB of swap on your Samsung device. Empirically, it doesn't do anything. - Use
dumpsys deviceidle whitelist
to see what apps are in the doze whitelist, anddumpsys deviceidle whitelist -com.package.name
to remove it. Empirically, it doesn't do anything for system apps. - Connect to multiple devices over adb Wi-Fi by running
adb -d tcpip (a different port number every time)
. The-d
selects a currently-connected USB device; you can also tryadb -s (device id) tcpip (a different port number every time)
. - Try to use "Suspend execution for cached apps" (
adb shell device_config put activity_manager_native_boot use_freezer true && adb reboot
). Or maybe it doesn't work, as usual. - You can't disable
com.samsung.android.app.appsedge
. It handles split screen.