yashsingh1/xdaforums huggingface dataset:
[Android Software Development] p2nv:
help

hi could someone please help me out here...

i was on recovery flashing last night and i accidentally hit set storage to data/0 or something and now my sdcard is all messed up. it keeps showing directory as an 0 folder. any way to repartition or something?
[Android Software Development] danarama:
It's just a setting to tell recovery where your sdcard is. Press it again to set it back
[Android Software Development] nikybiasion:
CWM Advanced 6.44.9 for Asus Memo Pad Smart (me301t)

https://drive.google.com/file/d/0B0pp61Jyiwx5cDFtczlOSVJfU1U/edit?usp=sharing
[Android Software Development] abhibnl:
[MENTION=4666971]Phil3759[/MENTION] Have you ended support for i9300 bro? The latest recovery is still version 6.41 for i9300. And sorry in case i missed something regarding the matter.
[Android Software Development] p2nv:
i have set it back again but it is still located under 0 folder in emulated next to a legacy folder and i cannot change it. even though it says its changed back in recovery. is there a way to repartition the whole phone again through odin or something?
[Android Software Development] danarama:
Just move it with a file manager.
[Android Software Development] p2nv:
i dont understand. where do i move it to? even es file explorer see the drive as 0 rather than just sdcard. i read some things about it being emulated becasue of JB but i don't understand all that stuff.
[Android Software Development] danarama:
What phone and android version have you got?
[Android Software Development] p2nv:
SM-G900F

Android 4.4.2
[Android Software Development] danarama:
Then you don't need to move it anywhere. Everything is correct

Maybe this will help explain

http://xdaforums.com/showthread.php?t=2274218
[Android Software Development] p2nv:
it was never labelled legacy before. it was storage/sdcard

now everything is confusing
[Android Software Development] danarama:
Recovery didn't do that. All recovery does is set what recovery calls /sdcard to either /data/media or /data/media/0. In your case your device should use /data/media/0. It does not change anything in android.

Browse to this location using a root enabled file manager and see. Thats where your sdcard content is

I dont know why your phone shows legacy but it is not recovery related. Post a thread on your device forum.
[Android Software Development] Phil3759:
[MENTION=2872010]rootSU[/MENTION]

There is a huge 6.46.0 version improvements on my git

It mainly enhance the visuals during backup/restore

It fixed nandroid md5 check and progress bugs

It also adds a new f2fs <-> ext4 conversion enhancements to support options from extra.fstab if needed

Let me know if you find any bugs
[Android Software Development] danarama:
Super. Will do!!!! Thanks for all your work
[Android Software Development] Phil3759:
[MENTION=4021423]ketut.kumajaya[/MENTION]

Hope you can take a look at the new f2fs changes to support options2 through extra.fstab file
[Android Software Development] Phil3759:
drop the f2fs commit: it will hang things if you try conversion
[Android Software Development] danarama:
It's gonna be tomorrow evening before I sync and compile. Please let me know if anything changes before then
[Android Software Development] aguaz:
How does Recovery detect the right partitions?

Hardcoded for the specific device?

By PIT?

By GPT?
[Android Software Development] danarama:
Yes it is "hardcoded" using fstab

Except /sdcard which it looks to see if /data/media/0 exists
[Android Software Development] Phil3759:
[MENTION=2872010]rootSU[/MENTION]

6.46.1 fixed the f2fs issue

This one should be good

extra.fstab additional entries example:

/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr,errors=recover wait,check
/dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr,errors=recover wait,check,encryptable=footer,length=-16384

