So i have rooted my HTC desire phone, now i wonder if is it posibble to remove any stock applications from it, without flashing someones rom.
Apps like, Flick, Footprints, Google Talk, Peep, Quickoffice, Stocks.
This are the apps i would like to remove, or atleast make them stop starting and restarting each time i kill them with some task manager.
Yes, it's possible.
You have to do all the steps of rooting till you'll reach "recovery" mode (just before wipe and flash).
than just run the debugger
Code:
./adb shell
withing the shell
Code:
mount /system
list your apps with:
Code:
ls /system/app
now you can delete app:
Code:
rm /system/app/FriendStream*
and so on
It's good idea to backup your apps on sdcard
Code:
mount /sdcard
mkdir /sdcard/backup
cp /system/app/* /sdcard/backup
after work is finished
Code:
umount /sdcard
umount /system
reboot and you're done
It's good idea to wipe data after removing apps to avoid some junk in app manager.
Wow! Thanks a lot for that!
I was trying adb commands with the phone in USB Disk Drive mode (debugging enabled) and I couldn't touch anything off the /system partition.
It never occurred to me to try in Recovery mode though
by saying it's a good idea to wipe data after removing some apps do you mean hard reset ??? or this just deletes the junk files?????
also do i need to flash the rooted update for this or just enter recovery mode ?
Hey i have really messed up my nexus 4.Please help.I'll tell you my problem in short:I have flashed recovery.img onto userdata by mistake using quikIMG.So now the phone got reset and the whole phone was seemed wiped.There was nothing on the phone.Thats what i assumed after peeking into galary/music etc but when i connected my phone to the pc it is showning that the phone's 10gb is used.Basically it is showing that the data is still there.Can you tell me any way to bring back the data?
Try factory reset
This may or may not work, no guarantees. This will be difficult, time consuming, and you must do everything exactly as written; so read it first and ask questions before you begin. I am using a Windows PC, most of these commands will be similar on other OS's, those when in the adb shell are identical. This will require adb and a custom recovery (I use TWRP, so I'll be able to offer TWRP specific help quicker), find a method to flash that before you begin, and find where that recovery keeps it backup files. Also this will require you to flash a rooted ROM, of the same android version you had before: if you had stock, I recommend you flash stock and root it; either way, have that ready to go before you start. Lastly, the worst case scenario will require you to have a linux system and possibly some kind of removable media (USB stick, external HDD, etc), you can just boot a linux live disk, and that's what I'll be doing with Ubuntu; again, have this ready first. There will come a point about mid way through, where, depending on the results you may need to wait for me to follow up with you, I will try to do this in a timely manner, but I can't promise anything.
Basically what we are going to do is explore the file system in an adb shell while it is booted to a custom recovery, hopefully from there your /data and /sdcard partitions will still be intact; if they are not we may still be able to recover some of your data. If they are intact you can simply use the recovery to make a backup of them.
And so, with your phone connected to your computer, boot to recovery. Then open a command prompt and enter:
Code:
adb shell
cat /proc/mounts
The output will look like:
/dev/block/mmcblk0p23 /data ext4 rw,relatime,data=ordered 0 0
/dev/block/mmcblk0p23 /sdcard ext4 rw,relatime,data=ordered 0 0
/dev/block/mmcblk0p22 /cache ext4 rw,relatime,data=ordered 0 0
Click to expand...
Click to collapse
First is the block, then the mount point, then the file system type, last is information about how recovery treats it.
If you do not see /dev/block/mmcblk0p23 associated with a mount point then enter:
Code:
mount -o rw /dev/block/mmcblk0p23 /data
mount -o rw /dev/block/mmcblk0p23 /sdcard
If you get an error on both of these then skip to the breakt.
Now check both these directories to ensure it is the data you expect it to be, enter:
Code:
cd /data
ls
cd /sdcard
ls
Maybe go down a few levels to confirm your data is really there. If the output doesn't look right, then skip to the break.
Otherwise, enter:
Code:
exit
Use the phone screen to navigate to the backups menu and backup data.
When the backup is complete use adb pull to copy the backup onto your computer, this may take a very long time.
Code:
adb pull /sdcard/TWRP TWRP
Now flash your ROM, including a data wipe, and boot it, once it is running fully, reboot into recovery and push the backup to the phone.
Code:
adb push TWRP /sdcard/TWRP
Use the phone screen to restore the data.
--------------------THE BREAK, cause XDA automagically made these two posts one, ****ers--------------------
Hopefully you got this sorted out with the first part, this part may not work at all, and it will be a lot more tedious if it does. So, at this point something happened which indicates /mmcblk0p23 really did lose the data, so we'll just copy the whole thing and explore that copy in linux to extract what data you can.
With the phone in recovery, and a command prompt in an adb shell:
Code:
dd if=/dev/block/mmcblk0p23 of=/tmp/userdata.ext4
This may take a REALLY long time. When it is done, enter:
Code:
exit
adb pull /tmp/userdata.ext4
This will take just as long or longer. Transfer userdata.ext4 to your removable media device. And boot to your linux setup. Open a terminal window in the directory with userdata.ext4 enter:
Code:
sudo mkdir userdata
sudo mount -o loop userdata.ext4 userdata
cd userdata
ls
Now if any of your data still exist in a form I'd be able to help you recover, it will be in this directory, userdata. If you see something that you recognize, or that you know you need, copy it and save it to the removable media. After that you can reboot your system.
Go ahead and flash your new ROM now, let it fully book, and then copy back whatever you managed to save.
I kinda lost steam there toward the end, sorry, it's 0316 here. If anything is unclear ask away. Good luck.
Today I tried to enable ART on my S3 Mini running Maclaw's CM11. After the phone was shut down, the CM loading circle stayed there forever and the phone didn't boot.
To fix this you can boot the phone into recovery (I'm using CWM) and use ADB to revert the runtime back to Dalvik.
There are 3 ways to do this:
Use the following manual instructions
Download the second attachment and run the batch file, while the phone is connected using a USB cable and in recovery mode. For this you need USB drivers installed.
Download the first attachment and flash it in recovery
Manual instructions
Boot to recovery
Open the shell
Code:
adb shell
Now, while in the shell, the data filesystem must be mounted.
Code:
mount /data
Still staying in the shell, use the following command to set Dalvik as the runtime of choice.
Code:
setprop persist.sys.dalvik.vm.lib libdvm.so
Now the /data-filesystem can be unmounted using
Code:
umount /data
Type exit in the shell to exit ADB shell.
Reboot the phone and it should get past the loading circle again
If anything goes wrong, I'm not responsible
Very good idea. Thanks
I am not sure, but maybe it is possible to set property from recovery update script?
Such script, downloaded onto phone and accessible from recovery would be better, than PC with USB drivers and a cable
piskor said:
Very good idea. Thanks
I am not sure, but maybe it is possible to set property from recovery update script?
Such script, downloaded onto phone and accessible from recovery would be better, than PC with USB drivers and a cable
Click to expand...
Click to collapse
Thank you for the idea, implemented it now and added to the OP.
dextrey said:
Thank you for the idea, implemented it now and added to the OP.
Click to expand...
Click to collapse
Excellent, thanks
Updated to mount the /data filesystem directly using the fstab entry. Also changed the recovery-flashable .ZIP to use a temporary BusyBox for all commands, because I'm not completely sure about the filesystem differences between different ROMs and recoveries (the locations of binaries such as mount and umount)
Thanks!!!
Very useful!!
Thanks, this worked. I was on CM11 nightlies and read an article about ART and switched it from Dalvik, phone app crashed and wouldnt let me boot in. Although I'm using HTC One, this method worked for me.
For TWRP users, boot into recovery and go into Advanced, and then use terminal to command the type the main line to switch to Dalvik, no need to adb shell and mount data.
Fixed my HTC ONE m7 that got brinked when selecting ART.
dextrey said:
Today I tried to enable ART on my S3 Mini running Maclaw's CM11. After the phone was shut down, the CM loading circle stayed there forever and the phone didn't boot.
To fix this you can boot the phone into recovery (I'm using CWM) and use ADB to revert the runtime back to Dalvik.
There are 3 ways to do this:
Use the following manual instructions
Download the second attachment and run the batch file, while the phone is connected using a USB cable and in recovery mode. For this you need USB drivers installed.
Download the first attachment and flash it in recovery
Manual instructions
Boot to recovery
Open the shell
Code:
adb shell
Now, while in the shell, the data filesystem must be mounted.
Code:
mount /data
Still staying in the shell, use the following command to set Dalvik as the runtime of choice.
Code:
setprop persist.sys.dalvik.vm.lib libdvm.so
Now the /data-filesystem can be unmounted using
Code:
umount /data
Type exit in the shell to exit ADB shell.
Reboot the phone and it should get past the loading circle again
If anything goes wrong, I'm not responsible
Click to expand...
Click to collapse
Thank you, thank you, I'm in great debt for this.
Can recommend the method if you are running viperOne 6** on a HTC one m7 (bulletproof kernel).
NB:
My ADB was totally broken, but I wrote all commands in the TWRP terminal window, and it reverted my phone back to dalvic from ART!
Is it possible to fully implement f2fs file system? Any details in forums/sites regarding f2fs implementation are pretty outdated.. So with the new nougat and twrp 3.0 is it safe and advisable to take the step? Trivial matter yeah but still thank you for the time!
Gulbuddin said:
Is it possible to fully implement f2fs file system? Any details in forums/sites regarding f2fs implementation are pretty outdated.. So with the new nougat and twrp 3.0 is it safe and advisable to take the step? Trivial matter yeah but still thank you for the time!
Click to expand...
Click to collapse
F2FS /system might not be worthy, as /system should be read-only. What you can do is trying to convert /data and /cache, as there is more read on those partitions.
casual_kikoo said:
F2FS /system might not be worthy, as /system should be read-only. What you can do is trying to convert /data and /cache, as there is more read on those partitions.
Click to expand...
Click to collapse
Then i assume i can safely convert /data and /cache? Any specific tutorial for the op2 or can i refer general ones (other device tutorial available on the web)? If you happen to know any can you please provide the link.. It'll be much helpful!
Gulbuddin said:
Then i assume i can safely convert /data and /cache? Any specific tutorial for the op2 or can i refer general ones (other device tutorial available on the web)? If you happen to know any can you please provide the link.. It'll be much helpful!
Click to expand...
Click to collapse
/!\ Everything will be erase on your phone ! /!\
Please before you do anything, read the full post. Please.
Code:
#include "disclaimer.h"
#include <stdio.h>
int main()
{
char *disclaimer="Don't take me responsible if your phone explodes. Or if your phone became a banal sheet of paper. Or if this your parents\' phone and they lost everything.\nYou understood me, I take no responsibilities.";
printf("%s", disclaimer);
return(0);
}
Alright, so, let's go.
/!\ All kernel doesn't support F2FS file format /!\
For example, Boeffla's one doesn't not. Do it, and you WILL NOT be able to mount your data partition.
I assume you already have backup your sdcard?
If not:
Code:
adb pull /sdcard /path/to/backup/on/your/pc
This is for Linux, if you're on Windows, replace "/" with " \ " , so:
Code:
adb pull /sdcard C:\path\to\backup\on\your\pc
This operation might be long, it took me around 30-40 minutes to complete.
Next, reboot into recovery. I assume you have latest version installed, which, currently, is 3.0.2-2.
So, you are now in recovery.
Go to "Wipe", "Advanced Wipe", select "Cache" partition, "Change File System", and select "F2FS", and finally "Swipe to change".
/!\ Be aware next step will erase EVERYTHING on your phone /!\
Do same steps for "Data" partition.
OMG, casual_kikoo I don't have anything on my phone. You screwed me up
Click to expand...
Click to collapse
Calm down. we format everything, so normal.
Connect your phone to your PC, and either push a ROM (LineageOS from Grarak for example) with adb to your phone
Code:
adb push lineage-14.1-20170108-UNOFFICIAL-oneplus2.zip /sdcard
or re-push all your /sdcard content
Code:
adb push /path/to/your/sdcard/backup/on/your/pc/ /sdcard
Same thing as backup, change "/" with " \ " if you are on Windows.
OMG casual_kikoo you screwed me twice, WhatsApp can't send or receive pictures after I pushed all my sdcard folder
Click to expand...
Click to collapse
Relax bis, this is a permissions problem. Easily fixable.
Reboot into recovery and plug your phone to your PC;
Code:
chown -R media_rw:media_rw /data/media/
find /data/media/ -type d -exec chmod 775 {} ';'
find /data/media/ -type f -exec chmod 664 {} ';'
restorecon -FR /data/media/
this will restore rights permissions.
Should be enough for you, enjoy.
Edit: Try to install a new ROM instead of restoring a previous backup from TWRP after you did all steps.
If you really want to restore a ext4 backup, go to "Settings", and check "use rm -rf instead of formatting", or while restoring, TWRP will re-format all your partition into ext4 format.
But go for clean flash, always better and will avoid you many problems.
Thank you sooo much!
Does this method also convert the system to f2fs @casual_kikoo
vignesh95 said:
Does this method also convert the system to f2fs @casual_kikoo
Click to expand...
Click to collapse
No, as said it only converts /data and /cache. You can convert /system if you want, just do same steps as above, but select /system instead of /data or /cache. But as I told previously, I think IO operations shouldn't be noticeable as /system is (normally) read-only.
/system can't ne concerted tout F2FS, as ROM you flash after converted will convert it back to EXT4
Actually f2fs works on boeffla kernel. Ive used it personally.
Now Andi doesnt support f2fs and thats a different thing
suraj.das said:
Actually f2fs works on boeffla kernel. Ive used it personally.
Now Andi doesnt support f2fs and thats a different thing
Click to expand...
Click to collapse
On which partition ? 'cause I remembered try it once and /data wasn't mountable on my file explorer (Solid Explorer). Good to know, however, Andi doesn't support F2FS, so if his kernel is flashed on F2FS partition, the person who flashed it is on it own.
casual_kikoo said:
You can convert /system if you want, just do same steps as above, but select /system instead of /data or /cache.
Click to expand...
Click to collapse
No, you can't. Flashing a ROM will format System back to EXT4.
casual_kikoo said:
On which partition ? 'cause I remembered try it once and /data wasn't mountable on my file explorer (Solid Explorer)
Click to expand...
Click to collapse
Works fine for me.
F2FS on data and cache.
I'm on Dirty Unicorns with the latest Boeffla kernel.
casual_kikoo said:
On which partition ? 'cause I remembered try it once and /data wasn't mountable on my file explorer (Solid Explorer). Good to know, however, Andi doesn't support F2FS, so if his kernel is flashed on F2FS partition, the person who flashed it is on it own.
Click to expand...
Click to collapse
/data and /cache
I turned /data and /cache to F2FS like month ago and I didn't have any problems with any ROM I tried. It worked well even with SuperSU.
iCapa said:
No, you can't. Flashing a ROM will format System back to EXT4.
Works fine for me.
F2FS on data and cache.
I'm on Dirty Unicorns with the latest Boeffla kernel
.
Click to expand...
Click to collapse
Oh yes, didn't remembered that, sorry!
iCapa said:
Works fine for me.
F2FS on data and cache.
I'm on Dirty Unicorns with the latest Boeffla kernel.
Click to expand...
Click to collapse
I have tried it too. But boeffla config app doesnt seem to recognized the kernel very well. In fact, says that the app is not compatible (something like that) and then closes. Not option can be configure through the boeffla's app. Do you have the same problem?
seems that F2FS is not working only on OOS 3.x, and it works with boeffla kernel well
xarisCY said:
I have tried it too. But boeffla config app doesnt seem to recognized the kernel very well. In fact, says that the app is not compatible (something like that) and then closes. Not option can be configure through the boeffla's app. Do you have the same problem?
Click to expand...
Click to collapse
Boeffla app on Dirty Unicorns? Yeah, it has SELinux issues caused by Dirty Unicorns, you'd need your SElinux on permissive, right after booting, not while running.
Is there any difference in converting to f2fs via TWRP vs Terminal (ubuntu/windows 10) method ?
I usually go to TWRP > Format Data and start checking all partitions from top to bottom and see if they can be converted to F2FS.
i cant understand the permission part
casual_kikoo said:
/!\ Everything will be erase on your phone ! /!\
Please before you do anything, read the full post. Please.
Code:
#include "disclaimer.h"
#include <stdio.h>
int main()
{
char *disclaimer="Don't take me responsible if your phone explodes. Or if your phone became a banal sheet of paper. Or if this your parents\' phone and they lost everything.\nYou understood me, I take no responsibilities.";
printf("%s", disclaimer);
return(0);
}
Alright, so, let's go.
/!\ All kernel doesn't support F2FS file format /!\
For example, Boeffla's one doesn't not. Do it, and you WILL NOT be able to mount your data partition.
I assume you already have backup your sdcard?
If not:
Code:
adb pull /sdcard /path/to/backup/on/your/pc
This is for Linux, if you're on Windows, replace "/" with " \ " , so:
Code:
adb pull /sdcard C:\path\to\backup\on\your\pc
This operation might be long, it took me around 30-40 minutes to complete.
Next, reboot into recovery. I assume you have latest version installed, which, currently, is 3.0.2-2.
So, you are now in recovery.
Go to "Wipe", "Advanced Wipe", select "Cache" partition, "Change File System", and select "F2FS", and finally "Swipe to change".
/!\ Be aware next step will erase EVERYTHING on your phone /!\
Do same steps for "Data" partition.
Calm down. we format everything, so normal.
Connect your phone to your PC, and either push a ROM (LineageOS from Grarak for example) with adb to your phone
Code:
adb push lineage-14.1-20170108-UNOFFICIAL-oneplus2.zip /sdcard
or re-push all your /sdcard content
Code:
adb push /path/to/your/sdcard/backup/on/your/pc/ /sdcard
Same thing as backup, change "/" with " \ " if you are on Windows.
Relax bis, this is a permissions problem. Easily fixable.
Reboot into recovery and plug your phone to your PC;
Code:
chown -R media_rw:media_rw /data/media/
find /data/media/ -type d -exec chmod 775 {} ';'
find /data/media/ -type f -exec chmod 664 {} ';'
restorecon -FR /data/media/
this will restore rights permissions.
Should be enough for you, enjoy.
Edit: Try to install a new ROM instead of restoring a previous backup from TWRP after you did all steps.
If you really want to restore a ext4 backup, go to "Settings", and check "use rm -rf instead of formatting", or while restoring, TWRP will re-format all your partition into ext4 format.
But go for clean flash, always better and will avoid you many problems.
Click to expand...
Click to collapse
whether it just needed to be copy paste in the command window
i am a windows user
vignesh95 said:
whether it just needed to be copy paste in the command window
i am a windows user
Click to expand...
Click to collapse
Well, first hello.
Because you know, be polite is one of the first step when talking to someone.
Because you know I right this guide so you could be polite.
Anyway,
Reboot into recovery and plug your phone to your PC, Edit: then in a CMD, launch
Code:
[B]adb shell[/B]
chown -R media_rw:media_rw /data/media/
find /data/media/ -type d -exec chmod 775 {} ';'
find /data/media/ -type f -exec chmod 664 {} ';'
restorecon -FR /data/media/
this will restore rights permissions.
Should be enough for you, enjoy.
Click to expand...
Click to collapse
You are welcome.
sry bro if my reply was rude plzz forgive
casual_kikoo said:
Well, first hello.
Because you know, be polite is one of the first step when talking to someone.
Because you know I right this guide so you could be polite.
Anyway,
You are welcome.
Click to expand...
Click to collapse
i was not in an intention to be rude may be my english could .
whether i can apply the code in the terminal of twrp?