MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Kindle Developer's Corner (https://www.mobileread.com/forums/forumdisplay.php?f=150)
-   -   Block OTA by removing ota related binaries (https://www.mobileread.com/forums/showthread.php?t=327879)

Hzj_jie 03-06-2020 04:08 PM

Block OTA by removing ota related binaries
 
This is still in the evaluating stage; I will update the post to explain whether it would permanently work or not.

My use scenario is pretty common, I need wifi to sync reading progress between my devices through koreader, use wikipedia, etc. So I cannot disable wifi just for blocking ota.
But ota breaks jailbreak easily, especially 5.12.*. So yesterday, my voyage automatically updated itself; and I have to run emergency again to bring back my jailbreak.

The idea is also very straightforward. I randomly found there were two processes on kindle otaupd and otav3. The first one looks like a daemon, the second one looks like the real implementation of ota. So I renamed these two files in /usr/bin/ to otaupd.bck and otav3.bck and manually kill the existing processes. After that, the processes definitely won't be brought back again.
So far, no obvious negative impacts were found.

I have done the same thing on both a voyage and a pw4. The voyage has updated to 5.12.4, and the pw4 is kept in 5.12.3 until now.
I will let you know if it can permanently block ota.

NiLuJe 03-06-2020 04:58 PM

You can probably nerf 'em at the source in the elektra db (I don't have a Kindle on hand right now, and I don't remember what exactly is tweakable, but most of the daemon manager setup lives here, and I'm pretty sure there are leaves dedicated to the OTA stuff in there).

(That's... not any easier/cleaner than renaming the binaries, though, since I don't think they ship the elektra tools in the FW, and it's in the ro rootfs, *and* mounted from a squashfs image IIRC. But at least that would prevent the daemon manager from retrying the startup like an idiot. Probably. Like I said, haven't even looked at a Kindle to spout all this, so, err, take this with a grain of salt :D).

Hzj_jie 03-06-2020 07:33 PM

Oh, yes, forgot to mention, need to start with "mntroot rw". So the change should be preserved after restarts.

Hzj_jie 03-12-2020 12:11 AM

Emmm, likely it works, my paperwhite 4 hasn't updated it to 5.12.4 until now.

RnJ4 03-13-2020 04:57 AM

The 5.12.4 FW is recalled by Amazon.Hopefully it will work but we need to wait until next update.:p

Hzj_jie 03-30-2020 08:59 PM

PW4 still has not updated itself. It looks like this method works.

Ruskie_it 06-20-2020 03:23 AM

Quote:

Originally Posted by Hzj_jie (Post 3970208)
PW4 still has not updated itself. It looks like this method works.

Could you please explain this more in detail (I.e. write a step by step procedure, explaining how to mount in rw etc)?

j.p.s 06-20-2020 12:54 PM

Quote:

Originally Posted by Ruskie_it (Post 4002493)
Could you please explain this more in detail (I.e. write a step by step procedure, explaining how to mount in rw etc)?

I don't know about the rest, but the instructions for mount are given every time you
ssh into the kindle. At a shell prompt:
mntroot rw

and

mntroot ro

to go back.

Ruskie_it 06-20-2020 01:31 PM

Quote:

Originally Posted by j.p.s (Post 4002651)
I don't know about the rest, but the instructions for mount are given every time you
ssh into the kindle. At a shell prompt:
mntroot rw

and

mntroot ro

to go back.

Thanks. I have experience with "normal" linux but not this specific operations.
Alright, since in the kindles I am playing lately the update.bin.tmp.partial failed both in 5.12.1 and I almost was getting the forced update in 5.11.1 I will try this trick, and let's see...

RandomGiraffe 08-18-2020 07:42 AM

Quote:

Originally Posted by Ruskie_it (Post 4002673)
Thanks. I have experience with "normal" linux but not this specific operations.
Alright, since in the kindles I am playing lately the update.bin.tmp.partial failed both in 5.12.1 and I almost was getting the forced update in 5.11.1 I will try this trick, and let's see...

Hey, just wondering if you got anywhere with testing this.

Hzj_jie 08-21-2020 02:49 AM

My voyage 7th and paperwhite 10th are both stuck at 5.12.4. So the trick should work.

RandomGiraffe 08-21-2020 03:00 AM

That’s great news. I’m no expert on such things though, so please could you advise me how I go about doing this?

Hzj_jie 08-28-2020 02:04 AM

Sorry, I should make it more clear at the first place.

First of all, the device needs to be jail broken.
1. ssh to the device through either wifi or usbnet. I do not see a difference here.
2. mntroot rw
3. cd /usr/bin
4. mv otaupd otaupd.bck
5. mv otav3 otav3.bck
6. ps aux | grep ota
You will see four processes here. Ignore the "/usr/java/bin/cvm" and "grep ota".
The second column is the process id, note down the ids of the other two processes, otav3 and otaupd.
7. pkill {the id in the output of the last command}
8. pkill {the other id in the output of the last command}
or instead of pkill, use reboot command to reboot the device. Then you will know if these two processes would be restarted after reboot.

The otav3 seems like "ota" "v3"; I am not sure if it has been changed to v4 recently.

Indeed you do not need to use ssh, if you have koreader, use the terminal simulator in the plugin can do pretty much the same thing.

RandomGiraffe 08-28-2020 09:17 AM

Amazing! And no need to apologise at all. So this should in theory block any further updates, and survive a Kindle reboot? Is it something that could possibly be built into KUAL at some point?

Ruskie_it 08-28-2020 09:35 AM

Quote:

Originally Posted by RandomGiraffe (Post 4024307)
Hey, just wondering if you got anywhere with testing this.

Yep, did as instructed, worked so far (but I don't use Wi-fi that often)


All times are GMT -4. The time now is 11:37 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.