Need help with adb :\ - Nexus 5 Q&A, Help & Troubleshooting

Hey everyone!
Recently I've had problems with using the command "adb remount". I thought it was a kernel problem but it happened with both Trinity and
Elementalx kernel. I have installed the universal naked drivers 0.73 for my nexus 5. I think it is a root problem since nothing pops up on my phone
when entering "adb root". I have tried to retype it several times and it doesn't say "adb is already running as root" or something like that like it used
to. It keeps repeating "restarting adbd as root" whenever I type that command. Sorry if I'm not clear :/
Thanks everyone!

I personally prefer to run adb via recovery. Have you tried this?

I have also failed to use remount in android.
The solution is as rootsu suggests.
Boot to recovery and do
Adb shell mount /system
Or
Adb shell mount /data
Which ever partition you want to be changing
Sent from my Nexus 5 using xda app-developers app

rootSU said:
I personally prefer to run adb via recovery. Have you tried this?
Click to expand...
Click to collapse
It does work that way but am I stuck on using this method?

Lxve said:
It does work that way but am I stuck on using this method?
Click to expand...
Click to collapse
I don't think so. It's just easier.
With SlimKat and elementalx*
I have adb and apps set as root in slimkat although I doubt this is a requirement in non-AOSP roms that do not have this option. Need USB debugging on and the screen unlocked
Code:
C:\Users\rootsu\Desktop\tools>adb root
adbd is already running as root
C:\Users\rootsu\Desktop\tools>adb shell
[email protected]:/ # mount -o remount,rw /system
mount -o remount,rw /system
[email protected]:/ # exit
exit
C:\Users\rootsu\Desktop\tools>adb push test.txt /system/
C:\Users\rootsu\Desktop\tools>adb shell
[email protected]:/ # cd system
cd system
[email protected]:/system # ls
ls
addon.d
app
bin
build.prop
core
etc
fonts
framework
lib
lost+found
media
priv-app
[B][COLOR="Red"][B]test.txt[/B][/COLOR][/B]
tts
usr
vendor
xbin
[email protected]:/system #

Related

how to unroot my nexus s pls help

hello,
i need help to remove superuser and lock my nexus s
+after doing that should i get official updates?
i did see this topic
http://forum.xda-developers.com/showthread.php?t=879041
and i try this solution
ryude said:
You need to use adb to go in the file system and delete all trace of superuser and busybox. That is the only things rooting does, places those files on your phone and changes file permissions. File permissions, they won't look for, but I've had best buy scroll through the app drawer on multiple occasions looking for superuser/rom manager.
I have attached a zip containing all the files needed for adb. Since they no longer package adb with the sdk. Just open command prompt and cd to the directory containing adb. Make sure your phone has Usb Debugging enabled, then connect your phone.
You might need to download usb drivers in order for windows to recognize the device, but probably not. Once your phone is connected, do the following.
Code:
adb devices
adb shell
su
rm /system/app/Superuser.apk
rm /system/bin/su
rm /system/bin/busybox
rm /system/bin/rootshell
reboot
Click to expand...
Click to collapse
but when i write rm /system/app/Superuser.apk it say
Read-only file system
so what should i do i only get my XS unlock then install superuser using
install-superboot-windows.bat
and i never do recovery!!!!!!
so any help
i need to get my nexus like new and i should then gt updates
You can have superuser and get updates. The update will remove root though. You could always wait for the cm nightly to include 2.3.3
Sent from my Nexus S using XDA App
You have to mount the /system partition as read/write.
Easiest way is use Root Explorer.
You can also try the following from adb or terminal on the phone:
Code:
su
mount -o rw,remount /dev/block/mtdblock3 /system
thanks for your reply
i used Root Explorer to mount the /system partition as read/write.
and then
i did write this codes
adb devices
adb shell
su
rm /system/app/Superuser.apk
and every thing was ok
but i have an error on those lines
rm /system/bin/su
rm /system/bin/busybox
rm /system/bin/rootshell
and every time i get file not found
so what i should do???
hello, tominater12 and thank you for reply
cold you tell me how i can remove superuser and root using the update??????
i want to get my nexus s like new no root no superuser
so any one can help?
hi guys,
this is my first post in the forums, but after reading and watching many videos on how to remove it i have found a solution...my nexus s is now unrooted with no superuser...
make sure u have android sdk installed, and have usb debugging on.
restart phone into recovery
open cmd and type -
cd c:/AndroidSDK/tools/
adb shell mount /system
adb shell rm /system/app/Superuser.apk
ALL CREDITS GO TO 'TheUltraLinx' ON YOUTUBE,
who has fixed my phone to factory settings
flash oem rom and fastboot oem unlock?

ADB question

I have read many posts about ADB push/remount permission issues, etc. But unfortunately I still have not figured out what's wrong with my situation. First of all, I don't have a micro SD card, so I have to push files directly to the phone memory.
I firstly tried "adb push" but seems it doesn't work for me
$ adb push email.apk /system/app
failed to copy 'email.apk' to '/system/app/email.apk': Read-only file system
Click to expand...
Click to collapse
Then I searched online and people said you need to remount first. Then I got the infamous permission problem
$ adb remount
remount failed: Operation not permitted
Click to expand...
Click to collapse
Then I tried open shell first. no go
$ adb shell
$ mount -o remount rw system/app
mount: Operation not permitted
Click to expand...
Click to collapse
I searched more and found it can get su permission so to make things work. But when I hit "su(enter)" after open adb shell, I don't see the "#" showing up but still got an error message after waiting for a while
$ adb shell
$ su
Permission denied
Click to expand...
Click to collapse
Any one can please tell what's wrong with my operation? I rooted my G2x but didn't flash it. I installed the ROM manager and installed CWM but didn't proceed to reboot into recovery mode.
tangyoulei said:
I have read many posts about ADB push/remount permission issues, etc. But unfortunately I still have not figured out what's wrong with my situation. First of all, I don't have a micro SD card, so I have to push files directly to the phone memory.
I firstly tried "adb push" but seems it doesn't work for me
Then I searched online and people said you need to remount first. Then I got the infamous permission problem
Then I tried open shell first. no go
I searched more and found it can get su permission so to make things work. But when I hit "su(enter)" after open adb shell, I don't see the "#" showing up but still got an error message after waiting for a while
Any one can please tell what's wrong with my operation? I rooted my G2x but didn't flash it. I installed the ROM manager and installed CWM but didn't proceed to reboot into recovery mode.
Click to expand...
Click to collapse
you need to look at your phone and allow superuser app to grant permission
crazythunder said:
you need to look at your phone and allow superuser app to grant permission
Click to expand...
Click to collapse
su app? how should I set it? I didn't see anyone mentioned that. Do you care to give a bit more details? Thanks.
I think I figured out. I have to manually run the superuser app and let it say in active. Then when I type in "adb shell" the app on the handset will ask my permission. Thanks for the reminder.
Plus I am doing the following as the following that I read from another thread
adb shell
$ su
# mkdir /data/yourname
# chmod 777 /data/yourname
# exit
$ exit
adb push gps.conf /data/yourname
adb shell
$ su
# mount -o remount,rw /dev/block/mtdblock6 /system (copy biggrin.gif)
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock6 /system (copy biggrin.gif)
# mv /data/yourname/gps.conf /system/etc
Click to expand...
Click to collapse

[i9003][Mod] Root XXKPM without CWM

