-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
53 additions
and
14 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
ad13f37
There was a problem hiding this comment.
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