Twrp for m30 android 10 - Samsung Galaxy M30 Questions & Answers

How to install TWRP in my M30 the has already been updated to android 10. Then where can i get the suitable version of twrp and the steps to install it.
Plzz hepl
device info:
Galaxy M30 SM-M305F
android 10 (OneUI 2)
Exynos 7904
security update version M305FDDU3CSL5

TWRP for 10 is being worked upon. As of now there is no TWRP for 10. Please do not install the earlier TWRP, or you will end in a bootloop.

How long time take to upload twrp for galaxy m30 android 10 (OneUI2)
Plzz sir tell us

TWRP & Android 10
Please note that this post is primary related to TWRP and the Pixel 3 and 4 and devices that may ship in the future that ship with Android 10 as their original version of Android. Older non-Pixel devices that shipped with older versions of Android and receive upgrades to Android 10 are not affected.
Long story short, TWRP support for Android 10 is going to take a while.
Android 10 brings about the largest changes to the way AOSP implements recovery since Google shifted recovery from C to C++ when they moved from Android 4.0 to 4.1 more than 7 years ago. A lot of components in AOSP recovery were moved into subfolders, which makes merging the latest changes into TWRP more time consuming. At least on the Pixel 3, the ramdisk that we use for recovery is now handling part of normal boot in addition to recovery, so we're not sure what the best way will be to go about replacing recovery without affecting the ability to boot up normally. In addition, the way Google is building the ramdisk on the Pixel 3 is a lot different than the past. In the past, the executable binaries in the ramdisk were built as static binaries with no linked libraries. TWRP has almost always been built with separate linked libraries. The new dynamically linked stock ramdisk will make it harder for us to slip TWRP into the ramdisk.
Once we get TWRP compiling with the new changes from 10, we have some additional items that need consideration. As mentioned above, the stock ramdisk is using dynamic linking. Unlike TWRP, the stock ramdisk places the executables and libraries in the usual locations inside a /system folder. Normally TWRP leaves /system alone so that we can mount the system partition to its usual location of /system. If we leave things the way they are on the Pixel 3, mounting the system partition gets tricky. A lot of custom zips depend on mounting the system partition to /system.
Android 10 also introduces a new dynamic partitioning system. Instead of having a dedicated system partition and a dedicated vendor partition, etc. Android 10 uses a super partition. I like to think of the super partition as a partition that contains a bunch of smaller partitions. One of the side effects of this dynamic partition system is that Google has chosen to use a form of the ext4 file system that is for all intents and purposes, read-only. This choice means that even if you wanted to, you can't easily mount and modify the system partition. We haven't really discussed this with other developers yet, but it may impact your ability to do things like install Gapps. In addition, the dynamic partition model means that eventually, we should probably provide you, the user, some GUI driven tools in TWRP to allow you to manage the dynamic partitions that are on the super partition.
On top of all of the above, I, Dees_Troy, am the one who usually handles merges of new versions of Android. My wife is currently pregnant with our fourth child. I am quite busy with my growing family and the need to find a bigger house, so my time for working on TWRP right now is somewhat limited. So, I guess please be patient, or feel free to download the TWRP source code and make the needed changes yourself.
Source

Related

[Q] Haret boot within android

I was wondering if there is a way to start haret in android? the only version I can find is for WM, so maybe is there a type of emulation layer it could be loaded to? Even better if there was an android version we could use that to reboot an SD run android and also boot into different version without having to reboot the entire phone and load wm up again (and nand android could then "haret" a diff version through sd).
Not sure you actually understand what the difference between Haret and Nand is.
Haret is, ( and always has been), a WM program, in fact it would make no sense to have it running as an android program, what Haret does is allow a WM device to run a Linux OS, that is all it does.
I think what you want is a way to dual-boot, to run different builds, which is possible, using the installer menu to choose which one to run, as well as where it is installed.
How it works is this, install your main build to nand, sys on nand, data on nand.
Then install another build, sys on SD, data on SD.
Once installed you have 2 builds, one on SD, the other on nand, to switch, you must reboot, enter installer, change the target settings to SD or nand, and quit, it should now boot from the installed version you chose,
I think you may have to have 2 ext2 partitions on SD for this to work, not sure since I never tried it, but I do remember someone posting this idea on the forum some time ago.
basically I want to boot an sd build from within an sd build. This serves a few purposes, mainly no need to boot into a different os (wm in this case) just to boot a diff version, and to allow a type of reboot on an sd build. If this can be done in script that would work also but want an android app to kick the current build out of memory and load a new one in (or the same one reloaded) instead of it being wm based. This might be something we can do with the kernel to just dump the current gui and load the other gui onto it?
edit: BTW I am using a type of boot you are explaining but instead of installer in between I have wm with different "andboot" folders.
ghghgh14702 said:
basically I want to boot an sd build from within an sd build. This serves a few purposes, mainly no need to boot into a different os (wm in this case) just to boot a diff version, and to allow a type of reboot on an sd build. If this can be done in script that would work also but want an android app to kick the current build out of memory and load a new one in (or the same one reloaded) instead of it being wm based. This might be something we can do with the kernel to just dump the current gui and load the other gui onto it?
edit: BTW I am using a type of boot you are explaining but instead of installer in between I have wm with different "andboot" folders.
Click to expand...
Click to collapse
Interesting concept, and theoretically possible, since Android itself is a shell on the Linux core, it may be possible to do this, perhaps a remount of /system and /data, then a restart of the kernel, almost certainly requires some hardcore Linux knowledge, anyone up for this?
This posthttp://forum.xda-developers.com/showthread.php?t=594077 is for the dream.
We've been able to from internal or sdcard on vogue,kaiser, polaris for ages from boot.
The only other way is to use grub 'if possible'.
I think ghghgh14702 means that directly reboot Android. NOT shut down, then boot to wm, and then run haret.
In All the builds I've tried, the reboot menus all dont work. Most reboot meuns make the phone shut down.
I'm using a polaris, running Android in the sd card, and seems dont have a recovery mode.
I found sometimes Android stucks and reboots itself when I push the volume button to adjust the system volume. It is a DIRECTLY reboot, not reboots into wm.
So I think there is some way to reboot directly. Hope sb. can find it out.

[Android ROM Dictionary] Newbe Friendly

I TOOK IT HERE
Android ROM and rooting dictionary: all the terms explained​
Android is a Linux-based operating system, and in Linux, there is something called root access. When you root your Android phone, you will get superuser access. It’s sort of like a special user account for system administration.
With root access, you have complete control over your phone’s operating system. It will let you install lots of great system apps, such as backup tools, that only are available to root users, and you’ll have the option to flash themes and custom Android ROMs. You can look at custom ROMs as different editions of the Android platform, and when you flash a new ROM, you install someone’s vision of Android.
For example, when I bought the HTC Desire in April 2010, I initially used the stock HTC firmware for a couple of months, which basically is HTC’s customized version of Android. Then I got bored with it, and I started using a ROM called MIUI by a group of Chinese developers. It added a lot of functionality and had a unique UI design. Then I got curious of HTC’s new device Desire HD, and I flashed a custom ROM that was based on the firmware of that phone. And when Android 2.3 Gingerbread arrived, I started using a virtually unmodified version of Android – Google’s vision of it.
In other words, when you have root access, you can use your phone as a hardware shell that you simply can put new versions of the Android operating system into. This post won’t discuss how to get root access, but it will try to explain all the funny words that you will encounter when reading about custom ROMs in forums such as xda-developers. There is an entire terminology surrounding Android ROMs and rooting, and these words sound like complete gibberish when you’re not used to them.
So I’ve tried to write a rooting dictionary that explains the most common superuser and Android ROM terms. I’m no expert, so please correct me in the comments if I’m wrong, and feel free to suggest additional words to include in this root access and ROM dictionary.
Android ROM and rooting dictionary
A2SD+​
A2SD+ is an extension of Android 2.2 Froyo’s native support for installing apps on the SD card, but it virtually installs every app to the external storage. You can more or less expand your internal storage with the size of the partition you create on your memory card — because you need to partition your SD card to use A2SD+. It’s great if your Android phone has a limited amount of internal storage space. Most Android ROMs have built-in support for A2SD+.
AOSP​
AOSP is short for Android Open Source Project, and when the term is used in ROM descriptions, it usually indicates that the ROM in question is based on the Android source code provided by Google itself, and not on some other ROM project or a company’s firmware.
Bootloader​
The bootloader executes code before any operating system is launched. On Android devices, the bootloader is usually locked because manufacturers want you to use the version of Android they’ve provided. With a locked bootloader on Android phones, custom ROMs cannot be flashed.
BusyBox​
BusyBox is an app on your phone that will give you access to additional Linux/Unix based commands. You may need BusyBox installed to perform some root level tasks, and some other apps that require root access may need BusyBox installed as well. BusyBox is self-dubbed “The Swiss Army Knife of Embedded Linux.”
ClockworkMod Recovery​
I won’t get very technical here, because I can’t, but you can think of the Recovery Mode as Android’s equivalent of the BIOS on your computer. Not quite, since Hboot may be more similar to your PC’s BIOS, but you get the picture. It’s a boot menu that is shown without Android being loaded, and it gives you access to certain features such as doing complete backups of your phone (Nandroid backups) and installing custom ROMs. ClockworkMod is the most popular Recovery Mode, and it’s installed with the app ROM Manager.
CyanogenMod or CM​
CyanogenMod, often abbreviated CM, is a custom version of vanilla (more or less unmodified) Android. It’s the most popular custom ROM for Android – a community effort, and many other ROMs are based on CyanogenMod. Among other things, it adds a bunch of extra customization features and options.
Dalvik & Dalvik cache​
Dalvik is the cryptic name of the virtual machine (VM) in Android, and it’s the basis for running apps (with the .apk filename extension) on the platform. Before Android apps are launched, they’re converted into the compact Dalvik Executable (.dex) format, which is designed to be suitable for systems that are constrained in terms of memory and processor speed. Dalvik was originally written by Dan Bornstein, who named it after the fishing village of Dalvík in Eyjafjörður, Iceland, where some of his ancestors lived.
The Dalvik cache is a simply the cache used by Dalvik, and it’s the result of Dalvik doing optimizations of running apps. Some Android ROMs allow you to move the Dalvik cache to your SD card, in order to free up internal storage.
Data2SD / D2EXT / D2SD​
If a ROM supports data2SD, D2EXT, or simply D2SD, it means that the /data folder on your Android phone’s internal storage can be moved to your memory card instead. That’s a good thing, because it will free up precious internal megabytes and leave more room for apps and games. Some say that having the data stored on your SD card is slightly slower, though.
D2ext is a short way of saying “data to the extended file system”. It requires that you have created a partition on your SD card.
Deodexed​
The term “deodexed” has been mocking me ever since I rooted my first Android phone. What the frak does it mean, exactly? Well, it’s probably the hardest term to explain in this rooting dictionary, but I’ll do my best.
Apparently, when a ROM has been deodexed, it means that its apps have been prepared so they can be modified. Deodexed ROMs feature apps that have been repackaged in a certain way. Android applications, .APKs, contain .odex files that devs supposedly use to save space. These .odex files are extracted from the application packages and put in the /system/ folder on your phone, to speed up boot processes and to allow parts of applications to be preloaded.
However, this makes hacking and modifying those apps difficult because parts of the apps have been extracted to another location. Deodexing means that all pieces of an application package are put back together into one file, and it makes sure that a modified .APK won’t conflict with some separate odexed parts located somewhere else. Developers of custom ROMs choose to deodex their ROM packages, since it lets them modify various .APKs, and it also makes theming possible after the ROMs have been installed.
DSPManager​
This is an equalizer app that Android devs like to include in their ROMs.
EXT2/3/4​
This refers to ext2, ext3, and ext4 partitions on your SD card. They’re extended file systems for Linux that can be used by Android, usually in order to preserve internal storage space. Many custom Android ROMs require that you have an ext2, ext3 or ext4 partition on your memory card. Ext2 is the oldest type of extended file system, and ext4 is the newest. Some say that ext4 will put an unnecessary strain on your memory card, because it writes to it so much, and I think the ext3 file system currently is most common. To use one of these file systems, you need to create a special partition on your SD card with ROM Manager or GParted.
So what exactly is a partition? It’s a part of a hard disk, or a SD card in this case, that’s separated from the other parts. Think of partitioning as dividing your SD card into two sections that have different purposes.
Fastboot​
Please correct me if I’m wrong, but fastboot is essentially a boot menu that you can do stuff from before Android is launched. On the HTC Desire, you can access it by turning off the device and simultaneously pressing the Power button and the Volume down button. From this menu, you can choose to boot into Recovery Mode, and more. I’ve also seen this technical (and likely more accurate) explanation: “Fastboot is a protocol used to directly update the flash file system in Android devices from a host over USB.”
Firmware​
A phone’s firmware is basically its operating system. A “firmware update” means that the operating system, the software that controls the phone, is updated. “Stock firmware” means that the firmware is unmodified: it’s the version of the operating system the phone’s manufacturer delivers.
Flash and flashing​
To flash a custom ROM, or a firmware, simply means that you install it. So, flashing is the process of installing a new version of the Android operating system, or just parts of it, like the radio. Flashing new ROMs is done via the Recovery Mode, usually with ClockworkMod Recovery.
HBoot​
HBoot is loaded immediately when your phone is switched on, and it’s mainly responsible for checking and initializing the hardware and starting the phone’s software. It can also be used for flashing official software releases, as well as a few other things. HBoot can be compared to the BIOS on a computer.
IME​
Input Method Editor (soft keyboard)
[Thanks to Hayden4018]
IMEI​
International Mobile Equipment Identity. which you can get by by typing *#06# (works for Galaxy S)
[Thanks to turnado]
Kernel​
The kernel is the central component of most operating systems: it’s a bridge between applications and the actual data processing done at the hardware level. The Linux kernel was initially created by legendary Finnish computer science student Linus Torvalds in 1991. Android kernels are often customized, optimized and modified for different purposes, such as over-clocking the processor or extending the battery life. Custom ROMs usually include a new kernel.
Linux​
Linux refers to the family of Unix-like computer operating systems that use the Linux kernel. The name “Linux” comes from the Linux kernel, originally written in 1991 by Linus Torvalds. Android is a Linux-based mobile operating system.
MIUI ROM​
MIUI is a heavily customized version of Android 2.2 from a team of Chinese developers, and it made a splash in the Android blogosphere back in September 2010. MIUI takes the best parts of Froyo, Samsung’s TouchWiz interface and iOS, and transforms the various elements into something quite unique that has managed to make many people excited. A lot of developers have released their own versions of MIUI, and the ROM is available for many different devices. Besides the official website (in Chinese), there’s a forum dedicated to MIUI at miui-dev.com.
NANDroid & NANDroid backups​
NANDroid will let anyone with root access make a complete system backup. It lets you create a backup of every piece of information on your phone, and it can be restored later whenever you want. NANDroid backups are usually performed before flashing a new ROM, in case anything goes wrong, or if you want to return to your previous setup later. NANDroid backups are created from the Recovery Mode, often with ClockworkMod Recovery.
Odexed​
See deodexed.
Radio​
OK, so this is not the radio you’re listening to your favorite stations with. It’s the radio on your phone that handles communication, the radio that sends and receives voice and data. Flashing (installing) a new radio can improve your reception, and bring other benefits. A radio is flashed via Recovery Mode, just as a full Android ROM.
Radio interface layer (RIL)​
Android provides a Radio Interface Layer (RIL) between Android’s telephony services and the radio hardware. Developers and enthusiasts enjoy messing around with every part of Android, and some of them modify the RIL, just like Android itself, the kernel and the radio, to make it better.
RC1, RC2 et cetera​
When it comes to Android ROMs, RC means Release Candidate. It’s a candidate for the final release of a ROM, and they can be considered ROM betas.
Recovery Mode​
As explained under ClockworkMod, the Recovery Mode is a menu that you can boot into that lets you perform complete backups of your phone (Nandroid backups), install custom ROMs and more. ClockworkMod is a very popular Recovery Mode, and you can get it via the app ROM Manager below.
ROM Manager​
ROM Manager is an immensely popular app for root users, and it lets you flash ClockworkMod Recovery, install ROMs from your SD card, perform backups and even download new ROMs over-the-air.
Root​
When someone mentions root, it usually just refers to having root access on an Android phone – also called being a root user, or a superuser. Root access is explained under superuser, and in the introduction to this dictionary.
S-OFF (security off)​
On the HTC Desire and several other HTC Android phones, the company has implemented a form of “security.” It’s called @secuflag, and it controls whether your phone has its NAND or flash unlocked. S-ON (security on) will read-lock your /system and /recovery partitions, blocking you from performing certain root level actions directly from Android.
You can disable this security measure with S-OFF (security off), although you risk bricking your phone in the process (worst case scenario).
SetCPU​
This is a popular application for overclocking or underclocking your phone’s processor, making it faster or slower. It may require a special kernel in order to work.
SuperUser​
Android is a Linux-based operating system, and in Linux, there is something called root access. When you root your Android phone, you will get superuser access. The superuser, or root user, is sort of a special user account for system administration. SuperUser is also the name of an app, which lets you grant or deny superuser privileges to other apps.
Terminal and Terminal Emulator​
Terminal Emulator, sometimes just referred to as Terminal, is an app that lets users access Android’s built-in Linux command line shell. The application emulates a Digital Equipment Corporation VT-100 terminal, and it’s mostly useful for programmers and for those with root access. For example, typing this in Terminal Emulator when a2sd is installed will move the Dalvik cache to the SD card:
su (gives the app SuperUser access)
a2sd cachesd (moves the Dalvik cache to the SD card)
Titanium Backup​
Titanium Backup is the best backup tool for root users, since it allows you to backup all your applications as well as their data.
Zipaligned​
Zipalign is a tool that optimizes the way an Android app (.APK) is packaged. It enables Android to interact with the application more efficiently, and in doing so, it has the potential to make the app and the entire Android system much faster. Zipaligned applications are launched more quickly, and they use less amounts of RAM. So, thumbs up for zipaligned Android ROMs.
WWE​
WWE means “World Wide English”, and usually tells that an Android ROM is based on WWE, or World Wide English, firmware.
Thank you very much paul-ac. Very much appreciate your effort in creating this dictionary for helping newbies like me.
Wow, very nice writeup!
Sent from my GT-I9000 using XDA Premium App
thanks a lot it was very helpful
and for IME is it the same as (International Mobile Equipment Identity). which we can get by by typing *#06# on your standby screen.? or not
Nice one. thank you
turnado said:
thanks a lot it was very helpful
and for IME is it the same as (International Mobile Equipment Identity). which we can get by by typing *#06# on your standby screen.? or not
Click to expand...
Click to collapse
That's the IMEI, IME if I'm not mistakin' is Input Method Editor.
Very nice post, thank you. It would have been very useful when I buyed my first android phone.
really nice
Very cool, please keep this updated
Sent from my GT-I9000 using XDA Premium App
Nice copy-paste
galaxysdev said:
Nice copy-paste
Click to expand...
Click to collapse
Yes it is!
xxxxxxxxxx
I just like to ask what WIP means? ive seen it on other forums but i havent found any extraordinary about the rom or something
thanks in advance
fulii said:
I just like to ask what WIP means? ive seen it on other forums but i havent found any extraordinary about the rom or something
thanks in advance
Click to expand...
Click to collapse
work in progress
finally i know what deodexed means
please add modem. thx
BoKKeR said:
please add modem. thx
Click to expand...
Click to collapse
Radio=modem.
Sent from my GT-I9000 using xda premium
What is ETA mean?.
Sent from my GT-I9000 using Tapatalk
THX !

