yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] Catfish78:
Because i am using an other file manager, i had not testet the build in one. I can confirm, too that it crashes. Is it possible the permissions are missing? Settings are empty.

Regards
[Galaxy S II Android Development] rINanDO:
Hi,

I also noticed the issue of the filemanager. Sounds like a lineageos bug which is likely already fixed. Please wait for the next build with updated sources. About WiFi I also noticed it. I'm not sure it is a (powersafe)feature or a bug in Pie.
[Galaxy S II Android Development] samarium:
re: Alex

I'd have to agree with bersem here. Try older versions.

If you have already repitted using lanchon for Pie, then that PIT should be fine for CM/LOS 13.14.15, and shouldn't need to be undone/redone to run those versions.

IIRC you are using the "external" sdcard slot, above the battery, for your flash images, certainly that is what I am doing, and select that storage before flashing images., as this makes it easy to wipe internal-sdcard as there isn't anything on it at this stage.

TWRP 3.0.2.1 is what I was using from CM/LOS 13, and it worked fine for LOS 16 install.

Make sure you create .md5 files for each image to be flashed, and check after download.

Transfer the .md5 file with the flash image to the external sdcard and enable md5 checking before flashing in TWRP. You should be able to check the md5sums on the external sdcard on your computer before you relocate the card to the phone. If there are any data integrity issues you want to catch them ASAP.

Before any clean install wipe cache system data internal-sdcard.

Install from external sdcard. Don't install GApps until you have a working base install. I suggest you use the above buildprop hack after the base install, as it seems simpler than removing the setup apk.

If you have a working base install then you can try and install GApps afterwards, or do a clean install again and install gapps before reboot.

You should be able to install 13, 14, 15 this way to verify they work, and provide further data.

Your phone could still be slightly dodgy hardware, and it might only get tickled in 16 because of particular usage profiles. Unlikely, but certainly I have heard of phones that don't have good enough hardware to operate at the nominal voltages set by the kernel, and had to be used with a kernel which allowed slight overvolting. There could also be bad RAM or flash. I think I'm having flash problems on a Redmi Note 3, which is why I'm delving into backup phones like the S2.

See also [MENTION=5106933]Oxydeme[/MENTION] i9100 oreo LOS posting: https://xdaforums.com/showpost.php?p=78524982&postcount=806 about bad EMMC configuration.
[Galaxy S II Android Development] snsnse:
Yes, I can confirm that. It's a bit erratic actually, most of the time I have to enter it twice, sometimes it works right away, other times I need three attempts.
[Galaxy S II Android Development] Catfish78:
Hello,

[MENTION=2222292]rINanDO[/MENTION] : comparing the cpu activity with the app "cpu stats", in LOS 15.1 it slows down to 0,1 GHz and one core, in LOS 16 minimum is 0,5 GHz and both cores running. Maybe there is something to change for less power consumption?

Regards
[Galaxy S II Android Development] Alexander Maison:
[MENTION=2687058]samarium[/MENTION]

Well, I have done all the instructions listed here. I have been using an external SD card, I created an MD5 file to go along with it to verify file integrity in TWRP, I wiped DATA, CACHE, INT SD, DALVIK CACHE, etc... I'm just lost. I literally don't know what to do. I suppose I'll have to try LOS 15.1. As for this ROM, no-one believes I'm telling the truth, and everyone seems to believe it's just me having these problems. This phone works just fine. CM 12.1 based ROMS and the stock ROM work fine, this phone is A-okay. If there are any more details that would help you help me, then please ask everything you can think of.
[Galaxy S II Android Development] Catfish78:
Hello,

i´ve put the site which helped me to get it run into an translator, maybe this will work. Please use the linked files as described, with only the newest build from here for testing. Start with Odin, not only updating:

https://www.microsofttranslator.com...s-16-0-auf-dem-samsung-galaxy-s2-installieren

Sorry, i was first on the wrong phone, i have a S4 mini, too. Hope this will work. Try it on your own risk.

Regards
[Galaxy S II Android Development] lee.wp14:
Hi [MENTION=2222292]rINanDO[/MENTION] ,

Is there any chance that the graphical glitch fixes can be implemented to oreo?
[Galaxy S II Android Development] rINanDO:
Yes. This is because the PowerHAL is not implemented in LOS 16.0 yet.
[Galaxy S II Android Development] bersem:
[MENTION=2222292]rINanDO[/MENTION] Again, the battery has been discharged overnight. I charged it before sleeping.

I did not have these problems with Oreo build.

Can the logcat help?
[Galaxy S II Android Development] guest4711:
Probably not. As long as the Hardware Abstraction Layer (HAL) is not implemented the interface between hard- and software is missing...

If that is a problem for you you should stay on/return to O.
[Galaxy S II Android Development] bersem:
The question did not relate to the HAL implementation. I just quoted his last post.

My misstake, zivio ;)
[Galaxy S II Android Development] guest4711:
IMHO it is related. The missing HAL implementation results in draining the battery...
[Galaxy S II Android Development] Oxydeme:
Hi there,

Encountered a wild bug,

After few reboots, it seems that root get lost ^^'

Good Luck :)
[Galaxy S II Android Development] bersem:
You're right, but I do not think this HAL implementation can be the reason in my case. That does not always happen. The average battery consumption is 10% and more overnight. By comparison, my second S2 with LOS 14.1 build consumes only 1-2% overnight. Airplane mode or without and no WiFi.

In flight mode with Wi-Fi it will be completely discharged on Pie.

I can also accept the 10%, but not if it is completely discharge as in my case.
[Galaxy S II Android Development] Catfish78:
Hello,

my S2 did the same twice, at the first night it did not happen. With switched off WiFi everything´s ok so far.

Yesterday i just took my phone for a photo. Had to boot it first. After around 8 x trying to unlock the screen with a figure i gave up :) , switched it off again and drove home. Later at home it was unlocked on the first run. Is there anything i can do to help findig out why this happens? No problems with errors, i just want to help.

Regards
[Galaxy S II Android Development] rINanDO:
The PowerHAL implementation does not solve this massive drain. It is just finetuning and support for extra powersave by limiting cpu speed. An app is most likely holding you phone awake, so deep sleep doesn't happen.
[Galaxy S II Android Development] rINanDO:
In Oreo and Pie there is a feature which turns on automatically your WiFi...and this enabled by default. Meaning it is possible some apps are syncing and consuming battery extensively.
[Galaxy S II Android Development] snsnse:
On Pie, Wi-Fi scanning can be disabled here (if that's what you were referring to):

Security & location -> Location -> Advanced -> Scanning -> Wi-Fi scanning
[Galaxy S II Android Development] bersem:
It is disabled by default.

Regards
[Galaxy S II Android Development] bersem:
I have the following problem. When i use flight mode with WiFi enabled, i do not receive notifications when idle (during sleep mode ) . Only after activating display or the opening one of the APP the notifications comes.

Background data is limited in flight mode?

Can i do something there?
[Galaxy S II Android Development] Catfish78:
Hello,

can someone confirm if this works for his phone, too? I took the app "kernel adjutor" to change the govenor to "ondemand". After this the cpu goes down to 0,1 MHz and one core, phone runs over night with Wi-Fi and battery isn´t empty in my case. Trying to save power with greenify alone didn´t solve the problem on my S2.

Regards
[Galaxy S II Android Development] nhmanas:
I can't flash pie roms due to error 7

I tried twrp3.0.2 and 3.2 nothing changed

My device have enough system space btw
[Galaxy S II Android Development] guest4711:
The recovery log (saved in TWRP directly after the failure) would help to understand what is going wrong.

One reason for error 7 is an unsupported device, another an unsupported filesystem... Make sure your /system and /cache partitions are formatted as ext4fs.
[Galaxy S II Android Development] nhmanas:
both partitions are formatted as ext4 and there is no log file in /twrp. There is only .twrps

edit: here's recovery.log that I found in the root of the sdcard0
[Galaxy S II Android Development] samarium:
IIRC I had a problem flashing when /system < 1536M. I had checked my actual usage, and 1024M was more than enough with nano gapps. So after doing a full backup, I repitted to /system=1024M and tried to install, fail. Wiped /system /cache, format /data, rebooted to recovery and tried again, fail. Repitted back to /system=1536M and flash worked. Irritating that I don't need 1536M /system, but install image seems to be based on that minimum, and not worth the hassle of chasing down 512M. I guess if I can build a build environment and build my own images I could reduce the minimum, and if I do that I would also like to explore the unified storage of /sdcard emulated from /data/media as I think that would solve some other issues too, but haven't explored building the build environment yet.

YMMV, but check /system is big enough. You tried TWRP 3.2. Did you try 3.2.3-0?
[Galaxy S II Android Development] rINanDO:
New build is up!

I decided to go with emulated storage to due legacy storage issues. Please give your opinion on this and please give feedback on the instructions I posted in OP (opening post). Happy testing!

Build #7 2019-2-2

IMPORTANT: You need to migrate to emulated storage using TWRP 3.1.0-EMU-MIGRATION-M-20170318

See opening post for detailed installation instructions.

Overall state: Stable-ish

Android build: 9.0.0-r30

Implemented PowerHAL

Implemented Advanced Display with mDNIe scenarios and kernel fixes

Decreased heapsize to 256mb

Set Server Compiler Filter to speed for performance

Pthread issue in libc moved to shim, thanks to [MENTION=5695278]ChronoMonochrome[/MENTION]

Known issues:

V-sync not working properly like in LOS 15.1

GAPPS crashes during first start.

Sometimes graphical glitch at wake up (mDNIe related)

Downloads:

TWRP 3.1.0-EMU-MIGRATION-M-20170318

lineage-16.0-20190202-UNOFFICIAL-i9100.zip
[Galaxy S II Android Development] pocketrule:
Works great, Thanks [MENTION=2222292]rINanDO[/MENTION] :good:

I now see 13 GB Data-Partition - more than enough space for what i use our old device.

I've had difficulties to connect the device to a windows computer, and couldn't change USB Preferences, but got it running by changing Default USB configuration in Developer options.

Following your instructions for Clean install from LOS 16.0 < Build #7, installation was very easy. Regarding step 7 i haven't found /data/system/storage.xml to delete. But this is probably because I first mixed up the sequence of zip files to flash. :rolleyes:
[Galaxy S II Android Development] bersem:
Actually I wanted to do it with the migration and the update of the last build. Had everything prepared for it but then I made a misstake and wiped all.

Fortunately, I had previously backed up all apps with Titanum and copied all the files to the computer.

Made a clean install ( lanchon-repit-20170115-system=1.5G-data=6G-sdcard=max-preload=min+wipe-i9100 ) and then restored all apps with Titanum and the files back from the computer.

Lanchon tool had 2 errors: unable to mount all partitions and file system errors in partitions *11 "sdcard" (UMS) could not be fixed.

Didnt find :confused:

Everything is working well so far, the battery consumption and charging is a bit strange at first glance.

Thank you [MENTION=2222292]rINanDO[/MENTION] :good: :good:

EDIT: Graphical glitch after unlock ( wakeup ) that were not in the previous build. But are known...
[Galaxy S II Android Development] pocketrule:
your file system errors result perhaps from the different repit-file you've used?!

according to latest flash instructions we should use

lanchon-repit-20170115-system=1.5G-data=max-sdcard=min+wipe-preload=min+wipe-i9100.zip
[Galaxy S II Android Development] bersem:
Yes, I knew that. I use the same data partition size on both my devices to get more apps.

But do not think that it can be.

[MENTION=2222292]rINanDO[/MENTION] much faster without lags for now

EDIT: Graphical glitch when using. Repeats again and again..

Diskinfo says: UMS storage not mounted ?
[Galaxy S II Android Development] pocketrule:
First I have to admit, that I don't really have an in depth knowledge about the android file system. But I thought with the original partition scheme on our Galaxy S2 we've had two separate partitions for /data and internal storage. And by repartioning, we could increase /data partition to be able to install more apps. But the bigger /data the smaller internal storage for user data (photos, downloads, music etc.).

By changing to emulated storage, there's only one data partition remaining, i.e. you have one big partition sharing app installations and user data. So with the new partioning scheme you should be able to install even more apps, because your are not limited to 6 GB anymore - if you don't have too much user data stored on your phone :)
[Galaxy S II Android Development] bersem:
Yes you are totally right. I forgot it and was too hasty. Everything understood.

Should I leave it so now or again with the migrate and update the build?
[Galaxy S II Android Development] pocketrule:
According to the explanation from [MENTION=2222292]rINanDO[/MENTION] I'd give it a try :)

Who would ever go back to CM 15 (or less) if we've got a (rather) stable PIE build :D

Attached you can see a screenshot of DiskInfo - with the huge /data partition of 13 GB
[Galaxy S II Android Development] rINanDO:
The thing with storage.xml is just to make sure it isn't there, because it should 't be. So no problem.
[Galaxy S II Android Development] rINanDO:
I experienced the glitch vary rare... But it's there. Thanks for you feedback!
[Galaxy S II Android Development] bersem:
After 2h of testing i can say it is fast like LOS 14.1 maybe much faster as 14.1

Great work [MENTION=3742928]rlNanDO[/MENTION] :good: :good:
[Galaxy S II Android Development] bersem:
Made a clean install again. Lanchon tool had no error with UMS. No i am on Emulated Storage.