If you don't add them to your extra.fstab, it will still drop to minimal flags
[Android Software Development] MasterAwesome:
I have a question about the recovery fstab v2... What are the flags you add for a sdcard(I've just been blindly adding it from the /proc/mounts) ? Is there a thread/website where I can read what each flag represents?
[Android Software Development] Phil3759:
defaults:

https://github.com/CyanogenMod/android_device_samsung_jflte/blob/cm-11.0/rootdir/etc/fstab.qcom#L15
[Android Software Development] MasterAwesome:
I mean for a mediatek device which I'm building for.. https://github.com/IceFlavouredKitkat/android_device_micromax_a110/blob/master/recovery.fstab

Here's the /proc/mounts

rootfs / rootfs rw,noatime,nodiratime 0 0
tmpfs /dev tmpfs rw,nosuid,noatime,nodiratime,mode=755 0 0
devpts /dev/pts devpts rw,noatime,nodiratime,mode=600 0 0
proc /proc proc rw,noatime,nodiratime 0 0
sysfs /sys sysfs rw,noatime,nodiratime 0 0
none /acct cgroup rw,noatime,nodiratime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,noatime,nodiratime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,noatime,nodiratime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,noatime,nodiratime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,noatime,nodiratime,cpu 0 0
/emmc@android /system ext4 rw,noatime,nodiratime,discard,nobarrier,noauto_da_alloc,commit=1,data=ordered 0 0
/emmc@usrdata /data ext4 rw,nosuid,nodev,noatime,nodiratime,discard,nobarrier,noauto_da_alloc,data=ordered 0 0
/emmc@cache /cache ext4 rw,nosuid,nodev,noatime,nodiratime,discard,nobarrier,noauto_da_alloc,data=ordered 0 0
/dev/block/vold/179:97 /storage/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:97 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /storage/sdcard0/.android_secure tmpfs ro,noatime,nodiratime,size=0k,mode=000 0 0
/dev/block/vold/179:6 /storage/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-0 /mnt/asec/jp.naver.line.android-2 ext4 ro,dirsync,nosuid,nodev,noatime,nodiratime 0 0
/dev/block/dm-1 /mnt/asec/com.igg.castleclash-2 ext4 ro,dirsync,nosuid,nodev,noatime,nodiratime 0 0

i tried exactly what it said there i can get only one to mount at a time. either external or the internal.

Here is the previous recovery.fstab https://github.com/IceFlavouredKitk...72fb871675c80ecb0a62f583658fae/recovery.fstab
[Android Software Development] Phil3759:
Your fstab is wrong.

Look at the example I linked you above. Only change the device path

Also, set auto mount points and voldmanaged flags until you understand what you are really editing
[Android Software Development] MasterAwesome:
So mine would be something like this?

/dev/block/mmcblk0p6 auto auto defaults voldmanaged=sdcard1:auto
/dev/block/mmcblk1p1 auto auto defaults voldmanaged=sdcard0:auto
[Android Software Development] yuweng:
Bro, i've publish my findings for MTK here but nobody take a look at it & i wouldn't blame you as this thread has span to more than 449 pages . . . :cool:

To identify your MTK voldmanaged path for sdcard -> adb shell find /sys -name mmc0 On android & nix -> adb shell -> ls -R | grep "mmc0"

recovery.fstab

# For typical MT6575/ 77 devices
/devices/platform/mtk-sd.0/mmc_host/mmc0 auto auto defaults voldmanaged=sdcard0:[COLOR="Blue"][SIZE="4"]6[/SIZE][/COLOR] [COLOR="Red"]<- adb shell cat /proc/dumchar_info & look for [COLOR="Blue"][B]fat[/B][/COLOR] partition no[/COLOR]
/devices/platform/mtk-sd.1/mmc_host/mmc1 auto auto defaults voldmanaged=sdcard1:auto

# For generic MT65xx after MT6577
/devices/platform/mtk-msdc.0/mmc_host/mmc0 auto auto defaults voldmanaged=sdcard0:[COLOR="blue"][SIZE="4"]6[/SIZE][/COLOR]
/devices/platform/mtk-msdc.1/mmc_host/mmc1 auto auto defaults voldmanaged=sdcard1:auto

To identify lun file path -> adb shell find /sys -name lun0 On android & nix -> adb shell -> ls -R | grep "lun0"

BoardConfig.mk

TARGET_USE_CUSTOM_LUN_FILE_PATH := "/sys/devices/platform/mt_usb/gadget/lun%d/file"

TARGET_USE_CUSTOM_LUN_FILE_PATH := "/sys/devices/platform/mt_usb/musb-hdrc.0/gadget/lun%d/file" [COLOR="Red"]<- For latest MT6582/ 92[/COLOR]
[Android Software Development] vua777:
+1 please
[Android Software Development] ykkfive:
hi philz3579

why dont u consider to generate the fstab on the fly? this helps if only some of the partitions are formatted in f2fs while others in ext4 etc. just my 2 cents

ps ignore this post if similar thing has been implemented already coz I am not updated with latest changes
[Android Software Development] danarama:
Could you please provide examples of how this would work / code would look? For information purposes?
[Android Software Development] ykkfive:
sure, my pleasure

current i have 1 ext4 partition on my note2lte while others in f2fs. for my note8 they are all f2fs, occasionally with a ext2 formatted /cache

i use a fstab template filled with variable "@fs" and when the phone boots (needs a init.sh) each partition is checked by reading the magic numbers to determine whether it is ext4, ext2, f2fs, etc. once the fs is determined, the @fs variable will be replaced with the correct fs value obtained. and after all needed partitions are read, then it is safe to process the real init with a dynamic generated fstab
[Android Software Development] danarama:
Thanks for that. Sounds interesting.

[MENTION=4666971]Phil3759[/MENTION] - Sorry I haven' had chance to build yet :(
[Android Software Development] Phil3759:
Actual code, will auto-detect f2fs and ext4, provided fstab has one of these 2 fstypes:

https://github.com/PhilZ-cwm6/philz_touch_cwm6/blob/cm-11.0/roots.c#L273

you can very easily change things there to support more swap types

we can even add support for auto type and the final fstab will be correctly generated based on real fstype

However, the huge limitation is the mount options. You will be always dropping to bare minimal mount options. Some devices need specific flags to work smooth

My current implementation added the fs_type2/fs_options2 support through extra.fstab

It make it much more optimized to load the needed type/options combo
[Android Software Development] Android-Andi:
Interesting way for fstab Generation for f2fs https://github.com/NovaFusion/android_device_samsung_golden/tree/cm-11.0/genfstab

Gesendet von meinem GT-I8190 mit Tapatalk
[Android Software Development] Phil3759:
That would enable things on early startup

Here's another way:

https://github.com/CyanogenMod/andr...6-common/blob/cm-11.0/rootdir/etc/gpecheck.sh

I went with a recovery only approach: you can migrate any ext4 partition without recompiling recovery
[Android Software Development] Phil3759:
np

I emptied my todo list

Just decided to do one requested feature: password locking

I will be looking at it, but could take time

Actual 6.46.3 is final and should be stable

I will update the thread title and add change logs later
[Android Software Development] Irwenzhao:
Hello [MENTION=4666971]Phil3759[/MENTION],

Wonder how can I format a partition to FAT32 with Philz recovery? What's the command to use in update-binary?

N7105 rocking AOSB with AGNi kernel,

Click "Thanks" if I was of any help!
[Android Software Development] ykkfive:
right. its more complicated for u since u need to support numerous devices with specific settings, but I don need to care about this, atm at least
[Android Software Development] jurben:
Talking about simplification (to be uncomplicated) in recovery, i've just noticed that in mine /sdcard and /storage/sdcard0 are purely just symlinks to /data/media, not a mount of fuse device as in normal boot.
[Android Software Development] danarama:
No need to make it over complicated when the end result is the same.
[Android Software Development] MasterAwesome:
Hi,

W:failed to mount /dev/block/mmcblk1p1 (File exists)
E:Can't mount /sdcard

What does this error mean? using vold managed doesn't seem to work and when I use the normal style only one partition mounts a time either the external or internal depending on the which I set as /storage/sdcard0.

Regards

MasterAwesome
[Android Software Development] jurben:
From what i see in my recovery:

if the device use /data/media or /data/media/0 as internal storage, then:

/sdcard and /storage/sdcard0 is used by that internal storage, even if there is no entry for that internal storage in recovery.fstab. in this case there is no mount menu for it but there is menu exists to install zip from this mount point and to backup restore to/from this mount point.

if we state other mount point for it. then this mount point is like extra mount point we add in addition to /sdcard and /storage/sdcard0.

(this is my conclusion from what i see. actually i don't mastering the code).

(Actually i wonder, why your error message said "file exists")
[Android Software Development] MasterAwesome:
I'll try removing the mount point for internal SD card from fstab and let you know.

Regards

MasterAwesome

---------- Post added at 08:04 PM ---------- Previous post was at 07:49 PM ----------

I get this error now

mount: mounting /dev/block/mmcblk1p1 on /sdcard failed: Too many symbolic links encountered
mount: mounting /dev/block/mmcblk1p1 on /sdcard failed: Too many symbolic links encountered
mkdir: can't create directory '/sdcard/': Too many symbolic links encountered

Regards

MasterAwesome
[Android Software Development] Phil3759:
I really don't get what your are trying to achieve

/dev/block/mmcblk1p1 should never be mounted at /sdcard mount point
[Android Software Development] Ramondel:
Philz, I understand that this is the development forum but I have asked in the KLTE forum with no response so I am bringing it here. Are there any plans for update on the KLTE version as there has not been one since middle of May (6.41.6)?
[Android Software Development] Phil3759:
[MENTION=2872010]rootSU[/MENTION]

Good news. I managed to implement a good recovery lock scheme on start

I am now writing code to set/change the password from menus
[Android Software Development] donmarkoni:
Please read this.
[Android Software Development] Ramondel:
I read that note when he first posted it, but in that same post he states this:

- no more direct release for any device except the ones I own (galaxy S2, S5 and Note 10.1 2014 Wifi)

And it is the S5 that I am asking about!
[Android Software Development] Phil3759:
My bad, I fixed the typo

I own an S4 not an S5
[Android Software Development] donmarkoni:
OK, mate, no need for yelling. If you want me to be direct, then here it goes: asking for updates or ETA's is against the rules and more important, it's rude.
[Android Software Development] danarama:
This is an amazing development!!!

Are you looking at:

1) Disable adb

2) Disable OTG

