map-a-droid / mad-atv Goto Github PK
View Code? Open in Web Editor NEWATV MAD Roms
ATV MAD Roms
the title says it all, ill get around to it someday probably, not sure why tho... just buy a usb stick if you dont have one! 😂
This is just a reminder and #todo list, we brainstorming at this point. The main idea is to run script (MAD job?) that would backup all important files and that we can restore them on other device with one command. Cloning, I would say?
Backup:
pogodroid settings xml
rgc settings xml
macaddress (no matter if forced to random due to a95x or using defaul)
wpa-suplicat wifi data
gmail addy
Do we change anything else that MAD-ROM can't do automagically (except Magisk....)?
Maybe like create a zip file that we can download? Or even upload it to straight to MAD and then restore via
once both are there we could expose it via PD endpoint with the origin hopper
Damn you Niantic! I guess I'll have to make another RC some time soon...
Here is the new command for downloading pogo. I will update 16_mad and the updater script in the next rom release
curl -L -o pogo.apk -k -s "$(curl -k -s "https://m.apkpure.com$(curl -k -s "https://m.apkpure.com$(curl -k -s 'https://m.apkpure.com/pokemon-go/com.nianticlabs.pokemongo/versions'|awk -F'"' '/Download Pokémon GO v/{print $4}'|head -n1)"|grep -A10 armeabi-v7a|awk -F'"' '/Download Pokémon GO v/{print $4}'|head -n1)"|awk -F'"' '/click here/{print $12}')"
Leaving info on bug found:
Device: A95x F1
Rom: 64bits Beta5
kvim:/system/bin # update_mad.sh -n
/system/bin/update_mad.sh[216]: can't create /system/build.prop: Read-only file system
mount -o rw,remount /system
origin="$(awk -F'>' '/post_origin/{print $2}' /data/data/com.mad.pogodroid/shared_prefs/com.mad.pogodroid_preferences.xml|cut -d'<' -f1)"
echo "net.hostname=${origin}" >> /system/build.prop
mount -o ro,remount /system
reboot
Add a daily PoGo app version routine on ATV's to compare current version against forced version and flash update if device version is below forced version number.
Idea derived from original text"...compare force version against local pogo version and flash update on the screen
although i guess we could make a script that does that 1x per day and just updates when needed 😱 ..."
I just installed the 1.2.0 on a new x96 mini and it did not install magisk and smali, after entering the WLAN creds like it did on 1.1.8.
Magisk also does not show up in the App Menu.
i adjusted the code in update_mad.sh for it to only reboot when being called by the shell...
If one of us finds a difference in the ENV when being called by RGC vs being called by the script, then I can use that to add a reboot
easy enough to check, just gotta add this to 16mad: env > /sdcard/env.script
and then make a job su to root and then env > /sdcard/env.rgc
then diff /sdcard/env.script /sdcard/env.rgc
If nobody beats me to it, I'll do it when I get time. If you feel like doing it let me know the results :)
I recently upgraded 12 devices to latest 64bit image via MAD AutoConfig and every single one of them was stuck at GoogleLogin. I made screenshots and added the keyboard strokes required to get along. Hope it helps! would really appreciate a solution as running into these errors costs 30min to 60min longer install time with multiple reboots if you don't have direct (ADB / scrcpy.exe) access to the device
Don't update RGC as first step in the -a update part.
Or just don't kill it at all if we can just update it.
At the moment a job with -a will Fail because rgc will lose the conenction.
While the SD method works for first install, it does not work after the MAD rom is installed. The USB installer is windows only and does not run under wine.
SD install apparently continues to work for x96 but not with the f1.
From README_usbflashing.md
"It will only work on 1 of your boxes USB ports, so if nothing happens try the other one."
x96mini uses the left USB port
a95xf1 uses the right USB port
We/I should make a Readme page for the files that the MAD rom can use for customization.
for example:
/sdcard/madmac2 - iirc sets the wifi MAC addy
/sdcard/madmac - iirc sets the eth0 mad addy
/sdcard/pingreboot - activates the pingreboot script
/sdcard/madversion (or something like that) contains the version of mad rom being used
/sdcard/disableautopogoupdate - disables pogo autoupdate
I need to check the filenames / descriptions are correct, and that there are not more files
shorted log (on purpose) after reboot after autoconfig failed, general flow is still there. All data is "valid", network connection detected. curl will return 000 if fails hard (no connection, no dns, some random error?) and we should also log exit-code from curl to figure out what has happen.
https://superuser.com/questions/501690/curl-http-code-of-000
+ ping -c1 8.8.8.8
+ echo 'Network connection detected'
+ (...)
+ get all needed PD data
+ (...)
+ check_session
+ cat /sdcard/reg_session
+ session_id=112
+ test_session
+ /system/bin/curl -s -k -L -o /dev/null -w %{http_code} --user validuser:validpassword http://validip:9000/autoconfig/112/status
+ /system/bin/curl -s -k -L -o /dev/null -w %{http_code} --user validuser:validpassword http://validip:9000/autoconfig/112/status
+ echo 'unexpected status 000 from madmin'
+ return 4
+ rm -f /sdcard/reg_session
+ make_session
+ test_session
+ /system/bin/curl -s -k -L -o /dev/null -w %{http_code} --user validuser:validpassword http://validip:9000/autoconfig/112/status
+ /system/bin/curl -s -k -L -o /dev/null -w %{http_code} --user validuser:validpassword http://validip:9000/autoconfig/112/status
+ echo 'unexpected status 000 from madmin'
+ return 4
+ echo 'Trying to register session'
+ /system/bin/curl -s -k -L -X POST --user validuser:validpassword http://validip:9000/autoconfig/register
+ session_id=
+ sleep 15
+ test_session
+ return 5
+ echo 'Trying to register session'
+ /system/bin/curl -s -k -L -X POST --user validuser:validpassword http://validip:9000/autoconfig/register
+ session_id=
+ sleep 15
+ test_session
+ return 5
+ echo 'Trying to register session'
+ /system/bin/curl -s -k -L -X POST --user validuser:validpassword http://validip:9000/autoconfig/register
+ (... loop ...)
Line 32 in b7a7d7d
/system/priv-app/RemoteGpsController.apk/
is a directory and need the -e
flag to test for existence. In the current version the check always fails (because -f
is used, but its not a file).
The condition is always true and the init script try to reinstall PD.
Bug 2 (download function):
I found this by debugging the new download function (since v1.2.0). For me the new download function never finishes.
changed it to this below to make it work again:
# $1 = url
# $2 = local path
# lets see that curl exits successfully
/system/bin/curl --retry 999 --retry-max-time 0 -s -k -L -A "$useragent" -o "$2" "$1"
echo
}
"When the box is seen in the burn tool it will start flashing. Connect the power cable"
Apparently the power cord is not needed when flashing ATVs
This has been true for all of my a95xf1 boxes so far
atvX_s905w:/system/bin # sh -x nfs_install.sh
$'/cache/recovery/command\r'
$'/cache/recovery/command\r'
From README_usbflashing.md
The reset button is not needed when flashing a95xf1
Follow the instructions of USB burning tool, click start, plug the usb in the right side port and it will start flashing immediately
note to self, look in to this:
https://android.stackexchange.com/questions/40147/is-it-possible-to-enable-location-services-via-shell
Running update_mad.sh with -n flag by job returns the following error:
Update DHCP name
RETURNING:
[/system/bin/update_mad.sh[130]: can't create /system/build.prop: Read-only file system]
Reflashed some A95x F1 boxes with the 64bits beta5 rom and the IP they had assigned with the 32bits version changed, so would be good if we can get the new IP assigned to the box at the MADmin autoconf log when the process is complete so we can grab it and reconfigure our adb access. thanks!
To allow for script updates without reflashing, make the a primary script download the (secondary/payload) script from this github repo
Seems to be the same issue as #79 .
Used SD card method to install MAD-ATV 1.2.0 on an x96 Mini. After finishing setup and entering the App Drawer, nothing is there. After a few seconds, PogoDroid appears as well. Then it stops, however, and nothing else is installed.
I've tried rebooting, leaving it online for a whole night, manually entering TWRP and moving to next to the router, but nothing seems to work.
Earlier, I had installed a previous version (I think it was 1.1.0) and the same occurred. I read that 1.2.0 should have fixed that, but it didn't.
Is there any way to continue manually? Should I try with an older version?
example code:
uid=$(dumpsys package com.mad.pogodroid | grep userId= | awk -F '=' '{print $2}')
sqlite3 /data/adb/magisk.db "DELETE from policies WHERE package_name='com.mad.pogodroid'"
sqlite3 /data/adb/magisk.db "INSERT INTO policies (uid,package_name,policy,until,logging,notification) VALUES(""$uid"",'com.mad.pogodroid',2,0,1,1)"
I should make a script in all ATV which somebody can run to put their RGC/pogodroid configs onto a USB
Request for MAD Rom rev number "MAD RCxx" on furure releases, so rev number can be grabbed by a Grep comand in MAD Jobs and adb commands
Hi.
Often, the ATV devices are hosted at some people from the community behind their routers.
When problems arise, it's handy to have ADB/scrcpy connection but this requires a port forwarding at the side of the hoster, which is not only insecure, but also difficult to get.
It would be nice, if the ATV image could include the necessary programs so that one could run a job that lets a SSH client on the device create the necessary portforwardings to the MAD server (or some other server).
Ideally one could configure the server's public key at the MAD server (which is then automatically exchanged) and would also get the clients (automatically generated) public key.
Obviously one would also need to be able to configure some username and ports (i.e. for ssh itself and for the binding of the forward).
Cheers!
i noticed when a job just reboots, it exits with success. this means the reboot command exits success before it actually reboots.
madmin jobs are failing because the update script reboots and never exits.
if we remove reboot from the script, and add it to the job, i expect the job will exit success.
This may be out of scope, but I am having trouble downloading the releases here on Github.
Stil when I try to download a release, it reduces speed down to 10 kbs
What might be the problem?
hi i descriped my issue nearer here
Map-A-Droid/MAD-device-list#34
Yagala YA-II | S905W | MAD rom | 18.1 | Yes | SD card (USB A to USB A untested) | ~20 min. | Only tried on one device! ROM and procedure exactly the same as X96 Mini |
---|
i hav installen now the MAD-ATV but remote is workin any more
crippe came up with the idea of checking content-length against a stored copy of it
** remember to check if empty and bail out!
curl -L -I -s -k https://www.maddev.eu/apk/PogoDroid.apk|grep 'Content-Length:'
Content-Length: 44250791
I have tried to flash an MECOOL M8S Max, but is failed.
Flashing an original firmware "M8S_Max_20190605.164225.V0213.img" works fine.
I used "MAD-s912-1.2.0.img" and USB_Burning_Tool V2.1.7.0
[18:19:40 203][HUB3-4][Inf]--Start burning...
[18:19:40 265][HUB3-4][Inf]--------------ERASE BOOTLOADER------------
[18:19:40 373][HUB3-4][Inf]--start SendIdentifyCmd
[18:19:40 374][HUB3-4][Inf]--2-2-0-0
[18:19:40 374][HUB3-4][Inf]-------------Download DDR.USB-----------
[18:19:40 374][HUB3-4][Inf]--2-2-0-0
[18:19:40 374][HUB3-4][Inf]--Control write pll reg1 0xd9000000:0x000000b1
[18:19:40 884][HUB3-4][Inf]--Control write pll reg1 0xd9000000:0x00005183
[18:19:41 394][HUB3-4][Inf]--Control write pll reg1 0xd9000000:0x000000b1
[18:19:41 905][HUB3-4][Inf]--Control write pll reg1 0xd9000000:0x00005183
[18:19:42 415][HUB3-4][Inf]--Write initial succeed
[18:19:42 415][HUB3-4][Inf]--Upload encrypt at 0xc8100228
[18:19:42 416][HUB3-4][Inf]--ulValue = 0xadfc318c
[18:19:42 416][HUB3-4][Inf]--Read encrypt value succeed
[18:19:42 416][HUB3-4][Inf]--Download DDR.USB,size: 49152!
[18:19:42 427][HUB3-4][Inf]--Transfer complete 49152
[18:19:42 427][HUB3-4][Inf]--Run at address 0xd9000000
[18:19:42 428][HUB3-4][Inf]--RunInRam success
[18:19:42 793][HUB3-4][Inf]--IOCTL_IDENTIFY_HOST_Handler ret=-5 error_msg=libusb0-dll:err [control_msg] sending control message failed, win error: A device connected to the system is not working.
[18:19:42 800][HUB3-4][Err]--[0x10105004]Romcode/Initialize DDR/Read initialize status/Error result
[18:19:42 801][HUB3-4][Inf]--Close device handle 0x000008e8
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.