[HOW-TO] Have it all - Enomther's 1.5/6.1+Himem+Apps2SD - Nexus One Q&A, Help & Troubleshooting

Tools you'll need:
1. Rooted Nexus
2. sdcard with 2 primary partitions 1. fat32 2. ext2/3 (I did 500mb)---class 6 card highly recommended
3.Enomther's 1.6.1 found here or Enomther's 1.5.1 found here (placed at root of sdcard)
4. Himem 1.6.1 kernel update found here or Himem 1.51 kernel update found here (placed at root of sdcard)
5. Titanium backup (available in the Market...donation key recommended)
6. Be open to frustration (and possibly, but not likely, damage your device) and not hold me responsible!
Steps to take:
If you are already running EM1.5/6.1 WITHOUT the memory kernel hack, you should be able to skip the titanium and wipe part, and skip straight to step #5, however...MAKE SURE YOU NANDROID!!! first.
1. Backup!! (nandroid <most important>/Titanium <recommend donation key, as I don't know free functionality)
2. Wipe
3. Flash 1.5.1 or 1.6.1 (or reflash if already running with himem)
4. Reboot WITHOUT enabling Google backup
5. Lucid in adb shell or terminal emulator (dalvik2sd <lucid -dc -a> optional)
Code:
su
lucid -a -sd
lucid -dc -sd
reboot
6. After full boot, reboot to recovery console
8. Once in recovery, flash Himem, reboot again
7. Install Titanium app from the market
8. Restore Titanium backup made in step 1 (in batch>all apps+data option)
9. Reboot one final time
11. Check everything worked by typing "free" in terminal and verify internal storage in settings (mine says 395332 total memory and 174 free internal memory)
12. <optional> Flash/apply theme or morph
EDIT: Beware!!! This is my 666th post!!!

The basic scenario is to set up apps2sd before flashing the himem kernel...I was getting bootloops performing it any other way than this. Your results may vary.
If you get bootloops and skipped anything, you may need to perform complete process.
Also, if in bootloop (stuck at the X splash screen),
Code:
adb shell reboot recovery
saves having to pull the battery.

Little more info needed for the android newbies out there, e.g. ext partition ect
but overall nice how to, and thanks for the info ill giv it whirl soon

After flashing the highmem it got's stuck at the X splash screen.

lolittle said:
Little more info needed for the android newbies out there, e.g. ext partition ect
but overall nice how to, and thanks for the info ill giv it whirl soon
Click to expand...
Click to collapse
Ahh, yes...sdcard partitions...Post #1 updated. Good looking out.
Breakthecycle2 said:
After flashing the highmem it got's stuck at the X splash screen.
Click to expand...
Click to collapse
Happened to me a couple times in my experiments. Make sure you are not skipping any steps and are not using a different/older copy of the himem...download a fresh copy from the link in the OP as the file has changed in the last few days.
While stuck at the X splash screen (A.K.A. bootloop) do this.
Code:
adb shell reboot recovery
start over from step #2 above.
2. wipe
3. flash 1.5.1...etc.

What is the command to reverse the davlik back to the phone memory?
What wouyld the command be in adb to check if apps2sd and davlik2sd or vice versa actually worked correctly before preceding?

Should be
Code:
su
lucid -dc -g1
reboot
Mikey1022 said:
What is the command to reverse the davlik back to the phone memory?
What wouyld the command be in adb to check if apps2sd and davlik2sd or vice versa actually worked correctly before preceding?
Click to expand...
Click to collapse

Code:
# lucid -a -sd
lucid -a -sd
Nothing was done. /system/sd/app is FOLDER.
Please rm -r /system/sd/app first.
Nothing was done. /system/sd/app-private is FOLDER.
Please rm -r /system/sd/app-private first.
Hmmm doesnt seem like it quit worked out lol
Did what it suggested for mt to remove the two folders and reapplied, worked.
lucid -s confirmed it

Mikey1022 said:
Code:
# lucid -a -sd
lucid -a -sd
Nothing was done. /system/sd/app is FOLDER.
Please rm -r /system/sd/app first.
Nothing was done. /system/sd/app-private is FOLDER.
Please rm -r /system/sd/app-private first.
Hmmm doesnt seem like it quit worked out lol
Did what it suggested for mt to remove the two folders and reapplied, worked.
lucid -s confirmed it
Click to expand...
Click to collapse
So, you got it working?
If not:
Code:
su
lucid -c
will clear your ext partition of app, app-private and dalvik-cache folders. Then you can run lucid -a -sd without issue. You may have to reboot in between, maybe not.
Oh, and thanks for fixing my quote...posted it while driving.

All good now

Related

[SOLVED]I can't root RC29

Okay I've been trying to figure this out for 4 and a half hours now, I've downgraded from cupcake to RC29 and now I'm trying to root it, I've tried using this guide - http://forum.xda-developers.com/showthread.php?t=442480
But when I get to here -
"What To Do Now That You Have Root
Now that you have root, you will want to apply "Hard SPL" to your phone. HardSPL is what will allow you to apply flash images from other regions (like UK on US phones, and vice versa), create full backups of your phone, install the latest build from the Android source, and usually resurrect your phone if it is "bricked". You have already downloaded the file to your SD card, so now you can apply it.
1. Power off your phone.
2. Start up in recovery mode by holding home and pressing power.
3. You will now enter recovery mode. You should see an exclamation.
4. If you do not see a menu on screen, press Alt-L to show the menu.
5. Press Alt-S to apply the update from the SD card.
6. After the update is complete, hold Home and press Back to restart.
"
I go into recovery mode but all I see are lines and I try alt-f and alt-s but nothing happens.
Then I tried this guide - http://android-dls.com/wiki/index.php?title=Quick_Root
I get stuck here -
"# In the terminal you opened earlier (with root access) Enter the following commands in to flash the modified recovery
* mount -o remount,rw /dev/block/mtdblock3 /system
* rm -f /system/recovery.img
* flash_image recovery /sdcard/recovery_testkeys.img
"
When I type the second line of commands it says not found or something similar so I'm pretty much stuck and can't figure out how to root RC29, I would really appreciate your help.
Sounds like you didn't flash the recovery image... Are you sure you placed it on your phone and followed the instructions to flash it? the flash_image recovery recovery.img command. Anyways, I have to run to work, I"ll help you more when I get back if you haven't figured it out by then. good luck.
http://www.youtube.com/watch?v=GgJ2VtSqtJY&feature=channel
this viedo help me with my rooting since i learn better thru visual =)
this is part 1 of 3. this dudes videos helped me from stock to root. to another cupcake rom. to jachero rom. it toook me like abt a day to do everything. but then after that it shouldnt take long to start uploading various roms =)
Knightsofwar210 said:
Okay I've been trying to figure this out for 4 and a half hours now, I've downgraded from cupcake to RC29 and now I'm trying to root it, I've tried using this guide - http://forum.xda-developers.com/showthread.php?t=442480
But when I get to here -
"What To Do Now That You Have Root
Now that you have root, you will want to apply "Hard SPL" to your phone. HardSPL is what will allow you to apply flash images from other regions (like UK on US phones, and vice versa), create full backups of your phone, install the latest build from the Android source, and usually resurrect your phone if it is "bricked". You have already downloaded the file to your SD card, so now you can apply it.
1. Power off your phone.
2. Start up in recovery mode by holding home and pressing power.
3. You will now enter recovery mode. You should see an exclamation.
4. If you do not see a menu on screen, press Alt-L to show the menu.
5. Press Alt-S to apply the update from the SD card.
6. After the update is complete, hold Home and press Back to restart.
"
I go into recovery mode but all I see are lines and I try alt-f and alt-s but nothing happens.
Then I tried this guide - http://android-dls.com/wiki/index.php?title=Quick_Root
I get stuck here -
"# In the terminal you opened earlier (with root access) Enter the following commands in to flash the modified recovery
* mount -o remount,rw /dev/block/mtdblock3 /system
* rm -f /system/recovery.img
* flash_image recovery /sdcard/recovery_testkeys.img
"
When I type the second line of commands it says not found or something similar so I'm pretty much stuck and can't figure out how to root RC29, I would really appreciate your help.
Click to expand...
Click to collapse
Well I've had my Original (incorrect radio flash method), 1st Warranty replacement (keyboard too lose for my liking), 2nd Warranty replacement (sending back due to 'ASDF' keys stick), all flashed in past 2 weeks. I've almost memorized the stupid commands. The "flash_image recovery /sdcard/recovery_testkeys.img" had me puzzled on this one. But I've figured it out as the short method vs changing directory.
I think your issue is the last part of copying the recovery image to the phone. I've always used the following:
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cd sdcard
# flash_image recovery recovery.img
# cat recovery.img > /system/recovery.img
seems Like you're instructions kind of combine the 3rd and 4th and skips the cat command, so i have no ideal how yours is getting the file to the actual phone. I may be wrong, but just looks half done. It may be as simple as copying the image to the /system path with the 'cat' command. Good luck with it tho.
Link: http://forum.xda-developers.com/showthread.php?t=442480
It just won't copy that img file, because I still get the old color boot menu. Nothing I do works.
Oh and I read somewhere I have to upgrade to the latest radio too, where do I get it and install it?
I finally got it to work I was pushing power and camera instead of power and home.
Where do I download the latest rooted build?
Knightsofwar210 said:
I finally got it to work I was pushing power and camera instead of power and home.
Where do I download the latest rooted build?
Click to expand...
Click to collapse
Well, that's your choice
JF 1.51 is just a plain cupcake rom with root
Haykuro's 6.0 sapphire port is very nice, like JF 1.5 but with HTC Dialer, Camera ect
Cyanogen's build is like JF but more heavily modded, has auto Apps2SD and a few other modifications.
Then there's the Hero builds if you want to be adventurous.
Just have a look in the development section and see which best suits your needs
Be aware the Haykuro's ports, Rogers and Hero all require haykuro's SPL (which needs the new radio or you will brick).
Okay well I downloaded Cyanogen's build, so what are the features and how to use them?
Just read through the thread. Most are automatic optimization mods (CPU scaling, audio mods) which just make for a nicer experience. There are also others like the HTC Camera app which is a vast improvement over the stock camera app. APPS2SD is also atomatic so all you need is a second partition on your card formatted to ext3, so you will have much more room for market apps.
* Based on AOSP 1.5r2, various collected patches, and some help from JF-1.51-ADP
* Enhanced ramdisk which uses optimal mount options and smart startup
* Includes E2FSProgs for checking and converting Ext filesystems
* Apps2SD is automatic! All you need is a second partition (ext).
* Includes script to upgrade to ext3 (from recovery mode, see FAQ)
* Supports ext2/ext3/ext4 for Apps2SD
* Includes HTC Framework and various applications
* Includes latest HTC_IME with long-press, calibration, and compact QWERTY.
* Launcher with 5 screens and auto-orientation and compact drawer layout
* Sexy pattern-lock from Sapphire and Stericson's lock screen
* Clean filesystem shutdown at poweroff/reboot, and fsck at boot (no FS corruption!)
* Includes T-Mobile IM application, Amazon MP3 (with Stericson's hack), and updated Google Maps
* Does not require "DangerSPL"
* Highly optimized kernel with many extra modules
* Includes Haykuro's APN list
* Tweaked frequency scaling options to be more responsive
* Maximum CPU scaling frequency set to 528MHz (3.3)
* Various enhancements to the Settings app including extra partition space
* Runs /system/sd/userinit.sh after A2SD setup and before starting the runtime for user scripts
* Microsoft Exchange support (Work Email from myTouch)
* Includes Compcache modules
* Linux cgroups for better app prioritization
Click to expand...
Click to collapse
Knightsofwar210 said:
Okay well I downloaded Cyanogen's build, so what are the features and how to use them?
Click to expand...
Click to collapse
Most of Cyan's features are under the hood. It boosts your CPU speed from 384mHz to 528mHz
You can also use a swap partition to speed it up even more (like a paging file/ram)
http://forum.xda-developers.com/showthread.php?t=531988
You will have to partition your SD card with a swap extension to do this. If you create another partition as an ext2, ext3, ext4 partition, Cyan has a script that will automatically put your apps on the SDcard
If you want the above, you will have to format like this
fat32, ext, linux-swap
inthat order
there are threads that will help you with partitioning
http://forum.xda-developers.com/showthread.php?t=534714
^ very useful for me. Requires cyans recovery
note the ext partition shouldnt be larger than 1.5gb and the swap partition shouldnt be larger than 32 mb (24mb recommended, but im to lazy to repartition mine)
note swap will reduce the life of the sd card (though you will have probably moved on by that time)
Also try out the HTC apps that it comes with, such as the camera and keyboard (keyboard can be used by long pressing on an input area, selecting input method and chosing "Touch Input")
You can also install HTC's Music app from here
http://forum.xda-developers.com/showthread.php?t=530572
Thats all i can think of other than themes. Tehre are others i intentionally left out that you can find yourself after you get more experience with everything
How do I partition my 8GB Micro SDHC with one that is 500mb and is ext3? Thanks.
EDIT - Saw your post above.
B-man007 said:
Most of Cyan's features are under the hood. It boosts your CPU speed from 384mHz to 528mHz
You can also use a swap partition to speed it up even more (like a paging file/ram)
http://forum.xda-developers.com/showthread.php?t=531988
You will have to partition your SD card with a swap extension to do this. If you create another partition as an ext2, ext3, ext4 partition, Cyan has a script that will automatically put your apps on the SDcard
If you want the above, you will have to format like this
fat32, ext, linux-swap
inthat order
there are threads that will help you with partitioning
http://forum.xda-developers.com/showthread.php?t=534714
^ very useful for me. Requires cyans recovery
note the ext partition shouldnt be larger than 1.5gb and the swap partition shouldnt be larger than 32 mb (24mb recommended, but im to lazy to repartition mine)
note swap will reduce the life of the sd card (though you will have probably moved on by that time)
Also try out the HTC apps that it comes with, such as the camera and keyboard (keyboard can be used by long pressing on an input area, selecting input method and chosing "Touch Input")
You can also install HTC's Music app from here
http://forum.xda-developers.com/showthread.php?t=530572
Thats all i can think of other than themes. Tehre are others i intentionally left out that you can find yourself after you get more experience with everything
Click to expand...
Click to collapse
Experience? Ha, this is just like custom firmware for the Playstation Portable. Custom firmware is the equivalent of a rooted build so I do have experience with this type of thing.
I'm stuck at the very last step - http://forum.xda-developers.com/showthread.php?t=534714
At the bottom it says - "part iv - copy rom to sdcard and install, enable swap:
after phone reboots...drop to console
in your win cmd prompt, enter:
adb shell mount /sdcard
adb push /update-path/update.zip /sdcard
on g1 console, enter:
recovery
wipe data (alt + w) <--this one is optional, but i like fresh installs
install rom (alt + s)
to enable swap, see this page!"
http://forum.xda-developers.com/showthread.php?t=531988
but when I try to do this - "2. in terminal or adb shell type:
don't type things in ().
Code:
$su (terminal only)
#mv /sdcard/userinit.sh /system/sd/
#chmod 775 /system/sd/userinit.sh
#sh /system/sd/userinit.sh
"
When I enter the first command "mv /sdcard/userinit.sh /system/sd/" it says file or directly not found.
I want to use this theme too but I'm not sure if it's compatable with my current build model and I'm not sure how to install it.
http://forum.xda-developers.com/showthread.php?t=475917
Knightsofwar210 said:
I'm stuck at the very last step - http://forum.xda-developers.com/showthread.php?t=534714
At the bottom it says - "part iv - copy rom to sdcard and install, enable swap:
after phone reboots...drop to console
in your win cmd prompt, enter:
adb shell mount /sdcard
adb push /update-path/update.zip /sdcard
on g1 console, enter:
recovery
wipe data (alt + w) <--this one is optional, but i like fresh installs
install rom (alt + s)
to enable swap, see this page!"
http://forum.xda-developers.com/showthread.php?t=531988
but when I try to do this - "2. in terminal or adb shell type:
don't type things in ().
Code:
$su (terminal only)
#mv /sdcard/userinit.sh /system/sd/
#chmod 775 /system/sd/userinit.sh
#sh /system/sd/userinit.sh
"
When I enter the first command "mv /sdcard/userinit.sh /system/sd/" it says file or directly not found.
Click to expand...
Click to collapse
use "cp" instead of "mv"
note that /system/sd only exists when you have apps2sd (atleast i think? someone correct me if im wrong)
also make sure you unzipped the userinit.sh
What your going through is experience.....this isn't just flashing psp roms xD
Custom firmware flashing is extremely simple on the g1..... this is like going into the ROM and changing things up. The mods im talking about involve lots of terminal and adb commands and you really shouldnt be using them unless you understand what its doing. If you have plenty of experience in linux,then you should be able to find lots of interesting things to do in the development section.
Knightsofwar210 said:
I want to use this theme too but I'm not sure if it's compatable with my current build model and I'm not sure how to install it.
http://forum.xda-developers.com/showthread.php?t=475917
Click to expand...
Click to collapse
Which build did you install? Its compatible with Cyan 3.6.7-2. The latest is Cyan 3.6.8 which released 4 hours ago
B-man007 said:
Which build did you install? Its compatible with Cyan 3.6.7-2. The latest is Cyan 3.6.8 which released 4 hours ago
Click to expand...
Click to collapse
It's compatible with the one I had, I don't have the latest version of Cyan.
I still need help enabling swap because I have done everything including partition but I still need help enabling it thanks.
Knightsofwar210 said:
It's compatible with the one I had, I don't have the latest version of Cyan.
I still need help enabling swap because I have done everything including partition but I still need help enabling it thanks.
Click to expand...
Click to collapse
use "cp" instead of "mv"
note that /system/sd only exists when you have apps2sd (atleast i think? someone correct me if im wrong)
also make sure you unzipped the userinit.sh
Click to expand...
Click to collapse
Did you already set up apps2sd? (basically partition like i told you and boot up cyans rom? to check if you have it enabled, go to
settings > sd and storage and check if you have secondary system storage
where are you getting stuck? i need a little more info on whats happening if the above didnt work
B-man007 said:
Did you already set up apps2sd? (basically partition like i told you and boot up cyans rom? to check if you have it enabled, go to
settings > sd and storage and check if you have secondary system storage
where are you getting stuck? i need a little more info on whats happening if the above didnt work
Click to expand...
Click to collapse
Yes I have cyan running with a new theme I installed, and yes I do have a secondary system storage, I'm stuck here - http://forum.xda-developers.com/showthread.php?t=531988
B-man007 said:
use "cp" instead of "mv"
note that /system/sd only exists when you have apps2sd (atleast i think? someone correct me if im wrong)
also make sure you unzipped the userinit.sh
Click to expand...
Click to collapse
I'll try this.

Preparation b4 flashing between ROMS?

is there a guide anywhere on this or could someone give me a rough guide?
Do I need to format the partitions I made on my SD to run Hero, when flashing to another ROM that uses APPS2SD like Soulife's Rogers? I'm getting untold weird problems with this ROM - syncing etc.
Also, looks like APP2SD might not be working - 45MB free space is this right?
(For the record, all I did was a 'wipe' and then flash - which didn't seem to get rid of most apps)
Thanks!
You need to wipe your ext partition before switching roms.
That will get rid of the apps that stayed.
Hmm.. I digg my double post even though I only clicked once. Thx xda
can you wipe with the 'repair ext filesystems' option in cyanogens bootloader?
didn't seem to work for me. :?
with adb:
adb remount
adb shell
rm -r /system/sd/*
reboot recovery
then flash the update
thanks!
when I do
rm -r /system/sd/*
I get:
cannot remove '/system/sd/*': No such file or directory
So I guess there's nothing there anyway? ... looks like it when I 'ls' the directory anyway... confused as to why my apps keep on showing up after flashing ???
what a minute I adb'd in when it was in bootloader mode would that effect what I see?

Need advice - Fastest Eclair Rom on top of Cyanogen

Hello,
I am currently running Cyanogen Mod 4.2.14.1 on my G1. My additional specs are listed below. I am looking for a fast but stable ROM that I can flash on top of Cyan's Rom without the need to wipe or change my Radio/SPL, etc. I just really don't want to go through losing all my data. Any advise would be greatly appreciated. Thanks!
SD Card: 6 Class Fat32/ext3/Linux-Swap
SPL: HBOOT-0.95.0000
Radio: 2.22.19.26i
Rom: CyanogenMod 4.2.14.1
Recovery: Cyanogen's Recovery 1.4
You can't flash a completely different ROM on top of another. It might cause some un wanted issues.
Suggestion:
Make a backup of your stuff.
Full Wipe
Flash a Different ROM.
Restore your stuff.
Bummer. Welp, Cyan it is then. Don't need a bunch of issues messin' around. Thanks for the reply!
I believe that xRom by JAC is based off the same kernal which means no wipe going to it... you could use switchrom to backup and restore without wiping to go back to cyanogen if you dont like it...
Let me ask this then. I always use Nandroid for my backups. Can I just do a nandroid backup, flash xrom, and if I don't like it...do a nandroid restore to get back to Cyanogen?
your app data might not be compatible coming back.. do you know how to use switchrom? its not that hard once you learn it... and it backs up the app data before doing a nandroid...
google xda switchrom.sh
download the switchrom.txt file
rename to switchrom.sh
move to root of sdcard
go to terminal emulator type: (hit enter after each line)
su
cp sdcard/switchrom.sh /system/sd
reboot recovery
enter recovery console: (hit enter after each line)
mount /system/sd
sh /system/sd/switchrom.sh -s (todays date)<this will be the backup name
*this stores your rom* notice -s
to restore the backup--enter recovery console
mount /system/sd
sh /system/sd/switchrom.sh -r
it will give you a choice... choose the most recent (or stable) rom
I do one of these backups every weekend JIC I mess something up (which I did last night... last back was 01/28/10 so not too bad..
Well, your instructions are impecable! Never used it but I'm gonna give it a whirl. Thanks so much for the detailed assistance
junkdruggler said:
your app data might not be compatible coming back.. do you know how to use switchrom? its not that hard once you learn it... and it backs up the app data before doing a nandroid...
google xda switchrom.sh
download the switchrom.txt file
rename to switchrom.sh
move to root of sdcard
go to terminal emulator type: (hit enter after each line)
su
cp sdcard/switchrom.sh /system/sd
reboot recovery
enter recovery console: (hit enter after each line)
mount /system/sd
sh /system/sd/switchrom.sh -s (todays date)<this will be the backup name
*this stores your rom* notice -s
to restore the backup--enter recovery console
mount /system/sd
sh /system/sd/switchrom.sh -r
it will give you a choice... choose the most recent (or stable) rom
I do one of these backups every weekend JIC I mess something up (which I did last night... last back was 01/28/10 so not too bad..
Click to expand...
Click to collapse
Wow Just USe AmonRA LAst recovery It Lets you Use Switchrom Eazy You Can Save your Rom =D i Can Give you a youtube video that will Help U =D Youtube video

[Working] - A2SD (Apps2SD) v2.7 Update 3r1 on Aria - See Post #9

Hi Everyone,
Has anyone gotten A2SD from this thread:
http://forum.xda-developers.com/showthread.php?t=670087
To work on an Aria.
Please let me know.
I would love to know too. I'm tempted to try it, worst case scenario, I have to restore a backup.
It won't work with the stock kernel. Unless you can build a kernel to support it which I do not know how to it will not work for you.
this would be great, thinking of toying around with it myself.
I just go gave it a quick run through to no avail using rom manager to format the sd card into the proper partitions and then flashing the zip file in clock work as directed. I will try it again tomorrow when I'm not so damn tired. Apparently it works on the stock sprint hero 2.1 rom so maybe I'll research more into how that was accomplished as there is no reason this method needs a specialized kernel.
Sent from my HTC Liberty using XDA App
I've been playing with it a little this morning. It appears it is having trouble initializing a mount point in /system/SD. I will try a symlink from /sdcard to a created sir named /syste/SD until I figure out why the userland differs so much from the other ''stock'' 2.1 roms this appears to run on.
Sent from my HTC Liberty using XDA App
It won't work, the stock htc kernel does not support it.
Quit being a naysayer and read the list of stock based roms that support this particular method. There are several app2sd methods and there is no reason this one shouldn't support the stock kernel unlike the cyanogen style methods. I may not be able to do it yet but I defer the possibility of figuring it out to users who may be more skilled than myself rather than regurgitating the same thing over and over without research.
Sent from my HTC Liberty using XDA App
I have a2sd working on attn's liberated_aria b005
step 1: download Rom Manager from the Market
step 2: select partition sd card; select whichever size ext partition you desire (you can also create larger ext partitions doing this manually on a linux box but I won't cover it.
step 3: reboot phone into clockwork recovery; select partitions menu and mount /system.
step 4 (borrowed from Semigon at SmartQ MID forums):
Create a file called install-recovery.sh at <your android SDK installation>/tools/ on your PC with this code (MAKE SURE YOU CAN SAVE IT AS UNIX, ANSI TEXT , I use TextPad to do this [or TextWrangler for OS X] ) :
*
*
Code:
#!/system/bin/sh
mount -t ext2 /dev/block/mmcblk0p2 /system/sd
Step 5:
Plugin your cable and connect your aria to your computer so ready to use ADB
at prompt type:
"adb push install-recovery.sh /system/etc/install-recovery.sh" <-- push file to your aria
"adb shell" <-- shell to your phone.
*
*
Code:
* * #cd /system/etc/
* * #chmod 555 install-recovery.sh* * * * * *
* * #mkdir /system/sd
* * #mount -t ext2 /dev/block/mmcblk0p2 /system/sd* * * * *
* * #mount* * * * * * * *
( if everything is ok, you should see something like this:
/dev/block/mmcblk0p2 /system/sd ext2 rw,errors=continue 0 0 )
now type #exit
Step 6: Test to make sure that it will be automounted after reboot.
on your PC, from command prompt you can type: "adb reboot"
Step 7: After rebooted, you can either use adb or use "Terminal Emulator" to see if your SD EXT2 partition is mounted.
Connect as in step 1)
On your PC, from command prompt: "adb shell"
# mount
"/dev/block/mmcblk0p2 /system/sd ext2 rw,errors=continue 0 0" means you EXT2 partition is mounted after reboot.
Step 8: download Darktremor Apps2SD 2.7 Update 3r1 and place it at the root of your sd card.
Step 9: boot into recovery and select flash zip from sdcard
Step 10: In flash zip from sdcard, select the a2sd package file you downloaded earlier. Press home to flash; now reboot your phone
Step 11: now reconnect to your phone through adb.
#su
#a2sd install
Don't panic-- your phone will reboot as the script finishes
Step 12: adb back to your phone and type ls -l /data
You should see
lrwxrwxrwx root root 2010-07-27 14:56 app-private -> /system/sd/app-private
lrwxrwxrwx root root 2010-07-27 14:56 app -> /system/sd/app
Now check your phone storage. You should see that you have significantly more available then you did before. If you see it slowly decrease this is because the dalvik cache is still on the internal memory. This too, however, can be moved to the sd.
The following is from tkirton's main set of instructions found at hxxp://forum.xda-developers.com/showpost.php?p=7021325&postcount=2
If you want to move the dalvik-cache to the sd card, type:
a2sd cachesd (move dalvik to sd card)
a2sd cachepart (move dalvik to cache partition)
Now you should have even more internal space left. Enjoy.
Note: moving dalvik to sd card may produce instability in certain apps or force quits. If it isn't working for you just pull up "adb nocache" to move it back to internal storage while still installing apps to the ext partition on your sd card.
Credits to semigod, tkirton and thanks to attn1 (for making good stuff for us)
mosamjc
mosamjc said:
step 1: download Rom Manager from the Market
step 2: select partition sd card; select whichever size ext partition you desire (you can also create larger ext partitions doing this manually on a linux box but I won't cover it.
step 3: reboot phone into clockwork recovery; select partitions menu and mount /system.
step 4 (borrowed from Semigon at SmartQ MID forums):
Create a file called install-recovery.sh at <your android SDK installation>/tools/ on your PC with this code (MAKE SURE YOU CAN SAVE IT AS UNIX, ANSI TEXT , I use TextPad to do this ) :
*
*
Code:
#!/system/bin/sh
mount -t ext2 /dev/block/mmcblk0p2 /system/sd
Step 5:
Plugin your cable and connect your aria to your computer so ready to use ADB
at prompt type:
"adb push install-recovery.sh /system/etc/install-recovery.sh" <-- push file to your SmartQ
"adb shell" <-- shell to your SmartQ. Now you are at your SmartQ shell
*
*
Code:
* * #cd /system/etc/
* * #chmod 555 install-recovery.sh* * * * * *
* * #mkdir /system/sd
* * #mount -t ext2 /dev/block/mmcblk0p2 /system/sd* * * * *
* * #mount* * * * * * * *
( if everything is ok, you should see something like this:
/dev/block/mmcblk0p2 /system/sd ext2 rw,errors=continue 0 0 )
now type #exit
Step 6: Test to make sure that it will be automounted after reboot.
on your PC, from command prompt you can type: "adb reboot"
Step 7: After rebooted, you can either use adb or use "Terminal Emulator" to see if your SD EXT2 partition is mounted.
Connect as in step 1)
On your PC, from command prompt: "adb shell"
# mount
"/dev/block/mmcblk0p2 /system/sd ext2 rw,errors=continue 0 0" means you EXT2 partition is mounted after reboot.
Step 8: download Darktremor Apps2SD 2.7 Update 3r1 and place it at the root of your sd card.
Step 9: boot into recovery and select flash zip from sdcard
Step 10: In flash zip from sdcard, select the a2sd package file you downloaded earlier. Press home to flash; now reboot your phone
Step 11: now reconnect to your phone through adb.
#su
#a2sd install
Don't panic-- your phone will reboot as the script finishes
Step 12: dab back to your phone and type ls -l /data
You should see
lrwxrwxrwx root root 2010-07-27 14:56 app-private -> /system/sd/app-private
lrwxrwxrwx root root 2010-07-27 14:56 app -> /system/sd/app
Now check your phone storage. You should see that you have significantly more available then you did before. If you see it slowly decrease this is because the dalvik cache is still on the internal memory. This too, however, can be moved to the sd.
The following is from tkirton's main set of instructions found at hxxp://forum.xda-developers.com/showpost.php?p=7021325&postcount=2
If you want to move the dalvik-cache to the sd card, type:
a2sd cachesd (move dalvik to sd card)
a2sd cachepart (move dalvik to cache partition)
Now you should have even more internal space left. Enjoy.
Credits to semigod, tkirton and thanks to attn1 (for making good for us)
mosamjc
Click to expand...
Click to collapse
way to stick to your guns, ill try this later after i return from dinner
Please do. I'd like to know if it works for others as well. I can wait for a fully fleshed cm6 port with all working features (or a legitimate froyo for that matter), but additional space for applications is something that I desperately needed now (and now I do).
mosamjc said:
Please do. I'd like to know if it works for others as well. I can wait for a fully fleshed cm6 port with all working features (or a legitimate froyo for that matter), but additional space for applications is something that I desperately needed now (and now I do).
Click to expand...
Click to collapse
Just so happens this is the same day that CM6 from attn1 came out so i jumped the gun and ended up playing with his alpha Rom. So i have not validated this, BUT I can confirm apps2sd work on Attn1's new rom
Ha. I picked a hell of a day to try get creative. Hopefully it will be of use to someone until the cm6 build gets all its bugs ironed out.
Sent from my HTC Liberty using XDA App
dalvik cache issue
All of this worked fine, except for the dalvik cache part which had an error about not enough space while copying files.
How can moving dalvik cache be undone? It doesn't seem that "adb nocache" is a valid command.
Edit: Oh it should be "a2sd nocache" that seems to have fixed it
Well, I'm glad I have at least one happy customer. The cache transfered over fine for me but caused highly irregular behavior in 90% of the apps that cleared up the second I transfered it back. Could be a permissions issue or simply one that could be solved by reinstalling all your apps into the new sd environment. I'm not terribly concerned as installing the apps on the sd leaves plenty of space free for the caches to do their thing.
I am not very linux or android savy, but I will have to give this a try. It was the only thing missing from the Liberated rom. Now all is well. Thanks!
Hopefully, next we can get a Froyo w/ Sense UI! And our Arias can keep on rocking.
You may try the 2.7.5 RC1 and see if that helps the issue. There were fixes regarding copying files (permission issue...didn't tell it to retain permissions...didn't see that until 2.7.5 PF4A).
Glad to see you guys progressing on this. If someone knows the boot image base address for the Aria, I will modify a stock boot image for apps2sd.
Need any help, feel free to ask me. Any help I can give you to getting this program working on your rom I will be happy to do.
mosamjc said:
Well, I'm glad I have at least one happy customer. The cache transfered over fine for me but caused highly irregular behavior in 90% of the apps that cleared up the second I transfered it back. Could be a permissions issue or simply one that could be solved by reinstalling all your apps into the new sd environment. I'm not terribly concerned as installing the apps on the sd leaves plenty of space free for the caches to do their thing.
Click to expand...
Click to collapse
Here is a slightly modified version, mainly just changed formatting and fixed a few typos. Also my phone didn't automatically reboot after step 11. Thanks for the great guide!
Step 1: Download Rom Manager from the Market
Step 2: Select partition sd card; select whichever size ext partition you desire (you can also create larger ext partitions doing this manually on a linux box but I won't cover it.
Step 3: Reboot phone into clockwork recovery; select partitions menu and mount /system.
Step 4 (borrowed from Semigon at SmartQ MID forums):
Create a file called install-recovery.sh at <your android SDK installation>/tools/ on your PC with this code (MAKE SURE YOU CAN SAVE IT AS UNIX, ANSI TEXT , I use TextPad to do this ) :
Code:
Code:
#!/system/bin/sh
mount -t ext2 /dev/block/mmcblk0p2 /system/sd
Step 5:
Plug in your cable and connect your Aria to your computer so it is ready to use ADB. At prompt type:
Code:
adb push install-recovery.sh /system/etc/install-recovery.sh # push file to your Aria
adb shell # shell to your Aria. Now you are at your Aria shell
Code:
Code:
cd /system/etc/
chmod 555 install-recovery.sh
mkdir /system/sd
mount -t ext2 /dev/block/mmcblk0p2 /system/sd
mount
If everything is ok, you should see something like this:
Code:
/dev/block/mmcblk0p2 /system/sd ext2 rw,errors=continue 0 0
Now type:
Code:
exit
Step 6: Test to make sure that it will be automounted after reboot. On your PC, from command prompt you can type:
Code:
adb reboot
Step 7: After rebooting, you can either use adb or use "Terminal Emulator" to see if your SD EXT2 partition is mounted.
Connect as in step 1)
On your PC, from command prompt:
Code:
adb shell
mount
If your EXT2 partition has been mounted after reboot you will see:
Code:
/dev/block/mmcblk0p2 /system/sd ext2 rw,errors=continue 0 0
Step 8: Download Darktremor Apps2SD 2.7 Update 3r1 and place it in the root of your sd card.
Step 9: Boot into recovery and select "install zip from sdcard"
Step 10: Select the a2sd package file you downloaded earlier. Press power button to flash; now reboot your phone
Step 11: Now reconnect to your phone through adb:
Code:
adb shell
su
a2sd install
Don't panic-- your phone may reboot as the script finishes
Step 12: Connect with adb back to your phone:
Code:
adb shell
Then type:
Code:
ls -l /data
You should see
Code:
lrwxrwxrwx root root 2010-07-27 14:56 app-private -> /system/sd/app-private
lrwxrwxrwx root root 2010-07-27 14:56 app -> /system/sd/app
Now check your phone storage. You should see that you have significantly more available then you did before. If you see it slowly decrease this is because the dalvik cache is still on the internal memory. This too, however, can be moved to the sd.
The following is from tkirton's main set of instructions found at hxxp://forum.xda-developers.com/showpost.php?p=7021325&postcount=2
If you want to move the dalvik-cache to the sd card, type:
Code:
a2sd cachesd # move dalvik to sd card
a2sd cachepart # move dalvik to cache partition
Now you should have even more internal space left. Enjoy.
Note: moving dalvik to sd card may produce instability in certain app or force quits. If it isn't working for you then move it back to internal storage while still installing apps to the ext partition on your sd card with:
Code:
a2sd nocache
Credits to semigod, tkirton and thanks to attn1 (for making good for us)
mosamjc
Click to expand...
Click to collapse
mosamjc said:
Well, I'm glad I have at least one happy customer. The cache transfered over fine for me but caused highly irregular behavior in 90% of the apps that cleared up the second I transfered it back. Could be a permissions issue or simply one that could be solved by reinstalling all your apps into the new sd environment. I'm not terribly concerned as installing the apps on the sd leaves plenty of space free for the caches to do their thing.
Click to expand...
Click to collapse
Sounds very similar to what happened for me. The script completed even with a few copy errors, but then many applications had FC after reboot. There is more than enough space from moving the apps, so it was not a big problem.
tkirton said:
You may try the 2.7.5 RC1 and see if that helps the issue. There were fixes regarding copying files (permission issue...didn't tell it to retain permissions...didn't see that until 2.7.5 PF4A).
Glad to see you guys progressing on this. If someone knows the boot image base address for the Aria, I will modify a stock boot image for apps2sd.
Need any help, feel free to ask me. Any help I can give you to getting this program working on your rom I will be happy to do.
Click to expand...
Click to collapse
Will give the the newer version a try, by installing the new zip then running the cachesd and cachepart commands again. Thanks!
@MikeChelen Way to polish the tutorial. Looking good! I hammered that out in in only a few minutes originally after pulling together all the parts that made it tick for me. I just wanted to release it to the masses quickly to prove jznomoney wrong (am I a bad sport? Probably).
@Tkirton I will give the new version a go after lunch and see what happens. As far as the boot image address, I believe it is the same as the Legend, as almost all legend roms flash and boot successfully on the Aria. So I would give 0x12c00000 a try on Attn1's Liberated_Aria.
mosamjc said:
@MikeChelen Way to polish the tutorial. Looking good! I hammered that out in in only a few minutes originally after pulling together all the parts that made it tick for me. I just wanted to release it to the masses quickly to prove jznomoney wrong (am I a bad sport? Probably).
@Tkirton I will give the new version a go after lunch and see what happens. As far as the boot image address, I believe it is the same as the Legend, as almost all legend roms flash and boot successfully on the Aria. So I would give 0x12c00000 a try on Attn1's Liberated_Aria.
Click to expand...
Click to collapse
Haha, well I am glad you did! It meant the guide was available for me a little sooner. Score another point for stubborn resolve
It was more than clear enough for me to follow, hopefully the edits will help newer users though.
It might also be worth noting that ANSI is not an encoding itself, but a set of encodings? The normal Linux text editors seem to use US-ASCII or UTF-8 and these should probably both work.
Assuming other users don't have any problems, hope this gets added to the Aria sticky topic ^_^
Thanks again everyone!

[GUIDE] Upgrade 4.5.15 rooted & encrypted -> 5.0.2 WITHOUT DATA/SETTINGS LOSS

as usual, if anything goes wrong, no responsibility etc
The official update tutorial for rooted users doesn't keep app data, only internal storage! This tutorial keeps EVERYTHING
This method allows updating from 4.5.15 (unlocked, encrypted, rooted) to 5.0.2 without any data (sys settings + app data + user data) loss
A FAQ section is present at the end of this post and will be regularly updated.
List of files to download while doing the following steps:
OOS 5.0.2 ROM
Codeworkx TWRP recovery
Latest Magisk
Terms and software used in this guide:
Fastboot / Bootloader = bootloader of the phone, it's a very low level mode of the phone that allows booting into recovery. Can be accessed by using the advanced reboot menu (enable in dev options) or by "adb reboot fastboot".
Recovery = a small operating system on the phone that allows you to do various operations even when the main OS (Android) is broken. This includes flashing ROMs, modifying stuff on the storage, etc. It's the Android swiss army knife. If you can get a phone to boot TWRP, then you can do almost anything.
Magisk = rooting software that uses a systemless method to keep SafetyNet working. Systemless = instead of modifying the system, every change is put in a separate image that is mounted "over" the system. When the system tries to access a file modified by Magisk, instead of reading it from the partition, it reads it from Magisk. It's recommended to use Magisk instead of SuperSU as of 2018.
ADB = tool that allows controlling the phone from your PC through USB. You can use it when you're in Android if USB debugging is enabled in the settings, or when you're in TWRP. Here, we mostly use it for transferring files directly (without MTP) and running commands (using "adb shell")
Note: For this guide you will be required to download and install Magisk. If you don't want your phone to be rooted, then at the end of this guide reboot into TWRP, wipe both caches and re-flash the OS. This will uninstall Magisk and any other root patch. Beware: it will reflash stock recovery, so if you ever want to re-root, you'll need to reboot to fastboot and flash TWRP manually.
Convention for commands that you will have to run:
a command line starting with "C:" means that it should be run on your PC
a command line starting with "~ #" means that it should be run on your phone (through adb shell) while in TWRP
a command line starting with "OnePlus5:/ $" means that it should be run on your phone (through adb shell) while in OxygenOS
Although the commands start with "C:", this is just for readability purposes. You should run everything from inside an empty directory with enough disk space and writing access.
Your phone will have to be plugged in to your PC from the beginning to the end. Also, make sure it has at least 80% battery before beginning, just in case.
I know, the tutorial is huge. This is simply due to the fact that if I just wrote "make a nandroid backup of this and that, flash, and restore the backup while doing this", then some people may encounter problems because not everyone knows how to do a nandroid backup, restore it, etc. Also, there are a lot of things that need to be done precisely that way and not another way, which explains why the tutorial is huge. Also, you may notice that there is a lot of commands to run throughout the tutorial, this is because that way, I'm sure that at the end, you will have done everything like I did it on my phone, so that if you have a problem it's much easier to figure out where it comes from.
Summary of what you need to do (this is only a SUMMARY to give you a preview of what the whole thing looks like, you shouldn't follow it except if you're really an expert since a lot of things need to be done precisely, instead you should follow the easier complete steps below):
Make a Nandroid backup of /data
Backup files on internal storage
Wipe everything (internal storage + /data + system + caches), and then format data (important!)
Push and flash the OOS zip
Wipe caches and reboot (to Oreo!)
When it reboots, make sure everything (features, like Wi-Fi and fingerprint sensor) works. Don't "save anything" though, everything you do will be erased when we'll restore your backup. This is just a "test drive" for Oreo.
Reboot to TWRP, wipe Data and restore the /data backup
Run the three commands to fix Wi-Fi and fingerprints
Reboot (to System) and check everything works (don't do anything, don't change any setting, just make sure it works)
Reboot to TWRP, rename the "Android" folder to "Android_oreo" on sdcard, delete everything else on sdcard and restore your internal files
Rename the freshly restored Android (nougat) folder to "Android_nougat" and rename "Android_oreo" to "Android".
Flash Magisk, wipe dalvik+cache and reboot to System
When in Android, everything should work except some apps won't have their data. This is normal. Open a terminal (either on your phone using Termux or from your PC using adb shell), elevate using su and rename "Android" to "Android_oreo" and "Android_nougat" to "Android" (this is so that it correctly restores permissions)
If everything works fine, delete the "Android_oreo" folder
First, if you have Xposed Framework (systemless or not) installed, uninstall it. Next, if needed, uninstall any Magisk module that is "Nougat-only" to prevent any problems afterwards.
Boot the phone to bootloader/fastboot (either using advanced reboot, or by using volume down button when you start your phone) and boot to the TWRP recovery by doing
Code:
C:\> fastboot boot twrp-3.2.1-0-oreo-8.1-codeworkx-cheeseburger.img
from your PC.
Next, in TWRP, make a backup of /data (using the Backup button). Then, still while in TWRP, run the following commands:
Code:
C:\> adb shell
~ # cd /sdcard
/sdcard # tar cvf twrp.tar TWRP
/sdcard # md5sum twrp.tar
<< md5 checksum of twrp.tar >>
/sdcard # exit
C:\> adb pull -p /sdcard/twrp.tar
When the above command has finished, make sure that the checksum of the received twrp.tar file matches the one previously displayed.
If it doesn't match, delete the file and run adb pull again. Don't continue following this guide until you have received a 1:1 (checksum-wise) backup of /data.
Code:
C:\> adb shell
<< WARNING: dangerous command! double check the following line is correct before pressing enter! >>
~ # rm -rf /sdcard/TWRP
~ # rm /sdcard/twrp.tar
That was for /data. Now, the backup for the internal storage:
Code:
~ # cd /sdcard
/sdcard # du -csh
<< you should see here the total size of sdcard, that'll give you an idea of how long it'll take >>
/sdcard # tar cvf sd.tar element1 element2 element... elementN
<< in the command above, replace "element1..N" by a space-separated list of what you want to have in the backup.
Keep in mind that your list HAS to contain the element "Android" (case is important). It contains the app data.
Let's say for example you want to keep only the photos you have taken (and nothing, nothing else that was on internal storage).
The photos are in the folder DCIM, so the command will look like this:
tar cvf sd.tar Android DCIM
(because you want DCIM, and Android has to be in the list, no matter where)
>>
/sdcard # md5sum sd.tar
<< md5 checksum of sd.tar >>
/sdcard # exit
C:\> adb pull -p /sdcard/sd.tar
When the above command has finished, make sure that the checksum of the received sd.tar file matches the one previously displayed.
If it doesn't match, delete the file and run adb pull again.
Keep in mind that anything you don't put in that list will not be backed up and will be lost!
Now, you have a backup for all the important stuff so we can start doing the real sh*t.
Now, the important step:
Go back to the TWRP home screen, press "Wipe", "Advanced Wipe" and there check "Dalvik / ART Cache", "Cache", "System", "Data" and "Internal Storage". Confirm using the slider at the bottom of the screen. Press the home button, then "Reboot" and "FastBoot". Now, type the same fastboot command as in the previous step to boot the recovery image. You'll enter the recovery as before.
Now, on your PC, in the terminal, type
Code:
adb push -p OnePlus5Oxygen_23_OTA_029_all_1801292040_d71af3d.zip /sideload
(note: here, we are not using "adb sideload", we are really using "adb push"). In TWRP, click Install, in the file manager go to /sideload and select the OOS zip file. Confirm by sliding. If you get an error, go back to home, click Mount and ensure System is not checked. Then try installing again. If it still does not work, reboot to fastboot, type command again, get to the recovery and install again.
When the zip-file is installed, go home, click "Wipe", "Advanced Wipe" and check both caches and confirm. Then, go home, click "Wipe" and then "Format Data". Then, go home, click "Reboot" and then "System". Your phone will now reboot to Oreo. It will take a long time, but do not turn off the phone. Let it run. On my phone, it took on average 2 minutes for that boot.
You'll be greeted by the "first boot" page. It'll ask you if you want to restore a backup or start anew, choose start anew. Connect to your Wi-Fi network and Google account. Follow all the instructions until you get to the home screen. There, make sure everything works (especially Wi-Fi and fingerprint sensor). Don't save your fingerprints yet, they will be erased afterwards. If everything works, you can continue following these instructions. If not, post a comment down there.
Now that you're at the home screen, go in the settings, About Android and click the build number 8 times to enable Developer Options. Go in there and enable advanced reboot. Then, reboot your phone into fastboot/bootloader using the power button. Type the exact same command as before to start TWRP. Once that you are in TWRP, run the following commands:
Code:
C:\> adb push -p twrp.tar /sdcard/
C:\> adb shell
~ # cd /sdcard
/sdcard # tar xvf twrp.tar
/sdcard # cp /data/misc/wifi/WifiConfigStore.xml /sdcard/
In TWRP, click "Wipe", "Advanced Wipe" and check only the "Data" partition. Confirm. Press home, then "Restore" and choose the backup in the list. Confirm to restore. Back to the terminal, we need to run the following commands otherwise Wi-Fi and fingerprints won't work:
Code:
/sdcard # cp WifiConfigStore.xml /data/misc/wifi/
/sdcard # rm /data/misc/wifi/wpa_supplicant.conf
<< WARNING: dangerous command! double check the following line is correct before pressing enter! >>
/sdcard # rm -rf /data/system/users/0/fpdata
/sdcard # rm /data/system/users/0/settings_fingerprint.xml
Note: the command above are ran from your PC in an adb shell while the phone is still in TWRP.
Reboot the phone to system and ensure Wi-Fi and fingerprints are still working. Right now you should already see your old home screen and all your apps, but the internal storage isn't there yet. Reboot in fastboot, run the command to get in TWRP.
Once TWRP has booted, run the following commands:
Code:
C:\> adb push -p sd.tar /sdcard/
C:\> adb shell
~ # cd /sdcard
<< WARNING: dangerous command! double check the following line is correct before pressing enter! >>
/sdcard # rm -rf Alarms Albums DCIM Download Movies Music Notifications Pictures Podcasts Ringtones
/sdcard # ls
<< now, look at the list of files that were printed, and rm anything left that is not called "Android" or "sd.tar"
<< WARNING: dangerous command! double check everything is correct before pressing enter! >>
if when you do rm <the thing> it tells you it's a directory, then do: rm -rf <thething>
if there's a folder called SomeFolder, do "rm -rf SomeFolder"
next, run this:
/sdcard # ls
Android sd.tar <-- expected output
/sdcard # mv Android Android_oreo
/sdcard # tar xvf sd.tar
/sdcard # mv Android Android_nougat
/sdcard # mv Android_oreo Android
If you don't have Magisk somewhere on your sd card, download it and upload it using MTP or adb. Then flash it using the Install button. Clear dalvik/cache and reboot to system.
When the phone has booted (again, it might take time), make sure USB debugging is enabled and run the following commands:
Code:
C:\> adb shell
OnePlus5:/ $ su
<< here, you might see a Magisk screen asking for superuser access. Allow. >>
OnePlus5:/ $ cd /sdcard
OnePlus5:/sdcard $ mv Android Android_oreo && mv Android_nougat Android
Now, try some apps and make sure all the data is there (especially games and Netflix/Hulu/etc). If everything is there, and the phone works properly, go back in the terminal and type:
Code:
OnePlus5:/sdcard $ rm -rf Android_oreo
Optionally, start the TWRP app and flash it, it can always be useful. You can also reboot to fastboot to do that.
Now reboot your phone (normal reboot) one last time.
There, working OOS 5.0.2 / Android 8.0.0 phone with no data loss.
Frequently Asked Questions
How long does the whole thing take?
Highly depends on the amount of data you have on your phone. Since it the USB port only supports USB 2.0, it may take 4 or 5 hours in total.
Will doing this void my warranty?
No.
Will I be able to install future OTA updates using the regular download-reboot-flash-twrp procedure?
Yep. Just use the regular method as you would have on Nougat.
Will I lose my data?
If you follow all the instructions, no. Even if you don't follow them, as soon as you have made a backup of /data and internal storage, then no matter how bad you screw up you could always get a working phone back.
I followed the instructions and now my phone doesn't work
Boot in TWRP, wipe everything, reflash.
questions will be added there in the future
Having WiFi and fingerprint issues
You sure it is a good idea to just delete those files? I would have guessed that I need to replace these (nougat version from backup) with the oreo version to have it working just like before the restore.
Code:
/sdcard # rm /data/misc/wifi/wpa_supplicant.conf
/sdcard # rm -rf /data/system/users/0/fpdata
/sdcard # rm /data/system/users/0/settings_fingerprint.xml
I'm having the issues with wifi and fingerprints. Neither one is working. I'll try to figure out how to fix this.
@zdimension Thanks for this guide, I don't have time to test it yet, but I have a question
pdluke said:
Code:
/sdcard # rm /data/misc/wifi/wpa_supplicant.conf
/sdcard # rm -rf /data/system/users/0/fpdata
/sdcard # rm /data/system/users/0/settings_fingerprint.xml
Click to expand...
Click to collapse
At this point in the procedure, adb shell is still using root (before flashing magisk) ? How is that possible ? Does the adb /sideload preserve root ?
olivier380 said:
@zdimension Thanks for this guide, I don't have time to test it yet, but I have a question
At this point in the procedure, adb shell is still using root (before flashing magisk) ? How is that possible ? Does the adb /sideload preserve root ?
Click to expand...
Click to collapse
These commands should be run while the phone is in TWRP. Also note that adb /sideload is not used here, only adb push.
pdluke said:
You sure it is a good idea to just delete those files? I would have guessed that I need to replace these (nougat version from backup) with the oreo version to have it working just like before the restore.
Code:
/sdcard # rm /data/misc/wifi/wpa_supplicant.conf
/sdcard # rm -rf /data/system/users/0/fpdata
/sdcard # rm /data/system/users/0/settings_fingerprint.xml
I'm having the issues with wifi and fingerprints. Neither one is working. I'll try to figure out how to fix this.
Click to expand...
Click to collapse
If you delete them, they will be generated automatically at the next system boot. But you could also make a backup of those three files before wiping /data, store that somewhere, restore Nougat /data and then restore your backup of those three files. The result would be the same.
Note: actually, not exactly. Erasing the first file won't change anything since it's not used anymore in Oreo, but the two other files contain the fingerprint configuration (list of saved fingerprints). So,
Either you remove the files and you have to save your fingerprints again at next boot
Either you restore them from an Oreo backup and you'll get the fingerprints you had saved during the "first boot" procedure when you rebooted the phone right after flashing the OS
But the result is mostly the same: everything works. Deleting the files ensures you get something clean. If you restore from an Oreo backup I can't guarantee the result (as it may interfere with other files from the Nougat backup).
10 bucks to make a script to do this all for me haha.
@zdimension Thanks for the clarification Another thing you might add to the files to download would be Magisk (optionally). In this kind of guide, I've always find it useful to download everything first.
olivier380 said:
@zdimension Thanks for the clarification Another thing you might add to the files to download would be Magisk (optionally). In this kind of guide, I've always find it useful to download everything first.
Click to expand...
Click to collapse
Oops, forgot to add it
I added the link, and also instructions for how to un-root afterwards for those who would want it.
To improve the guide, here are some ideas :
- You should highlight that rm -rf is a very dangerous command, and that it needs to be checked twice (especially the targeted folder)
- It could be useful to use the du -csh command to check the size of a folder (to estimate the backup time for example).
- As a safety measure, one could md5sum the tar file before and after using adb pull
What do you think ?
olivier380 said:
To improve the guide, here are some ideas :
- You should highlight that rm -rf is a very dangerous command, and that it needs to be checked twice (especially the targeted folder)
- It could be useful to use the du -csh command to check the size of a folder (to estimate the backup time for example).
- As a safety measure, one could md5sum the tar file before and after using adb pull
What do you think ?
Click to expand...
Click to collapse
Thanks for the ideas! I updated the post (and I added a changelog at the bottom for future reference).
Followed guide for successful upgrade from 4.5.15 encrypted, unlocked bootloader w/ Magisk root.
One note, after the first complete wipe and flash of the full ROM, it was getting stuck on first boot and never completed. Discovered that I needed to not just wipe the Data partition but Format it in TWRP, to clear out the old encryption I think. Magisk wouldn't install either until I did this.
@debork thanks for the positive feedback (all the merit goes to @zdimension of course)
@zdimension there are many people in the other thread https://forum.xda-developers.com/oneplus-5/how-to/official-oxygenos-4-5-2-7-1-1-ota-t3627003 that tried (unsucessfully) to upgrade from 4.5.15 to 5.0.1, maybe a link to this topic could be useful for them (if it's not too late).
Regarding the
Go back to the TWRP home screen, press "Wipe", "Advanced Wipe" and there check "Dalvik / ART Cache", "Cache", "System", "Data" and "Internal Storage".
Click to expand...
Click to collapse
I think it should be highlighted in red, since it is the actual "clean flash" (AFAIU, correct me if I'm wrong).
if we only have the BL unlocked non root and stock recovery can we only ota without any loss of data ?
debork said:
Followed guide for successful upgrade from 4.5.15 encrypted, unlocked bootloader w/ Magisk root.
One note, after the first complete wipe and flash of the full ROM, it was getting stuck on first boot and never completed. Discovered that I needed to not just wipe the Data partition but Format it in TWRP, to clear out the old encryption I think. Magisk wouldn't install either until I did this.
Click to expand...
Click to collapse
Thanks for feedback, I will add that to the guide (although it worked with just Wipe for me )
zdimension said:
Thanks for feedback, I will add that to the guide (although it worked with just Wipe for me )
Click to expand...
Click to collapse
Have you rooted the 4.5.15 with Magisk or SuperSU (which is not compatible with Oreo anymore) ?
olivier380 said:
Have you rooted the 4.5.15 with Magisk or SuperSU (which is not compatible with Oreo anymore) ?
Click to expand...
Click to collapse
I stopped using SuperSU when it was sold to that shady company. Also, Magisk is better imo.
quick05 said:
if we only have the BL unlocked non root and stock recovery can we only ota without any loss of data ?
Click to expand...
Click to collapse
Official OnePlus support said that nothing is guaranteed if your bootloader is unlocked. But since you're on stock recovery + non rooted, you could always try. But backup everything first. Some people here on XDA have reported that it doesn't work, though.
Just followed your guide with no problems. Thank you very much!! I can confirm also that you need to format data after the wipe otherwise it gets stuck in a bootloop!
Thanks so much for this. I was able to successfully follow the guide and get upgraded to 5.0.1 without losing any data. In fact, I even messed up one step by failing to include the Android directory in the sdcard.tar backup (perhaps that should be more explicit), but it doesn't seem to have affected everything; all of my apps seem to have retained their data.
A few notes:
1. The file size of twrp.tar was ~14GB but when executing the pull command, it recognized it as only ~1.3 GB. As a result, the pull was not complete until it reached over 1000%. All the more reason to do the md5 check.
2. As others stated, I needed to format the data partition, not just wipe it.
3. I might recommend also including a "summary" version somewhere on what this guide does. Scrolling through the guide the first time, it seemed pretty daunting, but really all that you're doing is: backing up data partition and internal storage; wiping device; flashing Oreo ROM; tweaking a few files; and restoring backed up data and internal storage.
Thank you again so much! Glad to finally be on Oreo.
elight3 said:
Thanks so much for this. I was able to successfully follow the guide and get upgraded to 5.0.1 without losing any data. In fact, I even messed up one step by failing to include the Android directory in the sdcard.tar backup (perhaps that should be more explicit), but it doesn't seem to have affected everything; all of my apps seem to have retained their data.
A few notes:
1. The file size of twrp.tar was ~14GB but when executing the pull command, it recognized it as only ~1.3 GB. As a result, the pull was not complete until it reached over 1000%. All the more reason to do the md5 check.
2. As others stated, I needed to format the data partition, not just wipe it.
3. I might recommend also including a "summary" version somewhere on what this guide does. Scrolling through the guide the first time, it seemed pretty daunting, but really all that you're doing is: backing up data partition and internal storage; wiping device; flashing Oreo ROM; tweaking a few files; and restoring backed up data and internal storage.
Thank you again so much! Glad to finally be on Oreo.
Click to expand...
Click to collapse
Thanks for the feedback! I'll add a summary to the guide.

Categories

Resources