PdAndro and regenerating APK
Posted: Thu Jun 20, 2024 2:54 pm
PdAndro (available on the Google Play Store), which is a flavor of PDOS-generic, can turn your smartphone into a computer - sort of a rival to Termux.
The 32-bit version includes a fork of gcc 3.2.3 that is able to self-generate - pure ARM, although optimization doesn't work properly.
As such, using just your smartphone you can rebuild and modify the tools themselves. I'm happy to ignore (ie keep static) the Kotlin code that provides the terminal UI. However, to keep within the Android rules (ie no jailbreaking), I need to put my pseudo-bios (bios.exe) inside the APK (it gets renamed to libbios.so). That means that if I need to change the pseudo-bios itself, I need to do this:
https://github.com/robertapengelly/Pdos-PdAndro
zip -r app.zip ./app/
mv app.zip app.apk
keytool -genkey -keyalg RSA -alias mykeystore -keystore mykeystore.jks -storepass 12345678 -validity 360
apksigner sign --ks release.jks app.apk
zip is C source code so with the toolchain I provide, and using the zip source code, you can presumably get zip operational so that that zip command works.
However, do I have any options (either source code or apps) to do the other two things - keytool and apksigner?
I once saw a post saying that you can install unsigned APKs if you enable unknown sources (I think), but when I had an unsigned APK to test, it didn't work for me - it was some time ago and it is possible that it was an invalid test of the theory.
We could provide a signed APK for the Google Play Store and an unsigned APK on github if that was indeed a solution to the "problem".
The other possibility is to hold the pseudo-bios itself static and always run a separate PDOS layer. I had always originally intended to run a PDOS layer. But that eliminates the possibility of ever restructuring the pseudo-bios unless you have access to a computer other than a smartphone so that the tools for building an APK are available.
But ideally tools or a technique can be used using just the Android smartphone. Any ideas?
Thanks. Paul.
The 32-bit version includes a fork of gcc 3.2.3 that is able to self-generate - pure ARM, although optimization doesn't work properly.
As such, using just your smartphone you can rebuild and modify the tools themselves. I'm happy to ignore (ie keep static) the Kotlin code that provides the terminal UI. However, to keep within the Android rules (ie no jailbreaking), I need to put my pseudo-bios (bios.exe) inside the APK (it gets renamed to libbios.so). That means that if I need to change the pseudo-bios itself, I need to do this:
https://github.com/robertapengelly/Pdos-PdAndro
zip -r app.zip ./app/
mv app.zip app.apk
keytool -genkey -keyalg RSA -alias mykeystore -keystore mykeystore.jks -storepass 12345678 -validity 360
apksigner sign --ks release.jks app.apk
zip is C source code so with the toolchain I provide, and using the zip source code, you can presumably get zip operational so that that zip command works.
However, do I have any options (either source code or apps) to do the other two things - keytool and apksigner?
I once saw a post saying that you can install unsigned APKs if you enable unknown sources (I think), but when I had an unsigned APK to test, it didn't work for me - it was some time ago and it is possible that it was an invalid test of the theory.
We could provide a signed APK for the Google Play Store and an unsigned APK on github if that was indeed a solution to the "problem".
The other possibility is to hold the pseudo-bios itself static and always run a separate PDOS layer. I had always originally intended to run a PDOS layer. But that eliminates the possibility of ever restructuring the pseudo-bios unless you have access to a computer other than a smartphone so that the tools for building an APK are available.
But ideally tools or a technique can be used using just the Android smartphone. Any ideas?
Thanks. Paul.