3) Disable AmonRA file explorer?

I think these are only 3 things it needs to be secure.
[Android Software Development] Ramondel:
Thanks for the response. I will see who is the current owner of the thread now then. Sorry for any inconvenience that my question might of caused.
[Android Software Development] Phil3759:
adb and aroma are disabled

OTG have to try. Did not think at it, but probably it is also

edit: yes, it won't let any thing happen. There is no GUI at all on screen lock, neither adb
[Android Software Development] danarama:
Operations like Nandroid backup and zip flashing could still be enabled safely as long as cannot backup to OTG when locked or transfer zips to memory via adb.. So Philz users could still use their recovery locked and do everyday things?
[Android Software Development] MasterAwesome:
I'm trying to mount my external SD card.. I changed the mount point to /storage/sdcard1 and external sdcard mounts but I have to use the free browser to navigate to it and installing zip works. Although, when I click install from sdcard it navigates to the default /data/media which is not system linked to my internal sdcard.

Regards

MasterAwesome
[Android Software Development] meskes:
Hey guys, I'm going to be encrypting my phone again, and this is going to be the first time I'm going to be using philz touch recovery with it. My question is: does philz touch support encrypted devices? I really don't want to go back to TWRP, just to get that sort of support.
[Android Software Development] brizey:
I hope this is not a repeat question. Is there a way to force updater scripts to use commands for a chosen file system? Currently I have been using ktoonz's tool or manually editing updater scripts to format to f2fs and mount as f2fs. Is there a way to have the recovery intercept these commands and substitute the correct ones for the existing file system? This would save time and make using f2fs a little more bullet proof for newbs.
[Android Software Development] Phil3759:
And how should it know when user really doesn't want it to be intercepted?

