Copying Vending.apk - Can't 'cp' after running SU - Kindle Fire General

I am trying to move the vending.apk into system/app from the command line.
I was going to use ES File manager. However, when I try to do 'root explorer' it fails. I do still believe I have a working root because SU works from the adb shell..
Here is what is driving me crazy, I can't seem to move or copy the file from the adb shell after I root and mount the folder as read/write.
I run these commands to set permissions and mount it read/write.
SU
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
However after running SU it returns 'cp not found' when I try to run cp to copy the file. Example...
# cp /mnt/sdcard/Vending.apk /sytem/appVending.apk
cp: not found
If I try to move it, it returns this error.
# mv /mnt/sdcard/Vending.apk /system/app/Vending.apk
failed on '/mnt/sdcard/Vending.apk' - Cross-device link
Is there something else I need to do to move or copy after running SU?

You would first have to fix the mount command because it's not a yaffs2 filesystem, and it's not /dev/block/mtdblock3. The correct command should be "mount -o remount,rw -t ext4 /dev/block/mmcblk0p9". Then try to copy it over to /system/app.
If it still fails, you can adb push it to /system/app after having mounted the partition in read/write.

i just moved it with explorer myself

Try to rename it from .apk to .jpg and copy it with ES File Manager. If it's successful rename it back to .apk after it's in /system/app.

Related

problem in rooting hero

can anybody answer my why i keep getting this message
C:\android-sdk-windows\tools>adb push recovery-RA-heroc-v1.5.2.img /sdcard
failed to copy 'recovery-RA-heroc-v1.5.2.img' to '/sdcard/recovery-RA-heroc-v1.5
.2.img': Permission denied
what do I have to do to get permission granted?
thanks in advance
Is your SD card mounted? It cant be mounted to your computer when running adb to it or you will get this error.
limbicsystem said:
can anybody answer my why i keep getting this message
C:\android-sdk-windows\tools>adb push recovery-RA-heroc-v1.5.2.img /sdcard
failed to copy 'recovery-RA-heroc-v1.5.2.img' to '/sdcard/recovery-RA-heroc-v1.5
.2.img': Permission denied
what do I have to do to get permission granted?
thanks in advance
Click to expand...
Click to collapse
I have had that problem before if you have gotten to that step in the guide then you are already rooted you just need to flash the recovery. just mount your card and manually copy the file to the root of your sd card then unmount and use this code
Code:
cd /androidsdk/tools/
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /sdcard/
flash_image recovery recovery-RA-heroc-1.5.2.img
wait for the # symbol to come back up and then type
Code:
reboot recovery
this is what i get when i try to do it manually
C:\android-sdk-windows\tools>adb shell
$ su
su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cd /sdcard/
cd /sdcard/
# flash_image recovery recovery-RA-heroc-v1.5.2.img
flash_image recovery recovery-RA-heroc-v1.5.2.img
error opening recovery-RA-heroc-v1.5.2.img: No such file or directory
# flash_image recovery recovery-RA-heroc-1.5.2.img
flash_image recovery recovery-RA-heroc-1.5.2.img
error opening recovery-RA-heroc-1.5.2.img: No such file or directory
i tried to put the v in front of the one because thats how it was listed but it still didn't work. does it help to say that i bought this three days ago?
flash_image recovery recovery-RA-heroc-1.5.2.img
i have the same problem. can anyone help? I download (flash_image recovery recovery-RA-heroc-1.5.2.img) on to pc but it seems that it wont open the file to read. I copy the file on xp and vista. even copy it manually on the sd/card? can anyone help?
Pre-Kitchen.
limbicsystem said:
this is what i get when i try to do it manually
C:\android-sdk-windows\tools>adb shell
$ su
su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cd /sdcard/
cd /sdcard/
# flash_image recovery recovery-RA-heroc-v1.5.2.img
flash_image recovery recovery-RA-heroc-v1.5.2.img
error opening recovery-RA-heroc-v1.5.2.img: No such file or directory
# flash_image recovery recovery-RA-heroc-1.5.2.img
flash_image recovery recovery-RA-heroc-1.5.2.img
error opening recovery-RA-heroc-1.5.2.img: No such file or directory
i tried to put the v in front of the one because thats how it was listed but it still didn't work. does it help to say that i bought this three days ago?
Click to expand...
Click to collapse
You are getting that error because it can not find the specified file. Try this:
When your phone is plugged into your computer, mount your SD card. Then, using Windows Explorer (On your computer) look at your SD card and see if the Recovery IMG is there. If it is, this should work. If it is not, simply click and drag the 1.5.2 Recovery img onto your SD in the root folder (there isn't a folder called root, it simply implies the main/top level folder. The img should not be in any subfolders). Once the Recovery img is on your SD card, then on your phone unmount the SD card, and try your commands again.

[Q] Unable to install/copy files in Emulator ???

Hello,
I am a newbie on this site and android development. I want to installa nd run openvpn to my emulator. I am using these 2 sites for reference :
1)
chengdu110.wordpress com
2010/08/14
want-openvpn-work-on-android-device
2)
android.modaco
content
software
291919
openvpn-on-android/
I am facing couple of problems. From 1st site, I can't copy busybox to system/xbin folder. I get no access, permission failure, etc such messages. Am stuck at this point and thus can't proceed ahead. In Part 2 also need to access /system/lib/ where again problem comes.
In site 2, same cannot access /system/lib or /system/bin folder. Even I can't mount like this : ADB shell mount /system
Command mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system from site 1 was successful.
Even I face problems with cp cmd. Just cp libcrypto.so libcrypto-orig.so doesn't work. I got to give "/system/lib/libcrypto.so cp libcrypto.so libcrypto-orig.so" this format only it copies. Though in the above case "Permission denoed" occured for system/lib. But this foramt worked while copying busybox file.
Can anyone help me with the permission to system folders /xbin, /lib, /bin. Why is mounting required ? Why I am not able to mount directly as mount /system; I need to give full command mount -o rw, .... -t .... /system. I am not sure what all to give in the "..." place - had just copied it from site 1.
Any help, guidance is highly appreciated. I use Eclipse DDMS and Android emulator 2.3.3. Please try to help me.

[Q] Cant cp or mv modules to dir "access denied"

I am trying to copy modules to /system/lib/modules/. I have rooted with Gingerbreak. I have superuser permissions both with adb and from terminal emulator. I have changed system to rw both from TE and with ADB. I used this command: mount -o remount,rw -t ext4 /dev/block/mmcblk0p3 system/ What am I doing wrong. System shows up as mounted rw when checking with cat /proc/mounts
Well, that basically works for me, but unless you did a typo on the "system/" only in the forums you got it slightly wrong.
su
mount -o remount,rw /dev/block/mmcblk0p3 /system
Click to expand...
Click to collapse
You don't need the "-t ext4" option.
Do I need busybox? It wasn't a typo. I get "permission denied" when I try to push the file. Not "access denied" as in the name. If it makes any difference. I have tried to cp from adb shell also. Same problem.
After installing busybox all went fine.

Unable to read/write in /system

I have been trying to add/remove files in my /system directory but I'm having quite the difficulty.
The adb terminal already has SU access, I get a #.
I've tried mount -o remount,rw /system and then going back into ASTRO to paste something but it won't let me
I did also try cd /system after trying that but it doesn't do anything....
I've also tried adb remount but I get access denied.
Is it that I need Root Explorer or is there no avail?

Unable to mount System as rw in 7.1.1 DP

I am trying to create an overlay folder under /system/vendor so that I can throw a layers apk there to hide the nav bar. I am currently using the build.prop method which doesn't work nicely with the Now on Tap action of Swipe Navigation which is what I am ultimately trying to fix.
I tried using Solid Explorer to simply create the new directory like I did previously in 7.0 and 6.x but was unable to do so (action failed). I decided to try using the terminal and create the folder and move files from there but got the message that the system was read-only. I then attempted to mount system a few different ways all of which failed. I did use su before entering these commands.
Code:
angler:/system/vendor $ mkdir overlay
mkdir: 'overlay': Read-only file system
angler:/system/vendor $ mount -o rw,remount,rw /system
mount: '/dev/block/platform/soc.0/f9824900.sdhci/by-name/system' not user mountable in fstab
angler:/system/vendor $ /system/bin/mount -o rw,remount,rw /system /system
mount: '/system' not in /proc/mounts
angler:/system/vendor $ /system/bin/mount /system
mount: bad /etc/fstab: No such file or directory
Googling around didn't yield much in the way of solutions other than these different methods of mounting system. Am I just unable to mount system as rw in 7.1.1 currently, and if so, is there another way to accomplish what I want?
I'm trying to find thread I read this from, so if I find it I'll post link to it. When I was on early 7 previews that was set up with systemless root I went into twrp and then went to terminal and typed the following, touch su. When your in terminal cd to both bin and xbin and type command "touch su" without quotes. Then reboot and you should be able to use something like es file explorer to get into and write in /system. Hope that helps.
Found it, look to post = 15
http://forum.xda-developers.com/nexus-6p/help/es-file-explorer-doesnt-understand-t3242775
Unfortunately that did not end up working for me, thanks for looking up the link for me though!
On Nougat the rw mount command should be typed like this:
mount -o rw,remount /system
then for touch:
touch sbin/su
Thank you blitz for clarifying.
Hmm... it seems like the mount worked but the touch did not. I ended up using just "touch su" but ran into a different error with mkdir. I think I may just be out of luck for now. Thank you both for your help!
Code:
~ # mount -o rw,remount /system
~ # cd /system/bin
/system/bin # touch sbin/su
touch: sbin/su: No such file or directory
/system/bin # touch su
/system/bin # cd /system/xbin
/system/xbin # touch su
/system/xbin # cd /system/vendor
/vendor # mkdir overlay
mkdir: cannot create directory 'overlay': No space left on device
AbuShabanov said:
Hmm... it seems like the mount worked but the touch did not. I ended up using just "touch su" but ran into a different error with mkdir. I think I may just be out of luck for now. Thank you both for your help!
Code:
~ # mount -o rw,remount /system
~ # cd /system/bin
/system/bin # touch sbin/su
touch: sbin/su: No such file or directory
/system/bin # touch su
/system/bin # cd /system/xbin
/system/xbin # touch su
/system/xbin # cd /system/vendor
/vendor # mkdir overlay
mkdir: cannot create directory 'overlay': No space left on device
Click to expand...
Click to collapse
I'm not sure what you're trying to accomplish but still:
The touch sbin/su means creating an empty file called su in the sbin subdirectory under the current directory. So if there is no subdir named sbin under /system/bin, then it's not going to work
Secondly, you should know about the ls command: ls -la lists the files in the current directory, and remember than in unix and linux terminology, a directory is also a file so you'll also see directories (including current "." and parent "..")
Third, you should know about the df command which shows filesystem disk space usage. df -h will show you how much free space you have an all of your filesystems, including system.
Last, with great power comes great responsibilities. Running the wrong command as root will easily make your system unusable.
I have substratum installed and inside /system/vendor there is a link (again a file) called overlay which links to directory /system/overlay where apks are.
rchtk said:
I'm not sure what you're trying to accomplish
Click to expand...
Click to collapse
I am trying to create an overlay folder under /system/vendor so that I can throw a layers apk there to hide the nav bar.
rchtk said:
I have substratum installed and inside /system/vendor there is a link (again a file) called overlay which links to directory /system/overlay where apks are.
Click to expand...
Click to collapse
Are you on the 7.1.1 (NPF10C)? If so it sounds like you have accomplished what I am trying to do. I'm only familiar with the basic unix commands as I haven't actively used it in about 5 years. Would you mind sharing how to create the link to /system/overlay from /system/vendor, or does Substratum take care of that? Offhand it sounds like a symbolic link but my terminology is pretty rusty.
AbuShabanov said:
I am trying to create an overlay folder under /system/vendor so that I can throw a layers apk there to hide the nav bar.
Are you on the 7.1.1 (NPF10C)? If so it sounds like you have accomplished what I am trying to do. I'm only familiar with the basic unix commands as I haven't actively used it in about 5 years. Would you mind sharing how to create the link to /system/overlay from /system/vendor, or does Substratum take care of that? Offhand it sounds like a symbolic link but my terminology is pretty rusty.
Click to expand...
Click to collapse
Yes 7.1.1.
Substratum created the overlay directory and the link to it.
Manually that would be:
mount -o rw,remount -t auto /vendor
mount -o rw,remount -t auto /system
mkdir /system/overlay
cd /system/vendor
ln -s /system/overlay
mount -o ro,remount -t auto /vendor
mount -o ro,remount -t auto /system
But links do take a very small amount of bytes (roughly name and target) so for that, you'll need some space in your vendor partition (no space left on /vendor). check with "df".
I have 3.8MB free (that's an original vendor + overlay link)
rchtk said:
mount -o rw,remount -t auto /vendor
mount -o rw,remount -t auto /system
mkdir /system/overlay
cd /system/vendor
ln -s /system/overlay
mount -o ro,remount -t auto /vendor
mount -o ro,remount -t auto /system
Click to expand...
Click to collapse
Well, this works and I was able to mount system and vendor, create the link, move the apk file, etc but it appears that the apk itself is not working on NPF10C. Thank you for your help and the refresher on the unix commands!

Categories

Resources