Open isrgish opened 1 year ago
Add /system/bin
to PATH if you want to use /system/bin utilities, or open a package request for abx2xml and xml2abx as those seem like they would be useful to have in termux.
What error did you get with ro2rw? Maybe error stems from that /system/bin is not in path also.
/system/bin is in path. It recognizes the abx2xml command its just that nothing actually happens. ro2rw when it reaches the point where it extracts the partitions I get the following error.
- Detected partitions: odm_a product_a system_a
system_ext_a vendor_a
- Copy odm_a.ext4. Waiting...
chcon: failed to change context of '/data/local/TMP_NEO/imgs/odm_a.img' to ‘u:object_r:media_rw_data_file:s0’: Operation not supported on transport endpoint
- Oops, something wrong with original odm_a.ext4,
dont worry, starting mount odm_a and migrating
to new odm_a.ext4. Waiting...
chcon: failed to change context of '/data/local/TMP_NEO/imgs/odm_a.img' to ‘u:object_r:media_rw_data_file:s0’: Operation not supported on transport endpoint
- There are problems with mounting images odm_a,
you can continue without checking the odm_a
images, in this case DFE will not be available
if it vendor partition
1) [Continue]
2) [EXIT]
- Select num:
I get this for each partition. But again when I run it in su
it works fine.
What does it mean that nothing actually happens? No text is printed at all? Does it exit with an error code (echo $?
)?
Maybe selinux related. Check logcat output from a root or adb shell to see what android reports.
When I run abx2xml packages.xml packages.xml.human
I expect to get a converted copy of packages.xml
to packages.xml.human
that is human readable. When I run this command in su
this is exactly what happens, but when I run it in tsu
it doesn't do anything I don't get that converted file.
The result of echo $?
after running the command in tsu
is 0
. This shows that everything went fine. But that isn't the case.
Here sre the relevent results from logcat (I ran the command at 12:10:24) I don't see anything.
10-30 12:10:17.807 4181 23019 D Liv 11776 HttpProxyForwarder: (th:1299) Trying to read from server data for clients4.google.com:443 and url clients4.google.com:443 of max len 1024
10-30 12:10:17.848 4181 23020 D Liv 11776 HttpProxyForwarder: (th:1300) Receiving from client data for clients4.google.com:443 and url clients4.google.com:443 of len 39
10-30 12:10:17.849 4181 23020 D Liv 11776 HttpProxyForwarder: (th:1300) Trying to read from client data for clients4.google.com:443 and url clients4.google.com:443 of max len 1024
10-30 12:10:17.860 2069 3080 D CoreBackPreview: Window{854f605 u0 PopupWindow:424b6d6}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@3de008b, mPriority=0}
10-30 12:10:17.936 2069 3080 D CoreBackPreview: Window{854f605 u0 PopupWindow:424b6d6}: Setting back callback null
10-30 12:10:17.937 2069 3080 W InputManager-JNI: Input channel object '854f605 PopupWindow:424b6d6 (client)' was disposed without first being removed with the input manager!
10-30 12:10:18.079 2069 2927 D CoreBackPreview: Window{b0fcbb9 u0 PopupWindow:424b6d6}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@af5ef5f, mPriority=0}
10-30 12:10:18.172 2069 3080 D CoreBackPreview: Window{b0fcbb9 u0 PopupWindow:424b6d6}: Setting back callback null
10-30 12:10:18.173 2069 3080 W InputManager-JNI: Input channel object 'b0fcbb9 PopupWindow:424b6d6 (client)' was disposed without first being removed with the input manager!
10-30 12:10:19.437 2069 2482 D ConnectivityService: NetReassign [no changes]
10-30 12:10:25.867 2069 3080 D CoreBackPreview: Window{78e65f3 u0 PopupWindow:424b6d6}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@5e1529, mPriority=0}
10-30 12:10:25.921 2069 3080 D CoreBackPreview: Window{78e65f3 u0 PopupWindow:424b6d6}: Setting back callback null
10-30 12:10:25.922 2069 3080 W InputManager-JNI: Input channel object '78e65f3 PopupWindow:424b6d6 (client)' was disposed without first being removed with the input manager!
10-30 12:10:25.975 23021 23021 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
10-30 12:10:29.388 3716 4002 I azna : (REDACTED) getHotwordActive::active query: %s, watch: %s, devices connected: %s
10-30 12:10:29.597 2069 2927 D CoreBackPreview: Window{674d847 u0 PopupWindow:424b6d6}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@ed1819d, mPriority=0}
10-30 12:10:29.658 2069 7359 D CoreBackPreview: Window{674d847 u0 PopupWindow:424b6d6}: Setting back callback null
10-30 12:10:29.659 2069 7359 W InputManager-JNI: Input channel object '674d847 PopupWindow:424b6d6 (client)' was disposed without first being removed with the input manager!
10-30 12:10:29.897 2069 2927 D CoreBackPreview: Window{cbc7a5b u0 PopupWindow:424b6d6}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@25b03d1, mPriority=0}
10-30 12:10:29.973 2069 7359 D CoreBackPreview: Window{cbc7a5b u0 PopupWindow:424b6d6}: Setting back callback null
10-30 12:10:29.975 2069 7359 W InputManager-JNI: Input channel object 'cbc7a5b PopupWindow:424b6d6 (client)' was disposed without first being removed with the input manager!
I tried tsu -p
which gave me context=u:r:magisk:s0
but the command still didn't work.
Besides I also didn't have my .bashrc additions.
for abx2xml you need to patch tsu script, add adfitional exports
search for "Android specific exports: Need more testing."
add
EXP_ENV[ANDROID_I18N_ROOT]="$ANDROID_I18N_ROOT"
EXP_ENV[ANDROID_TZDATA_ROOT]="$ANDROID_TZDATA_ROOT"
EXP_ENV[ANDROID_ART_ROOT]="$ANDROID_ART_ROOT"
EXP_ENV[BOOTCLASSPATH]="$BOOTCLASSPATH"
Can also try using https://github.com/agnostic-apollo/sudo
for abx2xml you need to patch tsu script, add adfitional exports
search for "Android specific exports: Need more testing."
add
EXP_ENV[ANDROID_I18N_ROOT]="$ANDROID_I18N_ROOT" EXP_ENV[ANDROID_TZDATA_ROOT]="$ANDROID_TZDATA_ROOT" EXP_ENV[ANDROID_ART_ROOT]="$ANDROID_ART_ROOT" EXP_ENV[BOOTCLASSPATH]="$BOOTCLASSPATH"
Can you explain what these additions do?
@isrgish java related environment variables which are needed for running java code
This does work can it be added for the next release? I don't know if I'm aloud too nor do I know how to do this. (If someone wants to guide me I am willing to learn.
@isrgish it would be very helpful if you would like to look into it!
I forked the tsu repo now (should have been done before): https://github.com/termux/tsu I think we should check if the variables are set, and if they are then they can be exported. Check should probably be done in the env_path_helper function
These variables are not set can I add into the script as @romanovj suggest into the repo and then commit and push it?
Both magisk and supersu support su --preserve-environment
flag, variables vary between devices, so much easier to pass that than exporting environment manually. Some su
like lineageos that was removed many years ago doesn't have it though, but I haven't received any complaints.
https://github.com/agnostic-apollo/sudo/blob/743770c88680c1dbc00a0ade7840fab8c48ad0e2/sudo#L828
You can do a runtime check too.
https://github.com/agnostic-apollo/sudo/blob/743770c88680c1dbc00a0ade7840fab8c48ad0e2/sudo#L761
Problem description
There are some programs that I'm able to run in
su
but I'm not able to run intsu
. They seem to run but nothing happens. These are 2 of them that I remember off hand/system/bin
, it only works insu
not intsu
).tsu
but works fine insu
)What steps will reproduce the bug?
Typing
Then use abx2xml on a file it seems to work but it doesn't convert it.
tsu
What is the expected behavior?
It should work in
tsu
just like it works insu
System information
termux-info: