FORUMS
Remove All Ads from XDA

[TOOLS][ZIPS][SCRIPTS] osm0sis' Odds and Ends [Multiple Devices/Platforms]

13,596 posts
Thanks Meter: 29,909
 
By osm0sis, Recognized Developer / Recognized Contributor on 18th April 2013, 12:37 AM
Post Reply Email Thread
30th September 2018, 06:36 PM |#2011  
Renate NST's Avatar
Inactive Recognized Developer / Recognized Contributor
Boston
Thanks Meter: 1,123
 
More
Quote:
Originally Posted by jcmm11

It's a few more than just colon and backslash.

Oops, I'm wrong, you're right.

In any case, strangely enough these limitations have never really put a crimp in my lifestyle.

Delving into this, I did discover that in Windows you can these characters in filenames:
U+00A0 No-Break Space
U+2002 En Space
U+2003 Em Space
U+2004 Three-Per-Em Space
U+2005 Four-Per-Em Space
U+2006 Six-Per-Em Space
U+2007 Figure Space
U+2008 Punctuation Space
U+2009 Thin Space
U+200A Hair Space
U+200B Zero Width Space
U+200F Narrow No-Break Space

The bottom line is, why would you want to use characters in filenames that would be annoying,
incompatible with major operating systems or problematic as a URL?

And why can't I put an EBCDIC "Numeric Backspace" in a Linux filename, huh?
The Following User Says Thank You to Renate NST For This Useful Post: [ View ] Gift Renate NST Ad-Free
 
 
30th September 2018, 07:07 PM |#2012  
Recognized Contributor
Thanks Meter: 2,879
 
More
Quote:
Originally Posted by Renate NST

. . .

The bottom line is, why would you want to use characters in filenames that would be annoying,
incompatible with major operating systems or problematic as a URL?

And why can't I put an EBCDIC "Numeric Backspace" in a Linux filename, huh?

As for the first question - I wouldn't 😁 Heck I don't even use spaces in my file names, and dislike it when others do. (They make things difficult at times).

As far as the numeric backspace goes I believe that you can. Just use the number 6
EBCDIC NBS = \x36 = ASCII 6 🤣
The Following User Says Thank You to jcmm11 For This Useful Post: [ View ] Gift jcmm11 Ad-Free
30th September 2018, 08:12 PM |#2013  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 29,909
 
Donate to Me
More
Quote:
Originally Posted by jcmm11

As for the first question - I wouldn't Heck I don't even use spaces in my file names, and dislike it when others do. (They make things difficult at times).

As far as the numeric backspace goes I believe that you can. Just use the number 6
EBCDIC NBS = \x36 = ASCII 6 🤣

My problem was always with :no_pm: or whatever that Google's old pre-Messages app used to add to pics downloaded from MMS. Shrug. Guess we'll mark it #wontfix

Quote:
Originally Posted by notstevek

So FYI, FlashAfterUpdate does not work if you have an encrypted user partition. I just learned that the hard way. LineageOS pushed an update today, so I hit install from the update menu to test it out. It doesn't let you enter your password to decrypt your user partition, so it can't see the folder/zips. This kinda messed up things for me because it didn't flash magisk, so I had to reboot and manually install update and magisk again, but the script kicked in during the manual install of the update, so my phone started bugging out because of an aroma installer for ElementalX that the script triggered, for some reason the screen would flash back and forth between the script and aroma installer. Luckily nothing bad happened and I flashed update, magisk, and ElementalX successfully. I feel like an idiot lol, anyway, yeah, script doesn't work if your user partition is encrypted.

Just thought about this some more. Anywhere that isn't encrypted you could use? You could try setting sdzipdir= at the top of 99-flashafterupdate.sh to somewhere else. That's why I included that up there to make it easy to change for user preference and cases like yours.
1st October 2018, 02:52 AM |#2014  
jhedfors's Avatar
Senior Member
Flag Chandler, AZ
Thanks Meter: 617
 
More
Hi @osm0sis,

Your Magisk module "TWRP A/B Retention Script" links to this thread, but I cannot find it anywhere.

Do you have a post that you explain the module? Of so, perhaps you can fix the link in the README.md?

Thanks!
1st October 2018, 03:13 AM |#2015  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 29,909
 
Donate to Me
More
Quote:
Originally Posted by jhedfors

Hi @osm0sis,

Your Magisk module "TWRP A/B Retention Script" links to this thread, but I cannot find it anywhere.

Do you have a post that you explain the module? Of so, perhaps you can fix the link in the README.md?

Thanks!



Unreleased in this thread currently. The module readme and description in Magisk Manager describe exactly what it is and how to use it.

Also: https://github.com/Magisk-Modules-Re...ster/README.md
The Following User Says Thank You to osm0sis For This Useful Post: [ View ]
1st October 2018, 03:23 AM |#2016  
jhedfors's Avatar
Senior Member
Flag Chandler, AZ
Thanks Meter: 617
 
More
Quote:
Originally Posted by osm0sis



