[TOOL][UNOFFICIAL][PORT] REPIT: for Nexus 10 [manta] - Nexus 10 General

This is a port of Lanchon REPIT.
- Nexus 10 Manta -​
Disclaimer:
I am not responsible for your actions or consequences, directly or indirectly, related to the files and/or advice offered.
It is your choice to proceed.
What is REPIT?
REPIT is a simple, safe, device-only, data-sparing, and easily portable repartitioning tool for Android devices.
See the GitHub README for more on What REPIT is. GitHub - Link
Limitations:
Requires TWRP (or TWRP based) recovery.
Does not support encrypted devices.
Will cause data loss if the repartitioning process is externally interrupted.
See the GitHub README for more on Limitations. GitHub - Link
---
Notes:
A few years ago (September 2018), I made a port of REPIT for deb,flo and manta that was spread out between multiple threads.
Some comments and instructions were lost in thread chatter or just in a different thread altogether.
The file name actually configures the repit script.
Noted that you may have to toggle MTP Disable, Enable, Disable.
Noted that you may have to reboot into TWRP after disabling MTP.
Remember /tmp is wiped after a reboot. Copy repit to /sdcard and after rebooting back into TWRP, copy it from /sdcard to /tmp using TWRP File manager.
Noted that you may have to unmount cache and data.
Do NOT flash repit from USB/OTG.
This is designed for a stock partition layout. If your device has been modified and a vendor partition was created, REPIT will not work.
Side note:
Lanchon added Nexus 7 (2013) to the official list. (November 2019)
Lanchon REPIT GitHub - Port Request - Commit
---
Be Careful.
There are always risks involved when you start messing around with a device.
If something goes wrong, you may end up with a non-working "bricked" device.
This is especially true when you start modifying partitions.
Backup what you want to save and store it off device.
Copy it to your computer, cloud storage, USB, ...
Instructions:
This operation might take a long time and must not be interrupted.
- Depending on the device and REPIT configuration, this might take a few hours.
Make sure your battery is fully charged or mostly charged.
- You can connect to a charger while the REPIT script is running. May or may not charge depending on the recovery.
How To:
If you already have a ROM installed, repit will backup, change the partition, restore and resize.
- You can just reboot once the script finishes.
Boot into TWRP
Swipe to Allow Modifications
Copy the repit zip to /tmp
Disconnect from computer
Disable MTP
Disable MTP TWRP -> Mount
Install repit
TWRP -> Install -> navigate to /tmp and flash the repit zip
Reboot to system
If you are doing a clean install, add the +wipe option to system in the zip file name. This will speed up the partitioning since system will not be backed up and restored.
lanchon-repit-20210221-cache=16M+wipe-system=1.3G+wipe-data=max-manta.zip
- Reboot back into TWRP after the script finishes.
- Then follow the instructions from the rom thread to install the rom you are going to use.
Boot into TWRP
Swipe to Allow Modifications
Copy the repit zip to /tmp
Disconnect from computer
Disable MTP
Disable MTP TWRP -> Mount
Install repit
TWRP -> Install -> navigate to /tmp and flash the repit zip
Reboot to recovery
Follow the instructions from the rom thread to install the rom you are going to use.
---
Changes:
Nexus 10 [Manta]
Updated to the current REPIT scripts.
Include userdata in the sector range and modifiable partitions.
Nexus 10 GitHub - Commit
Download Links:
MediaFire - Link
SourceForge - Link
GoogleDrive - Link
Direct Download from MediaFire:
lanchon-repit-20210221-cache=16M+wipe-system=1.3G-data=max-manta.zip MediaFire - Download
REPIT Links:
Lanchon REPIT GitHub - Link
- My fork GitHub - Link
Credits:
Lanchon for his excellent REPIT project.
The Android Community and everyone who has helped me learn through the years.
Cheers all.

Note about configuration.
The user configuration is done by renaming the zip file before flashing it.
The modifiable partitions are cache, system and userdata (7, 8 and 9).
The actual partitioning is done by a sector range. This is declared inside the script along with a default configuration.
Code:
# the set of partitions that can be modified by REPIT:
# <gpt-number> <gpt-name> <friendly-name> <conf-defaults> <crypto-footer>
initPartition 7 cache cache "same keep ext4" 0
initPartition 8 system system "same keep ext4" 0
initPartition 9 userdata data "same keep ext4" $footerSize
# the set of modifiable partitions that can be configured by the user (overriding <conf-defaults>):
configurablePartitions="$(seq 7 9)"
...
# the set of contiguous partitions that form this heap, in order of ascending partition start address:
heapPartitions="$(seq 7 9)"
# the disk area (as a sector range) to use for the heap partitions:
heapStart=$(parOldEnd 6) # one past the end of misc.
heapEnd=$deviceHeapEnd # one past the last usable sector of the device.
The default zip name lanchon-repit-20210221-cache=16M+wipe-system=1.3G-data=max-manta.zip
Creates a 16M cache partition, the wipe option (+wipe) will stop the backup and restore of cache.
Creates a 1.3G system partition, since there is no wipe option, the system partition will be backed up, restored and expanded or compressed.
The rest of the space is used for userdata. (data=max) again, since there is no wipe option, data will be backed up, restored and expanded or compressed.
Setting a 16M cache and a 1.3G system, userdata will not be reduced. If system is set beyond 1.3G, userdata will be reduced by the same amount.
If you change the name to lanchon-repit-20210221-cache=16M+wipe-system=1.5G+wipe-data=max-manta.zip
Creates 16M cache partition, the wipe option (+wipe) will stop the backup and restore of cache.
Creates 1.5G system partition, the wipe option (+wipe) will stop the backup and restore of system and you will need to install a rom.
The rest of the space is used for userdata. (data=max) again, since there is no wipe option, data will be backed up, restored and expanded or compressed.
If you change the name to lanchon-repit-20210221-cache=16M+wipe-system=1.3G+wipe-data=max+wipe-manta.zip.
This will create a 16M cache partition, a 1.3G system partition and use the rest for userdata.
Since the wipe option is added to all, no backup and restore is done. Only empty/formatted partitions are created.
This will speed up the partitioning if you are doing a clean flash.
Userdata is erased also so, make sure to backup what you want/need to keep off device.
See the GitHub README for more on how to configure. GitHub - Link
Cheers all.

<RESERVE>

<RESERVE>

Thanx ipdev 4 your Help, I've successfully copied REPIT-mod & the user configuration File onto my Manta, it Failed w/ the issue that it couldn't unmount all partitons blah bla' & that it's Copied itself 2 /tmp, I re-red your instructions but there isn't eXplicit instructions about where that iz, just poking around in the dark I got 2 Advanced > File Manager & found a /tmp dir but don't know which file 2 eXecute, I Blindly tried a couple, I can't recall which, But No Cigar! I'm Using TWRP 3.5.2_9-0-manta... Sorry about being such a pest...
;-\K

Thanks for this, it's work fine for me

Anybody here, Please Help me. I've got 3 of these Nexus 10 Manta Tablets & I'm Still Stuck!... ;-\K

Thanx ipdev 4 your Help, I've successfully copied REPIT-mod & the user configuration File onto my Manta, it Failed w/ the issue that it couldn't unmount all partitons blah bla' & that it's Copied itself 2 /tmp, I re-red your instructions but there isn't eXplicit instructions about where that iz, just poking around in the dark I got 2 Advanced > File Manager & found a /tmp dir but don't know which file 2 eXecute, I Blindly tried a couple, I can't recall which, But No Cigar! I'm Using TWRP 3.5.2_9-0-manta... Sorry about being such a pest...
;-\K

Can Anybody Please give me a Clue what Iḿ doing wRong?!? ;-\K

Related

[SEP 18][V0.3] Stable Customized BT5 for HD2 - Links updated

