PDA

View Full Version : Finding a Used Phone with Unlocked Bootloader(SOLVED)


biketool
2019-10-24, 07:55
For several reasons including needing NFC and a fully functional mobile web browser I need to find a LineageOS microG compatible phone to use as a tablet. I am looking for a small device, I was thinking of a Samsung S4 mini LTE(serranoltexx).
My concern in shopping for a used phone is that the bootloader would be hard locked and the device will be unusable to me, I refuse to use a stock android device.
Does anyone have ideas what to look for to get an unlockable Samsung? The only other experience I have with androids was helping with a One+1(stock Cyanogen) and a Nexus 7 which both only come with ADB unlockable or unlocked bootloaders.

(Edit - SOLVED!)
See posts 15 and 17 of this thread:
https://talk.maemo.org/showpost.php?p=1561946&postcount=15
https://talk.maemo.org/showpost.php?p=1562120&postcount=17
I found a Samsung S4 mini which is small and if an international I9195 is acquired it can be converted to a TWRP recovery and LineageOS 14 for microG. Post !7 details how to software disable the cellular radio and re-enable it if desired.

nikos523
2019-10-24, 11:51
Your description is kinda confusing.
If you want to use something as a tablet, why don't you get a tablet? If you want it to be small, then you need a phone, so I really don't know what to suggest here :)
Other than that, you have to give us a budget. There are thousands of options out there!
As for the s4 mini, that phone was 100% crap 5 years ago. I wouldn't recommend that to literally anyone today.

Sent from my SM-N960F using Tapatalk

biketool
2019-10-24, 13:53
Your description is kinda confusing.
If you want to use something as a tablet, why don't you get a tablet?

I need a small phone sized android device, no intention of inserting a SIM and might later look into cutting the power pin to the cellular modem. I suppose now people call tablets big and phones small but I am more talking in the N800 is a tablet(no cellular until the N900) manner than the last 10 years.
I already have a Nexus 7 but that is huge, I need something pocket sized that can tether to my N900 but run some modern FOSS software.
Android is a bad solution even Lineage with microG but better than not having services I need when using public transportation.

nikos523
2019-10-24, 14:13
Why not an xperia x compact then?
I got a used one locally to try sfosX for 40€.
I mean sure, it's a budget and ancient device, but it will work and it's small!
But if you wanna try something modern, the galaxy s10e is about 1cm taller/5mm wider than the compact, but it's a million times better.
Obviously I'm talking for the exynos cpu version, cause I think you can't unlock the bootloader in the snapdragon version.
Not sure though.

Sent from my SM-N960F using Tapatalk

biketool
2019-10-24, 14:41
Why not an xperia x compact then?(snip)
the galaxy s10e

The S4 mini has a SD card slot, removable battery, and I can still run a current browser and OS. That and they are very cheap as long as I can be sure I can get past the bootloader step. The main difficulty is finding a used direct from Samsung phone(no code on bootloader) vs something unusable which was sourced from a US or Canadian wireless carrier and no hope of installing a usable OS.

nikos523
2019-10-24, 14:47
Whatever floats your boat mate!

Sent from my SM-N960F using Tapatalk

justmemory
2019-10-25, 07:30
Hi,

I'm using a Samsung Galaxy A5 (2015) now with LineageOS (https://github.com/DeadSquirrel01/)... I do not have any idea of your worries or expectations about the size of the phone; it is fine for me. OK, it is way bigger than the n900 (I mean taller and wider) but I can use it with one hand at least and the big screen comes handy...
I have termux on it; I could even wrote a small python script and run it in the background to make some things done... So for me it is quite a good solution for having today's services (browser, navigation, pay/banking) with the capability to costumize (OK, not as deeply as on n900) and even write programs/scripts on it...

OK, it does not have a removable back cover and battery, NFC isn't working and yes, I should use google stuffs but I'm not struggling with ads or anything like that. Or at least you can use this (https://lineage.microg.org/) to avoid google...

endsormeans
2019-10-25, 13:07
Micro g?
I don't use no stinkin' micro g
(Bad rip off there)
I use nano on one of the nexus 5s I have ...that has floko pie on it.

You may rather enjoy trying out maru or Ubuntu touch ...biketool.
I like em.
Just saying...

mp107
2019-10-25, 17:42
Regarding the Sony Xperia X Compact and custom ROMs…
If you are going to use any Android custom ROM based be aware that all the custom ROMs for X Compact (except some old, unmaintained CyaonogenMod 13/14.1 and LineageOS 14.1 builds for which the source code has been removed from GitHub :mad: and some stock ROM based ROMs) are based on Sony AOSP which for like two years or so contains a bug where on random basis (mostly on high GPU load) the phone restarts itself or "bricks" to the state a key combo reset is needed. I have struggled with these for like a year and abandoned this device for this reason, therefore I would not recommend this device for using it with any Android based custom ROM.

For clarification, I would not blame open source code as it is often maintained in developers' free time and I appreciate their work and will to do it but this bug seems to be in closed source drivers worked on mostly (except for providing logs) by Sony and that's why I personally feel rather disappointed.

nonsuch
2019-10-26, 06:34
For several reasons including needing NFC and a fully functional mobile web browser I need to find a LineageOS microG compatible phone to use as a tablet. I am looking for a small device, I was thinking of a Samsung S4 mini LTE(serranoltexx).
My concern in shopping for a used phone is that the bootloader would be hard locked and the device will be unusable to me, I refuse to use a stock android device.
Does anyone have ideas what to look for to get an unlockable Samsung?

Do you think there's different versions of each device, some locked, some not?
FWIW, I have never encountered a "locked" device.
I'm not even 100% sure what people mean when they use that term.
If the device has clear installation instructions on the LOS wiki, it should also work that way, no?


The only other experience I have with androids was helping with a One+1(stock Cyanogen) and a Nexus 7 which both only come with ADB unlockable or unlocked bootloaders
Are you saying unlockable via "only adb" is bad/inacceptable???

biketool
2019-10-26, 17:51
Are you saying unlockable via "only adb" is bad/inacceptable???

I had thought ADB was the only way to unlock.
I have found in the wild US At&t phones with a bootloader only unlockable with an app and code form At&t after verifying the phone has been paid off 100% by the subscriber while they are still under contract.

Re: Ubuntu Touch above, I tried it out early with my Nexus 7 flo but found it to be pretty limited, I place privacy, real GNU Linux, and function on a balance and try to get the best of all 3. Pretty much until there are used Purism or something similar phones available I am in a tough spot for hardware as I think most of us are.

nonsuch
2019-10-29, 21:46
until there are used Purism or something similar phones available
That just might never happen (https://jaylittle.com/post/view/2019/10/the-sad-saga-of-purism-and-the-librem-5-part-1).

biketool
2019-10-30, 08:35
That just might never happen (https://jaylittle.com/post/view/2019/10/the-sad-saga-of-purism-and-the-librem-5-part-1).

Ooof!
Yea I know a guy years back who was always doing a hybrid confidence scam/tech accumulator business. He printed stock and traded it for cash, it was unbelievable how many years he lived well for running that scam.
Seriously, if you are producing in Senzjen where they can whip up a prototype in weeks why has nobody ever found a way to get a FOSS phone made. I bet it could be done between $10k-$100k especially if you walked in with gerbers or kicads ready to go.
(Yes I know you need to go through prototyping phases to test out the system especially the RF components)

To illustrate the idea of custom design just look ath those old real-fake N900s with DVB-T and could play J2ME games years ago. The thing is I feel like most of this Chinese stuff is a dirty cheap hack both hardware and software made in some dirty shop; it works, barely, no time for QC and falls apart like a house of cards if you try to do any normal hacking or customization over their fixes.

nonsuch
2019-11-02, 09:13
Seriously, if you are producing in Senzjen where they can whip up a prototype in weeks why has nobody ever found a way to get a FOSS phone made.
It's in the numbers apparently (something also mentioned in the article series I linked) - it's much harder to find someone willing to do relatively small batches.

biketool
2019-11-13, 20:17
I found an international model Samsung S4 mini LTE gt-19195 AKA serranoltexx.
It required the program heimdall available on the Ubuntu repos to get TWRP over the the S4 without needing to OEM unlock it.
While I was installing LineageOS 14 for microG I used the instructions from the LineageOS wiki on the S4 mini.
After I had TWRP loaded it was easy to adb sideload the LineageOS for microG zips and the supersu zip from LineageOS.
Just to be clear LineageOS for microG is a slight fork of regular LineageOS just with microG components pre-installed.
So far it seems to work great and I have a pocket sized web browser though the NFC doesn't seem to detect my transit card.
My big bump was trying to track down how to OEM unlock the phone in the Samsung GUI, the youtube ideas involved messing with the calendar settings; any good device should never require booting into a bad OS to load a good one, the S4 mini qualifies if you follow the heimdall a recovery and adb sideload your OS zip files.
The screen is beautiful and colorful but this phone(tablet to me) burns amp hours like a fiend when it is working hard, good thing it is mostly a bluetooth tether web browser to me.

Other notes:
The S4 mini requires a powered USB OTG cable to work or making a microUSB OTG adapter which shorts the wires to pins 4 and 5 of the usb port.
The NFC equipment unlike that of my Nexus 7 doesnt seem to talk to RFID objects like my transit card, too bad but not a fatal problem.

biketool
2019-11-14, 11:55
I now need to get some good schematics or at least chip datasheets(damn you companies who require NDAs for datasheets) and neuter the cellular capability. I could just cut RF traces but I would rather lift-and-cut pins fom an IC if I can. I just dont feel that this design with the cellular having direct lines to the CPU is acceptable.

biketool
2019-11-16, 21:06
Now to change it form a phone to a a tablet in software

lifted from here: credit to: Death Mask Salesman on Aug 18 '16
https://android.stackexchange.com/questions/155261/is-it-possible-to-completely-disable-radio-signal-in-a-phone-without-a-sim-card

Sucessfully tested on my S4 mini I9195 running LineageOS 14 for microG which now ignores its cellular radio not wasting energy desperately pinging for a cell tower we don't want it to bother with. Unfortunately due to the desires of state and corporate entities to keep tabs on us using the excuse of easy tracking for emergency services it is no surprise the satellite navigation is implemented on the cellular radio's chipset.
Wifi - Works
Bluetooth - Works
Broadcast FM Radio RX - Works
GPS - Appears to be Disabled
Hall Sensor(compass) - works
Cellular telephony and data - Disabled and status hidden
The Phone is now working as a tablet for all practical purposes, the first command given below disables the cellular telephony and data the change persists through reboots. This small ex-phone is now well suited to occasional carry when needed as a small handy pocket sized web-tablet tethered to my N900 via bluetooth PAN.
I suspect the cellular modem may cycle through a up period and send pings during power on before the OS loads and begins to ignore the cellular hardware This mod will not make your I9195 invisible to the cellular system in a safe reliable way or reliably protect your privacy. I have not tested the second way that uses a script only the su -c "setprop persist.radio.noril 1" solution but I have tested undoing it; reboot and phone and GPS are returned. The disabled GPS can sometimes be a problem so I will probably switch to the radioon and radiooff scripts solution so I can have satellite navigation as an option when needed.
__________________________________________


From the Terminal
Disabling RIL

If the operation is not to be performed frequently, a single line of code will be all that is needed:

su -c "setprop persist.radio.noril 1"

. This will make the phone ignore the Radio Interface Layer, thus ignoring the presence of the antenna. A reboot is required for the change to be in effect, and it will persist across reboots.

Plus, disabling RIL also makes the "No SIM Card icon vanish.
Enabling RIL

Enabling RIL again is just a matter of flags. As can be seen from the below example:

su -c "setprop persist.radio.noril 0"

, the command is equivalent, save for a 0 instead of a 1. As before, a reboot is needed.
As a custom function
__________________________________________________

I've also devised two functions to be added to the /system/etc/mkshrc file. Of course, it's usually needed to remount the /system partition as read-write, but the procedure will not be covered in this answer. (FYI in lineageOS with root enabled Amaze(with root enabled) file explorer to move mkshrc over to Documents then edit it by mounting it over USB MTP on my Ubuntu laptop then sending the edited mkshrc to overwrite the copy in /system/etc. Despite this this added lines to the file /system/etc/mkshrc and rebooting radioon and radiooff commands is not working so far for me)

This file takes care of various environment variables and aliases to be loaded by the Terminal once it is started, so fiddling with it is often discouraged. We can, though, add our personal functions and customizations just before the line that reads:

: place customisations above this line

. I would like to remind that : is a special shell builtin, and thus must be left untouched.
Disabling RIL

Here, we'll define a custom function radiooff, which will next be callable from the Terminal at will. The code is as follows:

# This function detaches a device from the cellular network
# Upon execution, a reboot must be performed
function radiooff {
if [ "$(whoami)" != "root" ]; then
echo "Error: must be executed as root."
return 1
fi

if [ "$(getprop persist.radio.noril)" == "1" ]; then
echo "Radio is already disabled."
return 1
fi

setprop persist.radio.noril 1

if [ "$(getprop persist.radio.noril)" == "1" ]; then
echo "Radio is now disabled. Please reboot."
return 0
else
echo "Error: unable to disable radio."
return 1
fi
}

. I'd like to remind that it's vital to place this code at the bottom of the file, but above the line mentioned at the start of this section.
Enable RIL

This function, as the comments explain, is the inverse of the radiooff function:

# This function connects a device back on the cellular network
# Upon execution, a reboot must be performed
function radioon {
if [ "$(whoami)" != "root" ]; then
echo "Error: must be executed as root."
return 1
fi

if [ "$(getprop persist.radio.noril)" == "0" ]; then
echo "Radio is already enabled."
return 1
fi

setprop persist.radio.noril 0

if [ "$(getprop persist.radio.noril)" == "0" ]; then
echo "Radio is now enabled. Please reboot."
return 0
else
echo "Error: unable to enable radio."
return 1
fi
}

. Upon saving the modifications, the functions radioon and radiooff will become available for use after the CyanogenMod Terminal application is started, or restarted. The procedure for using them is simply to enter the name of the needed function and enter.

It may be obvious, but the second solution will not work if the user uses a Terminal that is not CyanogenMod's.

(edit)
I am not too concerned with getting the radioon/off script working I have made a note in Documents with the noril command lines so if I need GPS or want to use it as a phone I have the tools to do so. If you figure it out leave a comment in the thread. I think I have what I needed when I began this exploration, I have a mostly FOSS mini tablet so I have a modern web browser while using my N900 as my primary phone. I want to leave everything I have tried as documentation for future users.