Removing a file - Nexus 4 Q&A, Help & Troubleshooting

So yesterday i ''adb push''ed a rom onto my device. I searched for the zip in my recovery, and found out that it was in /sdcard/rom.
This is strange, since i can not find it on my sdcard while booted into android.
However, i located the file and it is located in /mnt/shell/emulated/rom.
When i want to install a rom, and i placed it on my phone while booted into android (so the normal MTP mode) i have to go into my recovery, and navigate to /sdcard/0/rom.
Now i just got one problem, i can not delete the rom zip located in /mnt/shell/emulated/rom!
I'm using rootbrowser, and while it is saying that it deleted the file, it just doesnt.
I've already tried changing the permissions, with no succes.
Does any of you know what i should do next?

I take it your using cwm recovery.
This still mounts the sdcard using the old pre multi user ICS method.
Because of multiuser each user would have their own folder 0,1,2 etc. Which is mounted as /sdcard in android.
The true /sdcard is where you have seen at /mnt/shell/emulated/ the 0 folder which takes you to your files is just the folder for the default user.
Now into your problem.
The easiest way to remove the file would just be to boot back into cwm recovery and run;
adb shell rm /sdcard/rom.zip
Sent from my Nexus 4 using xda app-developers app

Worked like a charm!
Was messing arround before while booted into android, and it gave me errors that it did not have permission to delete the file.
While booted into recovery in deleted wonderfully. Thanks again!
Just got one more question, is it possible to delete the directory aswell?
When i try to use the same command it gives me an error and says that it's and directory.
Which command should i use to delete the directory itself?
-Update- Found the command, rmdir, worked like a charm aswell in recovery!

You can use rm -rf to delete the folder and all files inside.
Looks like you didn't need it as the directory was already empty.
Sent from my Nexus 4 using xda app-developers app

Related

[Q] i want swype back please!!!!

Just did everything to my g2 at once today, and lost one of my fav features; swype...i have cyanogenmod-6.1.0-RC3-vision... i went and downloaded the stock rom and pulled the apk file from it and when i installed it, it kept force closing. i even tried pushing it via abd but kept getting errors.. can someone please help
You need to grab libSwypeCore.so from /system/lib and push it to same directory on new ROM.
Sent from my T-Mobile G2 using XDA App
Just download the apk provided by oldsk00lz to recover swype from your clockwork backup. It worked for me.
http://forum.xda-developers.com/showthread.php?t=841603
what are the commands? i have a stock rom downloaded and have the swpe file s sitting on my desktop ready to go..i have the swype.apk and libswypecore.so...i tried transferring them to the app file on the root of my phone and system/lib via astro manager but it wont let me
what page is it on?
Tman0604 said:
what are the commands? i have a stock rom downloaded and have the swpe file s sitting on my desktop ready to go..i have the swype.apk and libswypecore.so...i tried transferring them to the app file on the root of my phone and system/lib via astro manager but it wont let me
Click to expand...
Click to collapse
the first line of code changes your system to READ/WRITE I use root explorer to change it back to READ-ONLY or just reboot.
Code:
adb shell mount -o remount,rw /dev/block/mmcblk0p25 /system
adb push libSwypeCore.so /system/lib
adb install Swype.apk
for the code I wrote to work for you the files need to be in the same folder that the adb.exe runs out of. this is usually located in the tools folder in the android SDK otherwise you have to type the full path ie
this is on windows 7 on my computer so file path will be different for you
Code:
adb push C:\users\etnie\downloads\G2\libSwypeCore.so /system/lib
hope that helps

Rooted, still can't delete News & Weather