Unreleased in this thread currently. The module readme and description in Magisk Manager describe exactly what it is and how to use it.

Also: https://github.com/Magisk-Modules-Re...ster/README.md

Cool thanks. Lookng at the Magisk install logs, it looks like you patch the new boot image with the same TWRP that is in the active one. Thanks for your all your hard work!
The Following User Says Thank You to jhedfors For This Useful Post: [ View ] Gift jhedfors Ad-Free
1st October 2018, 03:42 AM |#2017  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 29,909
 
Donate to Me
More
Quote:
Originally Posted by jhedfors

Cool thanks. Lookng at the Magisk install logs, it looks like you patch the new boot image with the same TWRP that is in the active one. Thanks for your all your hard work!

Bingo!

It would be pretty easy for Magisk Manager to do this itself, so hopefully @topjohnwu can add it as an option in the future.

We need an interoperable root ecosystem again. A/B and system-as-root were a big setback to the root community in this respect.

I've also submitted an updated generic TWRP A/B installer zip template to the TWRP team (@Dees_Troy and @bigbiff) with fixes to allow it to be flashed from Magisk Manager and to keep it from putting the device into a loop booting to recovery when flashed over a rooted boot.img. @Captain_Throwback on the U12+ and @eng.stk on the OP6 are already using it in their TWRP builds. Hopefully it gets officially adopted!
The Following 13 Users Say Thank You to osm0sis For This Useful Post: [ View ]
1st October 2018, 01:21 PM |#2018  
NLBeev's Avatar
Senior Member
Flag Scheveningen
Thanks Meter: 1,898
 
More
Quote:
Originally Posted by osm0sis

. . . The module readme and description in Magisk Manager describe exactly what it is and how to use it.

Tried the script in the Essential PH-1 with Magisk manager.
The recovery in opposite slot stays stock.
Attached Files
File Type: zip magisk_install_log_20181001.zip - [Click for QR Code] (2.8 KB, 86 views)
The Following User Says Thank You to NLBeev For This Useful Post: [ View ] Gift NLBeev Ad-Free
1st October 2018, 04:07 PM |#2019  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 29,909
 
Donate to Me
More
Quote:
Originally Posted by NLBeev

Tried the script in the Essential PH-1 with Magisk manager.
The recovery in opposite slot stays stock.

Oh weird.. Seems like the script's test for whether TWRP is present in the ramdisk is still passing, even though I had verified it working before.. maybe it's something that changed in Pie.. Thanks for the report.

Edit: Ooh, looking at the log it's something that changed in the newer Magisk builds most likely.. flash_boot_image doesn't exist anymore apparently and the AVBv1 boot signer is broken. I'll figure it out and try to support both old and new..

Edit 2: The boot signer thing looks like a Magisk bug that is fixed in the latest Canary (17202) since it works fine for me in a Magisk install there, and I have added a flash_boot_image wrapper function for flash_image when flash_boot_image isn't found. Should be good now!

https://github.com/Magisk-Modules-Re...cbcd1af19dfda8

Edit 3: The boot signer wasn't actually fixed, it just only works when run from the Magisk installer. I've added another workaround that will at least work when Manager is unhidden. That said, signer more than likely won't be needed on A/B devices since they virtually all use AVBv2, not v1.

https://github.com/Magisk-Modules-Re...34bbea2825fc4c
The Following 2 Users Say Thank You to osm0sis For This Useful Post: [ View ]
1st October 2018, 06:13 PM |#2020  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 29,909
 
Donate to Me
More
TWRP A/B Retention Script Zip Module
We need an interoperable root ecosystem again. A/B and system-as-root were a big setback to the root community in this respect.

To help alleviate this issue, this atypical Magisk script zip "module" will keep TWRP installed to both slots when flashed from Magisk Manager after an A/B OTA has installed in the background, but must be used before you use Manager to install Magisk to inactive slot.

I've updated the README instructions to be more clear, and since the cat's well out of the bag, I guess we can consider this the release post now.

Changelog:
https://github.com/Magisk-Modules-Re...commits/master

Instructions:
https://github.com/Magisk-Modules-Re...ster/README.md

Enjoy!

Download or Install it again from the Magisk Manager Downloads section to get the latest version.
The Following 15 Users Say Thank You to osm0sis For This Useful Post: [ View ]
1st October 2018, 07:50 PM |#2021  
NLBeev's Avatar
Senior Member
Flag Scheveningen
Thanks Meter: 1,898
 
More
Quote:
Originally Posted by osm0sis

Download or Install it again from the Magisk Manager Downloads section to get the latest version.

Tested again, after making sure there's no TWRP in the inactive slot.
Installed with Magisk manager. TWRP is installed on both slots now.
Works on the Essential PH-1.
Thx for this semi- (but great) module.
The Following User Says Thank You to NLBeev For This Useful Post: [ View ] Gift NLBeev Ad-Free
Post Reply Subscribe to Thread

Tags
automation, batch, flashable zip, script, tool

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes