<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mingke Tu</title>
    <description>The latest articles on DEV Community by Mingke Tu (@disconfirmai).</description>
    <link>https://dev.to/disconfirmai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4209707%2Fd8a35d54-8b25-4fb5-aa07-ce37b15a04a2.png</url>
      <title>DEV Community: Mingke Tu</title>
      <link>https://dev.to/disconfirmai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/disconfirmai"/>
    <language>en</language>
    <item>
      <title>My Mac windows kept landing on the wrong Space after every monitor swap, so I wrote a small app for it</title>
      <dc:creator>Mingke Tu</dc:creator>
      <pubDate>Thu, 12 Nov 2026 12:26:38 +0000</pubDate>
      <link>https://dev.to/disconfirmai/my-mac-windows-kept-landing-on-the-wrong-space-after-every-monitor-swap-so-i-wrote-a-small-app-for-2650</link>
      <guid>https://dev.to/disconfirmai/my-mac-windows-kept-landing-on-the-wrong-space-after-every-monitor-swap-so-i-wrote-a-small-app-for-2650</guid>
      <description>&lt;p&gt;I use a MacBook with one external monitor at a time, and I swap between a few monitors during the week. Every time I plug a monitor back in, macOS brings the windows back to that screen, but not to the Space they were on. Chrome ends up on desktop 3, Slack on desktop 1, and I spend the first few minutes dragging things around.&lt;/p&gt;

&lt;p&gt;I wanted something that remembers, for each monitor, which Space every window belongs to. I couldn't find a tool that did exactly that, so I wrote LayoutKeeper, a small menu bar app.&lt;/p&gt;

&lt;p&gt;What it does:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Saves a window layout per external monitor, keyed by the monitor's EDID, including which Space each window is on.&lt;/li&gt;
&lt;li&gt;When that monitor is plugged back in, it moves windows back to their saved Space and position.&lt;/li&gt;
&lt;li&gt;Tells Chrome windows apart by profile, so work and personal windows go back to the right places.&lt;/li&gt;
&lt;li&gt;Adds brightness keys for external monitors.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What it doesn't do yet: when you unplug and go back to the built-in screen only, it doesn't restore a separate layout for that. There is an open issue for it (&lt;a href="https://github.com/tumingke0/LayoutKeeper/issues/2" rel="noopener noreferrer"&gt;#2&lt;/a&gt;) and it's the next thing I want to build.&lt;/p&gt;

&lt;p&gt;It's free and open source (GPL-3.0), with builds for Apple Silicon and Intel:&lt;br&gt;
&lt;a href="https://github.com/tumingke0/LayoutKeeper" rel="noopener noreferrer"&gt;https://github.com/tumingke0/LayoutKeeper&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you swap monitors a lot, I'd like to know whether it works with your setup.&lt;/p&gt;

</description>
      <category>macos</category>
      <category>opensource</category>
      <category>productivity</category>
      <category>swift</category>
    </item>
    <item>
      <title>Comcast at about 7 times earnings, and the evidence I would look for before trusting it</title>
      <dc:creator>Mingke Tu</dc:creator>
      <pubDate>Sun, 01 Nov 2026 01:20:47 +0000</pubDate>
      <link>https://dev.to/disconfirmai/comcast-at-about-7-times-earnings-and-the-evidence-i-would-look-for-before-trusting-it-2h05</link>
      <guid>https://dev.to/disconfirmai/comcast-at-about-7-times-earnings-and-the-evidence-i-would-look-for-before-trusting-it-2h05</guid>
      <description>&lt;p&gt;Comcast (CMCSA) closed at $23.22 on October 30, 2026, according to the &lt;a href="https://finance.yahoo.com/quote/CMCSA/" rel="noopener noreferrer"&gt;Yahoo Finance quote page&lt;/a&gt;. That is near the bottom of its 52 week range of $20.48 to $32.86. On the numbers in its own filings, the stock looks cheap. I wanted to see how long that impression survives once I go looking for reasons it might be wrong.&lt;/p&gt;

&lt;p&gt;Every number below comes from two documents filed on October 22, 2026: the &lt;a href="https://www.sec.gov/Archives/edgar/data/1166691/000162828026066863/cmcsa-20260930.htm" rel="noopener noreferrer"&gt;Q3 2026 10-Q&lt;/a&gt; and the &lt;a href="https://www.sec.gov/Archives/edgar/data/1166691/000162828026066783/ex991-9302026.htm" rel="noopener noreferrer"&gt;Q3 earnings release (Exhibit 99.1)&lt;/a&gt;, plus the &lt;a href="https://www.sec.gov/Archives/edgar/data/1166691/000162828026004994/cmcsa-20251231.htm" rel="noopener noreferrer"&gt;FY2025 10-K&lt;/a&gt; for full year EPS. The balance sheet date is September 30, 2026. The price is from October 30, 2026. I did the arithmetic myself, so check it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it looks cheap
&lt;/h2&gt;

&lt;p&gt;The 10-Q cover reports about 3.55 billion shares outstanding on October 15, 2026. At $23.22 that is a market value of roughly $82 billion.&lt;/p&gt;

&lt;p&gt;Diluted EPS was $5.39 for 2025 and $4.78 for the first nine months of 2025, so Q4 2025 was about $0.61. Add the $2.55 reported for the first nine months of 2026 and trailing GAAP EPS comes to about $3.16. That puts the stock at a little over 7 times trailing earnings.&lt;/p&gt;

&lt;p&gt;Shareholders' equity was $92.5 billion at September 30, so the stock also trades below book, at roughly 0.9 times. The dividend is $1.32 a year, which is about 5.7% at that price. Free cash flow for the nine months was $12.7 billion, and dividends paid were $3.6 billion.&lt;/p&gt;

&lt;p&gt;That is the headline. Here is what it quietly assumes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the bull case needs to be true
&lt;/h2&gt;

&lt;p&gt;When I write down a thesis on a stock like this, I try to reduce it to a few claims that can each be checked. For Comcast I end up with four.&lt;/p&gt;

&lt;p&gt;The broadband business, which carries most of the profit, is stable enough that today's earnings are a fair guide to future earnings.&lt;/p&gt;

&lt;p&gt;Free cash flow is real and recurring, so the dividend and debt paydown are funded by the ongoing business.&lt;/p&gt;

&lt;p&gt;Book value means something, so trading below it implies a margin of safety.&lt;/p&gt;

&lt;p&gt;The planned split into two companies does not destroy value through costs, taxes or leverage.&lt;/p&gt;

&lt;p&gt;For each claim, I then ask what fact would overturn it and where that fact would be published.&lt;/p&gt;

&lt;h2&gt;
  
  
  Broadband: the claim most likely to break
&lt;/h2&gt;

&lt;p&gt;In the earnings release, domestic broadband residential customers were 28.34 million at the end of Q3 2026 against 28.90 million a year earlier, a decline of about 554,000. The company lost 144,000 in Q3 alone, worse than the 91,000 lost in Q3 2025. Domestic broadband revenue fell 4.7% to $6.24 billion, and the release says this was due to lower average rates as well as fewer customers.&lt;/p&gt;

&lt;p&gt;Fewer customers paying less each is the pattern I care about most. Residential Connectivity &amp;amp; Platforms Adjusted EBITDA fell 5.8% to $6.11 billion and its margin went from 36.8% to 35.9%. Management describes this as investment in its go to market strategy. That may be true, and it is also what a price war looks like from the inside.&lt;/p&gt;

&lt;p&gt;There are offsets. Wireless lines grew to 10.56 million, with 368,000 net additions in the quarter, and wireless service revenue rose 14.7%. Business Services Connectivity revenue grew 2.7%. Whether those can outgrow the broadband decline is the open question.&lt;/p&gt;

&lt;p&gt;What would overturn the stability claim: broadband customer losses that keep widening for another two or three quarters while revenue per customer keeps falling. Where to check: the customer metrics table in each earnings release, the segment results in Item 2 of each 10-Q, and the trending schedule Comcast posts on its investor relations site.&lt;/p&gt;

&lt;h2&gt;
  
  
  Earnings versus cash
&lt;/h2&gt;

&lt;p&gt;The nine month comparison is a good reminder of why I never take one period's P/E at face value. GAAP net income attributable to Comcast was $17.8 billion for the first nine months of 2025 and $9.1 billion for the same period of 2026. The reconciliation table in the release shows that 2025 included a $7.06 billion gain related to an investment, worth $1.89 per share. Adjusted EPS, which strips that and other items, fell from $3.46 to $2.90.&lt;/p&gt;

&lt;p&gt;The trailing P/E I calculated does not include that 2025 gain, since it fell in the first nine months of 2025. Q4 2025 may still contain its own items, which is something I would check in the 10-K before relying on the 7 times figure.&lt;/p&gt;

&lt;p&gt;On cash, the 10-Q shows nine month operating cash flow of $22.9 billion, down from $24.8 billion. Income tax payments fell from $2.38 billion to $1.50 billion. The filing says 2025 legislation is expected to significantly reduce tax payments over the next several years, mainly through extra depreciation deductions. That helps cash flow now. It also means some of today's free cash flow comes from tax timing that will not last forever. Capital expenditures rose to $8.3 billion from $8.0 billion, driven by customer premise equipment and network spending in Connectivity &amp;amp; Platforms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Book value and debt
&lt;/h2&gt;

&lt;p&gt;Below book sounds safe until you read the asset side. At September 30, goodwill was $53.2 billion, franchise rights $59.4 billion and other intangible assets $19.1 billion. Together that is about $131.7 billion, well above the $92.5 billion of equity. Tangible book value is negative. Price to book tells me very little here.&lt;/p&gt;

&lt;p&gt;Total debt was $87.4 billion, more than the market value of the equity. The company has been paying it down: $10.4 billion of repayments in nine months, including early purchases of $4.1 billion of notes maturing between January 2027 and June 2029. The current portion of debt was $3.56 billion. The revolving credit facility has a debt to EBITDA covenant tested quarterly, and the 10-Q says Comcast met it and expects to keep doing so. With $11.8 billion of available borrowing capacity, near term refinancing looks manageable. What worries me more is EBITDA continuing to shrink under a large debt load.&lt;/p&gt;

&lt;h2&gt;
  
  
  The split
&lt;/h2&gt;

&lt;p&gt;In June 2026 Comcast announced a plan to spin off NBCUniversal and Sky, expected in mid 2027. The 10-Q risk factors are frank: completion depends on board approval, tax opinions, regulators and financing, and the two smaller companies will each carry costs that are shared today. Buybacks were suspended from the start of Q3 and are expected to stay paused through the separation. Comcast also agreed in July to buy ITV's Media &amp;amp; Entertainment business for up to £1.6 billion.&lt;/p&gt;

&lt;p&gt;The thing I cannot answer from public filings yet is how the $87.4 billion of debt will be divided. That single fact changes the value of each piece more than any earnings multiple.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest open questions
&lt;/h2&gt;

&lt;p&gt;Is the broadband decline a temporary result of pricing investment, or a permanent step down in share? Will wireless and business services grow fast enough to cover it? How much of current free cash flow depends on tax benefits that fade? How will debt and dividend policy look for each company after the split? Theme Parks EBITDA also fell 17.1% in the quarter, and management calls the headwinds cyclical. That claim is worth testing too.&lt;/p&gt;

&lt;p&gt;The low multiple does not settle any of these. It is the market's way of pricing them.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I keep track of this
&lt;/h2&gt;

&lt;p&gt;This kind of filing work is what &lt;a href="https://disconfirmai.com/en/features/research" rel="noopener noreferrer"&gt;DisconfirmAI's Research&lt;/a&gt; is meant for. You ask a question with the filing attached, it pulls the numbers with their source and period, and it keeps verified, inferred and doubtful points apart, which makes it easier to see where you are guessing. The open questions above then fit a &lt;a href="https://disconfirmai.com/en/features/radar" rel="noopener noreferrer"&gt;Radar&lt;/a&gt; watch, for example domestic broadband customer losses each quarter and any filing that describes how debt will be split between the two companies. Radar checks on the schedule you set and records an empty scan when nothing changed, so you can see the check ran.&lt;/p&gt;

&lt;p&gt;The product overview is at &lt;a href="https://disconfirmai.com/en" rel="noopener noreferrer"&gt;disconfirmai.com/en&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Disclaimer
&lt;/h2&gt;

&lt;p&gt;This is a research walkthrough based on public filings as of October 30, 2026. It is not investment advice and it is not a recommendation to buy or sell Comcast or any other security. Figures were calculated by me from the documents linked above and may contain errors. Read the original filings before relying on anything here.&lt;/p&gt;

</description>
      <category>investing</category>
      <category>finance</category>
      <category>ai</category>
      <category>showdev</category>
    </item>
    <item>
      <title>How I check a cheap stock for a value trap before trusting the discount</title>
      <dc:creator>Mingke Tu</dc:creator>
      <pubDate>Thu, 29 Oct 2026 10:54:09 +0000</pubDate>
      <link>https://dev.to/disconfirmai/how-i-check-a-cheap-stock-for-a-value-trap-before-trusting-the-discount-7eh</link>
      <guid>https://dev.to/disconfirmai/how-i-check-a-cheap-stock-for-a-value-trap-before-trusting-the-discount-7eh</guid>
      <description>&lt;p&gt;A stock that has fallen 40% and trades at a low multiple is easy to like. A lot of bad long-term decisions start there, with a discount taken as evidence that the business is fine and the market is wrong.&lt;/p&gt;

&lt;p&gt;The research side of &lt;a href="https://disconfirmai.com/en" rel="noopener noreferrer"&gt;DisconfirmAI&lt;/a&gt; is built on one rule: the AI looks for evidence against the thesis before it collects evidence for it. This post walks through one concrete place where that rule lives: the free &lt;a href="https://disconfirmai.com/en/tools/value-trap" rel="noopener noreferrer"&gt;Value Trap Review&lt;/a&gt; page, and how I use it on a company before I let a low price count as a reason to buy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why counter-evidence goes first
&lt;/h2&gt;

&lt;p&gt;If you ask a language model "is this stock undervalued?", it will usually find reasons to say yes. There is always a bull case somewhere on the internet, and the answer ends up feeling well researched.&lt;/p&gt;

&lt;p&gt;The fix I settled on is to change the order of work. Before anything else, write down the few claims that must be true for the stock to be cheap. Then, for each claim, state what observation would prove it wrong, and go looking for that observation. Only after that do you look at the supporting evidence, and you weigh it by quality.&lt;/p&gt;

&lt;p&gt;On the &lt;a href="https://disconfirmai.com/en/features/research" rel="noopener noreferrer"&gt;Research page&lt;/a&gt; this shows up as three separate columns in every answer: verified, inferred and doubtful. The Value Trap Review applies the same idea to one specific question: is this stock cheap for a reason?&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Open the page and fill in what you already believe
&lt;/h2&gt;

&lt;p&gt;The page needs no account. There are three optional fields: the company or ticker, why it looks cheap to you, and any prior research or context.&lt;/p&gt;

&lt;p&gt;The second field is the one that matters. A thesis like "it trades at 7x earnings after the sell-off, and the core business is intact" is something the review can test. If you leave it empty, the framework reconstructs at most three candidate cheapness claims, labels them as inferred, and makes clear they are not your words.&lt;/p&gt;

&lt;p&gt;As you type, the research framework on the right updates. It is about 10,000 characters of instructions that you copy or download as a TXT file and run in a deep research tool. The page itself fetches no market data and does not analyze anything. I built it that way on purpose so you can read every rule the AI is asked to follow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Write down what must be true
&lt;/h2&gt;

&lt;p&gt;The framework's first section asks the AI to list up to five decision-critical claims behind the apparent cheapness. Each one needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;whether the claim came from you or was inferred&lt;/li&gt;
&lt;li&gt;the strongest plausible opposing explanation&lt;/li&gt;
&lt;li&gt;an observable condition that would falsify it&lt;/li&gt;
&lt;li&gt;what would genuinely support it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One line in the framework I would put on a sticky note: a recent price decline is not evidence that intrinsic value is intact.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Test three kinds of trap
&lt;/h2&gt;

&lt;p&gt;This is the core of the review. Each trap family has its own checks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Value overstated.&lt;/strong&gt; Normalize cyclical earnings across a full cycle. Strip out one-off gains, investment income, tax effects and capitalized costs. Reconcile earnings to cash and working capital. Separate cash that can actually be distributed from restricted cash and operating liquidity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Value eroding.&lt;/strong&gt; Decide whether the problem is a temporary cyclical shock or a permanent loss of demand, share or pricing power. Look at maintenance versus growth investment and at incremental returns on capital. The framework warns against mechanical rules here: a capex increase is not automatically bad, and low asset growth is not automatically discipline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Value not reaching shareholders.&lt;/strong&gt; Debt maturities, covenants and refinancing terms. Dilution and stock compensation. Related-party deals, minority interests and capital allocation. Having no near-term catalyst does not count as a trap; the framework asks the AI to model the cost of waiting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Build a claim-level evidence ledger
&lt;/h2&gt;

&lt;p&gt;Every material claim gets a row: supporting evidence, the strongest counter-evidence, source links with dates, missing facts, a falsification condition, which valuation assumption it affects, and a status of supported within scope, material unresolved, or invalidated.&lt;/p&gt;

&lt;p&gt;An unsupported allegation alone does not invalidate a claim, and the absence of negative news does not count as support.&lt;/p&gt;

&lt;p&gt;The framework also requires a source URL, date and unit next to each material number, and explicit labels such as DATA_MISSING or STALE_CRITICAL when data is missing or stale. Financial statements come from Financial Modeling Prep by default. When a field is missing there, the AI has to say which field and why it used another source.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Feed findings back into the valuation
&lt;/h2&gt;

&lt;p&gt;A finding only matters if it changes a number. For each one, the framework asks what moves: normal earnings, margins, reinvestment, cash accessibility, share count, discount rate or the time it takes to realize value. It prefers revising the forecast over adding a bigger safety haircut.&lt;/p&gt;

&lt;p&gt;If the inputs needed to recompute intrinsic value are not available, the output is VALUATION_REBUILD_REQUIRED with a list of what is missing. It will not make up a price.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Read the final status
&lt;/h2&gt;

&lt;p&gt;The review ends with one of three statuses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NO_MATERIAL_TRAP_IDENTIFIED&lt;/strong&gt; means every decision-critical claim is supported within the disclosed coverage. The framework states plainly that this is not a buy signal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MATERIAL_UNCERTAINTY_UNRESOLVED&lt;/strong&gt; means at least one key issue is open. You pause and go get the smallest piece of evidence that would settle it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CORE_THESIS_INVALIDATED&lt;/strong&gt; means reliable evidence contradicts a premise the thesis depends on. That overrides any attractive average or oversold reading.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The statuses are never averaged. The most consequential finding wins. Each open or failed premise also gets a reopening condition and the next natural review event, such as a filing or a covenant test.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it connects to the rest of the site
&lt;/h2&gt;

&lt;p&gt;I usually run the &lt;a href="https://disconfirmai.com/en/tools/quality-gate" rel="noopener noreferrer"&gt;Quality Gate&lt;/a&gt; first to decide whether a business belongs in my research pool at all, then the &lt;a href="https://disconfirmai.com/en/tools/framework-router" rel="noopener noreferrer"&gt;Framework Router&lt;/a&gt; to pick a valuation method, and the Value Trap Review when the price looks too good. Valuation itself lives in tools like &lt;a href="https://disconfirmai.com/en/tools/damodaran-dcf" rel="noopener noreferrer"&gt;Damodaran DCF&lt;/a&gt; and &lt;a href="https://disconfirmai.com/en/tools/buffett-intrinsic-value" rel="noopener noreferrer"&gt;Buffett intrinsic value&lt;/a&gt;. All 23 are on the &lt;a href="https://disconfirmai.com/en/tools" rel="noopener noreferrer"&gt;tools page&lt;/a&gt; and none of them need an account.&lt;/p&gt;

&lt;p&gt;If a review ends in "unresolved", I write the reopening condition into my &lt;a href="https://disconfirmai.com/en/features/system" rel="noopener noreferrer"&gt;investment system&lt;/a&gt; as a revision line. Radar checks it on a schedule, and when nothing has changed it logs "scanned, no change" so I can see the check actually ran.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits worth knowing
&lt;/h2&gt;

&lt;p&gt;The page does not verify a company, import earlier tool output, or give a verdict. The quality of the review depends on the research tool you paste it into and the data that tool can reach. The framework ends every report with the same sentence, and I agree with it: this is a bounded review of the current thesis, not proof that a company is trap-free or a recommendation to trade.&lt;/p&gt;

&lt;p&gt;If you try it on a stock you own, I would like to hear which trap family caught something you had missed.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>investing</category>
      <category>finance</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Building a Cross-Platform Screen Time Blocker (iOS FamilyControls + Android Device Owner) That Kids and Night-Scroll Impulses Cannot Bypass</title>
      <dc:creator>Mingke Tu</dc:creator>
      <pubDate>Wed, 28 Oct 2026 14:16:15 +0000</pubDate>
      <link>https://dev.to/disconfirmai/building-a-cross-platform-screen-time-blocker-ios-familycontrols-android-device-owner-that-kids-24dn</link>
      <guid>https://dev.to/disconfirmai/building-a-cross-platform-screen-time-blocker-ios-familycontrols-android-device-owner-that-kids-24dn</guid>
      <description>&lt;p&gt;I build Ripple, a small screen time blocker, and the hardest part has never been blocking apps. It has been keeping the block in place when someone really wants out. This post covers what I changed in v0.1.5 for iOS 16+ and Android 8+.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why ordinary limiters get bypassed
&lt;/h2&gt;

&lt;p&gt;On iPhone, kids watch a parent type the 4 digit Screen Time passcode and remember it. Adults tap "Ignore Limit" or "One More Minute" while lying in bed at 1 AM without thinking about it.&lt;/p&gt;

&lt;p&gt;On Android, a kid can open system settings and hit Force Stop, or move the system clock forward an hour. Online classes make it worse, because the phone needs WeChat for school chat, and a few minutes there turns into hours in WeChat Channels or YouTube Shorts.&lt;/p&gt;

&lt;h2&gt;
  
  
  iOS 16+: FamilyControls, ManagedSettings, DeviceActivity
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Setting &lt;code&gt;ManagedSettingsStore().application.denyAppRemoval = true&lt;/code&gt; removes the delete option when you long press the icon on the home screen.&lt;/li&gt;
&lt;li&gt;A separate &lt;code&gt;DeviceActivityMonitor&lt;/code&gt; extension watches the daily quota and the night window in the background. Swiping the main app away does not matter, because iOS itself launches the &lt;code&gt;ShieldConfiguration&lt;/code&gt; screen when the time is up.&lt;/li&gt;
&lt;li&gt;The cooldown timer uses &lt;code&gt;ProcessInfo.processInfo.systemUptime&lt;/code&gt;, a monotonic clock that counts since boot. Changing the date or time zone in Settings has no effect on it.&lt;/li&gt;
&lt;li&gt;Unlocking needs an 8 digit code held by a parent, or a code from a friend you picked.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Android 8+: block the feed and keep the service alive
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Only the short video surfaces are blocked: WeChat Channels and Moments, YouTube Shorts, and Instagram Reels. Normal chat and DMs keep working.&lt;/li&gt;
&lt;li&gt;On Android 11+ the phone can use its own wireless debugging to activate Device Owner, which stops uninstalling. The same route rebinds the accessibility service every 2.5 seconds if the system kills it.&lt;/li&gt;
&lt;li&gt;The APK went from 52 MB to 8.57 MB. It checks for updates on launch, and it asks for no network permission for blocking itself, so everything runs locally.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Website and guides: &lt;a href="https://ripplefocus.github.io/en/" rel="noopener noreferrer"&gt;https://ripplefocus.github.io/en/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;iOS Screen Time guide: &lt;a href="https://ripplefocus.github.io/en/ios/" rel="noopener noreferrer"&gt;https://ripplefocus.github.io/en/ios/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Android APK (8.57 MB, v0.1.5): &lt;a href="https://github.com/ripplefocus/ripplefocus.github.io/releases/download/v0.1.5/ripple-v0.1.5.apk" rel="noopener noreferrer"&gt;https://github.com/ripplefocus/ripplefocus.github.io/releases/download/v0.1.5/ripple-v0.1.5.apk&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Release page (APK and iOS IPA): &lt;a href="https://github.com/ripplefocus/ripplefocus.github.io/releases/tag/v0.1.5" rel="noopener noreferrer"&gt;https://github.com/ripplefocus/ripplefocus.github.io/releases/tag/v0.1.5&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have found other ways around Screen Time or Android blockers, I would like to hear them in the comments.&lt;/p&gt;

</description>
      <category>iosandroidfluttproductivityer</category>
    </item>
    <item>
      <title>Why Most Android Screen Time Blockers Fail at Midnight (And How We Fixed the Clock &amp; Uninstall Loopholes)</title>
      <dc:creator>Mingke Tu</dc:creator>
      <pubDate>Tue, 27 Oct 2026 10:00:35 +0000</pubDate>
      <link>https://dev.to/disconfirmai/why-most-android-screen-time-blockers-fail-at-midnight-and-how-we-fixed-the-clock-uninstall-1e44</link>
      <guid>https://dev.to/disconfirmai/why-most-android-screen-time-blockers-fail-at-midnight-and-how-we-fixed-the-clock-uninstall-1e44</guid>
      <description>&lt;p&gt;If you have ever set a screen time limit at 9 PM and watched it disappear at midnight, you already know the problem. Most Android blockers fail because the person who set the rule is also the person who can undo it, and willpower is lowest late at night. I built Ripple (v0.1.1), a free and local-only Android focus app, to close the three loopholes I kept hitting myself.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three classic loopholes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Changing the system clock.&lt;/strong&gt; Sleep schedules and cooldown timers usually read wall-clock time. Open Settings, move the date forward a day, and the timer is over. Any blocker that trusts &lt;code&gt;System.currentTimeMillis()&lt;/code&gt; can be beaten in seconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Scrolling feeds inside whitelisted apps.&lt;/strong&gt; Most people whitelist messaging apps so they stay reachable. Those apps now ship short-video feeds and stories, so a "messaging only" exception becomes a two-hour scroll session.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Uninstalling or force-stopping the blocker.&lt;/strong&gt; If an urge hits at midnight, revoking Accessibility permission or uninstalling the blocker takes about five seconds. Friction that you can remove on demand decays to zero.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Ripple closes each one
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Monotonic clock anchoring
&lt;/h3&gt;

&lt;p&gt;Ripple measures every timer with &lt;code&gt;SystemClock.elapsedRealtime()&lt;/code&gt;, which keeps counting regardless of what the user sets in the date and time settings. The app anchors its state to this clock and re-anchors across reboots, so changing the phone's time does nothing to a running cooldown or a sleep lock.&lt;/p&gt;

&lt;h3&gt;
  
  
  Asymmetric cooldowns
&lt;/h3&gt;

&lt;p&gt;Tightening a rule is instant. Add an app to the block list, lower a daily limit, or extend sleep hours, and it applies immediately. Relaxing a rule is slow. Pausing a schedule, raising a limit, or unlocking uninstall requires waiting out a cooldown of 15 minutes by default, configurable up to 2 hours, and doubled for short-video apps. If a real emergency comes up, a friend or family member can generate a one-time unlock code so you can skip the wait.&lt;/p&gt;

&lt;h3&gt;
  
  
  Per-session caps on whitelisted apps
&lt;/h3&gt;

&lt;p&gt;Whitelisted messaging apps get a 30-minute per-session limit. You can still reply to people, but a built-in video feed cannot turn into a late-night loophole.&lt;/p&gt;

&lt;h3&gt;
  
  
  Uninstall and force-stop protection
&lt;/h3&gt;

&lt;p&gt;On Android 11 and newer, Ripple can pair with Wireless Debugging on the phone itself, with no PC and no root. It starts a small local daemon through &lt;code&gt;app_process&lt;/code&gt; running as UID 2000 (the shell user). That daemon locks the OS uninstall switch and restarts the blocker within about 2.5 seconds if it is swiped away from Recents. If you already use Shizuku, Ripple supports that route too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the design works
&lt;/h2&gt;

&lt;p&gt;Each fix removes one cheap exit. The monotonic clock removes the time trick, the asymmetric cooldown makes late-night relaxing costly, the session cap shrinks the whitelist loophole, and the shell daemon protects the app itself. Together they keep a rule you set in the morning alive at midnight.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Project page: &lt;a href="https://ripplefocus.github.io/en/" rel="noopener noreferrer"&gt;https://ripplefocus.github.io/en/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Comparison with AppBlock and StayFocused: &lt;a href="https://ripplefocus.github.io/en/vs-appblock-stayfocused/" rel="noopener noreferrer"&gt;https://ripplefocus.github.io/en/vs-appblock-stayfocused/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Latest release (APK): &lt;a href="https://github.com/ripplefocus/ripplefocus.github.io/releases/latest" rel="noopener noreferrer"&gt;https://github.com/ripplefocus/ripplefocus.github.io/releases/latest&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Feedback from developers and digital minimalists is welcome, especially on edge cases for the clock and uninstall protections.&lt;/p&gt;

</description>
      <category>android</category>
      <category>productivity</category>
      <category>kotlin</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Building a Self-Healing Android App Blocker Using On-Device Wireless Debugging (No PC or Root)</title>
      <dc:creator>Mingke Tu</dc:creator>
      <pubDate>Tue, 27 Oct 2026 03:45:19 +0000</pubDate>
      <link>https://dev.to/disconfirmai/building-a-self-healing-android-app-blocker-using-on-device-wireless-debugging-no-pc-or-root-4f69</link>
      <guid>https://dev.to/disconfirmai/building-a-self-healing-android-app-blocker-using-on-device-wireless-debugging-no-pc-or-root-4f69</guid>
      <description>&lt;p&gt;When I tried using standard screen-time apps on Android to stop scrolling short-form video late at night, I ran into a predictable problem. Setting a 90-minute daily limit at 10:00 AM is easy. Keeping that limit intact at 12:30 AM takes much more than a pop-up dialog.&lt;/p&gt;

&lt;p&gt;On Android, bypassing a typical app blocker takes about five seconds:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Tap "Ignore limit for today" if the app is polite enough to offer one.&lt;/li&gt;
&lt;li&gt;Open &lt;strong&gt;Settings &amp;gt; Accessibility&lt;/strong&gt;, toggle off the blocker's service, or long-press the launcher icon and tap &lt;strong&gt;Uninstall&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Change the system clock forward by a few hours to skip a cooldown timer, or change the date to reset the daily quota.&lt;/li&gt;
&lt;li&gt;On aggressive OEM ROMs like OPPO ColorOS, Xiaomi HyperOS, or vivo OriginOS, swipe the app card away in Recents so the system kills its &lt;code&gt;AccessibilityService&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I built &lt;strong&gt;Ripple (涟漪)&lt;/strong&gt; (&lt;a href="https://ripplefocus.github.io/en/" rel="noopener noreferrer"&gt;English page&lt;/a&gt; / &lt;a href="https://github.com/ripplefocus/ripplefocus.github.io/releases" rel="noopener noreferrer"&gt;APK Releases&lt;/a&gt;) to close each of those escape hatches without requiring root access, a desktop computer, or a paid subscription.&lt;/p&gt;

&lt;p&gt;This post walks through the engineering choices behind Ripple: enforcing asymmetric rule changes on Android's monotonic clock, closing whitelist loopholes, running a self-healing &lt;code&gt;shell&lt;/code&gt; (UID 2000) daemon via Android 11+ on-device wireless debugging, and fixing a subtle &lt;code&gt;uint32&lt;/code&gt; overflow in &lt;code&gt;AndroidPubkey&lt;/code&gt; that initially caused half of all generated RSA keys to fail pairing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxu382pw1p6saexppcore.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxu382pw1p6saexppcore.png" alt="Ripple Overview" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Asymmetric Rules and Monotonic Cooldowns (&lt;code&gt;SystemClock.elapsedRealtime()&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;In Ripple, rule changes follow an asymmetric model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tightening a rule takes effect immediately&lt;/strong&gt;: Lowering a daily limit from 90 minutes to 45 minutes, extending a nightly focus schedule, or removing an app from the focus whitelist happens with zero delay.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Relaxing a rule requires waiting through a cooldown timer&lt;/strong&gt;: Adding time to an app, skipping tonight's sleep schedule, pausing protection, or uninstalling Ripple starts a countdown (15 minutes by default, configurable up to 2 hours, and automatically doubled for short-video apps like TikTok, YouTube, and Douyin). Users can also set a &lt;strong&gt;Friend / Parent Unlock Code&lt;/strong&gt; so a family member or parent can unlock it immediately when needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why &lt;code&gt;System.currentTimeMillis()&lt;/code&gt; Fails for Cooldowns
&lt;/h3&gt;

&lt;p&gt;A common mistake in productivity apps is storing a cooldown target timestamp using wall-clock time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Vulnerable to Settings &amp;gt; Date &amp;amp; Time changes&lt;/span&gt;
&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;unlockAtWallMs&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;currentTimeMillis&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;cooldownDurationMs&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a user (or a teenager whose parent set up the phone) turns off automatic network time and moves the clock forward by 30 minutes, a wall-clock timer expires immediately.&lt;/p&gt;

&lt;p&gt;Instead, Ripple anchors active cooldowns to Android's monotonic boot clock, &lt;code&gt;SystemClock.elapsedRealtime()&lt;/code&gt;, which counts milliseconds since boot including deep sleep and cannot be altered by user time settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;nowElapsed&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SystemClock&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;elapsedRealtime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;nowWall&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;currentTimeMillis&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We persist both &lt;code&gt;(startedElapsedMs, startedWallMs, durationMs)&lt;/code&gt;. While the device remains booted, remaining time is computed strictly from &lt;code&gt;SystemClock.elapsedRealtime() - startedElapsedMs&lt;/code&gt;. If the user reboots the phone mid-cooldown (which resets &lt;code&gt;elapsedRealtime&lt;/code&gt; to zero), we detect the boot count / monotonic reset and prevent any negative jump or forward clock jump from crediting unelapsed time.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Closing the Whitelist Loophole and Protecting System Essentials
&lt;/h2&gt;

&lt;p&gt;During a nightly focus schedule (Ripple defaults to &lt;code&gt;23:30–07:00&lt;/code&gt; on fresh installs), blocking everything except a few allowed apps creates two practical problems:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Messaging App Video-Feed Loophole&lt;/strong&gt;: If you whitelist a messaging app like WeChat or Telegram so you do not miss urgent messages, you also gain access to its built-in short-video feed or channels. To solve this, Ripple limits the focus whitelist to at most 5 apps and applies a &lt;strong&gt;per-session usage cap&lt;/strong&gt; (30 minutes by default) to each whitelisted app during focus hours. You have plenty of time to reply to messages, after which the app is paused for the rest of that focus session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero False Positives on System Essentials&lt;/strong&gt;: An app blocker should never stop an incoming phone call, an emergency SMS, a morning alarm, or a payment screen at a subway gate. Ripple permanently exempts system essentials without consuming whitelist slots:

&lt;ul&gt;
&lt;li&gt;Phone dialer and active call screens&lt;/li&gt;
&lt;li&gt;SMS / Messaging&lt;/li&gt;
&lt;li&gt;Clock and Alarms (full-screen ringing alarm activities are explicitly whitelisted so morning alarms always work)&lt;/li&gt;
&lt;li&gt;Calendar, System Camera (resolved dynamically via &lt;code&gt;MediaStore.ACTION_IMAGE_CAPTURE&lt;/code&gt;), Input Methods (IME), System File / Photo Pickers (&lt;code&gt;documentsui&lt;/code&gt; and MediaProvider picker), TalkBack, and default NFC Wallets.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  3. Two-Tier Anti-Uninstall Architecture
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Tier 1: Basic Protection (No PC, No Pairing)
&lt;/h3&gt;

&lt;p&gt;Most users only need a 15-minute speed bump when an urge hits. Basic Protection takes about one minute to set up on the phone by enabling &lt;strong&gt;Accessibility Service&lt;/strong&gt; and &lt;strong&gt;Device Administrator&lt;/strong&gt; (&lt;code&gt;DeviceAdminReceiver&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;When active, &lt;code&gt;ProtectionMatcher&lt;/code&gt; inspects window state changes in the Accessibility service to detect self-sabotage paths:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Long-pressing Ripple on the home screen to open the system uninstall dialog&lt;/li&gt;
&lt;li&gt;Opening Android Settings &amp;gt; App Info for Ripple to tap &lt;strong&gt;Uninstall&lt;/strong&gt; or &lt;strong&gt;Force Stop&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Opening Ripple's Storage page to tap &lt;strong&gt;Clear Storage / Clear Data&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Navigating to Ripple's Accessibility toggle or the Device Admin deactivation screen&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When any of these screens is entered, Ripple immediately navigates back to the home screen and displays a calm dark-mode screen stating which action was just intercepted and how long the cooldown timer is.&lt;/p&gt;

&lt;p&gt;Crucially, &lt;code&gt;ProtectionMatcher&lt;/code&gt; checks the target package name and specific installer view nodes so that opening App Info for other apps (for example, clearing cache in a browser) or installing an in-place APK update for Ripple is never falsely blocked.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tier 2: Advanced Protection via On-Device Wireless Debugging (&lt;code&gt;ripple_ss&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;Basic Protection has two limitations on modern Android phones:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If the user connects the phone to a computer or navigates fast enough on certain custom ROMs, Device Admin can still be deactivated.&lt;/li&gt;
&lt;li&gt;On aggressive OEM skins (ColorOS, HyperOS/MIUI, OriginOS), swiping Ripple away from the Recents screen force-stops the app process and tears down its &lt;code&gt;AccessibilityService&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Traditionally, surviving task killers or locking uninstallation at the system level required connecting the phone to a PC with USB debugging (&lt;code&gt;adb shell&lt;/code&gt;) or installing a separate third-party helper like Shizuku.&lt;/p&gt;

&lt;p&gt;Starting with &lt;strong&gt;Android 11 (API 30)&lt;/strong&gt;, Android includes built-in &lt;strong&gt;Wireless Debugging&lt;/strong&gt;. Because &lt;code&gt;adbd&lt;/code&gt; listens on the device's local interface, an app can pair with &lt;code&gt;adbd&lt;/code&gt; directly on the phone (&lt;code&gt;127.0.0.1&lt;/code&gt;), open a local ADB connection, and spawn a helper process running under the &lt;code&gt;shell&lt;/code&gt; user (&lt;code&gt;UID 2000&lt;/code&gt;) via &lt;code&gt;app_process&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In Ripple, this is an optional feature under &lt;strong&gt;Settings &amp;gt; Anti-Uninstall &amp;gt; Advanced Protection&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The user follows a 4-step guide to enable Developer Options and Wireless Debugging, then taps &lt;strong&gt;Pair device with pairing code&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Ripple posts a notification with an inline text input (&lt;code&gt;RemoteInput&lt;/code&gt;) so the user can type the 6-digit pairing code directly from the notification shade without closing Android's pairing dialog (closing the dialog invalidates the pairing code).&lt;/li&gt;
&lt;li&gt;Once paired, Ripple connects to &lt;code&gt;127.0.0.1:&amp;lt;connectPort&amp;gt;&lt;/code&gt;, grants itself &lt;code&gt;android.permission.WRITE_SECURE_SETTINGS&lt;/code&gt;, and starts a lightweight JVM daemon named &lt;code&gt;ripple_ss&lt;/code&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;CLASSPATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;pm path com.slowisle.app | &lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt;: &lt;span class="nt"&gt;-f2-&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
app_process /system/bin &lt;span class="nt"&gt;--nice-name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ripple_ss &lt;span class="se"&gt;\&lt;/span&gt;
  com.slowisle.app.selfstart.Server &amp;lt;bridgeToken&amp;gt; &amp;lt;wakeToken&amp;gt; &amp;lt;userId&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running as &lt;code&gt;UID 2000&lt;/code&gt; (&lt;code&gt;shell&lt;/code&gt;), &lt;code&gt;ripple_ss&lt;/code&gt; does three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;System-Level Uninstall Lock&lt;/strong&gt;: Calls &lt;code&gt;DevicePolicyManager.setBlockUninstallForUser&lt;/code&gt; so the package manager rejects uninstallation even before any UI appears. When the user legitimately finishes the cooldown timer under "I want to uninstall Ripple", Ripple releases this lock and verifies the unlocked state via &lt;code&gt;DevicePolicyManager.isUninstallBlocked&lt;/code&gt; before launching the system uninstaller.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strong Binder Reference + &lt;code&gt;DeathRecipient&lt;/code&gt; + 5s Heartbeat&lt;/strong&gt;: &lt;code&gt;ripple_ss&lt;/code&gt; passes an &lt;code&gt;IBinder&lt;/code&gt; back to the main app process through a &lt;code&gt;ContentProvider.call()&lt;/code&gt; handshake. If the user swipes Ripple away from Recents on ColorOS 14, &lt;code&gt;ripple_ss&lt;/code&gt; detects process death (and missing &lt;code&gt;enabled_accessibility_services&lt;/code&gt;), re-writes the Accessibility setting, and brings the service back in &lt;strong&gt;about 2.5 seconds&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reboot Self-Recovery&lt;/strong&gt;: After a phone reboot, once the user unlocks the screen, Ripple uses its granted &lt;code&gt;WRITE_SECURE_SETTINGS&lt;/code&gt; permission to restore Accessibility and reconnects to &lt;code&gt;ripple_ss&lt;/code&gt; within about a minute.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  4. The Bug That Broke 50% of Wireless Debugging Pairings: &lt;code&gt;AndroidPubkey&lt;/code&gt; &lt;code&gt;n0inv&lt;/code&gt; Overflow
&lt;/h2&gt;

&lt;p&gt;While building the built-in wireless debugging client, we ran into a baffling bug: &lt;strong&gt;pairing succeeded on the first try about half the time, and failed silently after the SPAKE2 / TLS handshake the other half of the time.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When pairing over Android 11+ wireless debugging:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The client and &lt;code&gt;adbd&lt;/code&gt; establish a TLS 1.3 connection authenticated with SPAKE2 using the 6-digit pairing code.&lt;/li&gt;
&lt;li&gt;Inside that encrypted channel, the client sends a &lt;code&gt;PeerInfo&lt;/code&gt; structure containing its 2048-bit RSA public key encoded in AOSP's custom binary &lt;code&gt;RSAPublicKey&lt;/code&gt; format (&lt;code&gt;libcrypto_utils/android_pubkey.cpp&lt;/code&gt;), Base64-encoded.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;adbd&lt;/code&gt; decodes the struct and saves the public key to &lt;code&gt;/data/misc/adb/adb_keys&lt;/code&gt; so subsequent &lt;code&gt;AdbConnection&lt;/code&gt; handshakes on the connect port are trusted.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;AOSP's 524-byte &lt;code&gt;RSAPublicKey&lt;/code&gt; struct looks like this in C (&lt;code&gt;system/core/libcrypto_utils/include/crypto_utils/android_pubkey.h&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="k"&gt;typedef&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;RSAPublicKey&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;uint32_t&lt;/span&gt; &lt;span class="n"&gt;modulus_size_words&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 64 for 2048-bit RSA&lt;/span&gt;
    &lt;span class="kt"&gt;uint32_t&lt;/span&gt; &lt;span class="n"&gt;n0inv&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;              &lt;span class="c1"&gt;// Precomputed Montgomery parameter: -1 / n[0] mod 2^32&lt;/span&gt;
    &lt;span class="kt"&gt;uint8_t&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;256&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;              &lt;span class="c1"&gt;// Modulus as little-endian byte array&lt;/span&gt;
    &lt;span class="kt"&gt;uint8_t&lt;/span&gt; &lt;span class="n"&gt;rr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;256&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;             &lt;span class="c1"&gt;// R^2 mod N as little-endian byte array&lt;/span&gt;
    &lt;span class="kt"&gt;uint32_t&lt;/span&gt; &lt;span class="n"&gt;exponent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;           &lt;span class="c1"&gt;// 65537&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;RSAPublicKey&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice the second field: &lt;code&gt;uint32_t n0inv&lt;/code&gt;, which is $-N^{-1} \bmod 2^{32}$, an unsigned 32-bit integer in the range $[1, 2^{32} - 1]$ (since any RSA modulus $N$ is odd).&lt;/p&gt;

&lt;p&gt;In Kotlin/Java, we compute &lt;code&gt;n0inv&lt;/code&gt; using &lt;code&gt;BigInteger&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;r32&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;BigInteger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ZERO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setBit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// 2^32&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="py"&gt;n0inv&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mod&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r32&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;modInverse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;n0inv&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;r32&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;subtract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n0inv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;          &lt;span class="c1"&gt;// Result is in [1, 2^32 - 1]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In our initial port, we wrote &lt;code&gt;n0inv&lt;/code&gt; into the little-endian &lt;code&gt;ByteBuffer&lt;/code&gt; using &lt;code&gt;BigInteger.intValueExact()&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="c1"&gt;// BUG: throws ArithmeticException whenever bit 31 of n0inv is 1!&lt;/span&gt;
&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;putInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n0inv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;intValueExact&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is why that failed 50% of the time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;n0inv&lt;/code&gt; is an &lt;strong&gt;unsigned&lt;/strong&gt; 32-bit value uniformly distributed across odd integers in $[1, 2^{32} - 1]$.&lt;/li&gt;
&lt;li&gt;Java's &lt;code&gt;int&lt;/code&gt; is &lt;strong&gt;signed&lt;/strong&gt; (&lt;code&gt;[-2^31, 2^31 - 1]&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Whenever a newly generated RSA key had $n_0^{-1}$ such that &lt;code&gt;n0inv &amp;gt;= 0x80000000&lt;/code&gt; (which happens for &lt;strong&gt;50% of all random RSA moduli&lt;/strong&gt;), &lt;code&gt;n0inv.intValueExact()&lt;/code&gt; threw &lt;code&gt;ArithmeticException: BigInteger out of int range&lt;/code&gt; because the positive &lt;code&gt;BigInteger&lt;/code&gt; required 33 bits in two's-complement signed representation!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The fix is a one-line change from &lt;code&gt;intValueExact()&lt;/code&gt; to &lt;code&gt;toInt()&lt;/code&gt; (or &lt;code&gt;intValue()&lt;/code&gt;), which preserves the exact lower 32 bits in two's-complement representation when written by &lt;code&gt;ByteBuffer.putInt()&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;r32&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;BigInteger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ZERO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setBit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="py"&gt;n0inv&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mod&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r32&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;modInverse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;n0inv&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;r32&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;subtract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n0inv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;// toInt() preserves all 32 bits of the uint32_t value without throwing on &amp;gt;= 2^31&lt;/span&gt;
&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;putInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n0inv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toInt&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once we switched &lt;code&gt;intValueExact()&lt;/code&gt; to &lt;code&gt;toInt()&lt;/code&gt; (and added a unit test covering RSA moduli across both halves of the &lt;code&gt;uint32&lt;/code&gt; range), wireless debugging pairing became 100% reliable.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Try Ripple
&lt;/h2&gt;

&lt;p&gt;Ripple &lt;code&gt;v0.1.1&lt;/code&gt; is out today. It is free, has no ads, requires no account, and stores all rules and usage statistics locally on your device.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;English Overview &amp;amp; Guide&lt;/strong&gt;: &lt;a href="https://ripplefocus.github.io/en/" rel="noopener noreferrer"&gt;https://ripplefocus.github.io/en/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chinese Homepage&lt;/strong&gt;: &lt;a href="https://ripplefocus.github.io/" rel="noopener noreferrer"&gt;https://ripplefocus.github.io/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Download APK (GitHub Releases)&lt;/strong&gt;: &lt;a href="https://github.com/ripplefocus/ripplefocus.github.io/releases/latest" rel="noopener noreferrer"&gt;https://github.com/ripplefocus/ripplefocus.github.io/releases/latest&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;(Note: &lt;code&gt;v0.1.1&lt;/code&gt; is out today, and the Android app interface now supports full English and Simplified Chinese.)&lt;/em&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>kotlin</category>
      <category>flutter</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Building DisconfirmAI: An AI investment research workspace that looks for counter-evidence first</title>
      <dc:creator>Mingke Tu</dc:creator>
      <pubDate>Tue, 27 Oct 2026 01:22:06 +0000</pubDate>
      <link>https://dev.to/disconfirmai/building-disconfirmai-an-ai-investment-research-workspace-that-looks-for-counter-evidence-first-5bhk</link>
      <guid>https://dev.to/disconfirmai/building-disconfirmai-an-ai-investment-research-workspace-that-looks-for-counter-evidence-first-5bhk</guid>
      <description>&lt;p&gt;When you use a general-purpose LLM to analyze a stock or read an earnings report, it tends to agree with whatever premise you put in the prompt. If you ask why a company looks undervalued, it will assemble a convincing bull case. In financial research, that habit is risky.&lt;/p&gt;

&lt;p&gt;I built &lt;a href="https://disconfirmai.com/en" rel="noopener noreferrer"&gt;DisconfirmAI&lt;/a&gt; around a simple rule from Karl Popper and value investing: before building conviction in a thesis, look for the specific evidence that would prove it wrong.&lt;/p&gt;

&lt;p&gt;Here is how the workspace is structured:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Primary-Source Daily Reading
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://disconfirmai.com/en/reading" rel="noopener noreferrer"&gt;Daily Reading&lt;/a&gt; feed curates AI industry and market developments from primary sources, keeping original links and publication dates. Editorial annotations use three fixed labels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;[Background]&lt;/strong&gt; for factual context&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;[Doubt]&lt;/strong&gt; when a claim relies only on vendor self-reporting without independent benchmarks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;[Editor's Note]&lt;/strong&gt; for editorial commentary&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. SEC Filing &amp;amp; 13F Research Separated by Evidence Level
&lt;/h3&gt;

&lt;p&gt;In the &lt;a href="https://disconfirmai.com/en/features/research" rel="noopener noreferrer"&gt;Research&lt;/a&gt; workflow, questions about earnings releases, multi-year financials, and SEC 13F institutional holdings (calculated strictly by share-count changes rather than market-value fluctuations) are split into three sections: &lt;strong&gt;Verified&lt;/strong&gt;, &lt;strong&gt;Inferred&lt;/strong&gt;, and &lt;strong&gt;Doubtful&lt;/strong&gt;. It does not output buy/sell recommendations or price targets.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Investment Framework &amp;amp; Quiet Scheduled Radar
&lt;/h3&gt;

&lt;p&gt;In &lt;a href="https://disconfirmai.com/en/features/system" rel="noopener noreferrer"&gt;Investment Framework&lt;/a&gt;, you write down your circle of competence, entry rules, and the exact conditions that would force you to revise or exit a position. &lt;a href="https://disconfirmai.com/en/features/radar" rel="noopener noreferrer"&gt;Radar&lt;/a&gt; scans those conditions on a schedule. When nothing material changes, it stays quiet and logs &lt;code&gt;scanned-and-empty&lt;/code&gt; in the audit trail.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Open AI Industry Databases &amp;amp; 23 Free Valuation Tools
&lt;/h3&gt;

&lt;p&gt;Everything below is open in the browser without registration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://disconfirmai.com/en/ai100" rel="noopener noreferrer"&gt;AI 100 Ranking&lt;/a&gt; and &lt;a href="https://disconfirmai.com/en/ai-industry-map" rel="noopener noreferrer"&gt;AI Industry Map&lt;/a&gt; covering 328 public and private AI companies with valuation sources.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://disconfirmai.com/en/ai-capital" rel="noopener noreferrer"&gt;AI Capital Database&lt;/a&gt; tracking 291 AI-native companies with $100M+ in funding and 1,205 investment firms.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://disconfirmai.com/en/tools" rel="noopener noreferrer"&gt;23 Native Investing Tools&lt;/a&gt; including Value Trap Review, Business Quality Check, Damodaran DCF, Buffett Intrinsic Value, Abnormal Selling Pressure Check, and a 38-metric financial analysis handbook.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you analyze tech or AI companies or build financial research workflows, I would love your feedback on the tools and the falsification approach: &lt;a href="https://disconfirmai.com/en" rel="noopener noreferrer"&gt;https://disconfirmai.com/en&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>fintech</category>
      <category>investing</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
