Skip to content

Commit

Permalink
notes: initialize contents
Browse files Browse the repository at this point in the history
  • Loading branch information
kxxt committed Dec 17, 2023
1 parent 718aee4 commit ad13f37
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 14 deletions.
7 changes: 0 additions & 7 deletions content/notes/first-note.mdx

This file was deleted.

7 changes: 0 additions & 7 deletions content/notes/second-note.mdx

This file was deleted.

21 changes: 21 additions & 0 deletions content/notes/trace-execve-and-execveat.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Trace execve and execveat
date: 2023-12-17 20:00:08+08:00
tags: [ptrace, linux]
---

import AsciinemaPlayer from "../../src/components/mdx/asciinema-player.tsx"

Use old school `strace`:

```bash
strace -Y -f -qqq -s99999 -e trace=execve,execveat <command>
```

Or an alternative I wrote in Rust (prettier output): https://github.com/kxxt/tracexec

```bash
tracexec log --show-cmdline -- <command>
```

<AsciinemaPlayer src="https://asciinema.org/a/AWTG4iHaFPMcEGCVtqAl44YFW.cast" rows={28} cols={114}/>
32 changes: 32 additions & 0 deletions content/notes/unpack-android-ota.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: Unpack Android OTA
date: 2023-12-17 20:15:26+08:00
tags: [android]
---

Short answer: use https://github.com/AndroidDumps/dumpyara , which will dump almost everything of interest.

To unpack individual images: use [`payload-dumper-go`](https://github.com/ssut/payload-dumper-go), which is available in ArchLinuxCN repo.

If you REALLY want to do it by hand, here is the way to extract individual images from `super.img`:

If `super.img` is a sparse image, then we need to unsparse it first.

```bash
$ file imgs/CN/super.img
imgs/CN/super.img: Android sparse image, version: 1.0, Total of 2228224 4096-byte output blocks in 141 input chunk
s.
```

Use `simg2img` from Arch Linux `extra/android-tools` package to unsparse it.

```bash
simg2img super.img super.img.unsparsed
```

Then we can unpack it using `lpunpack` from Arch Linux `extra/android-tools` package.

```bash
mkdir dump
lpunpack super.img.unsparsed dump
```

1 comment on commit ad13f37

@vercel
Copy link

@vercel vercel bot commented on ad13f37 Dec 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

kxxt – ./

kxxt-kxxt.vercel.app
kxxt-git-master-kxxt.vercel.app
kxxt.vercel.app
kxxt.dev
www.kxxt.dev

Please sign in to comment.