yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] Ipse_Tase:
Encrypted phone - clean up backups

I searched this thread but didn't find much on encrypted phones.

Long story short I had to install MobileIron and encrypt my phone in order to get corp email...my recovery still works with the password, so it seems OK.

Problems:

- I can't see the nandroid backup created after the phone was encrypted - from file explorer. Could be design intent related to encryption

- I can't make room by deleting an older backup as even in recovery, it does not show in file manager

Restore works fine and I do see in that menu which backup to chose, just can't delete/copy/move it.

Any suggestions?

/EDIT: I dug around and found under /mnt/shell/emulated something that looks like a copy of the backup I cannot see in the ususal TWRP folder.

Does TWRP make an unencrypted copy of the backup? Looks like with one nandroid I lost twice as much space as before...makes me think there is a copy somewhere.

Yeah, 16GB on the N4 sux big time.
[Nexus 4 Original Android Development] sidnoit22:
Where is the flashable zip? Anyone? :crying:
[Nexus 4 Original Android Development] respider:
guys sorry for noobness, but is it normal to have full access to the sdcard through adb while in recovery?

is it possible to block ADB connection and allow access only through TWRP interface?
[Nexus 4 Original Android Development] playya:
ok no problem I will do your work for you my friend. Quick question though did you even search this thread? Ok so you dont want to use the quick and easy goo.im app I get it... Lucky for you I am in a good mood, now I want you to back out of this thread and go to the main page of this section where this thread is located. Now next to the title there is a paper clip. Now click on it and voila! the world is your oyster....:D
[Nexus 4 Original Android Development] Stryder5:
Our phones don't have an SD card so there is nothing to access.
[Nexus 4 Original Android Development] eng.stk:
Search a little, I post zips always... follow my sign.
[Nexus 4 Original Android Development] sidnoit22:
I am actually new to Nexus 4 forums it's been 2 days sorry for the noob questions. :)
[Nexus 4 Original Android Development] rskyline:
I'm pretty sure he's refering to the internal storage that can be showed as Sdcard.

Enviado desde mi Nexus 4 usando Tapatalk 2
[Nexus 4 Original Android Development] sidnoit22:
Thank you for the zip. :")
[Nexus 4 Original Android Development] respider:
yes I'm referring to the internal storage

anyway to avoid access to the internal storage while in recovery?
[Nexus 4 Original Android Development] blankit:
Why is it when I go into any file browser and when it shows that I have two directories? One says legacy and the other sdcard0 ?
[Nexus 4 Original Android Development] blankit:
This might help show you my issue. Reason I'm posting here is that I've read somewhere that twrp does this
[Nexus 4 Original Android Development] italia0101:
Hi ,

Iv used sideload on TWRP before and it worked fine, however , i went to use it today , and it doesnt see my device...

I use the adb devices command and nothing shows up ....

The strange thing is , adb works if the device is on with usb debugging just fine ...

Fastboot also works in the bootloader ...

Just not ADB IN TWRP ??!

i dont get it
[Nexus 4 Original Android Development] rskyline:
I think this could be related! Take a look: http://teamw.in/securetwrp
[Nexus 4 Original Android Development] Ipse_Tase:
I can't be the only one with TWRP on an encrypted phone...would I had better luck if I asked where to find 2.5.0.0?
[Nexus 4 Original Android Development] playya:
LOL what not thanks for me....I was not helpful, I told you exactly where to look and there were 3 version of TWRP attached which probably led back to the other posters zips.... :D

J/k but not really
[Nexus 4 Original Android Development] respider:
thank you for the link, but my main question is if there is a way to block access via adb while in recovery mode.

I locked my bootloader, a hypothetical thief could flash other recovery without losing all phone data?

I don't see a point of having a pin lock to protect data if there is a Easy way to gain access to all data in recovery.

I would like to have a custom recovery and still be secure. this is not possible?
[Nexus 4 Original Android Development] azrash:
I am not sure whether this'll work. But you can perhaps use stock recovery for security reason, and flash TWRP via the Goo Manager app or Flash Image GUI by Joeykrim when needed to.

Just keep the recovery image of both stock recovery and TWRP and flash it via the Flash Image GUI app. Just remember to unlock the bootloader first using Bootunlocker before flashing the recovery image. Once you are done using TWRP, reflash the stock recovery image and re lock the bootloader via Bootunlocker.

Just a thought

Flowed from my Nexus⁴
[Nexus 4 Original Android Development] nsmart:
I am using TWRP 2.5.0.0 and native android encrpytion with cm10.1.

The backups are located under /data/media/twrp (which is identical to /mnt/shell/emulated) and I can see/delete these backups from withing a root-file explorer. The twrp-folder on internal sdcard is always empty (/storage/emulated/0/TWRP). So for me it works as supposed and every backup exists only once. I don't know the reason why the backups are not stored in /storage/emulated/0/TWRP, but I can live with that. I am glad we have a recovery working together with device encryption!

---------- Post added at 01:06 PM ---------- Previous post was at 12:51 PM ----------

As far as I know, every time you unlock the bootloader, the /data partition will be wiped. If you want to use a custom recovery + restrict access to the data partition, why not encrypt the data partition ?
[Nexus 4 Original Android Development] respider:
thanks for replying.

I'm sorry, I've never encrypted a phone before... if I encrypt /data partition, how custom recovery will access it? Does it have a "decrypt" feature and asks for password?
[Nexus 4 Original Android Development] nsmart:
TWRP is able to decrypt the encrypted data partition (a feature that is still missing in CWM). If you boot into twrp-recorvery, it tries to mount /data and automatically asks you for the password if it can't mount the encrypted data partition. Once you entered the correct password, the data partition is mounted and you can use twrp just as before. Consider the following: the data partition will be encrypted with the same password that you use for your lockscreen. If you enable encryption, you have to use pin / password / faceunlock to unlock your phone, you can't use swipe gestures anymore. You have to enter the password on every boot.
[Nexus 4 Original Android Development] azrash:
interesting, so you can't use separate password, eg pattern lock to unlock phone, and another pin/password to unlock the encryption?

Another question, how do i go about in updating a rom? Since it is encrypted, can i just boot to recovery, key in the password, and just flash CMnewerversion.zip and custom kernels.zip after that?

also, what are other limitation once we have encrypted the phone?
[Nexus 4 Original Android Development] nsmart:
Pattern lock is not available on encrypted phone.

After booting TWRP recovery and entering the password for the encrypted data partition you can use TWRP as usual (e.g. flash cm rom updates, backup/restore -> this is what I use it for). I did not try every single TWRP feature against my encrypted phone, so maybe one of the devs could answer this more detailed.
[Nexus 4 Original Android Development] Ipse_Tase:
Thanks for the reply...did you find a way to transfer the backup OFF the phone - other than copying it with Root Explorer to the unencrypted SD partition and only then exporting to a PC?
[Nexus 4 Original Android Development] nsmart:
Where did you get the information from that there is an unencrypted SD partition on a Nexus 4 with device enryption enabled?

I use solid-explorer to copy the backup from "/data/media/twrp" to the so called "internal sd card" /data/media/0/folderxyz and then to my windows pc by mtp. As far as I read about how encryption works, if you encrypt your Nexus 4, the data-partition including /data/media is encrypted.

http://teamw.in/DataMedia

EDIT:

Some more info about android ancryption and partition layout: http://www.all-things-android.com/content/review-android-partition-layout
[Nexus 4 Original Android Development] Ipse_Tase:
Well...it was just a supposition as I don't know what exactly gets encrypted - my understanding is that only the /data partition is encrypted, not the whole internal storage.

To that point, I was able (same as you) to copy to a visible folder (old TWRP) and then to PC. To me, if the folder is visible to external devices, it is not encrypted - it would defeat the very purpose of encryption

I definitely need to do more reading.....
[Nexus 4 Original Android Development] respider:
awesome!!

that's what I wanted

thank you, will try today :good:
[Nexus 4 Original Android Development] :
I using the newest recovery for my phone and it is cut off about 1 cm from the right. Tried reflashing the recovery and still the same. Any help would be appreciated. Thanks
[Nexus 4 Original Android Development] kyokeun1234:
Thats because the recovery is not made for Nexus 4 screen size. It is for 1280x720 screens. And Nexus 4 has a slight wider screen. Thus leaving that extra space. Don't worry about it. The recovery should still work fine. Don't let that bother you too much.
[Nexus 4 Original Android Development] :
Hmm..my brother has the nexus 4 as well and his recovery is not cut off
[Nexus 4 Original Android Development] spaceman860:
Yes it is unless he's using a theme

Sent from my Nexus 4
[Nexus 4 Original Android Development] scottx .:
I do. It would never restore right. Always error. I could never flash a new rom just to mess around and then go back to normal.

I think maybe it's because my backup was and always is 1.3gb. Maybe it can't handle the size.

I've since switched to philz clockworkmod [thread] and it works perfect. I like twrp for its openrecovery script ability and it's nice when flashing five or six zips but if I can't do a proper backup then it's useless to me. USELESS I SAY!
[Nexus 4 Original Android Development] chrolmesq:
I understand that this is pretty stable, but is this still under development?
[Nexus 4 Original Android Development] galaxys:
Nope, it is live and well....many versions this year.
[Nexus 4 Original Android Development] Fr33L4nc3r:
How does one use the ADB sideload stuff ?

It ssems to have been added in 2.3.0.0, but I can't find it in 2.5.0.0 under "Advanced".

Could it be because I'm using a theme ?
[Nexus 4 Original Android Development] azrash:
It is there under advanced-adb side load. Have you updated your theme to the latest one made for 2.5.0.0? I am using a theme myself

Flowed from my Nexus⁴
[Nexus 4 Original Android Development] Codekrypt:
I'm using 2.5.0.0 and I see it, I just used it to get back to the previous CM10.1 nightly. Could be your theme,maybe remove it temporarily or update it to support 2.5? If that doesn't work reflash TWRP.

Sorry this was in reply to Freelancer's post above.

Sent from my Nexus 4
[Nexus 4 Original Android Development] Fr33L4nc3r:
Thanks to both of you.

Just deleted /sdcard/TWRP/theme/UI.zip and rebooted in recovery to see it :good:
[Nexus 4 Original Android Development] soumoks:
Hey guys am currently on cwm touch recovery,i wanna change to twrp,which is the best method?

I know it can be done through the goo app and i also found a flashable zip,which method do you guys recommend,TIA :)
[Nexus 4 Original Android Development] rskyline:
The recommended way is like is described in OP, because is how it's meant to be. So goomanager app should be that way.
[Nexus 4 Original Android Development] kyokeun1234:
Oops accidental thanks

Just use goo. Easiest method
[Nexus 4 Original Android Development] soumoks:
Goo it is!,thanks both of you :)
[Nexus 4 Original Android Development] eng.stk:
I always flash zip, fast and reliable ;)
[Nexus 4 Original Android Development] galaxys:
Either way it will be a good day! :)
[Nexus 4 Original Android Development] soumoks:
Haha it was a good day :),twrp is awesome! except for one tiny issue,the twrp flash screen is aligned to the left,i read back a couple of pages and realized you have to apply a theme to rectify this,so i applied a theme compatible with the latest version of twrp and compatible with our phone's resolution,still the issue persists,any solutions?
[Nexus 4 Original Android Development] Stryder5:
Find a different theme lol. I'm using the Holo Dark theme here. Works like a charm and looks awesome. http://xdaforums.com/showthread.php?t=2035234
[Nexus 4 Original Android Development] spaceman860:
You can use the TWRP app https://play.google.com/store/apps/details?id=com.jmz.soft.twrpmanager

From my BLACKED OUT N4
[Nexus 4 Original Android Development] soumoks:
I am using the same theme :p

Will try different methods,as long as the core functionality of the recovery is working properly am not much bothered,thanks :)
[Nexus 4 Original Android Development] Paoliz:
i have a problem, when i click mount and select data, on pc nothing appear....why?
[Nexus 4 Original Android Development] rskyline:
I think that mounting doesn't work like that on Nexus 4. You have to connect it when is booted into system.

Enviado desde mi Nexus 4 usando Tapatalk 4 Beta
[Nexus 4 Original Android Development] Paoliz:
So...if my ROM doesn't boot, how can i connect with recovery?

Inviato dal mio Nexus 4
[Nexus 4 Original Android Development] spaceman860:
http://teamw.in/DataMedia

You can push a ROM using adb or side load a ROM with the recovery

From my BLACKED OUT N4
[Nexus 4 Original Android Development] gravitysandwich:
If you can start the boot loader (Google screen at boot) then hold volume up+down and power and HOLD it until a little screen pops up with an android dude. Use volume keys to navigate, and once it says recovery hit the power button. Done! Or maybe you knew this, but anyways here you go.
[Nexus 4 Original Android Development] Paoliz:
I know, but, from recovery, how can i connect nexus 4 to PC?

Inviato dal mio Nexus 4
[Nexus 4 Original Android Development] kwerdenker:
Like the others already said: you can't. Not directly in a drag&drop manner at least. You'll have to use the command line and adb to push the file to your device. Here is a thread with a little tutorial about it.
[Nexus 4 Original Android Development] Dees_Troy:
[RECOVERY] TWRP 2.6.0.0 touch recovery [2013-07-08]
[Nexus 4 Original Android Development] Chochiwpg:
Has 2.6.0.0 been pushed to the goo manager app as of yet? I usually install open recovery script from there but it recognizes the most recent as being 2.5.0.0 and not 2.6.0.0.

Thanks.
[Nexus 4 Original Android Development] Tylog:
Yes, shows 2.5.0.0 at the moment, you can download the image from the homepage, there is 2.6.0.0 for our device :)

Here is the link for mako

http://www.teamw.in/project/twrp2/129

Ps: thank you guys for the update, love this recovery :)

Tapatalk Nexus 4
[Nexus 4 Original Android Development] Chochiwpg:
Thanks, I noticed that on the TWRP website and will use that method when I get home. Was at work and wanted to use it via the app is all and noticed it wasn't available yet. Thanks though :good:
[Nexus 4 Original Android Development] Tylog:
If you don'twant wait you can use the app flash image gui from playstore , works fine , cost 1 Euro :)

https://play.google.com/store/apps/details?id=com.joeykrim.flashimagegui&hl=de

Sorry when it's off-topic but I think it's ok :)

Tapatalk Nexus 4
[Nexus 4 Original Android Development] xanthrax:
works fine to flash img with FLASHIFY , is free , i`ve just done it ;)
[Nexus 4 Original Android Development] hughfollett:
Edited

Inviato dal mio Nexus⁴ con Tapatalk⁴
[Nexus 4 Original Android Development] xanthrax:
sure ! i`ve got 2.6.0.0 now !
[Nexus 4 Original Android Development] Chochiwpg:
Ok now that is freaking awesome, thanks
[Nexus 4 Original Android Development] Tylog:
Ok, didn't know that there is a free app :)

Back to topic , update looks work good, test a backup and restore, works fine :) happy to see a new build.

Tapatalk Nexus 4
[Nexus 4 Original Android Development] Paoliz:
In this build the USB connect works?

Inviato dal mio Nexus 4
[Nexus 4 Original Android Development] xanthrax:
is nothing written in the change log about it but i`m afraid that isn`t possible on nexus 4
[Nexus 4 Original Android Development] Michealtbh:
It's always worked. We can't mount mass storage though as the N4 isn't a mass storage device. Adb works fine.
[Nexus 4 Original Android Development] xanthrax:
i thought he was talking about mass storage ... of course adb works fine ...
[Nexus 4 Original Android Development] thebrainkafka:
Is there a flashable zip available?
[Nexus 4 Original Android Development] xanthrax:
no , use flashify , see above
[Nexus 4 Original Android Development] Chochiwpg:
It's now available through goo manager app as well
[Nexus 4 Original Android Development] azrash:
Flashables.

openrecovery-twrp-2.6.0.0-mako.zip

md5 file openrecovery-twrp-2.6.0.0-mako.zip.md5

or md5 hash d52f25260e89a34fcfdb309008f81267

also checkout TWRP Manager a nice app to queue zips etc, it has a UI that is very close to TWRP!
[Nexus 4 Original Android Development] CMNein:
You'll still have the app, but not the important part, the binaries.
[Nexus 4 Original Android Development] parker09:
I get
[Nexus 4 Original Android Development] trter10:
Try redownloading
[Nexus 4 Original Android Development] parker09:
Yeah I was doing it through the N4 Toolkit but I ended up downloading it again and using a minimal version the ADB/fastboot from the SDK.
[Nexus 4 Original Android Development] sn0warmy:
Are there any good themes for this recovery available for the N4 yet?
[Nexus 4 Original Android Development] ViViDboarder:
I haven't really seen themes on XDA. I think rootz had a theme forum back in the day (a few months ago but seems like forever). Not sure now though.
[Nexus 4 Original Android Development] Marduk20:
Mount USB Storage didn't work for me.

Do I need a USB otg cable?

Need to copy things on my device while in Recovery.
[Nexus 4 Original Android Development] Dees_Troy:
http://teamw.in/DataMedia
[Nexus 4 Original Android Development] Marduk20:
Thanks alot!

Last time I flashed roms etc. my OS was Android 2.3.3 ^^

So it is no longer possible to get acces to USB Storage via Recovery Mount on Windows PC?
[Nexus 4 Original Android Development] Dees_Troy:
Not with the Nexus 4 at least. Eventually we might get MTP working in recovery but that's a different animal entirely.
[Nexus 4 Original Android Development] rmkilc:
Dees_Troy, would centering the 720px wide theme on our 768px wide display be an easy thing to do, or just about as much work as biting the bullet and creating a 768px wide theme?
[Nexus 4 Original Android Development] Dees_Troy:
Would only be marginally easier and half the reason I don't want to make a 768px theme is because I don't want to have to maintain it. Anytime we make a theme change it has to be pushed / pasted into each of the XML layouts for all the themes we're supporting.
[Nexus 4 Original Android Development] ViViDboarder:
If anyone wants to make and maintain a custom theme for this resolution, there should be a guide up. You can just start with the one we are using and then tweak it from there.
[Nexus 4 Original Android Development] rmkilc:
I just might do that. :)
[Nexus 4 Original Android Development] stankyou:
I've been using this recovery since I got my N4 and very satisfied with it. I just wanna ask if it's normal that it tends to heat up my device when idle?

I launched to the recovery one time and stepped out for a while(around 5 mins) and left it on the main menu not doing anything. When I returned, the back of the phone near the camera is hot to the touch like I've been playing a game. Is it due to the fact that the chip is working hard for the screen?
[Nexus 4 Original Android Development] jimmyz:
same here- its seems to burn through battery
[Nexus 4 Original Android Development] stankyou:
Yeah. Well I don't usually linger in recovery for so long but this can be something to keep in mind. Never leave it on recovery for long. :D

via xda app
[Nexus 4 Original Android Development] FSRBIKER:
Anyone having a problem making a compressed backup? I never used them before since I had plenty of storage on other devices so I figured this could save some room. I've tried it twice and each time it starts the backup then after a little bit the screen goes black and the phone is totally unresponsive with a red led flashing. Only way out of this was to plug the phone in and use power & vol down key would get me to the Fastboot screen to boot back to recovery, without plugging the phone in to an outlet nothing would work.

Any help or ideas?
[Nexus 4 Original Android Development] selectah:
Oh no. Then I guess I have to wait for another Release.

Gesendet von meinem Nexus 4 mit Tapatalk 2
[Nexus 4 Original Android Development] CMNein:
Does it indicate a battery % that differs from what your UI was reporting when you boot to recovery? I see this with TWRP, the battery % indicated in recovery is less than what my phone had been indicating.

Two scenarios:

-TWRP is correctly reading the actual battery level from recovery, and the UI battery % indication is borked, either by battery hardware fault, or a 4.2(.1) bug,

-TWRP is incorrectly reading the actual battery level from recovery.
[Nexus 4 Original Android Development] DontPushButtons:
It's updated on goo now, as well.

To clarify, I mean the goo app has 2.6 now

Edit: oops, just noticed someone else said this already. Carry on folks!
[Nexus 4 Original Android Development] DesignGrits:
Fingers crossed, last time I flashed a TWRP update the world almost ended......oh sweet, just rebooted in to recovery......nice logo! So far so good.
[Nexus 4 Original Android Development] swirly05:
How can I rename my backups still??
[Nexus 4 Original Android Development] swirly05:
I renamed my download through twrp and now my backup wont restore. Reason??
[Nexus 4 Original Android Development] eng.stk:
TWRP 2.6.0.0 flash zip

As usual, here's the flashable zip. Enjoy!

MD5 hash: 1894D7516D235AD8521E22C631CE03FF
[Nexus 4 Original Android Development] stevew84:
Ahh great, same thing that happened with the last update thru goo, can't boot up into recovery and now can't get past the Samsung splash screen.
[Nexus 4 Original Android Development] kwerdenker:
Samsung splash screen? This is the LG Nexus 4 forum :confused:

Hopefully you didn't flash the wrong recovery for your device...
[Nexus 4 Original Android Development] stevew84:
Haha, oops, that would explain it! I have the GS2 and N4 TWRP forums subscribed....wrong one!!

Either way, is it possible to get into bootloader and install the recovery that way?
[Nexus 4 Original Android Development] kwerdenker:
Looking at the supported devices http://www.teamw.in/twrp_view_all_devices shows no Samsung Galaxy S2 on the list. You should check the appropriate forum to see if there are any unofficial builds of TWRP for your device. If not you'll have to go back to clockworkmod. You should be able to find something about that in your device forum :)
[Nexus 4 Original Android Development] ssauger:
The S2 has no recovery partition and so there is no way to install a recovery, For the S2 recovery is included in the kernel, you change kernel/rom means you change also recovery
[Nexus 4 Original Android Development] stevew84:
Thanks for the info, but I was able to use Odin and flash the Tar file of the previous TWRP and I got everything back.
[Nexus 4 Original Android Development] xanthrax:
Because to rename the backup folder you need to get into recovery, restore /rename backup not from file explorer :rolleyes:, am I right?

sent from my Darkside of Nexus 4
[Nexus 4 Original Android Development] D3VI0US:
This version seems that it is designed for 1280x720 .. I got black space on the right even on the splash screen of twrp

Anybody can confirm?
[Nexus 4 Original Android Development] spaceman860:
Its been like that since forever

From my BLACKED OUT N4