[Q] mounting HTC mini 2's partition - HTC One Mini 2

Hello,
I want to remove Vodafone's boot animation but don't want to root my device. To do that, I must either edit /system/customize/CID/VODAP**.xml or push proper VF_bootanimation.zip into /system/customize/resource. I am not able to do it neither from adb nor from adb shell - there is read-only warning or "permission denied".
Is there a way I can access this XML file, like:
a) registering on HTCDev as a developer
b) mount phone internal memory (/dev/block/mmcblk0p43) to a PC as a mounted drive while phone is switched off and then change its content (is this called 'fastboot'?)
BR
Plodozhor

plodozhor said:
Hello,
I want to remove Vodafone's boot animation but don't want to root my device. To do that, I must either edit /system/customize/CID/VODAP**.xml or push proper VF_bootanimation.zip into /system/customize/resource. I am not able to do it neither from adb nor from adb shell - there is read-only warning or "permission denied".
Is there a way I can access this XML file, like:
a) registering on HTCDev as a developer
b) mount phone internal memory (/dev/block/mmcblk0p43) to a PC as a mounted drive while phone is switched off and then change its content (is this called 'fastboot'?)
BR
Plodozhor
Click to expand...
Click to collapse
I think you need S-OFF to edit system files. At the moment not possible

plodozhor said:
Hello,
I want to remove Vodafone's boot animation but don't want to root my device. To do that, I must either edit /system/customize/CID/VODAP**.xml or push proper VF_bootanimation.zip into /system/customize/resource. I am not able to do it neither from adb nor from adb shell - there is read-only warning or "permission denied".
Is there a way I can access this XML file, like:
a) registering on HTCDev as a developer
b) mount phone internal memory (/dev/block/mmcblk0p43) to a PC as a mounted drive while phone is switched off and then change its content (is this called 'fastboot'?)
BR
Plodozhor
Click to expand...
Click to collapse
kativiti said:
I think you need S-OFF to edit system files. At the moment not possible
Click to expand...
Click to collapse
You will have to flash a custom kernel on your phone that removes the write protection. So only unlocking the bootloader and flashing the kernel is sufficient. If you haven't unlocked you bootloader yet, backup all the data from the internal memory because it gets wiped

Thanks for answers everybody. I am little bit afraid of flashing foreign ROM because it replaces phone's existing ROM and warranty might be void. What I want to do is to keep the existing ROM, and alter one XML file in the customize folder.
I would like to rather have a scenario of mounting the phone memory as 'external removable drive' to some other system. For example, couple of years ago I played around with my home router - I was able to mount my home router's memory to PC running Linux and change some tweaks in the resulting /mount directory. Can I do something similar with mini 2? What is fastboot tool from ADB suite?
Maybe there is another, easier way for eradicating ad bootanimation? Currently I see 3 options: change CID so VODAP102.xml is not triggered; post fixed VF_bootanimation.zip; or change VODAR102.xml.
I am a programmer, however I never worked with writing apps for Android. Is there a way HTCDev-enabled developer can access /customize folder? Like remounting /mmcblk0p43 with RW permission etc.
Thanks in advance and sorry for 'noobism'

plodozhor said:
Thanks for answers everybody. I am little bit afraid of flashing foreign ROM because it replaces phone's existing ROM and warranty might be void. What I want to do is to keep the existing ROM, and alter one XML file in the customize folder.
I would like to rather have a scenario of mounting the phone memory as 'external removable drive' to some other system. For example, couple of years ago I played around with my home router - I was able to mount my home router's memory to PC running Linux and change some tweaks in the resulting /mount directory. Can I do something similar with mini 2? What is fastboot tool from ADB suite?
Maybe there is another, easier way for eradicating ad bootanimation? Currently I see 3 options: change CID so VODAP102.xml is not triggered; post fixed VF_bootanimation.zip; or change VODAR102.xml.
I am a programmer, however I never worked with writing apps for Android. Is there a way HTCDev-enabled developer can access /customize folder? Like remounting /mmcblk0p43 with RW permission etc.
Thanks in advance and sorry for 'noobism'
Click to expand...
Click to collapse
I'm not talking about flash a rom, but only just a kernel. Flash the Liberty Sense kernel and then got can customise the boot animation

csoulr666 said:
I'm not talking about flash a rom, but only just a kernel. Flash the Liberty Sense kernel and then got can customise the boot animation
Click to expand...
Click to collapse
Will I be able to flash original kernel back?
Also, the phone will lose warranty?

plodozhor said:
Will I be able to flash original kernel back?
Also, the phone will lose warranty?
Click to expand...
Click to collapse
If you make a backup of your rom via a custom recovery, then yes. And unfortunately unlocking the bootloader and flashing a custom kernel will void the warranty

Related

[HOW-TO/INFO] Bell FAQ [9-25-2011]

This is my attempt at a Bell FAQ, it is a work in progress.
Q. Why don't the instructions I found on how to do X not work?A. This is a development forum, sometimes things are written in shorthand assuming you know things you don't. At lot of things are specific to one carrier's phone or another. Sometimes things change and are now obsolete, something new was found, a better way of doing things, if you were not following it all along you are likely to be lost. Read between the lines, you are a human being with reasoning abilities, figure it out. ​Q. What should I do first?
A. Backup your phone. That means everything, especially your pds partition. Nandroid won't cut it and you have already modified your phone beyond the ability to get back if you can run it.
Ex. dd if=/dev/block/mmcblk0p3 of=/sdcard/backup/mmcblk0p3
Save your backup on your computer, create a zip of all the files, burn it off on cd/dvd, put it in a safety deposit box at your bank. Be prepared for bricking your phone. A lot of things mentioned in threads here are developed and tested for ATT phones, they may not work 100% on your phone.​Q. What is ADB?A. It stands for Android Debug Bridge or something like that. It is a program that runs on your computer that lets you talk to your phone using special commands. Your phone has to have adb enabled, it's a setting under application/development.
Ex. adb shell
This opens a linux shell connected to your phone. Linux is an operating system for computers, it is also used as the base for android phones.
Ex. adb install file.apk
Ex. adb push file /tmp
Ex. adb pull /tmp/file .​
Q. What is CWM recovery?A. Android phones come with a special boot configuration that allows for changes to the android system from a place outside the system. It is very corporate and does the job for official signed updates, but only Motorola and it's oems can sign the updates. Not much fun for us. CWM recovery is a replacement for the official recovery system that doesn't require signed updates.
You install CWM recovery using fastboot or moto-fastboot.​Q. What is unlocking the bootloader all about?A. It is the means of putting CWM recovery on your phone so you can install roms and other packages. It allows you to flash a partition with mods and have the phone not soft brick when you reboot. When the unlocked versions of the atrix bootloader were found it started a new round of mods. A lot of the threads prior to that are now obsolete.​Q. How do I unlock the bootloader?A. There is a huge thread already about this, see here.
WARNING: this is a permanent change to your phone.
Summary:
1. Download the archive
2. Extract the sbf inside, whatever it's called, that is the one to use.
3. Use linux sbf_flash or rsdlite from windows to install it.
3. fastboot oem unlock
4. Copy code fastboot spits out.
5. fastboot oem unlock code
6. fastboot reboot
You will see unlocked while booting and when you get into android you will have ~300MB of ram. This will need to be fixed. Also, you will lose all your data during the process, do a backup first.​Q. What is fastboot/moto-fastboot?A. It's a program to access the phone and do stuff, write phone partition images mostly. The stock one can only handle tiny system images, pretty useless for the Atrix, xda member eval- compiled the motorola version for us that can handle larger system images, do a search for moto-fastboot.
Ex. moto-fastboot flash recovery recovery.img.​Q. How do I fix the ram problem?A. I did up a CWM recovery zip to update the boot and recovery partitions to contain a kernel command line with the missing bit "[email protected]" added. See here.
There are other means of doing this, some boot images come prepackaged with the command line already embedded. There are ATT compiled kernels with a patch inside the kernel itself to do the same thing. You can search for those when you are ready to try things like custom ATT kernels on your phone.​Q. How do I root the phone?A. If you are unlocked and you have fastboot flashed a version of CWM recovery, it is trivial. By that I mean almost impossible for newbies to figure out.
It would go something like this:
1. Boot into CWM recovery.
2. use adb shell
3. adb push a su binary to the phone.
4. mount system as read write as /system
5. copy su binary to /system/bin
6. make sure it has the right permissions, 06755 mode , user root, group root.
7. unmount -l /system
8. when in android look on the market for Superuser.apk, install.
Every rooting method out there is all about putting su into /system/bin with 06755 permissions, most don't work anymore since Gingerbread. If you are looking for a simple, no brain involved solution, you are likely to get something working and also something else you didn't want like a replaced preinstall partition or an installed busybox with different functionality for some important system commands. (Busybox may be more up to date even, but if it doesn't do what is expected of the older version, it's still not good.)
Another way would be to create a CWM zip that simply puts the linux su binary in system with the correct permissions. Some info about creating your own can be found here. Doing this is more involved that just doing it manually, but it would be a good practice for getting into creating CWM updates.
Here is a link to a exploit someone did up to root the phone when running GB. Haven't tested it, and with an unlocked phone it is totally redundant, but it's nice that some found yet another security hole in the OS, seems similar in result to psneuter, so be sure to reboot the phone to fix the exploited system.
Seriously, if you are going to be reading or posting in the development section of xda for an android phone, take the 5 minutes to become familiar with adb and a few linux shell commands, it will save you hours of confusion and aggravation. If you fly blind trying things on your phone without understanding what you are doing you are eventually going to get into a place you can't get out of and need a new phone or REALLY have to struggle to understand things. You were warned. ​Q. How do I get back to stock?
A. You can't unless you have a backup of all your phone partitions and can update your radio and bootloader to be stock. Once you unlock your phone, it is recorded that you did so by blowing a physical fuse on the phone. This cannot be restored, you will need a new phone.
What does stock mean to you? When I bought my phone it had a certain radio, the bootloader couldn't be unlocked, the android system files had certain versions, etc. Beyond the android system there are 18 partitions that I know of on the phone, most phones do with 5-6. Every ota update or sbf files take the normal files and change them to something else, non android partitions get modified or replaced.
I have some solutions for getting close to stock, do a search for Gobstopper. There is one for Bell 2.2.2 and Bell 2.3.4, use one or the other. These attempt a full back to stock operation, that means the radio and bootloader will be stock, recovery will be stock as well. (All the partitions that are on the phone are written over with the ones that were on my phone when I bought it, with the exception of partitions 3 (pds), 15 (cache), 16 (data), and 18 (userdata or internal memory), factory reset clears cache and data, you don't want pds touched or internal memory.) Unlocked will no longer be displayed when you boot and you will no longer have CWM recovery installed. You will need to install the unlocked bootloader again and fastboot flash recovery again if stock is not what you wanted. (Your pds partition is not involved in this operation, so if you made changes to it, either directly or indirectly via a sbf this will not restore it, your pds partition contains individual phone information.)
More about sbf format here.​Q. What does the pds partition taste like?A. It's not really fit to eat. Now you know.
It is mmcblk0p3, a partition on your phone, it is mounted as /pds when android boots and contains a bunch of folders and files that nobody really understands fully but Motorola. Having a look at some of the files you will see things like your network physical address, bluetooth physical address. You will find threads where the display is all arsed up, cpu running at half speed, touch screen not working right, etc, all due to something going wrong with /pds. It is best to back it up and not mess with it. Restore it in an emergency. Maybe one day everything in there will be figured out, take a stab at it yourself.
See this thread by edgan for how to back up your pds partition.
See this thread by KeRmiT80 about attempting to fix your pds partition. Good motivation to see previous link.
​Q. I lost network data access after flashing X.
A. Check your APN list, if it's not a Bell firmware you are using, it probably doesn't have Bell's APN list. Scratch that, you don't know what that is or how to check it.
It stands for Access Point Name and a big list of them is stored on your phone in one big file (/system/etc/apns-conf.xml), each firmware has it's own version of it. Your phone will get two numbers from your carrier's phone network to do a look up in this list to figure out what configuration to use. So say it gets mcc 302, mcn 610, it will check the phone and look up 302, 610 in the file and read what it says there and use that config to try to connect. Now, another thing is that the phone knows what the home network is by these two numbers, embedded somewhere in the system. A foreign, non Bell carrier won't have Bell's numbers in there so your phone will think it's roaming. If you have roaming disabled, guess what, no data connection. Your carrier should be smart enough not to charge you for roaming, never had a problem with that, but you never know.
Here are the apn settings you can enter manually for your phone, see Bell's support link.
​Q. How do I get webtop over HDMI to work?
A. There are several threads on getting this to work on ATT phones and others, they are specific to the firmware being run on the phone. They involve copying two deodexed files to your system/app folder and replacing the ones already there. You will also need to clear your dalvik cache to get the new code recognized. They are DockService.apk and PortalApp.apk. If you are not deodexed then you also have to remove the .odex files for both.
Here is one thread for Gingerbread, in the zip there is one for ORFR that will get you to viewing the webtop on Bell GB, but applications don't load.
Here is another thread for Froyo that works, see the Bell specific bit in the OP. This does not work from Bell Gingerbread.​ To be continued...
Hoping the Mods sticky this
A link should be attached to the wiki as well. I will try to when I get home if it isn't done already.
shouldn't this be in general? or q&a?
Magnetox said:
shouldn't this be in general? or q&a?
Click to expand...
Click to collapse
Probably both. Most things referenced are in development.
Cheers!
Sent from my MB860 using xda premium
y2whisper said:
Hoping the Mods sticky this
A link should be attached to the wiki as well. I will try to when I get home if it isn't done already.
Click to expand...
Click to collapse
+1 this should be a sticky on either or both general or development...
cheers for this...this thread is going to help me with my youtube viewers BIG TIME!!
Very nice!
Keep it up NFHimself!
NFHimself said:
This is my attempt at a Bell FAQ, it is a work in progress.
Q. How do I root the phone?A. If you are unlocked and you have fastboot flashed a version of CWM recovery, it is trivial. By that I mean almost impossible for newbies to figure out.
It would go something like this:
1. Boot into CWM recovery.
2. use adb shell
3. adb push a su binary to the phone.
4. mount system as read write as /system
5. copy su binary to /system/bin
6. make sure it has the right permissions, 06755 mode , user root, group root.
7. unmount -l /system
8. when in android look on the market for Superuser.apk, install.
Every rooting method out there is all about putting su into /system/bin with 06755 permissions, most don't work anymore since Gingerbread. If you are looking for a simple, no brain involved solution, you are likely to get something working and also something else you didn't want like a replaced preinstall partition or an installed busybox with different functionality for some important system commands. (Busybox may be more up to date even, but if it doesn't do what is expected of the older version, it's still not good.)​ To be continued...
Click to expand...
Click to collapse
I used this method to root the stock Bell Gingerbread ROM. Works on an Atrix too. It's a quick download and easy for those people who may not be comfortable with the adb command line.
http://www.psouza4.com/Bionic/
thx
useful for newbies
but can you put some more details about returning to stock and explain the pds partition in details plz?
papakilo10 said:
I used this method to root the stock Bell Gingerbread ROM. Works on an Atrix too. It's a quick download and easy for those people who may not be comfortable with the adb command line.
http://www.psouza4.com/Bionic/
Click to expand...
Click to collapse
Had a look at the script in that one, should be fine, doesn't install a busybox or anything like that. I don't care for Superuser.apk in /system/app myself, but it won't harm anything having it there.
Cheers!
ytwytw said:
thx
useful for newbies
but can you put some more details about returning to stock and explain the pds partition in details plz?
Click to expand...
Click to collapse
I added a few things, anything in particular you wanted?
I am trying to avoid step by step tutorials or spoon feeding everything, so people who are lazy/careless will have to attempt to think for themselves. It just leads to more questions, more laziness, and bricked phones, and I don't have the time these days.
Cheers!

Removing System Apps

I'm rooted and am trying to mount the system to remove bloatware apps... However everytime Titanium Backup removes it and I reboot it's still there...
Anyone have any ideas?
System is protected: you can't modify it while the phone is booted. You'll have to make a zip or whatever to delete it in recovery.
You have to be kidding me...
I've spent all day long trying to root this bastard phone and that didn't work then I managed it and now I can't disable, remove any apps ?
So much for HTC being dev friendly
fkofilee said:
You have to be kidding me...
I've spent all day long trying to root this bastard phone and that didn't work then I managed it and now I can't disable, remove any apps ?
So much for HTC being dev friendly
Click to expand...
Click to collapse
It seriously took you all day to root? What went wrong?
Did you try just freezing the app instead?
Brand new trick from HTC?Didn't have it in hox+
Sent from my Nexus 4 using Tapatalk 2
afilopou said:
Brand new trick from HTC?Didn't have it in hox+
Sent from my Nexus 4 using Tapatalk 2
Click to expand...
Click to collapse
So you can no longer go into ES explorer, mount root/system go to system > apps and delete whatever you want ?
Sent from my HTC Incredible S using Tapatalk 2
The recovery flashed but wouldnt boot , managed to get round it when i discovered POB with his superboot Thank god for the desire C
Then i realised that i couldnt flash anything because I manged to install 6.0.2.8 as a boot img, and 6.0.3.0 as a proper recovery.
Then i didnt have any files on the device to flash boohoo so i managed to get ADB sideload working through the AIO One Toolkit... And managed to flash AHRD finally getting a working device,
As you see Im a seasoned vet at these things but the HTC One has been the first device that has stumped me....
----------------------
The apps issue is not unkwown for HTC however they havent done this for a while.... Back with the G2 they did exactly the same thing and yes ive frozen them but there should be away to remove system apps for us through root.... But i cant remember how, Throwing it into ADB Shell and requesting SU along with a Remount works fine but still would like to remove the apps.
Im also looking for someone with a locked phone... (Sim Locked) i have a theory and it worked on the Desire C Anyone wanna help?
fkofilee said:
I'm rooted and am trying to mount the system to remove bloatware apps... However everytime Titanium Backup removes it and I reboot it's still there...
Anyone have any ideas?
Click to expand...
Click to collapse
Delete the apps with titanium and power off the phone. Don't do a restart.
Already tried that ^_^
You need to flash a custom kernel with a modified ramdisk to disable system protection Without doing that you're like deleting an app on windows with deepfreeze on it
Is that the only solution?
There are so many bloated useless and intrusive (cr)apps on this phone it's unbelievable.
Other solution is boot in recovery and delete it there. Either thru adb while in recovery mode, flashable zip or through file manager(if you're using TWRP). Other than that nope
Hmmm I'm thinking adb through recovery here but how do I got about doing this?
fkofilee said:
Hmmm I'm thinking adb through recovery here but how do I got about doing this?
Click to expand...
Click to collapse
the joys of a s-on devices
read up on adb commands...
or use the zip I attached and edit line 18 in this format with the apps you want to get rid of, use a file explorer to get the proper names.
make a backup first in case you mess up something
Code:
delete("/system/app/xxxxx.apk", "/system/app/xxxx.odex", "/data/app/xxxxx.apk");
The best way to remove apps in recovery is through adb:
Code:
adb shell
sysrw
rm /system/app/abc.apk
the simple way is ROM CLEANER, but isn't available yet for the One.
cheers
fkofilee said:
Hmmm I'm thinking adb through recovery here but how do I got about doing this?
Click to expand...
Click to collapse
type the following commands.
Code:
adb shell
su
cd /system/app/
ls
rm <insert the name of the apk you want to delete here which can be found in the list shown by the ls command>
Riyal said:
type the following commands.
Code:
adb shell
su
cd /system/app/
ls
rm <insert the name of the apk you want to delete here which can be found in the list shown by the ls command>
Click to expand...
Click to collapse
I dont have a One, and dont plan on having one (ever, thanks to this thread! I think I'll stick to Sony, they have instructions to unlocking bootloader on their official website)
BUT, if the system is locked, it should be locked trough ADB too, so I guess what I'd try is install busybox, custom recovery, go into recovery, connected it to the PC (or a mac, but since we're on no-apple forum, I'll assume PC), mounting system there and doing your thing.
You can install busybox and custom recovery right?
Edit: never mind, I should really learn to read. Sometimes I think I'm dyslexic a little, just for words, not letters.
I did not see the 'recovery' part mentioned.
Anywho, mounting system is what you forgot, so at least I said something helpful
ogdobber said:
the joys of a s-on devices
read up on adb commands...
or use the zip I attached and edit line 18 in this format with the apps you want to get rid of, use a file explorer to get the proper names.
make a backup first in case you mess up something
Code:
delete("/system/app/xxxxx.apk", "/system/app/xxxx.odex", "/data/app/xxxxx.apk");
Click to expand...
Click to collapse
MacHackz said:
The best way to remove apps in recovery is through adb:
Code:
adb shell
sysrw
rm /system/app/abc.apk
Click to expand...
Click to collapse
limx said:
the simple way is ROM CLEANER, but isn't available yet for the One.
cheers
Click to expand...
Click to collapse
Riyal said:
type the following commands.
Code:
adb shell
su
cd /system/app/
ls
rm <insert the name of the apk you want to delete here which can be found in the list shown by the ls command>
Click to expand...
Click to collapse
issak42 said:
I dont have a One, and dont plan on having one (ever, thanks to this thread! I think I'll stick to Sony, they have instructions to unlocking bootloader on their official website)
BUT, if the system is locked, it should be locked trough ADB too, so I guess what I'd try is install busybox, custom recovery, go into recovery, connected it to the PC (or a mac, but since we're on no-apple forum, I'll assume PC), mounting system there and doing your thing.
You can install busybox and custom recovery right?
Edit: never mind, I should really learn to read. Sometimes I think I'm dyslexic a little, just for words, not letters.
I did not see the 'recovery' part mentioned.
Anywho, mounting system is what you forgot, so at least I said something helpful
Click to expand...
Click to collapse
All Wonderful Ideas folks, however i had a go at this last night, it was a fricking nightmare even mounting ADB through recovery

[Q] Unlocking / Rooting Nexus 7 without having to Wipe it

Hello Everyone,
So I have had a Nexus 7 for about a few months now and I love it! I have done some research and I am getting mixed answers.
My question is: Is it possible to Unlock a Nexus 7 without having to wipe the data.
Thanks so much in advance.
No.
The tablet can now be rooted without unlocking the boot loader, however.
There is a third method for re-locking & unlocking without touching the data - but it requires at least one prior unlock which does destroy all data.
bftb0 said:
No.
The tablet can now be rooted without unlocking the boot loader, however.
There is a third method for re-locking & unlocking without touching the data - but it requires at least one prior unlock which does destroy all data.
Click to expand...
Click to collapse
I am checking this out now.
Just wanted to say thanks ahead of time
@handy
If you were asking about this because you were contemplating rooting, please be advised about the importance of making full nandroid backups. Perversely, the rooting guides fail to mention how important this is... especially if you are averse to wiping the tablet.
The reason? If you are rooted and you wedge your O/S somehow with a "mod gone bad", the only means of rescue will be unlocking the boot loader (to be able to use the advanced capabilities of fastboot), which wipes the tablet.
The way to do this with a locked bootloader is to flash a custom recovery to the recovery partition (from a root shell command line) after you have rooted.
That way if something goes wrong with booting the regular OS, you have a custom recovery to fall back on - and hopefully you used it to create a Nandroid backup before modding your lightly rooted stock ROM.
good luck
I agree with @bftb0
Just make it clear, I't possible to root without wipping. But you are still locked. Not possible to Unlock without wipping yet. If your data and OS is important for you (not for me) you must keep a backup first. Don't rely on the words I'll be successfully rooted with my OS and data anything can go wrong at any moment.
I just want to thank you all very very much!
I was successful using the method linked in the original post: http://forum.xda-developers.com/showthread.php?t=2233852
I have been researching for ways to root my Nexus 7 without having to unlock it since unlocking would mean losing all my data and the sole purpose of wanting to root my nexus 7 was to gain access to good backup programs and methods like titanium backup and full bit by bit NAND backups. Which I am still not sure I can use full bit by bit nand yet but hey this is a start in the right direction. And I didn't lose any data doing this.
Thanks so much and I will keep in touch with how it goes.
HandyAndyXDA said:
I just want to thank you all very very much!
I was successful using the method linked in the original post: http://forum.xda-developers.com/showthread.php?t=2233852
I have been researching for ways to root my Nexus 7 without having to unlock it since unlocking would mean losing all my data and the sole purpose of wanting to root my nexus 7 was to gain access to good backup programs and methods like titanium backup and full bit by bit NAND backups. Which I am still not sure I can use full bit by bit nand yet but hey this is a start in the right direction. And I didn't lose any data doing this.
Thanks so much and I will keep in touch with how it goes.
Click to expand...
Click to collapse
Get started on installing a custom recovery (either CWM or TWRP) immediately so that you can make a Nandroid backup.
And then get a copy of that off the tablet for safe keeping.
Note (here I am reading between the lines of your post) that on the N7, Nandroid backups exclude /data/media !! - Basically, everything that you see in "/sdcard" is NOT BACKED UP by Nandroid.
You need a full Nandroid backup in the event of some kind of disaster (rooting experiment or mod gone wrong), but you also do need to backup stuff you feel is worth keeping from your /sdcard. You can use MTP for that if you want.
good luck and be careful.
Thanks for the backup tips! I was not aware that it won't backup sdcard directory.
Not to get off the thread topic because the whole purpose of rooting for me was to gain the best backup possible and being able to use USB flash drives now is nice too.
Anyway, I would like to know what you recommend for backup and how it works / how to use it. I would love to have something that works like acronis. I am really interested in making a bit by bit image that I can store on my desktop or flash drive that I can recover from.
I am researching on my own but I'd love to get input from you guys if you don't mind.
PS: Thanks again! You have been great help!
And now that I see the thanks button, everyone of you is getting a thanks!:good:
Forget my last question asking about backup. That would go in another thread anyway and besides I ventured into using TWRP that I installed using GooManager and its just awesome. Thanks again everyone and be well.
HandyAndyXDA said:
Forget my last question asking about backup. That would go in another thread anyway and besides I ventured into using TWRP that I installed using GooManager and its just awesome. Thanks again everyone and be well.
Click to expand...
Click to collapse
TWRP does exactly what you want with backups
Unfortunately TWRP does not backup everything! Luckily I didn't do a hard factory reset when I was testing it out so I didn't lose any data.
It seems to me that TWRP does not backup internal storage. On another note these android directory names and aliases are really making me crazy lol.
I would really like to be able to recover from a hard factory reset including all data on the nexus 7. Is there any way possible to do this with TWRP or anything else?
Thanks so much.
HandyAndyXDA said:
Unfortunately TWRP does not backup everything! Luckily I didn't do a hard factory reset when I was testing it out so I didn't lose any data.
It seems to me that TWRP does not backup internal storage. On another note these android directory names and aliases are really making me crazy lol.
I would really like to be able to recover from a hard factory reset including all data on the nexus 7. Is there any way possible to do this with TWRP or anything else?
Thanks so much.
Click to expand...
Click to collapse
so, if TWRP were to back up the internal storage, where would it store that backup? It wouldnt be able to store a backup of itself ON itself...
if you want a backup of the internal storage, just copy it to a usb thumb drive over OTG or to your computer, nandroids are not meant to back up 'sdcard' storage and never have been
want to recover from a complete loss of everything?
make TWRP backup
copy /sdcard contents to USB OTG or computer, your TWRP is on that directory so you would be copying EVERYTHING
Pirateghost said:
so, if TWRP were to back up the internal storage, where would it store that backup? It wouldnt be able to store a backup of itself ON itself...
if you want a backup of the internal storage, just copy it to a usb thumb drive over OTG or to your computer, nandroids are not meant to back up 'sdcard' storage and never have been
want to recover from a complete loss of everything?
make TWRP backup
copy /sdcard contents to USB OTG or computer, your TWRP is on that directory so you would be copying EVERYTHING
Click to expand...
Click to collapse
Thanks and sorry I didn't mention that I was backing up using TWRP to a usb flash drive all along. I am having trouble copying /sdcard now for 2 reasons:
1) Sometimes its called "Storage", sometimes its a directory within others, sometimes its called "internal".......I am just not sure what the actual directory is anymore.
2) I have tried copying as much as i could manually to my desktop via usb. but does windows see all that i need to copy and each time i select all and copy it, windows explorer lags and eventually crashes lol.
As of now I am trying to copy one fold at a time to windows. .....no I don't know what I am doing. Just getting frustrated so I am trying to copy it all on my own as well as useing TWRP lol
since MTP came about copying using windows explorer or any file browser, just plain sucks.
you have a couple of options here,
1. Use AIRDroid and copy it over your wifi
2. Use ADB and simply do 'adb pull /data/media C:\path\to\your\backup\folder
personally i prefer adb, i make regular backups of my phone and tablet and keep them on USB thumbdrive or sdcard on my laptop
Pirateghost said:
since MTP came about copying using windows explorer or any file browser, just plain sucks.
you have a couple of options here,
1. Use AIRDroid and copy it over your wifi
2. Use ADB and simply do 'adb pull /data/media C:\path\to\your\backup\folder
personally i prefer adb, i make regular backups of my phone and tablet and keep them on USB thumbdrive or sdcard on my laptop
Click to expand...
Click to collapse
Already tried Airdroid which was working great until about 20 minutes later when it just stopped. Guess its just too much for airdroid too.
Yeah MTP isnt great lol.
And thanks again, I will give the adb method a try.
HandyAndyXDA said:
Already tried Airdroid which was working great until about 20 minutes later when it just stopped. Guess its just too much for airdroid too.
Yeah MTP isnt great lol.
And thanks again, I will give the adb method a try.
Click to expand...
Click to collapse
Oh, one more thing:
Am I correct in saying that all that Windows sees is the total internal storage? In other words every file that I can explore using Windows is what TWRP doesn't backup?
I got the adb command line tool. I have it running, but how do i direct it to the nexus? I mean there is no drive letter for the tablet.
Sorry to be a pest.
HandyAndyXDA said:
Oh, one more thing:
Am I correct in saying that all that Windows sees is the total internal storage? In other words every file that I can explore using Windows is what TWRP doesn't backup?
Click to expand...
Click to collapse
Yeah. Pretty sure.
HandyAndyXDA said:
I got the adb command line tool. I have it running, but how do i direct it to the nexus? I mean there is no drive letter for the tablet.
Sorry to be a pest.
Click to expand...
Click to collapse
Look at the command that i posted. You don't use a drive letter.
Sent from my Galaxy Nexus
Pirateghost said:
Yeah. Pretty sure.
Look at the command that i posted. You don't use a drive letter.
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
Tried that exact command aside from changing the save destination and no luck.
I don't know what I am doing wrong lol
HandyAndyXDA said:
Oh, one more thing:
Am I correct in saying that all that Windows sees is the total internal storage? In other words every file that I can explore using Windows is what TWRP doesn't backup?
Click to expand...
Click to collapse
I have not been able to convince myself that the MTP implementation is deterministic, although in theory it is impossible for it not to be. (Translation: I don't trust it at all)
"adb pull" will work best when the remote shell automatically acquires root privileges, but that requires a modified boot image (the /default.prop file in the boot ramdisk) for rooted-stock ROMs, but this shouldn't be needed for "adb pull /sdcard/" - it is needed for pulling files from other areas of /data, or /system, etc though.
You previously mentioned "bit for bit", and that won't happen for adb or MTP as all timestamps, ownership, and file mode info will be lost when files are transferred to a Windows filesystem. The latter two are not particularly important for /sdcard, and I suppose that a lot of people won't care too much about timestamps either. You might feel differently though.
Actually attempting to do something closer to "bit-for-bit" brings it's own set of problems. You could use a (busybox version of) "tar" program in either the recovery or the OS, but you probably need to write the output to a mounted NTFS filesystem because of large-file ( > 2Gb) limitations of FAT filesystems. That's a non-starter with a stock kernel (for the regular OS, anyway) and it is my impression that TWRP's kernel isn't mounting NTFS in rw mode yet (I don't know about CWM)
To date when I've needed to wipe the tablet and restore it I've just used Nandroid backup/restore plus adb pull/push for /sdcard. (I wish adb was faster - it seems to be 3x-5x slower than MTP)
I suppose there are other alternatives (network mounting of CIFS shares using compatible kernels, etc) but I haven't tried them so far.
good luck

S-off with Firewater

Another S-Off script that was sent to me by coremark. Successfully s-off my device and supercid.
http://firewater-soff.com/
Thanks to @coremark.
After gaining S-off on a fully stock device using Firewater + temproot, what is the easiest method for permanent rooting?
Since due to S-off full access is granted to all partitions, is it possible to install the su binary and superuser / superSu apk to the /system partition without flashing a custom recovery? For example by using "adb push" or a root file manager?
Where can I get a su binary? Should I extract it from superSu / superuser recovery ZIP package?
Could anyone walk me through the steps?
edorner said:
After gaining S-off on a fully stock device using Firewater + temproot, what is the easiest method for permanent rooting?
Since due to S-off full access is granted to all partitions, is it possible to install the su binary and superuser / superSu apk to the /system partition without flashing a custom recovery? For example by using "adb push" or a root file manager?
Where can I get a su binary? Should I extract it from superSu / superuser recovery ZIP package?
Could anyone walk me through the steps?
Click to expand...
Click to collapse
I'm afraid you'll need a custom recovery for this. The /system write protection is implemented in kernel (the kernel doesn't sync changes to the actual block device and keeps them in RAM) and S-OFF is completely orthogonal to this. To work around it, you'd need a custom kernel (which is not feasible at the moment since HTC haven't released the full source tree yet, unfortunately) or the wp-mod hack (which I would be afraid of using, to be honest).
Also, why avoid custom recovery when you're already S-OFF and you can flash the stock recovey anytime?
koniiiik said:
The /system write protection is implemented in kernel (the kernel doesn't sync changes to the actual block device and keeps them in RAM) and S-OFF is completely orthogonal to this.
Click to expand...
Click to collapse
You are right, that makes sense.
But then how is this possible (if it is at all)? -> http://forum.xda-developers.com/showthread.php?t=2339056
(Pls check out the 2nd post from member "Indirect".)
AFAIK the One has the exact same kind of /system write protection as the 901s. Doesn't it?
Just out of curiosity, why would you be afraid to use wp-mod? Unknown / unpublished source? Bad feedback from users?
edorner said:
You are right, that makes sense.
But then how is this possible (if it is at all)? -> http://forum.xda-developers.com/showthread.php?t=2339056
(Pls check out the 2nd post from member "Indirect".)
AFAIK the One has the exact same kind of /system write protection as the 901s. Doesn't it?
Click to expand...
Click to collapse
To be honest, no idea. All I do know is that on my phone the write protection works the way it does and I don't really see a feasible way around it. Also, I haven't tried these exact steps. It's possible that adb remount does some extra work or something. Moreover, I'm not sure about the adb shell chmod ... command – that would require root, wouldn't it? But since I haven't tried it, I can only guess.
If you don't mind trying it, I'd be interested in the results.
edorner said:
Just out of curiosity, why would you be afraid to use wp-mod? Unknown / unpublished source? Bad feedback from users?
Click to expand...
Click to collapse
The way I understand wp_mod works is that it monkey-patches the running kernel's filesystem driver to skip the check for the /system partition. In other words, it rewrites the code of the running kernel in-memory. This by itself is reason enough to be extremely careful around such code as it has potential for a major disaster. Missing the right memory location by any nonzero number of bytes can result in the kernel doing practically anything (most likely a crash).
Now, to make matters worse, these seem to be only a few binary versions of the kernel module and people seem to just take a binary compiled for one kernel, modify the version information within the file to make it match other kernels and load it on a completely different kernel. This, to me, is borderline insane, considering that the kernel binaries depend on the version of the kernel, used compiler and even compiler flags used when building.
Again, though, I haven't actually looked at the module's source code; can't say I'm suffering from a surplus of free time and I'm also not *that* interested in it. Most likely it's written in a robust enough way to have a high chance of success. (This seems to be backed up by anecdotal evidence – the thing appears to work for people, which is a small wonder for me.) All of the above is actually just my interpretation of stuff I read in some threads here on XDA-developers and I haven't even tried to confirm it myself.
Still, for me, using the recovery for any such changes is a sufficient and acceptable workaround, since I don't need to modify /system that often.
Wow! Thanks for the exhaustive expanation about WP-mod!
If you don't mind trying it, I'd be interested in the results.
Click to expand...
Click to collapse
Well I am also a bit skeptical about this solution. So I am not sure I will be brave enough to try it
But if I do decide to give it a try, I will post the results here, I promise.
edorner said:
Well I am also a bit skeptical about this solution. So I am not sure I will be brave enough to try it
But if I do decide to give it a try, I will post the results here, I promise.
Click to expand...
Click to collapse
As far as @Indirect's post goes, that should be risk-free – either it does work, or it doesn't do anything. I don't see how it could harm your phone. Worst case, you end up with a /system/xbin/su binary that doesn't work due to wrong privileges (or owner information), in which case you should be able to just remove it and start over.
koniiiik said:
As far as @Indirect's post goes, that should be risk-free – either it does work, or it doesn't do anything. I don't see how it could harm your phone. Worst case, you end up with a /system/xbin/su binary that doesn't work due to wrong privileges (or owner information), in which case you should be able to just remove it and start over.
Click to expand...
Click to collapse
Ah, I see. In that case I will definitely try it!
Truth is I am still an Android noob, I used ADB maybe on two occasions so far, and did not have the time yet to properly check out the documentation for these particular commands.
One more question:
If I understand correctly, Firewater (when used together with the temproot) will also unlock your bootloader. Do you think the apps in /data/preloadwill be deleted in this case too? (I.e. does it do a factory wipe like the unlock process via HTCDev?)
If so, how do I restore the apps? Do I simply copy the APK's back to /data/preload with a root file manager, and that's it?
IIRC Helium backup is not really perfect for the purpose, because it is unable to restore those apps to /data/preload, and puts them to the standard app path. Is this what you remember, too?
edorner said:
One more question:
If I understand correctly, Firewater (when used together with the temproot) will also unlock your bootloader. Do you think the apps in /data/preloadwill be deleted in this case too? (I.e. does it do a factory wipe like the unlock process via HTCDev?)
If so, how do I restore the apps? Do I simply copy the APK's back to /data/preload with a root file manager, and that's it?
IIRC Helium backup is not really perfect for the purpose, because it is unable to restore those apps to /data/preload, and puts them to the standard app path. Is this what you remember, too?
Click to expand...
Click to collapse
No idea, I haven't used firewater, but my guess would be that it won't wipe anything…
As for backing up /data/preload, you can for example use temproot to get access to the directory, copy it somewhere on your sdcard and adb pull it. In case it gets wiped, you can just push it back again and voilà. It's going to require some shell-fu, however.
Alternately, you can just download my ZIP of the latest stock ROM and extract it, it contains the latest /data/preload.
And yes, just copying the APK files into /data/preload should suffice *– Dalvik and its package manager is intelligent enough to detect something has changed in there and perform any installation steps necessary. If it doesn't work right away, a reboot should fix things.
Edorner. It won't wipe. I tried it already.
Sent from my GT-I9305 using XDA Premium 4 mobile app
koniiiik said:
As far as @Indirect's post goes, that should be risk-free – either it does work, or it doesn't do anything. I don't see how it could harm your phone. Worst case, you end up with a /system/xbin/su binary that doesn't work due to wrong privileges (or owner information), in which case you should be able to just remove it and start over.
Click to expand...
Click to collapse
So, as promised, I tried the "adb remount" command on my device and it did not work.
Code:
adb remount
remount failed: Operation not permitted
However "mount -o remount,rw -t ext4 /dev/block/mmcblk0p38 /system" in root shell (acquired by temproot) worked like a charm And the modifications to /system performed afterwards turned out to be permanent. So in the end I was able to gain root without using a custom recovery.
Based on my experiences, I created a guide which summarizes all the steps necessary to S-OFF and root a completely stock device without using HTCDev unlock and custom recoveries.
I investigated a bit as to why "adb remount" would not work, and found two interesting topics on XDA about the issue:
[2013.05.24][ROOT] adbd Insecure v1.30
Can't get ADB Root Access in certain ROMs?
In short, "adb remount" is only available if the ADB daemon is run in "insecure" mode in a particular ROM. And unfortunately our stock ROMs seem to use secure ADB.
edorner said:
So, as promised, I tried the "adb remount" command on my device and it did not work.
Code:
adb remount
remount failed: Operation not permitted
However "mount -o remount,rw -t ext4 /dev/block/mmcblk0p38 /system" in root shell (acquired by temproot) worked like a charm And the modifications to /system performed afterwards turned out to be permanent. So in the end I was able to gain root without using a custom recovery.
Based on my experiences, I created a guide which summarizes all the steps necessary to S-OFF and root a completely stock device without using HTCDev unlock and custom recoveries.
I investigated a bit as to why "adb remount" would not work, and found two interesting topics on XDA about the issue:
[2013.05.24][ROOT] adbd Insecure v1.30
Can't get ADB Root Access in certain ROMs?
In short, "adb remount" is only available if the ADB daemon is run in "insecure" mode in a particular ROM. And unfortunately our stock ROMs seem to use secure ADB.
Click to expand...
Click to collapse
Fantastic guide, I just read it and wow.
Also, good to know that particular procedure disables the write protection. I'll have to investigate this sometime, because just now I tried and found out that on my device, the changes to /system are rolled back as soon as I remount /system read-only again. Maybe if I left it read-write all the time, they would persist as well...? I'll have a closer look at this later.
koniiiik said:
Fantastic guide, I just read it and wow.
Also, good to know that particular procedure disables the write protection. I'll have to investigate this sometime, because just now I tried and found out that on my device, the changes to /system are rolled back as soon as I remount /system read-only again. Maybe if I left it read-write all the time, they would persist as well...? I'll have a closer look at this later.
Click to expand...
Click to collapse
Thanks
Hm... Strange...
Instead of manually remounting /system as "ro", I simply rebooted the device. (What can I say, I am hopelessly lazy ) After the reboot I checked the permissions of /system by issuing the "mount" command without any parameters. It showed that it was remounted using the original settings:
Code:
/dev/block/mmcblk0p38 /system ext4 ro,noatime,data=ordered 0 0
So in theory, rebooting instead of manually remounting as "ro" should not make any difference. But who knows
After the reboot, I checked the changes I made to /system previously, and fortunately they did not disappear. (su was still there, I could successfully copy it, and execute it.)
Since then, I've performed a couple more reboots and at least one full shutdown-startup cycle as well. And I still have not lost any changes.
Please let me know if you find something out! I am very interested.

[WIP] 1 Click Partition Back-Up v0.1

YOU MUST HAVE ROOT ACCESS TO PROCEED
THIS WILL NOT WORK IF YOU DON'T HAVE ROOT
A MINIMUM TEMPORARY SPACE OF 400MB ON YOUR INTERNAL STORAGE IS REQUIRE FOR THIS BACKUP PROCEDURE
THIS PROGRAM IS FOR PARTITIONS BACKUP PURPOSES AND NOTHING ELSE ​
Hello everyone,
After trial and error and keep trying with lot of errors finally got this puppy working, backups 19 Partitions from your device, i don't know if the A2017 (chinese variant) have the same partition table but as far as i know and have seen the A2017U and A2017G does have the same partition table which is awesome for any Rom developers to work on things or any dev.
Steps:
1- Download the zip file from here 1CLick_Partition_Backup_v0.1
2- Decompress anywhere you want (i prefer in the root of drive C: )
3- Make sure you have enable USB-Debbuging
4- Plug your Device
4- Double Click 1click_PartitionBackup_by_DrakenFX.exe and watch the program run
5- When Done your Partition Back-up will be in you C:/a2017u_partitions_backup folder
6- DONE
This is just the beginning i may be adding more Options like Single backup or group backup.
NOTE 01 : I didn't add the system partition backup for the sole reason of been huge file 6gb at least and I can add system in future update as separate option.
NOTE 02 : I'm not a savvy when comes to dev. but if i can do something that can help other do things a little easier , i'll be around
Reserve 01
Reserve 02
Do we have any way to restore these backups after?
XblackdemonX said:
Do we have any way to restore these backups after?
Click to expand...
Click to collapse
There is a way using flashable zip via TWRP, but I'll look into for something else... I'm new to all this so still learning , fastboot is another way but I'll look into it
I had to disable windows defender in order to download this. It kept flagging it as malware. Just a heads up.
CandyFoxJ said:
I had to disable windows defender in order to download this. It kept flagging it as malware. Just a heads up.
Click to expand...
Click to collapse
really? i'm ensure you there's no malware or anything malicious in this file.... i have downloaded and my windows doesn't detect anything. (Win10 Latest Update)
I've seen it throw false positives before, I'm not worried about it. Probably the packer used in your app. This is what it picked up.
Since this is XDA after all, you should probably either post your source and/or release it as a script/command list. It's not really security friendly to release a .exe that runs root commands. It could probably be run all as a batch command.
CandyFoxJ said:
I've seen it throw false positives before, I'm not worried about it. Probably the packer used in your app. This is what it picked up.
Click to expand...
Click to collapse
Could be cuz the commands it runs?
the zip file contains the following...
-adb.exe
-adbWinApi.dll
-adbWinUsbApi.dll
-1click_PartitionBackup_by_DrakenFX.exe
adb files needed just in case the user doesn't have adb install and these 3 files will do the job, Why sees it as Malware i really don't know but for command it have to Pull the Partitions out of the device.
---------- Post added at 09:06 PM ---------- Previous post was at 09:04 PM ----------
[/COLOR]
DrakenFX said:
YOU MUST HAVE ROOT ACCESS TO PROCEED
THIS WILL NOT WORK IF YOU DON'T HAVE ROOT
A MINIMUM TEMPORARY SPACE OF 400MB ON YOUR INTERNAL STORAGE IS REQUIRE FOR THIS BACKUP PROCEDURE
THIS PROGRAM IS FOR PARTITIONS BACKUP PURPOSES AND NOTHING ELSE
Hello everyone,
After trial and error and keep trying with lot of errors finally got this puppy working, backups 19 Partitions from your device, i don't know if the A2017 (chinese variant) have the same partition table but as far as i know and have seen the A2017U and A2017G does have the same partition table which is awesome for any Rom developers to work on things or any dev.
Steps:
1- Download the zip file from here 1CLick_Partition_Backup_v0.1
2- Decompress anywhere you want (i prefer in the root of drive C: )
3- Make sure you have enable USB-Debbuging
4- Plug your Device
4- Double Click 1click_PartitionBackup_by_DrakenFX.exe and watch the program run
5- When Done your Partition Back-up will be in you C:/a2017u_partitions_backup folder
6- DONE
This is just the beginning i may be adding more Options like Single backup or group backup.
NOTE 01 : I didn't add the system partition backup for the sole reason of been huge file 6gb at least and I can add system in future update as separate option.
NOTE 02 : I'm not a savvy when comes to dev. but if i can do something that can help other do things a little easier , i'll be around
Click to expand...
Click to collapse
OMG!
This is nice!
But I'm running linux!
You make the script universal please.
Or I could write one myself...
manu7irl said:
OMG!
This is nice!
But I'm running linux!
You make the script universal please.
Or I could write one myself...
Click to expand...
Click to collapse
if i only knew how to this in java (Universal) i'll do it in a flash, but i have no clue....i'm creating a new file and may by i'll do it as .bat (you can look it up if i release it this way with some choices and adding probably more partition if i have miss any + separate choice for system dumb (is way to big of a file),
P.S. if you know java PM
DrakenFX said:
if i only knew how to this in java (Universal) i'll do it in a flash, but i have no clue....i'm creating a new file and may by i'll do it as .bat (you can look it up if i release it this way with some choices and adding probably more partition if i have miss any + separate choice for system dumb (is way to big of a file),
P.S. if you know java PM
Click to expand...
Click to collapse
Bat file is good for me...
You can check the partition list under
Code:
ls -al /dev/block/....
manu7irl said:
Bat file is good for me...
You can check the partition list under
Code:
ls -al /dev/block/....
Click to expand...
Click to collapse
Yeah I have the partition table by-name , just don't see the need of adding every single one but just the necessary ones (modem, Bluetooth, aboot, few more) and I'll add system in the next release.....
DrakenFX said:
There is a way using flashable zip via TWRP, but I'll look into for something else... I'm new to all this so still learning , fastboot is another way but I'll look into it
Click to expand...
Click to collapse
you could fire up twrp or any terminal app.
In twrp mode:
Just comnect your device to your PC with adb installed.
Push the partition image you want to flash in /sdcard/ folder.
Code:
adb push [IMAGE.IMG] /sdcard/
then do:
From your PC, run first:
Code:
adb shell
Then do,
Code:
su
dd if=/sdcard/[IMAGE.IMG] of=/dev/block/bootdevice/by-name/[NAME OF IMAGE]
Example:
Code:
dd if=/sdcard/modem.bin of=/dev/block/bootdevice/by-name/modem
This will overwrite the chosen partition as dd works at a very low command level.
Do not try to flash recovery or boot or aboot through this if you are on locked bootloader. this will brick your device.
Do not try this at home if you don't know what you are doing, you may kill your neighbor's dog or worse the cat.
I made a script to backup any partition in our A7:
YOU HAVE TO BE ROOT, TO USE IT.
To run it simply push to the sdcard fire up adb shell to launch the script.
from the computer while connected to the A7 with usb debugging turned on
Code:
adb push PATH_to_the_script/full-backup.sh /sdcard
and
Code:
adb shell
su
cd /sdcard/
sh full-backup.sh
you will see a menu to choose which partition to backup.
As in the attachment.
enjoy, and please hit the thanks button.

Categories

Resources