yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] Eric80:
First thanks a lot for the amazing work which will allow recycling some old Samsung SII !

I got recently a i9100 to play with. I first did a factory reset on the stock ROM, on Android 4.1.2

And trying to flash to Android 12.1

this is one of the key msg in the whole flashing procedure, but likely still need a bit more details for newbies.

I used Odin to flash my phone as stated in the first page, so as steps 1 and 2.

And ended as well in the 'download mode'.

I did it twice, same story.

Then, I followed your step, with the zip file in microSD.

5. I used the key combination home+volUp+start which started TWRP, I chose the 'install zip' stuff.

I got a few errors there: the partitions could not be mounted properly:

I first let it reboot, it started with the lineAgeOS logo but did not move for 20 min.

6. I removed the battery, started again in TWRP, did the wipe per default. What is meant here with 'full' wipe?

7. During the reboot, the LineAgeOS logo appeared again, and then it switched to a "Encryption unsuccessful" screen, with a button "Erase all data" I can NOT press as if the touchscreen will be inactive.

Thus, I just restarted the phone. But back on this "Encryption unsuccessful" page.

The phone is still recognized from my PC, but using adb

> adb devices

List of devices attached

0019ab5e42017e unauthorized

while it says 'recovery' when started in TWRP. And used to be the correct 'device' before I started the whole process.

What should I do now to fix the flash?

EDIT: looking a bit further in the TWRP options, no wonder that I got the above errors: my 'data' partition is not setup properly, set to size 0 MB.

I however can't resize or repair it.

But could format it and is now 12591 MB as expected from the pit file

The 'Cache' partition is 74MB, as from the pit file

The 'System' partition is 2015 MB, I suppose it corresponds to the FACTORYFS

'Preload is 7 MB, so for the UMS or HIDDEN partition.

'Internal storage' is invalid

So for the point 5, the 'format data' is the key.

Now my i9100 is now setup with LineAgeOS :)

However, it is slow...

8. I could then install the BiTGApps-arm-12.1.0-v2.3-CORE.zip via the 'install zip' of TWRP

Edit2: specially after the BitGApps install, the smartphone is so sluggish that it is barely usable.

As already mentioned by one comment, the "battery manager" is slowing down the whole, so the first step is to disable the battery manager. And disable the gestures navigation, also slower than the buttons.

Nevertheless, the GooglePlay does not work properly: it keeps saying 'you are offline' while the browser is working fine. I am only on Wifi, tried both the 2.4Ghz and 5Ghz.
[Galaxy S II Android Development] TheHitMan:
There is nothing wrong with the GooglePlay. You're supposed to install BiTGApps before first boot, otherwise expect unusual issues.

You can stay updated with BiTGApps XDA Thread.
[Galaxy S II Android Development] Eric80:
yes, that a good point.

but it seems the google services are just making the phone too slow.

I just want the Google Play Store, the other services are less interesting to me.

I eventually re flashed the phone with the ROM for June 2022, without BitGApps, but using the ApkPure app instead of GooglePlay to install further apps. https://apkpure.com is working ok, but the app is blown by the ad...

The phone is still a bit slow for an comfortable use.

I wonder if any older version of LineAgeOS would bring a better performance/compatibility compromise. Any recommendation? Android 7 / LOS 14.1 is the last 'official' build, but Android 9 could be useful, since we see the first app that refuse to run on Android 8...

back to the general feedback: most sensors do NOT report any value.

And more problematic, the GPS is still not working on my S2. It was said to be fixed with the June 2022 build, but don't get any GPS Data so far.

edit: GPS IS working, it just needs a few minutes outside for the first GPS fix. I forgot the GPS at that time were so much slower than more recent phones which can pick up the GPS signal inside or close to a window.

I tried the GPS Status and PhoneTester apps, the later gives plenty of info about the phone and the sensors.
[Galaxy S II Android Development] TheHitMan:
You can use alternative like F-droid. You can switch to microG instead of Google Apps stuff.
[Galaxy S II Android Development] zpunout:
An alternate to Google Play Store is the Aurora client for Google Play Store. It is available in F-Droid.

If app searches are not working in Aurora (depends on if Google is taking measures against Aurora at that particular moment), you could make a shortcut in your browser to Google Play (I use Firefox Klar for this), do the search for the app you want there instead. Tap on the app you want in the results (important step). Then in the browser menu, tap "Open with" and select Aurora. Then the Aurora app can install (and update) the app.

About speed. I found Android 10 to work quicker. I think it's because that version still supports legacy storage access framework which I think was discontinued in Android 11.
[Galaxy S II Android Development] Eric80:
this is what I did. However, microG requires a separate store, and the one available on XDA is not maintained anymore.

On F-Droid, I didn't find the app I was looking for.

thus the Apkpure service.

edit: I eventually removed Apkpure and replaced it by Aurora store.
[Galaxy S II Android Development] Eric80:
thanks, just installed the Aurora client. https://f-droid.org/en/packages/com.aurora.store/

I uninstalled Apkpure which was very slow with too many ads.

Aurora seems to be independant from microG, so I also uninstalled microG stack.

So only Aurora Store as app manager seems to be the best option!

I also downgraded with the laster ROM of LineAge OS 17.1 (Android 10) which is only 1 year older (2021-03) than the latest here from L 19.1 (2022-06): it feels indeed faster than L19.1 on first boot.

I ll see with some apps installed.

Sensors are said to be ok on 17.1 but not on 19.1: verified? -> from my side, yes, they are working on 17.1

GPS is finally working on my 19.1 after many minutes stay outside: it was my main motivation to downgrade, so less important now.

SIM card / RIL seems to drain the battery to much on 17.1: it is working better on 18 and 19.1 ?
[Galaxy S II Android Development] ale5000:
Hi,

is it possible to restore the original icons like this?

I haven't found the option.
[Galaxy S II Android Development] nsk7even:
Update: I fixed this with using Odin via an ancient Windows laptop I found somewhere in our flat... seems like Heimdall is broken.

Heyho,

I am on Linux and have to use heimdall therefore.

Based on this guide, I use the command below, but it failed with "ERROR: Failed to confirm end of file transfer sequence!"

Any hints on what went wrong here?

Thank you for this great work!

me@linux:~$ heimdall flash --pit ../i9100-LOS-19.1.pit --repartition --CACHE cache.img --DATAFS data.img --FACTORYFS factoryfs.img --HIDDEN hidden.img --RECOVERY recovery.img --KERNEL zImage
Heimdall v1.4.2

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...

Initialising protocol...
Protocol initialisation successful.

Beginning session...

Some devices may take up to 2 minutes to respond.
Please be patient!

Session begun.

Uploading PIT
PIT upload successful

Uploading CACHE
39%
ERROR: Failed to confirm end of file transfer sequence!
ERROR: CACHE upload failed!

Ending session...
Rebooting device...
Releasing device interface...
[Galaxy S II Android Development] matteo312:
Doesn't work for me. Tried the instructions to the T and it just freezes on boot. After that it freezes on Downloading...
[Galaxy S II Android Development] viglaman:
Same for me...Keeps going into download mode...I ruined my working phone :(
[Galaxy S II Android Development] makefarmberlin:
I just booted into Lineage. Don't stress. So I used ODIN, the pit file and PDA etc. all to the letter of the guide as in post #1. As you say, eventually "stuck" at downloading screen... But remember that you let ODIN complete, you used the pit file and so that means you have TWRP installed... so you have options. I am sure you are familiar with the process therefore of what to do next: reboot into TWRP with Volume Up + Home + Power and then install zip and img. You might have to reboot a few times to TWRP, do some wipes... you will be fine :) No worries!
[Galaxy S II Android Development] jer194:
This has worked for me, using heimdall version v2.02:

To repartition, and replace recovery with TWRP:
heimdall flash --repartition --pit i9100-LOS-19.1-rinando.pit --RECOVERY twrp-3.6.1_9.0-i9100-rinando.img --no-reboot

Reboot into recovery (<power> <vol up> <home>): -> TWRP 3.6.1_9-0
'Format data' was needed.

Then (LOS20/A13 in my case):
adb sideload lineage-20.0_r43-20230513-UNOFFICIAL-i9100.zip

Optional (for Magisk):
adb push lineage-20.0_r43-20230513-UNOFFICIAL-i9100_Magisk_24100_boot.img /sdcard/
(flash it to 'boot')

Reboot to system: worked! (though it took several minutes until boot was finished).

Amazing to see A13 running on this legacy device :).
[Galaxy S II Android Development] noratroll:
Wanted to bring bit of life back to the old Sii

Found this rom.

Haven't touched the gt-9100 since end 2017 after having flashed Resurrection Remix (eol 2017) - also with pit though.

Today pit and pda from this thread into Odin, check on re-partition -> Start.

Now phone always goes to download mode.

Guess i need to flash stock rom.

Progress in Odin is shown as expected.

Progress bar on phone remains at approximately 10%

Seems pit as if pit is not written.

Any experience on that?

Has anyone a stock rom?

Thx in advance

Nora 😊
[Galaxy S II Android Development] zpunout:
Which version of Odin are you using? If I remember correctly, you'll need v3.07
[Galaxy S II Android Development] Chicko24:
@noratroll

try this
[Galaxy S II Android Development] noratroll:
Thx a lot.

Did it - no effect.

Had to wait several days as alongside this issue the phone had charging problems.

Now I can enter TWRP 3.6.1_9-0 -> seems that this was written correctly.

So tried to install LOS from zip file -> now error msgs visible saying "Failed to mount /data (Invalid argument).

That must have been the cause aswell for LOS not being written in Odin.

Tried to mount /data -> doesnt work.

Guess I need stock rom -> on Sammobile not available w/o premium membership (can't afford it right now)
[Galaxy S II Android Development] noratroll:
Could find how-to for inaccessible /data here:

Failed to mount /data (Invalid Argument) in TWRP: How to Fix

In this guide, we will show you the steps to fix the Failed to mount /data (Invalid Argument) error in TWRP.

droidwin.com

Worked perfectly - brought back /data to life.

Then attempt to install LOS-zip in TWRP -> error msg:

"zip file is corrupt!

Error installing zip file <path> <file name>

Updating partition datails...

...done"

Any experience on that?
[Galaxy S II Android Development] noratroll:
SOLVED

downloaded same LOS zip again and flashed in TWRP after previous repair of file system -> now LOS boots up as intended
[Galaxy S II Android Development] angrypizza:
reboots to download mode. not very useful
[Galaxy S II Android Development] ze7zez:
Alpha doesn't have to be useful, the important thing is that it is.
[Galaxy S II Android Development] angrypizza:
well it isn't much since it doesn't even boot
[Galaxy S II Android Development] Ricren:
Hi, I installed this ROM and everything is working! What an excellent work.

The only cosmetic thing that kind of bother me is the yellow triangle at the boot prompt. Do you people also have it? Any procedure to eliminate it?

Years ago an on an old custom rom , I used triangle away (needed root). Does this procedure still works?
[Galaxy S II Android Development] zpunout:
Later models of Samsung Galaxy could have the up_param partition modified to remove the orange state warning. So my assumption is that it would also be possible with the mighty SII as well. I haven't powered on my SII for over a year, so I can't remember if there is even an up_param partition.

By the way, If you have Heimdall installed, you could look at the partition structure by using

heimdall print-pit

Not sure if a search for "SII custom boot logo" will help you find your answer, but it's worth a try.
[Galaxy S II Android Development] BokeeXD:
>

I probably won't port this phone to Android 13 in the future.

I might not be a user of a Galaxy S2, but you should still make custom roms for this phone, just for fun (if it does not take THAT much effort), because this might be the oldest phone that runs Android 12 (Tell me id there is some other 2011 phone that can run Android 12 or 11), no one even really uses android 12 on S2 for main use because it just feels too slow for people, but it is kinda neat to see it running, you can quit making custom roms for an S2, but I'm just saying, you would make me really sad.
[Galaxy S II Android Development] promeneur:
I get a S2 Plus (with NFC).

I installed android 7.1.2 (Los 14).

Today it is dedicated to be a GPS device with Osmand app for my bike trekkings.

If necessary, it is a backup device in case of my S7 gets a problem.

In case some apps will be not compliant with 7.1.2, will there be a version of this ROM for the S2 Plus ?

Thanks for your excellent job.
[Galaxy S II Android Development] rINanDO:
I don't own the S2 plus anymore for years. It broke unfortunately. It has completely other hardware (texas instruments instead of exynos cpu for e.g.) but same specs. Not compatible with sources of i9100. Sorry, I won't build for s2 plus.
[Galaxy S II Android Development] rINanDO:
I will try but can't promise anything. I still use it as daily phone and whatsapp primary, next to my s8 work phone (for the heavy apps and mail). I understand KPN won't drop 2G this year so maybe still usable with whatsapp but very slow...
[Galaxy S II Android Development] Vithephat:
Can you do the same with Samsung Galaxy A6 (2018)? It seems that model is dead and I can't find a suitable rom because it's too small and suffers from a lot of software bugs.

Hope you can help me and others have the opportunity to experience Android 12 on this model, and with all due respect, Happy New Year (albeit a bit late).
[Galaxy S II Android Development] html6405:
EDIT: answered in the wrong thread, sorry about that 😅.
[Galaxy S II Android Development] Vithephat:
What a pity. Thanks a lot. Have a nice day bro
[Galaxy S II Android Development] Vithephat:
May I ask a question? How do I make a custom ROM to flash (I have a computer and 8gb usb). Please show me, because I'm a newbie, I still don't know anything. Hope you can help me make my own ROM, thank you😓
[Galaxy S II Android Development] rINanDO:
I'm affraid you need twice the RAM or more. I use 18GB for Android 12 in VMWare running Ubuntu 16.04. It sometimes fails with 16GB. Maybe cm14.1 you can build with 8GB.

Just follow the instructions on https://github.com/lineageos/android
[Galaxy S II Android Development] Missignal_Dev:
OMG, I don't have this device but I'd say that you've done a amazingly great work! I can't imagine a phone keeps getting the latest major Android updates after 10 years...
[Galaxy S II Android Development] html6405:
I'm sorry, I've answered in the wrong thread, @rINanDO is the chief here,

btw your work is excellent and I really appreciate it.
[Galaxy S II Android Development] Vithephat:
So I will buy a usb 16GB or more to be able to create LineageOS 19.0. Can you send me a tutorial link to build Android 12? (My laptop has 8GB RAM with CPU i3-7100U<so bad> with Ubuntu latest version), maybe I can make it, so please help me🥺
[Galaxy S II Android Development] rINanDO:
No problem! Thanks:) Nice you started the i9300 thread! Keep up the good work!
[Galaxy S II Android Development] rINanDO:
You can try to build for an official supported phone to make a working build environment first. Here is one link for Galaxy S4. https://wiki.lineageos.org/devices/jfltexx/build

You need to read carefully all the steps.

Synching the sources will take alot of time, GB's and diskspace. Some tools are required in ubuntu before building. Android 12 uses about 120GB sources only. After first build yet another 100GB. This all for the ROM/zip of 500mb.

Please send PM so we don't clog this thread.
[Galaxy S II Android Development] Vithephat:
Thanks, I will try this. Have a nice day(◠‿・)—☆
[Galaxy S II Android Development] gsmii:
Would Android 12 Go version make it more suitable for daily use?
[Galaxy S II Android Development] akkis:
Love you man! A million thank you!
[Galaxy S II Android Development] rINanDO:
Not all memory optimizations and new Go-flags/options are included yet. Still working on it :)

Gps is a *****. Blob crashes when gps starts. I can't figure out why. MicroG signature spoofing needs updated patches for S.
[Galaxy S II Android Development] 908070:
It works, you are crazy :cool:
[Galaxy S II Android Development] JaLoou:
It is interesting how many points the smartphone with this custom made firmware scores in the famous AnTuTu test?

It should outperform old firmwares with Android 4.1.2 due to Android 12 supports some newer rendering engines.

I did attached the screenshots of AnTuTu test of Samsung Galaxy S2 with Android 4.1.2 for the reference purpose to the message.

I'm waiting for answers really!
[Galaxy S II Android Development] rINanDO:
New build is up!

Hi everyone,

In this build I fixed the camera and some decoding issues when playing video via the Gallery. It was using software coding. I also found the patches updated for Android 12 to support MicroG. I didn't patched it myself nor test it. Please test if this is working. The code looks good. I wanted to fix GPS first but I haven't got a clue why the blob is crashing...

I also applied some optimizations taken from i9300 LOS 19.0 builds so let see if it actually works and improves on our device.

Happy testing!

Build #2 2022-01-09

Overall state: Lets find out!

Android build: 12.0.0-r18

Required recovery: TWRP 3.3.1-1

Changes:

- Updated LOS sources

- Fixed Camera picture

- Fixed Camera videorecording