Hi everyone,
this method helps you to achieve root in XXKPM without CWM (which will be available shortly). You will need the attached files and Linux with installed Android SDK. Credits go to ChainsDD for the Superuser binary and APK and to Skin1980 for his normalboot.img repack script. This method is more time consuming than flashing CWM and more risky. Beware!
Flash XXKPE followed by XXKPM via Odin.
Flash the modified normalboot.img as PDA via Odin and do a full wipe. This enables the adb shell to run as root on the device, allows debugging and mock locations.
Now start up Linux and hook up your device to your PC. Do not forget to activate USB debugging in the settings. Follow these directions very carefully, otherwise you might have to reflash or even loose your IMEI!
Run Terminal. In Terminal, gain root access and start adb:
Code:
su
adb start-server
To be sure adb is running and recognized your device, issue
Code:
adb devices
Now the delicate part: Mount /system read-write:
Code:
adb shell
su
At this point, the "$" at the beginning of each line should change to "#". Otherwise, you're not root and can not continue.
Code:
mount -o remount,rw -t yaffs2 /dev/block/stl9 /system
exit
And now push the Superuser files to the device (I am assuming they are lying in your home directory. Otherwise, adjust the path. For example, "su" could be in "/home/user/i9003/su"):
Code:
adb push su /system/bin/su
adb push Superuser.apk /system/app/Superuser.apk
And finally set the correct permissions and remount /system read-only:
Code:
adb shell
chmod 6755 /system/bin/su
sync
mount -o remount,ro -t yaffs2 /dev/block/stl9 /system
exit
Reboot.
After this, you will typically install busybox from the market. But this is up to you. Have fun!
Thanks for the info..r we really need this?coz I've no linux on my desk
Sent from my GT-I9003 using xda premium
AmirolAhmad said:
Thanks for the info..r we really need this?coz I've no linux on my desk
Sent from my GT-I9003 using xda premium
Click to expand...
Click to collapse
it can be done by using command prompt in windows with adb setuped in ur pc..
Anyone tried this method?
confirmed this method works
@g5abiera: I sure hope so
You mention an error in the OP. Can you specify?
Works!
Rooted and Deodexed...
i really don't know what went wrong the first try, i was getting an error telling me there isnt enough space in the partition where the su binary goes. then again, i simply reflashed kpm, and viola, it works.

Help on pushing files to device (ADB)

Hello guys, experiencing another problem now :silly:
Have search all around, couldn't find any valid answers so I decided to ask myself.
So I was just making a rom, which I have already installed. It's based on Cataclysm (personal use only - Till I ask for perm).
I have installed the rom, then I decided to theme some system files. And so I did. I theme the "Settings.apk" for now, and decided to push it to my device instead of installing the whole rom over again. Now mind you when I made roms and modified system apps, pushing these files to the device was straight forward. However on this Hammerhead, I've been running into some issues.
When pushing the file to my device like this
Code:
adb push Settings.apk system/priv-app
.
I get an error that says -
Code:
failed to copy "Settings.apk" to "system/priv-app/Settings.apk" : Read only file system.
So I then decided to try the following -
Code:
[x] adb root - Permission Denied
[x] adb remount - Permission Denied
So then I decided to use some shell commands to set the system as rw, I did the following.
Code:
[x] adb shell
[x] $ su - gave it permission
[x] $ mount -o rw,remount /system - It mounts it.
I then restarted cmd with root permission.
Code:
adb root"
- it restarted however, this time it stated.
Code:
Device not found.
I probably did the wrong thing above, so how exactly can I push files to /system?
SOLVED
Thanks to everyone that answered my question in detail.
The easiest way I know to push files to /system through adb is using a custom recovery . Try with it.
Why not use usb or AirDroid to transfer files?
gee2012 said:
Why not use usb or AirDroid to transfer files?
Click to expand...
Click to collapse
Is it possible to push files to /sustem/priv-app with it?
varuntis1993 said:
The easiest way I know to push files to /system is using a custom recovery . Try with it.
Click to expand...
Click to collapse
How would I do so? I've ever only used recovery to flash. And that was it, thanks if you can guide me through it?
Sent from this toast making Nexus 5, you wish your Nexus could make toast don't you? (;
krishneelg3 said:
Is it possible to push files to /sustem/priv-app with it?
How would I do so? I've ever only used recovery to flash. And that was it, thanks if you can guide me through it?
Sent from this toast making Nexus 5, you wish your Nexus could make toast don't you? (;
Click to expand...
Click to collapse
Boot into recovery and connect the usb cable. Open a cmd prompt.
Code:
adb shell
mount /system
exit
adb push c:\users\krishneelg3\desktopmyfile /system/priv-app
You can also use the "mount system" option in recovery and skip the first 2 commands above.
krishneelg3 said:
How would I do so? I've ever only used recovery to flash. And that was it, thanks if you can guide me through it?
Sent from this toast making Nexus 5, you wish your Nexus could make toast don't you? (;
Click to expand...
Click to collapse
Open recovery, mount system partition and connect it to pc and then normal procedure.
It will be running as adbd to no need to type adb root. Hope this helps
rootSU said:
Boot into recovery and connect the usb cable. Open a cmd prompt.
Code:
adb shell
mount /system
exit
adb push c:\users\krishneelg3\desktopmyfile /system/priv-app
You can also use the "mount system" option in recovery and skip the first 2 commands above.
Click to expand...
Click to collapse
Thank you so much! Greatly appreciated.
Sent from this toast making Nexus 5, you wish your Nexus could make toast don't you? (;
You can still do it through Android, but it's more difficult because adb root doesn't always work (requires kernel) and you have to mount r/w which is just a pain. I always adb push in recovery.
However, here is an example of a successful attempt to adb push on my nexus 5.
Code:
C:\Users\rootsu\Desktop\tools>adb root
adbd is already running as root
C:\Users\rootsu\Desktop\tools>adb shell
[email protected]:/ # mount -o remount,rw /system
mount -o remount,rw /system
[email protected]:/ # exit
exit
C:\Users\rootsu\Desktop\tools>adb push [B][COLOR="Red"]test.txt[/COLOR][/B] /system/
C:\Users\rootsu\Desktop\tools>adb shell
[email protected]:/ # cd system
cd system
[email protected]:/system # ls
ls
addon.d
app
bin
build.prop
core
etc
fonts
framework
lib
lost+found
media
priv-app
[B][COLOR="red"]test.txt[/COLOR][/B]
tts
usr
vendor
xbin
[email protected]:/system #
rootSU said:
You can still do it through Android, but it's more difficult because adb root doesn't always work (requires kernel) and you have to mount r/w which is just a pain. I always adb push in recovery.
However, here is an example of a successful attempt to adb push on my nexus 5.
Code:
C:\Users\rootsu\Desktop\tools>adb root
adbd is already running as root
C:\Users\rootsu\Desktop\tools>adb shell
[email protected]:/ # mount -o remount,rw /system
mount -o remount,rw /system
[email protected]:/ # exit
exit
C:\Users\rootsu\Desktop\tools>adb push [B][COLOR="Red"]test.txt[/COLOR][/B] /system/
C:\Users\rootsu\Desktop\tools>adb shell
[email protected]:/ # cd system
cd system
[email protected]:/system # ls
ls
addon.d
app
bin
build.prop
core
etc
fonts
framework
lib
lost+found
media
priv-app
[B][COLOR="red"]test.txt[/COLOR][/B]
tts
usr
vendor
xbin
[email protected]:/system #
Click to expand...
Click to collapse
Thank you I will keep my eye on this and see if the process is similar. Thanks for the info.
Sent from this toast making Nexus 5, you wish your Nexus could make toast don't you? (;

Cannot Mount system/app rw

I am rooted with magisk and using the follow command to mount /system rw
Code:
adb shell "su -c 'mount -o rw,remount /system'"
I can copy to system/priv-app using:
Code:
adb shell "su -c 'cp sdcard/name.apk system/priv-app/name/name.apk'"
But using this same command I cannot copy to system/app
Code:
adb shell "su -c 'cp sdcard/name.apk system/app/name/name.apk'"
I get the error:
cp: system/app/name/name.apk: Read-only file system
Click to expand...
Click to collapse
What am I doing wrong?
These days, you really don't want to try to modify the distribution filesystems directly. I'm pretty certain that newer ones are compacted/compressed, so there's no room to add anything, anyway. Look into Magisk modules, and do it that way.
creeve4 said:
I am rooted with magisk and using the follow command to mount /system rw
I can copy to system/priv-app using:
But using this same command I cannot copy to system/app
I get the error:
What am I doing wrong?
Click to expand...
Click to collapse
If you're on Android 10 you can't modify system, vendor or product at all due to the pixel phones using logical partitions now. Pretty much if you want to modify anything you must use magisk modules (or you can use /sbin/.magisk/mirror/ but I don't recommend that)
Sent from my Google Pixel 3a XL using XDA Labs
I appreciate the responses, and I understand what you are each saying.
I'm running a custom build of DU pie. I am making modifications and frequently pushing the apks to my phone. It's tedious to push and then have to use a file explorer on my phone to manually move the apk to the correct folder. I am looking for the correct way to mount all /system folders rw so I can script the apk transfer.

Categories

Resources