[IDEA] Android rescue.zip project..

So i am here with a new idea. A rescue.zip which can be used to rescue any android device which have a recovery like the famous cwm.
So here is it..
Some times we people screw up our android os like hell, and to reboot the device we usualy do a recovery flash of a new os, flash back our nandroid backup ( both on worst conditions) or even do permission fix, clean cache or dalvic cache( those in 'not that worse' conditions) . So thats are all the options we got. Rit?
Although flashing recovery backups, new roms can fix all, it will also eatup our apps, current setups, contacts, msgs, etc( in case we dont have backups) and will probably screw us. All we can do is say " WTF..WTF..WTF.."
SO here is my idea,
Find out the causes of what causes a reboot, non-boot, hang,fc etc.
And keep a zip that can be flashed through recovery, that has a solution for our problem. They may be including..
1) fix permission of system, data, and user data.
2) zipalign the apps
3) fix the default clock speed of processor
4) defragment memory
5) flash a new copy of su and busy box
6)wipe data or system or ext or cache or dalvic cache
7) flash a new copy of framework.res, system-ui.apk, settings.apk with default permissions( those files are kept in separate "custom" folder on the zip, so that end user can put their own files to that "custom" folder for flashing., the reason behind it is known to all, yap. Not all devices have them in common, every device have its own files)
These are all i got for now, pls post ur ideas and knowledge for any possible cure about any problem u faced/ cured. So that we can make it an ultimate rescue.zip that have a cure for 99% problems android os have. The rest 1% will go with a clean flash.( well we cant avoid that if we did something that bad).
So my plan is to use aroma installer( now on hard learning to find how it works). Throw in some scripts, files etc. Into the zip.
And since its not a device specific .zip file, i want to know how and why any problems are caused in any device( there are many common problems, but that is not what i ask for. I ask for device/os specific problems, and not for a problem that we can cure after booting, but for a problem that can make the device un-bootable) . So u people may help me to find those problems and cures for it. For my knowledge i have experience with wildfire and hd2.
Well i will keep this thread for a week or two, so that u can post ur knowledge, and info. after that i will release the file for u.
To the admin. Of the forum, pls keep this thread as announcement so that all can take a look.
HYPERDROID EXTREEM EDITION-THE NEW BENCHMARK ROM FOR HD2.
If you plan to do this available to any android device, the file size will be so big that it will become useless. Every phone has different apk, and not only that, but those apk are different in different version of os. For example, CM9 framework should not work on google release. Worst, older CM9 framework might not work on newer CM9 and newer framework might not work on older. Also, one of the cause of bootloop that i have been experiencing since i have my GNexus is data corruption of apps. The only way i had was to wipe data. I dont think there is a way to know if your app are corrupted with script. I also seen a lot of strange problem on SGS II like the kernel being erased. Well, in this case this package would be useless. So i guess that having this package would be awesome, but wont happen. My best advice is that you could create a universal guide on how to recover from bootloop/fc/hang with the minimum of impact on the phone. This is just my opinion tho.
Sent from my Galaxy Nexus using xda premium
You could add using flags in the updates filename, see some roms or themes for the lg optimus 2x for more information. It uses sed. For example, "update-wc-wd.zip" would wipe /data and /cache.
You could also merge these features in a customized clockwork mod recovery, the up side would be that you could automatically make a backup of the last flashed full ROM's systemui etc. this would also allow usage of the touch screen/volume keys to choose an repair option. You could even allow users to backup specific applications along with their data, and let users restore it later on after a fresh flash. I have some basic knowledge in modifying the recovery so I might help you out a little if you're interested.
chadouming said:
If you plan to do this available to any android device, the file size will be so big that it will become useless. Every phone has different apk, and not only that, but those apk are different in different version of os. For example, CM9 framework should not work on google release. Worst, older CM9 framework might not work on newer CM9 and newer framework might not work on older. Also, one of the cause of bootloop that i have been experiencing since i have my GNexus is data corruption of apps. The only way i had was to wipe data. I dont think there is a way to know if your app are corrupted with script. I also seen a lot of strange problem on SGS II like the kernel being erased. Well, in this case this package would be useless. So i guess that having this package would be awesome, but wont happen. My best advice is that you could create a universal guide on how to recover from bootloop/fc/hang with the minimum of impact on the phone. This is just my opinion tho.
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
I told it already, the "custom" folder is not filled. It will be kept empty. The user can put a file, which ofcourse is the file of the device he/she have or want to get repaired. All he has to do is copy and paste the file from the working zip( zip file of his currently installed rom, that encounter the problem) of his rom to the custom folder inside the rescue.zip.
And the things that are common will be scripts, but those too will contains device specific mound points, paths, etc. I think that will be common( ie, the working of script, once the mound is done). Am i right?
So all i have to figure out is mount points, paths etc.. i got a couple of them, about 15 or so. And pls help me to find the rest.
HYPERDROID EXTREEM EDITION-THE NEW BENCHMARK ROM FOR HD2.
a good idea to add is a file system chech like windows systems has. By installing a rom the installer should first check for bad sectors and mem blocks before installing the rom. After all blocks and sectors are scanned and the bad ones marked as "bad or corrupt" it should run something like defrag and place the bad blocks at the end of the file table. When all is done .. then the true rom install should start.
This will prevent heaps of problems since the curent installs just write over a bad block or sector creating the most weird problems. A fault checker/repair will take away a lot of strange forced closes and othere software/hardware failures.
Most phones wont last that long so that bad blocks or sectors can occure. But for the flashing junkies among us its a serious problem what can occure. I guess after 1000 or more installs bad sectors or blocks will occure and not all are being able to be repaired
Sent from my Galaxy Nexus using XDA App
Mikevhl said:
You could add using flags in the updates filename, see some roms or themes for the lg optimus 2x for more information. It uses sed. For example, "update-wc-wd.zip" would wipe /data and /cache.
You could also merge these features in a customized clockwork mod recovery, the up side would be that you could automatically make a backup of the last flashed full ROM's systemui etc. this would also allow usage of the touch screen/volume keys to choose an repair option. You could even allow users to backup specific applications along with their data, and let users restore it later on after a fresh flash. I have some basic knowledge in modifying the recovery so I might help you out a little if you're interested.
Click to expand...
Click to collapse
I am totaly newbee to lg. I have experience with htc, few samsung, etc. So can u pm me the details? Also is it usable to create recovery? I think a zip file with selectable options is more friendly. The thing is building a recovery wont make it universal( or atleast common for a couple of devices) and we will have to port them for each and every device. Thats the problem.
But any way i want ur help in building it. Can u pm me an example for mounding script in lg devices? And any thing that may become useful. Thank you.
HYPERDROID EXTREEM EDITION-THE NEW BENCHMARK ROM FOR HD2.
wilwilwel said:
a good idea to add is a file system chech like windows systems has. By installing a rom the installer should first check for bad sectors and mem blocks before installing the rom. After all blocks and sectors are scanned and the bad ones marked as "bad or corrupt" it should run something like defrag and place the bad blocks at the end of the file table. When all is done .. then the true rom install should start.
This will prevent heaps of problems since the curent installs just write over a bad block or sector creating the most weird problems. A fault checker/repair will take away a lot of strange forced closes and othere software/hardware failures.
Most phones wont last that long so that bad blocks or sectors can occure. But for the flashing junkies among us its a serious problem what can occure. I guess after 1000 or more installs bad sectors or blocks will occure and not all are being able to be repaired
Sent from my Galaxy Nexus using XDA App
Click to expand...
Click to collapse
Pls pm me the idea how to make the checking script. Or links that have info in this. Thank u in figuring out such a prob. I am unaware of that.
HYPERDROID EXTREEM EDITION-THE NEW BENCHMARK ROM FOR HD2.
showlyshah said:
I am totaly newbee to lg. I have experience with htc, few samsung, etc. So can u pm me the details? Also is it usable to create recovery? I think a zip file with selectable options is more friendly. The thing is building a recovery wont make it universal( or atleast common for a couple of devices) and we will have to port them for each and every device. Thats the problem.
But any way i want ur help in building it. Can u pm me an example for mounding script in lg devices? And any thing that may become useful. Thank you.
HYPERDROID EXTREEM EDITION-THE NEW BENCHMARK ROM FOR HD2.
Click to expand...
Click to collapse
I'll send this as a PM as well, but people might learn from this. I am not talking about any specific mount points for LG phones, I just pointed out that there are some roms which use sed to check the filename of its update.zip and do tasks according to that, you need to have one line in your updater script to run the script which detects what to do. That way a user of a Galaxy Nexus would rename it to update-maguro.zip and it would know to use mount points for the maguro, while if the exact same update.zip was to be named update-p990.zip, it would know to use the mount points for the LG optimus 2x. This way you could easily keep the zip up to date for any device, because they all use the same update.zip
About the recovery, you would need to build it for every phone once, but you could make one change to the recovery source and easily compile the recovery for all phones which are capable of running CWM. I believe this method to be more user friendly, as a recovery image has support for actually choosing what you want to do, instead of having to rename the file. A recovery image also has a better way of communicating with the user. Where a update.zip can only say "Hey, I had an error and I'm quitting now, I won't give you any details what the problem was because that's just how update.zips roll", a recovery image would be able to give more advanced outputs, like "An error occurred when trying to mount /data." And then give you the option to either try again, manually fix it by using a computer with adb, or quitting.
But that's just my personal opinion. The recovery would be way harder to make, but I was the original porter of CM6, CM7 and HTC Sense to the xperia mini pro and mini back in the days. I also made a custom recovery and roms for the HTC desire Z, maintain a CWM port for the HTC Chacha which I don't even own and have used the LG optimus 2x before. (currently a maguro owner) but I'm trying to say that I've been experimenting a lot with different phones and know what the possibilities of Android are. you could even make a live Android build, tailored for recovering your phone, which is ran by an update.zip! How cool is that? That would be VERY device specific though..
let me know what you think is the best way to do this. I was thinking of making a mobile time machine app for some time so it's good I saw this thread.

