[Recovery][crackling] Team Win Recovery Project for the Wileyfox Swift - Wileyfox Swift

Team Win Recovery Project 3.0.2
Notice: This is a test build as a start to becoming an official build, I am looking for feedback right now - do not consider this stable!
I am currently looking for users to test all the features and report back with what works.
Quote the 2nd post and put a pass or fail in each of the [ ] boxes!
Please, if you can, post your recovery.log after doing the tests that fail, as well as dmesg.log
Code:
adb shell cat /tmp/recovery.log > recovery.log
adb shell dmesg > dmesg.log
WHAT IS TWRP?
Oh come on, you know what it is - don't try to fool me!
In case you're serious, though...
Team Win Recovery Project is a custom recovery for Android devices.
It allows you to back up and restore your data, flash custom ROMs to your device, repair broken file systems, and root your device.
DOWNLOAD
You can find the device page here:
https://idlekernel.com/twrp/crackling/ (temporary! THESE ARE TEST BUILDS!)
Find instructions on how to unlock and root your device with fastboot here:
https://twrp.idlekernel.com/devices/wileyfoxswift.html (temporary device page - do not download from here!)
CHANGES
v3.0.2-0 - See here for the changes.
FEATURES
MTP support
USB Mass Storage support
Micro SDcard support
f2fs file system support (read, write, format, backup & restore)
exFAT file system support (read, write, format)
NTFS file system support (read, write)
ADB root
Full SELinux support
Built in android 6.0 tree
KNOWN ISSUES
Brightness node not set (unknown location, join #twrp to help!)
Battery status possibly unknown
CONTACT & SUPPORT
You can find us on IRC at #twrp on chat.freenode.net.
You can also post in this thread and I will attempt to answer any questions you may have.
SOURCE CODE
Device tree: https://github.com/jcadduono/android_device_wileyfox_crackling
Kernel sources: https://github.com/jcadduono/android_kernel_cyanogen_msm8916/tree/twrp-6.0
TWRP: https://github.com/omnirom/android_bootable_recovery
CONTRIBUTIONS
Gerrit for TWRP: http://gerrit.omnirom.org/
Gerrit for officially supported devices: http://gerrit.twrp.me/
XDA:DevDB Information
Team Win Recovery Project - Wileyfox Swift, Tool/Utility for the Wileyfox Swift
Contributors
jcadduono, The Team Win Recovery Project team
Source Code: https://github.com/jcadduono/android_device_wileyfox_crackling
Version Information
Status: Testing
Current Beta Version: 3.0.2-0
Beta Release Date: 2016-04-27
Created 2016-04-28
Last Updated 2016-04-29

TWRP functional checklist
Code:
Blocking checks
[ ] - Correct screen/recovery size
[ ] - Working touchscreen
[ ] - Backup to internal/microSD
[ ] - Restore from internal/microSD
[ ] - Reboot to system
[ ] - ADB & ADB shell
[ ] - Flash zips in Install page
[ ] - Flash boot.img/recovery.img using Flash Image in Install page
Medium checks
[ ] - Flash zip with ADB sideload
[ ] - UI colors (red/blue inversions)
[ ] - Screen goes off (and back on :))
[ ] - EXT4 support (wipe/format/restore to)
[ ] - F2FS support (wipe/format/restore to)
[ ] - exFAT support (wipe/format)
[ ] - NTFS support (wipe/format)
[ ] - System, Data, Internal Storage, microSD card, and Firmware partitions listed in mount/backup choices
[ ] - Decrypt encrypted /data
[ ] - Correct date
[ ] - MTP read/write
[ ] - USB Mass Storage read/write
[ ] - Set brightness level
Minor checks
[ ] - Reboot to bootloader
[ ] - Reboot to recovery
[ ] - Power Off
[ ] - Battery level
[ ] - Temperature
[ ] - Encrypted backups
[ ] - Vibration
[ ] - Screenshot
[ ] - Resize data partition

Blocking checks
[pass] - Correct screen/recovery size
[pass] - Working touchscreen
[pass] - Backup to internal/microSD
[pass] - Restore from internal/microSD
[pass] - Reboot to system
[fail] - ADB & ADB shell
[pass] - Flash zips in Install page
[pass] - Flash boot.img/recovery.img using Flash Image in Install page
Medium checks
[ ] - Flash zip with ADB sideload
[pass] - UI colors (red/blue inversions)
[pass] - Screen goes off (and back on )
[pass] - EXT4 support (wipe/format/restore to)
[ ] - F2FS support (wipe/format/restore to)
[ ] - exFAT support (wipe/format)
[ ] - NTFS support (wipe/format)
[pass] - System, Data, Internal Storage, microSD card, and Firmware partitions listed in mount/backup choices
[fail] - Decrypt encrypted /data
[pass] - MTP read/write
[pass] - USB Mass Storage read/write
[pass] - Set brightness level
Minor checks
[pass] - Reboot to bootloader
[pass] - Reboot to recovery
[pass] - Power Off
[pass] - Battery level
[pass] - Temperature
[fail] - Encrypted backups
[pass] - Vibration
[pass] - Screenshot

Epmak said:
Blocking checks
[fail] - ADB & ADB shell
[fail] - Decrypt encrypted /data
[fail] - Encrypted backups
Click to expand...
Click to collapse
Thanks! You're sure adb isn't working? I can't find any reason it wouldn't. :S
I will try CM 13.0 decryption libs instead of CyanogenOS, maybe that will help with encryption.
For the third item, encrypted backups - you were unable to backup say...system, and use the encryption option in the options page?
(if that is so, can you get me a log trying to make an encrypted backup?)

jcadduono said:
You're sure adb isn't working? I can't find any reason it wouldn't. :S
Click to expand...
Click to collapse
Yes, i plug phone usb cable.
adb shell
see
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: device not found
adb working in another UNOFFICIAL TWRP beroid
jcadduono said:
For the third item, encrypted backups - you were unable to backup say...system, and use the encryption option in the options page?
(if that is so, can you get me a log trying to make an encrypted backup?)
Click to expand...
Click to collapse
I use the encryption option, backup can't encrypt.
See log files.