- MicroG support (Should work, I didn't test it myself, please test)

- Disabled some animation for more responsiveness

- Some optimization for zRAM/IO/LMK and background services

Downloads

lineage-19.0-20220109-UNOFFICIAL-i9100.zip

lineage-19.0-20220109-UNOFFICIAL-i9100_magisk_boot.img
[Galaxy S II Android Development] ran000:
Many thanks. Well done. Update work well here.
[Galaxy S II Android Development] notnoelchannel:
or he can make lineageos 19.0 for Galaxy S4 i9505 for example. it supports 4G
[Galaxy S II Android Development] notnoelchannel:
Is it worth using this ROM by the way just for testing? i have a lying s2 and it has stock 4.1.2 i guess
[Galaxy S II Android Development] PeterPablo:
Dear rlNanDo,

after years of lurking around of XDA I finally decided to sign up to express my admiration and gratitude towards you and fellow persistent developers that keep outdated smartphones alive by showing dedication and preserverance! Thank you!

On topic I'd like to report:

- flashing/using #1

went fine and I had it all nicely set up to turn my S2 into a bluetooth radio player:

+ bluetooth works

+ wifi works

+ GUI sometimes a little bit sluggish, but no issue

+ rear camera works

+ toggling to front camera makes camera app freeze (I was not able to resurrect camera app, as that kept force-closing on restart, even by deletion of data/cache of that app)

+ trying "Gabeldorsch" bluetooth stack from developer settings rendered bluetooth unusable, but that is not an actual issue as the regular bluetooth works just fine

- backing up/restoring #1

did not go fine. As you will read below, I had issues with #2. I made a backup of my running installation in TWRP. Restoring that backup though did not bring me beyond the boot screen of Lineage OS animation.

- flashing/using #2

+ bluetooth does not work (I did this time not change any settings in developer settings)

+ Home Screen can not be modified (I could not add widgets / shortcuts)

+ compared to #1 this version seems to got through a more elaborate setup assistant, if my memory serves me well (asks for language, wifi, etc.)

+ I returned to #1, as fixed Homescreen and non-working bluetooth rendered this build "defunctional" for my use-case.

+ There seems to be no way to enable "enhanced reboot menu" (going directly to recovery TWRP) from the developer settings

Hopefully, my feedback is helping a tiny bit of showing you both some kinks as well as that your work is appreciated.

Best regards

PeterPablo
[Galaxy S II Android Development] PeterPablo:
Go test and explore new worlds! Beware though that build #2 might be less usable then #1, depending on the usecase (see post above).
[Galaxy S II Android Development] JaLoou:
PeterPablo, thanks for your posting!

Please, continue to report here about issues in this firmware.

Also, please, run AnTuTu performance test and report about its result to us.
[Galaxy S II Android Development] Aussiewaterdragon:
Amazing have two old S2's. Flashed one, a few issues all resolved. Think I might have too many hungry apps as a bit slow, but for a S2 amazing.

Thanks for the work, I had a lot of fun
[Galaxy S II Android Development] Aussiewaterdragon:
No complaints, just some observations. Bluetooth not working, and maybe its me but WiFi a bit temperamental to connect. Power consumption seems high, might settle down.

Overall impressed with the Port, like anything new I expect a few issues, and looking forward to release #3
[Galaxy S II Android Development] rINanDO:
Ow I didn't noticed bluetooth broke in build #3, nor the launcher has a bug. I synched the new LOS sources yesterday for r27 and will check those issues are already solved.
[Galaxy S II Android Development] PeterPablo:
at least for me it broke in build #2. Thank you for staying on it!
[Galaxy S II Android Development] stan08.:
Thanks for the ROM!

On my S2 bluetooth is working after a clean flash with build#2 - reboot - starting with setup assistent for language, timezone and so on.

After that i restarted in twrp recovery and flashed the magisk boot.img FROM BUILD #1 - (not build #2).

It seems to me that flashing of magisk boot.img makes bluetooth operating - even without completing the magisk installation with magisk app(apk).

If i want to add, move or remove icons on the homescreen i have to lock -not to unlock- layout in the homescreen settings screen.

I do not use camera, so the ROM feels very stable even with little undervolting!
[Galaxy S II Android Development] Technical Ayush Pro:
HELLO 😀

Please can you build lineage os 19 for galaxy core prime SM-G360H.
[Galaxy S II Android Development] PeterPablo:
Interesting hint with respect to flashing the boot.img. I have not yet done that for either build #1 or build #2. Can someone explain the rationale for flashing it? Is it strictly required? The initial posting does not give specific instructions.
[Galaxy S II Android Development] JaLoou:
I'm supporting it fully. I think it is better to polish some firmware to perfection fixing all its issues and enabling all possible smartphone features rather than run for a buggy implementation of newer version of OS with luring new people as victims.
[Galaxy S II Android Development] notnoelchannel:
it's not possible because of Spreadtrum but i can try to port you a rom :D

btw theres los 15.1:

https://xdaforums.com/t/rom-8-1-0-sm-g360h-hu-lineageos-15-1-for-samsung-galaxy-core-prime.3810628/