So, just edit your updater-script if you need a special use
[Android Software Development] Phil3759:
and what about backup to external sd ?
[Android Software Development] danarama:
Oh, yes same. Sorry. Forgot it as I don't have an sd slot. "Removable media"
[Android Software Development] brizey:
Same way your restore function knows--a toggle. "Force updater to use existing file system". And really, the only reason you wouldn't is if you are running a formatting script. For day to day ROM installs you would want it to use the destination fs.
[Android Software Development] Phil3759:
I get your point

However, it is not that easy.

The format commands are actually handled by the update-binary bundled into the zip

I can create a patched update-binary, include it in CWM and force using it. This was the situation with early legacy installers bug fix

However, I am not sure I am going that way, at least for now

Will add to my to do list though. That way, if f2fs demand is increasing, I can look at it
[Android Software Development] Phil3759:
6.47.3

- add recovery key lock

When setup, recovery will be pass locked if started by user

Adb will be also locked

No GUI will be available

Boot scripts

- they will be allowed so that it doesn't break your automated backups

- on script success, the device will auto reboot

- on script failure, before going to the recovery menus, it will be locked

- during start up scripts, adb will be locked

The pass key is not encrypted, but this is really useless if your android device rom has a lock screen

Start up scripts are allowed to write to external storage. The rationale is that if you have one setup to auto run, you'll probably already have a few recent backups on your external storage already
[Android Software Development] joni2012:
Big work, create for m7?very thank
[Android Software Development] brizey:
Thanks. If it's hard, then its probably not worth it unless you get a wild hair and just want to do it to do it. I think I can get it to the point of dropping the zip in a directory and running a script to extract the updater-script, sed the lines in, and repack the zip. Just a little rusty on command line stuff (I live in an Excel VBA world at work). May even make it a recovery zip that converts a file if its in a special directory.
[Android Software Development] jurben:
Great work!

Thanks.

But I don't see the keyboard. Am I missing something in my device tree?
[Android Software Development] aguaz:
Does Recovery set a certain boot flag in order to boot into normal mode again at the next reboot?

I'm asking because I witness a strange behaviour after flashing a boot.img onto the recovery partition (I'm testing a dual boot set up via recovery). The 2nd system does indeed boot up via the recovery partition, but now the phone automatically boots from recovery on every reboot. I can't get it back to boot in normal mode, no matter what I tell adb or the reboot command.

I had to re-flash recovery and boot it up in order to be able to boot into normal mode again.

Is there anything I need to tell the 2nd system in order to get back to normal mode with the next boot?
[Android Software Development] Phil3759:
No, the pass key uses your actual hardware keys

It is of 6 key presses length

Well, it is not recovery, but android system

Some devices need to set a special flag on the BCB. That's done in recovery

Other devices need to set things through a shell script on boot, usually on some "parameters" partition:

https://github.com/CyanogenMod/andr...mon/blob/cm-11.0/recovery/postrecoveryboot.sh

You have to properly setup your device tree for that
[Android Software Development] danarama:
Ooh exciting. Missed this post. Will test this weekend. Thanks
[Android Software Development] Phil3759:
yes, please

I need your opinion

Currently goo is down, so couldn't roll out a test version for selected devices

If you can test the locking implementation with your start up scripts, it would help a lot

I plan to release an update for a few devices if no bugs are reported
[Android Software Development] danarama:
I use extendedcommand - is that OK for a test?
[Android Software Development] bindassdost:
i had compiled philz recovery for micromax canvas 2 (A110) and is working perfeclty

and im proposing device request for the same

thread link http://xdaforums.com/micromax-a110/orig-development/recovery-philz-6-47-3-touch-recovery-t2789177

recovery.img link http://d-h.st/F8z
[Android Software Development] Phil3759:
yes, it is enough

If it is ok without major bugs, let me know and I will link to OP and add to goo.im
[Android Software Development] RVR:
Heyy Phil .. Can u pl help with galaxy grand 2 ...we tried lots of revoceries incld philz ... But I think Qualcomm secure boot is not allowing it to flash ... Can u pl help us ??

It does use boot.img-dt
[Android Software Development] Phil3759:
6.47.3 (20.06.2014)

I am planning to roll out for a few devices for which users are giving useful feedbacks

Needs a few time to get my device tree in sync with many recent major updates to cm sources
[Android Software Development] Leandro.DR:
[MENTION=4666971]Phil3759[/MENTION], please update Galaxy W i8150 (ancora), the latest available version still uses CWM 6.0.4.5 as a base.
[Android Software Development] ngr.hd:
Please include GMT +5.30 (India) in the timezone settings.
[Android Software Development] aguaz:
Are there any means to chainload a boot.img from within recovery?
[Android Software Development] berryman13:
I'm hoping that this can get updated for the d2lte variants (SGS3 for ATT, TMO, SPR, etc...) as the latest we have is 6.41.6...pretty gold compared to what I've seen in the commits and it makes my mouth water! :P

My ubuntu building laptop is getting repaired right now so I can't even take a shot at building this, hopefully you can have it pushed before I even get to that. Would really appreciate it, otherwise, thanks for all the great work. I'm sure I'll be able to compile someday!
[Android Software Development] tomatende2001:
Ok, I understand that CWM is part of Cyanogenmod and was developed from them. This does not change the fact that I have neither the requirements nor the knowledge to compile the recovery itself. That is the reason why I'm asking here. I would also assist if there were to obtain data of the "HTC One mini 2" (partition layout or anything else, that a normal man can get). I dont know this ...
[Android Software Development] danarama:
It doesn't matter who is to do the work. No CM11 source code, no recovery.
[Android Software Development] tomatende2001:
You mean no CM11 source for this specific device?
[Android Software Development] danarama:
Yep. Whoever makes the recovery for the device, uses that to build this recovery.
[Android Software Development] tomatende2001:
Ok, this is a little bit off-topic, but is there a way to flash supersu with the stock 3e recovery?