Skip to content

Commit 4e7a9a2

Browse files
authored
Update README.md formatting and instructions.
The product is ".NET for Android", not ".net Android". The `dotnetcli` code block is for `dotnet …` commands, not just any shell command.
1 parent 4bc10bb commit 4e7a9a2

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

samples/NativeAOT/README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# NativeAOT Sample
22

3-
This is the sample for using NativeAOT with .net Android
3+
This is the sample for using NativeAOT with .NET for Android.
44

55
## Debugging
66

77
In order to debug we need to use `lldb`. First install the application
88

9-
```dotnetcli
9+
```sh
1010
./dotnet-local.sh build samples/NativeAOT/NativeAOT.csproj -c Release -p:DebugSymbols=true -t:Install
1111
```
1212

@@ -19,7 +19,7 @@ In order to lldb debugging to work we need to make sure we install the `lldb-ser
1919
The following steps, install the `lldb-server`, stop any existing lldb-server process and they launches
2020
it. It also sets up the required port forwarding so we can connect to the server from the local machine.
2121

22-
```dotnetcli
22+
```shell
2323
adb push $(ANDROID_NDK_HOME)/toolchains/llvm/prebuilt/darwin-x86_64/lib/clang/18/lib/linux/aarch64/lldb-server /data/local/tmp/lldb-server
2424
adb shell run-as net.dot.hellonativeaot cp /data/local/tmp/lldb-server .
2525
adb forward tcp:5039 tcp:5039
@@ -31,7 +31,7 @@ Note: We have to run the `lldb-server` in the context of the app so it has the c
3131

3232
Once `lldb-server` is up and running, you will want to run up the app using the following
3333

34-
```dotnetcli
34+
```shell
3535
adb shell am start -S --user "0" -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "net.dot.hellonativeaot/my.MainActivity" -D
3636
```
3737

@@ -41,7 +41,7 @@ If you do not want to the app to pause on startup, you can omit the `-D` argumen
4141
Now that the app is running we need to get the process id. We do that using `adb shell ps`.
4242
The `grep` is used to filter the results to only our app.
4343

44-
```dotnetcli
44+
```shell
4545
adb shell ps | grep net.dot.hellonativeaot
4646
```
4747

@@ -50,7 +50,7 @@ These setup `lldb` and loads the symbols, then attaches to the process. It also
5050
a `clearjdb` command which you can use from within the `lldb` REPL to clear the Java
5151
Debugger dialog you get when you launch your app.
5252

53-
```dotnetcli
53+
```shell
5454
lldb
5555
> platform select remote-android
5656
> platform connect connect://localhost:5039
@@ -65,7 +65,7 @@ lldb
6565
6666
if your symbols are in a separate `.dbg` file, you can use the following.
6767
68-
```dotnetcli
68+
```
6969
> target symbols add samples/NativeAOT/bin/Debug/net10.0-android/android-arm64/native/NativeAOT.so.dbg
7070
```
7171
@@ -75,13 +75,15 @@ launching the activity.
7575
you can do this via the `lldb` terminal by using the `clearjdb` function which is an
7676
extension function we have.
7777
78-
or use the following from the command line.
78+
or use the following from the command line:
7979
80-
`python3 samples/NativeAOT/lldb_commands.py`
80+
```shell
81+
python3 samples/NativeAOT/lldb_commands.py
82+
```
8183
8284
you can also clear it manually via
8385
84-
```dotnetcli
86+
```shell
8587
adb forward --remove tcp:8700
8688
adb forward tcp:8700 jdwp:<pid>
8789
jdb -attach localhost:8700
@@ -93,7 +95,7 @@ You will want to type `quit` to exit the `jdb` terminal once it has connected.
9395
9496
Setting breakpoints just need to use the filename and line number, these are just standard `lldb` commands.
9597
96-
```dotnetcli
98+
```
9799
breakpoint set -f MainActivity.cs -l 34
98100
```
99101

0 commit comments

Comments
 (0)