seaky / nspanel_pro_tools_apk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: Change hostname

jj-uk opened this issue · comments

commented

Would it be possible to add a feature to change the hostname?

The default hostname just seems wrong: smart >> out/target/product/px30_evb/vendor/build.prop; echo hub

(that's what my hostname is set to, although it looks like a command.)

commented

I found this app that changes the hostname each time the device boots (so root isn't needed). Seems to work, but would prefer if you added this functionality to your app so it's one less thing to install.

https://apkcombo.com/change-hostname-root/com.ramdroid.changehostname/

Edit: I think changing the hostname should complete before starting WallPanel (or other app), so that WallPanel doesn't detect network loss at start up. Something the above mentioned apk can't do, and is causing my issues with Home Assistant wanting me to log in each time WallPanel starts is the hostname was changed.

commented

I'll check it later...

I just directly edit the build.prop to set the hostname so it persists and is correct from boot.

You can do this by the following:
First you need to get the current build.prop file:

adb shell
$ su
# cp /vendor/build.prop /sdcard
# exit
adb pull /sdcard/build.prop

Next, edit the build.prop file locally to edit the net.hostname line to whatever you want it to be.
Save the file, but be sure it's saved in standard unix/linux format, and wasn't converted to Windows or Mac by your editor.

Next, you need to copy the modified build.prop file back:

adb push build.prop /sdcard/build.prop
adb shell
$ su
# mount -o rw,remount /vendor
# cp /sdcard/build.prop /vendor/build.prop
# mount -o ro,remount /vendor
# exit

Lastly, reboot your device. If everything was done correctly your device should now bootup with the hostname you gave it.

commented

@evil-dog Thanks, that's working for me. @seaky Would be great if this could be built into the app.

Its in the v2.0.0

Close this