Use this command to get mount names and origins: df To get block information for data use the command: tune2fs -l /dev/block/mmcblk0p56 (example) If any block does not report “clean” then we can use e2fsck to clean them. To do a check with e2fsck without changing the file system: e2fsck -n /dev/block/mmcblk0p56 (example)
Category: Linux
Android thread priority
Below is the mapping for thread in C++ and thread in Java.
Android remount command
On a rooted Android device, adb shell su -c “mount -o rw,remount /system” This makes /system writable and can update any file there.
Access traceroute on Android
Your device must be rooted. # su # toybox traceroute toybox has multiple internal commands at your perusal. This worked on Android Nougat (7).
Public IP Linux
To know public IP of the network, use following commands on Linux shell: # curl ifconfig.co (returns IPv6 address) #curl ifconfig.me (returns IPv4 address) #curl icanhazip.com (returns IPv4 address) From Web browser, visit http://api.ipify.org/
Android device to developer mode thru terminal
That info is stored in a shared preference of the settings app. Which is located at: /data/user/0/com.android.settings/shared_prefs/development.xml it has a boolean named show stored, if set to true, developer options is shown, gone otherwise. Also, adb shell settings put global development_settings_enabled 1
CMake 101
(From https://stackoverflow.com/questions/31037882/whats-the-cmake-syntax-to-set-and-use-variables) When writing CMake scripts there is a lot you need to know about the syntax and how to use variables in CMake. The Syntax Strings using set(): set(MyString “Some Text”) set(MyStringWithVar “Some other Text: ${MyString}”) set(MyStringWithQuot “Some quote: \”${MyStringWithVar}\””) Or with string(): string(APPEND MyStringWithContent ” ${MyString}”) Lists using set(): set(MyList “a” “b” “c”) set(MyList ${MyList} “d”) Or अतिरिक्त Read More
Android NDK console print C/C++ – Chirag Patel
When your Android app has C/C++ code using NDK tools and you want printing output to serial port console, here’s the solution. // change sharing first chmod(“/dev/console”, S_IRWXG | S_IRWXO | S_IRWXU); // open file int serialFd = open(“/dev/console”, O_RDWR | O_NONBLOCK | O_NDELAY | O_NOCTTY | O_APPEND); __android_log_print(ANDROID_LOG_DEBUG, “Serial”, “Serial console fd=%d errno=%d(%s)”, serialFd, अतिरिक्त Read More
Useful Android debug commands
For Android terminal $ dmesg $ dumpsys $ dumpstate $ logcat -b events $ bugreport > /mnt/media_rw/{your device}/bugreport.txt df: Disk space details in GB. adb shell df du: Disk space used by the specified files and subdirectories. adb shell du For specific folder desk space details in GB. adb shell df /system For specific folder अतिरिक्त Read More