Zen's Backtrack 5 For HD2 (and other) Android Smartphones
V0.3
----------------------------------------------------------
New app for loading this (and other) Linux Systems! - https://play.google.com/store/apps/details?id=com.linux.autoloader
Image and app support can be found here --> http://www.zenfulapps.com/
Packed - 640mb
Unpacked - 2.6gig (fits on 3.3 img now.)
--GRAB THE UPDATED SCRIPTS ATTACHED TO THIS POST, THEY ARE NOT PACKAGED INTO THE ZIP--
--Scripts are set to load from EXT4 partition, when i modify them for the .img's ill add them to the script pack--
--if you have .img mounting scripts from previous versions, they will work, as long as file names and directories match--
V0.3 Download
http://www.zenfulapps.com/Android/backtrack5-0.3.7z
(MD5 is still the same
MD5sum (of .7z file) - 9a4796f0ed96e03579c2b4a684d026f5
--------------------
Script pack contains
--------------------
btgo - mounts BT5, and askes how you would like to start, CLI or VNC
bts - stops BT5, and unmounts everything for it.
btl - used to login to bt5 after it has been mounted, to avoid all those "resource busy" messages
mkcore - directory installation and swap file creation
-------------
What you need
-------------
Rooted Android Smartphone
Linux on PC
Busybox installed on your device
SDcard adapter or reader, if neccesary
----------
Lets begin
----------
There are 3 different ways you can do this:
1. Fresh install on EXT4 Sdcard partition ( I HIGHLY recommend this method if possible, much better, a bit faster (no double loops to write to)
2. Create Fresh .img
3. Replace old BT5 system .img
=========================================
1. Fresh install on EXT4 Sdcard Partition
=========================================
This portion of the guide is to install BT5 on a FRESH EXT4 partition on your SDcard. Throughout this porcess, you will:
Backup your current sdcard (EVERY PARTITION, this is why we use PC-linux and not windows)
Fully erase and repartition your SDcard
Replace Android system and user data
Install BT5 on third partition
prepare system for chroot and VNC connection
----------------------------------------
Boot into your Linux operating system. **I DO NOT recommend using virtualbox or vmware, as drivers for usb and SDcard connections arent direct, things can go wrong.**
Shutdown your phone, and remove your SDcard. Do not use adb, or any other tools to do this.
insert your SDcard into your computer (adapter or reader yada yada) and mount every partition.
Make careful note of what is on which partition. safest way to back everything up is through the command line with the command
Code:
sudo cp -Rfvp /media/your-sdcard-partition/* /where/your/backup/folder/is
Do this for each partition, whether you have 1, 2, 3, or more.
In my case, my backup directory looks like this:
Code:
[[email protected] sdcard-backup]$ ls -l
total 12
drwxrwxr-x. 2 hookup-cellular hookup-cellular 4096 Sep 13 18:48 ext2
drwxrwxr-x. 2 hookup-cellular hookup-cellular 4096 Sep 13 18:48 ext4
drwxrwxr-x. 2 hookup-cellular hookup-cellular 4096 Sep 13 18:48 fat32
(ignore the empty directory sizes, my TRUE backup folder is MUCH more vulgar and i wont display it publicly, people may tear thier eyes out )
After everything is backed up, open your partition manager (in Gnome it is gparted, cant remember the name in others)
Navigate to your SDcard, and DELETE every partition. every one.
afterwards, recreate them using this strategy:
partition 1 - FAT32 size = total sdcard size minus ext2 and ext4 partition sizes
partition 2 - EXT2 size = 256mb, 512mb, 1gb, depending on how you like your apps2sd
partition 3 - EXT4 size = size you want for linux, minimum should be 4gb (mines at 10gb, i like my linux and got 3 different ones on it at the same time.)
When you are done, copy back your fat32 and ext2 stuff using the SAME COMMAND AS ABOVE (sudo cp -Rfvp from/here to/here)
Now, unzip/tar the .tar.gz package. I recommend extracting it to your pc before trying to put it on your sdcard.
Using the copy command above, put the extracted files onto your sdcard's EXT4 partition.
Double check the partition (navigate to it in nautilus or whatever filemanager your using) and ensure that it has the system copied over properly. You should see /boot /etc /root /sys so on and so forth, NOT just one folder with all of those inside of it.
Insert your SDcard, power on your phone, go to terminal emulator, and enter this:
Code:
su
cd /sdcard/scripts
sh mkcore
Swap file is damn near neccessary if your planning on using any GUI tools (armitage, zenmap)
Your directory structure is now in place, swap file created, and you start BT5 by typing (from /sdcard/scripts OR /data/linux):
Code:
sh btgo
=================================
2. Fresh Image Creation
=================================
for this, we use the dd command and mkfs.ext4 command.
Code:
dd if=/dev/zero of=/path/to/where/you/want/the/img bs=1M count=3300
Change this command as needed, running it as is wont do anything good. Change the of= to where you want your img to be located.
next is mkfs.ext4
Code:
mkfs.ext4 /path/to/where/you/want/your/img
select yes when it cautions about "not a block device"
When this is finished, mount it using these commands:
Code:
su
-your password-
mkdir -p /mnt/bt5img
mount -t ext4 /path/to/your/img /mnt/bt5img
now, extract the BT5 package to a place on your Computer. When finished, run this command:
Code:
sudo cp -Rfvp /path/to/bt5/core/* /mnt/bt5img/
changing parameters accordingly.
After this, copy the .img to /sdcard/bt5 and run the start scripts from your terminal emulator.
================================
3. Replace Existing Image
================================
Mount your bt5 image, erase what is inside of it, and copy in the new system:
Code:
su
-your password-
mkdir -p /mnt/bt5img
mount -t (your ext type) -o loop /path/to/your/bt5/img /mnt/bt5img
rm -Rfv /mnt/bt5img/*
cp -Rfvp path/to/bt5/core/* /mnt/bt5img/
unmount your .img, place it on your sdcard, and your all set.
==============================
Changes in v0.3
==============================
- Trimmed alot of fat, fits inside of 3.3 image now, though space is SEVERLY limited (removed CUPS and sound stuff, who needs to print from within thier phone anyways?)
- various small changes for performace improvements.
- a few new tools installed, but not tested
- restored my personal version that i nuked. It works now.
NEW STUFF TO COME, STAY TUNED!!!
First off, My apologies for starting a second thread on this, I've made ALOT of changes and i feel the first thread is dead and useless. (Reprimand me if needed
-pics coming once I find my camera could be a small while-
---------------------------------------
Backtrack5 for HD2 - v0.2
Customized by z3n
My goal: the perfect stealth
tool in your pocket
just one tap away
---------------------------------------
========================
Codename
Squeaky Wheel
========================
Updated, check second post for changelog
========================
DOWNLOAD
========================
Please use the scripts attached at the bottom of this post instead of the packaged ones, and i havent had a change to update the full image zip with it (uploads take a while )
V 0.2
Part 1 - http://www.megaupload.com/?d=D0MQVAS4
Part 2 - http://www.megaupload.com/?d=M2MRYLAH
MD5 - 06225e18cdbfee6f88daf7e9ee3a1163
SHA1 - eeba19e53565a1643703cf8938be2f8cfc12db9a
V 0.1
Part 1 - http://www.megaupload.com/?d=83B22Y00
Part 2 - http://www.megaupload.com/?d=SB98AA19
mirror - (NOT interchangeable)
Part 1 - http://www.megaupload.com/?d=HU320Z81
Part 2 - http://www.megaupload.com/?d=QN9C560Z
Checksums of bt5.img
MD5 = 863e6db99e5207a81ad0df7d13998235
SHA1 = c84d8f27df8b9b51059e5a6b09e65853f11de970
7zip required to extract.
Just over 1gb packed, unpacked is 4.9gb.
========================
INFO
========================
This is my first release of a customized, working, mostly stable BT5.
Many things have been added, taken out, and configured to be used within the Android system. For a full list, please see the bottom of this post.
Mounting is different than most other linux .img installations, allowing for a full (and expandable) image.
V 0.2 Now has a swap file created when you run the mkdirectory script. This swap file is necessary, as with all my tests, When you run VNC with most of the major tools, there's a high chance of the phone running out of memory (im running no extra apps, completely stock Hyperdroid)
(if you have a swapfile already, you can say no to creating another, just make sure that the file is located at /data/bt and named btswap.)
**This image is in ext4, make sure your kernel supports it!**
**Everything tested on Hyperdroid-CM7 by pongster**
==============
INSTALLATION
==============
You need:
-Full Nandroid Backup in case something goes batty
-16gb HD2
-ext4 support on your ROM/kernel (lost my ext2 image due to my own stupidity, will create another matching one later)
-Linux on PC (to create the ext4 partition)
-Busybox (from market)
-VNC Viewer (from market) (optional)
FAT32/EXT4 Split card
---------------------
1.
Back up your HD2 and SDCard to safe places (off of the phone and sdcard)
2.
Boot your linux installation and open partition manager. erase all the partitions on yor SDcard. Then create them in this order.
1. FAT32 - size of this is total sdcard size minus 6.5g (for bt image) minus 100mb for aps2sd
2. ext2 - 100mb
3. ext4 - 6.5 gb
3.
Copy the bt5.img to the root of your third partition.
copy the bts folder to the root of your FAT32 partition.
4.
if this is your first time using this script/image, run the mkdirectory script first with
Code:
su
sh /pathtoscripts/mkdirectory
Load up your android terminal and type
Code:
su
cd /path/to/scripts
sh go
5.
Now it asks you if you want to log in to the console or start vnc automatically. (check log for port, usually 5901 or 5902)
DEFAULT VNC PASSWORD IS: toortoor
DEDICATED SDCARD
----------------
Same as everything above, minus the FAT32 partition.
"sh ded"
starts for dedicated SDcard instead of
"sh go"
Proper Shutdown Procedure
=====================
Stop script has been modified to shutdown backtrack and all of the (usual) programs that stop things from unmounting properly.
Exit any VNC connection you currently have.
1. Run sh stop (from your scripts location)
2. Reboot phone as a precaution.
One thing i did personally to make this easier was load the scripts onto /data/bt, so switching SDcards or locations doesnt matter.
(I also changed the terminal start directory to my scripts folder easy quick access)
=======================
Main Features I've gotten to work
=========================
-Clean mount/umount, as long as VNC and MySQL are killed BEFORE exiting the chroot - stop script kills these now
-Apps no longer disappear for good with sdcard removed, only disappear until SDcard is reinserted (apps2SD/loop device problem, any ideas?)
-MySQL for metasploit
-Metasploit working
-Armitage working, missing some "Attack" options (looking into it)
-Zenmap installed
-OpenVPN installed
-Traffic analysis possible with tcpdump (local only)
-Enables possibility for FakeAP attacks
-macchanger works (kinda, phone needs a reboot for original MAC to return)
-Armitage Launcher placed on Desktop (takes a while to load, be patient)
-Terminal Launchers in various places (updating may randomly remove your terminal, synaptic placed on desktop as standby to redownload terminals
-guake installed (drop down Terminal, makes commands easier to see while working) (not configured to a key yet)
This probably works with other Android phones too. If you change the scripts, and as long as it has a external SDcard you can partition.
if your using a different phone, this is untested unless specified otherwise.
-boot and shutdown scripts run clean as long as VNC and MySQL are shut off(in almost all cases)
@ XDA
http://forum.xda-developers.com/show....php?t=1152994
PASSWORDS
------------
MySQL - user: root pass: toor
VNC - User: root pass:toortoor
sys pass - user:root pass:toor
(I know, standard ones, but this should answer a few questions)
===============================
Thanks
===============================
anantshri - for the original scripts and BT5 img for android
BT dev team - (of course )
and all of you
===============================
Information, bugs, and oddities
===============================
One important thing, While performing heavy operations, its normal for your screen to not turn on for a while if it turns off. Dont panic, just give it some time to finish whatever you were running and your phone will be back to normal again. DO NOT PULL THE BATTERY UNLESS ABSOLUTELY NECESSARY.
To avoid this, get wakelock (known to cause problems) or set your screen timeout to some large number.
Swap file will help with alot of this.
These are the features I've tested out so far.
No major changes to anything, (except new packages) just configuring everything i see.
If you find anything you want added in or that is acting odd, please let me know. Same goes for if you fix something!!
Overall
-------
-Repo's activated, most things work (upstart processes fail, for now)
-startvnc and stopvnc no longer give that pesky USER error
-startvnc starts mysql database for metasploit
-stopvnc stops mysql (mostly, invoke ps -A and look for mysqld. Kill it with fire(-9) if need be)
-network traffic is capture-able with tcpdump, with wifi hotspot activated
-working on adding in a swap partition on sdcard (if possible)
-openoffice installed
-openVPN installed (the quieter you become...)
-Removed Zoho Web services
MySQL
-----
default user - root
default pass - toor
-Starts automatically with startvnc
-stops automatically with stopvnc
-start manually by invoking "mysqld"
-Only runs as root (for now)
-Console hangs when it is manually loaded or shutdown, service continues running though. killall --signal 9 mysqld if needed.
Metasploit
----------
-Loads up alright (45-90 seconds)
-MySQL already set as default DB
-Must manually connect to MySQL DB each instance of metasploit by invoking (from msf) db_connect root:[email protected]
-working on a possible way to limit cpu consumption to prevent system hangs(cpulimit does some nasty things)
-So far, this is the only connection string ive been able to get to work: root:[email protected]
Armitage
--------
-Takes forever to load (30 seconds for connect screen, 4 minutes or so for main client)
-Causes system hangs frequently (to minimize this, leave the vnc server on your screen, and set the display timeout to 10 minutes-switch it back when done to conserve battery life)
-So far, this is the only connection string ive been able to get to work: root:[email protected]
-Can Crash phone if running too big of an operation (Max Phone memory problem, fixed in v.2 with swapfile added)
Zenmap
------
-Slows phone down (incredibly bad with more complex scans, of course)
-Some Complex scanning options can crash phone (Nothing damaging has happened)
-will attempt to throttle cpu usage in the future
-Can Crash phone if running too big of an operation (Max Phone memory problem, fixed in v.2 with swapfile added)
Aircrack-ng suite
-----------------
-Aircrack-ng works
-Airodump-ng doesnt work (needs monitor)
-Airdecap-ng untested
-Airdecloak-ng untested
-Airbase-ng doesnt work (needs monitor)
-Airmon-ng doesnt work (needs monitor)
-Aireplay-ng doesnt work (needs monitor)
-Airdriver-ng doesnt work (yet)
-Airolib-ng works (doesnt do anything yet)
-Airserv-ng doesnt work (needs monitor)
-Airtun-ng doesnt work(needs monitor)
Plus lots of stuff for the future, stay tuned!!
http://forum.xda-developers.com/show....php?t=1152994
In the future
=========
-nessus
-Booting via HD2 Toolbox by d4n14l (sp?)
-Custom kernel (WAYYYY down the road, but working on it)
and more
--Copyrighted by z3n, 2011
(just kidding, but it looks good )
Looks good will give it a go.
Thanks for sahring
I we could get our wifi card into monitor mode --> awesome!!!!
Thanks to z3nful & everyone made this possible!
Enjoy everyone
The next release is going to be faster, stabler, and more useful
I'm also working on a round-about way for packet injection and monitor mode
Stay tuned
Sent from my Hyperdroid Pocket Laptop
cool.. good job man..
Are you trying to patch the wifi drivers ? =D
Holy crap.....this is a dream in the making Bring on monitor mode and packet injection
I've done some researches.. and found out that many devs have tried making the driver to work on the Monitor mode.. but they failed to do that.
It looks to me that Backtrack on HD2 is kinda useless.
Not useless, just last night I ganked my roommates computer with my phone
As far as monitor mode and injection go, sadly, they may be right that its not possible, but I got some ideas that may make it work, I just need to hammer out some kinks in BT first
And who needs monitor when you can fakeAP?
"Make them hand you the keys and you don't have to break their Window(s)™"
Sent from my Hyperdroid Pocket Laptop
A m a z i n g
Next release is going to be even better this 5gig image is almost full, so I'm going to expand it to 6gig, along with instructions on how to expand your own image if that's to large or want even more space.
Btw, Wine should be good to go in the next one
stay tuned!!
Sent from my HD2 "Pocket Laptop"
I would love to see some Sceenshots (or better: a video) here!
Lol will do, gotta go find my 10 year old Polaroid I've been using this phone or all my pics and videos, so this could be tricky
Sent from my HD2 "Pocket Laptop"
good to see development beyond just starting up the image... I would be taking some pointers from here for my device too....
hope you don't mind that....
Not at all, I've been trying to track down your name again so it can add you to the credits part, as the basis of the scripts was yours lol, I just changed the loops and mounting structures around a bit, and added some stability checks.
The scripts for this image are slightly out of date but I got new ones going up once I have time they should fix a few of the small eerrors people get while mounting
My next version is a little ways out (works gotten crazy busy lately) but it'll be out eventually
Sent from my HD2 Pocket Laptop
Not Booting!
Hi Thank you for sharings this up!!! this is like a dream for alot of people.
i have followed all your steps but i have a problem when i run the scripts, the folders dont get created because when i run go i get a bounch of folder not found.
my SD card had some differences is a 16GB
with
Fat32
Ext-sd/ EXT2 -->1GB
EXT3 --> 100MB
EXT4 --> 6.5GB
could this setup causing the script to look on the wrong partitions? i have alot of time with out playing with Shell scripting but i would like to know if that is the place i should start looking for a fix
-edit- just double checked (forgot scripts were on my phone... its been a long week lol) and you should just need to change the mount -t ext4 /dev/block/vold/179:3 to /dev/block/vold/179:4
Also, did you run the new mkdirectory script? If you have the one packaged with the image its out of date. The attachment on the fist post has the updated ones
Ignore all mmcblk's
For another "buffer" partition, you need t point the sdcard parts (mmcblk0p* and vold/179:*) to what yours are in /dev/block. In your case I think you just need to change any vold/179:3 to 179:4. If you go to /dev/block/vold it will have folders from each partition (they are numbered 0 and up, but 1 would be your fat32, 2 is ext2 so on and so forth)
When I'm near my computer ill figure out the full ones for you
Sent from my HD2 Pocket Laptop
can I get it for Htc desire..??
It should work, as long as you have a big enough sdcard, your phomes kernel suppers ext4, and you might have to change a few small variables
Sent from my HD2 Pocket Laptop

[OUTDATED][GUIDE]3GB on DATA partition!! Repartitioning eMMC card

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
DISCLAIMER!
Operations on phone’s partition could be EXTREMALY dangerous.
As You surely expect - I take no resposibility if something will go... not as it supposed to. The responsibility for potential damages caused by using this guide is Yours, and Yours only!
New system partition scheme is “designed” for custom ROMs NOT based on original Samsung firmwares (because of it’s size and using /preload partition, which we intend to extremely resize), to name just a few reasons).​
The method of modification is created by @Tesla-MADAL93 from Galaxy Advance sub-forum, all credits should go to him!!! He spend many hours using trials and errors method to achieve final success.
Part ONE: Preparations / theory.
1.Procedure requires any Linux distro with usb connection configured (tested on Ubuntu 12.04 LTS).
2.Working ADB (android debug bridge) – you don’t need to install whole ADK, just adb file with correct path added.
[EDIT/CAUTION]You can use Windows with adb configured, as proven by @maxprzemo, but I wasn’t tested by author of this guide!
3.It is strongly recommended to make a backup of your apps and data before start (using titanium backup or simipar app) Restoring nandroid backup will destroy your new partitions, so don’t use it!!!
4.With this method “safe partiotions” of phone’s eMMC memory are being removed and recreated „safe” using „parted” command in adb shell mode. Some partitions are extremely decreased, one is totally deleted. And the most important – partition of your choice will be expanded. Example displayed below sets internal (DATA) partition as large as possible (almost).
5.You will need external micro SD card after remodelling partitions)
6.Memory swap (SD0 and SD1) required BEFORE first start of your chosen ROM!!!
7.You can restore original partition scheme using Heimdall or Odin (not tested by me, problems with Odin reported by the author of whole modification) with repartition selected.
8.Partition numbers and names are very important (crucial), so we need to create them correctly, setting beginning and the end of each one very carefully.
9.Last important thing! I use minimal gapps pack for every ROM. I didn’t tested if full gapss fit on new /system partition! You’ll have to check it by yourself!
Default partitions and sizes are displayed here:
​With this guide you will achieve something like this:
[Side Note: this is just an example – you can make internal card (UMS partition) bigger, leaving /DATA partition intact, just to install bigger games – you’ll have to calculate your own values]
Part TWO: Repartition
OK., let’s do it! You have to perform all steps EXACTLY in described order!
1.Turn phone on in recovery mode, connect it to computer using usb cable.
2.Open terminal / console (Ctrl+Alt+T)
2a. Enter command:
Code:
adb devices
You should see device connected (some numbers and letters)
3.Write (press enter after each command):
Code:
adb shell
su
parted /dev/block/mmcblk0
unit kb
print
You should see default partition scheme (just as one first screen above)
OK., say goodbye to your old partitions. Deleting other partitions could (and probably – will) have irreversible consequences!!
Now we will delete partitions, starting from the last one:
Code:
rm 8
rm 11
rm 9
rm 4
Now you will encounter some error – despite of the unmounting partitions before abovementioned procedure - /cache partition is now mounted. Do not unplug phone, just enter “mount and storage” submenu in recovery, and unmount cache partition)
So let’s continue:
Code:
rm 4
rm 5
rm 3
You just deleted all “safe” partitions, enter to check this:
Code:
print
OK., it’s time to (re)create!
(SYSTEM, partition 3)
Code:
mkpart primary 105906 525906
(CACHEFS, partition 4)
Code:
mkpart primary 3848809 3948809
(DATAFS, partition 5)
Code:
mkpart primary 525906 3848809
(UMS, partition 8)
Code:
mkpart primary 3948873 3948937
(HIDDEN, partition 9)
Code:
mkpart primary 3948809 3948873
Let’s rename them properly (probably you can do it in one mkpart command, but it doesn’t matter):
Code:
name 3 SYSTEM
name 4 CACHEFS
name 5 DATAFS
name 8 UMS
name 9 HIDDEN
Almost done, let’s check:
Code:
print
Nice? Of course it’s nice!!! )
One last thing – we have to make our magic /preload (HIDDEN) partition visible for phone [it won’t boot without it!!] Because recovery won’t format it properly, lets use parted command for a last time (wait after each command):
Code:
mkfs
y
9
ext2
Now you can unplug the phone and format (in recovery) partitions:
/system
/data
/cache
OK, as I said before – you’ll have to switch storages BEFORE using phone again.
For now – you will have to manage it by yourself, just to make it short:
-for 4.2.x ROMs you can use modified vold.fstab file
-for 4.3.x ROMs – you have to manually modify build.prop, or use available zip package that will do it for you (that method is supposed to work with 4.2.x ROMs, but I didn’t test it!)
-I never used any of 4.4.x ROMs, but as I heard, there is method for switching memories too.
WARNING!
I didn’t test the way back to original partition sizes! It was tested by tesla-Madal93 though…
Sometimes (when transfer ring from one android version ROM to other, or using some old version where /preload partition was set as SWAP) you will need manualny format HIDDEN partition, just as shown above:
in adb shell mode:
Code:
parted /dev/block/mmcblk0
Code:
mkfs
y
9
ext2
FINAL WORD: If you are not sure – DON’T DO IT!!!
Screenshots are broken... I assume this deletes the "USB storage"? If then, you and the OP are bosses :good:
I can see the pictures (but are linked from other forum, i'll switch them in future), but yes - it deletes usb storage (ok, not really - new usb storage has 64KB and doesn't have to be even formatted)
Good job !:good:
Personaly i wont do it ever because 1,2 GB is enough, and if i get over that surely i have something on phone that i need to delete because i am not using it
Great post.
I would love to see the same mkpart commands to recover the preload partition space and allocate it to the data partition.
I'll do the full repartitioning thing when the team canjica CM11 major bugs have been solved. I'm not too confident about the other cm11's memory swap sustainability over time
Sent from my GT-I8160 using Tapatalk
I suggest you making script for this, and one script to revert everything like it was before
Rox said:
I suggest you making script for this, and one script to revert everything like it was before
Click to expand...
Click to collapse
I don't know if I can make something as a simple script for recovery (maybe with busybox), but for Linux yes (to automate repartition process). In every case, I will tell/send it to @judas1977 that will provide to update this guide.
@judas1977: Nice work
My new system partition
Made under windows 7
Well done judas77 and Tesla-MADAL93 :laugh:
I'll try to make (semi)automate script for linux terminal in couple of days (unless @Tesla-MADAL93 make this) - then we can have/prepare separate scripts for various partition sizes:
- bigger /DATA
- bigger /UMS (like @maxprzemo did)
- etc...
My partition table (actual formatted sizes 602M /system, 28M /cache, 2150M /data, 761M /sdcard -- no need to swap storage)
3 105906kB 747635kB 641729kB ext4 SYSTEM
4 747636kB 777636kB 30001kB ext4 CACHEFS
5 777636kB 3118935kB 2341299kB ext4 DATAFS
8 3118935kB 3918936kB 800001kB fat32 UMS
9 3918936kB 3948937kB 30001kB ext2 HIDDEN
Original partitions:
Model: MMC SEM04G (sd/mmc)
Disk /dev/block/mmcblk0: 3959423kB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
10 524kB 1573kB 1049kB PIT
6 1573kB 3146kB 1573kB CSPSA FS
7 4194kB 14680kB 10486kB ext4 EFS
2 14680kB 31457kB 16777kB ext4 Modem FS
14 32506kB 34603kB 2097kB SBL
16 34603kB 36700kB 2097kB SBL_2
1 36700kB 53477kB 16777kB PARAM
12 53477kB 55575kB 2097kB IPL Modem
13 55575kB 72352kB 16777kB Modem
15 72352kB 89129kB 16777kB Kernel
17 89129kB 105906kB 16777kB Kernel2
3 105906kB 747635kB 641729kB ext4 SYSTEM
5 747635kB 2056258kB 1308623kB ext4 DATAFS
4 2056258kB 2377122kB 320864kB ext4 CACHEFS
9 2377122kB 2712666kB 335544kB ext4 HIDDEN
11 2712666kB 2765095kB 52429kB Fota
8 2765095kB 3948937kB 1183842kB fat32 UMS
Minimum sizes and warnings
/system 530M (approximate value, calculated for CM10.2 + my gApps) (10MB margin)
/cache 8M (assuming dalvik.vm.dexopt-data-only=1 && dalvik.vm.dexopt-cache-only=0) (2MB margin)
/data 350M (assuming about 100M of actual usable app space) (20MB margin) -- in practice less than 600 will be quite tight
/sdcard 1M (depends on apps again and FAT fragments easily by design, avoid less than 100M)
Now what should be nice having are ROM variants with internal storage disabled, so that we can remove partition 8 and both bypass the need for storage swapping but also avoid some apps not desiged for 2 "SDs" getting partially broken
I just repartitioned my phone, but acidentally I partitioned partition 2 instead of 3 :/
Now when I try to rename the partition 2 again in "Modem FS" with the name command, it only names the partition as "Modem". Can someone explain me please how to rename it to the original name again?
Thank you
S.AMU said:
I just repartitioned my phone, but acidentally I partitioned partition 2 instead of 3 :/
Now when I try to rename the partition 2 again in "Modem FS" with the name command, it only names the partition as "Modem". Can someone explain me please how to rename it to the original name again?
Thank you
Click to expand...
Click to collapse
Try "Modem FS" with quotes, or maybe Modem\ FS
Ryccardo said:
Try "Modem FS" with quotes, or maybe Modem\ FS
Click to expand...
Click to collapse
renaming worked with the quotes. Thanks
I restored my old nv_backup and now the device is booting... Let's see if it will work. I'm just confused, because in recovery the partition is called modemfs and when restoring nv backup it is called Modemfs....
botid said:
Great post.
I would love to see the same mkpart commands to recover the preload partition space and allocate it to the data partition.
Click to expand...
Click to collapse
Impossible (well, without LVM or something) because there's USB storage in the middle... but with 10 minutes and a calculator you can create your partition sizes relatively easily
If I'll make the following changes in partitions: UMS resize to 400MB, CACHEFS resize to 30MB, DATAFS resize to 2,313GB, Fota 0 MB and I'll leave SYSTEM and HIDDEN to default sizes can I restore CWM Recovery backup or flash stock rom with Odin?
The HIDDEN partition will have the same size, but the location on mmc is different, as you can see below.
3 105906kB 747635kB 641729 kB ext4 SYSTEM
5 747635kB 3173073kB 2425438kB ext4 DATAFS
4 3173073kB 3203793kB 30720 kB ext4 CACHEFS
9 3203793kB 3539337kB 335544kB ext2 HIDDEN
8 3539337kB 3948937kB 409600KB fat32 UMS
Sorry for my english.
powermetza said:
If I'll make the following changes in partitions: UMS resize to 400MB, CACHEFS resize to 30MB, DATAFS resize to 2,313GB, Fota 0 MB and I'll leave SYSTEM and HIDDEN to default sizes can I restore CWM Recovery backup or flash stock rom with Odin?
The HIDDEN partition will have the same size, but the location on mmc is different, as you can see below.
3 105906kB 747635kB 641729 kB ext4 SYSTEM
5 747635kB 3173073kB 2425438kB ext4 DATAFS
4 3173073kB 3203793kB 30720 kB ext4 CACHEFS
9 3203793kB 3539337kB 335544kB ext2 HIDDEN
8 3539337kB 3948937kB 409600KB fat32 UMS
Sorry for my english.
Click to expand...
Click to collapse
Nandroid: I wouldn't personally do it but it should work
Odin: definitely repartition with PIT and full image first
And be sure to input the partitions in numerical order!
You can make a script? For linux and winzozz?
Sent from my GT-I8160 using XDA Premium 4 mobile app
Don't make CACHEFS partition under a minimum 100 MB!!!
In this partition is stored system apps' dalvik cache on all CM and CM-based ROMs, if available space is insufficient to store dalvik cache of all system apps the ROM isn't stable and has lot of FCs depending on what caches are not stored. If you want to go under 100 MB (that I advice) first check actual used space on this partition with Partition Table (available on Play Store) on your ROM, remember that every ROM has its system-dalvik cache size depending from apps' classes.dex
Inviato dal mio GT-I9070
Tesla-MADAL93 said:
Don't make CACHEFS partition under a minimum 100 MB!!!
Click to expand...
Click to collapse
And why?
I've had zero problems in Android with 10 MB as long as you keep dalvik-cache away from it ( dalvik.vm.dexopt-data-only=1 and …cache-only=0)
Recovery probably uses it more though...
Ryccardo said:
And why?
I've had zero problems in Android with 10 MB as long as you keep dalvik-cache away from it ( dalvik.vm.dexopt-data-only=1 and …cache-only=0)
Recovery probably uses it more though...
Click to expand...
Click to collapse
In this way is okay, but not all people know this I think. Should be added to first post @judas1977
Inviato dal mio GT-I9070

[REPARTITION] Nexus 7 (2013) Repartition [FLO/DEB] [16GB/32GB] [UA TWRP]

Nexus 7 (2013) Repartition​
No one is responsible for your actions except yourself. Everything written further may potentially brick your device, although risk is reduced to minimum.
This repartition package offers 1.5G /system; a /vendor partition and it is fully backward compatible with any ROM (including stock system.img).
Known-issues
HTML:
- If repartition pack says that device isn't correct,
than, if partition table wasn't modified before,
congrats! your device has different memory chip
that those I worked with. No worry, PM me and
I'll add support for it.
DO THE BACKUPs. Repartition will erase all your data
USB connection to PC is MANDATORY else you will not have opportunity to push ROM to your device
Backup
# Before processing further we highly recommend you backup persist and EFS using adb
# Or you might lose your IMEI/WIFI + BT mac addresses
Code:
adb root
adb shell
dd if=/dev/block/mmcblk0p2 of=/sdcard/modemst1.img
dd if=/dev/block/mmcblk0p3 of=/sdcard/modemst2.img
dd if=/dev/block/mmcblk0p4 of=/sdcard/persist.img
Now you can find 3 *.img files at path /sdcard. Copy them to your PC since internal memory will be erased.
Installation
HTML:
# This mod is backwards compatible with any ROM so we highly recommend NOT to reverse it if repartition went well.
# You should use ONLY recovery from this thread since other don't support all benefits of this mod.
# When installing ROM just after you flashed zip and before installing GAPPs you MUST make a resize in TWRP since all roms are build for ~800M system.
# Package is unified for flo and deb. To restore stock layout use same zip and steps as for repartition.
1. Boot into recovery (You need to allow system partition modification to be able resize /system in recovery).
2. Backup your data & Move your files from flash to your PC.
3. Flash repartition pack zip.
4. Do the actions asked by repartition pack (go to Terminal in ordinary recovery and input word that pack will tell you. Everything else will be done automatically).
5. Phone will reboot into recovery.
6. Install TWRP from below (it is build with support of new partitions layout and sizes. It can be differed from official TWRP by next format 3.x.x-1 UA).
7. Format everything. (mount errors will not affect formatting!)
- In TWRP: Wipe > Format data
- Type yes
- Once this completes go to: Wipe > Advanced Wipe
- Tick all the boxes and wipe. There should be no further mount errors. (Thanks [user=7694808]@mr_rubbish[/user] for corrections in formatting).
8. Install ROM which you like.
9. Enjoy better flash partition layout.
If something gone wrong - we recommend you NOT to do anything by yourself. Write here for help, else you may do only worse.
Downloads:
Repartitioning package: GitHub
Credits:
Special thanks to
- Unlegacy-Android team;
- Sudokamikaze;
- rlw6534 for Kingston MMC layout;
- surfrock66 for his gide for Nexus 5;
As usual, feedback is appreciated
XDA:DevDB Information
Nexus 7 (2013) Repartition, Tool/Utility for the Nexus 7 (2013)
Contributors
Clamor
Source Code: https://github.com/clamor95/android_device_unlegacy_recovery
Version Information
Status: Stable
Created 2018-09-19
Last Updated 2019-01-18
Common issues and F. A. Q.
Repartition pack should be safe for most devices. Common mistakes, issues and their solution will be published here.
1. You shouldn't flash any internal parts of repartition pack (*.sh files) only flash whole zip using TWRP. You may use my scripts for personal use or projects but authorship should to be kept.
2. If something isn't mounting after repartition try to format partitions that don't mount using Wipe -> Advanced Wipe in TWPR. Ideally you should format in that way all partitions in Advanced Wipe menu (see 5-th step of installation guide).
3. If you want to be sure that repartition went well I enclose loging zip. Flash it after repartition (when device reboots into TWRP). It won't modify anything only generates a partition.log in root of internal storage and outputs your current partition layout to screen. You should check if your layout is same as those fragments I provide under spoiler (file systems doesn't matter). If there are any differences you have to describe what you did and enclose partition.log to your post.
FLO/DEB STOCK
Code:
22 671088640B 1551892479B 880803840B system
23 1551892480B 2139095039B 587202560B cache
FLO/DEB MODIFIED
Code:
22 614429696B 2187293695B 1572864000B system
23 2187293696B 2270167039B 82873344B cache
...
30 2348843008B 2610987007B 262144000B vendor
4. After flashing most ROMs system size will reduce to stock, you need to resize /system in TWRP or use flashable resize zip for ROMs that support addon.d (automatic resize when dirty flashing updates).
5. After returning to stock partition table you won't be able to get into the Recovery from the bootloader anymore, but when you start the tablet normally it goes straight in the Recovery. It is normal state. New partition table proposes larger /recovery size (16MB) while stock gives only 10MB. During restoring stock process, it is impossible to restore larger recovery backup into new smaller partition. Whether not to leave user without recovery excess, recovery backup restores into /boot partition. Just flash ordinary TWRP and install ROMs from it.
6. Don't install the zip file from the USB OTG. Copy them into the /sdcard. Else you will get message after flashing repartition pack.
Code:
"Can not extract updater-script. Do you have it in package?
Updating partition details...
...done"
Link not working for the repartitioning package...
@rlw6534 should be fine now
Any chance you give details on backing up persist and EFS with dd command? I'm not really a noob but I also don't want to mess up my tab...
@rlw6534 You actually should't brake anything. Added an instruction how to backup EFS and persist.
OK. Tried to flash on a clean, freshly wiped system (Flo 32G), all stock, ext4 on cache and Data, TWRP 3.2.3-0. Got the following:
******Applying dark magic******
This is not a Nexus 7 (2013)
Updater process ended with ERROR: 1
How to restore files, that we copied from our tablet using dd command ? (I haven't done anything yet. Just asking)
Sent from my whyred using XDA Labs
@rlw6534 your partition table was modified.
@MikiGry same commands, just switch paths.
Clamor said:
@rlw6534 your partition table was modified.
@MikiGry same commands, just switch paths.
Click to expand...
Click to collapse
Do you mean that despite this error message:
******Applying dark magic******
This is not a Nexus 7 (2013)
Updater process ended with ERROR: 1
The partition table has been modified correctly?
@lollyjay No it wasnt. Package has 2 step security system. It checks if partition table was modified and in what way (by package itself, by user or it is stock). Second step is that package itself doesn't modify anything, it needs manual confirmation in terminal, else no changes will be applied.
Clamor said:
@lollyjay No it wasnt. Package has 2 step security system. It checks if partition table was modified and in what way (by package itself, by user or it is stock). Second step is that package itself doesn't modify anything, it needs manual confirmation in terminal, else no changes will be applied.
Click to expand...
Click to collapse
Thanks
So do I NOT flash the modded twrp first?
Your instructions said to flash it after reboot to recovery
@lollyjay actually it shouldn't metter, but after would be better
Clamor said:
@lollyjay actually it shouldn't metter, but after would be better
Click to expand...
Click to collapse
I'm going to do this when I get home. This might mean that flo/deb will get Android 9 Pie
@lollyjay look through UA ROM thread I wrote there about P on flo/deb
Clamor said:
@lollyjay look through UA ROM thread I wrote there about P on flo/deb
Click to expand...
Click to collapse
Sorry but can you give me a link?
Clamor said:
@rlw6534 your partition table was modified.
@MikiGry same commands, just switch paths.
Click to expand...
Click to collapse
I have previously used sysrepart.zip and sysrepartundo.zip from this thread, although not recently:
https://forum.xda-developers.com/showpost.php?p=76278047&postcount=19
I returned it to stock a while back (827MB). Perhaps I need to sgdisk a stock partition table?
@rlw6534 Every manual repartition or repartition made not by my pack needs an individual look and partition table restore.
@lollyjay here
Clamor said:
@rlw6534 Every manual repartition or repartition made not by my pack needs an individual look and partition table restore.
@lollyjay here
Click to expand...
Click to collapse
OK. Here is my partition layout. My userdata appears to be smaller than stock, but there isn't enough room on mmcblk0 to increase it to the size that your script is looking for. I have no idea how that could have been changed without bricking the tab. Everything else looks normal. Ideas?
Code:
Model: MMC MMC32G (sd/mmc)
Disk /dev/block/mmcblk0: 30937186304B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 67108864B 156745727B 89636864B fat16 radio
2 201326592B 204472319B 3145728B modemst1
3 204472320B 207618047B 3145728B modemst2
4 268435456B 283795455B 15360000B ext4 persist
5 335544320B 336343039B 798720B m9kefs1
6 336343040B 337141759B 798720B m9kefs2
7 402653184B 403451903B 798720B m9kefs3
8 403451904B 406597631B 3145728B fsg
9 469762048B 471298047B 1536000B sbl1
10 471298048B 472834047B 1536000B sbl2
11 472834048B 474931199B 2097152B sbl3
12 474931200B 480174079B 5242880B aboot
13 480174080B 480698367B 524288B rpm
14 536870912B 553648127B 16777216B boot
15 603979776B 604504063B 524288B tz
16 604504064B 604505087B 1024B pad
17 604505088B 606041087B 1536000B sbl2b
18 606041088B 608138239B 2097152B sbl3b
19 608138240B 613381119B 5242880B abootb
20 613381120B 613905407B 524288B rpmb
21 613905408B 614429695B 524288B tzb
22 671088640B 1551892479B 880803840B ext4 system
23 1551892480B 2139095039B 587202560B ext4 cache
24 2147483648B 2148532223B 1048576B misc
25 2214592512B 2225078271B 10485760B recovery
26 2281701376B 2281709567B 8192B DDR
27 2281709568B 2281717759B 8192B ssd
28 2281717760B 2281718783B 1024B m9kefsc
29 2348810240B 2348843007B 32768B metadata
30 2415919104B 30937169407B 28521250304B ext4 userdata
@rlw6534 Thanks!

[RECOVERY][DUALBOOT][MAGISK][3.3.1-79][Unified]Unofficial TWRP for OnePlus 7/7 Pro/5G

If you want to make something like this for your device, check out this guide here
Since I no longer have an OP 7 series device, this mod is now deprecated and won't be receiving any more updates. @invernomut0 has made a continuation of this mod using orangefox recovery. Check it out here!
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
Code:
#include <std_disclaimer.h>
/*
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
Compatibility
This has only been tested by me on Oxygen OS Stable - Android Q.
Disclaimer
This is a DANGEROUS mod. Anything involving repartitioning is. If you fail to read and bad things happen, that's on you. Although I thoroughly tested this (managed to brick my phone once), there's always the possibility that something could go wrong with the worst case scenario resulting in a brick.
YOU'VE BEEN WARNED - Use at your own risk
What is this?
This is @mauronofrio's TWRP (see official thread here) that's been modified for true dual booting by splitting userdata into a/b slots (also does the same for metadata for encryption support). The installer script repartitions userdata for dualboot or stock based on your input.
Limitations
See the section in the github readme. MAKE SURE YOU READ THIS!
Features:
Same as mauronofrio's TWRP
Can choose between stock layout, a/b userdata, or a/b/c userdata where 'c' is a common data partition that'll show up in both roms - it's quite handy
Option to choose between ext4 and f2fs
Disables verity - fstabs are modified for dual boot and so this is a must unless you choose stock layout in which case it's optional
Option to disable forced encryption
Option to install magisk
Common Data
I recommend the a/b/c layout which includes this common data partition
If you choose a/b/c layout - you'll have a/b userdata, but you'll also get a 3rd userdata partition I call 'Common Data'
The name 'Common Data' gives away its purpose - to store files that you'll access on both slots/roms. So stuff like zips, pictures, music, TWRP backups, etc.
In TWRP, this shows up as another storage option for backup/restore and on your pc as well - your phone will have 'Common Storage' and 'Internal Storage'
In order to be accessible when booted, some parts of the system are modified so that the it'll be accessible WITHOUT root by the following mechanisms:
- The common data partition is mounted to /sdcard/CommonData
- .nomedia file is placed in CommonData so files in it won't be picked up twice if you decide to mount over internal storage as outlined below
- Furthermore, if your use case is like mine where my music files are in common data, you can make 'mounts.txt' file in /datacommon containing a list of every FOLDER to mount directly over top of sdcard. So for example:
/datacommon/Music -> /sdcard/Music
+ This of course mounts over anything there (overwrites it for as long as it's mounted) so make sure that you don't have the same folder in both datacommon and regular data
+ Note that there are 3 exceptions to this folder mounting rule:
1) All - if this is the FIRST line, ALL folders in datacommon will be mounted
2 )Android
3) lost+found
+ The reasoning should be obvious - lost+found isn't something you should need to mess with and Android is for regular data partition only - that's OS specific and should be on separate slots
+ Note that you should have 1 folder listed on every line, for example:
Code:
DCIM
Music
Pictures
ViPER4AndroidFX
Flashing Instructions
You MUST be booted into TWRP already when flashing this zip. You can grab a bootable twrp img from here
Since this modifies data - the zip CANNOT be on sdcard or data at all UNLESS you do not want to repartition/format
- If you flash from data, the zip will copy itself to /tmp and instruct you to flash it from there OR you can just install twrp/magisk/disver-fec
- You could do the above or copy it to a place like /dev or /tmp and flash it from there
- Alternatively, you can adb sideload it
Read through ALL the prompts - there's lots of options
Note that if you change partition layout, THIS WILL WIPE ALL DATA INCLUDING INTERNAL STORAGE
How to Flash Roms - If you're NOT stock layout
Nothing changes here except ONLY FLASH IN TWRP
- Roms always flash to the opposite slot. Keep that in mind and you'll be fine
- So don't take an OTA while booted - boot into twrp, switch slots, reboot into twrp, flash rom
Normal flash procedure:
1) Boot into twrp
2) reboot into twrp selecting slot you do NOT want rom installed to
3) Flash rom
4) Flash this zip
5) Reboot into twrp
6) Flash everything else
Help! I Can't Boot!
Usually this is because you switched roms without formatting data first. This should be flashing 101 but we all forget sometimes. Plus this slot stuff can get confusing
If it only happens with a/b/c and not any other layout, there's a good chance it's selinux related. Try setting selinux to permissive at kernel level with this mod(source here). If this doesn't fix it, it could be because selinux can't be set to enforcing even with the mod depending on the rom
How to Manually Repartition Back to Stock
In the event any step in the repartioning fails, the entire installer aborts. The good news is that this prevents a potential brick. The bad is that you need to manually revert back. See the README on github for the procedure. Note that if the install went fine and you want to switch back to stock later, just flash the installer again and choose stock layout
Download
Source Code
Credits
Mauronofrio
Teamwin
CosmicDan
TopJohnWu
Very ****ing badass. ?
Wow, this is cool. Always wondered if something like this would be possible on AB partitioned devices.
Looking forward to testing it out
Does the dual boot mean I can boot two roms?
jaggillararla said:
Does the dual boot mean I can boot two roms?
Click to expand...
Click to collapse
Ya. You can have a different rom on each slot
Will it impact on my original data partition if I flashed this TWRP.( I means whether my original data being splitted into 2-individual-parition + 1-common-partition and I need to reinstall my data after entering system ?)
Kris Chen said:
Will it impact on my original data partition if I flashed this TWRP.( I means whether my original data being splitted into 2-individual-parition + 1-common-partition and I need to reinstall my data after entering system ?)
Click to expand...
Click to collapse
The installer will tell you if it'll wipe internal storage or not.
Basically, if you choose to change the partition layout, data will all be wiped since it'll be repartitioned. If you choose to keep your partition layout at the beginning of the install, your data will be fine.
You could just use this zip as twrp, magisk, verity/fec modifer/installer to save you the extra steps and keep with stock layout
This is super cool. Will be testing soon. Just to confirm, this means I can have a custom rom on one slot and oxygen os on the other? Also f2fs should work fine with common data right?
f41lbl0g said:
This is super cool. Will be testing soon. Just to confirm, this means I can have a custom rom on one slot and oxygen os on the other? Also f2fs should work fine with common data right?
Click to expand...
Click to collapse
Yup. You can do whatever you want with either slot. This mod formats all data partitions as ext4 since that's what oneplus does. You can always reformat userdata to f2fs in twrp gui later if you want though. Same goes for common data although I don't think there's a gui option for that
How does this zip to allocate the each size of userdata ? Can be customized by ourself or automated by zip itself ?
Kris Chen said:
How does this zip to allocate the each size of userdata ? Can be customized by ourself or automated by zip itself ?
Click to expand...
Click to collapse
From what I see it can not be customized through the flasher (may be possible by editing values in the zip). In case you were wondering the size of the partitions, they are 96.7gb for the common storage and 62.4gb each for the individual storages.
Kris Chen said:
How does this zip to allocate the each size of userdata ? Can be customized by ourself or automated by zip itself ?
Click to expand...
Click to collapse
f41lbl0g said:
From what I see it can not be customized through the flasher (may be possible by editing values in the zip). In case you were wondering the size of the partitions, they are 96.7gb for the common storage and 62.4gb each for the individual storages.
Click to expand...
Click to collapse
It's automated by installer. If you have a 128gb device:
32gb for each userdata slot, commondata gets what's left
256gb device:
Everything's doubled from above
Thank you for this work I have screwed up all of my partitions on my Oneplus and could use a pointer on how to restore all of the correct partitions... :-0
I must have screwed up one of the commands on restoring my original partitions here is what I have now
C:\Users\The Family>adb shell
OnePlus7Pro:/ # sgdisk /dev/block/sda --print
Creating new GPT entries.
Disk /dev/block/sda: 61409280 sectors, 234.3 GiB
Logical sector size: 4096 bytes
Disk identifier (GUID): B0281E2A-8376-4F4B-98C6-BF5221AD8A20
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 61409274
Partitions will be aligned on 256-sector boundaries
Total free space is 61409269 sectors (234.3 GiB)
Number Start (sector) End (sector) Size Code Name
OnePlus7Pro:/ #
What commands do I need to fix this. I can still get into adb shell
edit: msmtool cannot restore from this because the partitions are not correct from the way it looks when I try it. when in recovery touch does not work.
eyespunker said:
Thank you for this work I have screwed up all of my partitions on my Oneplus and could use a pointer on how to restore all of the correct partitions... :-0
I must have screwed up one of the commands on restoring my original partitions here is what I have now
C:\Users\The Family>adb shell
OnePlus7Pro:/ # sgdisk /dev/block/sda --print
Creating new GPT entries.
Disk /dev/block/sda: 61409280 sectors, 234.3 GiB
Logical sector size: 4096 bytes
Disk identifier (GUID): B0281E2A-8376-4F4B-98C6-BF5221AD8A20
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 61409274
Partitions will be aligned on 256-sector boundaries
Total free space is 61409269 sectors (234.3 GiB)
Number Start (sector) End (sector) Size Code Name
OnePlus7Pro:/ #
What commands do I need to fix this. I can still get into adb shell
edit: msmtool cannot restore from this because the partitions are not correct from the way it looks when I try it. when in recovery touch does not work.
Click to expand...
Click to collapse
I have the steps outlined here: https://github.com/Zackptg5/TWRP-DualBoot-Guac-Unified/#how-to-manually-repartition-back-to-stock
But what did you do? It looks like you formatted all of /dev/block/sda which is essentially a brick. You are able to restore that with msmtool btw but there will still be some device specific data that is lost and you'll likely need to file warranty claim
Zackptg5 said:
I have the steps outlined here: https://github.com/Zackptg5/TWRP-DualBoot-Guac-Unified/#how-to-manually-repartition-back-to-stock
But what did you do? It looks like you formatted all of /dev/block/sda which is essentially a brick. You are able to restore that with msmtool btw but there will still be some device specific data that is lost and you'll likely need to file warranty claim
Click to expand...
Click to collapse
It was this step that I really messed up
Final step is to format the new userdata partition: mke2fs -t ext4 -b 4096 /dev/block/sda$userdata_num $userdata_size - where userdata_size can be calculated with this shell command: sgdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}'
with this step I used the result from sgdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}' I do not remember the value into the spot where userdata_size was
It looks like have been able to flash partitions manually in fastboot but the two partitions that are no longer recognized are the system_a and system_b the reason I say that is because vendor and boot flash fine on both a and b partitions. and when I send the commands to flash system a or b the reply is partition not found?! I am not sure if it would fix my problem but if I could get help to restore system partitions maybe I can get this thing to boot up.
eyespunker said:
It was this step that I really messed up
Final step is to format the new userdata partition: mke2fs -t ext4 -b 4096 /dev/block/sda$userdata_num $userdata_size - where userdata_size can be calculated with this shell command: sgdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}'
with this step I used the result from sgdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}' I do not remember the value into the spot where userdata_size was
It looks like have been able to flash partitions manually in fastboot but the two partitions that are no longer recognized are the system_a and system_b the reason I say that is because vendor and boot flash fine on both a and b partitions. I am not sure if it would fix my problem but if I could get help to restore system partitions maybe I can get this thing to boot up.
Click to expand...
Click to collapse
The formatting steps is how I initially bricked my phone when I was figuring this stuff out - I since fixed that issue and made sure it'd never happen again in the zip :/
Why were you manually restoring? Did the zip cut off with partition error?
You'll need to use msmtool in this case. Even if your partition block is completely toast, it's able to bring it all back. You can grab the latest one from here: https://androidfilehost.com/?w=files&flid=296306
And here's the guide for it: https://forum.xda-developers.com/oneplus-7-pro/how-to/msm-tool-guac-t3934691
Zackptg5 said:
The formatting steps is how I initially bricked my phone when I was figuring this stuff out - I since fixed that issue and made sure it'd never happen again in the zip :/
Why were you manually restoring? Did the zip cut off with partition error?
You'll need to use msmtool in this case. Even if your partition block is completely toast, it's able to bring it all back. You can grab the latest one from here: https://androidfilehost.com/?w=files&flid=296306
And here's the guide for it: https://forum.xda-developers.com/oneplus-7-pro/how-to/msm-tool-guac-t3934691
Click to expand...
Click to collapse
When I run the latest 10.4 global I get "device does not match image" and then under status I loose connection. I have also tried the 10.31 file with no luck either.
eyespunker said:
When I run the latest 10.4 global I get "device does not match image" and then under status I loose connection. I have also tried the 10.31 file with no luck either.
Click to expand...
Click to collapse
In msmtool? Do you have the right variant?
Latest global: https://androidfilehost.com/?fid=4349826312261732245
Latest europe: https://androidfilehost.com/?fid=4349826312261732244
Download mode is really tricky too. It times out after several seconds so you pretty much have to keep holding down the key combo until msmtool picks it up and then you can release them
Zackptg5 said:
In msmtool? Do you have the right variant?
Latest global: https://androidfilehost.com/?fid=4349826312261732245
Latest europe: https://androidfilehost.com/?fid=4349826312261732244
Download mode is really tricky too. It times out after several seconds so you pretty much have to keep holding down the key combo until msmtool picks it up and then you can release them
Click to expand...
Click to collapse
I have now tried the latest two and have come up with the same results on the update when the device param load the result of the last communication is device does not match image.
eyespunker said:
I have now tried the latest two and have come up with the same results on the update when the device param load the result of the last communication is device does not match image.
Click to expand...
Click to collapse
Sounds like you may need to file a warranty claim then :/

[RECOVERY][DUALBOOT][Unified][A10][A11][OOS11]Orangefox-DualBoot-Unified-Reborn[21-03-2021]

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Orangefox-DualBoot-Guac-Unified - Android 10/11 version
THANKS TO:
- Zackptg5 - The father of this mod
- DrakePL (Orangefox Recovery)
- Ae3NerdGod, Neel P, Whismasterflo
- Muphetz, Varun Soma, Pranav - for testing
#include <std_disclaimer.h>
/*
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
Click to expand...
Click to collapse
Modified recovery and installer script for all OP7/Pro/5G variants that re-purposes userdata for true dual booting. You can still use this as a regular stock twrp zip - one stop shop for magisk, verity, and/or forced encryption modifications
Disclaimer
I am not responsible for anything bad that happens to your device. Only experienced users should be using this mod
This is no walk in the park mod. Although I have extensively tested it, there is always the possibility of a brick with anything that involves repartitioning. Make sure you have a backup and know how to reparititon your phone back to stock (there's a guide at the end of this readme with the basics)
YOU'VE BEEN WARNED - Use at your own risk
Click to expand...
Click to collapse
Limitations
If you set a password, regardless of encryption status, it'll corrupt the other slot if it's also password protected.
Note that some roms set one automatically Either don't use a password on one slot, or leave one slot (I'll use 'a' in this example) unencrypted and:
Setup rom, password, and everything on slot a
Boot back into twrp, choose common data as storage, and backup userdata (if not using a/b/c layout, backup TWRP folder to your computer)
Setup rom, password, and everything on the other slot (b)
Boot back into twrp, switch back to slot a (reboot back into twrp), and restore the twrp backup
If you messed this up and are unencrypted - delete these files in /data/system if present: locksettings.db gatekeeper.password.key password.key gatekeeper.pattern.key pattern.key gatekeeper.gesture.key gesture.key
If you messed this up and are encrypted - you lost the data on that slot:
Unmount metadata in twrp gui
Format metadata with this command:
Code:
mke2fs -t ext4 -b 4096 /dev/block/sda$metadata_partnum
where metadata_partnum is the partition number of the current metadata partition (you can find this with sgdisk /dev/block/sda --print). DO NOT FORGET THE PARTITION NUMBER. If you do, you'll format all of sda which results in a brick
Reboot into twrp and format data in gui
Storage settings only supports 128 and 256gb userdata partitions
Just a cosmetic issue as it'll say that system is taking up the difference
Some other features/notes
Can choose between stock layout, a/b userdata, or a/b/c userdata where 'c' is a common data partition that'll show up in both roms - it's quite handy
Option to choose between ext4 and f2fs
Disables verity - fstabs are modified for dual boot and so this is a must unless you choose stock layout in which case it's optional
Option to disable forced encryption
Option to install magisk
Quickmode for faster rom testing
Failsafe to keep from changing slots automatically when used in conjunction with rom install
Common Data
If you choose a/b/c layout - you'll have a/b userdata, but you'll also get a 3rd userdata partition I call 'Common Data'
The name 'Common Data' gives away its purpose - to store files that you'll access on both slots/roms. So stuff like zips, pictures, music, TWRP backups, etc.
In TWRP, this shows up as another storage option for backup/restore and on your pc as well - your phone will have 'Common Storage' and 'Internal Storage'
In order to be accessible when booted, some parts of the system are modified so that the it'll be accessible WITHOUT root by the following mechanisms:
​
The common data partition is mounted to /sdcard/CommonData
.nomedia file is placed in CommonData so files in it won't be picked up twice if you decide to mount over internal storage as outlined below
Furthermore, if your use case is like mine where my music files are in common data, you can make 'mounts.txt' file in /datacommon containing a list of every FOLDER to mount directly over top of sdcard. So for example:
/datacommon/Music -> /sdcard/Music
This of course mounts over anything there (overwrites it for as long as it's mounted) so make sure that you don't have the same folder in both datacommon and regular data
Note that there are 3 exceptions to this folder mounting rule:
All - if this is the FIRST line, ALL folders in datacommon will be mounted
Android
lost+found
The reasoning should be obvious - lost+found isn't something you should need to mess with and Android is for regular data partition only - that's OS specific and should be on separate slots
Note that you should have 1 folder listed on every line, for example:
PHP:
Music
Pictures
ViPER4AndroidFX
Flashing Instructions (if Android 11, see second post)
You MUST be booted into TWRP already when flashing this zip (you can grab a bootable twrp image from here)
Since this modifies data - the zip CANNOT be on sdcard or data at all UNLESS you do not want to repartition/format
If you flash from data, the zip will copy itself to /tmp and instruct you to flash it from there OR you can just install twrp/magisk/disver-fec
You could do the above or copy it to a place like /dev or /tmp and flash it from there
Alternatively, you can adb sideload it
Read through ALL the prompts - there's lots of options
How to Flash Roms
Nothing changes here except ONLY FLASH IN TWRP
Roms always flash to the opposite slot. Keep that in mind and you'll be fine
So don't take an OTA while booted - boot into twrp, switch slots, reboot into twrp, flash rom
Normal flash procedure:
Boot into twrp
reboot into twrp selecting slot you do NOT want rom installed to
Flash rom
Flash this zip
Reboot into twrp
When using failsafe mode,
TWRP will boot into the slot you were in BEFORE you flashed the rom.
TWRP will almost certainly show the incorrect "current slot" at the reboot menu.
The slot selection buttons still work. If youve kept track in youre head, and the zip didnt fail; pick the correct slot now
or reboot to recovery, then switch into the slot which contains the new rom youve just installed
Flash everything else
Quickmode usage NOT RESPONSIBLE FOR BUGS, BRICKS OR MISTAKES! USE AT OWN RISK!
Change the zip name to enable quickmode options (Case Sensitive!)
keeps current layout
add the words fast or quick in the zip file to enable quickmode with the following default options:
ForceEncryption disabled for both slot
s​
Magisk installed to both slots
add any of the following options to the name of the zipfile to custimize quickmode to your liking, capitilizing the letter of the slot youd like to enable that option for:
fec.ab will ENABLE force encrytion for the capitalized slot letter
su.ab or magisk.ab will ENABLE the installation of magisk for the capitalized slot letter
Example: if the file is named Orangefox-DualBoot-fast-fec.AB-su.aB.zip then:
ForceEncryption will be ENABLED on both slot _a and slot _b
Magisk will be installed on slot _b, but NOT installed on slot _a
ADVANCED USERS ONLY NOT RESPONSIBLE FOR BUGS, BRICKS OR MISTAKES! USE AT OWN RISK!
confirm.y will skip the final confirmation before any work is done, and run the options chosen or defaults if none specified
the word warp this can be used instead of fast or quick and confirm.y if you'd also like to use quickmode without confirmation
Failsafe usage / explaination
I've had a few instances where a rom doesnt agree with whats going on, and the dualboot zip gets stuck on a slot and never finishes. This results in forcing the phone off, and leaves the phone in a non bootable state, with an unprepared slot. Not to mention a stock, or worse, no recovery at all. Bootloop city.
Enter the failsafe option: just add ` nofail ` or ` failsafe ` (case sensitive) to the zip name like above, and the zip will revert the slot change caused by the rom install and keep you able to boot back into the current slot's TWRP so you can sort out the slot youre working on. Pair this with a usb drive or commondata, and youre (relatively) safe to flash on the go, or from your bed with the computer off.
Notes
After applying the failsafe, the reboot screen in TWRP will ALMOST CERTANLY show the incorrect slot until you either manually select a slot or reboot recovery.
This adds a step or two to the flashing process, make sure you've read that.
[/QUOTE]
Help! I Can't Boot!
Usually this is because you switched roms without formatting data first. This should be flashing 101 but we all forget sometimes. Plus this slot stuff can get confusing
If it only happens with a/b/c and not any other layout, there's a good chance it's selinux related. Try setting selinux to permissive at kernel level with this mod (source here).
Click to expand...
Click to collapse
How to Manually Repartition Back to Stock
In the event any step in the repartioning fails, the entire installer aborts. The good news is that this prevents a potential brick. The bad is that you need to manually revert back
Boot into twrp. If sgdisk is not present in sbin, grab it from this zip (in tools) and adb push it to /sbin and chmod +x it
sgdisk /dev/block/sda --print Note that /dev/block/sda is the block that userdata and metadata are stored on - no other block is touched by this mod. This will show up the current partition scheme. Stock looks something like this (on OP7 Pro):
PHP:
Number Start (sector) End (sector) Size Code Name
1 6 7 8.0 KiB FFFF ssd
2 8 8199 32.0 MiB FFFF persist
3 8200 8455 1024.0 KiB FFFF misc
4 8456 8711 1024.0 KiB FFFF param
5 8712 8839 512.0 KiB FFFF keystore
6 8840 8967 512.0 KiB FFFF frp
7 8968 74503 256.0 MiB FFFF op2
8 74504 77063 10.0 MiB FFFF oem_dycnvbk
9 77064 79623 10.0 MiB FFFF oem_stanvbk
10 79624 79879 1024.0 KiB FFFF mdm_oem_dycnvbk
11 79880 80135 1024.0 KiB FFFF mdm_oem_stanvbk
12 80136 80263 512.0 KiB FFFF config
13 80264 969095 3.4 GiB FFFF system_a
14 969096 1857927 3.4 GiB FFFF system_b
15 1857928 1883527 100.0 MiB FFFF odm_a
16 1883528 1909127 100.0 MiB FFFF odm_b
17 1909128 1913223 16.0 MiB FFFF metadata
18 1913224 1945991 128.0 MiB FFFF rawdump
19 1945992 61409274 226.8 GiB FFFF userdata
You may have different size userdata - mine is 256gb - depending on your device but that doesn't matter. You just need to see where they're located
Take note of the number (I'll call userdata_num for the sake of this tutorial) and start sector (userdata_start) for the first partition AFTER rawdump, and the end sector (userdata_end) of the last parititon on sda
sgdisk /dev/block/sda --change-name=17:metadata - renames metadata partition back to non-ab stock
sgdisk /dev/block/sda --delete=19 - this deletes the entire partition - use this command for each user/metadata partition after rawdump (ones generated by this zip)
sgdisk /dev/block/sda --new=$userdata_num:$userdata_start:$userdata_end --change-name=$userdata_num:userdata - this creates the new userdata partition
Final step is to format the new userdata partition: mke2fs -t ext4 -b 4096 /dev/block/sda$userdata_num $userdata_size - where userdata_size can be calculated with this shell command: sgdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}'
​
MAKE SURE YOU VERIFY ALL VARIABLES HERE ARE SET PROPERLY - if you mess this up, you could format all of sda resulting in a brick
Run sgdisk /dev/block/sda --print again to make sure everything is correct and then reboot back into twrp
Changelog
Click to expand...
Click to collapse
21/03/2021 - V1.8
Updated companion app to 2.8.7
05/03/2021 - V1.6
Updated init.mount_datacommon.sh to support the application sharing
Updated the dual boot companion app V2.6 BETA
Added mounting inactive system to sdcard/DualBoot/
Added mounting inactive SDcard to sdcard/DualBoot/
EXPERIMENTAL - Added application sharing between ROMs (Only A/B/C Layout)
Localizations update
Minor bugfix here and there.
13/02/2021- V1.5
Updated the dual boot companion app V1.7.2
Updated Orangefox recovery to latest git
06/02/2021- V1.3
Updated the dual boot companion app
Fixed the Orangefox full screen bug on OP7 pro
05/02/2021- V1.1
Added the dual boot companion app
Fixed the OOS11 flashing bug
20/01/2021- V1.0
It works with OxygenOS 11 ( WARNING: --- Stay unencrypted! --)
Magisk 21.4 updated
New version of Orangefox recovery (R11) - 20-01-2021 update
Know bug: Flashing from OOS11 slot can overwrite the same slot.
19/11/2020 - A11-0.4
Fixed root install for Android 11
Minor improvement
21/10/2020 - A11-0.4
Root not installed if Android 11 - Please do it manually.
CommonData mount fix in Android 11
Minor improvement
Android 11: please install Magisk 20422 and MagiskManager 297
16/10/2020 - A11-0.2
Changed to OrangeFox Recovery
Added check to get the right initrc (Android 11 compliant)
16/10/2020 - A11-0.1
Initial release
Click to expand...
Click to collapse
Download
Orangefox-DualBoot-Guac-Unified-A11-V1.8
GitHub
https://github.com/Invernomut0/OrangeFox-DualBoot-Guac-Unified
Telegram support chat: https://t.me/OrangeFoxDualBootRebornOnePlus7
XDA:DevDB Information
Orangefox-DualBoot-Unified, Tool/Utility for the OnePlus 7
Contributors
invernomut0
if you like my work, send me a beer
Click to expand...
Click to collapse
DUALBOOT COMPANION APP
FLASH PROCEDURE - Android 11
Related to Orangefox-DualBoot-Guac-Unified-A11.zip
WARNING: OOS11 --- Stay unencrypted! ---
Example (starting point)
Slot A A10 Rom
Slot B A10 Rom
1 - Flash from slot A A11/OOS11 rom
2 - Flash Orangefox-DualBoot-Guac-Unified-A11.zip
3 - Reboot to recovery (Now you are in slot B automatically)
4 - Format data
5 - Flash Orangefox-DualBoot-Guac-Unified-A11.zip
7 - Reboot to system
Install magisk manager attached
Ending point
Slot A A10 rom
Slot B A11/OOS11 rom
Now you should have a working A10 rom on slot A and a working A11/OOS11 rom on slot B.
Please report any problems.
Reserved
I am on oos a10, rooted, twrp and encrypted... Can i use this for dual boot oos a10 with some custom a11 without having to decrypt/data loss???
kpmohamedhussain said:
I am on oos a10, rooted, twrp and encrypted... Can i use this for dual boot oos a10 with some custom a11 without having to decrypt/data loss???
Click to expand...
Click to collapse
Hi. All your data will be wiped and you have to reinstall both slots OS since this is repartitioning your userdata into A and B so do a Backup of all your data before.
It works great with A10 and A11. I had a little issue because I had A10 on A and B slot and when flashed this, then A11 ROM, rebooted to other slot flashed this again A11 was working great, but when tried to switch back to the slot with A10, after boot my pin wouldn't work anymore, so needed to delete locksettings.* an *.key files from /data/system.
Thanks for the great job!
vladvlad12 said:
It works great with A10 and A11. I had a little issue because I had A10 on A and B slot and when flashed this, then A11 ROM, rebooted to other slot flashed this again A11 was working great, but when tried to switch back to the slot with A10, after boot my pin wouldn't work anymore, so needed to delete locksettings.* an *.key files from /data/system.
Thanks for the great job!
Click to expand...
Click to collapse
Only set a PIN on one of the slots. Otherwise you will have that issue that your PIN does not work anymore on the other slot if you set it on both!!
Does anyone have OOS Open Beta 17 or 18 working with this recovery?
ImamBukhari said:
Does anyone have OOS Open Beta 17 or 18 working with this recovery?
Click to expand...
Click to collapse
I will try it for you, be back in like 10 minutes with edit.
Back, is not working. It stuck at patching fstabs.
vladvlad12 said:
I will try it for you, be back in like 10 minutes with edit.
Back, is not working. It stuck at patching fstabs.
Click to expand...
Click to collapse
Take a look at the recovery.log in /tmp then to check while it is getting stuck.
Wishmasterflo said:
Take a look at the recovery.log in /tmp then to check while it is getting stuck.
Click to expand...
Click to collapse
Ok, just give me a minute, already installed another ROM, will try to give info u asked in a few minutes. Someone told me when i tried to do same with twrp dual boot that twrp can't yet decrypt OOS Beta 17 and 18
IDK what happened but now my touchscrren is not working...
After stuck at patching I rebooted into fastboot changed active slot to other slot, rebooted into recovery, it enter in OrangeFox Recovery but no touch...
Got a bit scared there... Rebooted to system then back to recovery and touch is working now...
But there is no /tmp folder...
vladvlad12 said:
I will try it for you, be back in like 10 minutes with edit.
Back, is not working. It stuck at patching fstabs.
Click to expand...
Click to collapse
Could you please also provide the postition of init.rc. look at /init.rc and check if the file exists.
invernomut0 said:
Could you please also provide the postition of init.rc. look at /init.rc and check if the file exists.
Click to expand...
Click to collapse
Dualboot still no work with oos beta 17 and 18,,its always stuck when patching fstab ( decrypt).
There's init process called High Assurance Boot (HAB) that verify your system's integrity. Check the script "/vendor/etc/init/hw/init.mmi.hab.rc".
This command show many values, which one to pick.
gdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}'
edit: typo, worked fine now...
Tried it with Beta 19 and doesn't work with that either
Download link not working - Magisk 20422 and MagiskManager 297
ImamBukhari said:
Tried it with Beta 19 and doesn't work with that either
Click to expand...
Click to collapse
Do you have OP7 or OP7 pro/T?
invernomut0 said:
Do you have OP7 or OP7 pro/T?
Click to expand...
Click to collapse
I'm using a 7 Pro
kpmohamedhussain said:
Download link not working - Magisk 20422 and MagiskManager 297
Click to expand...
Click to collapse
Files restored
Works great, tested with multiple ROMs...
Having below issues
1. Even if pin not setup in secondary ROM, need to delete files otherwise pin in primary is not accepted
2. After every flash of this recovery, all my magisk settings, modules are all lost
3. Images and videos in common data not visible in gallery

Categories

Resources