yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] rINanDO:
No, I didn't saw this. Thanks. So the reason Magisk was not working in R is because of GO build? Therefore using memcg and Magisk doesn't has this fix for low mem devices. So theoretically current build Magisk should work in R without my reverted commit.
[Galaxy S II Android Development] bersem:
black screen and reboot on latest build ?

can someone confirm ?

regards !
[Galaxy S II Android Development] rINanDO:
New build is up!

That theory has been proven... Building LOS without GO 'fixed' Magisk from booting because of the memcg/acct differences when low_ram is enabled. For normal builds (low_ram disabled) Magisk has a fix here. Thanks to @mirhl for pointing me this out. So now just a new build and I updated it for Magisk v23.0. I looked shortly to Wifi, but I don't have a clue what is wrong yet.

Build #6 2021-05-14

Overall state: Stable-ish

Android build: 11.0.0-r37

Required recovery: TWRP 3.3.1-1

Changes:

- Updated sources

- Magisk v23.0 support

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-18.1-20210514-UNOFFICIAL-i9100.zip

lineage-18.1-20210514-UNOFFICIAL-i9100_magisk_boot.img
[Galaxy S II Android Development] DevisG79:
Sorry, I can not confirm. For me it works. Also the new build works great. Hope you will get it to work. BTW I don't have problems with my WiFi network AVM Mesh system.

Keep in mind: S2 never dies :-)
[Galaxy S II Android Development] ran000:
Both, previous and latest build work well here. Thank rINanDO for support device. One problem which I have is WiFi wpa2 connection to my Fedora34 hotspot
[Galaxy S II Android Development] bersem:
@rINanDO

@rINanDO its a GO build again. Sorry but pls point me..
[Galaxy S II Android Development] rINanDO:
Ow I forgot to disable lineage GO. Trebuchet launcher is Go version. My bad. The ROM uses GO memory settings except low_ram prop.
[Galaxy S II Android Development] bersem:
i have no widgets, no icon grids ( 4x4 only ) like before. hope u will upload a new build soon.

regards !
[Galaxy S II Android Development] lallolu:
I successfully installed the ROM but gapps do not actually get installed even though I could see it successfully installed in TWRP. Does anyone know what could cause this?
[Galaxy S II Android Development] fgh11:
I used latest nikgapps pico without issues. Which did you flash?
[Galaxy S II Android Development] rINanDO:
New build is up!

Nothing special, just updated sources and disabled Lineage GO configuration to get our Widgets and some standard apps in Trebuchet launcher back :)

Build #7 2021-05-17

Overall state: Stable-ish

Android build: 11.0.0-r37

Required recovery: TWRP 3.3.1-1

Changes:

- Updated sources

- Disabled Lineage GO configuration, forgotten in build #6

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-18.1-20210517-UNOFFICIAL-i9100.zip

lineage-18.1-20210517-UNOFFICIAL-i9100_magisk_boot.img
[Galaxy S II Android Development] lallolu:
It works now. I just installed google service and google play apks.
[Galaxy S II Android Development] bersem:
many thanks @rINanDO. not so important but can u take a look into reboot to recovery from system ? it doesnt work.
[Galaxy S II Android Development] Harv234:
Ok, so I am stuck here. I own a S2 that has already been flashed with Lineage OS and was repartitioned before. I followed the first post, but I can't get TWRP installed. ODIN says, the PIT has been written and the PDA has been flashed but when I try to get into recovery I end Up with the Boot Screen saying Samsung Galaxy SII GT-I9100 and the yellow triangle and that's all. No Boot loop, it just sits there forever. I can get into download mode but that's it.
[Galaxy S II Android Development] MaddogIT:
May be a problem with repartition done before.

My suggestion is to go back to stock version (do just a check that's all right) and just then restart all the process.
[Galaxy S II Android Development] Harv234:
Well there is just one problem - I don't have an original Stock version and PIT and on Samsungs site there is nothing older than the S5 or am I going wrong here? I think for Odin I need some special form of firmware files?

EDIT: Do I have to insert a SD-Card at this stage?
[Galaxy S II Android Development] MaddogIT:
The PIT

i9100-stock.pit | by bmaupin for Galaxy S2

Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.

androidfilehost.com

Stock rom

Download Samsung Stock ROM for all models (Latest Firmware)

Download the latest Samsung Stock ROM (original firmware) for all Samsung Smartphone and tablets with instruction manual.

androidmtk.com

All can be done from Odin, no SD need
[Galaxy S II Android Development] Harv234:
Hi MaddogIT,

first of all, thank you for your patience. This is driving me officially nuts by now. I was able to install the stock ROM with your PIT and another 3-Part Stock ROM I found on the net (your download link was put down by google drive)

After installing Android 4.1.2 the Phone boots up and after enabling adb I was able to boot into the Stock recovery via 'adb reboot recovery'. Guess what I found? The Volume up key is not working properly... It is not constantly pushable. This seems to be not much of a problem in nomral operation but when you're supposed to hold three keys simultaneously :p

Is there a way to install this custom ROM all via ODIN? I have to do it all in one go as there is no way to manually boot into Recovery
[Galaxy S II Android Development] MaddogIT:
I just installed TWRP with Odin (for last roms you have also to rePIT), once done you can force a boot into recovery with 'adb reboot recovery' and install the custom rom from SD.

EDIT: ok, I can now see your point... I never installed a ROM with Odin, Odin needs a .tar but we have a .zip and inside the .tar has .img files not so the .zip one.

Seems you need a dev help, sorry.
[Galaxy S II Android Development] Harv234:
Anyway, thanks for the hints! Maybe someone else has a solution for me?
[Galaxy S II Android Development] bersem:
Maybe this can help.

Flash Stock ROM with Odin. Repit with the .pit file from OP.

Root your phone with chainfire for example ( u can find howto on web ) with Odin and boot to System. Use the SU ( or Link2SD ) "reboot to recovery" function.

Then upgrade the recovery ( .img file from OP ) through Philz recovery.

Reboot to recovery from recovery ( recovery function )

Follow the flash instructions from OP.

Flash ROM, Gapps, Magisk (optional )

Reboot to System

EDIT: Copy ROM, Gapps, Magisk and recovery .img file from OP to your SD Card before.

Regards !
[Galaxy S II Android Development] Harv234:
And after this the system won't start anymore (repartitioning) - so no adb access anymore. :(
[Galaxy S II Android Development] Harv234:
Heureka! I did it!

Just in case somebody ever needs the information: After repiting from Odin I installed the stock rom on the new pit. Which obviously does not work - but... The phone restarts then into recovery on normal boot ;) After that I just flashed the TWRP recovery and restarted with normal boot - System is still broken so the phone starts into TWRP on next boot - voila!

From this point on all was pretty straight forward :geek:

Thanks to all who shared their thoughts.
[Galaxy S II Android Development] MaddogIT:
Really nice solution :)
[Galaxy S II Android Development] andreoide:
Well-done! And thanks for posting this also !
[Galaxy S II Android Development] 2faraway2:
Hi @rINanDO ,

first of all thx a lot for your ongoing work, fascinating to see A11 on this ancient device :)

I've managed to install the lastest build (coming from LOS for MicroG 14.1), which is running fine so far !

However I recognized that we can't install MicroG because your build lacks the signature spoofing patch ...

Is it possible to include this patch in one of your next builds ?

This would be wonderful because so we can avoid GAPPs to save storage and ram and have better privacy ..

The spoofing patches are here:

https://github.com/lineageos4microg...ofing_patches/android_frameworks_base-R.patch

https://github.com/lineageos4microg...es/packages_apps_PermissionController-R.patch

(you can see in that repo how it's applied)

It's essential if you want to run MicroG instead of GAPPs
[Galaxy S II Android Development] slev!n:
Unfortunaltely I can confirm a wifi issue after upgrading from 17.1 having a mesh network with wpa2/wpa3.

I can connect while the installation process but then later i cant reconnect again.

Edit: Of course I made a clean install and also downgraded the TWRP as it is recommended :)
[Galaxy S II Android Development] uig200:
edit2:

Also, the home button does not work when the device is switched off and charging, only the power button.

edit:

Yes, The phone's temperature with this ROM when active can rise up to 65 ° C. Feels like you touch a glowing iron sometimes. 🥵 Is it normal?

Wow. Everything worked. The best thing was, you didn't need Odin and the stupid Windows in order to do this, everything went wonderfully also with heimdall flash tool under Arch Linux ! :cool:

The only issue I have is that the phone gets pretty hot. Does anyone have the same problem too?
[Galaxy S II Android Development] John D J:
Fab ROM, I can't believe it works on my galaxy I9100P. Great work, thank you.👍😊
[Galaxy S II Android Development] Wikandro:
Hello,

I also had difficulty trying to install with microG.

In the explanations, rINanDO says :

"

12. For MicroG users:

You need manualy grant permissions via ADB to get things working properly.

These are the commands:

adb shell pm grant com.android.vending android.permission.FAKE_PACKAGE_SIGNATURE

adb shell pm grant com.google.android.gms android.permission.FAKE_PACKAGE_SIGNATURE

"

By me, it worked fine with LOS 16 version, but I didn't get it with 18.1, I had error messages (but did not note them...) in response to these commands.

Did you, 2faraway2, try this ?
[Galaxy S II Android Development] Ferrograph:
Im getting permanent notification about serial console enabled. Anyway to remove?
[Galaxy S II Android Development] 2faraway2:
Sure, I tried it:

C:\Program Files (x86)\Minimal ADB and Fastboot>adb devices
List of devices attached
0019ab6b29539e device

C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell pm grant com.android.vending android.permission.FAKE_PACKAGE_SIGNATURE

Exception occurred while executing 'grant':
java.lang.IllegalArgumentException: Unknown permission: android.permission.FAKE_PACKAGE_SIGNATURE
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1451)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1410)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2287)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:249)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21752)
at android.os.Binder.shellCommand(Binder.java:929)
at android.os.Binder.onTransact(Binder.java:813)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4621)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4363)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)

C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell pm grant com.google.android.gms android.permission.FAKE_PACKAGE_SIGNATURE

Exception occurred while executing 'grant':
java.lang.IllegalArgumentException: Unknown permission: android.permission.FAKE_PACKAGE_SIGNATURE
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1451)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1410)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2287)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:249)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21752)
at android.os.Binder.shellCommand(Binder.java:929)
at android.os.Binder.onTransact(Binder.java:813)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4621)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4363)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)

C:\Program Files (x86)\Minimal ADB and Fastboot>

I assume that the sig spoof patch simply isn't implemented ..

Result see attachment
[Galaxy S II Android Development] js-xda:
Are there any news on this aspect? I browsed this thread and it seems to occur with 5 GHz networks - not specific to AVM Fritz Mesh (also Feodora hotspot affected and not every Fritz Mesh) or WPA version (both WPA 2/3 and WPA 2 affected). Any more observations linked to this which can help guiding @rINanDO?
[Galaxy S II Android Development] s2isaliveandkicking:
It's been one month since his last login. I hope he is okay with this flu and all.
[Galaxy S II Android Development] uig200:
After installing the new ROM from yesterday (06/25/2021) you can no longer switch off the phone completely. It powers off and then restarts immediately. Even with the command reboot -p in terminal. :cry: As If "power off" feature would not exist.
[Galaxy S II Android Development] js-xda:
I guess you refer to the new upload on Android file host? As there was so far no post on this build by @rINanDO, I would suggest waiting until he provides a change log. Maybe it's just a test build for some purpose?
[Galaxy S II Android Development] uig200:
Yes, I downloaded this new build from Android file host. Then I am , I guess, the first tester of this build. As I was been able to test it so far, I have encountered some bugs: the first one that I mentioned in my previous post , the “power off” command does not work, the phone is not shutting down but instead restarting. And as for the second bug: the home button is not working while phone is charging; if you want to see battery’s charging progress you can see it only by pressing the power button, which is very unusually since normally it would work with the home button.
[Galaxy S II Android Development] JaLoou:
Hello. Sorry.

Please, look here: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2528160.html

This is something very new for our device.

What is this? Can it improve the front camera on our device? May it is a way to enable correctly Camera2 API and get photos in RAW10 format with a much wider dynamic range and deep colours?

May it possible to merge in a firmware?
[Galaxy S II Android Development] K9100ii:
1. "Sorry" as soon as you want to ask for something, rather than making your incredibly bold claims with no evidence? Mmmm.....

2. We're not using mainline Linux here. That's a patch for mainline Linux adding support for the front-facing camera for this phone.

3. For support for the Camera2 API, a new camera HAL supporting it must be written, which is difficult.

4. You're not going to get anything better from the camera, since the hardware itself simply cannot do anything better. You're seriously asking for too much. Your only option for anything better if you really need it is to get a new phone with a better camera - Oh, and, if you are to get a new phone, make sure its bootloader is not unlockable.

5. Image quality from the camera on mainline Linux with those new changes is unlikely to be any better than it is here. In fact, it might even be worse to some extent (unsure about this).

Edit: that patch has already been applied to mainline: https://git.kernel.org/pub/scm/linu...7&id=7f4ebf3e4ce10a1ed8ff2aee5d75568dc3522b2f
[Galaxy S II Android Development] rINanDO:
Thanks! I will create a build soon with these patches. Since new XDA forum I didn't check this forum often , sorry. I currently creating a new build and put it online soon.
[Galaxy S II Android Development] rINanDO:
Time to time I create some builds to test and upload them before I decide to post them here. Because some things I want to test on my daily drive phone first. If it is not good enough or I got a patch to add to the build, I wait until that build is done. Since it takes about 3-4 hours to build on my Core i7 (Los 14.1 takes 45 minutes...?!) It is quite time consuming. And this is of course is done in my spare time ;).

About "power off"-bug I will add them to know issues. Sometimes it hangs during shutdown and draining your battery because you thinks it is off. I can't get any shutdown logs so far and I don't shut down may daily drive S2 every day.

As for home-button charging I think I'm missing a patch. Legacy support patch.
[Galaxy S II Android Development] 2faraway2:
No reason for an apology !!!

I'll be patient to test your new build as soon as it is available .. :-)
[Galaxy S II Android Development] rINanDO:
New build is up!

I did not test MicroG fully , but I according MicroG-app signature spoofing seems to work :)

Combined with the memory optimization the performance should be better on heavy load.

Last but not least missing patch for home-button offline charging has been ported too.

I think this build contains almost everything. If we miss something, please report.

Cya!

Build #8 2021-06-28

Overall state: Stable-ish

Android build: 11.0.0-r38

Required recovery: TWRP 3.3.1-1

Changes:

- Updated sources

- MicroG support thanks to @2faraway2

- Forward port Memory optimizations from LOS 16.0 thanks to @acroreiser

- Home-button fix offline charging

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-18.1-20210628-UNOFFICIAL-i9100.zip

lineage-18.1-20210628-UNOFFICIAL-i9100_magisk_boot.img
[Galaxy S II Android Development] js-xda:
Thank you for your continued efforts - no issues here installing and running it on first sight.

Is my first impression correct that there is not yet a change with regards to the 5 GHz WiFi issue?
[Galaxy S II Android Development] uig200:
Hmm... It seems that the power-off bug is stil present, at least for me. Instead of shutting down, the phone restarts.
[Galaxy S II Android Development] rINanDO:
Ow, this exists in all builds? And it never shuts down? I didn't notice before.
[Galaxy S II Android Development] rINanDO:
No changes. I don't have a clue why it broke in LOS18.1. Logs didn't help me so far. Possibly need to compare detailed behaviour with LOS 17.1.
[Galaxy S II Android Development] uig200:
Your build #7 from 2021-05-17 was the first build I tried and it was not affected by this bug. It looks like phone shuts down, even "phone is shutting down" message pops up but after, I would say, 3 seconds black screen, phone starts again.
[Galaxy S II Android Development] Username already in use:
Dug up my old S2 and your amazing work gave it new life! Thank you

rINanDO​

The battery was really bad, so i took the charging circuit from it and hooked it up to a 18650 cell with 3350mah. Double battery capacity but a little bulky with a heatglued battery on the backside :) Works wery well otherwise.
[Galaxy S II Android Development] JaLoou:
Please, post photos of it from various sides - interesting to see.

Are you use a back cover?
[Galaxy S II Android Development] JaLoou:
It is a serious unfixed issue of the custom ROMs announced here by the forum user 'rINanDO'.

Of course, the issue is not normal due to latest Android versions have multiple battery optimisations.
[Galaxy S II Android Development] rINanDO:
S2 was never designed to run at top speed that long at its release in 2011. S2 was a flagship and could do everything on one core fast compared to other phones. Samsung limits cpu to 800mhz in kernel when its cpu is going to hot so it can cool down. Current 'Go' phones are also 1GB memory phones but with 3 times smaller quad core cpu baked on 14nm. Our 10 year old big exynos 4210 baked on 45nm just makes more heat and taking more time because of old architecture on 2 cores (and slower memory and gpu). Apps gets bigger and doing more stuff simultaniously and sometimes inefficient. So optimisations to do less unnecessary stuff if possible for this phone is the only way. Google is only adding features to the os, not removing them. At first startup the phone gets warm is 'normal', google's Art optimisation is running and takes its cpu cores at full speed and time in the background even when the white Lineage logo is displayed. With GApps installed this is far more worse! Thats why it always lags when you immediately try to use it. It already is swapping memory (zram) at this point to finish the jobs. When memory issues arise because the app is too big or using too much memory it also warms up due to swapping memory into zram. When a backgroundservice kicks in during use, it also warms up.

Core problems: OS is getting too large, apps are larger, apps asume you got 4 cores or more, and some apps asume you got 4gb memory or more. S2 is running on nitro to keep up with Android 11 in 2021.
[Galaxy S II Android Development] 2faraway2:
@rINanDO:

I took a quick look at your new build regarding signature spoofing and microG, my first impressions:

signature spoofing works perfect :)

microG installation works perfect, but (if you like to use the location services) you have to grant the following permission manually via adb

pm grant com.google.android.gms android.permission.ACCESS_BACKGROUND_LOCATION

After finishing the microG configuration it's necessary to reboot and guess what .... bootloop ... :cry:

I have to investigate that further, but atm I have little time ... as soon as I have new findings I'll let you know.

Anyway: Thank you so much for your time and hard work to improve this release step by step :)

​
[Galaxy S II Android Development] uig200:
I personally don't mind phone being so hot, as long as it is not dangerous and my whole place doesn't burn down.
[Galaxy S II Android Development] JaLoou:
But it also drains the battery - it is important anyway.
[Galaxy S II Android Development] Username already in use:
My plan is to cut a pvc pipe in half and glue that on top for protection and grip. Note that this battery is without protection circuit (65mm long) and therfore needs the circuit from the old battery. If you use a protected battery (68-72mm), you could probably do without this. A hard shutdown can be made by removing the toothpicks holding the charging circuit.
[Galaxy S II Android Development] rINanDO:
Battery draining could also be a hardware problem. I got 1 S2 which always drains when putting in a battery. It completely or even destroyes it after hours. My daily S2 is still working great, no offline drain. So you could have multiple electrical problems. Maybe the leaking internal backup battery could be a cause.
[Galaxy S II Android Development] JaLoou:
Thanks!

I wish you to make something more comfortable for use.

May you can place the big battery in the down of space for a standard battery, accurately cut the down part of the back cover by the size of the big battery and use a proper cold welding for make a cover above the big battery precisely as a new continuation of a standard back cover in the place where it was trunckated.
[Galaxy S II Android Development] JaLoou:
Better to report about all issues here for anyone get know about they.
[Galaxy S II Android Development] JaLoou:
You was explaining about allegedly the load to CPU, RAM and GPU...

But my research yet of LOS 14.1 (announced by you) has revealed that your custom ROM extensively wasting CPU and the device internal storage - it is a main cause of abnormal double heating and the battery draining.

But you did explaining nothing about a suspiciously heavy wasting of the device internal storage by the ROMs announced by you at XDA-forum.