wipe doesnt wipe - G1 General

I am using cyanogen recovery, but when I wipe to factory reset from the boot, deletes messages, settings but no the applications, so after boot, I have to set it up like new but has icons and even broken icons from old apps unininstalled. Maybe I messed up the recovery, any suggestion to wipe whole thing?
Thanks in advance

To do a complete wipe, you'll need to format the ext partition. Wiping the phone's memory doesn't completely remove everything.

Can I do it from the phone? or do I have to do it on the PC

You can do it from your phone
In recovery, go to the console:
mount -o rw,remount /dev/block/mmcblk0p2 /system/sd
rm -r /system/sd/*
reboot

AdrianK said:
You can do it from your phone
In recovery, go to the console:
mount -o rw,remount /dev/block/mmcblk0p2 /system/sd
rm -r /system/sd/*
reboot
Click to expand...
Click to collapse
after the first line I get
mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: Invalid argument
/#

I noticed that after a wipe, I still had loccy's modified browser. Does wiping only delete information that wasn't part of the original flash?

looks like I dont have mmcblk0p2 in block

rodeohat said:
after the first line I get
mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: Invalid argument
/#
Click to expand...
Click to collapse
Epic fail on my part guys >< T
hat line should be
Code:
mount -o rw,remount /dev/block/mmcblk0p2 /system/sd
uansari1 said:
I noticed that after a wipe, I still had loccy's modified browser. Does wiping only delete information that wasn't part of the original flash?
Click to expand...
Click to collapse
Wiping only removes apps and settings (stuff in the /data/ partition of the nand, Launcher.apk resides in the /system/ partition) so launcher will not be affected.

sorry, I cant spot the difference. After I type:
mount -o rw,remount /dev/block/mmcblk0p2 /system/sd
I get
mouting /dev/block/mmcblk0p2 on system/sd failed: Invalid argument

I got it to work by typing:
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# cd /system/sd
# rm -rf /system/sd/*
altough it said that couldnt delete it because it was busy,
I rebooted it, wipe, installed the ROM and all apps were gone
Thanks for your help
One more piece of code to put it on my evernote for later

AdrianK said:
Epic fail on my part guys >< T
hat line should be
Code:
mount -o rw,remount /dev/block/mmcblk0p2 /system/sd
Wiping only removes apps and settings (stuff in the /data/ partition of the nand, Launcher.apk resides in the /system/ partition) so launcher will not be affected.
Click to expand...
Click to collapse
remount is only used on partitions that are already mounted, and I can't think of a reason why ext3 partition would be mounted in recovery .

after wipe:
Code:
busybox rm -rf /system/sd/*

Gary13579 said:
remount is only used on partitions that are already mounted, and I can't think of a reason why ext3 partition would be mounted in recovery .
Click to expand...
Click to collapse
Ugh, I copied and psted the old command then forgot to make the change removing remount!! *repeatedly bangs head against the wall*
Sorry for the confusion..but you seem to have sorted it out for your selves

uansari1 said:
I noticed that after a wipe, I still had loccy's modified browser. Does wiping only delete information that wasn't part of the original flash?
Click to expand...
Click to collapse
Wipe clears data and cache only!!!
It does not remove applications in /system/app nor in /system/sd/app
If you have internal apps, ie in /data, then those will disappear

Related

Full Wipe for new rom

How do you a full wipe to install a new rom?
I pretty much always use this script with no problems but i want to make sure im doing it right
this is wat i use
#
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# rm -rf /system/sd/*
# reboot recovery
is this right or is there another way? I think this is just wiping the ext but how do you do a full wipe?

Need help with apps2sd on milestone

I found a guide to aply apps to sd on my milestone. I got it working, but the problem is, that apps installed in the data/app-private folder doesn't show as installed. I can see that they are placed in ext2 partion on my sd card along with the other apps, that normaly installes in data/app.Here is the guide i used
After creatting a ext2 partition on my SD card, i copied ext2. To sd card along with
mot_boot_mode script
#!/system/bin/sh
export PATH=/system/bin:$PATH
mot_boot_mode.bin
insmod /data/ext2.ko
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
Then in recovery mode i entered
adb shell
su
cp /sdcard/ext2.ko /data/ext2.ko
insmod /data/ext2.ko
mkdir /data/sdapp
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
cp /data/app/* /data/sdapp/
mkdir /sdcard/sicherung
cp /data/app/* /sdcard/sicherung
rm -r /data/app
umount /data/sdapp
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
ls /data/sdapp
ln -s /data/sdapp /data/app
chmod 644 /data/sdapp/*
/data/busybox/chown -h 1000:1000 /data/app
/data/busybox/chown 1000:1000 /data/sdapp/*
/data/busybox/chown 1000:1000 /data/sdapp
insmod /data/ext2.ko
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
mount -o remount,rw / /system
mv /system/bin/mot_boot_mode /system/bin/mot_boot_mode.bin
cp /sdcard/mot_boot_mode_script /system/bin/mot_boot_mode
chmod 755 /system/bin/mot_boot_mode
Do i need to make a symbolic link in data/app-private also?
I would realy like to get this working, because i purchased a lot of apps on the marked. But i have only half of them installed. It used to work on my HTC hero. But it was allready enabled in a custom rom. And that is not possible to do on a Milestone
Thanks
Fixed it by changing app-private folder two
hey glaus...
this almost seems like a guide, hehe...
i'm trying to get apps2sd to work on my milestone as well...
i tried booting in recovery mode and entering the chain of commands you just set out....
but when i go into recovery mode, i see the reboot system option, apply sdcard:update.zip, wipe data/factory reset and wipe cache partition....
and under it, i have e: can't open /cache/recovery/command
any ideas on how to fix this or where can i enter those commands you set out?
i tried in adb shell, but i get a /data/busybox/chown is not found error when setting the permissions...
thanks!
do
crap me too and it deleted some apps 2 i really want this been trying for a week oh i have a telus milestone and get the same above error.busybox is installed and hard drive is partioned
ah crap market is gone 2 lol gotta do a nano restore......man i want this bad i even bricked my phone and brought it back to life this week arghhhh
yeah...i don't know where claus is from...but if he has a telus milestone, he's the only one i've seen been able to install apps2sd with a telus milestone
i've seen other countries, even some with the same bands as we have, but none have had the actual "telus" one....the funny thing is that i can get everything else to work..
i have titanium backup pro, emulator, root explorer and everything is at superuser access...
if claus can help, i will bear his children
edit: how the heck do you install/activate the mot_boot_mode script? I see reference to it in a few wikis on basically that's what will allow us to use apps2sd...but I have no clue how to implement it
got app2sd working on milestone using a diff method will post soon
ok i got app2sd working on my telus milestone here is how i did it if u tried this method here ur gunna have to unroot then root or use a nano backup of freshly rooted phone busybox need mot to be installed so use titanium for back up and proceed http://forum.xda-developers.com/showthread.php?t=692367
ClausG76 said:
I found a guide to aply apps to sd on my milestone. I got it working, but the problem is, that apps installed in the data/app-private folder doesn't show as installed. I can see that they are placed in ext2 partion on my sd card along with the other apps, that normaly installes in data/app.Here is the guide i used
After creatting a ext2 partition on my SD card, i copied ext2. To sd card along with
mot_boot_mode script
#!/system/bin/sh
export PATH=/system/bin:$PATH
mot_boot_mode.bin
insmod /data/ext2.ko
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
Then in recovery mode i entered
adb shell
su
cp /sdcard/ext2.ko /data/ext2.ko
insmod /data/ext2.ko
mkdir /data/sdapp
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
cp /data/app/* /data/sdapp/
mkdir /sdcard/sicherung
cp /data/app/* /sdcard/sicherung
rm -r /data/app
umount /data/sdapp
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
ls /data/sdapp
ln -s /data/sdapp /data/app
chmod 644 /data/sdapp/*
/data/busybox/chown -h 1000:1000 /data/app
/data/busybox/chown 1000:1000 /data/sdapp/*
/data/busybox/chown 1000:1000 /data/sdapp
insmod /data/ext2.ko
mount -t ext2 /dev/block/mmcblk0p2 /data/sdapp
mount -o remount,rw / /system
mv /system/bin/mot_boot_mode /system/bin/mot_boot_mode.bin
cp /sdcard/mot_boot_mode_script /system/bin/mot_boot_mode
chmod 755 /system/bin/mot_boot_mode
Do i need to make a symbolic link in data/app-private also?
I would realy like to get this working, because i purchased a lot of apps on the marked. But i have only half of them installed. It used to work on my HTC hero. But it was allready enabled in a custom rom. And that is not possible to do on a Milestone
Thanks
Click to expand...
Click to collapse
fixed http://forum.xda-developers.com/showthread.php?t=692367

[GUIDE] How To Backup and Restore using tar on adb shell - Fastest recovery

If you are like me, and try out things alot that leave you with an unusable system and you want to recover as fast as possible, I made a small Listing, that shows what you have to enter on adb shell while booted in recovery.
Prequisites:
Tested on FuguMod >= 2.0 only
Be sure you have enough space free on internal SD
all these commands are issued in adb shell while booted into Recovery Mode
It restores to JFS on all partitions
One-liners for copy paste while root on adb shell in Recovery Mode:
Backup:
Code:
mount /dev/block/mmcblk0p1 /mnt/sdcard; mount /dev/block/mmcblk0p2 /data; mount /dev/block/stl10 /dbdata; rm /mnt/sdcard/system.tar /mnt/sdcard/data.tar /mnt/sdcard/dbdata.tar && cd / && tar cvf /mnt/sdcard/system.tar /system && tar cvf /mnt/sdcard/data.tar /data && tar cvf /mnt/sdcard/dbdata.tar /dbdata
Restore:
Code:
umount /system; umount /data; umount /mnt/sdcard; umount /dbdata; umount /cache; /sbin/jfs_mkfs -q /dev/block/stl9 && /sbin/jfs_mkfs -q /dev/block/mmcblk0p2 && /sbin/jfs_mkfs -q /dev/block/stl10 && /sbin/jfs_mkfs -q /dev/block/stl11 && mount /dev/block/mmcblk0p1 /mnt/sdcard; mount /dev/block/mmcblk0p2 /data; mount /dev/block/stl9 /system; mount /dev/block/stl10 /dbdata; mount /dev/block/stl11 /cache; cd / && tar xvf /mnt/sdcard/system.tar && tar xvf /mnt/sdcard/data.tar && tar xvf /mnt/sdcard/dbdata.tar
In detail:
Backup:
Code:
# backup - in adb shell (as root) do:
# --------------------------------------------------
# mount all filesystems
mount /dev/block/mmcblk0p1 /mnt/sdcard
mount /dev/block/mmcblk0p2 /data
mount /dev/block/stl9 /system
mount /dev/block/stl10 /dbdata
# remove older backups
rm /mnt/sdcard/data.tar /mnt/sdcard/system.tar /mnt/sdcard/dbdata.tar
# backup them all to the root of the internal sdcard (make sure enough space is free)
cd /
tar cvf /mnt/sdcard/system.tar /system
tar cvf /mnt/sdcard/data.tar /data
tar cvf /mnt/sdcard/dbdata.tar /dbdata
Restore:
Code:
# restore - process
# --------------------------------------------------
# flash stock ROM with Odin/heimdall
# flash fugumod with Odin/heimdall
# reboot recovery - claim root and open a shell
adb root
adb shell
# unmount all filesystems
umount /system
umount /data
umount /mnt/sdcard
umount /dbdata
umount /cache
# recreate filesystems (jfs)
/sbin/jfs_mkfs -q /dev/block/stl9
/sbin/jfs_mkfs -q /dev/block/mmcblk0p2
/sbin/jfs_mkfs -q /dev/block/stl10
/sbin/jfs_mkfs -q /dev/block/stl11
# mount all filesystems and internal sdcard
mount /dev/block/mmcblk0p1 /mnt/sdcard
mount /dev/block/mmcblk0p2 /data
mount /dev/block/stl9 /system
mount /dev/block/stl10 /dbdata
mount /dev/block/stl11 /cache
# restore the tar
cd /
tar xvf /mnt/sdcard/system.tar
tar xvf /mnt/sdcard/data.tar
tar xvf /mnt/sdcard/dbdata.tar
Listing: http://pastebin.com/rpZW1uWD
Good stuff.
really useful, thank you.
Danke^^
When I think about it, it should not be too difficult to write an application to create and pull the backups off the phone. And pushing and restoring would be the same thing in the other way. If I got some spare time I could do that, I think it would be really handy
Yeah... I also though about to supply an update.zip for backup and one for restore... but I was to lazy
I'm starting to form the project and layout for the program in my head, but on the other hand my laziness starts to fight all growing motivation. I'm wondering how this will turn out
Works perfect, thx.
How and in what regard is this faster than making the backup with CWM?
Not that I don't believe you that it is faster I just want to understand things
I pretty much understand what your script does, so probably what I would need to know to see the difference is how the CWM does the backup. I guess CWM is storing the whole file system with dd or something like that...
zsori said:
How and in what regard is this faster than making the backup with CWM?
Not that I don't believe you that it is faster I just want to understand things
I pretty much understand what your script does, so probably what I would need to know to see the difference is how the CWM does the backup. I guess CWM is storing the whole file system with dd or something like that...
Click to expand...
Click to collapse
It's faster since it does not create a new filesystem to back up the data... TBH. It is less safe than a nandroid backup (no md5 check). but faster in creation. and actually never failed on me
also everybody modding the hell out of their phones should get to know adb shell and the power that lies within it. You can take many shortcuts and debug errors easier.
do I understand correctly that this is able to restore a TAR file decrypted from a AB android backup file created before?
Can this make the backup on the computer the phone is connected to? Not enough free space on the phone to backup to.
Can it pull apps and their data from external SD?
Does it work without the user having to touch the screen? Broken screen, no touch possible and can't see anything so even if I had paired a bluetooth mouse before the damage it'd still be useless.
Can it restore to a different but identical in every way phone?

[Q] /system automatically remounts as ro

I'm rooted via the standard root, with CWM installed.
When I attempt to mount /system as read-write with mount -o rw,remount /dev/block/system /system, about 10 seconds later it remounts as -ro.
This means I can't change anything on there, is anyone else having this issue and is there a fix?
MrLadoodle said:
I'm rooted via the standard root, with CWM installed.
When I attempt to mount /system as read-write with mount -o rw,remount /dev/block/system /system, about 10 seconds later it remounts as -ro.
This means I can't change anything on there, is anyone else having this issue and is there a fix?
Click to expand...
Click to collapse
I had a similar problem once and I fixed it by restoring an old nandroid backup, I was never able to figure out what caused it.
I had the same issue when I installed the ota2 update, then tried to reroot. I think I was able to change permissions by installing, then opening superuser app.
Im on OTA1.
Hello,
I've got the same problem. With the following programs i have read/write access to /system only for seconds:
Esexplorer, file manager hd, root explorer, total commander , especially: adb shell
Strange thing: i have no problems with permissons when using x-plore or titanium backup.
(Currently OTA2)
Installing superuser again does not fix anything.
I have the same problem here (OTA2) :-/
A workaround I found is to chain the remount-command with the command you want to execute on /system:
Code:
$ su
# mount -o rw,remount -t ext4 /dev/block/mmcblk0p3 /system && cp /sdcard/Download/kernel_modules/cifs.ko /system/lib/modules/
# ls /system/lib/modules/
bcm4329.ko
cifs.ko
scsi_wait_scan.ko
Brilliant!

Check internal storage for errors

In case this helps anyone, these are the steps I took to check internal storage for errors:
In Android, get the mount points for /data and /system
Code:
$ su
$ grep /data /fstab.qcom
/dev/block/bootdevice/by-name/userdata /data f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr,inline_data wait,check,encryptable=/dev/block/bootdevice/by-name/metadata
$ grep /system /fstab.qcom
/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait
Boot to recovery (TWRP)
Unmount /system, just to be safe
(You can use adb shell or the TWRP terminal)
Code:
umount /system
Check /system for errors using e2fsck (since it's an ext4 filesystem)
(The mount points are a little bit different in TWRP)
Code:
e2fsck -fv /dev/block/platform/soc.0/by-name/system
In TWRP, go to Mount, check System, uncheck everything else
Check /data for errors using fsck.f2fs (since it's an f2fs filesystem)
Code:
fsck.f2fs -f /dev/block/platform/soc.0/by-name/userdata
Reboot
Or, you could just use any old Terminal app, do:
su
touch /forcefsck
... and reboot.
Tomo123 said:
Or, you could just use any old Terminal app, do:
su
touch /forcefsck
... and reboot.
Click to expand...
Click to collapse
I read that but it didn't work for me. Have you tried it on a Moto G 2015?
Tomo123 said:
Or, you could just use any old Terminal app, do:
su
touch /forcefsck
... and reboot.
Click to expand...
Click to collapse
... isn't / still part of the initrd, and hence volatile? afaik android doesn't pivot_root

Categories

Resources