Jump to content

ROM: Ungoogled Stock


Recommended Posts

I am pleased to announce a new member of the Pro1 ROM family: "Ungoogled Stock".

 

What is it?

This is the stock ROM as built from the BSP directly from IdeaLTE with the following changes, and only these changes:

  • Removed AdUps OTA update code.
  • Removed GMS (Google Apps).

 

Where is it?

The current version is:

http://files.nwwn.com/android/pro1/QX1000-user-nogms-noadups-20191208.zip

MD5: 01c90007a843328b869bb294c8f88330

SHA1: 3aff440c50ec2464437c5698bc1c7740ed827c34

Source synced to BSP as of Nov 29, 2019.

 

How do I flash it?

Unzip the package.  You will find 5 img files.  Flash each of these, set the active slot, and reboot.

Note:

  • It is recommended to flash both boot slots, but this is not technically necessary.
  • Data wipe may be necessary if the device does not boot.

Example:
 

adb reboot bootloader

fastboot flash boot_a boot.img

fastboot flash dtbo_a dtbo.img

fastboot flash system_a system.img

fastboot flash vbmeta_a vbmeta.img

fastboot flash vendor_a vendor.img

fastboot --set-active=a

fastboot reboot

 

Can I add Google Apps later?

It would be theoretically possible but it would require wiping data and disabling some security measures (verity and avb).  I am not prepared to support this.  If you want Google Apps, use official stock or Lineage.

 

  • Like 6
  • Thanks 9
Link to post
Share on other sites
  • Replies 72
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I am pleased to announce a new member of the Pro1 ROM family: "Ungoogled Stock".   What is it? This is the stock ROM as built from the BSP directly from IdeaLTE with the following chang

So just a quick update regarding Secure Boot.  I had considered posting a new thread about this but I'm not sure it's warranted.  So I'll just drop this here...   I spoke with FxTec and they

As a former computer security professional, I want to emphasize that everything tdm has said is correct. But any serious discussion about security needs to be very concrete about the threat model, or

This is fantastic.  Without a doubt, I'll be a LOS guy, but until it's ready this is very tempting.  Thanks!!

Edit: Since OTAs are out (which I like), can it be repaved to axe A/B support and gain the extra internal 4 Gb as well?

Edited by Polaris
  • Thanks 2
Link to post
Share on other sites

That's neat. Thank you!
Not sure if I'll use this (lack of device makes it hard so far), but does this "stock" mean plain Android without any extras or like the official Fx images but without Google and OTA?
Not quite the point of this ROM and since the sources are from November it doesn't actually help, but I was wondering if they were more current, would the boot.img be pretty much the same as the official one and be usable for Magisk patching?

  • Thanks 1
Link to post
Share on other sites
1 minute ago, elvissteinjr said:

That's neat. Thank you!
Not sure if I'll use this (lack of device makes it hard so far), but does this "stock" mean plain Android without any extras or like the official Fx images but without Google and OTA?
Not quite the point of this ROM and since the sources are from November it doesn't actually help, but I was wondering if they were more current, would the boot.img be pretty much the same as the official one and be usable for Magisk patching?

I'm not quite sure what you are asking.

 

No, this is not "plain" Android -- it is the full stock BSP build minus adups and gms.

 

The sources are relatively stable at this point.  I just did a sync a few minutes ago and there are a couple of recent changes: (1) a fix to the sensors config to avoid a crash when referencing the motion sensor, (2) a fix to the keyboard kernel driver to enable suspend/resume, and (3) a fix to allow storing camera pictures on the sdcard.  I'll probably incorporate these into a new build at some point, but they are relatively minor.

 

The boot image (and everything else) is indeed the same as official stock.  I don't have access to the device signing key used by stock so it is signed using "test keys".  But other than that, and the aforementioned changes, it is exactly stock.

 

I don't use Magisk.  You can try using it if you like but you'll be on your own.

 

  • Thanks 2
Link to post
Share on other sites

What was asking was if the boot image can be used with the official Android builds as Fx themselves appear to only provide updates through OTA so far. 
For Magisk however, we need a boot image file to patch, so keeping up to date with the kernel while keeping root doesn't appear possible right now. And I personally want to root right away when I get my phone.

Not asking for direct assistance on that, but knowing if it could work that way is useful. Perhaps Fx does eventually update their flashable files, but it could take a while, knowing them.
With the lack of a device I'm on in immediate need of this yet, but I think there would be a few people here who would appreciate if you could also provide an up to date boot.img as a side effect of this rom.

Thanks for your efforts again.

  • Like 1
Link to post
Share on other sites
11 minutes ago, elvissteinjr said:

What was asking was if the boot image can be used with the official Android builds as Fx themselves appear to only provide updates through OTA so far. 
For Magisk however, we need a boot image file to patch, so keeping up to date with the kernel while keeping root doesn't appear possible right now. And I personally want to root right away when I get my phone.

Not asking for direct assistance on that, but knowing if it could work that way is useful. Perhaps Fx does eventually update their flashable files, but it could take a while, knowing them.
With the lack of a device I'm on in immediate need of this yet, but I think there would be a few people here who would appreciate if you could also provide an up to date boot.img as a side effect of this rom.

Thanks for your efforts again.

I'm not going to try right now, but the short answer is no because the kernel binary is not signed with the device keys, which means the stock kernel modules in /vendor would not load and WiFi would not work.  You could work around this by putting the stock kernel binary into my boot image.  However, at that point, you may as well use a stock boot image.  Additionally, the following things come to mind:

  • The adups properties are not present.  This will likely prevent OTA updates from downloading.  Which is fine, because:
  • The build is signed with test keys, so recovery will refuse to flash stock packages and updates.
  • GMS property ro.com.google.gmsversion is missing which may make GMS fail to work, I don't know.
  • Property ro.build.description shows test-keys.  I think Play Store uses ro.build.fingerprint so this may be okay.

Note the stock boot image is available in another thread on this forum so you should probably use that instead.  And once you get root, you can pull the latest boot image off your device anyway.

 

So overall, I really don't see the point in trying to do this.

 

  • Thanks 1
Link to post
Share on other sites
58 minutes ago, tdm said:

Note the stock boot image is available in another thread on this forum so you should probably use that instead.  And once you get root, you can pull the latest boot image off your device anyway.

Magisk root modifies the boot image and does not change the system partition in any way. This leaves us with the issue of not being able to pull the new boot image from the device as root is gone after the OTA... and in order to restore root we need to flash a patched boot image... which can only be the old one in this case.
Unless some other way to grab the partition data surfaces or someone succeeds stringing together the intercepted incremental OTA packages, I suppose.

In any case, doesn't seem like something you can help us with after all, unfortunately. Just hope Fx will provide updates eventually then.
Thanks anyway.

Link to post
Share on other sites
15 minutes ago, okayphoneme said:

Is the source available for this so we can build it ourselves?

 

Unfortunately, no.  The BSP is proprietary.  FxTec has shared the BSP code with a few developers, but it is not generally available.  This is one of the reasons that Lineage exists.

 

And please don't get upset at FxTec and IdeaLTE.  The bulk of the BSP is licensed to OEMs by Qualcomm.  It is only through the generosity and trust in developers that FxTec has made the BSP available to developers at all.  They did not need to do this and, in fact, are not really supposed to do it.  Also note FxTec and IdeaLTE could release their device code if they chose, but it wouldn't do much good without the proprietary Qualcomm code.

 

Edited by tdm
  • Like 2
  • Thanks 5
Link to post
Share on other sites
14 minutes ago, elvissteinjr said:

Magisk root modifies the boot image and does not change the system partition in any way. This leaves us with the issue of not being able to pull the new boot image from the device as root is gone after the OTA... and in order to restore root we need to flash a patched boot image... which can only be the old one in this case.
Unless some other way to grab the partition data surfaces or someone succeeds stringing together the intercepted incremental OTA packages, I suppose.

In any case, doesn't seem like something you can help us with after all, unfortunately. Just hope Fx will provide updates eventually then.
Thanks anyway.

 

This is one of the nice things about A/B devices.  You can root one slot and extract images from the other slot.  In the case of an OTA, you can root the older inactive slot and extract the new one.

 

And in any case, if you want a way to read and write the boot partition, I can do that with EDL.  I've done it with several devices in the past.  Example:

https://forum.xda-developers.com/axon-7-mini/development/unlock-tuliptool-unlock-twrp-custom-boot-t3682781

 

EDIT: Also, I forgot to mention that FxTec has made fastboot packages for stock available, which contain the boot image and much more.  There is no reason to believe they could not or would not continue to do this with future updates.

 

Edited by tdm
  • Thanks 4
Link to post
Share on other sites
13 minutes ago, tdm said:

 

This is one of the nice things about A/B devices.  You can root one slot and extract images from the other slot.  In the case of an OTA, you can root the older inactive slot and extract the new one.

Good idea.  I have a stupid question about A/B updates that I guess I've never thought about.  Consider this scenario:

1)  You have an original version in A and B.

2)  You are running on A.

3)  You get an OTA that does an incremental update on B, B gets marked as active, and you reboot into B.

4)  You now get an incremental OTA.  This incremental OTA can't be applied to A, because A doesn't have the previous update yet.  What does the update process do in this case?

 

Link to post
Share on other sites

Appears I've been slightly misinformed, though I swear at least for the Pro1 stuff there was stuff going around along the lines of "flash back original boot.img, take OTA update, then flash patched one back", but it seems Magisk Manager can actually take care of all that and it should just work.

My ramblings were completely unnecessary if that turns out to be working just fine (I don't look exactly smart now, right?). I apologize for wasting your time there in that case.

I take the EDL tool is not something that exists for the Pro1 yet, right? Having something like that could come handy, but I don't want to be the one to burden you with that stuff as I'd probably wouldn't end up using it much.

Link to post
Share on other sites

Regarding the earlier discussion about capturing OTAs and downloading them externally, does anyone know of a tool that will apply external, incremental OTAs in order to build a full version that can be flashed?

Link to post
Share on other sites
2 minutes ago, david said:

Good idea.  I have a stupid question about A/B updates that I guess I've never thought about.  Consider this scenario:

1)  You have an original version in A and B.

2)  You are running on A.

3)  You get an OTA that does an incremental update on B, B gets marked as active, and you reboot into B.

4)  You now get an incremental OTA.  This incremental OTA can't be applied to A, because A doesn't have the previous update yet.  What does the update process do in this case?

 

I'm not really an OTA expert, but I believe the OTA takes the active slot data plus the patches and applies them to the inactive slot while the device is in use.  When complete, it switches the active slot and asks to reboot.  There is no such thing as a slot-specific update.

 

  • Thanks 1
Link to post
Share on other sites
6 minutes ago, elvissteinjr said:

I take the EDL tool is not something that exists for the Pro1 yet, right? Having something like that could come handy, but I don't want to be the one to burden you with that stuff as I'd probably wouldn't end up using it much.

I have not made one for the Pro1 yet.  Not out of complexity or anything, just because it's not needed.  The original stock files are made available by FxTec, which is a much easier way to retrieve them than messing with EDL.

 

Link to post
Share on other sites
10 minutes ago, tdm said:

I'm not really an OTA expert, but I believe the OTA takes the active slot data plus the patches and applies them to the inactive slot while the device is in use.  When complete, it switches the active slot and asks to reboot.  There is no such thing as a slot-specific update.

 

Ah, that makes total sense.  I knew there wasn't a slot specific update, but the incrementals have to be applied to version the incremental was created from by the vendor, so it can't be applied to the wrong slot.  But if it is reading from the active instead of just writing to the inactive, then that would work.

Link to post
Share on other sites
1 hour ago, tdm said:

 

Unfortunately, no.  The BSP is proprietary.  FxTec has shared the BSP code with a few developers, but it is not generally available.  This is one of the reasons that Lineage exists.

 

And please don't get upset at FxTec and IdeaLTE.  The bulk of the BSP is licensed to OEMs by Qualcomm.  It is only through the generosity and trust in developers that FxTec has made the BSP available to developers at all.  They did not need to do this and, in fact, are not really supposed to do it.  Also note FxTec and IdeaLTE could release their device code if they chose, but it wouldn't do much good without the proprietary Qualcomm code.

 

I see. So Lineage in theory does everything that the BSP does, but is an open source implementation?

Link to post
Share on other sites

Preface: I am sorry if this is a stupid question, please point me to any helpful information sources in that case.

What would be the advantage of using this ROM instead of a LineageOS build without GoogleApps?

Something along the lines of better hardware support comes to mind, but then it was my understanding that the proprietary blobs needed to support the hardware are fully available already. Otherwise LineageOS would not run on the device I'd imagine. Or are there maybe specific android software (functional) additions in the stock build that are only available that way?

Link to post
Share on other sites
1 minute ago, okayphoneme said:

I see. So Lineage in theory does everything that the BSP does, but is an open source implementation?

 

Well...... yes but not exactly.

 

Lineage is built on the open source portion of Android (AOSP) and the portions of the Qualcomm code that are released as open source (the CodeAurora project, or CAF).

 

The portions that Qualcomm does not release as open source are taken as binary blobs from the stock firmware and integrated into the Lineage build to make a complete package.  Because this is a sort of legal gray area, these blobs are kept strictly partitioned from the Lineage project and made available under the github account TheMuppets (really!)

 

The portions that Google does not release open source are known as Google Apps or gapps.  These are released as a separate flashable package.  This is done for historical reasons, because several years ago Google sent a nasty cease-and-desist letter to the CyanogenMod project (which is the precursor to Lineage).

 

So if you flash Lineage plus gapps, you will get something that does everything the stock ROM does plus a ton of fixes and enhancements made by the Lineage team.

 

You can also use Lineage without gapps which will result in something like the ROM posted here plus the Lineage fixes and enhancements.  Given this, I don't really know why someone would want to use the ungoogled stock ROM.  But since there have been requests and it's rather easy to do, I've gone ahead and made it available.

 

  • Like 3
  • Thanks 5
Link to post
Share on other sites
6 minutes ago, Ralf said:

Preface: I am sorry if this is a stupid question, please point me to any helpful information sources in that case.

What would be the advantage of using this ROM instead of a LineageOS build without GoogleApps?

Something along the lines of better hardware support comes to mind, but then it was my understanding that the proprietary blobs needed to support the hardware are fully available already. Otherwise LineageOS would not run on the device I'd imagine. Or are there maybe specific android software (functional) additions in the stock build that are only available that way?

 

I was answering this very question as you posted.  Lineage isn't quite ready yet so there's that.  But after it's working well, I don't think there will be much of any reason to use ungoogled stock.  Some folks have expressed that they like the landscape lock in the stock launcher, so there's that.  But I imagine that some sort of landscape lock will probably be added to Lineage at some point.

 

  • Thanks 3
Link to post
Share on other sites
8 hours ago, Polaris said:

Edit: Since OTAs are out (which I like), can it be repaved to axe A/B support and gain the extra internal 4 Gb as well?

I can certainly look into this. I also hate to waste 4gb of storage for no benefit to me (because I never use OTAs). But do understand that it's pretty low priority.

 

Also note that it will require repartitioning the device, which makes most folks nervous. And I'll need to make a non-AB version of lineage.

 

In other words it's a fair bit of work and will take some time.

  • Thanks 3
Link to post
Share on other sites
15 hours ago, Polaris said:

Edit: Since OTAs are out (which I like), can it be repaved to axe A/B support and gain the extra internal 4 Gb as well?

 

7 hours ago, tdm said:

I can certainly look into this. I also hate to waste 4gb of storage for no benefit to me (because I never use OTAs). But do understand that it's pretty low priority.

Also note that it will require repartitioning the device, which makes most folks nervous. And I'll need to make a non-AB version of lineage.

In other words it's a fair bit of work and will take some time.

Thank you, thank you, and thank you!

I never use OTAs either, I also don't like wasting 4 Gb for no reason, and I'm not at all nervous about re-partitioning the device.

 

Link to post
Share on other sites

Hey all!
I am very happy about another Rom for the Pro 1 🙂 Thanks to all being involved into the progress!

I've had some problems that I managed to work around, as a total noob.

Previously I've had installed the Linage test rom.
After flashing all the "ungoogled files" (Powershell says everything was succesfull), the device wouldn't boot into the system and I had no option to wipe, as told in the example in the first post.

Easier way:

First restore the factory rom -> than flash the ungoogled rom. That worked fine for me.

Now I'm happy to explore, what's working 🙂

Have a good day!

Edited by lukluk91
  • Thanks 2
Link to post
Share on other sites
15 hours ago, tdm said:

 

Well...... yes but not exactly.

 

Lineage is built on the open source portion of Android (AOSP) and the portions of the Qualcomm code that are released as open source (the CodeAurora project, or CAF).

 

The portions that Qualcomm does not release as open source are taken as binary blobs from the stock firmware and integrated into the Lineage build to make a complete package.  Because this is a sort of legal gray area, these blobs are kept strictly partitioned from the Lineage project and made available under the github account TheMuppets (really!)

 

The portions that Google does not release open source are known as Google Apps or gapps.  These are released as a separate flashable package.  This is done for historical reasons, because several years ago Google sent a nasty cease-and-desist letter to the CyanogenMod project (which is the precursor to Lineage).

 

So if you flash Lineage plus gapps, you will get something that does everything the stock ROM does plus a ton of fixes and enhancements made by the Lineage team.

 

You can also use Lineage without gapps which will result in something like the ROM posted here plus the Lineage fixes and enhancements.  Given this, I don't really know why someone would want to use the ungoogled stock ROM.  But since there have been requests and it's rather easy to do, I've gone ahead and made it available.

 

I appreciate the explanation, thank you.

I've been reading up on Lineage and I'm not super keen on it now - the project seems to put an emphasis on features over security - which is fine, but I think I'm actually interested in using something like the Ungoogled ROM you've posted here. The thing is, I'd like to make some modifications to it (entirely for my own purposes). I can see the stuff in the Android source that I would change but my knowledge of how the whole thing slots together is rather limited.

My question is: is there a way of merging in the proprietary (binary) bits of this BSP into AOSP so that I can obtain something similar to what you have here, or is not having access to the source going to scupper idea that completely?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Terms