Epmak said:
Yes, i plug phone usb cable.
adb shell
see
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: device not found
adb working in another UNOFFICIAL TWRP beroid
I use the encryption option, backup can't encrypt.
See log files.
Click to expand...
Click to collapse
i don't see any error in the log for encrypted backup? it saved fine?
uploaded test3 if youre up for trying again!

I'm planning on giving this a run through later (possibly later in the week), but I needed to clarify something in the mean time:
jcadduono said:
Code:
[ ] - EXT4 support (wipe/format/restore to)
[ ] - F2FS support (wipe/format/restore to)
[ ] - exFAT support (wipe/format)
[ ] - NTFS support (wipe/format)
Click to expand...
Click to collapse
Do the above requirements apply to the SDcard, or just the phone internal storage?
(My phone is currently encrypted, so I'm currently stuck with an older CM13 build, so have to flash anew. I haven't tested restoring from backup, and I'm hesitant to potentially lose access to a certain app right now.)
The list of mountable partitions includes a partition named "persist", unsure if this is of any relevance?
Additionally, comparing the Swift's fstab in TWRP to others, it would appear that it might be lacking in the encryption related flags on some mounts?
Also, thanks!

ryzened said:
I'm planning on giving this a run through later (possibly later in the week), but I needed to clarify something in the mean time:
Do the above requirements apply to the SDcard, or just the phone internal storage?
(My phone is currently encrypted, so I'm currently stuck with an older CM13 build, so have to flash anew. I haven't tested restoring from backup, and I'm hesitant to potentially lose access to a certain app right now.)
The list of mountable partitions includes a partition named "persist", unsure if this is of any relevance?
Additionally, comparing the Swift's fstab in TWRP to others, it would appear that it might be lacking in the encryption related flags on some mounts?
Also, thanks!
Click to expand...
Click to collapse
I suppose you can ignore NTFS as the Swift doesn't support OTG storage anyways.
exFAT/vfat/f2fs would apply microSD cards.
ext4/f2fs would also apply to data, however you would need a rom with a kernel/fstab capable of taking advantage of that.
I can remove persist from the fstab, it probably shouldn't be there anyways.
Explain what you think is missing related to encryption? I believe I have everything.
When backing up data, it will be unencrypted unless you select the encrypt backup option (even if the partition is already encrypted), and when restoring a data backup, it will be whatever the partition currently is (if the filesystem is encrypted, then restoring unencrypted data backup will still keep your data partition encrypted), unless you use the [Format Data] button on the Wipe page to remove encryption from the data partition.

locking checks
[pass ] - Correct screen/recovery size
[ pass] - Working touchscreen
[ pass] - Backup to internal/microSD
[ ] - Restore from internal/microSD
[pass ] - Reboot to system
[fail ] - ADB & ADB shell
error: insufficient permissions for device
[ ] - Flash zips in Install page
[ ] - Flash boot.img/recovery.img using Flash Image in Install page
Medium checks
[ ] - Flash zip with ADB sideload
[ ] - UI colors (red/blue inversions)
[ ] - Screen goes off (and back on )
[ ] - EXT4 support (wipe/format/restore to)
[ ] - F2FS support (wipe/format/restore to)
[ ] - exFAT support (wipe/format)
[ ] - NTFS support (wipe/format)
[ ] - System, Data, Internal Storage, microSD card, and Firmware partitions listed in mount/backup choices
[ fail] - Decrypt encrypted /data
[ ] - Correct date
[ ] - MTP read/write
[ ] - USB Mass Storage read/write
[ ] - Set brightness level
Minor checks
[pass ] - Reboot to bootloader
[ pass] - Reboot to recovery
[ ] - Power Off
[ ] - Battery level
[ ] - Temperature
[ ] - Encrypted backups
[ ] - Vibration
[ ] - Screenshot
[ ] - Resize data partition
Sorry couldn't test everything, cause can't mount local Storage.

piratoes said:
locking checks
[pass ] - Correct screen/recovery size
[ pass] - Working touchscreen
[ pass] - Backup to internal/microSD
[ ] - Restore from internal/microSD
[pass ] - Reboot to system
[fail ] - ADB & ADB shell
error: insufficient permissions for device
[ ] - Flash zips in Install page
[ ] - Flash boot.img/recovery.img using Flash Image in Install page
Medium checks
[ ] - Flash zip with ADB sideload
[ ] - UI colors (red/blue inversions)
[ ] - Screen goes off (and back on )
[ ] - EXT4 support (wipe/format/restore to)
[ ] - F2FS support (wipe/format/restore to)
[ ] - exFAT support (wipe/format)
[ ] - NTFS support (wipe/format)
[ ] - System, Data, Internal Storage, microSD card, and Firmware partitions listed in mount/backup choices
[ fail] - Decrypt encrypted /data
[ ] - Correct date
[ ] - MTP read/write
[ ] - USB Mass Storage read/write
[ ] - Set brightness level
Minor checks
[pass ] - Reboot to bootloader
[ pass] - Reboot to recovery
[ ] - Power Off
[ ] - Battery level
[ ] - Temperature
[ ] - Encrypted backups
[ ] - Vibration
[ ] - Screenshot
[ ] - Resize data partition
Sorry couldn't test everything, cause can't mount local Storage.
Click to expand...
Click to collapse
error: insufficient permissions for device
I was on linux when I saw this, the problem turned out to be the wheel group in the sudo file was hashed out ran visudo as root and un hashed it
No change, rebooted and the message disapered
Note adb still worked in windows

Thanks for your work! I am looking forward to the Swift becoming officially supported by TWRP.
I tried the test3 build and also couldn't decrypt the data
But please note that I am also not able to decrypt my data partition using the cyanogenmod recovery. Using latest CM13 nightly.

I'm finding that adb and adb shell work fine until you click "cancel" when TWRP can't decrypt the data. So therefore you have to push all your files prior to touching the phone. It also has the effect of not permitting adb sideload from working.
I expect once the encryption issue is solved the adb and adb shell won't be an issue for people either.

can we root Android N with this version?

Will this be stabile soon?

thebrainkafka said:
Will this be stabile soon?
Click to expand...
Click to collapse
Stable is here: http://forum.xda-developers.com/showthread.php?t=3350351

Related

MIUI A2SD+ doesn't work properly... (getting pretty geeky inside, Help!)

Just CHECK POST #7, Please!!!!
Hey,So, as the title says... i've tested MANY ROMs... (Almost all Sense UI ROMs and a lot of STOCK ROMs) i never had a problem with A2SD+ and apps were using it correctly.... now i have MIUI 1.6.17.1 (installed the separate fix patch.. for whatever it does)
Anyways, now i have apps restored from Titanium backup scattered ... some in Internal Memory (don't have anymore space and this is my problem) some in A2SD section (ext) and some on SD card....
i tried repairing A2SD (a2sd repair in terminal) but it doesn't make any difference (it works as far as i know but i doesn't move apps to SD-EXT but it says it does so!!!!)
i've reinstalled the ROM 4 times and then when i thought it worked i've all my backups and stuff back and now it's doing it again!!!
Summary:
main problem: Not all apps in SD-EXT (A2SD Section) and now i have ONLY 15 MB of internal memory and therefore can't install market apps...
Extra problem: i can't move ANY app to SD card although i have 600 MB of free space and can't move apps to internal due to insufficient memory ...
Tech info:
Android 2.3.4
MIUI 1.6.17.1 (Fix installed) > ROM from MIUI.us
S-Off..
Recovery 3.2.0.0 << something like that... or maybe 3.0.0.2
download the terminal emulator from market.
then type in these commands
su
a2sd check
a2sd reinstall
[your phone restarts after this progress]
then start the emulator again
su
a2sd zipalign
a2sd cachesd
now it should work
^^^^^^^^^^^ ok i did.... let's see now, *opening apps*
Holy smoked chicken pasta~~!!!!! Now EVERYTHING installed on the INTERNAL Memory just Force Closes!!! (SD Card apps are OK!!)
Hmmm.... i noticed that the terminal keeps telling me to "Reboot: using Darktremor Busybox" ... and says [x]: Swap environment not found
and [x]: Problem detected: Darktremor a2sd may not have ran during boot. can not read a2sd.mountpoint
This Darktremor guy sure has the solution.... how can i fix this?
btw, after the terminal commands you gave me i have now 39MB :/ it's supposed to be better and also apps aren't supposed to be FCing right?
here's the full terminal log....
Code:
[FONT=arial]$su[/FONT]
[FONT=arial]# a2sd cachesd
[ ] GREP: Using ROM Busybox.
[!] REBOOT: Using Darktremor Busybox.
[ ] FDISK: Using ROM Busybox.
[ ] CAT: Using ROM Busybox.
[ ] MKDIR: Using ROM Busybox.
[ ] RMDIR: Using ROM Busybox.
[ ] CHMOD: Using ROM Busybox.
[ ] MOUNT: Using ROM Busybox.
[ ] UMOUNT: Using ROM Busybox.
[ ] CP: Using ROM Busybox.
[ ] RM: Using ROM Busybox.
[ ] MV: Using ROM Busybox.
[ ] LN: Using ROM Busybox.
[ ] MORE: Using ROM Busybox.
[ ] MKNOD: Using ROM Busybox.
[ ] AWK: Using ROM Busybox.
[ ] SLEEP: Using ROM Busybox.
[ ] SYNC: Using ROM Busybox.
[ ] TEE: Using ROM Busybox.
__ _____
| \ |
| | |
|__/ | Darktremor Apps2SD 2.7.5.3 Beta 4a (2011-01-30)
[-] Checkpoint 1: Check for SD Card Fix and Implement.
[-] Checkpoint 2: Run Dalvik Heap Program (if exists).
[-] Checkpoint 3: Run Set Low Memory Killer Program (if exists).
[-] Checkpoint 4: Determine Mount Point.
[-] Checkpoint 5: Set Parameter Variables.
[ ] GetProp Command = /system/bin/toolbox getprop
[ ] SetProp Command = /system/bin/toolbox setprop
[ ] Mount Point = /sd-ext
[-] Checkpoint 6: Insert CyanogenMod patch.
[-] Checkpoint 7: Complete Dalvik Cache Move (if applicable).
[-] Checkpoint 8: Resetting Dalvik Cache Partition
[-] Checkpoint 9: Switching Davlik Cache to Cache Partition (if applicable)
[-] Checkpoint 10: Checking for existence of command parameter
[-] Checkpoint 11: Check for a2sd help command
[-] Checkpoint 12: Check for a2sd check command
[-] Checkpoint 13: Display version information.
[ ] Starting Darktremor Apps2SD Version 2.7.5.3 Beta 4a
[-] Checkpoint 14: Check for filesystem support.
[-] Checkpoint 15: Mount partition.
[-] Checkpoint 16: Reset Dalvik if Flag File is present.
[-] Checkpoint 17: Mount Swap.
[-] Checkpoint 18: Display Heap Size.
[ ] Heap Size set to: 32m
[-] Checkpoint 19: Check for start parameter and launch start2sd if needed.
[ ] Launching Apps2SD Start Program with cachesd
[X] Problem detected: Darktremor Apps2SD may not have ran
during boot. Cannot read a2sd.mountpoint.
[ ] Starting Darktremor Apps2SD in cachesd mode
[ ] Determining current dalvik-cache location...
[ ] Erasing contents of /sd-ext/dalvik-cache...
[/FONT][FONT=arial][ ] Moving /data/dalvik-cache/ to /sd-ext/dalvik-cache[/FONT]
u did that point?
su
a2sd reinstall
Click to expand...
Click to collapse
are you sure your sd-ext is created and working correctly? what is the size?
ever used a2sdgui from market?
or got titanium backup for overview of space?
he4dhuNTeR said:
u did that point?
are you sure your sd-ext is created and working correctly? what is the size?
ever used a2sdgui from market?
or got titanium backup for overview of space?
Click to expand...
Click to collapse
i did use the command and all the other stuff you you mentioned.. i used a2sdgui that comes with CyanogenMod once before .... and the overview from Titanium tells me that i have plenty of room in System ROM and A2SD+ Sections but the Internal is FULL!!! the EXT is : 512MB...
i'm going to flash MIUI again using the ROM available here in XDA instead of the one from MIUI.us and see how it goes!
Thanks for the help guys.
(Those FCs f***ed up my exam loool)
I've installed MIUI XJ from this thread http://forum.xda-developers.com/showthread.php?t=957291
Now, i'm done installing and i used the command SU-a2sd install ... am i good to restore Apps with Titanium Backup???
FIXED!!!
Thanks for remiding me of A2sdgui i used that to just re-move the Dalvik to SD-EXT....
Thanks guys!

TWRP v2.6.0.0 issues

I feel like i'm going crazy. WHERE did they move "partition SD card" to??
It used to be in /advanced/
but now it's no where to be found. Here is what I have under ADVANCED in v2.6.0.0:
[ Copy log to SD] [ Fix Permissions ]
[ BLANK? ] [ File Manager ]
[ Terminal Command] [ Reload Theme ]
[ ADB Sideload ]
___
Galaxy S3 T999
TWRP v2.6.0.0
Probably a bug they will have to work out. Changelog says they fixed some issues with sd partitioning so I'm guessing its a simple (device specific?) mistake. Just use an old version till their next update.
Sent from my SGH-T999 using xda premium

[App][Tasker]EasyUMS

This app will make the external (not the internal!) microSD card of your Samsung Galaxy S3 (International, US versions, International LTE) and Note 2 available as USB mass storage device.
The tasker profiles unmount your SD card, switch the USB mode and allow direct access to your card from your operating system of choice. The commands are based on the work of @Kopfgeldjaeger, @d4fseeker, @Sakaschi and others and their SGS3 Easy UMS app (http://forum.xda-developers.com/showthread.php?t=1711009). You can refer to that thread for details/compatibility and troubleshooting commands.
Prerequisites:
- Tasker (v4.0 or later (I am using 4.2u3m right now))
- A kernel with usb-gadget support
- Root
- Busybox (path to busybox is configurable)
- USB Debugging
- SuperSu v1.93 or later (for the namespace mount fix)
Usage:
Import the profiles in tasker. When you plug into a PC via USB, the UMS Switcher profile should fire up and execute the Enable UMS task. This task detects if you have usb-gadget support, if it finds an external SD card and then proceeds to unmount it. If it fails, it will show a notification with a list of open files on the SD card and a button to retry the mount (after you close those files).
Remember, once the phone is in UMS mode, your PC may automatically mount the SD card. Make sure you unmount it cleanly before removing the USB cable!
Once you remove the USB cable, the profile MTP Switcher kicks in and switches USB mode back to MTP and tries to remount your USB card.
Disclaimer: I am not responsible of any data loss due to the card not being completely unmounted at either end. I haven't experienced data loss, but there's always a risk things can go wrong.
Code:
The actual profiles/Tasks can be downloaded at the end of the post and imported into tasker, or you can "type" them in yourself. To import the profiles into tasker by unzipping the file into your internalSDCard/Tasker/profiles folder. Then you can import it in Tasker by tapping the profiles tab. Long tap the Profiles tab and select import.
Code:
Profile: UMS Switcher (65)
State: Power [ Source:USB ]
Enter: Enable UMS (59)
A1: Flash [ Text:Switching to USB Mass Storage mode Long:eek:ff ]
<This variable toggles between using the possibly dangerous mode of lazy umounting and the non-dangerous mode. With lazy umounting your sd card will remain mounted on the phone while the phone is connected to the PC and there is a greater chance of file corruption if you opperate on the same file simultaneously. The benefit of this mode is that you will be able to use the UMS mode multiple times without rebooting. Use with care and report back any corruption issues.>
A2: Variable Set [ Name:%dangerous_mode To:0 Do Maths:eek:ff Append:eek:ff ]
<set lazy switch to blank>
A3: Variable Set [ Name:%lazy_switch To: Do Maths:eek:ff Append:eek:ff ]
<Enable lazy umounting if requested>
A4: Variable Set [ Name:%lazy_switch To:-l Do Maths:eek:ff Append:eek:ff ] If [ %dangerous_mode = 1 ]
<Path to your busybox (change it if you have a custom busybox)>
A5: Variable Set [ Name:%busybox To:/system/xbin/busybox Do Maths:eek:ff Append:eek:ff ]
<remember if UMS is enabled>
A6: Variable Set [ Name:%UMSStatus To:0 Do Maths:eek:ff Append:eek:ff ]
<A place to keep errors>
A7: Variable Set [ Name:%error To:0 Do Maths:eek:ff Append:eek:ff ]
<A variable for the current device>
A8: Variable Set [ Name:%sdcard To:0 Do Maths:eek:ff Append:eek:ff ]
<Variable to keep the mountpoint name>
A9: Variable Set [ Name:%mountPoint To:0 Do Maths:eek:ff Append:eek:ff ]
<Variable to hold the path to the relevant /sys file>
A10: Variable Set [ Name:%sysFile To:0 Do Maths:eek:ff Append:eek:ff ]
<Find the correct /sys file>
A11: Run Shell [ Command:ls /sys/devices/platform/s3c-usbgadget/gadget/lun0/file; ls /sys/devices/virtual/android_usb/android0/f_mass_storage/lun_ex/file; ls /sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file; Timeout (Seconds):0 Use Root:eek:ff Store Output In:%sysFile Store Errors In: Store Result In: Continue Task After Error:eek:n ]
<No sys file found>
A12: If [ %sysFile ! Set ]
A13: Notify [ Title:UMSSwitcher Error 10: Unable to find a suitable file in /sys. Text:Maybe you are not running a kernel with usb-gadget support. Icon:hd_aaa_ext_halt Number:0 Permanent:eek:ff Priority:3 ]
</sys file found>
A14: Else
<Find current extSD device number>
A15: Run Shell [ Command:mount | sed 's/ on / /g' | egrep "extSdCard|external_sd|sdcard1" | grep /dev/block | cut -f 1 -d " " Timeout (Seconds):0 Use Root:eek:ff Store Output In:%sdcard Store Errors In: Store Result In: Continue Task After Error:eek:n ]
<get the mountpoint>
A16: Run Shell [ Command:mount | sed 's/ on / /g' | egrep "extSdCard|external_sd|sdcard1" | grep /dev/block | cut -f 2 -d " " Timeout (Seconds):0 Use Root:eek:ff Store Output In:%mountPoint Store Errors In: Store Result In: Continue Task After Error:eek:n ]
<Found sdcard?>
A17: If [ %sdcard !~ /dev ]
A18: Flash [ Text:About to unmount %mountPoint Long:eek:ff ]
<See if there are open files after umount (1 file)>
A19: Run Shell [ Command:lsof -Fn | grep %mountPoint | awk '{ s = ""; for (i = 9; i <= NF; i++) s = s $i " "; print s }' Timeout (Seconds):0 Use Root:eek:n Store Output In:%error Store Errors In: Store Result In: Continue Task After Error:eek:n ]
<no open files>
A20: If [ %error ! Set ]
<Try to unmount>
A21: Run Shell [ Command:sync; su --mount-master -c "%busybox umount %lazy_switch '%mountPoint' " Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In:%error Store Result In: Continue Task After Error:eek:n ]
<We couldn't unmount>
A22: If [ %error Is Set ]
A23: Notify [ Title:UMSSwitcher Error 11: Error unmounting SD card Text:%error Icon:hd_aaa_ext_halt Number:0 Permanent:eek:ff Priority:3 Actions:(1) ]
<We managed to unmount.>
A24: Else
<Switch to ums mode>
A25: Run Shell [ Command:setprop persist.sys.usb.config mass_storage,adb; echo %sdcard > %sysFile Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In:%error Store Result In: Continue Task After Error:eek:n ]
<There's an error>
A26: If [ %error Is Set ]
A27: Notify [ Title:UMSSwitcher Error 12: There was an error when enabling UMS. The SD card is unmounted Text:%error Icon:hd_aaa_ext_halt Number:0 Permanent:eek:ff Priority:3 ]
A28: Else
A29: Variable Set [ Name:%UMSStatus To:1 Do Maths:eek:ff Append:eek:ff ]
A30: Flash [ Text:UMS mode enabled :) Long:eek:ff ]
A31: End If
A32: End If
<still open files>
A33: Else
A34: Notify [ Title:UMSSwitcher Error 13: Open files on SD Text:%error Icon:hd_aaa_ext_halt Number:0 Permanent:eek:ff Priority:3 Actions:(1) ]
A35: End If
<no sdcard found>
A36: Else
A37: Notify [ Title:UMSSwitcher Error 14: No external SD Card found Text:Make sure it's mounted first. Icon:hd_aaa_ext_halt Number:0 Permanent:eek:ff Priority:3 Actions:(2) ]
A38: End If
A39: End If
Profile: MTP Switcher (64)
State: Not Power [ Source:USB ]
State: Variable Value [ Name:%UMSStatus Op:Maths: Equals Value:1 ]
Enter: Enable MTP + Mount (61)
A1: Variable Set [ Name:%error To:0 Do Maths:eek:ff Append:eek:ff ]
A2: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]
<Remount card and switch to MTP>
A3: Run Shell [ Command:echo '' > %sysFile; sleep 2; vold; sleep 2; setprop persist.sys.usb.config mtp,adb Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In:%error Store Result In: Continue Task After Error:eek:n ]
<All ok>
A4: If [ %error ! Set ]
<Check card mount point>
A5: Run Shell [ Command:mount | sed 's/ on / /g' | egrep "extSdCard|external_sd|sdcard1" | grep /dev/block | cut -f 2 -d " " Timeout (Seconds):0 Use Root:eek:ff Store Output In:%mountPoint Store Errors In: Store Result In: Continue Task After Error:eek:n ]
<not mounted>
A6: If [ %mountPoint ! Set ]
A7: Flash [ Text:Unable to mount card automatically Long:eek:ff ]
A8: Notify [ Title:MTPSwitcher Error 10 Text:%error. Unable to remount card automatically Icon:hd_aaa_ext_halt Number:0 Permanent:eek:ff Priority:3 ]
<Card was mounted ok>
A9: Else
A10: Variable Set [ Name:%UMSStatus To:0 Do Maths:eek:ff Append:eek:ff ]
A11: Flash [ Text:SD card mounted on %mountPoint Long:eek:ff ]
A12: End If
A13: Else
A14: Flash [ Text:Error: %error Long:eek:ff ]
A15: Notify [ Title:MTPSwitcher Error 11 Text:%error Icon:hd_aaa_ext_halt Number:0 Permanent:eek:ff Priority:3 ]
A16: End If
Tested on:
- NeatRom 4.8 (based on samsung 4.1.2), with Adam Kernel
- NeatRom 6.2 (based on samsung 4.3), with Boeffla-Kernel (5.1-beta10) (or stock kernel)
- NeatRom 2.8 (based on SlimKat 2.8 (KitKat 4.4.2)), with Boeffla-Kernel (omni)
- NeatRom 3.1 (based on SlimKat 2.0 (KitKat 4.4.2)), with Boeffla-Kernel (omni)
Changelog:
v0.6 - Added support for S4
v0.5 - Fixes to allow lazy unmounting so that you can mount the SD card multiple times without rebooting the phone (off by default).
v0.4 - Added support for KitKat ROMs. Also added support for lazy unmounting (dangerous, off by default)
v0.3 - Added some more checks
v0.2 - Added support for Android 4.3 (look for mount lines with /dev in the name)
v0.1 - initial release
Error codes:
Because Tasker has a limitation on the number of characters shown in a notification you won't be able to get very comprehensive error messages. So, I've added numeric codes that you can lookup here:
MTPSwitcher Error 10: Unable to remount card automatically
MTPSwitcher Error 11: Error while disabling UMS mode
UMSSwitcher Error 10: Unable to find a suitable file in /sys. Maybe you are not running a kernel with usb-gadget support
UMSSwitcher Error 11: Error unmounting SD card
UMSSwitcher Error 12: There was an error while enabling UMS. The SD card is unmounted
UMSSwitcher Error 13: Open files on SD
UMSSwitcher Error 14: No external SD Card found. Make sure it's mounted first
Bugs:
On android 4.3 you will likely get an Error 11 when trying to unmount the card the second time. It can be fixed by a rebooting the phone. Still working on a fix.
On android 4.4 you will likely get an Error 11 when trying to unmount the card the second time. To overcome this I added the dangerous_mode switch variable (can be enabled by editing the Enable UMS task). If you set this switch to 1 the system will try to do a lazy umount of your SD card, leaving it still accessible by your phone while it is still mounted on the PC. It has the risk to do data corruption if you use the card simultaneously on your PC and phone, but it is the method used in the Boeffla Kernel app to toggle UMS mode. According to him he hasn't seen any problems so far: http://forum.xda-developers.com/showpost.php?p=50229253&postcount=2355, http://forum.xda-developers.com/showpost.php?p=50257161&postcount=2366, http://forum.xda-developers.com/showpost.php?p=50257593&postcount=2368
Let me know if there are problems or if it works for you too. Also, if your mountpoint is different, let me know to add it to the app.
Hi, I'm trying but i can't install your profile into Tasker (I'm on Tasker v.4.1u3)
I click on it and it says it's import in "my UI", but i can't find it... Can you help me please ?
EDIT :
I succeed to import your profiles but it doesn't work well
When i plug it on my pc it's work but after i unplug the sdcard is more viewable on my device until i reboot
Will this really activate automatically the UMS that let my sdcards show up in Windows explorer when I plug in the usb cable in pc??
Sent from my Samsung Galaxy S3 GT-i9300 using TapaTalk2
@9andar: Does it flash anything on the Phone's screen when you unplug the cable? Maybe does it show that it couldn't mount the card?
Can you send me the output of these commands (you can disable the MTP Switcher profile and run the commands in a terminal after you unplug the cable)?
Code:
echo '' > %sysFile
vold
setprop persist.sys.usb.config mtp,adb
Replace %sysFile in the command above with what is listed under Tasker -> Vars tab (viewable in advanced mode). For me it's /sys/devices/platform/s3c-usbgadget/gadget/lun0/file but it may be different for you.
The vold command should mark the card as unmounted inside android (Settings -> Storage), and then it should remount it. Afterwards you should get some output (the mount point) for this command:
Code:
mount | sed 's/ on / /g' | egrep "extSdCard|external_sd|sdcard1" | cut -f 2 -d " "
@PIRATA!: yes, this is what it's supposed to do. Please note that it will only expose the external SD card, not the internal one! It should take about 5 seconds to activate UMS when you plug it in, and another 5 seconds to remount the card internally when you plug out.
Works fine. Thanks.
On disconnecting, there isnt any pop up or toast notification but tasker runs the MTP profile just fine.
_____________
Sent from my GT-I9300 powered by Temasek Rom & Kernel
Fueled by 7000mAh ZeroLemon Battery
Hmm, there should be a toast saying that the SD card was mounted on /storage/extSDCard or something...
You got me wrong I guess.
It shows on mounting but not on dismounting. I suppose there should be one too shows like dismounting or MTP enabled.
_____________
Sent from my GT-I9300 powered by Temasek Rom & Kernel
Fueled by 7000mAh ZeroLemon Battery
nicesoni_ash said:
You got me wrong I guess.
It shows on mounting but not on dismounting. I suppose there should be one too shows like dismounting or MTP enabled.
_____________
Sent from my GT-I9300 powered by Temasek Rom & Kernel
Fueled by 7000mAh ZeroLemon Battery
Click to expand...
Click to collapse
Well, when unplugging the cable after having the SD card exposed as UMS, you should only see a brief toast that says the SD card was mounted back. You may also get a transitory notification that the SD card was replugged in, but that's android OS. There is no notification that MTP mode is enabled again - it seemed pointless.
When plugging in, you should get a toast saying it's about to unmount, and a second toast saying that UMS mode is enabled (if all is well). Otherwise you should get a toast or a notification with the error message.
Tasker can't see the profiles.
Should I rename it removing the .xml extension leaving only the .prf one?
Sent from my Samsung Galaxy S3 GT-i9300 using TapaTalk2
Hi, you have to long press the profile tab... It opens a window import... Choose the txt.. That's all...
Sent from my GT-I9300 using XDA Premium 4 mobile app
Thanks 9andar, I learned something new... I also learned one can sort profiles and tasks the same way. Neat!
Not sure why, but this does not work on my Note 2 ( running 4.3 )
When connecting, I am getting:
There was an error when enabling UMS. The SD card is unmounted
"tmp-mksh: <stdin>[3]: tmpfs: not found"
Any idea?
The error seems to appear when running these commands:
Code:
setprop persist.sys.usb.config mass_storage,adb
echo %sdcard > %sysFile
Try to run the profile normally, then when you get the error start a root terminal on the phone and run the commands above. Replace %sdcard and %sysFile with the correct values. Ser if the error is generated by setprop or the echo command.
Does the standalone EasyUMS app work for you?
It does not mount nothing after 5 secs.
If I run the script manually,I get a message on Statusbar that the unmount procedure can't be done due of some files that are open...but I don't have nothing opened!!
That notification should also list the files that are kept open. After you close the app that opened them you can retry the UMS switch (should appear as an option below the notification).
If you don't have any files listed, try to run the umount command from a root shell and see if it complains. You can also run the lsof command to see if there are open files.
mad_ady said:
The error seems to appear when running these commands:
Code:
setprop persist.sys.usb.config mass_storage,adb
echo %sdcard > %sysFile
Try to run the profile normally, then when you get the error start a root terminal on the phone and run the commands above. Replace %sdcard and %sysFile with the correct values. Ser if the error is generated by setprop or the echo command.
Does the standalone EasyUMS app work for you?
Click to expand...
Click to collapse
Thanks. The echo command fail :
can't create %sysFile: Read-only file system
The EasyUMS has stopped working for me when I moved to 4.3
Ok, %sysFile should actually be a path under /sys/devices/something... Do you see such a value under the vars tab?
Does this command output anything?
Code:
ls /sys/devices/platform/s3c-usbgadget/gadget/lun0/file; ls /sys/devices/virtual/android_usb/android0/f_mass_storage/lun_ex/file; ls /sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file;
Let me get this straight!
I must import them, then just only active Tasker from its menu, and then plug in the usb cable and wait??
In this way in doesn't work!
Sent from my Samsung Galaxy S3 GT-i9300 using TapaTalk2
Yes, if you import the profiles and they are active plugging and unplugging the usb cable should be the only trigger needed. Otherwise you should get various errors reported onscreen.
$ ls -l /sys/devices/platform/s3c-usbgadget/gadget/lun0/file
-rw-r--r-- root root 4096 2013-12-23 16:17 file
From what I saw, %sysFile is 0
Also, under /sys/devices/virtual/android_usb/android0/f_mass_storage/ I see "lun0" and "lun1"
But no "lun_ex" or "lun".
Sent from my SHV-E250S using xda app-developers app

[App][Tasker]NFSMounter

This Tasker App will allow you to mount and unmount NFS shares on your phone/tablet by using a simple GUI (a Tasker Scene). It is suitable for mounting multiple shares from the same server (only one server is supported), but it could be extended. It was inspired a little from Cifs Manager, but with much simpler functionality.
* Prerequisites:
- Tasker 4.2
- a kernel with NFS support (the task doesn't try to load the NFS module, so it must be loaded before).
Code:
[email protected]:/ # lsmod | grep nfs
nfs 336540 0 - Live 0x00000000
lockd 82761 1 nfs, Live 0x00000000
auth_rpcgss 34392 1 nfs, Live 0x00000000
sunrpc 194880 3 nfs,lockd,auth_rpcgss, Live 0x00000000
- a NFS-enabled busybox - if you run strings on it and grep for NFS it should list about 9 lines:
Code:
[email protected]:/ # strings /system/xbin/busybox | grep -i nfs | wc -l
9
- SuperSU v1.93 or later (it includes the --mount-master switchs which allows you to mount shares in android 4.2 or later and have them accessible in all processes (it can manipulate the master mount namespace)).
- ES File Explorer (optional)
* Installation:
- Unzip the zip somewhere in your phone.
- Copy NFS_Mounter.tsk.xml and NFS_Toggle.tsk.xml to /sdcard/Tasker/tasks
- Copy NFS_Mounter.scn.xml to /sdcard/Tasker/scenes
- Start Tasker, long-press the Tasks tab and select Import. Import both NFS* tasks
- In Tasker long-press the Scenes tab and select Import. Import the NFS_Mounter scene.
* Configuration
You will need to configure your interface with the shares that you have and the server, etc.
- Open Tasker -> Scenes -> NFS Mounter. Tap on the Items tab. Edit the items to suit your needs. You can add or delete items to suit your needs. The text label should be the share directory name (for instance, for a share 192.168.1.5:/DataVolume/Download you should only enter Download here).
- If you're not using ES File Explorer or you prefer a different file manager, you can edit it in the "Item long tap" tab.
- Go to Tasker -> Tasks -> NFS Toggle.
- Set the variable %busybox to the path of your NFS-enabled busybox (/sbin/busybox by default)
- Set the variable %destination to the path of the destination mount point (/mnt/nfs by default). Directories that don't exist will be created.
- Set the variable %server to the base path of your shares (e.g. 192.168.1.5:/DataVolume for the example above)
- Set the variable %opt with your desired mount options (by default it's read-only).
* Usage
You can start the GUI by running the NFS Mounter task. It will display a list (as visible in the screenshots) with your choices. When you tap a share, it will be mounted if it is unmounted and unmounted if it is mounted. If you long-tap that entry it will open the folder path in your file explorer.
You can create a desktop shortcut for this task in your launcher by creating a Shortcut -> Task Shortcut -> NFS Mounter.
* Tested on
This task/scene was tested on a Galaxy S3 running NeatRom 2.8 (SlimKat 2.8 variant (Android 4.4.2)) and with Boeffla-Kernel. It *should* work on other devices as well, since it is configurable and depends on system apps to do it's job.
* Commands issued
The task basically executes the following commands
Code:
#remount the root filesystem rw so that we can create the mountpoint
/sbin/busybox mount -o remount,rw /
#create the mountpoint
/sbin/busybox mkdir -p /mnt/nfs/Download
#make the mountpoint world readable so that all user apps can access it
/sbin/busybox chmod 777 /mnt/nfs
/sbin/busybox chmod 777 /mnt/nfs/Download
#remount / as ro
/sbin/busybox remount,ro /
#mount the actual NFS share (on 192.168.1.5:/DataVolume/Download)
su --mount-master -c "/sbin/busybox mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.168.1.5:/DataVolume/Download /mnt/nfs/Download"
#check that it was mounted
mount | grep /mnt/nfs/Download
* Code
Code:
NFS Toggle (62)
<path to your nfs-enabled busybox>
A1: Variable Set [ Name:%busybox To:/sbin/busybox Do Maths:eek:ff Append:eek:ff ]
<destination mount point (will be created if it doesn't exist)>
A2: Variable Set [ Name:%destination To:/mnt/nfs Do Maths:eek:ff Append:eek:ff ]
<NFS server and share path (base)>
A3: Variable Set [ Name:%server To:192.168.1.5:/DataVolume Do Maths:eek:ff Append:eek:ff ]
<NFS mount options. Adjust to fit your needs.>
A4: Variable Set [ Name:%opt To:ro,nolock,hard,intr,vers=3 Do Maths:eek:ff Append:eek:ff ]
<See if the share is already mounted>
A5: Run Shell [ Command:%busybox mount | %busybox grep %destination/%par1 Timeout (Seconds):0 Use Root:eek:ff Store Output In:%mnt Store Errors In: Store Result In: Continue Task After Error:eek:n ]
A6: Flash [ Text:%mnt Long:eek:ff ] If [ %mnt Is Set ]
<it is mounted>
A7: If [ %mnt ~R %destination ]
A8: Flash [ Text:Unmounting %destination/%par1 Long:eek:ff ]
<requires supersu 1.93 or later to avoid the mount namespaces issue on android 4.2+>
A9: Run Shell [ Command:su --mount-master -c "%busybox umount -l -f %destination/%par1" Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In:%error Store Result In: Continue Task After Error:eek:n ]
A10: Else
<Remount / as rw and create a mountpoint>
A11: Run Shell [ Command:%busybox mount -o remount,rw /; %busybox mkdir -p %destination/%par1; %busybox chmod 777 %destination; %busybox chmod 777 %destination/%par1; %busybox mount -o remount,ro / Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In:%err Store Result In: Continue Task After Error:eek:n ]
A12: Flash [ Text:Mounting %destination/%par1 Long:eek:ff ]
<requires supersu 1.93 or later to avoid the mount namespaces issue on android 4.2+>
A13: Run Shell [ Command:su --mount-master -c "%busybox mount -o %opt -t nfs %server/%par1 %destination/%par1"; mount | grep %destination/%par1 Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In:%err Store Result In: Continue Task After Error:eek:n ]
A14: End If
A15: Flash [ Text:%err Long:eek:ff ] If [ %err Is Set ]
A16: Return [ Value:%err Stop:eek:ff ]
NFS Mounter (60)
A1: Show Scene [ Name:NFS Mounter Display As:Dialog, Dim Behind Heavy Horizontal Position:100 Vertical Position:100 Animation:System Show Exit Button:eek:n Continue Task Immediately:eek:n ]
Scene: NFS Mounter
P:698x1210 L:-1x-1
Element: mounts/Menu
Geometry:
P:58,228 582x883 L:-1,-1 -1x-1
Content:
Source: Manual
Variable:
Selection Mode: Single
Item Layout: Builtin Item Layout
Horizontal Space: 1
Vertical Space: 1
Events:
ItemClick: 69
ItemLongClick: 67
Items:
1. Label: Download
2. Label: Kits
3. Label: Copii
4. Label: Movies
5. Label: Music
6. Label: Pictures
Element: Text1/Text
Geometry:
P:33,59 655x146 L:-1,-1 -1x-1
Content:
Text: Tap an entry below to mount or umount a NFS share. Long tap to open the share in ES Explorer
Text Size: 16
Text Width Scale Percent: 100
Text Colour: #FFFFFFFF
Position: Centre
Vertical Fit Mode: None
Text Format: Plain Text
* Bugs
So far I have no major bugs, just some things that could be improved. I'm also open to feedback.
* Version history
- v0.2 - Fixed a minor bug that set the permissions on the mount point on umounting. The mount options are now a parameter and can be easily changed.
- v0.1 - initial release
Man, I followed all the steps but always with an empty folder. See!
I tried Cifs Manager and the same occurs.
Can you check the following things:
1. Your nfs export is 10.0.0.101:/HD/Backup (you should see it with showmount -e 10.0.0.101 from a linux system, or in /etc/exports)
2. Can you post the output of the mount command after it mounted?
3. Can you check in SuperSu's logs (can be enabled even if you have the free version) that the tasker commands didn't generate any errors?
4. Can you try to mount the shares on a different linux system to check that they can be mounted with the same options?
5. If the share was mounted but the files are not visible, can you try to list them in a root shell?
In SuperSU
You may need to tweak %opt and add proto=tcp or proto=udp. The best thing to do is to copy the mount options from a different system in your network that successfully connects via nfs. Also, look online for nfs mount options - you can tweak timeouts and retries as well

Question Help with "convert T-Mobile to Global" LE2127

T-Mobile LE2127 PERMANENTLY Networked unlocked. I have the bootloader unlocked from ONEplus / T-Mobile directly (applied the unlock.bin). I have the phone rooted (made my rooted image and applied in fastboot). I have also tried with and without converting to Global with the carrier policy and lte features restrictions modified for 5G. I have successfully been able to (and learn) how to EDL and apply the MSM Tool with T-Mobile build.
I am on T-Mobile software version 11.2.3.3.LE5ACB and both times when trying the flash_all.bat file, according to the "Convert T-Mobile OnePlus 9 to Global (or other) firmware" How To, I get various errors while flashing with things like...
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> [ <second> ] ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] create bootimage and
flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
PS C:\platform-tools>
All to say, it doesn't work and it's a lot of work resetting up everything over and over again on T-Mobile (restoring, re-entering various passwords, and updating the 100's of programs etc..)
Is it really possible to convert? Am I supposed to be on a different build?
Cheers,
Have you tried flashing with Command Prompt instead of PowerShell? Sometimes batch files don't work the way you would expect them to in PS. Also make sure you have the latest platform tools.
SDK Platform Tools release notes | Android Studio | Android Developers
Android SDK Platform-Tools is a component for the Android SDK.
developer.android.com
No I did not... I might give that a try if I have the time.
thank you

Categories

Resources