Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Divest OS on GT-N5100 with latest build 6th of May #209

Open
TiberiusRegenschein opened this issue May 7, 2023 · 12 comments
Open
Labels
bug Something isn't working

Comments

@TiberiusRegenschein
Copy link

First of all, I appreciate your efforts to give life to old devices like mine with a ROM targeted on security. There is no technical reason to throw my GT-N5100 into the garbage. It is still responsive and the 2nd battery is going strong. Latest firmware updates from Samsung are from end of 2014 and nothing will be done on that end any more, but this is true for all 3rd party ROMs. I am hoping with your ROM to find a solution to use the device a few more years to com - Thank you.

Here what I have done to install Divest OS on the device:

Preparation

  • Installed latest 4.4.4 firmware with Odin, "cleaned" the device and made it full working

    Flashing GT-N5100 with Heimdall

    More can be found about using heimdall with Ubuntu here

On your phone¶

  • Open the 'Settings' app
  • Navigate to the 'About' page
  • Tap on the field labeled 'Build number' 7 times. A toast should appear saying that developer mode has been enabled
  • There should now be an screen in the 'Settings' app labeled "Developer options"
  • Under "Developer options", enable "Android debugging"
  • Shut down the device
  • Boot into download mode by pushing volume down and power simultaneously

On your computer

  • Check connectivity with e.g. adb devices
  • If device is recognized
  • Download Recovery as .img
  • Open terminal in folder with the recovery
    -flash recovery with heimdall flash --RECOVERY divested ... -dos-n5100-recovery.img --no-reboot

Error message: E: failed to find /misc partition

On your phone

  • Boot into recovery by pushing home/volume down / power simultaneously
  • Do full factory reset
  • Sideload divest os with adb sideload divested-14.1-date-dos-n5100.zip
  • Do full factory reset
  • reboot system

Working

  • System in general
  • SD Card
  • Bluetooth
  • System successfully boots up into Divest OS
  • Java lang, Security exception ...
  • No SIM, selection of APN not necessary
  • WLAN is shown including MAC address, connection not possible. Tested with a HotSpot and a standard router. Message "Password may be incorrect" although password is correct
    I created a log for the radio, because that seems to be the most pressing issue. Without network, no update.

Find the log attached
Radio_log_Divest_OS.log

@SkewedZeppelin
Copy link
Member

looks like the modem is looping restart

can you give logs from:

adb logcat -b all -d | grep -i audit
adb logcat -b all -d | grep FATAL -c20

@SkewedZeppelin SkewedZeppelin added the bug Something isn't working label May 7, 2023
@TiberiusRegenschein
Copy link
Author

Thanks for the quick response. Please find attached the both logs you asked for.

2 Things in addition

  1. Whole device encryption is working as expected
  2. The first time the UI shows up the full error message I am getting is "java.lang.SecurityException: Permission Denial:reading com.android.providers.media/external/file from pid=5489, uid=10050requires android.permission.READ_EXTERNAL_STORAGE, or graptUriPermission()"
    audit_log_Divest_OS.log
    FATAL_log_Divest_OS.log

@SkewedZeppelin
Copy link
Member

so selinux is the issue here, I'll switch n51xx to -userdebug like I did i9xx series

SkewedZeppelin added a commit that referenced this issue May 9, 2023
For #209

Signed-off-by: Tad <tad@spotco.us>
@SkewedZeppelin
Copy link
Member

new builds for n51xx series are up, please test

@TiberiusRegenschein
Copy link
Author

Hi, thanks for the fast turn around. I did the test and the situation is unchanged.
Please find the audit log attached. The FATAL log remains unchanged
20230511_audit_log_Divest_OS.log

@TiberiusRegenschein
Copy link
Author

To be on the save side I installed latest TWRP and sideloaded DOVEST OS ROM. No change.

I also installed XDA ROM from here https://forum.xda-developers.com/t/lineageos-19-1-android-12l-for-gt-n5100-gt-n5110-gt-n5120-beta.4366627/ and removed DIVEST OS and everything is back to normal

@SkewedZeppelin
Copy link
Member

only "works" because they disable selinux which throws security out the window and makes the app sandbox useless

Selinux: permissive

@TiberiusRegenschein
Copy link
Author

You are absolutely right and security is the reason for me to look since a while, even years, now for an alternative to be able to use the device with up to date apps from f-droid. I like the form-factor of 8" and having a pen to scribble. There are not many alternatives out there.
I initiated contact via xmpp:divestos-mobile@conference.konvers.me to keep github, or would you like me to move to gitlab, for issue tracking and solving

@SkewedZeppelin
Copy link
Member

SkewedZeppelin commented Sep 24, 2023

are you able to test again?

another user recently reported their n5100 working well

@TiberiusRegenschein
Copy link
Author

TiberiusRegenschein commented Sep 27, 2023

Hi, thanks for actively pushing. As of the version September 20th many things are improved:

  • The issue with the phone connection was on my end. I needed to flash all parts of the ROM with Odin and then I was able to get a cell signal
  • The Wifi problem is odd, because everything works well on the original ROM 4.4.2 from Samsung. I did further tests including a HotSpot from another phone, which was working. Digging deeper into my router settings and playing around with certain settings revealed the following: Setting security to WPA2 + WPA3 (transition mode) is not working, setting the security to WPA2 (CCMP) does work. It looks like the ROM as is has issues on that device with Wifi security WPA2 variants, although everything works fine on the original 4.4.2 ROM

There are some smaller issues still:

  • I can download via OTA a new version, but not install it. I get an error message "Updater Installation Error with the triangle warning sign. I can do updates with adb sideload
  • Etar, the calendar app is not starting successfully, but other calendar apps do

Confirmed working is:

  • GPS
  • Encryption

and most of the other stuff as far as I could test. Solving the Wifi issue to not rely on the HotSpot of another phone would be great and would make the device as fresh as it can get after nearly 10 years now.

Thanks again 😄

@SkewedZeppelin
Copy link
Member

I can download via OTA a new version, but not install it.

This may be a space issue, that device only has 8GB I think? so like 5GB available to use?
The update + extracted size may be too large.

Etar not working is strange though

WPA2 + WPA3

I've found this is unreliable even on other devices like laptops.
I personally use and recommend keeping a distinct WPA2 and WPA3 SSID if possible.

@TiberiusRegenschein
Copy link
Author

One update regarding Etar: After installing the latest version from F-Droid Etar works as expected. Looking into ETAR Github there were some issues with the latest version.

Tablet has 16GB of which are 6 GB used. Should not be a space issue. I installed TWRP resulting in the same problem. OTA is working with the same TWRP and other ROMs.

WPA2 + WPA3 is unfortunate but seems to be a problem with other lineage os versions too and your described solution to separate both is also named. => Probably something I have to work around

With this the remaining issue is the OTA update. Any log I can help with?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants