I'm trying to develop an Android application but when I try to connect to logcat I get the following error:
Unable to open log device '/dev/log/main': No such file or directory
I already installed a new SDK, rebooted my phone... nothing seems to solve the problem. Anyone has any solution?
Samsung Galaxy S (Darky's v9.1)
Apple OSX
ADB 1.0.26
I had used the Speedmod kernel; This has default Logging disabled. Re-enabled it in the TWEAKS menu.
Thanks for making me realise this Octavian Damiean
I found the following method on XDA:
adb shell
su
mount -o remount,rw /system
echo ANDROIDLOGGER >> /system/etc/tweaks.conf
mount -o remount,ro /system
and reboot.
For a rooted Galaxy Note 7000, run insmod /lib/modules/logger.ko in the shell (this is missing from the rootfs' init.rc), assuming you can boot up sufficiently far to access adb / some terminal like terminal-ide. The module mounts in /dev/log and provides the missing files.
Related
This is fairly a very old question but I am surprised that none of the solutions are working for me. I need to run an android app as system app in an AVD (in emulator) created for Android version 7.0. For this, I want to push apk file to system partition but I keep getting error saying it is read only file system. I found many similar questions on stackoverflow but nothing is working for me. I restarted adb in root, executed it with remount as suggested in answers to similar questions, but system partition file system permissions do not change. Here is a sample session:
mvsagar#mvslt:~/sw/android_sdk/platform-tools$ ./adb root
restarting adbd as root
mvsagar#mvslt:~/sw/android_sdk/platform-tools$ ./adb remount
remount succeeded
mvsagar#mvslt:~/sw/android_sdk/platform-tools$ ./adb push /home/mvsagar/projects/AndroidStudioProjects/LcnApps/app/LCNUE.apk /system/app/LCNUE.apk
adb: error: failed to copy '/home/mvsagar/projects/AndroidStudioProjects/LcnApps/app/LCNUE.apk' to '/system/app/LCNUE.apk': couldn't create file: Read-only file system
I have tried manually remounting with read/write(rw) options using adb shell, but the remounting fails.
Is there any way to have read/write permission on system partition?
My dev env is Android Studio on Ubuntu.
In my case, I use a avd( Based on: Android 8.0 (Oreo) Tag/ABI: google_apis/x86_64 ).
$ emulator -avd Nexus_5X_API_26_APIs -writable-system
$ adb root
$ adb remount
Then, /system is writeable.
$ adb push somefile /system/bin/ is work.
When working with Q, this is the only solution that worked for me: https://stackoverflow.com/a/64397712/1898527
Adding here the steps for completion (kudos to the original author):
> emulator -avd Pixel_3a_XL_API_29 -writable-system
> adb shell avbctl disable-verification
> adb disable-verity
Now reboot your emulator so that the changes take effect.
> adb root
> adb remount
> adb shell "su 0 mount -o rw,remount /system"
Note: you will need an emulator without Google Play, otherwise this won't work. You can get it by following the steps described here: https://stackoverflow.com/a/45668555/1898527
use genymotion emulator, which is faster, light weight and pre rooted. (which means you can access system directory)
For the benefit of others, answer to the question was answered a long ago by #Ishamael in another stackoverflow question Read only file system on Android
Running Android Studio on a Macbook for the first time and I'm getting this error. The program does not start on my device, I just get a crash message.
On Android Studio, I get "The target device does not support the 'run-as' command" and when I plug this into google I get no results. I get a "Learn More" section though which points to this link under the heading "About Instant Run": https://developer.android.com/studio/run/index.html?utm_medium=android-studio#instant-run.
Any suggestions would be highly appreciated.
I recently upgraded to AS 2.2 and this message suddenly appeared today.
Restarting Studio caused this message to disappear.
But the build in general seemed slow - so I used the adb commands to stop and start the server and now it seems Instant run is working better
adb kill-server
adb start-server
my phone is Moto G x1032 w lollipop
I had this same problem after rooting my device and the other answer didn't solve it.
When I ran adb run-as command in the terminal I kept getting
Could not set Capabilities: operation not permitted.
It's a permissions issue. You have to change permissions on run-as file in /system/bin folder. This solved it for me (needs root access):
1. remount /system rw
2. chmod 4750 /system/bin/run-as
3. remount /system ro
If running custom recovery:
1. reboot to recovery
2. find the mount system and check it (make sure 'mount system as read-only' is unchecked)
3. open a terminal and type: adb shell
4. type: chmod 4750 /system/bin/run-as
5. uncheck the System mount and reboot!
See here issue 58373: https://code.google.com/p/android/issues/detail?id=58373
I use ADB tool and I want to install apk on my emulator. So I use this command
adb install /home/jody/myexample.apk
and I got this error
2841 KB/s (242867 bytes in 0.083s)
pkg: apk
ver: /data/local/tmp/concolicexample.apk
Failure [INSTALL_FAILED_INVALID_URI]
I search this error and from https://mobiledevstories.wordpress.com/2013/06/03/android-adb-install_failed_invalid_uri/ I found out I should The solution is to change permissions to directory but the problem is I don't know where is /data/local/tmp and where should I change permissions?
I should mention that I use genymotion emulator on Linux.
please help me. Sorry if this problem is really primitive. I just begin to use adb.
There are more people with your problem here:
Cannot install package on rooted device : INSTALL_FAILED_INVALID_URI
I think that your device needs to be rooted for this to work, or you won't have sufficient rights. I don't have a rooted device here so don't remember if all steps are necessary:
So the /data/local/ directory is on the Android device, so using adb you need to access the device.
1) adb remount (This might not be necessary, this gives you more access rights to the device)
2) adb shell <- opens a shell on the device instead of your computer.
3) chmod 777 /data/local/
4) chmod 777 /data/local/tmp/
Hopefully it works for you!
I want to push some apk file to sd card, then to /system folder. I tried the following commands in order:
adb shell
su
mount -o rw,remount /system
adb push /data/app/com.project.android.xxx-2.apk /sdcard
But the last line always results in device not found error. I have even tried with system folder directly as, adb push /data/app/com.project.android.xxx-2.apk /system/app, but it gave me the same error. I have also tried to execute this line before push command:
chmod 644 /sdcard
But that didn't solve the push command problem.
My device is rooted.
Device driver is updated.
My device has sd card.
USB debugging mode is enabled.
When I write adb devices I get my device name.
What is causing this error, and how can I solve it?
You're executing adb push being already shell-ed into the device. By doing that you start another adb server on the target device now (not on your host machine), which is scanning ports in some range looking for devices attached. Since no device is found (attached to the target device) you get error: device not found. For the kind of task you're trying to achieve no need to use any of adb commands within shell.
Try either mv or cp command once you shell-ed in. For example (remounting part skipped):
adb shell
cp /data/app/com.project.android.xxx-2.apk /sdcard
How to auto boot a rooted android phone when it is dead and connected to the charger?
I know many people think its not possible as when the device is OFF and ADB isn't running. But it turns out that it is possible to write an application for rooted device.
There is an application for the same #playstore to do just that.
I just want to make similar app. Any ideas or pointers?
I am researching for the same problem (Android 2.3, htc wildfire s), this are my investigation results:
It works! Unfortunaly it works, if you connect the phone without accumulator and after that insert the accu- now its autoboots. Connecting the phone with inserted accu or insert the accu in the unconnected phone does not work.
Not the result I hoped for but maybe a hint for a pointer.
And I found a script solution: https://android.stackexchange.com/questions/39899/auto-boot-when-charger-connected-for-htc-magic
echo "echo skipping chargemon" > chargemon.script
adb pull /system/bin/chargemon chargemon.backup
adb push chargemon.script /sqlite_stmt_journals
adb shell
$ cd /sqlite_stmt_journals
$ su
# mount -o remount,rw /dev/block/mtdblock0 /system
# cat chargemon.script > /system/bin/chargemon
# chmod 755 /system/bin/chargemon
# reboot -p
You should google a bit
i guess your looking for something
similar to this?
https://android.stackexchange.com/q/39899
Mostly you will have to check the boot-sequence of multiple devices and code accordingly as each device will have different setups
for example the app you posted in your question works only for samsung devices