[REF] LVM Partition Remapping

OK, this thread is going to be a work in progress, intended to serve as a reference for the work I've been doing on LVM partition remapping.
My work was done initially on a Find 7, but this should eventually be usable on many other devices (I have the Find 5 and N1 in mind for when I return from vacation). Also, this would not have been possible without the work Steven676 did years ago on the Nexus S, which has been used by all AOSP-derivative projects to support the Samsung Aries (Galaxy S) family for quite some time now.
The current state of things is that the patches are solid and work very well for the system side of things, but there is still a bit of work needed on the recovery side of things. This is due to TWRP having an architectural limitation I need to work on - Whether a device uses emulated storage or not is set at compile time, which is a problem if your design requires automatic detection of configuration at run time.
One of the key design goals here was to support both normal and LVM configurations automatically with a single build that detects which configuration is present on a device at run time.
A second key design goal was that the underlying partition table of the device is not touched in any way. Touching the partition table of a mobile device in the field is a fundamentally dangerous operation, as many partitions contain data that is device-unique or will render a device unbootable if altered. Recovery methods that involve DDing partition images to nonstandard partitions is asking for trouble due to typos... There's no protection against a user typoing the name of a critical partition.
Initially, I'm going to dump the contents of an email I wrote to someone giving them documentation on how to integrate LVM into their project. Over time I'll clean up and reorganize this post, including adding some more links. Also, since this email was written, I've added a LOT of comments to each patch explaining what is going on.
For additional documentation, especially a more user-oriented view of things (such as how to set this up if you want to use it with Omni nightlies) - see the Omni nightlies thread on XDA.
So here goes:
How it's implemented - the complete patch set is at:
https://gerrit.omnirom.org/#/q/topic:find7_lvm - Expect this to periodically change as work on this feature continues (Note: All patches required to support nightly builds of Omni have been merged. At this point, all remaining work that I expect is on polishing up TWRP.)
With the rest of this post, I'll talk about each individual patch and what it does.
https://gerrit.omnirom.org/#/c/9273/ - This is a patch against frameworks/base which adds an alternative to storage_list.xml called storage_list_lvm.xml - The frameworks will choose storage_list_lvm.xml instead of storage_list.xml if the property ro.lvm_storage is set to 1 - The device init scripts will set this property if they detect an LVM configuration.
https://gerrit.omnirom.org/#/c/9207/ - This is an Omni-specific patch. Omni builds for both the Find 7 and OnePlus One (also known as find7op) and both share a common device tree. The LVM patches do not apply to the find7op, so we move init.recovery.rc out of the msm8974-common tree - You likely don't have to worry about this unless you also have a -common tree for find7 and find7op
https://gerrit.omnirom.org/#/c/9276/ - Normal Android kernel ramdisks do not include busybox or any form of shell, making it impossible to run shell scripts without /system mounted. Since we need to run a shell script prior to mounting partitions, we need to add busybox to the ramdisk. This patch does that. For legal reasons you may wish to replace busybox with system/core/toolbox and system/core/sh - I have not tried doing so. If you choose to stay with busybox, you will have to provide the busybox source code in order to comply with the GPL.
https://gerrit.omnirom.org/#/c/9205/ - This adds the LVM binary and LVM configuration file to the ramdisks of both normal boot and recovery. This patch does not actually begin doing anything with the binaries, I separated it out from the other patches as a way to keep things organized so I could start working with the binaries when I began this project. The original source code and documentation for the binary is at https://github.com/steven676/android-lvm-mod
One change I made in lvm.conf that differs from the Samsung aries family (galaxysmtd, fascinatemtd, captivatemtd, etc.) is that I changed the filter line to only allow the userdata and sdcard partitions. This prevents LVM's vgscan from accidentally determining another partition is a physical volume, and also prevents users from accidentally running pvcreate on a critical partition.
https://gerrit.omnirom.org/#/c/9206/ - This is where all of the "heavy lifting" is done. I'm going to work on adding more comments to the init scripts and shell scripts to document them tonight and tomorrow, but I'll try to explain things here.
Android's init system is a bit limited in that it's very difficult to have conditional behavior defined in init.rc - which appears to be why Qualcomm loves to use shell scripts called from init. Similarly, much of the LVM magic happens in three shell scripts (which execute at three different phases within the boot sequence).
In the early-init phase, the two "wait" blocks ensure that the underlying block devices are ready before vgscan/vgchange are called. This will probably slow down booting by a few fractions of a second unfortunately.
vgscan will scan the volumes defined in lvm.conf (in this case, only the userdata and sdcard partitions) for LVM physical volumes. If LVM physical volumes are detected and form a proper volume group, vgscan will create appropriate device nodes. With the configuration I'm using, the device node will be /dev/lvpool/userdata - which consists of a single logical volume that merges the sdcard and physical userdata physical volumes (partitions). The configuration of lvm.conf prevents LVM commands (especially pvcreate) from altering partitions we don't want to alter. If someone accidentally tries to, for example, run pvcreate on the system partition, it will give an error indicating that the partition was not part of the filter.
vgchange will activate the physical volumes detected by vgscan
lvm_init.sh will check to see if /dev/lvpool/userdata exists, and copy fstab.qcom.lvm to fstab.qcom, init.fs.rc.lvm to init.fs.rc, and twrp.fstab.lvm to twrp.fstab if it does. If it does not, it selects fstab.qcom.std, etc.
In the "on init" section, the init script exports all environment variables from init.fs.rc, and creates all storage-related directories and symlinks needed for both configurations (except for when they conflict). lvm_symlinks.sh will create directories/symlinks that must be configuration-specific. Just like lvm_init.sh - it decides what to do based on whether /dev/lvpool/userdata exists
In the "on fs" section - we do an SELinux restorecon on /dev/mapper/lvpool-userdata (/dev/lvpool/userdata would probably work here too). If it doesn't exist, this will fail gracefully without causing any issues.
In "on early-boot" - lvm_setprop.sh uses /system/bin/setprop to set ro.lvm_storage to 0 or 1 depending on the detected configuration. The property service is not available until early-boot - so this cannot be in lvm_init.sh or lvm_symlinks.sh This propery is used by the frameworks/base patch above to determine which storage_list to choose.
At the end of the init.qcom.rc, the fuse daemon for emulated storage is added for all configurations. (I could not figure out a good way to make this conditional based on whether LVM was present or not). In a non-LVM configuration, it runs but is harmless - it maps /data/media (which is empty) to /mnt/shell/emulated (which nothing is looking at due to the environment variables and symlinks set in the "on init" section )
You will probably notice that Omni's standard storage configuration is fairly different from ColorOS - this is due to the way KitKat storage works, but it allowed us to get away without using Oppo's ext4 permissions hacks in our kernel (by remapping permissions instead, in a manner similar to how the emulated storage system works) The way we handle our /sdcard partition does interoperate without issues with the ColorOS approach.
https://gerrit.omnirom.org/#/c/9279/ is a patch specifically for TWRP. TWRP currently determines whether to use emulated storage (/sdcard on /data/media) at build time instead of at run time. Until I have time to fix this, the patch here operates as a workaround. It is similar to the behavior of the fuse sdcard daemon in the previous patch - it maps /data/media to /sdcard whether the configuration is actually emulated storage or not. If the device is not using emulated storage (LVM), mapping of /data/media to /sdcard is still mostly harmless. However it does result in undesirable changes to TWRP's user interface. DO NOT USE THIS APPROACH IN PRODUCTION RELEASES. It's a horrible hack. You'll need to figure out how to properly do /data/media handling depending on whether LVM is present or not based on how your own recovery architecture works.
https://gerrit.omnirom.org/#/c/9281/ adds "raw" sdcard and userdata partition entries to the partition table for the LVM configuration. This allows a user to return their device to a standard configuration by formatting the underlying sdcard and userdata partitions directly, instead of the removelvm ZIP at the beginning of this email. - To be abandoned, this patch was squashed into 9206
FAQ
Q: Coldbird already had repartitioning support. Why did you create this different approach?
A: Even before he started work, I strongly recommended that he not touch the partition table of the device. It's a really bad idea and is fundamentally dangerous. It's pure luck that someone hasn't hardbricked yet. (A number of people have come close.) If you read through his thread and the ColorOS 2.0.2 thread, you'll see that the repartitioning approach fails frequently, and in multiple ways. (Missing partition contents, partition table ending early, etc. The latter is really scary, one person had the process fail at mmcblk0p19 - what if someone else's partition table write operation aborted even earlier?.) Also, nearly everyone that has implemented support for that approach has needed a separate build to support it. (Oppo is the first to manage autodetection.) I also provided him all of the reference information from Steven676's work.
LVM is far safer. The underlying partition table is not touched in any way. Instead, LVM remaps sectors on the fly so that two partitions that are not adjacent to each other on the physical storage appear as a single contiguous partition to the filesystem drivers. Linux has supported LVM for on the order of a decade, if not more. I've been using LVM on my file server since 2006. (Yes, the system is 8 years old and still working other than needing a new power supply after a thunderstorm. Nothing to do with LVM. ) In addition, the lvm.conf configuration used here provides protection against accidental typos causing damage. Undoing the changes is as simple as doing a wipe of /data and /sdcard from any standard recovery and can be done in seconds, not of running a special batch file that runs a bunch of fastboot commands and takes 4-5 minutes. Similarly, the LVM setup process currently described in the Omni thread involves flashing a single ZIP from recovery that takes only 10-15 seconds, and most of that process is flashing an LVM-aware recovery. (The only limitation currently is that the ZIP must be on external storage - USB OTG or MicroSD)
To put it simply, it Just Works. No need to back up a pile of partitions other than /data and /sdcard because those partitions are never touched or altered.
Q: I have a device with a ridiculously oversized /system partition, can I get some of that back for /data?
A: Yes, you can. Add the physical /system partition to the lvm.conf filters and add it to the lvpool when creating it, then create a smaller /system LV out of this big pool. (see updater.sh in device/samsung/aries-common/ of any AOSP-derivative for hints here.) Be careful though - leave enough spare space for growth (new Android versions, etc.) While it should be possible to use some of the LVM tools along with ext4 resize tools to reorganize the LVs without wiping, this is very difficult and you'll probably have to make users wipe /data if you want to alter /system.
*reserved 2*
Nice work, I hope all the patches can be widely used on some other devices and other roms.
systop said:
Nice work, I hope all the patches can be widely used on some other devices and other roms.
Click to expand...
Click to collapse
Yup. I know Andre from PA was working on it last week but I haven't heard from him lately.
My priority when I return from vacation will be fixing up the TWRP side of things. It's working for now, but the user interface on non-LVM configs is a little funky thanks to RECOVERY_SDCARD_ON_DATA being compile time. This has never been a problem before since a single TWRP binary never had to support two different configurations before. I plan on either doing a property-based approach or fstab-based like CWM. (It should be possible for someone to make a CWM build that automatically detects configuration without any modifications to CWM, based on reading the code - but I haven't tried it myself.)
Once TWRP is in better shape, I plan on doing the Find 5 and N1. These will have the challenge of not having a MicroSD slot, so I may have to change TWRP so that it use /tmp instead of /sdcard when doing "adb sideload", or at least gives the user that option.
Good stuff :good: I don't really need it as of yet, but when my new device is provided (warranty) I will surely give this a try.
I hope ayysir will merge the LVM support very soon ^^
Find 7u PA 4.6 beta 1
Awesome work mate. I have avoided other methods because I'm always the guy that will have a device fail at very bad timing; like during boatloader or SBL stage.
I'm really glad you have continued to work on this. I have hit thanks a few times but would also like to thank you here
tork987 said:
I hope ayysir will merge the LVM support very soon ^^
Find 7u PA 4.6 beta 1
Click to expand...
Click to collapse
He had issues with merging support, hopefully now that I've added more documentation he can try again.
how are the *.std files created?
atm this is tough for me to port from omni to cm base which AOSPA Oppo trees
ayysir said:
how are the *.std files created?
atm this is tough for me to port from omni to cm base which AOSPA Oppo trees
Click to expand...
Click to collapse
the std files are also part of the device tree
https://github.com/omnirom/android_device_oppo_find7/tree/android-4.4/configs
ayysir said:
how are the *.std files created?
atm this is tough for me to port from omni to cm base which AOSPA Oppo trees
Click to expand...
Click to collapse
For the fstabs - they are simply moves/renames of the fstab files and other storage-related items from the standard Oppo configuration (they should appear as renames/moves in the Gerrit commit...)
For the init.fs.rc file - all of the "export <blah>_STORAGE" lines from init.qcom.rc/init.find7.rc are cut out of the RC file and put into .std
Obviously, the .lvm versions of the files are the ones where the fstab has been altered to support a single data partition with emulated storage.
Amazing work and amazing posts. Thanks a lot for your sharing. ?
I've got a question related to your configuration (/data and /sdcard merged) : are the LV hot-resizables?
Wendigogo said:
Amazing work and amazing posts. Thanks a lot for your sharing. ?
I've got a question related to your configuration (/data and /sdcard merged) : are the LV hot-resizables?
Click to expand...
Click to collapse
In theory, you could probably use some of the ext4 resizing tools to do something like this, but I haven't looked into it as there isn't much point in the current config (since the LVM userdata volume is allocated to use all space on the volume group).
Something like that might be more useful if someone ever uses LVM to regain some of the wasted /system partition space on certain excessively bloated devices (like some GS4 units).
Entropy512 said:
In theory, you could probably use some of the ext4 resizing tools to do something like this, but I haven't looked into it as there isn't much point in the current config (since the LVM userdata volume is allocated to use all space on the volume group).
Something like that might be more useful if someone ever uses LVM to regain some of the wasted /system partition space on certain excessively bloated devices (like some GS4 units).
Click to expand...
Click to collapse
Thanks for your answer.
Seems I misunderstood the way it's implemented here. All space is allocated to /data? So there's no more internal sdcard right?
But in that case an external sdcard is mandatory. How is it managed when there's no sdcard?
Enjoy!
Wendigogo said:
Thanks for your answer.
Seems I misunderstood the way it's implemented here. All space is allocated to /data? So there's no more internal sdcard right?
But in that case an external sdcard is mandatory. How is it managed when there's no sdcard?
Enjoy!
Click to expand...
Click to collapse
Android has supported emulated storage (where /data/media is mapped to /sdcard with a special FUSE daemon that makes /sdcard have DOS-like permissions despite an underlying ext4 partition) since ICS. It's pretty much the standard in all new devices - the Find 7 is to my knowledge the only device launched in 2014 not to use emulated storage. Most devices in 2013 also did - Oppos were again the rare exception.
As I understand it - for some reason Chinese users prefer the legacy pre-ICS partitioning scheme. My guess is due to UMS vs. MTP - MTP is required for access to emulated storage, UMS can't be used, but a lot of older desktop OSes have issues with MTP. So Oppo finds themselves in conflict between their home market (China) and expanding in the West. That said, the Find 7 was kind of a screwup in achieving this goal, since the internal sdcard partition was ext4 which meant UMS was a no-go for it.
Entropy512 said:
Android has supported emulated storage (where /data/media is mapped to /sdcard with a special FUSE daemon that makes /sdcard have DOS-like permissions despite an underlying ext4 partition) since ICS. It's pretty much the standard in all new devices - the Find 7 is to my knowledge the only device launched in 2014 not to use emulated storage. Most devices in 2013 also did - Oppos were again the rare exception.
As I understand it - for some reason Chinese users prefer the legacy pre-ICS partitioning scheme. My guess is due to UMS vs. MTP - MTP is required for access to emulated storage, UMS can't be used, but a lot of older desktop OSes have issues with MTP. So Oppo finds themselves in conflict between their home market (China) and expanding in the West. That said, the Find 7 was kind of a screwup in achieving this goal, since the internal sdcard partition was ext4 which meant UMS was a no-go for it.
Click to expand...
Click to collapse
I've got it now. Thanks for your explanations
I saw that Oppo phones didn't follow Android guidelines (yet?) by not using the emulated_storage mounting method but I didn't know why.
And your right, mtp doesn't work in Windows XP (or is hard to make working) and there's a lot of Asian people still using it. Obvious once you said it...
And that's also why only external sdcard is accessible in UMS mode in recovery.
Thanks again for your enlightenment. ?
Reading some of the comments on G+ it looks like Oppo might be using this solution for their KitKat release. I would be so pleased if they did.
Sent from my X9076 using Tapatalk
kishd said:
Reading some of the comments on G+ it looks like Oppo might be using this solution for their KitKat release. I would be so pleased if they did.
Sent from my X9076 using Tapatalk
Click to expand...
Click to collapse
You could be pleased...
Wendigogo said:
You could be pleased...
Click to expand...
Click to collapse
Had some problems with camera focus on earlier versions of omnirom for find 7. Now those have been addressed. I installed Omni and am on the nightlies with lvm. My find 7 and find 7a will not see another rom again.