Hi,
I used Unrevoked's one-click Mac .app to root my Aria. I can boot into Recovery fine, but perhaps pertinently (perhaps not) there's a weird loop I can't get out of: (bottom of post at http://forum.xda-developers.com/showthread.php?t=829439)
Anyways, I installed CM6.1-Liberty afterwards using ROM Manager. Now I would like to delete the News and Weather application, but I'm finding it difficult:
I've tried with the Super Manager application, a ROOT manager. It has SuperUser permissions, it tried to mount /system as R/W when I navigate to it, but when I rename the .apk file, the file retains its old name.
I've also tried booting into Recovery, mounting /system from the Partitions menu, then using the Terminal Emulator to do 'mv /system/app/blah.apk /system/app/blah.apk.bak.' But mv complains that the directory is not empty! (are .apk's even considered directories?)
Is something messed up with my ROM? Anything else I can try?
With the phone in recovery and /system mounted, using terminal try navigating to the actual /system/app folder and then removing the .apk. Not sure if its the same as windows, which is the rm command.
rm application.apk
Sent from my cm6.1 Aria using XDA App
It worked! Booted into Recovery, mounted /system, connected via USB, opened up an adb shell, and was able to move the desired apk.
I tested this moving HtcLockScreen.apk on my Liberated ROM. Will try to move the News & Weather application on the CM ROM too, but I don't see why it wouldn't work.
Thanks!!!
All good. Thank you so much.
I've gotta wonder now: what is it about Recovery that lets you do this? I can't find much (if any) hard info on Recovery online, or hboot/fastboot for that matter. It's a little annoying having to power down my phone to adb stuff around, then powering back up.
ninestraycats said:
All good. Thank you so much.
I've gotta wonder now: what is it about Recovery that lets you do this? I can't find much (if any) hard info on Recovery online, or hboot/fastboot for that matter. It's a little annoying having to power down my phone to adb stuff around, then powering back up.
Click to expand...
Click to collapse
I think it had to do with the fact that the aria is an s-on device (don't quote me on that). Whatever it is, the system can't be modified while android is running on the aria, so you have to boot into recovery to do it.
Sent from my cm6.1 Aria using XDA App
CallMeAria said:
I think it had to do with the fact that the aria is an s-on device (don't quote me on that). Whatever it is, the system can't be modified while android is running on the aria, so you have to boot into recovery to do it.
Sent from my cm6.1 Aria using XDA App
Click to expand...
Click to collapse
Not quite... You can put Titanium Backup into "Chuck Norris" mode and it will let you delete some system apps. Another easy way to achieve the same is to unzip the ROM, delete the .apk and .odex files you do not want, rezip it and re-flash. Bingo... the stuff you do not want is gone. You need to know what you are deleting though, some stuff is used by the system and other apps.
For anyone else whos wondering how to delete a non-uninstallable apk this is how I usually do it on windows (should be the same on mac too.)
- boot into recovery
-open new command promp
-adb shell mount /system
-adb shell rm -r /sysytem/app/apkname.apk
done and done, note letter case matters in apk name.
U can also extract the rom on ur computer and delete the .apks u don't want
Sent from my Liberty using XDA App

Integration of user app to rom?

Hey guys does anybody know how to do it? After installation of rom? Can it be done via adb or from phone itself?
I know I can do it before flashing, but what about after flashing?
TB can do it with some app( newer version of system apks) but what about others?
Sent from my HTC HD2 using xda premium
to install system apps:
From computer:
adb push yourapp.apk /system/app/
From your phone:
su
cp /sdcard/yourapp.apk /system/app/
Marvlesz said:
to install system apps:
From computer:
adb push yourapp.apk /system/app/
From your phone:
su
cp /sdcard/yourapp.apk /system/app/
Click to expand...
Click to collapse
But its tough, I got more than 20 app to do it. So is there any app that can do it?
Also Cp means copy right? So is it copy or move?
Sent from my HTC HD2 using xda premium
If you want to do it before flashing,
If you want to integrate it with system (uninstallable unless using a root explorer or titanium backup):
Open your rom's .zip file put it in the:
Code:
/system/app/
Note: be careful when putting large applications because this will be installed to your 'system' partition and if it is low, you might end up in a bootloop.
If you want to install it like a normal app:
Code:
Create new folder named 'data' if it's not present. Create a new folder in it named 'app'. Then, put your .apks.
Note: This folder will go to your 'userdata' partition.
P.S: Please refrain from putting large .apks files because they make your partition's space low or cause a bootloop.
showlyshah said:
But its tough, I got more than 20 app to do it. So is there any app that can do it?
Also Cp means copy right? So is it copy or move?
Sent from my HTC HD2 using xda premium
Click to expand...
Click to collapse
More than one app? no problem, simply do what geek had said.
Create a folder on your sdcard (for example /sdcard/apps-to-install/)
Put all your apks there and then to copy them using the terminal like this:
su
cp /sdcard/apps-to-install/* /system/app/
If you don't want to do this, you can also create a directory with the name /app/ and merge it with the one on your device.
And yes, cp stands for copy, I'd rather copy files and then delete them manually than moving them.
But DO NOT MOVE SO MANY APPS, as this will be taking from your internal memory, make sure you only move important/systematic apps. Otherwise, copy them to your sd-ext.

Any way to sideload

I recently rooted my phone. I have not installed any ROMs because i love the stock rom so much but i decided to try one today. I didnt have my computer with me so i downloaded one today and rebooted into recovery. I saved my current rom and then wiped and accidently pressed Data, it asks if i want to wipe everything and i press back. I go to look at my downloads and they are all gone. I look for my backup i had JUST nandroid backed up and it was gone.
So there i am stuck. There is a thread for returning to Stock rom. Sure ok, but its a long process including the 2 gig download which is only uploading at 260mbit/s so another hour or 2.
I have tried sideloading a rom but it fails.
Any suggestions on how to get a rom onto the phone without booting it? I dont have a micro usb to sd card or i would have done that already =/
You need adb on the pc, connect, then in terminal or cmd
Code:
adb push ROM.zip /sdcard
Copying the zip to the folder with adb makes it easier and the above command correct, (of course replace ROM.zip with the actual name).
Sent from my Nexus 7 using Tapatalk
fr4nk1yn said:
You need adb on the pc, connect, then in terminal or cmd
Code:
adb push ROM.zip /sdcard
Copying the zip to the folder with adb makes it easier and the above command correct, (of course replace ROM.zip with the actual name).
Sent from my Nexus 7 using Tapatalk
Click to expand...
Click to collapse
via sideload or no?
No. Sideload could work, I don't remember the command off hand.
Adb push copies it to the internal memory then you flash through the menu normal.
Sent from my Nexus 7 using Tapatalk
fr4nk1yn said:
You need adb on the pc, connect, then in terminal or cmd
Code:
adb push ROM.zip /sdcard
Copying the zip to the folder with adb makes it easier and the above command correct, (of course replace ROM.zip with the actual name).
Sent from my Nexus 7 using Tapatalk
Click to expand...
Click to collapse
I gave you thanks.
That seems to work. For anyone that gets into this situation where there are no roms in your phone and you have no way to transfer them. Boot into TWRP, do not use sideload. Just main screen. Device manager will show to be just "g2" and you need the driver. In the driver folder from http://forum.xda-developers.com/showpost.php?p=48709232&postcount=869 driver section, update driver and browse to 64BitADB and choose androidandadb. It will then give you a list of options starting with Testing drivers, one that dates back to 2010 and another thats 2012. You want the one thats 2nd from the bottom called LG G2 verizon net adb or something like that. Works perfect and connects to adb.
If anyone truely needs this process i can break it down to specifics on how to get it to work. Thanks so much for your help fr4nk1yn!

Can't delete file in system folder even though I'm rooted

I'm trying to delete the audio conf file in system/vendor/etc but it won't let me. I'm rooted and running Pure Nexus.
Also when I go into the recovery and try to use the file manager it doesn't show me any files in that folder even though there are files in there.
I just updated the Rom the other day. What could have gone wrong?
Sent from my Nexus 7 using Tapatalk
you need to mount the system partition as writable first. Issue from the dos command prompt:
adb root
adb remount
and then try again and it should work.
*EDIT* that's from within the normal system. You're also asking about recovery. In that case you need to mount /system first. Click on the 'mount' button inside TWRP and select system and vendor. Then you should be able to delete the file too (make sure you didnt select 'mount system partition read-only'). So that's a solution if you don't have adb installed.
gekkehenkie11 said:
you need to mount the system partition as writable first. Issue from the dos command prompt:
adb root
adb remount
and then try again and it should work.
*EDIT* that's from within the normal system. You're also asking about recovery. In that case you need to mount /system first. Click on the 'mount' button inside TWRP and select system and vendor. Then you should be able to delete the file too (make sure you didnt select 'mount system partition read-only'). So that's a solution if you don't have adb installed.
Click to expand...
Click to collapse
The worked when I did it in the recovery. Thanks so much
Sent from my Nexus 6P using Tapatalk

Categories

Resources