Btw. I dont like Emulated Storage :)

[MENTION=3742928]rlNanDO[/MENTION] this time i found storage.xml file and deleted it. :good:

Inital-Setup works fine now. :good:
[Galaxy S II Android Development] samarium:
Emulated storage is something I wanted to see, thanks. I will test but currently 6 days into a flight mode + extreme power saver battery test with a new battery, and it projects another 10 days of battery life, so will test after that.
[Galaxy S II Android Development] ran000:
Success with "Migrate and update to LOS 16.0 Build #7 Emulated Storage" procedure. No problem with all applications except Googe Play: Only "Storage" app is shown as installed, no others. Pleaase, any comment.
[Galaxy S II Android Development] bersem:
Do you mean your installed APP`s are not showing in Google Play?

I think that is normal, I had it earlier too if I changed the google account, for example.

It takes a bit of time for the data to be synchronized or for the next update of one of the APP.

EDIT: Display usage about 2 hours and 30% battery left. Awesome [MENTION=3742928]rlNanDO[/MENTION]

Btw. had one soft reboot
[Galaxy S II Android Development] ran000:
But I did not change my Googe account!?
[Galaxy S II Android Development] bersem:
Did you try to clear cache and data on Google Playstore, Google Play Services and Google Services Framework ?
[Galaxy S II Android Development] ran000:
It help. Thank you
[Galaxy S II Android Development] DevisG79:
Hi rINanDO!

I did the procedure yesterday evening and all went well. The instructions in OP are good to understand. It's the first time I have emu storage and I must say, why not. I don't have problems with it. Now we have a big data partition. But I guess when doing a factory reset pictures and videos are lost then, is that right? But that wouldn't be a problem because it can all be stored on microSD card. Rom works good and stable. Lost 8% ? in 13 hours (3000maH). Had one freeze when opening battery settings (shortcut). Can confirm that clearing play store data helps.

Good job:svetius:
[Galaxy S II Android Development] rINanDO:
Hi DevisG79,

I recall that my version of TWRP doesn't touch the emulated folder. It doesn't actually format the Data partition but only wipes everything except /data/media and the storage.xml. With other versions of TWRP I don't know. Please be careful wiping DataFS with other versions because they could format the partition and you will loose everything on it!
[Galaxy S II Android Development] DevisG79:
Ok, thanks for clarifying. Didn't know much about that because emu storage is absolutely new for me.
[Galaxy S II Android Development] samarium:
This battery interests me given the stock battery is 1650 mAh. Have you done anything to confirm that the battery capacity is really anywhere near 3000 mAh, like used some kind of charging meter, or is it just that the seller said 3000 mAh? I'm always very suspicious of sellers who quote much more than standard battery capacity in standard battery size, in this case nearly double the capacity. If it really is 3000mAh then I would be interested if you had a link to where you got it.
[Galaxy S II Android Development] ripee:
[MENTION=2222292]rINanDO[/MENTION] [MENTION=8145312]linusdan[/MENTION] 0cf2973 has to be reverted or else the compilation errors out.
[Galaxy S II Android Development] DevisG79:
I have my S2 since seven years and had the original 1650 and 2000 maH battery and now this, bought in May 2017. To confirm I made nothing, but it takes about 5-6 hours to fully charge and with LOS15.1 it was 1 week in standby without fly mode and Greenify or something else. SOT is also much better. Of course the battery is thicker and heavier and you will have another back cover. If I remember right there were also other batteries with less than 3000maH. So it's your choice. Until now I don't have problems with that. Take a look at www.akku500.de
[Galaxy S II Android Development] samarium:
Thanks. I forgot about the augmented batteries with new back cover, so long ago since I used one of those, IIRC it was for my Nexus 1. Capacity makes sense now. I'll check out the web site, thanks.
[Galaxy S II Android Development] bersem:
Lost 15% battery over the night with wifi and no flight mode. Had one soft reboot like System UI restart.

My two S2 compared LOS 14.1 and 16.0

What a difference !

Many thanks [MENTION=3742928]rlNanDO[/MENTION]

Photos made by Iphone :D

Another small supplement I want to get rid of. I would be happy if I had half of your knowledge. Hope and wish you that your knowledge brings you far in your life !!
[Galaxy S II Android Development] MagMerlin:
Please, friend, where did you find 3000maH battery for i9100?
[Galaxy S II Android Development] guest4711:
Have a look onto https://xdaforums.com/galaxy-s2/development-derivatives/pie-i9100-t3850588/post78838717

There you'll find a link to http://www.akku500.de/
[Galaxy S II Android Development] toffiko:
Dear all

I need your kind advise about my issue, I tried yesterday to install your cookie LOS16 on our belowed S2, but I encountered big issue with run rePIT script, I am already on lineageos 7.1.2 with using DorimanX kernel and was using latest TRWP 3.2.3. I did all the steps when doing migrate using second method 'Migrate and update to LOS 16.0 Build #7 Emulated Storage', Originally I am already using 1GB system/4GB data partitions, some time ago I did repit with Odin with using pit file, and never had problems with it after done it.

So I flash 'TWRP-3.1.0-EMU-MIGRATION-M-20170318.zip' and when I run this twrp I next try to run this ZIP 'lanchon-repit-20170115-system=1.5G-data=max-sdcard=min+wipe-preload=min+wipe-i9100.zip' from microSD, and I have always error fails and there is no such possibility like you described to get continue to repatition from /tmp/.. there is no such information or option to confirm continuing it, moreover stangely on the end of running this zip there is last info 'operation success' or sth like that, this is really strange.

Anyways after I format every partition (apart from micro SD) I go into every partition details to check their sizes but nothing has changed, it mean no repartition :( ..nothing has changed

Please advise what else can I try, in such case only solution is to use Odin and flash some stock soft with using PIT file to do repartition with odin? This is rather most unwanted option to do right now for me because will loose recovery and all so I dont want to go this way, is there other possibilites?

Please advise what else can I try since I reached dead end .. and for now I reverted official recovery 3.2.3 and restored all datas from backup.
[Galaxy S II Android Development] TriboDoP:
An you did this: ?

Go back to Install -> Select Storage -> Internal Storage, OK.

Now tap on : (Up A Level),

scroll down and enter the "tmp" folder
[Galaxy S II Android Development] bersem:
Try it with [MENTION=6560258]the.gangster[/MENTION] Odin pit file. And repeat the process with lanchon repit tool after according upgrade instructions.

Odin pit file you can find here in S2 branche.

Odin pit file 1.5GB system 6GB data 512MB preload

https://xdaforums.com/galaxy-s2/development-derivatives/rom-cyanogenmod-13-t3223808/page32
[Galaxy S II Android Development] toffiko:
good point, I already ahve Gangster's PIT save some time ago and will use it with Odon, but been honest it was so long time ago that I forgot how to use Odin :)

As far as I recall there is need to flash stock software with it? Or rather it is possible to flash only standalone recovery with re-pit option checked? In such case recovery file which can be used in Odin should be in *.bin format, am I right or wrong rather its not possible and the only way to go is to flash full stock ROM with stock recovery?

I dont even remember if bootloader was unlocked to flash TWRP direcly via ADB in download mode. I will play around with to to sort it out but maybe you've been doing it recently so you can save up me some time ;)

Anyways, thank you for pointing me out.
[Galaxy S II Android Development] bersem:
I remember that you can do it without ROM flash.

Insert the I9100_1.5GB-System_6GB-Data_512MB-Preload_by-the.gangster.pit file in the Pit field in Odin. Check the three things as in the screenshot.

Boot in the download mode before. Hope your charging port is in order and the device is also recognized by the PC. It must appear Added in Odin after connecting the cell phone.

Of course you need the Samsung USB drivers if you have not installed them yet.

The recovery for Odin is always in .tar format and can be flashed with AP / PDA.

Maybe im wrong so look at this thread:

https://xdaforums.com/galaxy-s2/help/preparing-clean-loss-data-installation-t3712409

Repit with LP Kernel. Use only the repit step from this Thread if you wish.

EDIT: Make a backup before especially EFS !!!!
[Galaxy S II Android Development] ripee:
With all due respect to rINanDO, if you don't want to use emulated storage for whatever reason, see my Google Drive link in my signature for my builds. You can use the official TWRP for them. They are identical to rINanDO's builds except I reverted the 2 commits that enable emulated storage. (The commit in galaxys2-common is in the patch.)

If in doubt, try both emulated and non-emulated storage to see which runs better. I re-partitioned my device with lanchon-repit-20170115-system=1.5G-data=5G-sdcard=max+wipe-preload=min+wipe-i9100, which results in around 8GB for the sdcard, since I don't run that many apps anyway.
[Galaxy S II Android Development] snsnse:
Are you and rINanDO commiting to the same code base/repo or is this a parallel development? If the latter is the case, are there plans to merge your efforts?

Thanks