Dual Partitions?

I heard talk of the partitions in these pixel phones being different than the Nexus phones were. Like how the Nexus phones had bootloader, radio, system, recovery, boot, userdata, and cache. What do they mean when they speculate "dual partitions"? And for that matter, how are they going to update older Nexus devices if the partitions are different than the Pixel? A lot of questions I know, but hell, figured why not ask away.
I want to know how much space the 32GB variants have left after the dual partitions are accounted for.
LLStarks said:
I want to know how much space the 32GB variants have left after the dual partitions are accounted for.
Click to expand...
Click to collapse
I think I saw a video that showed 29GB
Edit: formatted to 29 but 24.3 available
H4X0R46 said:
I heard talk of the partitions in these pixel phones being different than the Nexus phones were. Like how the Nexus phones had bootloader, radio, system, recovery, boot, userdata, and cache. What do they mean when they speculate "dual partitions"? And for that matter, how are they going to update older Nexus devices if the partitions are different than the Pixel? A lot of questions I know, but hell, figured why not ask away.
Click to expand...
Click to collapse
Current devices have a single "system" partition, containing the OS and included apps, which gets patched when an OTA update is released. You can't use the phone when the OS is being patched and it's a slow process.
With the new feature, the new phones will have two system partitions (let's call them A and B). The phone can run the OS from one of these partitions (A), while the other partition is upgraded by an OTA update in the background (B). When the upgrade has been downloaded and applied to partition B, the phone can quickly reboot into the OS on partition B, making the upgrade much faster from a user point of view.
The next time the phone installs an update, it can apply it to partition A in the background.
All existing devices will simply continue to use the existing partition structure and patching process.
Daveoc64 said:
Current devices have a single "system" partition, containing the OS and included apps, which gets patched when an OTA update is released. You can't use the phone when the OS is being patched and it's a slow process.
With the new feature, the new phones will have two system partitions (let's call them A and B). The phone can run the OS from one of these partitions (A), while the other partition is upgraded by an OTA update in the background (B). When the upgrade has been downloaded and applied to partition B, the phone can quickly reboot into the OS on partition B, making the upgrade much faster from a user point of view.
The next time the phone installs an update, it can apply it to partition A in the background.
All existing devices will simply continue to use the existing partition structure and patching process.
Click to expand...
Click to collapse
So basically, Android OS would be installed on both partitions? That's too weird. That will take some getting used to!
It's more than just 2 system partitions, as those aren't the only potential partitions affected by an update. llabtoofer posted the exact duplicate partitions a while ago on Twitter.
I want to the size of each partitions.
Please show below via adb shell.
cat /proc/partitions
ls -l /dev/block/platform/soc/7824900.sdhci/by-name
*7824900.sdhci is diffrent name folder.
Milly7 said:
It's more than just 2 system partitions, as those aren't the only potential partitions affected by an update. llabtoofer posted the exact duplicate partitions a while ago on Twitter.
Click to expand...
Click to collapse
Hey I know this post is a little old but do you happen to know where I can find that post ?
aholeinthewor1d said:
Hey I know this post is a little old but do you happen to know where I can find that post ?
Click to expand...
Click to collapse
Very old post lol. You should search XDA for a user named llabtoofer. He knows a lot about HTC phones. I'm quite sure he will answer. You can also search for him on Twitter which is where he originally posted it prior to the phones release date.

Categories

Resources